From 52bab918c4ba712cb1d0925375d6309fa01a1341 Mon Sep 17 00:00:00 2001 From: Jose Luis Carcel Date: Wed, 26 Jul 2023 07:42:54 +0000 Subject: [PATCH 001/463] Update file context.proto --- proto/context.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proto/context.proto b/proto/context.proto index 55a80470d..87680a5b9 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -448,9 +448,10 @@ message EndPointId { message EndPoint { EndPointId endpoint_id = 1; string name = 2; - string endpoint_type = 3; + string endpoint_type = 3; // == 'smartnics' repeated kpi_sample_types.KpiSampleType kpi_sample_types = 4; Location endpoint_location = 5; + map capabilities = 6; } message EndPointName { -- GitLab From ab9a0dcd86da5bcd9e2230b9b9bbd18b3c696797 Mon Sep 17 00:00:00 2001 From: Jose Luis Carcel Date: Wed, 26 Jul 2023 08:18:08 +0000 Subject: [PATCH 002/463] Create Context Smartnics --- proto/context-ext-smartnics.proto | 100 ++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 proto/context-ext-smartnics.proto diff --git a/proto/context-ext-smartnics.proto b/proto/context-ext-smartnics.proto new file mode 100644 index 000000000..f4783da73 --- /dev/null +++ b/proto/context-ext-smartnics.proto @@ -0,0 +1,100 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// References: +// https://www.nvidia.com/content/dam/en-zz/Solutions/data-center/products/a30-gpu/pdf/a30-datasheet.pdf +// https://www.nvidia.com/content/dam/en-zz/Solutions/Data-Center/documents/datasheet-nvidia-bluefield-2-dpu.pdf +// https://www.nvidia.com/content/dam/en-zz/Solutions/networking/ethernet-adapters/connectX-6-dx-datasheet.pdf +// converged accel: https://www.nvidia.com/content/dam/en-zz/Solutions/gtcf21/converged-accelerator/pdf/datasheet.pdf + +// bluefield-2 = connectX-6 + DPUs +// conv_accel = bluefield-2 + GPU + +syntax = "proto3"; +package context-ext-smartnics; + +import context; +import "kpi_sample_types.proto"; + +message SmartnicsCapabilities { + string vendor = 1; + string model = 2; + string serial_number = 3; + repeated Transceiver transceivers = 4; + repeated DPU dpus = 5; + repeated GPU gpus = 6; +} + +enum TransceiverPortTypeEnum { + TRANSCEIVER_PORT_TYPE_UNDEFINED = 0; + TRANSCEIVER_PORT_TYPE_SFP = 1; + TRANSCEIVER_PORT_TYPE_SFP_PLUS = 2; + TRANSCEIVER_PORT_TYPE_QSFP_28 = 3; + TRANSCEIVER_PORT_TYPE_QSFP_56 = 4; + TRANSCEIVER_PORT_TYPE_QSFP_DD = 5; +} + +enum TransceiverPortSpeedEnum { + TRANSCEIVER_PORT_SPEED_UNDEFINED = 0; + TRANSCEIVER_PORT_SPEED_1G = 1; + TRANSCEIVER_PORT_SPEED_10G = 2; + TRANSCEIVER_PORT_SPEED_25G = 3; + TRANSCEIVER_PORT_SPEED_40G = 4; + TRANSCEIVER_PORT_SPEED_100G = 5; + TRANSCEIVER_PORT_SPEED_200G = 6; + TRANSCEIVER_PORT_SPEED_400G = 7; + TRANSCEIVER_PORT_SPEED_800G = 8; +} + +message Transceiver { + TransceiverPortTypeEnum port_type = 1; + repeated TransceiverPortSpeedEnum port_speeds = 2; + repeated kpi_sample_types.KpiSampleType kpi_sample_types = 3; +} + +message DPU { + uint32 num_cores = 1; + repeated DPU_Core cores = 2; + repeated DPU_Memory memories = 3; +} + +enum DpuCoreArchitectureEnum { + DPU_CORE_ARCHITECTURE_UNDEFINED = 0; + DPU_CORE_ARCHITECTURE_32BIT = 1; + DPU_CORE_ARCHITECTURE_64BIT = 2; +} + +message DPU_Core { + string model = 1; // Armv8 A72 + enum DpuCoreArchitectureEnum architecture = 2; // 64-bit + // define cache: + // -- 1MB L2 cache per 2 cores + // -- 6MB L3 cache with plurality of eviction policies +} + +message DPU_Memory { + // define RAM and eMMC + // -- DDR4 DIMM Support + // -- > Single DDR4 DRAM controller + // -- > 16GB / 32GB of on-board DDR4 + // -- > ECC error protection support +} + +message GPU { + enum Architecture architecture = 1; + enum ComputeCapabilities compute_capabilities = 2; + uint64 memory_size_mb = 3; + uint32 num_cores = 4; + // complete with specs of GPU +} -- GitLab From baf109068617e6002665b0a3b07888c160e37da9 Mon Sep 17 00:00:00 2001 From: Jose Luis Carcel Date: Wed, 26 Jul 2023 08:58:00 +0000 Subject: [PATCH 003/463] Add new directory --- src/device/service/drivers/smartnic_probes/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/device/service/drivers/smartnic_probes/.gitkeep diff --git a/src/device/service/drivers/smartnic_probes/.gitkeep b/src/device/service/drivers/smartnic_probes/.gitkeep new file mode 100644 index 000000000..e69de29bb -- GitLab From 1e17fbc1da0fb88c5dead7d83de277ea118d7323 Mon Sep 17 00:00:00 2001 From: Jose Luis Carcel Date: Wed, 26 Jul 2023 08:58:54 +0000 Subject: [PATCH 004/463] Added Probes-Agent YANG --- .../drivers/smartnic_probes/probes-agent.yang | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/device/service/drivers/smartnic_probes/probes-agent.yang diff --git a/src/device/service/drivers/smartnic_probes/probes-agent.yang b/src/device/service/drivers/smartnic_probes/probes-agent.yang new file mode 100644 index 000000000..71e1337c4 --- /dev/null +++ b/src/device/service/drivers/smartnic_probes/probes-agent.yang @@ -0,0 +1,44 @@ +probes-agent.yang + +# augment de openconfig probes + +augment /probes/probe { + leaf probe_type { + type enumeration { + enum plain_traffic; + enum morpheus_pipeline; + } + } +} + +augment /probes/probe/tests/test/config { + uses morpheus_pipelines; +} + +grouping morpheus_pipelines { + list morpheus_pipelines { + key name; + uses morpheus_pipeline; + } +} + +grouping morpheus_pipeline { + leaf name { type string; } + leaf num_threads { type uint16; } + // other settings + // https://github.com/nv-morpheus/Morpheus/blob/branch-23.11/examples/abp_pcap_detection/run.py + + list stages { + key name; + uses morpheus_pipeline_stage; + } +} + +grouping morpheus_pipeline_stage { + leaf name { type string; } + // enum stage type + // stage parameters + // soportar custom stages + // https://github.com/nv-morpheus/Morpheus/blob/branch-23.11/examples/abp_pcap_detection/run.py + +} -- GitLab From af997d4865cd625ae2ed9feb06f0f35a84325df6 Mon Sep 17 00:00:00 2001 From: Ricard Vilalta Date: Thu, 27 Jul 2023 07:57:31 +0000 Subject: [PATCH 005/463] Add new directory --- .../drivers/smartnic_probes/smartnics_probes_agent/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/device/service/drivers/smartnic_probes/smartnics_probes_agent/.gitkeep diff --git a/src/device/service/drivers/smartnic_probes/smartnics_probes_agent/.gitkeep b/src/device/service/drivers/smartnic_probes/smartnics_probes_agent/.gitkeep new file mode 100644 index 000000000..e69de29bb -- GitLab From e6505c21208113eff2b8e5dbe7fed0b8ed2f1f7e Mon Sep 17 00:00:00 2001 From: carcel Date: Thu, 3 Aug 2023 12:14:12 +0200 Subject: [PATCH 006/463] Update Context SmartNICs --- proto/context-ext-smartnics.proto | 56 ++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/proto/context-ext-smartnics.proto b/proto/context-ext-smartnics.proto index f4783da73..2a3fe6138 100644 --- a/proto/context-ext-smartnics.proto +++ b/proto/context-ext-smartnics.proto @@ -13,8 +13,6 @@ // limitations under the License. // References: -// https://www.nvidia.com/content/dam/en-zz/Solutions/data-center/products/a30-gpu/pdf/a30-datasheet.pdf -// https://www.nvidia.com/content/dam/en-zz/Solutions/Data-Center/documents/datasheet-nvidia-bluefield-2-dpu.pdf // https://www.nvidia.com/content/dam/en-zz/Solutions/networking/ethernet-adapters/connectX-6-dx-datasheet.pdf // converged accel: https://www.nvidia.com/content/dam/en-zz/Solutions/gtcf21/converged-accelerator/pdf/datasheet.pdf @@ -77,24 +75,50 @@ enum DpuCoreArchitectureEnum { message DPU_Core { string model = 1; // Armv8 A72 - enum DpuCoreArchitectureEnum architecture = 2; // 64-bit - // define cache: - // -- 1MB L2 cache per 2 cores - // -- 6MB L3 cache with plurality of eviction policies + enum DpuCoreArchitectureEnum architecture = 2; + uint64 l2_cache_size_mb = 3; + uint64 l3_cache_size_mb = 4; } message DPU_Memory { - // define RAM and eMMC - // -- DDR4 DIMM Support - // -- > Single DDR4 DRAM controller - // -- > 16GB / 32GB of on-board DDR4 - // -- > ECC error protection support + string RamMemoryType = 1; //On-Board DDR4 + string eMMCMemoryType = 2; //eMMC + enum DpuRamMemorySizeGB RamMemorySizeGB = 3; + enum DpueMMCMemorySizeGB eMMCMemorySizeGB = 4; +} + +enum DpuRamMemorySizeGB { + DPU_MEMORY_DDR4_RAM_UNDEFINED = 0; + DPU_MEMORY_DDR4_RAM_16GB = 1; + DPU_MEMORY_DDR4_RAM_32GB = 2; +} + +enum DpueMMCMemorySizeGB { + DPU_MEMORY_eMMC_UNDEFINED = 0; + DPU_MEMORY_eMMC_32GB = 1; + DPU_MEMORY_eMMC_64GB = 2; + DPU_MEMORY_eMMC_128GB = 3; } message GPU { - enum Architecture architecture = 1; - enum ComputeCapabilities compute_capabilities = 2; - uint64 memory_size_mb = 3; - uint32 num_cores = 4; - // complete with specs of GPU + enum Architecture architecture = 1; //AMPERE? + enum ComputeCapabilities compute_capabilities = 2; //MIG? + uint64 memory_size_gb = 3; //24 GB HBM2 + uint32 num_CUDA_cores = 4; //3804 + uint32 num_Tensor_cores = 5; //224 + uint32 peak_fp_32 = 6; //10.3TF + uint32 peak_fp_64 = 7; //5.2TF + uint32 peak fp_64_tensor_core = 8; //10.3TF +} + +enum Architecture { + ARCH_UNDEFINED = 0; + ARCH_AMPERE = 1; +} + +enum ComputeCapabilities { + MIG_UNDEFINED = 0; + MIG_4_AT_6GB = 1; + MIG_2_AT_12GB = 2; + MIG_1_AT_24GB = 3; } -- GitLab From 6d77d5e611716a23a7a23148167ce3285714dd81 Mon Sep 17 00:00:00 2001 From: carcel Date: Thu, 3 Aug 2023 12:32:01 +0200 Subject: [PATCH 007/463] Update Context SmartNICs --- proto/context-ext-smartnics.proto | 33 ++++++++++++++++--------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/proto/context-ext-smartnics.proto b/proto/context-ext-smartnics.proto index 2a3fe6138..f54535e7b 100644 --- a/proto/context-ext-smartnics.proto +++ b/proto/context-ext-smartnics.proto @@ -15,14 +15,13 @@ // References: // https://www.nvidia.com/content/dam/en-zz/Solutions/networking/ethernet-adapters/connectX-6-dx-datasheet.pdf // converged accel: https://www.nvidia.com/content/dam/en-zz/Solutions/gtcf21/converged-accelerator/pdf/datasheet.pdf - // bluefield-2 = connectX-6 + DPUs // conv_accel = bluefield-2 + GPU syntax = "proto3"; package context-ext-smartnics; -import context; +import "context"; import "kpi_sample_types.proto"; message SmartnicsCapabilities { @@ -75,7 +74,7 @@ enum DpuCoreArchitectureEnum { message DPU_Core { string model = 1; // Armv8 A72 - enum DpuCoreArchitectureEnum architecture = 2; + DpuCoreArchitectureEnum architecture = 2; uint64 l2_cache_size_mb = 3; uint64 l3_cache_size_mb = 4; } @@ -83,8 +82,8 @@ message DPU_Core { message DPU_Memory { string RamMemoryType = 1; //On-Board DDR4 string eMMCMemoryType = 2; //eMMC - enum DpuRamMemorySizeGB RamMemorySizeGB = 3; - enum DpueMMCMemorySizeGB eMMCMemorySizeGB = 4; + DpuRamMemorySizeGB RamMemorySizeGB = 3; + DpueMMCMemorySizeGB eMMCMemorySizeGB = 4; } enum DpuRamMemorySizeGB { @@ -100,17 +99,6 @@ enum DpueMMCMemorySizeGB { DPU_MEMORY_eMMC_128GB = 3; } -message GPU { - enum Architecture architecture = 1; //AMPERE? - enum ComputeCapabilities compute_capabilities = 2; //MIG? - uint64 memory_size_gb = 3; //24 GB HBM2 - uint32 num_CUDA_cores = 4; //3804 - uint32 num_Tensor_cores = 5; //224 - uint32 peak_fp_32 = 6; //10.3TF - uint32 peak_fp_64 = 7; //5.2TF - uint32 peak fp_64_tensor_core = 8; //10.3TF -} - enum Architecture { ARCH_UNDEFINED = 0; ARCH_AMPERE = 1; @@ -122,3 +110,16 @@ enum ComputeCapabilities { MIG_2_AT_12GB = 2; MIG_1_AT_24GB = 3; } + + +message GPU { + Architecture architecture = 1; //AMPERE? + ComputeCapabilities compute_capabilities = 2; //MIG? + uint64 memory_size_gb = 3; //24 GB HBM2 + uint32 num_CUDA_cores = 4; //3804 + uint32 num_Tensor_cores = 5; //224 + uint32 peak_fp_32 = 6; //10.3TF + uint32 peak_fp_64 = 7; //5.2TF + uint32 peak_fp_64_tensor_core = 8; //10.3TF +} + -- GitLab From 69d1887348454e7ab1aed261b60e3dc7cd9afffb Mon Sep 17 00:00:00 2001 From: carcel Date: Thu, 21 Sep 2023 16:42:23 +0200 Subject: [PATCH 008/463] SmartNIC, NOS and NS Data Models --- proto/context-ext-smartnics.proto | 31 +++---- proto/nfv_client.proto | 44 +++++++++ .../drivers/smartnic_probes/probes-agent.yang | 89 ++++++++++++++++--- ztp_device.yang | 43 +++++++++ 4 files changed, 180 insertions(+), 27 deletions(-) create mode 100644 proto/nfv_client.proto create mode 100644 ztp_device.yang diff --git a/proto/context-ext-smartnics.proto b/proto/context-ext-smartnics.proto index f54535e7b..953b27e86 100644 --- a/proto/context-ext-smartnics.proto +++ b/proto/context-ext-smartnics.proto @@ -16,7 +16,7 @@ // https://www.nvidia.com/content/dam/en-zz/Solutions/networking/ethernet-adapters/connectX-6-dx-datasheet.pdf // converged accel: https://www.nvidia.com/content/dam/en-zz/Solutions/gtcf21/converged-accelerator/pdf/datasheet.pdf // bluefield-2 = connectX-6 + DPUs -// conv_accel = bluefield-2 + GPU +// conv_accel = bluefield-2 + GPU (A30) syntax = "proto3"; package context-ext-smartnics; @@ -73,15 +73,15 @@ enum DpuCoreArchitectureEnum { } message DPU_Core { - string model = 1; // Armv8 A72 + string model = 1; DpuCoreArchitectureEnum architecture = 2; uint64 l2_cache_size_mb = 3; uint64 l3_cache_size_mb = 4; } message DPU_Memory { - string RamMemoryType = 1; //On-Board DDR4 - string eMMCMemoryType = 2; //eMMC + string RamMemoryType = 1; + string eMMCMemoryType = 2; DpuRamMemorySizeGB RamMemorySizeGB = 3; DpueMMCMemorySizeGB eMMCMemorySizeGB = 4; } @@ -99,27 +99,28 @@ enum DpueMMCMemorySizeGB { DPU_MEMORY_eMMC_128GB = 3; } -enum Architecture { +enum GPUArchitecture { ARCH_UNDEFINED = 0; ARCH_AMPERE = 1; } -enum ComputeCapabilities { +enum GPUComputeCapabilities { MIG_UNDEFINED = 0; - MIG_4_AT_6GB = 1; + MIG_4_AT_6GB = 1; MIG_2_AT_12GB = 2; MIG_1_AT_24GB = 3; } message GPU { - Architecture architecture = 1; //AMPERE? - ComputeCapabilities compute_capabilities = 2; //MIG? - uint64 memory_size_gb = 3; //24 GB HBM2 - uint32 num_CUDA_cores = 4; //3804 - uint32 num_Tensor_cores = 5; //224 - uint32 peak_fp_32 = 6; //10.3TF - uint32 peak_fp_64 = 7; //5.2TF - uint32 peak_fp_64_tensor_core = 8; //10.3TF + string model = 1; + GPUArchitecture architecture = 2; + GPUComputeCapabilities compute_capabilities = 3; + uint64 memory_size_gb = 4; + uint32 num_CUDA_cores = 5; + uint32 num_Tensor_cores = 6; + uint32 peak_fp_32 = 7; + uint32 peak_fp_64 = 8; + uint32 peak_fp_64_tensor_core = 9; } diff --git a/proto/nfv_client.proto b/proto/nfv_client.proto new file mode 100644 index 000000000..d880a394c --- /dev/null +++ b/proto/nfv_client.proto @@ -0,0 +1,44 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package nfv_client; + +import "context.proto"; + +message Nsd { + string nsd_name = 1; +} + +message Ns { + string ns_id=1; + string ns_name=2; + string nsd_name=3; + string vim_account=4; +} + +message NsList { + repeated Ns ns = 1; +} + +message NsdList { + repeated Nsd nsd = 1; +} + +service nfv_client { + rpc CreateNs (ns) returns (ns_id) {} // Stable not final + rpc DeleteNs (ns) returns (context.Empty) {} +} + + diff --git a/src/device/service/drivers/smartnic_probes/probes-agent.yang b/src/device/service/drivers/smartnic_probes/probes-agent.yang index 71e1337c4..6029cd204 100644 --- a/src/device/service/drivers/smartnic_probes/probes-agent.yang +++ b/src/device/service/drivers/smartnic_probes/probes-agent.yang @@ -1,8 +1,18 @@ -probes-agent.yang +module probes-agent { -# augment de openconfig probes +namespace "urn:probes-agent"; +prefix "probes-agent"; -augment /probes/probe { +import openconfig-probes { prefix oc-probes; } + +organization "EVIDEN"; +contact "jose.carcel@eviden.com"; +description "Basic example of data model for configuring SmartNICs through Morpheus API"; +revision "2023-08-03" { + description "Basic example of data model for configuring SmartNICs through Morpheus API"; +} + +augment '/oc-probes:probes/oc-probes:probe' { leaf probe_type { type enumeration { enum plain_traffic; @@ -11,7 +21,7 @@ augment /probes/probe { } } -augment /probes/probe/tests/test/config { +augment '/oc-probes:probes/oc-probes:probe/oc-probes:tests/oc-probes:test/oc-probes:config' { uses morpheus_pipelines; } @@ -25,20 +35,75 @@ grouping morpheus_pipelines { grouping morpheus_pipeline { leaf name { type string; } leaf num_threads { type uint16; } - // other settings - // https://github.com/nv-morpheus/Morpheus/blob/branch-23.11/examples/abp_pcap_detection/run.py - + leaf pipeline_batch_size {type uint64; } + leaf model_max_batch_size {type uint64; } + leaf input_file {type string; } + leaf output_file {type string; } + leaf model_fea_length {type uint16; } + leaf model_name {type string; } + leaf iterative {type boolean; } + leaf server_url {type string; } + leaf file_type {type files; } list stages { key name; uses morpheus_pipeline_stage; } } +typedef files { + type enumeration { + enum "auto"; + enum "csv"; + enum "json"; + } +} + +typedef stage { + type enumeration { + enum "FileSourceStage"; + enum "DeserializeStage"; + enum "AbpPcapPreprocessingStage"; + enum "MonitorStage"; + enum "TritonInferenceStage"; + enum "AddClassificationsStage"; + enum "SerializeStage"; + enum "WriteToFileStage"; + } +} + +grouping prob { + leaf value { + type string; + description "probs"; + } +} + +grouping conf { + leaf mode {type string; } + leaf num_threads { type uint16; } + leaf pipeline_batch_size { type uint64; } + leaf model_max_batch_size { type uint64; } + leaf model_fea_length { type uint64; } + list class_labels { + key "value"; + uses prob; } +} + grouping morpheus_pipeline_stage { leaf name { type string; } - // enum stage type - // stage parameters - // soportar custom stages - // https://github.com/nv-morpheus/Morpheus/blob/branch-23.11/examples/abp_pcap_detection/run.py - + leaf stage_type {type stage; } + list configuration {key "mode"; uses conf;} + leaf filename {type string;} + leaf iterative {type boolean;} + leaf file_type {type files;} + leaf filter_null {type boolean;} + leaf descriptions {type string;} + leaf model_name {type string;} + leaf server_url {type string;} + leaf force_convert_inputs {type boolean;} + leaf unit {type string;} + list labels {key "value"; uses prob;} + leaf kwargs {type empty;} + leaf overwrite {type boolean;} } +} \ No newline at end of file diff --git a/ztp_device.yang b/ztp_device.yang new file mode 100644 index 000000000..748bc54c3 --- /dev/null +++ b/ztp_device.yang @@ -0,0 +1,43 @@ +module ztp_device { + + yang-version "1"; + + namespace "urn:ztp_nos"; + prefix "ztp_nos"; + organization "EVIDEN"; + contact "jose.carcel@eviden.com"; + description "Basic example of data model for modelling NOS ZTP Device"; + + revision "2023-08-03" { + description "Basic example of data model for modelling NOS ZTP Device"; + reference ""; + } + + grouping config{ + leaf ztp_device_sw_url{ + type string; + } + leaf config_script_url{ + type string; + } + } + + typedef state { + type enumeration{ + enum "UNDEF"; + enum "INIT_HW"; + enum "INIT_SW"; + enum "CONFIGURED"; + enum "RUNNING"; + enum "UPDATING"; + enum "MIGRATING"; + enum "DELETED"; + } + } + + grouping state { + leaf ztp_device_state { + type state; + } + } +} \ No newline at end of file -- GitLab From 432b8193084f06f381afad5bf2dac269de747d84 Mon Sep 17 00:00:00 2001 From: carcel Date: Tue, 3 Oct 2023 17:26:37 +0200 Subject: [PATCH 009/463] Update SmartNIC, NOS and NS Data Models --- proto/any.proto | 162 +++++ proto/context.proto | 3 +- ...nics.proto => context_ext_smartnics.proto} | 37 +- proto/nfv_client.proto | 11 +- proto/nos_client.proto | 33 + .../automation/src/ztp-agent/ztp_device.yang | 3 + .../smartnic_probes/ietf-yang-types.yang | 480 +++++++++++++++ .../openconfig-extensions.yang | 206 +++++++ .../openconfig-inet-types.yang | 478 +++++++++++++++ .../openconfig-probes-types.yang | 86 +++ .../smartnic_probes/openconfig-probes.yang | 575 ++++++++++++++++++ .../smartnic_probes/openconfig-types.yang | 471 ++++++++++++++ .../drivers/smartnic_probes/probes-agent.yang | 150 +++-- .../references_probes_libraries.txt | 6 + 14 files changed, 2611 insertions(+), 90 deletions(-) create mode 100644 proto/any.proto rename proto/{context-ext-smartnics.proto => context_ext_smartnics.proto} (79%) create mode 100644 proto/nos_client.proto rename ztp_device.yang => src/automation/src/ztp-agent/ztp_device.yang (91%) create mode 100644 src/device/service/drivers/smartnic_probes/ietf-yang-types.yang create mode 100644 src/device/service/drivers/smartnic_probes/openconfig-extensions.yang create mode 100644 src/device/service/drivers/smartnic_probes/openconfig-inet-types.yang create mode 100644 src/device/service/drivers/smartnic_probes/openconfig-probes-types.yang create mode 100644 src/device/service/drivers/smartnic_probes/openconfig-probes.yang create mode 100644 src/device/service/drivers/smartnic_probes/openconfig-types.yang create mode 100644 src/device/service/drivers/smartnic_probes/references_probes_libraries.txt diff --git a/proto/any.proto b/proto/any.proto new file mode 100644 index 000000000..eff44e509 --- /dev/null +++ b/proto/any.proto @@ -0,0 +1,162 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option go_package = "google.golang.org/protobuf/types/known/anypb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "AnyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +message Any { + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + // + string type_url = 1; + + // Must be a valid serialized protocol buffer of the above specified type. + bytes value = 2; +} diff --git a/proto/context.proto b/proto/context.proto index 87680a5b9..856d6f71d 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -15,6 +15,7 @@ syntax = "proto3"; package context; +import "any.proto"; import "acl.proto"; import "kpi_sample_types.proto"; @@ -451,7 +452,7 @@ message EndPoint { string endpoint_type = 3; // == 'smartnics' repeated kpi_sample_types.KpiSampleType kpi_sample_types = 4; Location endpoint_location = 5; - map capabilities = 6; + map capabilities = 6; } message EndPointName { diff --git a/proto/context-ext-smartnics.proto b/proto/context_ext_smartnics.proto similarity index 79% rename from proto/context-ext-smartnics.proto rename to proto/context_ext_smartnics.proto index 953b27e86..fe834b493 100644 --- a/proto/context-ext-smartnics.proto +++ b/proto/context_ext_smartnics.proto @@ -19,9 +19,8 @@ // conv_accel = bluefield-2 + GPU (A30) syntax = "proto3"; -package context-ext-smartnics; +package context_ext_smartnics; -import "context"; import "kpi_sample_types.proto"; message SmartnicsCapabilities { @@ -82,40 +81,14 @@ message DPU_Core { message DPU_Memory { string RamMemoryType = 1; string eMMCMemoryType = 2; - DpuRamMemorySizeGB RamMemorySizeGB = 3; - DpueMMCMemorySizeGB eMMCMemorySizeGB = 4; + uint64 RamMemorySizeGB = 3; + uint64 eMMCMemorySizeGB = 4; } -enum DpuRamMemorySizeGB { - DPU_MEMORY_DDR4_RAM_UNDEFINED = 0; - DPU_MEMORY_DDR4_RAM_16GB = 1; - DPU_MEMORY_DDR4_RAM_32GB = 2; -} - -enum DpueMMCMemorySizeGB { - DPU_MEMORY_eMMC_UNDEFINED = 0; - DPU_MEMORY_eMMC_32GB = 1; - DPU_MEMORY_eMMC_64GB = 2; - DPU_MEMORY_eMMC_128GB = 3; -} - -enum GPUArchitecture { - ARCH_UNDEFINED = 0; - ARCH_AMPERE = 1; -} - -enum GPUComputeCapabilities { - MIG_UNDEFINED = 0; - MIG_4_AT_6GB = 1; - MIG_2_AT_12GB = 2; - MIG_1_AT_24GB = 3; -} - - message GPU { string model = 1; - GPUArchitecture architecture = 2; - GPUComputeCapabilities compute_capabilities = 3; + string architecture = 2; + string compute_capabilities = 3; uint64 memory_size_gb = 4; uint32 num_CUDA_cores = 5; uint32 num_Tensor_cores = 6; diff --git a/proto/nfv_client.proto b/proto/nfv_client.proto index d880a394c..d903e7907 100644 --- a/proto/nfv_client.proto +++ b/proto/nfv_client.proto @@ -19,6 +19,7 @@ import "context.proto"; message Nsd { string nsd_name = 1; + string config_params=2; } message Ns { @@ -26,6 +27,9 @@ message Ns { string ns_name=2; string nsd_name=3; string vim_account=4; + string config_params=5; + string status = 6; + string status_message = 7; } message NsList { @@ -37,8 +41,11 @@ message NsdList { } service nfv_client { - rpc CreateNs (ns) returns (ns_id) {} // Stable not final - rpc DeleteNs (ns) returns (context.Empty) {} + rpc GetNsList (context.Empty) returns (NsList) {} + rpc GetNsdList (context.Empty) returns (NsdList) {} + rpc CreateNs (Ns) returns (Ns) {} + rpc UpdateNs (Ns) returns (Ns) {} + rpc DeleteNs (Ns) returns (context.Empty) {} } diff --git a/proto/nos_client.proto b/proto/nos_client.proto new file mode 100644 index 000000000..e0e35a648 --- /dev/null +++ b/proto/nos_client.proto @@ -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. + +syntax = "proto3"; +package nos_client; + +message NOS_SW { + string ztp_device_sw_url = 1; + bytes ztp_device_sw_file = 2; +} + +message Config_Script { + string config_script_url = 1; + bytes config_script_file = 2; +} + +service nos_client { + rpc GetNOSFile (NOS_SW) returns (NOS_SW) {} + rpc GetConfigScriptFile (Config_Script) returns (Config_Script) {} +} + + diff --git a/ztp_device.yang b/src/automation/src/ztp-agent/ztp_device.yang similarity index 91% rename from ztp_device.yang rename to src/automation/src/ztp-agent/ztp_device.yang index 748bc54c3..f506d6413 100644 --- a/ztp_device.yang +++ b/src/automation/src/ztp-agent/ztp_device.yang @@ -20,6 +20,9 @@ module ztp_device { leaf config_script_url{ type string; } + leaf ip_range { + type string; // check IP regular expression + } } typedef state { diff --git a/src/device/service/drivers/smartnic_probes/ietf-yang-types.yang b/src/device/service/drivers/smartnic_probes/ietf-yang-types.yang new file mode 100644 index 000000000..371a091d1 --- /dev/null +++ b/src/device/service/drivers/smartnic_probes/ietf-yang-types.yang @@ -0,0 +1,480 @@ +module ietf-yang-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types"; + prefix "yang"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: David Kessens + + + WG Chair: Juergen Schoenwaelder + + + Editor: Juergen Schoenwaelder + "; + + description + "This module contains a collection of generally useful derived + YANG data types. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - yang-identifier + - hex-string + - uuid + - dotted-quad"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of counter and gauge types ***/ + + typedef counter32 { + type uint32; + description + "The counter32 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter32 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter32 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter32. + + In the value set and its semantics, this type is equivalent + to the Counter32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter32 { + type yang:counter32; + default "0"; + description + "The zero-based-counter32 type represents a counter32 + that has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter32 textual convention of the SMIv2."; + reference + "RFC 4502: Remote Network Monitoring Management Information + Base Version 2"; + } + + typedef counter64 { + type uint64; + description + "The counter64 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter64 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter64 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter64. + + In the value set and its semantics, this type is equivalent + to the Counter64 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter64 { + type yang:counter64; + default "0"; + description + "The zero-based-counter64 type represents a counter64 that + has the defined 'initial' value zero. + + + + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter64 textual convention of the SMIv2."; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + typedef gauge32 { + type uint32; + description + "The gauge32 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^32-1 (4294967295 decimal), and + the minimum value cannot be smaller than 0. The value of + a gauge32 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge32 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the Gauge32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef gauge64 { + type uint64; + description + "The gauge64 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^64-1 (18446744073709551615), and + the minimum value cannot be smaller than 0. The value of + a gauge64 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge64 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the CounterBasedGauge64 SMIv2 textual convention defined + in RFC 2856"; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + /*** collection of identifier-related types ***/ + + typedef object-identifier { + type string { + pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))' + + '(\.(0|([1-9]\d*)))*'; + } + description + "The object-identifier type represents administratively + assigned names in a registration-hierarchical-name tree. + + Values of this type are denoted as a sequence of numerical + non-negative sub-identifier values. Each sub-identifier + value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers + are separated by single dots and without any intermediate + whitespace. + + The ASN.1 standard restricts the value space of the first + sub-identifier to 0, 1, or 2. Furthermore, the value space + of the second sub-identifier is restricted to the range + 0 to 39 if the first sub-identifier is 0 or 1. Finally, + the ASN.1 standard requires that an object identifier + has always at least two sub-identifiers. The pattern + captures these restrictions. + + Although the number of sub-identifiers is not limited, + module designers should realize that there may be + implementations that stick with the SMIv2 limit of 128 + sub-identifiers. + + This type is a superset of the SMIv2 OBJECT IDENTIFIER type + since it is not restricted to 128 sub-identifiers. Hence, + this type SHOULD NOT be used to represent the SMIv2 OBJECT + IDENTIFIER type; the object-identifier-128 type SHOULD be + used instead."; + reference + "ISO9834-1: Information technology -- Open Systems + Interconnection -- Procedures for the operation of OSI + Registration Authorities: General procedures and top + arcs of the ASN.1 Object Identifier tree"; + } + + typedef object-identifier-128 { + type object-identifier { + pattern '\d*(\.\d*){1,127}'; + } + description + "This type represents object-identifiers restricted to 128 + sub-identifiers. + + In the value set and its semantics, this type is equivalent + to the OBJECT IDENTIFIER type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef yang-identifier { + type string { + length "1..max"; + pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*'; + pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*'; + } + description + "A YANG identifier string as defined by the 'identifier' + rule in Section 12 of RFC 6020. An identifier must + start with an alphabetic character or an underscore + followed by an arbitrary sequence of alphabetic or + numeric characters, underscores, hyphens, or dots. + + A YANG identifier MUST NOT start with any possible + combination of the lowercase or uppercase character + sequence 'xml'."; + reference + "RFC 6020: YANG - A Data Modeling Language for the Network + Configuration Protocol (NETCONF)"; + } + + /*** collection of types related to date and time***/ + + typedef date-and-time { + type string { + pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?' + + '(Z|[\+\-]\d{2}:\d{2})'; + } + description + "The date-and-time type is a profile of the ISO 8601 + standard for representation of dates and times using the + Gregorian calendar. The profile is defined by the + date-time production in Section 5.6 of RFC 3339. + + The date-and-time type is compatible with the dateTime XML + schema type with the following notable exceptions: + + (a) The date-and-time type does not allow negative years. + + (b) The date-and-time time-offset -00:00 indicates an unknown + time zone (see RFC 3339) while -00:00 and +00:00 and Z + all represent the same time zone in dateTime. + + (c) The canonical format (see below) of data-and-time values + differs from the canonical format used by the dateTime XML + schema type, which requires all times to be in UTC using + the time-offset 'Z'. + + This type is not equivalent to the DateAndTime textual + convention of the SMIv2 since RFC 3339 uses a different + separator between full-date and full-time and provides + higher resolution of time-secfrac. + + The canonical format for date-and-time values with a known time + zone uses a numeric time zone offset that is calculated using + the device's configured known offset to UTC time. A change of + the device's offset to UTC time will cause date-and-time values + to change accordingly. Such changes might happen periodically + in case a server follows automatically daylight saving time + (DST) time zone offset changes. The canonical format for + date-and-time values with an unknown time zone (usually + referring to the notion of local time) uses the time-offset + -00:00."; + reference + "RFC 3339: Date and Time on the Internet: Timestamps + RFC 2579: Textual Conventions for SMIv2 + XSD-TYPES: XML Schema Part 2: Datatypes Second Edition"; + } + + typedef timeticks { + type uint32; + description + "The timeticks type represents a non-negative integer that + represents the time, modulo 2^32 (4294967296 decimal), in + hundredths of a second between two epochs. When a schema + node is defined that uses this type, the description of + the schema node identifies both of the reference epochs. + + In the value set and its semantics, this type is equivalent + to the TimeTicks type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef timestamp { + type yang:timeticks; + description + "The timestamp type represents the value of an associated + timeticks schema node at which a specific occurrence + happened. The specific occurrence must be defined in the + description of any schema node defined using this type. When + the specific occurrence occurred prior to the last time the + associated timeticks attribute was zero, then the timestamp + value is zero. Note that this requires all timestamp values + to be reset to zero when the value of the associated timeticks + attribute reaches 497+ days and wraps around to zero. + + The associated timeticks schema node must be specified + in the description of any schema node using this type. + + In the value set and its semantics, this type is equivalent + to the TimeStamp textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of generic address types ***/ + + typedef phys-address { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + + + + + description + "Represents media- or physical-level addresses represented + as a sequence octets, each octet represented by two hexadecimal + numbers. Octets are separated by colons. The canonical + representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the PhysAddress textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + typedef mac-address { + type string { + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'; + } + description + "The mac-address type represents an IEEE 802 MAC address. + The canonical representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the MacAddress textual convention of the SMIv2."; + reference + "IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture + RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of XML-specific types ***/ + + typedef xpath1.0 { + type string; + description + "This type represents an XPATH 1.0 expression. + + When a schema node is defined that uses this type, the + description of the schema node MUST specify the XPath + context in which the XPath expression is evaluated."; + reference + "XPATH: XML Path Language (XPath) Version 1.0"; + } + + /*** collection of string types ***/ + + typedef hex-string { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + description + "A hexadecimal string with octets represented as hex digits + separated by colons. The canonical representation uses + lowercase characters."; + } + + typedef uuid { + type string { + pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'; + } + description + "A Universally Unique IDentifier in the string representation + defined in RFC 4122. The canonical representation uses + lowercase characters. + + The following is an example of a UUID in string representation: + f81d4fae-7dec-11d0-a765-00a0c91e6bf6 + "; + reference + "RFC 4122: A Universally Unique IDentifier (UUID) URN + Namespace"; + } + + typedef dotted-quad { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'; + } + description + "An unsigned 32-bit number expressed in the dotted-quad + notation, i.e., four octets written as decimal numbers + and separated with the '.' (full stop) character."; + } +} diff --git a/src/device/service/drivers/smartnic_probes/openconfig-extensions.yang b/src/device/service/drivers/smartnic_probes/openconfig-extensions.yang new file mode 100644 index 000000000..2e0fd9f07 --- /dev/null +++ b/src/device/service/drivers/smartnic_probes/openconfig-extensions.yang @@ -0,0 +1,206 @@ +module openconfig-extensions { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/openconfig-ext"; + + prefix "oc-ext"; + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + oc-ext:openconfig-version "0.5.1"; + + revision "2022-10-05" { + description + "Add missing version statement."; + reference "0.5.1"; + } + + revision "2020-06-16" { + description + "Add extension for POSIX pattern statements."; + reference "0.5.0"; + } + + revision "2018-10-17" { + description + "Add extension for regular expression type."; + reference "0.4.0"; + } + + revision "2017-04-11" { + description + "rename password type to 'hashed' and clarify description"; + reference "0.3.0"; + } + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "0.2.0"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "0.1.0"; + } + + + // extension statements + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + + Individual YANG modules are versioned independently -- the + semantic version is generally incremented only when there is a + change in the corresponding file. Submodules should always + have the same semantic version as their parent modules. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-hashed-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in hashed form. + + Hash algorithms are by definition not reversible. Clients + reading the configuration or applied configuration for the node + should expect to receive only the hashed value. Values written + in cleartext will be hashed. This annotation may be used on + nodes such as secure passwords in which the device never reports + a cleartext value, even if the input is provided as cleartext."; + } + + extension regexp-posix { + description + "This extension indicates that the regular expressions included + within the YANG module specified are conformant with the POSIX + regular expression format rather than the W3C standard that is + specified by RFC6020 and RFC7950."; + } + + extension posix-pattern { + argument "pattern" { + yin-element false; + } + description + "Provides a POSIX ERE regular expression pattern statement as an + alternative to YANG regular expresssions based on XML Schema Datatypes. + It is used the same way as the standard YANG pattern statement defined in + RFC6020 and RFC7950, but takes an argument that is a POSIX ERE regular + expression string."; + reference + "POSIX Extended Regular Expressions (ERE) Specification: + https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04"; + } + + extension telemetry-on-change { + description + "The telemetry-on-change annotation is specified in the context + of a particular subtree (container, or list) or leaf within the + YANG schema. Where specified, it indicates that the value stored + by the nodes within the context change their value only in response + to an event occurring. The event may be local to the target, for + example - a configuration change, or external - such as the failure + of a link. + + When a telemetry subscription allows the target to determine whether + to export the value of a leaf in a periodic or event-based fashion + (e.g., TARGET_DEFINED mode in gNMI), leaves marked as + telemetry-on-change should only be exported when they change, + i.e., event-based."; + } + + extension telemetry-atomic { + description + "The telemetry-atomic annotation is specified in the context of + a subtree (containre, or list), and indicates that all nodes + within the subtree are always updated together within the data + model. For example, all elements under the subtree may be updated + as a result of a new alarm being raised, or the arrival of a new + protocol message. + + Transport protocols may use the atomic specification to determine + optimisations for sending or storing the corresponding data."; + } + + extension operational { + description + "The operational annotation is specified in the context of a + grouping, leaf, or leaf-list within a YANG module. It indicates + that the nodes within the context are derived state on the device. + + OpenConfig data models divide nodes into the following three categories: + + - intended configuration - these are leaves within a container named + 'config', and are the writable configuration of a target. + - applied configuration - these are leaves within a container named + 'state' and are the currently running value of the intended configuration. + - derived state - these are the values within the 'state' container which + are not part of the applied configuration of the device. Typically, they + represent state values reflecting underlying operational counters, or + protocol statuses."; + } + + extension catalog-organization { + argument "org" { + yin-element false; + } + description + "This extension specifies the organization name that should be used within + the module catalogue on the device for the specified YANG module. It stores + a pithy string where the YANG organization statement may contain more + details."; + } + + extension origin { + argument "origin" { + yin-element false; + } + description + "This extension specifies the name of the origin that the YANG module + falls within. This allows multiple overlapping schema trees to be used + on a single network element without requiring module based prefixing + of paths."; + } +} diff --git a/src/device/service/drivers/smartnic_probes/openconfig-inet-types.yang b/src/device/service/drivers/smartnic_probes/openconfig-inet-types.yang new file mode 100644 index 000000000..3d3ed425e --- /dev/null +++ b/src/device/service/drivers/smartnic_probes/openconfig-inet-types.yang @@ -0,0 +1,478 @@ +module openconfig-inet-types { + + yang-version "1"; + namespace "http://openconfig.net/yang/types/inet"; + prefix "oc-inet"; + + import openconfig-extensions { prefix "oc-ext"; } + + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module contains a set of Internet address related + types for use in OpenConfig modules. + + Portions of this code were derived from IETF RFC 6021. + Please reproduce this note if possible. + + IETF code is subject to the following copyright and license: + Copyright (c) IETF Trust and the persons identified as authors of + the code. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, is permitted pursuant to, and subject to the license + terms contained in, the Simplified BSD License set forth in + Section 4.c of the IETF Trust's Legal Provisions Relating + to IETF Documents (http://trustee.ietf.org/license-info)."; + + oc-ext:openconfig-version "0.6.0"; + + revision "2023-02-06" { + description + "Add ipv6-link-local and ipv6-address-type"; + reference "0.6.0"; + } + + revision "2021-08-17" { + description + "Add ip-address-zoned typedef as a union between ipv4-address-zoned + and ipv6-address-zoned types."; + reference "0.5.0"; + } + + revision "2021-07-14" { + description + "Use auto-generated regex for ipv4 pattern statements: + - ipv4-address + - ipv4-address-zoned + - ipv4-prefix"; + reference "0.4.1"; + } + + revision "2021-01-07" { + description + "Remove module extension oc-ext:regexp-posix by making pattern regexes + conform to RFC7950. + + Types impacted: + - ipv4-address + - ipv4-address-zoned + - ipv6-address + - domain-name"; + reference "0.4.0"; + } + + revision "2020-10-12" { + description + "Fix anchors for domain-name pattern."; + reference "0.3.5"; + } + + revision "2020-06-30" { + description + "Add OpenConfig POSIX pattern extensions and add anchors for domain-name + pattern."; + reference "0.3.4"; + } + + revision "2019-04-25" { + description + "Fix regex bug for ipv6-prefix type"; + reference "0.3.3"; + } + + revision "2018-11-21" { + description + "Add OpenConfig module metadata extensions."; + reference "0.3.2"; + } + + revision 2017-08-24 { + description + "Minor formatting fixes."; + reference "0.3.1"; + } + + revision 2017-07-06 { + description + "Add domain-name and host typedefs"; + reference "0.3.0"; + } + + revision 2017-04-03 { + description + "Add ip-version typedef."; + reference "0.2.0"; + } + + revision 2017-04-03 { + description + "Update copyright notice."; + reference "0.1.1"; + } + + revision 2017-01-26 { + description + "Initial module for inet types"; + reference "0.1.0"; + } + + // OpenConfig specific extensions for module metadata. + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + // IPv4 and IPv6 types. + + typedef ipv4-address { + type string { + pattern + '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|' + + '[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}'; + oc-ext:posix-pattern + '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|' + + '[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3})$'; + } + description + "An IPv4 address in dotted quad notation using the default + zone."; + } + + typedef ipv4-address-zoned { + type string { + pattern + '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|' + + '[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}(%[a-zA-Z0-9_]+)'; + oc-ext:posix-pattern + '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|' + + '[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}(%[a-zA-Z0-9_]+))$'; + } + description + "An IPv4 address in dotted quad notation. This type allows + specification of a zone index to disambiguate identical + address values. For link-local addresses, the index is + typically the interface index or interface name."; + } + + typedef ipv6-address { + type string { + pattern + // Must support compression through different lengths + // therefore this regexp is complex. + '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,7}:|' + + '([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|' + + '([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|' + + '([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|' + + '([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|' + + '[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|' + + ':((:[0-9a-fA-F]{1,4}){1,7}|:)' + + ')'; + oc-ext:posix-pattern + // Must support compression through different lengths + // therefore this regexp is complex. + '^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,7}:|' + + '([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|' + + '([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|' + + '([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|' + + '([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|' + + '[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|' + + ':((:[0-9a-fA-F]{1,4}){1,7}|:)' + + ')$'; + } + description + "An IPv6 address represented as either a full address; shortened + or mixed-shortened formats, using the default zone."; + } + + typedef ipv6-address-zoned { + type string { + pattern + // Must support compression through different lengths + // therefore this regexp is complex. + '^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,7}:|' + + '([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|' + + '([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|' + + '([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|' + + '([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|' + + '[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|' + + ':((:[0-9a-fA-F]{1,4}){1,7}|:)' + + ')(%[a-zA-Z0-9_]+)$'; + oc-ext:posix-pattern + // Must support compression through different lengths + // therefore this regexp is complex. + '^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,7}:|' + + '([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|' + + '([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|' + + '([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|' + + '([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|' + + '[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|' + + ':((:[0-9a-fA-F]{1,4}){1,7}|:)' + + ')(%[a-zA-Z0-9_]+)$'; + } + description + "An IPv6 address represented as either a full address; shortened + or mixed-shortened formats. This type allows specification of + a zone index to disambiguate identical address values. For + link-local addresses, the index is typically the interface + index or interface name."; + } + + typedef ipv4-prefix { + type string { + pattern + '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|' + + '[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|' + + '3[0-2])'; + oc-ext:posix-pattern + '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|' + + '[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}/([0-9]|[12][0-9]|' + + '3[0-2]))$'; + } + description + "An IPv4 prefix represented in dotted quad notation followed by + a slash and a CIDR mask (0 <= mask <= 32)."; + } + + typedef ipv6-prefix { + type string { + pattern + '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,7}:|' + + '([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|' + + '([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|' + + '([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|' + + '([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|' + + '[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|' + + ':((:[0-9a-fA-F]{1,4}){1,7}|:)' + + ')/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])'; + oc-ext:posix-pattern + '^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,7}:|' + + '([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|' + + '([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|' + + '([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|' + + '([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|' + + '[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|' + + ':((:[0-9a-fA-F]{1,4}){1,7}|:)' + + ')/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])$'; + } + description + "An IPv6 prefix represented in full, shortened, or mixed + shortened format followed by a slash and CIDR mask + (0 <= mask <= 128)."; + } + + typedef ip-address { + type union { + type ipv4-address; + type ipv6-address; + } + description + "An IPv4 or IPv6 address with no prefix specified."; + } + + typedef ip-address-zoned { + type union { + type ipv4-address-zoned; + type ipv6-address-zoned; + } + description + "An IPv4 or IPv6 address with no prefix specified and an optional + zone index."; + } + + typedef ip-prefix { + type union { + type ipv4-prefix; + type ipv6-prefix; + } + description + "An IPv4 or IPv6 prefix."; + } + + typedef ip-version { + type enumeration { + enum UNKNOWN { + value 0; + description + "An unknown or unspecified version of the Internet + protocol."; + } + enum IPV4 { + value 4; + description + "The IPv4 protocol as defined in RFC 791."; + } + enum IPV6 { + value 6; + description + "The IPv6 protocol as defined in RFC 2460."; + } + } + description + "This value represents the version of the IP protocol. + Note that integer representation of the enumerated values + are not specified, and are not required to follow the + InetVersion textual convention in SMIv2."; + reference + "RFC 791: Internet Protocol + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + typedef ipv6-address-type { + type enumeration { + enum GLOBAL_UNICAST { + description + "The IPv6 address is a global unicast address type and must be in + the format defined in RFC 4291 section 2.4."; + } + enum LINK_LOCAL_UNICAST { + description + "The IPv6 address is a Link-Local unicast address type and must be + in the format defined in RFC 4291 section 2.4."; + } + } + description + "The value represents the type of IPv6 address"; + reference + "RFC 4291: IP Version 6 Addressing Architecture + section 2.5"; + } + + typedef domain-name { + type string { + length "1..253"; + pattern + '(((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + + '|\.)'; + oc-ext:posix-pattern + '^(((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + + '|\.)$'; + } + description + "The domain-name type represents a DNS domain name. + Fully quallified left to the models which utilize this type. + + Internet domain names are only loosely specified. Section + 3.5 of RFC 1034 recommends a syntax (modified in Section + 2.1 of RFC 1123). The pattern above is intended to allow + for current practice in domain name use, and some possible + future expansion. It is designed to hold various types of + domain names, including names used for A or AAAA records + (host names) and other records, such as SRV records. Note + that Internet host names have a stricter syntax (described + in RFC 952) than the DNS recommendations in RFCs 1034 and + 1123, and that systems that want to store host names in + schema nodes using the domain-name type are recommended to + adhere to this stricter standard to ensure interoperability. + + The encoding of DNS names in the DNS protocol is limited + to 255 characters. Since the encoding consists of labels + prefixed by a length bytes and there is a trailing NULL + byte, only 253 characters can appear in the textual dotted + notation. + + Domain-name values use the US-ASCII encoding. Their canonical + format uses lowercase US-ASCII characters. Internationalized + domain names MUST be encoded in punycode as described in RFC + 3492"; + } + + typedef host { + type union { + type ip-address; + type domain-name; + } + description + "The host type represents either an unzoned IP address or a DNS + domain name."; + } + + typedef as-number { + type uint32; + description + "A numeric identifier for an autonomous system (AS). An AS is a + single domain, under common administrative control, which forms + a unit of routing policy. Autonomous systems can be assigned a + 2-byte identifier, or a 4-byte identifier which may have public + or private scope. Private ASNs are assigned from dedicated + ranges. Public ASNs are assigned from ranges allocated by IANA + to the regional internet registries (RIRs)."; + reference + "RFC 1930 Guidelines for creation, selection, and registration + of an Autonomous System (AS) + RFC 4271 A Border Gateway Protocol 4 (BGP-4)"; + } + + typedef dscp { + type uint8 { + range "0..63"; + } + description + "A differentiated services code point (DSCP) marking within the + IP header."; + reference + "RFC 2474 Definition of the Differentiated Services Field + (DS Field) in the IPv4 and IPv6 Headers"; + } + + typedef ipv6-flow-label { + type uint32 { + range "0..1048575"; + } + description + "The IPv6 flow-label is a 20-bit value within the IPv6 header + which is optionally used by the source of the IPv6 packet to + label sets of packets for which special handling may be + required."; + reference + "RFC 2460 Internet Protocol, Version 6 (IPv6) Specification"; + } + + typedef port-number { + type uint16; + description + "A 16-bit port number used by a transport protocol such as TCP + or UDP."; + reference + "RFC 768 User Datagram Protocol + RFC 793 Transmission Control Protocol"; + } + + typedef uri { + type string; + description + "An ASCII-encoded Uniform Resource Identifier (URI) as defined + in RFC 3986."; + reference + "RFC 3986 Uniform Resource Identifier (URI): Generic Syntax"; + } + + typedef url { + type string; + description + "An ASCII-encoded Uniform Resource Locator (URL) as defined + in RFC 3986, section 1.1.3"; + reference + "RFC 3986, paragraph 1.1.3"; + } + +} diff --git a/src/device/service/drivers/smartnic_probes/openconfig-probes-types.yang b/src/device/service/drivers/smartnic_probes/openconfig-probes-types.yang new file mode 100644 index 000000000..c5e13f370 --- /dev/null +++ b/src/device/service/drivers/smartnic_probes/openconfig-probes-types.yang @@ -0,0 +1,86 @@ +module openconfig-probes-types { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/probes/types"; + + prefix "oc-probes-types"; + + // import some basic types + import openconfig-extensions { prefix oc-ext; } + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module defines types related to the probes."; + + oc-ext:openconfig-version "0.1.1"; + + revision "2018-11-21" { + description + "Add OpenConfig module metadata extensions."; + reference "0.1.1"; + } + + revision "2017-09-05" { + description + "Initial public revision"; + reference "0.1.0"; + } + + // OpenConfig specific extensions for module metadata. + oc-ext:regexp-posix; + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + typedef test-type { + type enumeration { + enum ICMP { + description + "Send ICMP echo requests."; + } + enum ICMP6 { + description + "Send ICMP6 echo requests."; + } + enum ICMP_TIMESTAMP { + description + "Send ICMP timestamp requests."; + } + enum ICMP6_TIMESTAMP { + description + "Sedn ICMP6 timestamp requests."; + } + enum TCP { + description + "Send TPC packets."; + } + enum UDP { + description + "Send UDP packets."; + } + enum UDP_TIMESTAMP { + description + "Send UDP packets with timestamp."; + } + enum HTTP_GET { + description + "Execute HTTP GET requests."; + } + enum HTTP_GET_META { + description + "Execute HTTP GET requests of metadata."; + } + } + description + "Type definition with enumerations describing the basis of + the probe test type identifier"; + } + +} \ No newline at end of file diff --git a/src/device/service/drivers/smartnic_probes/openconfig-probes.yang b/src/device/service/drivers/smartnic_probes/openconfig-probes.yang new file mode 100644 index 000000000..27b7e4c0d --- /dev/null +++ b/src/device/service/drivers/smartnic_probes/openconfig-probes.yang @@ -0,0 +1,575 @@ +module openconfig-probes { + + // namespace + namespace "http://openconfig.net/yang/probes"; + + prefix "oc-probes"; + + import ietf-yang-types { prefix yang; } + import openconfig-types { prefix oc-types; } + import openconfig-extensions { prefix oc-ext; } + import openconfig-inet-types { prefix oc-inet; } + import openconfig-probes-types { prefix oc-probes-types; } + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module defines configuration and operational state data + for the probes. + A probe consists on a group of tests, each test being a + source-destination pair to poll. The destination can be either + IP Address (and eventually port) or URL, depending on the + nature of the test. The test can send ICMP, UDP, TCP, or HTTP + requests. + Each test groups a list of test items, the test results + being an overall view or average of the items list. + However, the test preserves only a limited set of history + items, whose length can be controlled using the history-size."; + + oc-ext:openconfig-version "0.0.2"; + + revision "2018-11-21" { + description + "Add OpenConfig module metadata extensions."; + reference "0.0.2"; + } + + revision "2017-09-05" { + description + "Initial public revision"; + reference "0.0.1"; + } + + // OpenConfig specific extensions for module metadata. + oc-ext:regexp-posix; + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + grouping test-target { + description + "Groups the config and state containers + for an individual test."; + + container target { + description + "The target configuration of the test. + The nature of the target depends on the probe type: + for HTTP probes we need to provide an URL to poll, + while ICMP probes require an IP address to monitor."; + + container config { + description + "Configuration data for the test target."; + + uses test-target-base; + } + + container state { + config false; + + description + "Operational data for the test target."; + + uses test-target-base; + } + } + } + + grouping test-target-base { + description + "Targe types for the probe test."; + + leaf address { + type oc-inet:ip-address; + description + "IP address of the target, either IPv4 or IPv6."; + } + + leaf port { + type oc-inet:port-number; + description + "Destination port."; + } + + leaf url { + type oc-inet:url; + description + "Target URL to probe."; + } + } + + grouping probe-test-config-base { + description + "Definition of test details."; + + leaf test-type { + type oc-probes-types:test-type; + description + "The type of the probe test."; + mandatory true; + } + + leaf count { + type yang:counter64; + description + "The number of probes per test."; + } + + leaf interval { + type yang:counter64; + description + "Time between two consecutive probes."; + } + + leaf source { + type oc-inet:ip-address; + description + "Source address used when probing, either IPv4 or IPv6."; + } + + leaf history-size { + type yang:counter64; + description + "The number of history entries stored."; + } + + leaf source-port { + type oc-inet:port-number; + description + "Source number used."; + } + + leaf dscp { + type oc-inet:dscp; + description + "DSCP code points"; + } + + } + + grouping probe-test-state-history-item-base { + description + "The test item results counters and statistics. + An item presents the results of a single execution + of the test. + The results of the test depend on the values + of the total items, or an average over a certain + period of time."; + + leaf id { + type yang:counter64; + description + "The test item ID."; + } + + leaf timestamp { + type oc-types:timeticks64; + description + "The test timestamp. + This is not the timestamp when the test + was actually executed nither when it finished. + Should be the timestamp when the test has been scheduled. + It may not be the same with start-timestamp."; + } + + leaf start-timestamp { + type oc-types:timeticks64; + description + "The timestamp when the test started."; + } + + leaf end-timestamp { + type oc-types:timeticks64; + description + "The timestamp when the test finished."; + } + + leaf test-duration { + type yang:counter64; + description + "The duration of the test, in microseconds."; + } + + leaf failed { + type boolean; + description + "Whether the test failed or succeeded."; + } + + leaf probes-sent { + type yang:counter64; + description + "Number of test probes sent."; + } + + leaf probes-received { + type yang:counter64; + description + "Number of test probes received."; + } + + leaf loss-percentage { + type oc-types:percentage; + description + "The loss percentage."; + } + + leaf jitter { + type yang:counter64; + description + "The round trip jitter, in microseconds."; + } + + leaf min-delay { + type yang:counter64; + description + "The minimum delay recorded during the test, in microseconds."; + } + + leaf max-delay { + type yang:counter64; + description + "The maximum delay recorded during the test, in microseconds."; + } + + leaf avg-delay { + type yang:counter64; + description + "The average delay recorded during the test, in microseconds."; + } + + leaf stddev-delay { + type yang:counter64; + description + "The standard deviation of the delay of the test."; + } + + } + + grouping probe-test-state-history-item { + description + "A history item of the probe results."; + + container state { + + config false; + + description + "A history item of the probe results: operational data only."; + + uses probe-test-state-history-item-base; + } + + } + + grouping probe-test-state-history { + + description + "The history of the test results."; + + container items { + + description + "The list of items in the probe history. + The length depends on the history size."; + + list item { + key "id"; + description + "List of history items."; + + leaf id { + type leafref { + path "../state/id"; + } + description + "Reference to the history entry ID."; + } + + uses probe-test-state-history-item; + } + + } + + } + + grouping probe-test-state-results { + description + "The test results counters and statistics."; + + leaf timestamp { + type oc-types:timeticks64; + description + "The test timestamp. + This is not the timestamp when the test + was actually executed nither when it finished. + Should be the timestamp when the test has been scheduled. + It may not be the same with start-timestamp."; + } + + leaf start-timestamp { + type oc-types:timeticks64; + description + "The timestamp when the test started."; + } + + leaf last-test-timestamp { + type oc-types:timeticks64; + description + "The timestamp when the test finished."; + } + + leaf test-duration { + type yang:counter64; + description + "The duration of the test, in microseconds."; + } + + leaf failed { + type boolean; + description + "Whether the test failed or succeeded."; + } + + leaf probes-sent { + type yang:counter64; + description + "Number of test probes sent."; + } + + leaf probes-received { + type yang:counter64; + description + "Number of test probes received."; + } + + leaf loss-percentage { + type oc-types:percentage; + description + "The loss percentage."; + } + + leaf jitter { + type yang:counter64; + description + "The round trip jitter, in microseconds."; + } + + leaf min-delay { + type yang:counter64; + description + "The minimum delay recorded during the test, in microseconds."; + } + + leaf max-delay { + type yang:counter64; + description + "The maximum delay recorded during the test, in microseconds."; + } + + leaf avg-delay { + type yang:counter64; + description + "The average delay recorded during the test, in microseconds."; + } + + leaf stddev-delay { + type yang:counter64; + description + "The standard deviation of the delay of the test."; + } + + + } + + grouping probe-test-state { + + description + "Operational data and results for the probes."; + + } + + grouping probe-test-config { + description + "Definition of test details."; + + leaf name { + type string; + description + "The name of the test probe"; + mandatory true; + } + + leaf enabled { + type boolean; + default true; + description + "Whether the test is enabled."; + } + + uses probe-test-config-base; + + } + + grouping probe-tests-top { + description + "Top-level grouping for the tests withing a probe."; + + list test { + key "name"; + description + "List of tests associated with this probe."; + + leaf name { + type leafref { + path "../config/name"; + } + description + "Reference to the list key"; + } + + container config { + description + "Configuration data for the test of this probe."; + + uses probe-test-config; + } + + container state { + + config false; + + description + "Operational state data"; + + uses probe-test-config; + uses probe-test-state; + } + + uses test-target; + + container results { + description + "Contains the results of the tests."; + + container state { + + config false; + + description + "Results of this test: operational data only"; + + uses probe-test-state-results; + } + + container history { + + config false; + + description + "Historical data of the tests."; + + uses probe-test-state-history; + } + + } + + } + // end list of probes + + } + + grouping probe-config { + description + "Definition of probe details."; + + leaf name { + type string; + description + "The name of the probe."; + mandatory true; + } + + leaf enabled { + type boolean; + default true; + description + "Whether the probe is enabled."; + } + + } + + grouping probe-state { + description + "Definition of probes operation data."; + } + + grouping probes-top { + description + "Top-level grouping for probes model"; + + list probe { + key "name"; + description + "List of probes configured."; + + leaf name { + type leafref { + path "../config/name"; + } + description + "Reference to the list key"; + } + + container config { + description + "Configuration data for the probes."; + + uses probe-config; + } + + container state { + + config false; + + description + "Operational state data"; + + uses probe-config; + uses probe-state; + } + + container tests { + + description + "The tests associated to be executed for the probe."; + + uses probe-tests-top; + } + + } + // end list of probes + + } + + grouping openconfig-probes-top { + + description + "The top level grouping of the probes model."; + + container probes { + description + "The container containing the list of probes."; + + uses probes-top; + } + + } + + uses openconfig-probes-top; + +} \ No newline at end of file diff --git a/src/device/service/drivers/smartnic_probes/openconfig-types.yang b/src/device/service/drivers/smartnic_probes/openconfig-types.yang new file mode 100644 index 000000000..89e32d515 --- /dev/null +++ b/src/device/service/drivers/smartnic_probes/openconfig-types.yang @@ -0,0 +1,471 @@ +module openconfig-types { + yang-version "1"; + + namespace "http://openconfig.net/yang/openconfig-types"; + + prefix "oc-types"; + + // import statements + import openconfig-extensions { prefix oc-ext; } + + // meta + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module contains a set of general type definitions that + are used across OpenConfig models. It can be imported by modules + that make use of these types."; + + oc-ext:openconfig-version "0.6.0"; + + revision "2019-04-16" { + description + "Clarify definition of timeticks64."; + reference "0.6.0"; + } + + revision "2018-11-21" { + description + "Add OpenConfig module metadata extensions."; + reference "0.5.1"; + } + + revision "2018-05-05" { + description + "Add grouping of min-max-time and + included them to all stats with min/max/avg"; + reference "0.5.0"; + } + + revision "2018-01-16" { + description + "Add interval to min/max/avg stats; add percentage stat"; + reference "0.4.0"; + } + + revision "2017-08-16" { + description + "Apply fix for ieetfloat32 length parameter"; + reference "0.3.3"; + } + + revision "2017-01-13" { + description + "Add ADDRESS_FAMILY identity"; + reference "0.3.2"; + } + + revision "2016-11-14" { + description + "Correct length of ieeefloat32"; + reference "0.3.1"; + } + + revision "2016-11-11" { + description + "Additional types - ieeefloat32 and routing-password"; + reference "0.3.0"; + } + + revision "2016-05-31" { + description + "OpenConfig public release"; + reference "0.2.0"; + } + + // OpenConfig specific extensions for module metadata. + oc-ext:regexp-posix; + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + typedef percentage { + type uint8 { + range "0..100"; + } + description + "Integer indicating a percentage value"; + } + + typedef std-regexp { + type string; + description + "This type definition is a placeholder for a standard + definition of a regular expression that can be utilised in + OpenConfig models. Further discussion is required to + consider the type of regular expressions that are to be + supported. An initial proposal is POSIX compatible."; + } + + typedef timeticks64 { + type uint64; + units "nanoseconds"; + description + "The timeticks64 represents the time, modulo 2^64 in + nanoseconds between two epochs. The leaf using this + type must define the epochs that tests are relative to."; + } + + typedef ieeefloat32 { + type binary { + length "4"; + } + description + "An IEEE 32-bit floating point number. The format of this number + is of the form: + 1-bit sign + 8-bit exponent + 23-bit fraction + The floating point value is calculated using: + (-1)**S * 2**(Exponent-127) * (1+Fraction)"; + } + + typedef routing-password { + type string; + description + "This type is indicative of a password that is used within + a routing protocol which can be returned in plain text to the + NMS by the local system. Such passwords are typically stored + as encrypted strings. Since the encryption used is generally + well known, it is possible to extract the original value from + the string - and hence this format is not considered secure. + Leaves specified with this type should not be modified by + the system, and should be returned to the end-user in plain + text. This type exists to differentiate passwords, which + may be sensitive, from other string leaves. It could, for + example, be used by the NMS to censor this data when + viewed by particular users."; + } + + typedef stat-interval { + type uint64; + units nanoseconds; + description + "A time interval over which a set of statistics is computed. + A common usage is to report the interval over which + avg/min/max stats are computed and reported."; + } + + grouping stat-interval-state { + description + "Reusable leaf definition for stats computation interval"; + + leaf interval { + type oc-types:stat-interval; + description + "If supported by the system, this reports the time interval + over which the min/max/average statistics are computed by + the system."; + } + } + + grouping min-max-time { + description + "Common grouping for recording the absolute time at which + the minimum and maximum values occurred in the statistics"; + + leaf min-time { + type oc-types:timeticks64; + description + "The absolute time at which the minimum value occurred. + The value is the timestamp in nanoseconds relative to + the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; + } + + leaf max-time { + type oc-types:timeticks64; + description + "The absolute time at which the maximum value occurred. + The value is the timestamp in nanoseconds relative to + the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; + } + } + + grouping avg-min-max-stats-precision1 { + description + "Common nodes for recording average, minimum, and + maximum values for a statistic. These values all have + fraction-digits set to 1. Statistics are computed + and reported based on a moving time interval (e.g., the last + 30s). If supported by the device, the time interval over which + the statistics are computed is also reported."; + + leaf avg { + type decimal64 { + fraction-digits 1; + } + description + "The arithmetic mean value of the statistic over the + time interval."; + } + + leaf min { + type decimal64 { + fraction-digits 1; + } + description + "The minimum value of the statistic over the time + interval."; + } + + leaf max { + type decimal64 { + fraction-digits 1; + } + description + "The maximum value of the statitic over the time + interval."; + } + + uses stat-interval-state; + uses min-max-time; + } + + grouping avg-min-max-instant-stats-precision1 { + description + "Common grouping for recording an instantaneous statistic value + in addition to avg-min-max stats"; + + leaf instant { + type decimal64 { + fraction-digits 1; + } + description + "The instantaneous value of the statistic."; + } + + uses avg-min-max-stats-precision1; + } + + grouping avg-min-max-instant-stats-precision2-dB { + description + "Common grouping for recording dB values with 2 decimal + precision. Values include the instantaneous, average, + minimum, and maximum statistics. Statistics are computed + and reported based on a moving time interval (e.g., the last + 30s). If supported by the device, the time interval over which + the statistics are computed, and the times at which the minimum + and maximum values occurred, are also reported."; + + leaf instant { + type decimal64 { + fraction-digits 2; + } + units dB; + description + "The instantaneous value of the statistic."; + } + + leaf avg { + type decimal64 { + fraction-digits 2; + } + units dB; + description + "The arithmetic mean value of the statistic over the + time interval."; + } + + leaf min { + type decimal64 { + fraction-digits 2; + } + units dB; + description + "The minimum value of the statistic over the time interval."; + } + + leaf max { + type decimal64 { + fraction-digits 2; + } + units dB; + description + "The maximum value of the statistic over the time + interval."; + } + + uses stat-interval-state; + uses min-max-time; + } + + grouping avg-min-max-instant-stats-precision2-dBm { + description + "Common grouping for recording dBm values with 2 decimal + precision. Values include the instantaneous, average, + minimum, and maximum statistics. Statistics are computed + and reported based on a moving time interval (e.g., the last + 30s). If supported by the device, the time interval over which + the statistics are computed, and the times at which the minimum + and maximum values occurred, are also reported."; + + leaf instant { + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "The instantaneous value of the statistic."; + } + + leaf avg { + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "The arithmetic mean value of the statistic over the + time interval."; + } + + leaf min { + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "The minimum value of the statistic over the time + interval."; + } + + leaf max { + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "The maximum value of the statistic over the time interval."; + } + + uses stat-interval-state; + uses min-max-time; + } + + grouping avg-min-max-instant-stats-precision2-mA { + description + "Common grouping for recording mA values with 2 decimal + precision. Values include the instantaneous, average, + minimum, and maximum statistics. Statistics are computed + and reported based on a moving time interval (e.g., the last + 30s). If supported by the device, the time interval over which + the statistics are computed, and the times at which the minimum + and maximum values occurred, are also reported."; + + leaf instant { + type decimal64 { + fraction-digits 2; + } + units mA; + description + "The instantaneous value of the statistic."; + } + + leaf avg { + type decimal64 { + fraction-digits 2; + } + units mA; + description + "The arithmetic mean value of the statistic over the + time interval."; + } + + leaf min { + type decimal64 { + fraction-digits 2; + } + units mA; + description + "The minimum value of the statistic over the time + interval."; + } + + leaf max { + type decimal64 { + fraction-digits 2; + } + units mA; + description + "The maximum value of the statistic over the time + interval."; + } + + uses stat-interval-state; + uses min-max-time; + } + + grouping avg-min-max-instant-stats-pct { + description + "Common grouping for percentage statistics. + Values include the instantaneous, average, + minimum, and maximum statistics. Statistics are computed + and reported based on a moving time interval (e.g., the last + 30s). If supported by the device, the time interval over which + the statistics are computed, and the times at which the minimum + and maximum values occurred, are also reported."; + + leaf instant { + type oc-types:percentage; + description + "The instantaneous percentage value."; + } + + leaf avg { + type oc-types:percentage; + description + "The arithmetic mean value of the percentage measure of the + statistic over the time interval."; + } + + leaf min { + type oc-types:percentage; + description + "The minimum value of the percentage measure of the + statistic over the time interval."; + } + + leaf max { + type oc-types:percentage; + description + "The maximum value of the percentage measure of the + statistic over the time interval."; + } + + uses stat-interval-state; + uses min-max-time; + } + + identity ADDRESS_FAMILY { + description + "A base identity for all address families"; + } + + identity IPV4 { + base ADDRESS_FAMILY; + description + "The IPv4 address family"; + } + + identity IPV6 { + base ADDRESS_FAMILY; + description + "The IPv6 address family"; + } + + identity MPLS { + base ADDRESS_FAMILY; + description + "The MPLS address family"; + } + + identity L2_ETHERNET { + base ADDRESS_FAMILY; + description + "The 802.3 Ethernet address family"; + } + +} diff --git a/src/device/service/drivers/smartnic_probes/probes-agent.yang b/src/device/service/drivers/smartnic_probes/probes-agent.yang index 6029cd204..897d2f129 100644 --- a/src/device/service/drivers/smartnic_probes/probes-agent.yang +++ b/src/device/service/drivers/smartnic_probes/probes-agent.yang @@ -25,32 +25,7 @@ augment '/oc-probes:probes/oc-probes:probe/oc-probes:tests/oc-probes:test/oc-pro uses morpheus_pipelines; } -grouping morpheus_pipelines { - list morpheus_pipelines { - key name; - uses morpheus_pipeline; - } -} - -grouping morpheus_pipeline { - leaf name { type string; } - leaf num_threads { type uint16; } - leaf pipeline_batch_size {type uint64; } - leaf model_max_batch_size {type uint64; } - leaf input_file {type string; } - leaf output_file {type string; } - leaf model_fea_length {type uint16; } - leaf model_name {type string; } - leaf iterative {type boolean; } - leaf server_url {type string; } - leaf file_type {type files; } - list stages { - key name; - uses morpheus_pipeline_stage; - } -} - -typedef files { +typedef files{ type enumeration { enum "auto"; enum "csv"; @@ -58,27 +33,14 @@ typedef files { } } -typedef stage { - type enumeration { - enum "FileSourceStage"; - enum "DeserializeStage"; - enum "AbpPcapPreprocessingStage"; - enum "MonitorStage"; - enum "TritonInferenceStage"; - enum "AddClassificationsStage"; - enum "SerializeStage"; - enum "WriteToFileStage"; - } -} - -grouping prob { +grouping prob{ leaf value { - type string; + type string; // e.g. "probs" description "probs"; } } -grouping conf { +grouping conf{ leaf mode {type string; } leaf num_threads { type uint16; } leaf pipeline_batch_size { type uint64; } @@ -90,20 +52,98 @@ grouping conf { } grouping morpheus_pipeline_stage { - leaf name { type string; } - leaf stage_type {type stage; } - list configuration {key "mode"; uses conf;} - leaf filename {type string;} - leaf iterative {type boolean;} - leaf file_type {type files;} - leaf filter_null {type boolean;} - leaf descriptions {type string;} + leaf stage_name { type string; } + choice stage_type { + case FileSourceStage { + container FileSourceStage { + list fs_configuration {key "mode"; uses conf;} + leaf filename {type string;} + leaf iterative {type boolean;} + leaf file_type {type files;} + leaf filter_null {type boolean;} + } + } + case DeserializeStage { + container DeserializeStage { + list ds_configuration {key "mode"; uses conf;} + } + } + case AbpPcapPreprocessingStage { + container AbpPcapPreprocessingStage { + list apps_configuration {key "mode"; uses conf;} + } + } + case MonitorStage { + container MonitorStage { + list ms_configuration {key "mode"; uses conf;} + leaf descriptions {type string;} + leaf unit {type string;} + } + } + case TritonInferenceStage { + container TritonInferenceStage { + list tis_configuration {key "mode"; uses conf;} + leaf model_name {type string;} + leaf server_url {type string;} + leaf force_convert_inputs {type boolean;} + } + } + case AddClassificationsStage{ + container AddClassificationsStage { + list acs_configuration {key "mode"; uses conf;} + list labels {key "value"; uses prob;} + } + } + case SerializeStage { + container SerializeStage { + list ss_configuration {key "mode"; uses conf;} + leaf kwargs {type empty;} + } + } + case WriteToFileStage{ + container WriteToFileStage { + list wfs_configuration {key "mode"; uses conf;} + leaf wfs_filename {type string;} + leaf overwrite {type boolean;} + } + } + case CustomStage { + list custom { + key "field_name"; + leaf field_name {type string;} + leaf field_value {type string;} + } + } + } +} + +grouping morpheus_pipeline { + leaf pipeline_name {type string;} + leaf num_threads {type uint16;} + leaf pipeline_batch_size {type uint64; } + leaf model_max_batch_size {type uint64; } + leaf input_file {type string;} + leaf output_file {type string;} + leaf model_fea_length {type uint16;} leaf model_name {type string;} + leaf iterative {type boolean;} leaf server_url {type string;} - leaf force_convert_inputs {type boolean;} - leaf unit {type string;} - list labels {key "value"; uses prob;} - leaf kwargs {type empty;} - leaf overwrite {type boolean;} + leaf file_type {type files;} + list stages { + key "stage_name"; + uses morpheus_pipeline_stage; + } +} + +grouping morpheus_pipelines { + list morpheus_pipeline { + key "pipeline_name"; + uses morpheus_pipeline; + } +} + +container morpheus_pipelines { + uses morpheus_pipelines; } + } \ No newline at end of file diff --git a/src/device/service/drivers/smartnic_probes/references_probes_libraries.txt b/src/device/service/drivers/smartnic_probes/references_probes_libraries.txt new file mode 100644 index 000000000..7628b7c2f --- /dev/null +++ b/src/device/service/drivers/smartnic_probes/references_probes_libraries.txt @@ -0,0 +1,6 @@ +ietf-yang-types.yang -> https://github.com/YangModels/yang/blob/main/vendor/cisco/xe/1661/ietf-yang-types.yang +openconfig-extensions.yang -> https://github.com/openconfig/public/blob/master/release/models/openconfig-extensions.yang +openconfig-inet-types.yang -> https://github.com/openconfig/public/blob/master/release/models/types/openconfig-inet-types.yang +openconfig-probes-types.yang -> https://github.com/openconfig/public/blob/master/release/models/probes/openconfig-probes-types.yang +openconfig-probes.yang -> https://github.com/openconfig/public/blob/master/release/models/probes/openconfig-probes.yang +openconfig-types.yang -> https://github.com/openconfig/public/blob/master/release/models/types/openconfig-types.yang -- GitLab From 654eb4328bdb90c9b267cad11683385e02d191f6 Mon Sep 17 00:00:00 2001 From: carcel Date: Wed, 20 Mar 2024 10:14:21 +0000 Subject: [PATCH 010/463] Morpheus Client Extension --- manifests/nginx_ingress_http.yaml | 7 + proto/context.proto | 1 + src/common/DeviceTypes.py | 1 + src/common/tools/object_factory/Device.py | 11 + src/common/type_checkers/Assertions.py | 1 + .../data/sql_hash_join_full_scan_tests.sql | 2 +- .../database/models/enums/DeviceDriver.py | 1 + src/device/service/drivers/__init__.py | 12 + .../drivers/ietf_l2vpn/TfsDebugApiClient.py | 2 + .../drivers/smartnic/SmartnicDriver.py | 122 ++++ src/device/service/drivers/smartnic/Tools.py | 174 +++++ .../service/drivers/smartnic/__init__.py | 20 + src/nbi/service/__main__.py | 2 + .../nbi_plugins/agent_probes/Resources.py | 236 +++++++ .../nbi_plugins/agent_probes/Tools.py | 118 ++++ .../nbi_plugins/agent_probes/__init__.py | 69 ++ .../data/agent_probes_configuration_rule.json | 17 + src/nbi/tests/data/agent_probes_device.json | 27 + src/policy/Dockerfile | 67 +- .../java/org/etsi/tfs/policy/Serializer.java | 4 + .../context/model/DeviceDriverEnum.java | 3 +- src/policy/src/main/proto/acl.proto | 70 +- src/policy/src/main/proto/context.proto | 616 +++++++++++++++++- .../src/main/proto/context_policy.proto | 29 +- src/policy/src/main/proto/device.proto | 35 +- .../src/main/proto/kpi_sample_types.proto | 43 +- src/policy/src/main/proto/monitoring.proto | 175 ++++- src/policy/src/main/proto/policy.proto | 114 +++- src/policy/src/main/proto/policy_action.proto | 43 +- .../src/main/proto/policy_condition.proto | 44 +- src/policy/src/main/proto/service.proto | 26 +- .../service_handler_api/FilterFields.py | 1 + .../service/service_handlers/__init__.py | 6 + src/webui/service/device/forms.py | 1 + src/webui/service/device/routes.py | 2 + src/webui/service/templates/device/add.html | 1 + src/ztp/Dockerfile | 68 +- src/ztp/src/main/proto/acl.proto | 70 +- src/ztp/src/main/proto/context.proto | 616 +++++++++++++++++- src/ztp/src/main/proto/device.proto | 35 +- src/ztp/src/main/proto/kpi_sample_types.proto | 43 +- src/ztp/src/main/proto/monitoring.proto | 175 ++++- src/ztp/src/main/proto/ztp.proto | 70 +- 43 files changed, 3160 insertions(+), 20 deletions(-) create mode 100644 src/device/service/drivers/smartnic/SmartnicDriver.py create mode 100644 src/device/service/drivers/smartnic/Tools.py create mode 100644 src/device/service/drivers/smartnic/__init__.py create mode 100644 src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py create mode 100644 src/nbi/service/rest_server/nbi_plugins/agent_probes/Tools.py create mode 100644 src/nbi/service/rest_server/nbi_plugins/agent_probes/__init__.py create mode 100644 src/nbi/tests/data/agent_probes_configuration_rule.json create mode 100644 src/nbi/tests/data/agent_probes_device.json mode change 120000 => 100644 src/policy/Dockerfile mode change 120000 => 100644 src/policy/src/main/proto/acl.proto mode change 120000 => 100644 src/policy/src/main/proto/context.proto mode change 120000 => 100644 src/policy/src/main/proto/context_policy.proto mode change 120000 => 100644 src/policy/src/main/proto/device.proto mode change 120000 => 100644 src/policy/src/main/proto/kpi_sample_types.proto mode change 120000 => 100644 src/policy/src/main/proto/monitoring.proto mode change 120000 => 100644 src/policy/src/main/proto/policy.proto mode change 120000 => 100644 src/policy/src/main/proto/policy_action.proto mode change 120000 => 100644 src/policy/src/main/proto/policy_condition.proto mode change 120000 => 100644 src/policy/src/main/proto/service.proto mode change 120000 => 100644 src/ztp/Dockerfile mode change 120000 => 100644 src/ztp/src/main/proto/acl.proto mode change 120000 => 100644 src/ztp/src/main/proto/context.proto mode change 120000 => 100644 src/ztp/src/main/proto/device.proto mode change 120000 => 100644 src/ztp/src/main/proto/kpi_sample_types.proto mode change 120000 => 100644 src/ztp/src/main/proto/monitoring.proto mode change 120000 => 100644 src/ztp/src/main/proto/ztp.proto diff --git a/manifests/nginx_ingress_http.yaml b/manifests/nginx_ingress_http.yaml index e8e8a80e4..336f164b4 100644 --- a/manifests/nginx_ingress_http.yaml +++ b/manifests/nginx_ingress_http.yaml @@ -50,6 +50,13 @@ spec: name: nbiservice port: number: 8080 + - path: /()(agent-probes/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 - path: /()(bmw/.*) pathType: Prefix backend: diff --git a/proto/context.proto b/proto/context.proto index 5085cad33..856caa4f9 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -204,6 +204,7 @@ enum DeviceDriverEnum { DEVICEDRIVER_GNMI_OPENCONFIG = 8; DEVICEDRIVER_FLEXSCALE = 9; DEVICEDRIVER_IETF_ACTN = 10; + DEVICEDRIVER_SMARTNIC = 12; } enum DeviceOperationalStatusEnum { diff --git a/src/common/DeviceTypes.py b/src/common/DeviceTypes.py index 72b3e21fd..5ed4b6681 100644 --- a/src/common/DeviceTypes.py +++ b/src/common/DeviceTypes.py @@ -47,6 +47,7 @@ class DeviceTypeEnum(Enum): PACKET_ROUTER = 'packet-router' PACKET_SWITCH = 'packet-switch' XR_CONSTELLATION = 'xr-constellation' + SMARTNIC = 'smartnic' # 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 76959232a..b3182e302 100644 --- a/src/common/tools/object_factory/Device.py +++ b/src/common/tools/object_factory/Device.py @@ -49,6 +49,9 @@ DEVICE_TFS_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN] DEVICE_IETF_ACTN_TYPE = DeviceTypeEnum.OPEN_LINE_SYSTEM.value DEVICE_IETF_ACTN_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN] +DEVICE_SMARTNIC_TYPE = DeviceTypeEnum.SMARTNIC.value +DEVICE_SMARTNIC_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_SMARTNIC] + def json_device_id(device_uuid : str): return {'device_uuid': {'uuid': device_uuid}} @@ -148,6 +151,14 @@ def json_device_ietf_actn_disabled( device_uuid, DEVICE_IETF_ACTN_TYPE, DEVICE_DISABLED, name=name, endpoints=endpoints, config_rules=config_rules, drivers=drivers) +def json_device_smartnic_disabled( + device_uuid : str, name : Optional[str] = None, endpoints : List[Dict] = [], config_rules : List[Dict] = [], + drivers : List[Dict] = DEVICE_SMARTNIC_DRIVERS + ): + return json_device( + device_uuid, DEVICE_SMARTNIC_TYPE, DEVICE_DISABLED, name=name, endpoints=endpoints, config_rules=config_rules, + drivers=drivers) + def json_device_connect_rules(address : str, port : int, settings : Dict = {}) -> List[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 87d8e54ee..06bcd4482 100644 --- a/src/common/type_checkers/Assertions.py +++ b/src/common/type_checkers/Assertions.py @@ -48,6 +48,7 @@ def validate_device_driver_enum(message): 'DEVICEDRIVER_GNMI_OPENCONFIG', 'DEVICEDRIVER_FLEXSCALE', 'DEVICEDRIVER_IETF_ACTN', + 'DEVICEDRIVER_SMARTNIC' ] def validate_device_operational_status_enum(message): diff --git a/src/context/data/sql_hash_join_full_scan_tests.sql b/src/context/data/sql_hash_join_full_scan_tests.sql index ebead1be6..34330f916 100644 --- a/src/context/data/sql_hash_join_full_scan_tests.sql +++ b/src/context/data/sql_hash_join_full_scan_tests.sql @@ -9,7 +9,7 @@ CREATE DATABASE tests; USE tests; CREATE TYPE public.orm_deviceoperationalstatusenum AS ENUM ('UNDEFINED', 'DISABLED', 'ENABLED'); -CREATE TYPE public.orm_devicedriverenum AS ENUM ('UNDEFINED', 'OPENCONFIG', 'TRANSPORT_API', 'P4', 'IETF_NETWORK_TOPOLOGY', 'ONF_TR_352', 'XR', 'IETF_L2VPN'); +CREATE TYPE public.orm_devicedriverenum AS ENUM ('UNDEFINED', 'OPENCONFIG', 'TRANSPORT_API', 'P4', 'IETF_NETWORK_TOPOLOGY', 'ONF_TR_352', 'XR', 'IETF_L2VPN', 'SMARTNIC'); CREATE TYPE public.configrulekindenum AS ENUM ('CUSTOM', 'ACL'); CREATE TYPE public.orm_configactionenum AS ENUM ('UNDEFINED', 'SET', 'DELETE'); diff --git a/src/context/service/database/models/enums/DeviceDriver.py b/src/context/service/database/models/enums/DeviceDriver.py index 8e15bf058..559291965 100644 --- a/src/context/service/database/models/enums/DeviceDriver.py +++ b/src/context/service/database/models/enums/DeviceDriver.py @@ -33,6 +33,7 @@ class ORM_DeviceDriverEnum(enum.Enum): GNMI_OPENCONFIG = DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG FLEXSCALE = DeviceDriverEnum.DEVICEDRIVER_FLEXSCALE IETF_ACTN = DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN + SMARTNIC = DeviceDriverEnum.DEVICEDRIVER_SMARTNIC grpc_to_enum__device_driver = functools.partial( grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum) diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index 27c61f89f..1534655db 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -136,6 +136,18 @@ if LOAD_ALL_DEVICE_DRIVERS: FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_P4, } ])) + +if LOAD_ALL_DEVICE_DRIVERS: + from .smartnic.SmartnicDriver import SmartnicDriver # pylint: disable=wrong-import-position + DRIVERS.append( + (SmartnicDriver, [ + { + # Real P4 Switch, specifying P4 Driver => use P4Driver + FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.SMARTNIC, + FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_SMARTNIC, + } + ])) + if LOAD_ALL_DEVICE_DRIVERS: from .microwave.IETFApiDriver import IETFApiDriver # pylint: disable=wrong-import-position diff --git a/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py b/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py index 06c55c5dc..ee2d1ab6e 100644 --- a/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py +++ b/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py @@ -45,6 +45,8 @@ MAPPING_DRIVER = { 'DEVICEDRIVER_IETF_L2VPN' : 7, 'DEVICEDRIVER_GNMI_OPENCONFIG' : 8, 'DEVICEDRIVER_FLEXSCALE' : 9, + 'DEVICEDRIVER_IETF_ACTN' : 10, + 'DEVICEDRIVER_SMARTNIC' : 12 } MSG_ERROR = 'Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}' diff --git a/src/device/service/drivers/smartnic/SmartnicDriver.py b/src/device/service/drivers/smartnic/SmartnicDriver.py new file mode 100644 index 000000000..4bad52db4 --- /dev/null +++ b/src/device/service/drivers/smartnic/SmartnicDriver.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 logging, requests, threading +from requests.auth import HTTPBasicAuth +from typing import Any, Iterator, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.type_checkers.Checkers import chk_string, chk_type +from device.service.driver_api._Driver import _Driver +from . import ALL_RESOURCE_KEYS +from .Tools import create_connectivity_service, find_key, config_getter, delete_connectivity_service + +LOGGER = logging.getLogger(__name__) + +DRIVER_NAME = 'smartnic' +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) + +class SmartnicDriver(_Driver): + def __init__(self, address: str, port: int, **settings) -> None: + super().__init__(DRIVER_NAME, address, port, **settings) + self.__lock = threading.Lock() + self.__started = threading.Event() + self.__terminate = threading.Event() + username = self.settings.get('username') + password = self.settings.get('password') + #self.__auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None + scheme = self.settings.get('scheme', 'http') + self.__tapi_root = '{:s}://{:s}:{:d}'.format(scheme, self.address, int(self.port)) + self.__timeout = int(self.settings.get('timeout', 120)) + + def Connect(self) -> bool: + url = self.__tapi_root + with self.__lock: + if self.__started.is_set(): return True + try: + requests.get(url, timeout=self.__timeout, verify=False) + #requests.get(url, timeout=self.__timeout, verify=False, auth=self.__auth) + except requests.exceptions.Timeout: + LOGGER.exception('Timeout connecting {:s}'.format(str(self.__tapi_root))) + return False + except Exception: # pylint: disable=broad-except + LOGGER.exception('Exception connecting {:s}'.format(str(self.__tapi_root))) + 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: + 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) + chk_string(str_resource_name, resource_key, allow_empty=False) + results.extend(config_getter( + self.__tapi_root, resource_key, timeout=self.__timeout)) + 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: + for resource in resources: + LOGGER.info('resource = {:s}'.format(str(resource))) + config_rules = find_key(resource, 'config_rules') + data = create_connectivity_service( + self.__tapi_root, config_rules, timeout=self.__timeout) + results.extend(data) + 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: + for resource in resources: + LOGGER.info('resource = {:s}'.format(str(resource))) + config_rules = find_key(resource, 'config_rules') + results.extend(delete_connectivity_service( + self.__tapi_root, config_rules, timeout=self.__timeout)) + return results + + @metered_subclass_method(METRICS_POOL) + def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + # TODO: TAPI 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: TAPI 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: TAPI does not support monitoring by now + return [] diff --git a/src/device/service/drivers/smartnic/Tools.py b/src/device/service/drivers/smartnic/Tools.py new file mode 100644 index 000000000..54961bbdd --- /dev/null +++ b/src/device/service/drivers/smartnic/Tools.py @@ -0,0 +1,174 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, operator, requests +from requests.auth import HTTPBasicAuth +from typing import Optional +#from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_SERVICES, RESOURCE_INTERFACES + + +import logging +from typing import Any, Dict, Optional, Tuple +from common.proto.kpi_sample_types_pb2 import KpiSampleType +from common.type_checkers.Checkers import chk_attribute, chk_string, chk_type +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_INTERFACES + +LOGGER = logging.getLogger(__name__) + + +SPECIAL_RESOURCE_MAPPINGS = { + RESOURCE_ENDPOINTS : '/endpoints', + RESOURCE_INTERFACES : '/interfaces' +} + +HTTP_OK_CODES = { + 200, # OK + 201, # Created + 202, # Accepted + 204, # No Content +} + +def find_key(resource, key): + return json.loads(resource[1])[key] + + +def config_getter( + root_url : str, resource_key : str, auth : Optional[HTTPBasicAuth] = None, timeout : Optional[int] = None +): + url = '{:s}/manage-probe/ports'.format(root_url) + result = [] + try: + response = requests.get(url, timeout=timeout, verify=False) + except requests.exceptions.Timeout: + LOGGER.exception('Timeout connecting {:s}'.format(url)) + return result + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Exception retrieving {:s}'.format(resource_key)) + result.append((resource_key, e)) + return result + return response + + # try: + # context = json.loads(response.content) + # except Exception as e: # pylint: disable=broad-except + # LOGGER.warning('Unable to decode reply: {:s}'.format(str(response.content))) + # result.append((resource_key, e)) + # return result + + + +def create_connectivity_service( + root_url, config_rules, timeout : Optional[int] = None, auth : Optional[HTTPBasicAuth] = None +): + + url = '{:s}/configure'.format(root_url) + headers = {'content-type': 'application/json'} + results = [] + try: + LOGGER.info('Configuring Smartnic rules') + response = requests.post( + url=url, data=json.dumps(config_rules), timeout=timeout, headers=headers, verify=False) + LOGGER.info('SmartNIC Probes response: {:s}'.format(str(response))) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Exception creating ConfigRule') + results.append(e) + else: + if response.status_code not in HTTP_OK_CODES: + msg = 'Could not create ConfigRule status_code={:s} reply={:s}' + LOGGER.error(msg.format(str(response.status_code), str(response))) + results.append(response.status_code in HTTP_OK_CODES) + return results + +def delete_connectivity_service(root_url, config_rules, timeout : Optional[int] = None, auth : Optional[HTTPBasicAuth] = None +): + url = '{:s}/configure'.format(root_url) + results = [] + try: + response = requests.delete(url=url, timeout=timeout, verify=False) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Exception deleting ConfigRule') + results.append(e) + else: + if response.status_code not in HTTP_OK_CODES: + msg = 'Could not delete ConfigRule status_code={:s} reply={:s}' + LOGGER.error(msg.format(str(response.status_code), str(response))) + results.append(response.status_code in HTTP_OK_CODES) + return results + +def process_optional_string_field( + endpoint_data : Dict[str, Any], field_name : str, endpoint_resource_value : Dict[str, Any] +) -> None: + field_value = chk_attribute(field_name, endpoint_data, 'endpoint_data', default=None) + if field_value is None: return + chk_string('endpoint_data.{:s}'.format(field_name), field_value) + if len(field_value) > 0: endpoint_resource_value[field_name] = field_value + +def compose_resource_endpoint(endpoint_data : Dict[str, Any]) -> Optional[Tuple[str, Dict]]: + try: + # Check type of endpoint_data + chk_type('endpoint_data', endpoint_data, dict) + + # Check endpoint UUID (mandatory) + endpoint_uuid = chk_attribute('uuid', endpoint_data, 'endpoint_data') + chk_string('endpoint_data.uuid', endpoint_uuid, min_length=1) + endpoint_resource_path = SPECIAL_RESOURCE_MAPPINGS.get(RESOURCE_ENDPOINTS) + endpoint_resource_key = '{:s}/endpoint[{:s}]'.format(endpoint_resource_path, endpoint_uuid) + endpoint_resource_value = {'uuid': endpoint_uuid} + + # Check endpoint optional string fields + process_optional_string_field(endpoint_data, 'name', endpoint_resource_value) + process_optional_string_field(endpoint_data, 'type', endpoint_resource_value) + process_optional_string_field(endpoint_data, 'context_uuid', endpoint_resource_value) + process_optional_string_field(endpoint_data, 'topology_uuid', endpoint_resource_value) + + # Check endpoint sample types (optional) + endpoint_sample_types = chk_attribute('sample_types', endpoint_data, 'endpoint_data', default=[]) + chk_type('endpoint_data.sample_types', endpoint_sample_types, list) + sample_types = {} + sample_type_errors = [] + for i,endpoint_sample_type in enumerate(endpoint_sample_types): + field_name = 'endpoint_data.sample_types[{:d}]'.format(i) + try: + chk_type(field_name, endpoint_sample_type, (int, str)) + if isinstance(endpoint_sample_type, int): + metric_name = KpiSampleType.Name(endpoint_sample_type) + metric_id = endpoint_sample_type + elif isinstance(endpoint_sample_type, str): + metric_id = KpiSampleType.Value(endpoint_sample_type) + metric_name = endpoint_sample_type + else: + str_type = str(type(endpoint_sample_type)) + raise Exception('Bad format: {:s}'.format(str_type)) # pylint: disable=broad-exception-raised + except Exception as e: # pylint: disable=broad-exception-caught + MSG = 'Unsupported {:s}({:s}) : {:s}' + sample_type_errors.append(MSG.format(field_name, str(endpoint_sample_type), str(e))) + + metric_name = metric_name.lower().replace('kpisampletype_', '') + monitoring_resource_key = '{:s}/state/{:s}'.format(endpoint_resource_key, metric_name) + sample_types[metric_id] = monitoring_resource_key + + if len(sample_type_errors) > 0: + # pylint: disable=broad-exception-raised + raise Exception('Malformed Sample Types:\n{:s}'.format('\n'.join(sample_type_errors))) + + if len(sample_types) > 0: + endpoint_resource_value['sample_types'] = sample_types + + if 'location' in endpoint_data: + endpoint_resource_value['location'] = endpoint_data['location'] + + return endpoint_resource_key, endpoint_resource_value + except: # pylint: disable=bare-except + LOGGER.exception('Problem composing endpoint({:s})'.format(str(endpoint_data))) + return None diff --git a/src/device/service/drivers/smartnic/__init__.py b/src/device/service/drivers/smartnic/__init__.py new file mode 100644 index 000000000..bc88d00fa --- /dev/null +++ b/src/device/service/drivers/smartnic/__init__.py @@ -0,0 +1,20 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_SERVICES, RESOURCE_INTERFACES + +ALL_RESOURCE_KEYS = [ + RESOURCE_ENDPOINTS, + RESOURCE_SERVICES, + RESOURCE_INTERFACES +] diff --git a/src/nbi/service/__main__.py b/src/nbi/service/__main__.py index 8834e45a2..0b6fb18e3 100644 --- a/src/nbi/service/__main__.py +++ b/src/nbi/service/__main__.py @@ -20,6 +20,7 @@ from common.Settings import ( wait_for_environment_variables) from .NbiService import NbiService from .rest_server.RestServer import RestServer +from .rest_server.nbi_plugins.agent_probes import register_agent_probes from .rest_server.nbi_plugins.debug_api import register_debug_api from .rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api from .rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn @@ -62,6 +63,7 @@ def main(): grpc_service.start() rest_server = RestServer() + register_agent_probes(rest_server) register_debug_api(rest_server) register_etsi_bwm_api(rest_server) register_ietf_l2vpn(rest_server) # Registering L2VPN entrypoint diff --git a/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py new file mode 100644 index 000000000..2b0a537cc --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py @@ -0,0 +1,236 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 flask.json import jsonify +from flask_restful import Resource, request +from common.proto.context_pb2 import Empty +from common.tools.grpc.Tools import grpc_message_to_json +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from .Tools import ( + format_grpc_to_json, grpc_connection_id, grpc_context_id, grpc_device, grpc_device_id, grpc_link_id, grpc_policy_rule_id, + grpc_service_id, grpc_service, grpc_slice_id, grpc_topology_id) + +class _Resource(Resource): + def __init__(self) -> None: + super().__init__() + self.client = ContextClient() + self.device_client = DeviceClient() + self.service_client = ServiceClient() + +class ContextIds(_Resource): + def get(self): + return format_grpc_to_json(self.client.ListContextIds(Empty())) + +class Contexts(_Resource): + def get(self): + return format_grpc_to_json(self.client.ListContexts(Empty())) + +class DummyContexts(_Resource): + def get(self): + contexts = grpc_message_to_json(self.client.ListContexts(Empty()), use_integers_for_enums=True)['contexts'] + devices = grpc_message_to_json(self.client.ListDevices(Empty()), use_integers_for_enums=True)['devices'] + links = grpc_message_to_json(self.client.ListLinks(Empty()), use_integers_for_enums=True)['links'] + + topologies = list() + slices = list() + services = list() + connections = list() + + for context in contexts: + context_uuid = context['context_id']['context_uuid']['uuid'] + context_id = grpc_context_id(context_uuid) + + topologies.extend(grpc_message_to_json( + self.client.ListTopologies(context_id), + use_integers_for_enums=True + )['topologies']) + + slices.extend(grpc_message_to_json( + self.client.ListSlices(context_id), + use_integers_for_enums=True + )['slices']) + + context_services = grpc_message_to_json( + self.client.ListServices(context_id), + use_integers_for_enums=True + )['services'] + services.extend(context_services) + + for service in context_services: + service_uuid = service['service_id']['service_uuid']['uuid'] + service_id = grpc_service_id(context_uuid, service_uuid) + connections.extend(grpc_message_to_json( + self.client.ListConnections(service_id), + use_integers_for_enums=True + )['connections']) + + for device in devices: + for config_rule in device['device_config']['config_rules']: + if 'custom' not in config_rule: continue + resource_value = config_rule['custom']['resource_value'] + if not isinstance(resource_value, str): continue + try: + resource_value = json.loads(resource_value) + except: # pylint: disable=bare-except + pass + config_rule['custom']['resource_value'] = resource_value + + dummy_context = {'dummy_mode': True} + if len(contexts ) > 0: dummy_context['contexts' ] = contexts + if len(topologies ) > 0: dummy_context['topologies' ] = topologies + if len(devices ) > 0: dummy_context['devices' ] = devices + if len(links ) > 0: dummy_context['links' ] = links + if len(slices ) > 0: dummy_context['slices' ] = slices + if len(services ) > 0: dummy_context['services' ] = services + if len(connections) > 0: dummy_context['connections'] = connections + return jsonify(dummy_context) + +class Context(_Resource): + def get(self, context_uuid : str): + return format_grpc_to_json(self.client.GetContext(grpc_context_id(context_uuid))) + +class TopologyIds(_Resource): + def get(self, context_uuid : str): + return format_grpc_to_json(self.client.ListTopologyIds(grpc_context_id(context_uuid))) + +class Topologies(_Resource): + def get(self, context_uuid : str): + return format_grpc_to_json(self.client.ListTopologies(grpc_context_id(context_uuid))) + +class Topology(_Resource): + def get(self, context_uuid : str, topology_uuid : str): + return format_grpc_to_json(self.client.GetTopology(grpc_topology_id(context_uuid, topology_uuid))) + +class ServiceIds(_Resource): + def get(self, context_uuid : str): + return format_grpc_to_json(self.client.ListServiceIds(grpc_context_id(context_uuid))) + +class Services(_Resource): + def get(self, context_uuid : str): + return format_grpc_to_json(self.client.ListServices(grpc_context_id(context_uuid))) + +class Service(_Resource): + def get(self, context_uuid : str, service_uuid : str): + return format_grpc_to_json(self.client.GetService(grpc_service_id(context_uuid, service_uuid))) + + def post(self, context_uuid : str, service_uuid : str): # pylint: disable=unused-argument + service = request.get_json()['services'][0] + return format_grpc_to_json(self.service_client.CreateService(grpc_service( + service_uuid = service['service_id']['service_uuid']['uuid'], + service_type = service['service_type'], + context_uuid = service['service_id']['context_id']['context_uuid']['uuid'], + ))) + + def put(self, context_uuid : str, service_uuid : str): # pylint: disable=unused-argument + service = request.get_json()['services'][0] + return format_grpc_to_json(self.service_client.UpdateService(grpc_service( + service_uuid = service['service_id']['service_uuid']['uuid'], + service_type = service['service_type'], + context_uuid = service['service_id']['context_id']['context_uuid']['uuid'], + status = service['service_status']['service_status'], + endpoint_ids = service['service_endpoint_ids'], + constraints = service['service_constraints'], + config_rules = service['service_config']['config_rules'] + ))) + + def delete(self, context_uuid : str, service_uuid : str): + return format_grpc_to_json(self.service_client.DeleteService(grpc_service_id( + context_uuid, service_uuid, + ))) + +class SliceIds(_Resource): + def get(self, context_uuid : str): + return format_grpc_to_json(self.client.ListSliceIds(grpc_context_id(context_uuid))) + +class Slices(_Resource): + def get(self, context_uuid : str): + return format_grpc_to_json(self.client.ListSlices(grpc_context_id(context_uuid))) + +class Slice(_Resource): + def get(self, context_uuid : str, slice_uuid : str): + return format_grpc_to_json(self.client.GetSlice(grpc_slice_id(context_uuid, slice_uuid))) + +class DeviceIds(_Resource): + def get(self): + return format_grpc_to_json(self.client.ListDeviceIds(Empty())) + +class Devices(_Resource): + def get(self): + return format_grpc_to_json(self.client.ListDevices(Empty())) + +class Device(_Resource): + def get(self, device_uuid : str): + return format_grpc_to_json(self.client.GetDevice(grpc_device_id(device_uuid))) + + def post(self, device_uuid : str): # pylint: disable=unused-argument + device = request.get_json()['devices'][0] + return format_grpc_to_json(self.device_client.AddDevice(grpc_device( + device_uuid = device['device_id']['device_uuid']['uuid'], + device_type = device['device_type'], + config_rules = device['device_config']['config_rules'], + status = device['device_operational_status'], + drivers = device['device_drivers'], + endpoints = device['device_endpoints'] + ))) + + def put(self, device_uuid : str): # pylint: disable=unused-argument + device = request.get_json()['devices'][0] + return format_grpc_to_json(self.device_client.ConfigureDevice(grpc_device( + device_uuid = device['device_id']['device_uuid']['uuid'], + device_type = device['device_type'], + device_config = device['device_config']['config_rules'], + device_operational_status = device['device_operational_status'], + device_drivers = device['device_drivers'], + device_endpoints = device['device_endpoints'] + ))) + + +class LinkIds(_Resource): + def get(self): + return format_grpc_to_json(self.client.ListLinkIds(Empty())) + +class Links(_Resource): + def get(self): + return format_grpc_to_json(self.client.ListLinks(Empty())) + +class Link(_Resource): + def get(self, link_uuid : str): + return format_grpc_to_json(self.client.GetLink(grpc_link_id(link_uuid))) + +class ConnectionIds(_Resource): + def get(self, context_uuid : str, service_uuid : str): + return format_grpc_to_json(self.client.ListConnectionIds(grpc_service_id(context_uuid, service_uuid))) + +class Connections(_Resource): + def get(self, context_uuid : str, service_uuid : str): + return format_grpc_to_json(self.client.ListConnections(grpc_service_id(context_uuid, service_uuid))) + +class Connection(_Resource): + def get(self, connection_uuid : str): + return format_grpc_to_json(self.client.GetConnection(grpc_connection_id(connection_uuid))) + +class PolicyRuleIds(_Resource): + def get(self): + return format_grpc_to_json(self.client.ListPolicyRuleIds(Empty())) + +class PolicyRules(_Resource): + def get(self): + return format_grpc_to_json(self.client.ListPolicyRules(Empty())) + +class PolicyRule(_Resource): + def get(self, policy_rule_uuid : str): + return format_grpc_to_json(self.client.GetPolicyRule(grpc_policy_rule_id(policy_rule_uuid))) diff --git a/src/nbi/service/rest_server/nbi_plugins/agent_probes/Tools.py b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Tools.py new file mode 100644 index 000000000..17b6dcdfd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Tools.py @@ -0,0 +1,118 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from flask.json import jsonify +from common.proto.context_pb2 import ( + ConnectionId, ContextId, DeviceDriverEnum, Device, DeviceId, DeviceOperationalStatusEnum, LinkId, ServiceId, SliceId, TopologyId, Service, ServiceStatusEnum +) +from common.proto.policy_pb2 import PolicyRuleId +from common.tools.grpc.Tools import grpc_message_to_json +from common.tools.object_factory.Connection import json_connection_id +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.ConfigRule import json_config_rule +from common.tools.object_factory.Constraint import json_constraint_custom +from common.tools.object_factory.EndPoint import json_endpoint_id, json_endpoint +from common.tools.object_factory.Device import json_device_id, json_device +from common.tools.object_factory.Link import json_link_id +from common.tools.object_factory.PolicyRule import json_policyrule_id +from common.tools.object_factory.Service import json_service_id, json_service +from common.tools.object_factory.Slice import json_slice_id +from common.tools.object_factory.Topology import json_topology_id + + +def format_grpc_to_json(grpc_reply): + return jsonify(grpc_message_to_json(grpc_reply)) + +def grpc_connection_id(connection_uuid): + return ConnectionId(**json_connection_id(connection_uuid)) + +def grpc_context_id(context_uuid): + return ContextId(**json_context_id(context_uuid)) + +def grpc_device_id(device_uuid): + return DeviceId(**json_device_id(device_uuid)) + +def grpc_device( + device_uuid, device_type, config_rules=None, status=None, drivers=None, endpoints=None +): + json_config_rules = [ + json_config_rule( + config_rule['action'], + config_rule['custom']['resource_key'], + config_rule['custom']['resource_value'] + ) + for config_rule in config_rules + ] if config_rules else [] + json_status = status if status else DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED + json_drivers = drivers if drivers else DeviceDriverEnum.DEVICEDRIVER_UNDEFINED + json_endpoints = [ + json_endpoint( + endpoint['device_id']['device_uuid']['uuid'], + endpoint['endpoint_uuid']['uuid'], + endpoint['endpoint_type'], + endpoint['topology_id'], + endpoint['kpi_sample_types'], + endpoint['location']['region'] + ) + for endpoint in endpoints + ] if endpoints else [] + return Device(**json_device( + device_uuid, device_type, json_config_rules, json_status, + json_drivers, json_endpoints)) + +def grpc_link_id(link_uuid): + return LinkId(**json_link_id(link_uuid)) + +def grpc_service_id(context_uuid, service_uuid): + return ServiceId(**json_service_id(service_uuid, context_id=json_context_id(context_uuid))) + +def grpc_service( + service_uuid, service_type, context_uuid, status=None, endpoint_ids=None, constraints=None, config_rules=None +): + json_context = json_context_id(context_uuid) + json_status = status if status else ServiceStatusEnum.SERVICESTATUS_PLANNED + json_endpoints_ids = [ + json_endpoint_id( + json_device_id(endpoint_id['device_id']['device_uuid']['uuid']), + endpoint_id['endpoint_uuid']['uuid'] + ) + for endpoint_id in endpoint_ids + ] if endpoint_ids else [] + json_constraints = [ + json_constraint_custom( + constraint['custom']['constraint_type'], + constraint['custom']['constraint_value'] + ) + for constraint in constraints + ] if constraints else [] + json_config_rules = [ + json_config_rule( + config_rule['action'], + config_rule['custom']['resource_key'], + config_rule['custom']['resource_value'] + ) + for config_rule in config_rules + ] if config_rules else [] + return Service(**json_service( + service_uuid, service_type, json_context, json_status, + json_endpoints_ids, json_constraints, json_config_rules)) + +def grpc_slice_id(context_uuid, slice_uuid): + return SliceId(**json_slice_id(slice_uuid, context_id=json_context_id(context_uuid))) + +def grpc_topology_id(context_uuid, topology_uuid): + return TopologyId(**json_topology_id(topology_uuid, context_id=json_context_id(context_uuid))) + +def grpc_policy_rule_id(policy_rule_uuid): + return PolicyRuleId(**json_policyrule_id(policy_rule_uuid)) diff --git a/src/nbi/service/rest_server/nbi_plugins/agent_probes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/agent_probes/__init__.py new file mode 100644 index 000000000..0b85500fc --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/agent_probes/__init__.py @@ -0,0 +1,69 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from nbi.service.rest_server.RestServer import RestServer +from .Resources import ( + Connection, ConnectionIds, Connections, + Context, ContextIds, Contexts, + Device, DeviceIds, Devices, + DummyContexts, + Link, LinkIds, Links, + PolicyRule, PolicyRuleIds, PolicyRules, + Service, ServiceIds, Services, + Slice, SliceIds, Slices, + Topologies, Topology, TopologyIds +) + +URL_PREFIX = '/agent-probes' + +# Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. +RESOURCES = [ + # (endpoint_name, resource_class, resource_url) + # ('api.context_ids', ContextIds, '/context_ids'), + # ('api.contexts', Contexts, '/contexts'), + # ('api.dummy_contexts', DummyContexts, '/dummy_contexts'), + # ('api.context', Context, '/context/'), + + # ('api.topology_ids', TopologyIds, '/context//topology_ids'), + # ('api.topologies', Topologies, '/context//topologies'), + # ('api.topology', Topology, '/context//topology/'), + + # ('api.service_ids', ServiceIds, '/context//service_ids'), + # ('api.services', Services, '/context//services'), + # ('api.service', Service, '/context//service/'), + + # ('api.slice_ids', SliceIds, '/context//slice_ids'), + # ('api.slices', Slices, '/context//slices'), + # ('api.slice', Slice, '/context//slice/'), + + ('api.smartnic.device_ids', DeviceIds, '/device_ids'), + ('api.smartnic.devices', Devices, '/devices'), + ('api.smartnic.device', Device, '/device/'), + + # ('api.link_ids', LinkIds, '/link_ids'), + # ('api.links', Links, '/links'), + # ('api.link', Link, '/link/'), + + # ('api.connection_ids', ConnectionIds, '/context//service//connection_ids'), + # ('api.connections', Connections, '/context//service//connections'), + # ('api.connection', Connection, '/connection/'), + + # ('api.policyrule_ids', PolicyRuleIds, '/policyrule_ids'), + # ('api.policyrules', PolicyRules, '/policyrules'), + # ('api.policyrule', PolicyRule, '/policyrule/'), +] + +def register_agent_probes(rest_server : RestServer): + for endpoint_name, resource_class, resource_url in RESOURCES: + rest_server.add_resource(resource_class, URL_PREFIX + resource_url, endpoint=endpoint_name) diff --git a/src/nbi/tests/data/agent_probes_configuration_rule.json b/src/nbi/tests/data/agent_probes_configuration_rule.json new file mode 100644 index 000000000..dbbf953ad --- /dev/null +++ b/src/nbi/tests/data/agent_probes_configuration_rule.json @@ -0,0 +1,17 @@ +{ + "devices": [ + { + "device_id": {"device_uuid":{"uuid":"smp-01"}}, + "device_type": "smartnic", + "device_config": {"config_rules": [ + {"action": 1, "custom": { + "resource_key": "config_rules", + "resource_value": {"pipeline_name":"pipeline_example","num_threads":2,"pipeline_batch_size":2048,"model_max_batch_size":4096,"input_file":"inputfile1.csv","output_file":"outputfile1.csv","nic_addr": "10.10.2.25", "gpu_addr":"11.6.15.2", "model_fea_length":8,"model_name":"modelname1","iterative":false,"server_url":"servertest.com","file_type":"csv","stages":{"FileSourceStage":{"stage_name":"FileSourceStage","FileSourceStage":{"fs_configuration":{"FsConf":{"mode":"FsConf"}},"filename":"file1.csv","file_type":"csv"}},"DeserializeStage":{"stage_name":"DeserializeStage","DeserializeStage":{"ds_configuration":{"DeserializeConf":{"mode":"DeserializeConf"}}}},"AbpPcapPreprocessingStage":{"stage_name":"AbpPcapPreprocessingStage","AbpPcapPreprocessingStage":{"apps_configuration":{"AppsConf":{"mode":"AppsConf"}}}},"MonitorStage":{"stage_name":"MonitorStage","MonitorStage":{"ms_configuration":{"MonitoringConf":{"mode":"MonitoringConf"}},"descriptions":"MetricMonitoring","unit":"kbps"}},"TritonInferenceStage":{"stage_name":"TritonInferenceStage","TritonInferenceStage":{"tis_configuration":{"TritonConf":{"mode":"TritonConf"}},"model_name":"Modeltest1","server_url":"servertest.com","force_convert_inputs":false}},"AddClassificationsStage":{"stage_name":"AddClassificationsStage","AddClassificationsStage":{"acs_configuration":{"ClassificationConf":{"mode":"ClassificationConf"}}}},"SerializeStage":{"stage_name":"SerializeStage","SerializeStage":{"ss_configuration":{"SerializeConf":{"mode":"SerializeConf"}}}},"WriteToFileStage":{"stage_name":"WriteToFileStage","WriteToFileStage":{"wfs_configuration":{"WFSConf":{"mode":"WFSConf"}},"wfs_filename":"file2.txt","overwrite":false}},"CustomStage":{"stage_name":"CustomStage","custom":{"name":{"field_name":"name","field_value":"test"}}}}} + }} + ]}, + "device_operational_status": 1, + "device_drivers": ["smartnic"], + "device_endpoints": [] + } + ] +} diff --git a/src/nbi/tests/data/agent_probes_device.json b/src/nbi/tests/data/agent_probes_device.json new file mode 100644 index 000000000..e9d931528 --- /dev/null +++ b/src/nbi/tests/data/agent_probes_device.json @@ -0,0 +1,27 @@ +{ + + "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": "smp-01"}}, + "device_type": "smartnic", + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.17.0.3"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8000"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "base_url": "/manage-probe", "timeout" : 120 + }}} + ]}, + "device_operational_status": 1, + "device_drivers": [12], + "device_endpoints": [] + } + + ] +} + \ No newline at end of file diff --git a/src/policy/Dockerfile b/src/policy/Dockerfile deleted file mode 120000 index eec732273..000000000 --- a/src/policy/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -src/main/docker/Dockerfile.multistage.jvm \ No newline at end of file diff --git a/src/policy/Dockerfile b/src/policy/Dockerfile new file mode 100644 index 000000000..2c6412d07 --- /dev/null +++ b/src/policy/Dockerfile @@ -0,0 +1,66 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Multi-stage Docker image build + +# Stage 1 +FROM maven:3-jdk-11 AS builder + +# Define working directory +WORKDIR /app + +# Copy every file in working directory, as defined in .dockerignore file +COPY ./pom.xml pom.xml +COPY ./src src/ +COPY ./target/generated-sources/ target/generated-sources/ +RUN mvn --errors --batch-mode package -Dmaven.test.skip=true + +# Stage 2 +FROM builder AS unit-test + +RUN mvn --errors --batch-mode -Pgenerate-consolidated-coverage verify + +# Stage 3 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4 AS release + +ARG JAVA_PACKAGE=java-11-openjdk-headless +ARG RUN_JAVA_VERSION=1.3.8 +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' +# Install java and the run-java script +# Also set up permissions for user `1001` +RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ + && microdnf update \ + && microdnf clean all \ + && mkdir /deployments \ + && chown 1001 /deployments \ + && chmod "g+rwX" /deployments \ + && chown 1001:root /deployments \ + && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \ + && chown 1001 /deployments/run-java.sh \ + && chmod 540 /deployments/run-java.sh \ + && echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/conf/security/java.security + +# Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size. +ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +# We make four distinct layers so if there are application changes the library layers can be re-used +COPY --from=builder --chown=1001 /app/target/quarkus-app/lib/ /deployments/lib/ +COPY --from=builder --chown=1001 /app/target/quarkus-app/*.jar /deployments/ +COPY --from=builder --chown=1001 /app/target/quarkus-app/app/ /deployments/app/ +COPY --from=builder --chown=1001 /app/target/quarkus-app/quarkus/ /deployments/quarkus/ + +EXPOSE 8080 +EXPOSE 6060 +USER 1001 + +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java b/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java index 570a7fb9e..018a08bdf 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java @@ -2304,6 +2304,8 @@ public class Serializer { return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_FLEXSCALE; case IETF_ACTN: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN; + case SMARTNIC: + return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_SMARTNIC; case UNDEFINED: default: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_UNDEFINED; @@ -2333,6 +2335,8 @@ public class Serializer { return DeviceDriverEnum.FLEXSCALE; case DEVICEDRIVER_IETF_ACTN: return DeviceDriverEnum.IETF_ACTN; + case DEVICEDRIVER_SMARTNIC: + return DeviceDriverEnum.SMARTNIC; case DEVICEDRIVER_UNDEFINED: case UNRECOGNIZED: default: diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java index 72a1d7136..937752dc8 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java @@ -27,5 +27,6 @@ public enum DeviceDriverEnum { IETF_L2VPN, GNMI_OPENCONFIG, FLEXSCALE, - IETF_ACTN + IETF_ACTN, + SMARTNIC } diff --git a/src/policy/src/main/proto/acl.proto b/src/policy/src/main/proto/acl.proto deleted file mode 120000 index 158ae78eb..000000000 --- a/src/policy/src/main/proto/acl.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/acl.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/acl.proto b/src/policy/src/main/proto/acl.proto new file mode 100644 index 000000000..3dba735dc --- /dev/null +++ b/src/policy/src/main/proto/acl.proto @@ -0,0 +1,69 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package acl; + +enum AclRuleTypeEnum { + ACLRULETYPE_UNDEFINED = 0; + ACLRULETYPE_IPV4 = 1; + ACLRULETYPE_IPV6 = 2; + ACLRULETYPE_L2 = 3; + ACLRULETYPE_MPLS = 4; + ACLRULETYPE_MIXED = 5; +} + +enum AclForwardActionEnum { + ACLFORWARDINGACTION_UNDEFINED = 0; + ACLFORWARDINGACTION_DROP = 1; + ACLFORWARDINGACTION_ACCEPT = 2; + ACLFORWARDINGACTION_REJECT = 3; +} + +enum AclLogActionEnum { + ACLLOGACTION_UNDEFINED = 0; + ACLLOGACTION_NOLOG = 1; + ACLLOGACTION_SYSLOG = 2; +} + +message AclMatch { + uint32 dscp = 1; + uint32 protocol = 2; + string src_address = 3; + string dst_address = 4; + uint32 src_port = 5; + uint32 dst_port = 6; + uint32 start_mpls_label = 7; + uint32 end_mpls_label = 8; +} + +message AclAction { + AclForwardActionEnum forward_action = 1; + AclLogActionEnum log_action = 2; +} + +message AclEntry { + uint32 sequence_id = 1; + string description = 2; + AclMatch match = 3; + AclAction action = 4; +} + +message AclRuleSet { + string name = 1; + AclRuleTypeEnum type = 2; + string description = 3; + string user_id = 4; + repeated AclEntry entries = 5; +} diff --git a/src/policy/src/main/proto/context.proto b/src/policy/src/main/proto/context.proto deleted file mode 120000 index 7f33c4bc7..000000000 --- a/src/policy/src/main/proto/context.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/context.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/context.proto b/src/policy/src/main/proto/context.proto new file mode 100644 index 000000000..fce1e71ad --- /dev/null +++ b/src/policy/src/main/proto/context.proto @@ -0,0 +1,615 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package context; + +import "acl.proto"; +import "kpi_sample_types.proto"; + +service ContextService { + rpc ListContextIds (Empty ) returns ( ContextIdList ) {} + rpc ListContexts (Empty ) returns ( ContextList ) {} + rpc GetContext (ContextId ) returns ( Context ) {} + rpc SetContext (Context ) returns ( ContextId ) {} + rpc RemoveContext (ContextId ) returns ( Empty ) {} + rpc GetContextEvents (Empty ) returns (stream ContextEvent ) {} + + rpc ListTopologyIds (ContextId ) returns ( TopologyIdList ) {} + rpc ListTopologies (ContextId ) returns ( TopologyList ) {} + rpc GetTopology (TopologyId ) returns ( Topology ) {} + rpc GetTopologyDetails (TopologyId ) returns ( TopologyDetails ) {} + rpc SetTopology (Topology ) returns ( TopologyId ) {} + rpc RemoveTopology (TopologyId ) returns ( Empty ) {} + rpc GetTopologyEvents (Empty ) returns (stream TopologyEvent ) {} + + rpc ListDeviceIds (Empty ) returns ( DeviceIdList ) {} + rpc ListDevices (Empty ) returns ( DeviceList ) {} + rpc GetDevice (DeviceId ) returns ( Device ) {} + rpc SetDevice (Device ) returns ( DeviceId ) {} + rpc RemoveDevice (DeviceId ) returns ( Empty ) {} + rpc GetDeviceEvents (Empty ) returns (stream DeviceEvent ) {} + rpc SelectDevice (DeviceFilter ) returns ( DeviceList ) {} + rpc ListEndPointNames (EndPointIdList) returns ( EndPointNameList) {} + + rpc ListLinkIds (Empty ) returns ( LinkIdList ) {} + rpc ListLinks (Empty ) returns ( LinkList ) {} + rpc GetLink (LinkId ) returns ( Link ) {} + rpc SetLink (Link ) returns ( LinkId ) {} + rpc RemoveLink (LinkId ) returns ( Empty ) {} + rpc GetLinkEvents (Empty ) returns (stream LinkEvent ) {} + + rpc ListServiceIds (ContextId ) returns ( ServiceIdList ) {} + rpc ListServices (ContextId ) returns ( ServiceList ) {} + rpc GetService (ServiceId ) returns ( Service ) {} + rpc SetService (Service ) returns ( ServiceId ) {} + rpc UnsetService (Service ) returns ( ServiceId ) {} + rpc RemoveService (ServiceId ) returns ( Empty ) {} + rpc GetServiceEvents (Empty ) returns (stream ServiceEvent ) {} + rpc SelectService (ServiceFilter ) returns ( ServiceList ) {} + + rpc ListSliceIds (ContextId ) returns ( SliceIdList ) {} + rpc ListSlices (ContextId ) returns ( SliceList ) {} + rpc GetSlice (SliceId ) returns ( Slice ) {} + rpc SetSlice (Slice ) returns ( SliceId ) {} + rpc UnsetSlice (Slice ) returns ( SliceId ) {} + rpc RemoveSlice (SliceId ) returns ( Empty ) {} + rpc GetSliceEvents (Empty ) returns (stream SliceEvent ) {} + rpc SelectSlice (SliceFilter ) returns ( SliceList ) {} + + rpc ListConnectionIds (ServiceId ) returns ( ConnectionIdList) {} + rpc ListConnections (ServiceId ) returns ( ConnectionList ) {} + rpc GetConnection (ConnectionId ) returns ( Connection ) {} + rpc SetConnection (Connection ) returns ( ConnectionId ) {} + rpc RemoveConnection (ConnectionId ) returns ( Empty ) {} + rpc GetConnectionEvents(Empty ) returns (stream ConnectionEvent ) {} +} + +// ----- Generic ------------------------------------------------------------------------------------------------------- +message Empty {} + +message Uuid { + string uuid = 1; +} + +enum EventTypeEnum { + EVENTTYPE_UNDEFINED = 0; + EVENTTYPE_CREATE = 1; + EVENTTYPE_UPDATE = 2; + EVENTTYPE_REMOVE = 3; +} + +message Timestamp { + double timestamp = 1; +} + +message Event { + Timestamp timestamp = 1; + EventTypeEnum event_type = 2; +} + +// ----- Context ------------------------------------------------------------------------------------------------------- +message ContextId { + Uuid context_uuid = 1; +} + +message Context { + ContextId context_id = 1; + string name = 2; + repeated TopologyId topology_ids = 3; + repeated ServiceId service_ids = 4; + repeated SliceId slice_ids = 5; + TeraFlowController controller = 6; +} + +message ContextIdList { + repeated ContextId context_ids = 1; +} + +message ContextList { + repeated Context contexts = 1; +} + +message ContextEvent { + Event event = 1; + ContextId context_id = 2; +} + + +// ----- Topology ------------------------------------------------------------------------------------------------------ +message TopologyId { + ContextId context_id = 1; + Uuid topology_uuid = 2; +} + +message Topology { + TopologyId topology_id = 1; + string name = 2; + repeated DeviceId device_ids = 3; + repeated LinkId link_ids = 4; +} + +message TopologyDetails { + TopologyId topology_id = 1; + string name = 2; + repeated Device devices = 3; + repeated Link links = 4; +} + +message TopologyIdList { + repeated TopologyId topology_ids = 1; +} + +message TopologyList { + repeated Topology topologies = 1; +} + +message TopologyEvent { + Event event = 1; + TopologyId topology_id = 2; +} + + +// ----- Device -------------------------------------------------------------------------------------------------------- +message DeviceId { + Uuid device_uuid = 1; +} + +message Device { + DeviceId device_id = 1; + string name = 2; + string device_type = 3; + DeviceConfig device_config = 4; + DeviceOperationalStatusEnum device_operational_status = 5; + repeated DeviceDriverEnum device_drivers = 6; + repeated EndPoint device_endpoints = 7; + repeated Component components = 8; // Used for inventory + DeviceId controller_id = 9; // Identifier of node controlling the actual device +} + +message Component { //Defined previously to this section - Tested OK + Uuid component_uuid = 1; + string name = 2; + string type = 3; + + map attributes = 4; // dict[attr.name => json.dumps(attr.value)] + string parent = 5; +} + +message DeviceConfig { + repeated ConfigRule config_rules = 1; +} + +enum DeviceDriverEnum { + DEVICEDRIVER_UNDEFINED = 0; // also used for emulated + DEVICEDRIVER_OPENCONFIG = 1; + DEVICEDRIVER_TRANSPORT_API = 2; + DEVICEDRIVER_P4 = 3; + DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; + DEVICEDRIVER_ONF_TR_532 = 5; + DEVICEDRIVER_XR = 6; + DEVICEDRIVER_IETF_L2VPN = 7; + DEVICEDRIVER_GNMI_OPENCONFIG = 8; + DEVICEDRIVER_FLEXSCALE = 9; + DEVICEDRIVER_IETF_ACTN = 10; + DEVICEDRIVER_SMARTNIC = 11; +} + +enum DeviceOperationalStatusEnum { + DEVICEOPERATIONALSTATUS_UNDEFINED = 0; + DEVICEOPERATIONALSTATUS_DISABLED = 1; + DEVICEOPERATIONALSTATUS_ENABLED = 2; +} + +message DeviceIdList { + repeated DeviceId device_ids = 1; +} + +message DeviceList { + repeated Device devices = 1; +} + +message DeviceFilter { + DeviceIdList device_ids = 1; + bool include_endpoints = 2; + bool include_config_rules = 3; + bool include_components = 4; +} + +message DeviceEvent { + Event event = 1; + DeviceId device_id = 2; + DeviceConfig device_config = 3; +} + + +// ----- Link ---------------------------------------------------------------------------------------------------------- +message LinkId { + Uuid link_uuid = 1; +} + +message LinkAttributes { + float total_capacity_gbps = 1; + float used_capacity_gbps = 2; +} + +message Link { + LinkId link_id = 1; + string name = 2; + repeated EndPointId link_endpoint_ids = 3; + LinkAttributes attributes = 4; +} + +message LinkIdList { + repeated LinkId link_ids = 1; +} + +message LinkList { + repeated Link links = 1; +} + +message LinkEvent { + Event event = 1; + LinkId link_id = 2; +} + + +// ----- Service ------------------------------------------------------------------------------------------------------- +message ServiceId { + ContextId context_id = 1; + Uuid service_uuid = 2; +} + +message Service { + ServiceId service_id = 1; + string name = 2; + ServiceTypeEnum service_type = 3; + repeated EndPointId service_endpoint_ids = 4; + repeated Constraint service_constraints = 5; + ServiceStatus service_status = 6; + ServiceConfig service_config = 7; + Timestamp timestamp = 8; +} + +enum ServiceTypeEnum { + SERVICETYPE_UNKNOWN = 0; + SERVICETYPE_L3NM = 1; + SERVICETYPE_L2NM = 2; + SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; + SERVICETYPE_TE = 4; + SERVICETYPE_E2E = 5; +} + +enum ServiceStatusEnum { + SERVICESTATUS_UNDEFINED = 0; + SERVICESTATUS_PLANNED = 1; + SERVICESTATUS_ACTIVE = 2; + SERVICESTATUS_UPDATING = 3; + SERVICESTATUS_PENDING_REMOVAL = 4; + SERVICESTATUS_SLA_VIOLATED = 5; +} + +message ServiceStatus { + ServiceStatusEnum service_status = 1; +} + +message ServiceConfig { + repeated ConfigRule config_rules = 1; +} + +message ServiceIdList { + repeated ServiceId service_ids = 1; +} + +message ServiceList { + repeated Service services = 1; +} + +message ServiceFilter { + ServiceIdList service_ids = 1; + bool include_endpoint_ids = 2; + bool include_constraints = 3; + bool include_config_rules = 4; +} + +message ServiceEvent { + Event event = 1; + ServiceId service_id = 2; +} + +// ----- Slice --------------------------------------------------------------------------------------------------------- +message SliceId { + ContextId context_id = 1; + Uuid slice_uuid = 2; +} + +message Slice { + SliceId slice_id = 1; + string name = 2; + repeated EndPointId slice_endpoint_ids = 3; + repeated Constraint slice_constraints = 4; + repeated ServiceId slice_service_ids = 5; + repeated SliceId slice_subslice_ids = 6; + SliceStatus slice_status = 7; + SliceConfig slice_config = 8; + SliceOwner slice_owner = 9; + Timestamp timestamp = 10; +} + +message SliceOwner { + Uuid owner_uuid = 1; + string owner_string = 2; +} + +enum SliceStatusEnum { + SLICESTATUS_UNDEFINED = 0; + SLICESTATUS_PLANNED = 1; + SLICESTATUS_INIT = 2; + SLICESTATUS_ACTIVE = 3; + SLICESTATUS_DEINIT = 4; + SLICESTATUS_SLA_VIOLATED = 5; +} + +message SliceStatus { + SliceStatusEnum slice_status = 1; +} + +message SliceConfig { + repeated ConfigRule config_rules = 1; +} + +message SliceIdList { + repeated SliceId slice_ids = 1; +} + +message SliceList { + repeated Slice slices = 1; +} + +message SliceFilter { + SliceIdList slice_ids = 1; + bool include_endpoint_ids = 2; + bool include_constraints = 3; + bool include_service_ids = 4; + bool include_subslice_ids = 5; + bool include_config_rules = 6; +} + +message SliceEvent { + Event event = 1; + SliceId slice_id = 2; +} + +// ----- Connection ---------------------------------------------------------------------------------------------------- +message ConnectionId { + Uuid connection_uuid = 1; +} + +message ConnectionSettings_L0 { + string lsp_symbolic_name = 1; +} + +message ConnectionSettings_L2 { + string src_mac_address = 1; + string dst_mac_address = 2; + uint32 ether_type = 3; + uint32 vlan_id = 4; + uint32 mpls_label = 5; + uint32 mpls_traffic_class = 6; +} + +message ConnectionSettings_L3 { + string src_ip_address = 1; + string dst_ip_address = 2; + uint32 dscp = 3; + uint32 protocol = 4; + uint32 ttl = 5; +} + +message ConnectionSettings_L4 { + uint32 src_port = 1; + uint32 dst_port = 2; + uint32 tcp_flags = 3; + uint32 ttl = 4; +} + +message ConnectionSettings { + ConnectionSettings_L0 l0 = 1; + ConnectionSettings_L2 l2 = 2; + ConnectionSettings_L3 l3 = 3; + ConnectionSettings_L4 l4 = 4; +} + +message Connection { + ConnectionId connection_id = 1; + ServiceId service_id = 2; + repeated EndPointId path_hops_endpoint_ids = 3; + repeated ServiceId sub_service_ids = 4; + ConnectionSettings settings = 5; +} + +message ConnectionIdList { + repeated ConnectionId connection_ids = 1; +} + +message ConnectionList { + repeated Connection connections = 1; +} + +message ConnectionEvent { + Event event = 1; + ConnectionId connection_id = 2; +} + + +// ----- Endpoint ------------------------------------------------------------------------------------------------------ +message EndPointId { + TopologyId topology_id = 1; + DeviceId device_id = 2; + Uuid endpoint_uuid = 3; +} + +message EndPoint { + EndPointId endpoint_id = 1; + string name = 2; + string endpoint_type = 3; + repeated kpi_sample_types.KpiSampleType kpi_sample_types = 4; + Location endpoint_location = 5; +} + +message EndPointName { + EndPointId endpoint_id = 1; + string device_name = 2; + string endpoint_name = 3; + string endpoint_type = 4; +} + +message EndPointIdList { + repeated EndPointId endpoint_ids = 1; +} + +message EndPointNameList { + repeated EndPointName endpoint_names = 1; +} + + +// ----- Configuration ------------------------------------------------------------------------------------------------- +enum ConfigActionEnum { + CONFIGACTION_UNDEFINED = 0; + CONFIGACTION_SET = 1; + CONFIGACTION_DELETE = 2; +} + +message ConfigRule_Custom { + string resource_key = 1; + string resource_value = 2; +} + +message ConfigRule_ACL { + EndPointId endpoint_id = 1; + acl.AclRuleSet rule_set = 2; +} + +message ConfigRule { + ConfigActionEnum action = 1; + oneof config_rule { + ConfigRule_Custom custom = 2; + ConfigRule_ACL acl = 3; + } +} + + +// ----- Constraint ---------------------------------------------------------------------------------------------------- +enum ConstraintActionEnum { + CONSTRAINTACTION_UNDEFINED = 0; + CONSTRAINTACTION_SET = 1; + CONSTRAINTACTION_DELETE = 2; +} + +message Constraint_Custom { + string constraint_type = 1; + string constraint_value = 2; +} + +message Constraint_Schedule { + float start_timestamp = 1; + float duration_days = 2; +} + +message GPS_Position { + float latitude = 1; + float longitude = 2; +} + +message Location { + oneof location { + string region = 1; + GPS_Position gps_position = 2; + } +} + +message Constraint_EndPointLocation { + EndPointId endpoint_id = 1; + Location location = 2; +} + +message Constraint_EndPointPriority { + EndPointId endpoint_id = 1; + uint32 priority = 2; +} + +message Constraint_SLA_Latency { + float e2e_latency_ms = 1; +} + +message Constraint_SLA_Capacity { + float capacity_gbps = 1; +} + +message Constraint_SLA_Availability { + uint32 num_disjoint_paths = 1; + bool all_active = 2; + float availability = 3; // 0.0 .. 100.0 percentage of availability +} + +enum IsolationLevelEnum { + NO_ISOLATION = 0; + PHYSICAL_ISOLATION = 1; + LOGICAL_ISOLATION = 2; + PROCESS_ISOLATION = 3; + PHYSICAL_MEMORY_ISOLATION = 4; + PHYSICAL_NETWORK_ISOLATION = 5; + VIRTUAL_RESOURCE_ISOLATION = 6; + NETWORK_FUNCTIONS_ISOLATION = 7; + SERVICE_ISOLATION = 8; +} + +message Constraint_SLA_Isolation_level { + repeated IsolationLevelEnum isolation_level = 1; +} + +message Constraint_Exclusions { + bool is_permanent = 1; + repeated DeviceId device_ids = 2; + repeated EndPointId endpoint_ids = 3; + repeated LinkId link_ids = 4; +} + +message Constraint { + ConstraintActionEnum action = 1; + oneof constraint { + Constraint_Custom custom = 2; + Constraint_Schedule schedule = 3; + Constraint_EndPointLocation endpoint_location = 4; + Constraint_EndPointPriority endpoint_priority = 5; + Constraint_SLA_Capacity sla_capacity = 6; + Constraint_SLA_Latency sla_latency = 7; + Constraint_SLA_Availability sla_availability = 8; + Constraint_SLA_Isolation_level sla_isolation = 9; + Constraint_Exclusions exclusions = 10; + } +} + + +// ----- Miscellaneous ------------------------------------------------------------------------------------------------- +message TeraFlowController { + ContextId context_id = 1; + string ip_address = 2; + uint32 port = 3; +} + +message AuthenticationResult { + ContextId context_id = 1; + bool authenticated = 2; +} diff --git a/src/policy/src/main/proto/context_policy.proto b/src/policy/src/main/proto/context_policy.proto deleted file mode 120000 index d41593dde..000000000 --- a/src/policy/src/main/proto/context_policy.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/context_policy.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/context_policy.proto b/src/policy/src/main/proto/context_policy.proto new file mode 100644 index 000000000..f6dae4830 --- /dev/null +++ b/src/policy/src/main/proto/context_policy.proto @@ -0,0 +1,28 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package context_policy; + +import "context.proto"; +import "policy.proto"; + +// created as a separate service to prevent import-loops in context and policy +service ContextPolicyService { + rpc ListPolicyRuleIds(context.Empty ) returns (policy.PolicyRuleIdList) {} + rpc ListPolicyRules (context.Empty ) returns (policy.PolicyRuleList ) {} + rpc GetPolicyRule (policy.PolicyRuleId ) returns (policy.PolicyRule ) {} + rpc SetPolicyRule (policy.PolicyRule ) returns (policy.PolicyRuleId ) {} + rpc RemovePolicyRule (policy.PolicyRuleId ) returns (context.Empty ) {} +} diff --git a/src/policy/src/main/proto/device.proto b/src/policy/src/main/proto/device.proto deleted file mode 120000 index ad6e7c47e..000000000 --- a/src/policy/src/main/proto/device.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/device.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/device.proto b/src/policy/src/main/proto/device.proto new file mode 100644 index 000000000..30e60079d --- /dev/null +++ b/src/policy/src/main/proto/device.proto @@ -0,0 +1,34 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package device; + +import "context.proto"; +import "monitoring.proto"; + +service DeviceService { + rpc AddDevice (context.Device ) returns (context.DeviceId ) {} + rpc ConfigureDevice (context.Device ) returns (context.DeviceId ) {} + rpc DeleteDevice (context.DeviceId ) returns (context.Empty ) {} + rpc GetInitialConfig(context.DeviceId ) returns (context.DeviceConfig) {} + rpc MonitorDeviceKpi(MonitoringSettings) returns (context.Empty ) {} +} + +message MonitoringSettings { + monitoring.KpiId kpi_id = 1; + monitoring.KpiDescriptor kpi_descriptor = 2; + float sampling_duration_s = 3; + float sampling_interval_s = 4; +} diff --git a/src/policy/src/main/proto/kpi_sample_types.proto b/src/policy/src/main/proto/kpi_sample_types.proto deleted file mode 120000 index 98e748bbf..000000000 --- a/src/policy/src/main/proto/kpi_sample_types.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/kpi_sample_types.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/kpi_sample_types.proto b/src/policy/src/main/proto/kpi_sample_types.proto new file mode 100644 index 000000000..5b234a4e3 --- /dev/null +++ b/src/policy/src/main/proto/kpi_sample_types.proto @@ -0,0 +1,42 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package kpi_sample_types; + +enum KpiSampleType { + KPISAMPLETYPE_UNKNOWN = 0; + + KPISAMPLETYPE_PACKETS_TRANSMITTED = 101; + KPISAMPLETYPE_PACKETS_RECEIVED = 102; + KPISAMPLETYPE_PACKETS_DROPPED = 103; + KPISAMPLETYPE_BYTES_TRANSMITTED = 201; + KPISAMPLETYPE_BYTES_RECEIVED = 202; + KPISAMPLETYPE_BYTES_DROPPED = 203; + + KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS = 301; + KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS = 302; + + KPISAMPLETYPE_ML_CONFIDENCE = 401; //. can be used by both optical and L3 without any issue + + KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501; //. can be used by both optical and L3 without any issue + + KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601; + KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602; + KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603; + KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604; + KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605; + + KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; +} diff --git a/src/policy/src/main/proto/monitoring.proto b/src/policy/src/main/proto/monitoring.proto deleted file mode 120000 index aceaa7328..000000000 --- a/src/policy/src/main/proto/monitoring.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/monitoring.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/monitoring.proto b/src/policy/src/main/proto/monitoring.proto new file mode 100644 index 000000000..45ba48b02 --- /dev/null +++ b/src/policy/src/main/proto/monitoring.proto @@ -0,0 +1,174 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package monitoring; + +import "context.proto"; +import "kpi_sample_types.proto"; + +service MonitoringService { + rpc SetKpi (KpiDescriptor ) returns (KpiId ) {} // Stable not final + rpc DeleteKpi (KpiId ) returns (context.Empty ) {} // Stable and final + rpc GetKpiDescriptor (KpiId ) returns (KpiDescriptor ) {} // Stable and final + rpc GetKpiDescriptorList (context.Empty ) returns (KpiDescriptorList ) {} // Stable and final + rpc IncludeKpi (Kpi ) returns (context.Empty ) {} // Stable and final + rpc MonitorKpi (MonitorKpiRequest ) returns (context.Empty ) {} // Stable and final + rpc QueryKpiData (KpiQuery ) returns (RawKpiTable ) {} // Not implemented + rpc SetKpiSubscription (SubsDescriptor ) returns (stream SubsResponse ) {} // Stable not final + rpc GetSubsDescriptor (SubscriptionID ) returns (SubsDescriptor ) {} // Stable and final + rpc GetSubscriptions (context.Empty ) returns (SubsList ) {} // Stable and final + rpc DeleteSubscription (SubscriptionID ) returns (context.Empty ) {} // Stable and final + rpc SetKpiAlarm (AlarmDescriptor ) returns (AlarmID ) {} // Stable not final + rpc GetAlarms (context.Empty ) returns (AlarmList ) {} // Stable and final + rpc GetAlarmDescriptor (AlarmID ) returns (AlarmDescriptor ) {} // Stable and final + rpc GetAlarmResponseStream(AlarmSubscription ) returns (stream AlarmResponse) {} // Not Stable not final + rpc DeleteAlarm (AlarmID ) returns (context.Empty ) {} // Stable and final + rpc GetStreamKpi (KpiId ) returns (stream Kpi ) {} // Stable not final + rpc GetInstantKpi (KpiId ) returns (Kpi ) {} // Stable not final +} + +message KpiDescriptor { + KpiId kpi_id = 1; + string kpi_description = 2; + repeated KpiId kpi_id_list = 3; + kpi_sample_types.KpiSampleType kpi_sample_type = 4; + context.DeviceId device_id = 5; + context.EndPointId endpoint_id = 6; + context.ServiceId service_id = 7; + context.SliceId slice_id = 8; + context.ConnectionId connection_id = 9; + context.LinkId link_id = 10; +} + +message MonitorKpiRequest { + KpiId kpi_id = 1; + float monitoring_window_s = 2; + float sampling_rate_s = 3; + // Pending add field to reflect Available Device Protocols +} + +message KpiQuery { + repeated KpiId kpi_ids = 1; + float monitoring_window_s = 2; + uint32 last_n_samples = 3; // used when you want something like "get the last N many samples + context.Timestamp start_timestamp = 4; // used when you want something like "get the samples since X date/time" + context.Timestamp end_timestamp = 5; // used when you want something like "get the samples until X date/time" +} + + +message RawKpi { // cell + context.Timestamp timestamp = 1; + KpiValue kpi_value = 2; +} + +message RawKpiList { // column + KpiId kpi_id = 1; + repeated RawKpi raw_kpis = 2; +} + +message RawKpiTable { // table + repeated RawKpiList raw_kpi_lists = 1; +} + +message KpiId { + context.Uuid kpi_id = 1; +} + +message Kpi { + KpiId kpi_id = 1; + context.Timestamp timestamp = 2; + KpiValue kpi_value = 3; +} + +message KpiValueRange { + KpiValue kpiMinValue = 1; + KpiValue kpiMaxValue = 2; + bool inRange = 3; // by default True + bool includeMinValue = 4; // False is outside the interval + bool includeMaxValue = 5; // False is outside the interval +} + +message KpiValue { + oneof value { + int32 int32Val = 1; + uint32 uint32Val = 2; + int64 int64Val = 3; + uint64 uint64Val = 4; + float floatVal = 5; + string stringVal = 6; + bool boolVal = 7; + } +} + + +message KpiList { + repeated Kpi kpi = 1; +} + +message KpiDescriptorList { + repeated KpiDescriptor kpi_descriptor_list = 1; +} + +message SubsDescriptor{ + SubscriptionID subs_id = 1; + KpiId kpi_id = 2; + float sampling_duration_s = 3; + float sampling_interval_s = 4; + context.Timestamp start_timestamp = 5; // used when you want something like "get the samples since X date/time" + context.Timestamp end_timestamp = 6; // used when you want something like "get the samples until X date/time" + // Pending add field to reflect Available Device Protocols +} + +message SubscriptionID { + context.Uuid subs_id = 1; +} + +message SubsResponse { + SubscriptionID subs_id = 1; + KpiList kpi_list = 2; +} + +message SubsList { + repeated SubsDescriptor subs_descriptor = 1; +} + +message AlarmDescriptor { + AlarmID alarm_id = 1; + string alarm_description = 2; + string name = 3; + KpiId kpi_id = 4; + KpiValueRange kpi_value_range = 5; + context.Timestamp timestamp = 6; +} + +message AlarmID{ + context.Uuid alarm_id = 1; +} + +message AlarmSubscription{ + AlarmID alarm_id = 1; + float subscription_timeout_s = 2; + float subscription_frequency_ms = 3; +} + +message AlarmResponse { + AlarmID alarm_id = 1; + string text = 2; + KpiList kpi_list = 3; +} + +message AlarmList { + repeated AlarmDescriptor alarm_descriptor = 1; +} diff --git a/src/policy/src/main/proto/policy.proto b/src/policy/src/main/proto/policy.proto deleted file mode 120000 index df455f961..000000000 --- a/src/policy/src/main/proto/policy.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/policy.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/policy.proto b/src/policy/src/main/proto/policy.proto new file mode 100644 index 000000000..a6f160150 --- /dev/null +++ b/src/policy/src/main/proto/policy.proto @@ -0,0 +1,113 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package policy; + +import "context.proto"; +import "policy_condition.proto"; +import "policy_action.proto"; + +service PolicyService { + rpc PolicyAddService (PolicyRuleService) returns (PolicyRuleState) {} + rpc PolicyAddDevice (PolicyRuleDevice) returns (PolicyRuleState) {} + rpc PolicyUpdateService (PolicyRuleService) returns (PolicyRuleState) {} + rpc PolicyUpdateDevice (PolicyRuleDevice) returns (PolicyRuleState) {} + rpc PolicyDelete (PolicyRuleId) returns (PolicyRuleState) {} + rpc GetPolicyService (PolicyRuleId) returns (PolicyRuleService) {} + rpc GetPolicyDevice (PolicyRuleId) returns (PolicyRuleDevice) {} + rpc GetPolicyByServiceId (context.ServiceId) returns (PolicyRuleServiceList) {} +} + +enum PolicyRuleStateEnum { + POLICY_UNDEFINED = 0; // Undefined rule state + POLICY_FAILED = 1; // Rule failed + POLICY_INSERTED = 2; // Rule is just inserted + POLICY_VALIDATED = 3; // Rule content is correct + POLICY_PROVISIONED = 4; // Rule subscribed to Monitoring + POLICY_ACTIVE = 5; // Rule is currently active (alarm is just thrown by Monitoring) + POLICY_ENFORCED = 6; // Rule action is successfully enforced + POLICY_INEFFECTIVE = 7; // The applied rule action did not work as expected + POLICY_EFFECTIVE = 8; // The applied rule action did work as expected + POLICY_UPDATED = 9; // Operator requires a policy to change + POLICY_REMOVED = 10; // Operator requires to remove a policy +} + +message PolicyRuleId { + context.Uuid uuid = 1; +} + +message PolicyRuleState { + PolicyRuleStateEnum policyRuleState = 1; + string policyRuleStateMessage = 2; +} + +// Basic policy rule attributes +message PolicyRuleBasic { + PolicyRuleId policyRuleId = 1; + PolicyRuleState policyRuleState = 2; //policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default. + uint32 priority = 3; + + // Event-Condition-Action (ECA) model + repeated PolicyRuleCondition conditionList = 4; // When these policy conditions are met, an event is automatically thrown + BooleanOperator booleanOperator = 5; // Evaluation operator to be used + repeated PolicyRuleAction actionList = 6; // One or more actions should be applied +} + +// Service-oriented policy rule +message PolicyRuleService { + // Basic policy rule attributes + PolicyRuleBasic policyRuleBasic = 1; + + // Affected service and (some of) its device(s) + context.ServiceId serviceId = 2; + repeated context.DeviceId deviceList = 3; // List of devices this service is traversing (not exhaustive) +} + +// Device-oriented policy rule +message PolicyRuleDevice { + // Basic policy rule attributes + PolicyRuleBasic policyRuleBasic = 1; + + // Affected device(s) + repeated context.DeviceId deviceList = 2; +} + +// Wrapper policy rule object +message PolicyRule { + oneof policy_rule { + PolicyRuleService service = 1; + PolicyRuleDevice device = 2; + } +} + +// A list of policy rule IDs +message PolicyRuleIdList { + repeated PolicyRuleId policyRuleIdList = 1; +} + +// A list of service-oriented policy rules +message PolicyRuleServiceList { + repeated PolicyRuleService policyRuleServiceList = 1; +} + +// A list of device-oriented policy rules +message PolicyRuleDeviceList { + repeated PolicyRuleDevice policyRuleDeviceList = 1; +} + +// A list of policy rules +message PolicyRuleList { + repeated PolicyRule policyRules = 1; +} diff --git a/src/policy/src/main/proto/policy_action.proto b/src/policy/src/main/proto/policy_action.proto deleted file mode 120000 index 63dcef3d2..000000000 --- a/src/policy/src/main/proto/policy_action.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/policy_action.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/policy_action.proto b/src/policy/src/main/proto/policy_action.proto new file mode 100644 index 000000000..d547e9779 --- /dev/null +++ b/src/policy/src/main/proto/policy_action.proto @@ -0,0 +1,42 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package policy; + +// Action +message PolicyRuleAction { + PolicyRuleActionEnum action = 1; + repeated PolicyRuleActionConfig action_config = 2; +} + +enum PolicyRuleActionEnum { + POLICYRULE_ACTION_NO_ACTION = 0; + POLICYRULE_ACTION_SET_DEVICE_STATUS = 1; + POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE = 2; + POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT = 3; + POLICY_RULE_ACTION_CALL_SERVICE_RPC = 4; + POLICY_RULE_ACTION_RECALCULATE_PATH = 5; +} + +// Action configuration +message PolicyRuleActionConfig { + string action_key = 1; + string action_value = 2; +} + +// message PolicyRuleAction { +// PolicyRuleActionEnum action = 1; +// repeated string parameters = 2; +// } diff --git a/src/policy/src/main/proto/policy_condition.proto b/src/policy/src/main/proto/policy_condition.proto deleted file mode 120000 index 31f7d9d10..000000000 --- a/src/policy/src/main/proto/policy_condition.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/policy_condition.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/policy_condition.proto b/src/policy/src/main/proto/policy_condition.proto new file mode 100644 index 000000000..2037af93c --- /dev/null +++ b/src/policy/src/main/proto/policy_condition.proto @@ -0,0 +1,43 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package policy; + +import "monitoring.proto"; + +// Condition +message PolicyRuleCondition { + monitoring.KpiId kpiId = 1; + NumericalOperator numericalOperator = 2; + monitoring.KpiValue kpiValue = 3; +} + +// Operator to be used when comparing Kpis with condition values +enum NumericalOperator { + POLICYRULE_CONDITION_NUMERICAL_UNDEFINED = 0; // Kpi numerical operator undefined + POLICYRULE_CONDITION_NUMERICAL_EQUAL = 1; // Kpi is equal with value + POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL = 2; // Kpi is not equal with value + POLICYRULE_CONDITION_NUMERICAL_LESS_THAN = 3; // Kpi is less than value + POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL = 4; // Kpi is less than or equal with value + POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN = 5; // Kpi is greater than value + POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL = 6; // Kpi is less than or equal with value +} + +// Operator to be used when evaluating each condition +enum BooleanOperator { + POLICYRULE_CONDITION_BOOLEAN_UNDEFINED = 0; // Boolean operator undefined + POLICYRULE_CONDITION_BOOLEAN_AND = 1; // Boolean AND operator + POLICYRULE_CONDITION_BOOLEAN_OR = 2; // Boolean OR operator +} \ No newline at end of file diff --git a/src/policy/src/main/proto/service.proto b/src/policy/src/main/proto/service.proto deleted file mode 120000 index 5ca543da0..000000000 --- a/src/policy/src/main/proto/service.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/service.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/service.proto b/src/policy/src/main/proto/service.proto new file mode 100644 index 000000000..658859e3c --- /dev/null +++ b/src/policy/src/main/proto/service.proto @@ -0,0 +1,25 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package service; + +import "context.proto"; + +service ServiceService { + rpc CreateService (context.Service ) returns (context.ServiceId) {} + rpc UpdateService (context.Service ) returns (context.ServiceId) {} + rpc DeleteService (context.ServiceId) returns (context.Empty ) {} + rpc RecomputeConnections(context.Service ) returns (context.Empty ) {} +} diff --git a/src/service/service/service_handler_api/FilterFields.py b/src/service/service/service_handler_api/FilterFields.py index e771e24f1..e985fe292 100644 --- a/src/service/service/service_handler_api/FilterFields.py +++ b/src/service/service/service_handler_api/FilterFields.py @@ -40,6 +40,7 @@ DEVICE_DRIVER_VALUES = { DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG, DeviceDriverEnum.DEVICEDRIVER_FLEXSCALE, DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN, + DeviceDriverEnum.DEVICEDRIVER_SMARTNIC } # 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_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index eaf8f715a..61376c0d2 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -94,6 +94,12 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN], } ]), + # (SMARTNIC_ServiceHandler, [ + # { + # FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L2NM, + # FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_SMARTNIC], + # } + # ]), (E2EOrchestratorServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_E2E, diff --git a/src/webui/service/device/forms.py b/src/webui/service/device/forms.py index 4c04bbfe1..af5ac4564 100644 --- a/src/webui/service/device/forms.py +++ b/src/webui/service/device/forms.py @@ -33,6 +33,7 @@ class AddDeviceForm(FlaskForm): device_drivers_gnmi_openconfig = BooleanField('GNMI OPENCONFIG') device_drivers_flexscale = BooleanField('FLEXSCALE') device_drivers_ietf_actn = BooleanField('IETF ACTN') + device_drivers_smartnic = BooleanField('SMARTNIC') 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)]) diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py index 8b8bc236a..8aaaafccf 100644 --- a/src/webui/service/device/routes.py +++ b/src/webui/service/device/routes.py @@ -127,6 +127,8 @@ def add(): device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG) if form.device_drivers_flexscale.data: device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_FLEXSCALE) + if form.device_drivers_smartnic.data: + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_SMARTNIC) if form.device_drivers_ietf_actn.data: device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN) device_obj.device_drivers.extend(device_drivers) # pylint: disable=no-member diff --git a/src/webui/service/templates/device/add.html b/src/webui/service/templates/device/add.html index c4d7f1685..484bc30bf 100644 --- a/src/webui/service/templates/device/add.html +++ b/src/webui/service/templates/device/add.html @@ -95,6 +95,7 @@
{{ form.device_drivers_flexscale }} {{ form.device_drivers_flexscale.label(class="col-sm-3 col-form-label") }} {{ form.device_drivers_ietf_actn }} {{ form.device_drivers_ietf_actn.label(class="col-sm-3 col-form-label") }} + {{ form.device_drivers_smartnic }} {{ form.device_drivers_smartnic_actn.label(class="col-sm-3 col-form-label") }} {% endif %} diff --git a/src/ztp/Dockerfile b/src/ztp/Dockerfile deleted file mode 120000 index eec732273..000000000 --- a/src/ztp/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -src/main/docker/Dockerfile.multistage.jvm \ No newline at end of file diff --git a/src/ztp/Dockerfile b/src/ztp/Dockerfile new file mode 100644 index 000000000..43fef96b4 --- /dev/null +++ b/src/ztp/Dockerfile @@ -0,0 +1,67 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Multi-stage Docker image build + +# Stage 1 +FROM maven:3-jdk-11 AS builder + +# Define working directory +WORKDIR /app + +# Copy every file in working directory, as defined in .dockerignore file +COPY ./pom.xml pom.xml +COPY ./src src/ +COPY ./target/generated-sources/ target/generated-sources/ +RUN mvn --errors --batch-mode package -Dmaven.test.skip=true + +# Stage 2 +FROM builder AS unit-test + +RUN mvn --errors --batch-mode -Pgenerate-consolidated-coverage verify + +# Stage 3 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4 AS release + +ARG JAVA_PACKAGE=java-11-openjdk-headless +ARG RUN_JAVA_VERSION=1.3.8 +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' +# Install java and the run-java script +# Also set up permissions for user `1001` +RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ + && microdnf update \ + && microdnf clean all \ + && mkdir /deployments \ + && chown 1001 /deployments \ + && chmod "g+rwX" /deployments \ + && chown 1001:root /deployments \ + && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \ + && chown 1001 /deployments/run-java.sh \ + && chmod 540 /deployments/run-java.sh \ + && echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/conf/security/java.security + +# Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size. +ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +# We make four distinct layers so if there are application changes the library layers can be re-used +COPY --from=builder --chown=1001 /app/target/quarkus-app/lib/ /deployments/lib/ +COPY --from=builder --chown=1001 /app/target/quarkus-app/*.jar /deployments/ +COPY --from=builder --chown=1001 /app/target/quarkus-app/app/ /deployments/app/ +COPY --from=builder --chown=1001 /app/target/quarkus-app/quarkus/ /deployments/quarkus/ + +EXPOSE 8080 +EXPOSE 5050 +USER 1001 + +ENTRYPOINT [ "/deployments/run-java.sh" ] + diff --git a/src/ztp/src/main/proto/acl.proto b/src/ztp/src/main/proto/acl.proto deleted file mode 120000 index 158ae78eb..000000000 --- a/src/ztp/src/main/proto/acl.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/acl.proto \ No newline at end of file diff --git a/src/ztp/src/main/proto/acl.proto b/src/ztp/src/main/proto/acl.proto new file mode 100644 index 000000000..3dba735dc --- /dev/null +++ b/src/ztp/src/main/proto/acl.proto @@ -0,0 +1,69 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package acl; + +enum AclRuleTypeEnum { + ACLRULETYPE_UNDEFINED = 0; + ACLRULETYPE_IPV4 = 1; + ACLRULETYPE_IPV6 = 2; + ACLRULETYPE_L2 = 3; + ACLRULETYPE_MPLS = 4; + ACLRULETYPE_MIXED = 5; +} + +enum AclForwardActionEnum { + ACLFORWARDINGACTION_UNDEFINED = 0; + ACLFORWARDINGACTION_DROP = 1; + ACLFORWARDINGACTION_ACCEPT = 2; + ACLFORWARDINGACTION_REJECT = 3; +} + +enum AclLogActionEnum { + ACLLOGACTION_UNDEFINED = 0; + ACLLOGACTION_NOLOG = 1; + ACLLOGACTION_SYSLOG = 2; +} + +message AclMatch { + uint32 dscp = 1; + uint32 protocol = 2; + string src_address = 3; + string dst_address = 4; + uint32 src_port = 5; + uint32 dst_port = 6; + uint32 start_mpls_label = 7; + uint32 end_mpls_label = 8; +} + +message AclAction { + AclForwardActionEnum forward_action = 1; + AclLogActionEnum log_action = 2; +} + +message AclEntry { + uint32 sequence_id = 1; + string description = 2; + AclMatch match = 3; + AclAction action = 4; +} + +message AclRuleSet { + string name = 1; + AclRuleTypeEnum type = 2; + string description = 3; + string user_id = 4; + repeated AclEntry entries = 5; +} diff --git a/src/ztp/src/main/proto/context.proto b/src/ztp/src/main/proto/context.proto deleted file mode 120000 index 7f33c4bc7..000000000 --- a/src/ztp/src/main/proto/context.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/context.proto \ No newline at end of file diff --git a/src/ztp/src/main/proto/context.proto b/src/ztp/src/main/proto/context.proto new file mode 100644 index 000000000..fce1e71ad --- /dev/null +++ b/src/ztp/src/main/proto/context.proto @@ -0,0 +1,615 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package context; + +import "acl.proto"; +import "kpi_sample_types.proto"; + +service ContextService { + rpc ListContextIds (Empty ) returns ( ContextIdList ) {} + rpc ListContexts (Empty ) returns ( ContextList ) {} + rpc GetContext (ContextId ) returns ( Context ) {} + rpc SetContext (Context ) returns ( ContextId ) {} + rpc RemoveContext (ContextId ) returns ( Empty ) {} + rpc GetContextEvents (Empty ) returns (stream ContextEvent ) {} + + rpc ListTopologyIds (ContextId ) returns ( TopologyIdList ) {} + rpc ListTopologies (ContextId ) returns ( TopologyList ) {} + rpc GetTopology (TopologyId ) returns ( Topology ) {} + rpc GetTopologyDetails (TopologyId ) returns ( TopologyDetails ) {} + rpc SetTopology (Topology ) returns ( TopologyId ) {} + rpc RemoveTopology (TopologyId ) returns ( Empty ) {} + rpc GetTopologyEvents (Empty ) returns (stream TopologyEvent ) {} + + rpc ListDeviceIds (Empty ) returns ( DeviceIdList ) {} + rpc ListDevices (Empty ) returns ( DeviceList ) {} + rpc GetDevice (DeviceId ) returns ( Device ) {} + rpc SetDevice (Device ) returns ( DeviceId ) {} + rpc RemoveDevice (DeviceId ) returns ( Empty ) {} + rpc GetDeviceEvents (Empty ) returns (stream DeviceEvent ) {} + rpc SelectDevice (DeviceFilter ) returns ( DeviceList ) {} + rpc ListEndPointNames (EndPointIdList) returns ( EndPointNameList) {} + + rpc ListLinkIds (Empty ) returns ( LinkIdList ) {} + rpc ListLinks (Empty ) returns ( LinkList ) {} + rpc GetLink (LinkId ) returns ( Link ) {} + rpc SetLink (Link ) returns ( LinkId ) {} + rpc RemoveLink (LinkId ) returns ( Empty ) {} + rpc GetLinkEvents (Empty ) returns (stream LinkEvent ) {} + + rpc ListServiceIds (ContextId ) returns ( ServiceIdList ) {} + rpc ListServices (ContextId ) returns ( ServiceList ) {} + rpc GetService (ServiceId ) returns ( Service ) {} + rpc SetService (Service ) returns ( ServiceId ) {} + rpc UnsetService (Service ) returns ( ServiceId ) {} + rpc RemoveService (ServiceId ) returns ( Empty ) {} + rpc GetServiceEvents (Empty ) returns (stream ServiceEvent ) {} + rpc SelectService (ServiceFilter ) returns ( ServiceList ) {} + + rpc ListSliceIds (ContextId ) returns ( SliceIdList ) {} + rpc ListSlices (ContextId ) returns ( SliceList ) {} + rpc GetSlice (SliceId ) returns ( Slice ) {} + rpc SetSlice (Slice ) returns ( SliceId ) {} + rpc UnsetSlice (Slice ) returns ( SliceId ) {} + rpc RemoveSlice (SliceId ) returns ( Empty ) {} + rpc GetSliceEvents (Empty ) returns (stream SliceEvent ) {} + rpc SelectSlice (SliceFilter ) returns ( SliceList ) {} + + rpc ListConnectionIds (ServiceId ) returns ( ConnectionIdList) {} + rpc ListConnections (ServiceId ) returns ( ConnectionList ) {} + rpc GetConnection (ConnectionId ) returns ( Connection ) {} + rpc SetConnection (Connection ) returns ( ConnectionId ) {} + rpc RemoveConnection (ConnectionId ) returns ( Empty ) {} + rpc GetConnectionEvents(Empty ) returns (stream ConnectionEvent ) {} +} + +// ----- Generic ------------------------------------------------------------------------------------------------------- +message Empty {} + +message Uuid { + string uuid = 1; +} + +enum EventTypeEnum { + EVENTTYPE_UNDEFINED = 0; + EVENTTYPE_CREATE = 1; + EVENTTYPE_UPDATE = 2; + EVENTTYPE_REMOVE = 3; +} + +message Timestamp { + double timestamp = 1; +} + +message Event { + Timestamp timestamp = 1; + EventTypeEnum event_type = 2; +} + +// ----- Context ------------------------------------------------------------------------------------------------------- +message ContextId { + Uuid context_uuid = 1; +} + +message Context { + ContextId context_id = 1; + string name = 2; + repeated TopologyId topology_ids = 3; + repeated ServiceId service_ids = 4; + repeated SliceId slice_ids = 5; + TeraFlowController controller = 6; +} + +message ContextIdList { + repeated ContextId context_ids = 1; +} + +message ContextList { + repeated Context contexts = 1; +} + +message ContextEvent { + Event event = 1; + ContextId context_id = 2; +} + + +// ----- Topology ------------------------------------------------------------------------------------------------------ +message TopologyId { + ContextId context_id = 1; + Uuid topology_uuid = 2; +} + +message Topology { + TopologyId topology_id = 1; + string name = 2; + repeated DeviceId device_ids = 3; + repeated LinkId link_ids = 4; +} + +message TopologyDetails { + TopologyId topology_id = 1; + string name = 2; + repeated Device devices = 3; + repeated Link links = 4; +} + +message TopologyIdList { + repeated TopologyId topology_ids = 1; +} + +message TopologyList { + repeated Topology topologies = 1; +} + +message TopologyEvent { + Event event = 1; + TopologyId topology_id = 2; +} + + +// ----- Device -------------------------------------------------------------------------------------------------------- +message DeviceId { + Uuid device_uuid = 1; +} + +message Device { + DeviceId device_id = 1; + string name = 2; + string device_type = 3; + DeviceConfig device_config = 4; + DeviceOperationalStatusEnum device_operational_status = 5; + repeated DeviceDriverEnum device_drivers = 6; + repeated EndPoint device_endpoints = 7; + repeated Component components = 8; // Used for inventory + DeviceId controller_id = 9; // Identifier of node controlling the actual device +} + +message Component { //Defined previously to this section - Tested OK + Uuid component_uuid = 1; + string name = 2; + string type = 3; + + map attributes = 4; // dict[attr.name => json.dumps(attr.value)] + string parent = 5; +} + +message DeviceConfig { + repeated ConfigRule config_rules = 1; +} + +enum DeviceDriverEnum { + DEVICEDRIVER_UNDEFINED = 0; // also used for emulated + DEVICEDRIVER_OPENCONFIG = 1; + DEVICEDRIVER_TRANSPORT_API = 2; + DEVICEDRIVER_P4 = 3; + DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; + DEVICEDRIVER_ONF_TR_532 = 5; + DEVICEDRIVER_XR = 6; + DEVICEDRIVER_IETF_L2VPN = 7; + DEVICEDRIVER_GNMI_OPENCONFIG = 8; + DEVICEDRIVER_FLEXSCALE = 9; + DEVICEDRIVER_IETF_ACTN = 10; + DEVICEDRIVER_SMARTNIC = 11; +} + +enum DeviceOperationalStatusEnum { + DEVICEOPERATIONALSTATUS_UNDEFINED = 0; + DEVICEOPERATIONALSTATUS_DISABLED = 1; + DEVICEOPERATIONALSTATUS_ENABLED = 2; +} + +message DeviceIdList { + repeated DeviceId device_ids = 1; +} + +message DeviceList { + repeated Device devices = 1; +} + +message DeviceFilter { + DeviceIdList device_ids = 1; + bool include_endpoints = 2; + bool include_config_rules = 3; + bool include_components = 4; +} + +message DeviceEvent { + Event event = 1; + DeviceId device_id = 2; + DeviceConfig device_config = 3; +} + + +// ----- Link ---------------------------------------------------------------------------------------------------------- +message LinkId { + Uuid link_uuid = 1; +} + +message LinkAttributes { + float total_capacity_gbps = 1; + float used_capacity_gbps = 2; +} + +message Link { + LinkId link_id = 1; + string name = 2; + repeated EndPointId link_endpoint_ids = 3; + LinkAttributes attributes = 4; +} + +message LinkIdList { + repeated LinkId link_ids = 1; +} + +message LinkList { + repeated Link links = 1; +} + +message LinkEvent { + Event event = 1; + LinkId link_id = 2; +} + + +// ----- Service ------------------------------------------------------------------------------------------------------- +message ServiceId { + ContextId context_id = 1; + Uuid service_uuid = 2; +} + +message Service { + ServiceId service_id = 1; + string name = 2; + ServiceTypeEnum service_type = 3; + repeated EndPointId service_endpoint_ids = 4; + repeated Constraint service_constraints = 5; + ServiceStatus service_status = 6; + ServiceConfig service_config = 7; + Timestamp timestamp = 8; +} + +enum ServiceTypeEnum { + SERVICETYPE_UNKNOWN = 0; + SERVICETYPE_L3NM = 1; + SERVICETYPE_L2NM = 2; + SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; + SERVICETYPE_TE = 4; + SERVICETYPE_E2E = 5; +} + +enum ServiceStatusEnum { + SERVICESTATUS_UNDEFINED = 0; + SERVICESTATUS_PLANNED = 1; + SERVICESTATUS_ACTIVE = 2; + SERVICESTATUS_UPDATING = 3; + SERVICESTATUS_PENDING_REMOVAL = 4; + SERVICESTATUS_SLA_VIOLATED = 5; +} + +message ServiceStatus { + ServiceStatusEnum service_status = 1; +} + +message ServiceConfig { + repeated ConfigRule config_rules = 1; +} + +message ServiceIdList { + repeated ServiceId service_ids = 1; +} + +message ServiceList { + repeated Service services = 1; +} + +message ServiceFilter { + ServiceIdList service_ids = 1; + bool include_endpoint_ids = 2; + bool include_constraints = 3; + bool include_config_rules = 4; +} + +message ServiceEvent { + Event event = 1; + ServiceId service_id = 2; +} + +// ----- Slice --------------------------------------------------------------------------------------------------------- +message SliceId { + ContextId context_id = 1; + Uuid slice_uuid = 2; +} + +message Slice { + SliceId slice_id = 1; + string name = 2; + repeated EndPointId slice_endpoint_ids = 3; + repeated Constraint slice_constraints = 4; + repeated ServiceId slice_service_ids = 5; + repeated SliceId slice_subslice_ids = 6; + SliceStatus slice_status = 7; + SliceConfig slice_config = 8; + SliceOwner slice_owner = 9; + Timestamp timestamp = 10; +} + +message SliceOwner { + Uuid owner_uuid = 1; + string owner_string = 2; +} + +enum SliceStatusEnum { + SLICESTATUS_UNDEFINED = 0; + SLICESTATUS_PLANNED = 1; + SLICESTATUS_INIT = 2; + SLICESTATUS_ACTIVE = 3; + SLICESTATUS_DEINIT = 4; + SLICESTATUS_SLA_VIOLATED = 5; +} + +message SliceStatus { + SliceStatusEnum slice_status = 1; +} + +message SliceConfig { + repeated ConfigRule config_rules = 1; +} + +message SliceIdList { + repeated SliceId slice_ids = 1; +} + +message SliceList { + repeated Slice slices = 1; +} + +message SliceFilter { + SliceIdList slice_ids = 1; + bool include_endpoint_ids = 2; + bool include_constraints = 3; + bool include_service_ids = 4; + bool include_subslice_ids = 5; + bool include_config_rules = 6; +} + +message SliceEvent { + Event event = 1; + SliceId slice_id = 2; +} + +// ----- Connection ---------------------------------------------------------------------------------------------------- +message ConnectionId { + Uuid connection_uuid = 1; +} + +message ConnectionSettings_L0 { + string lsp_symbolic_name = 1; +} + +message ConnectionSettings_L2 { + string src_mac_address = 1; + string dst_mac_address = 2; + uint32 ether_type = 3; + uint32 vlan_id = 4; + uint32 mpls_label = 5; + uint32 mpls_traffic_class = 6; +} + +message ConnectionSettings_L3 { + string src_ip_address = 1; + string dst_ip_address = 2; + uint32 dscp = 3; + uint32 protocol = 4; + uint32 ttl = 5; +} + +message ConnectionSettings_L4 { + uint32 src_port = 1; + uint32 dst_port = 2; + uint32 tcp_flags = 3; + uint32 ttl = 4; +} + +message ConnectionSettings { + ConnectionSettings_L0 l0 = 1; + ConnectionSettings_L2 l2 = 2; + ConnectionSettings_L3 l3 = 3; + ConnectionSettings_L4 l4 = 4; +} + +message Connection { + ConnectionId connection_id = 1; + ServiceId service_id = 2; + repeated EndPointId path_hops_endpoint_ids = 3; + repeated ServiceId sub_service_ids = 4; + ConnectionSettings settings = 5; +} + +message ConnectionIdList { + repeated ConnectionId connection_ids = 1; +} + +message ConnectionList { + repeated Connection connections = 1; +} + +message ConnectionEvent { + Event event = 1; + ConnectionId connection_id = 2; +} + + +// ----- Endpoint ------------------------------------------------------------------------------------------------------ +message EndPointId { + TopologyId topology_id = 1; + DeviceId device_id = 2; + Uuid endpoint_uuid = 3; +} + +message EndPoint { + EndPointId endpoint_id = 1; + string name = 2; + string endpoint_type = 3; + repeated kpi_sample_types.KpiSampleType kpi_sample_types = 4; + Location endpoint_location = 5; +} + +message EndPointName { + EndPointId endpoint_id = 1; + string device_name = 2; + string endpoint_name = 3; + string endpoint_type = 4; +} + +message EndPointIdList { + repeated EndPointId endpoint_ids = 1; +} + +message EndPointNameList { + repeated EndPointName endpoint_names = 1; +} + + +// ----- Configuration ------------------------------------------------------------------------------------------------- +enum ConfigActionEnum { + CONFIGACTION_UNDEFINED = 0; + CONFIGACTION_SET = 1; + CONFIGACTION_DELETE = 2; +} + +message ConfigRule_Custom { + string resource_key = 1; + string resource_value = 2; +} + +message ConfigRule_ACL { + EndPointId endpoint_id = 1; + acl.AclRuleSet rule_set = 2; +} + +message ConfigRule { + ConfigActionEnum action = 1; + oneof config_rule { + ConfigRule_Custom custom = 2; + ConfigRule_ACL acl = 3; + } +} + + +// ----- Constraint ---------------------------------------------------------------------------------------------------- +enum ConstraintActionEnum { + CONSTRAINTACTION_UNDEFINED = 0; + CONSTRAINTACTION_SET = 1; + CONSTRAINTACTION_DELETE = 2; +} + +message Constraint_Custom { + string constraint_type = 1; + string constraint_value = 2; +} + +message Constraint_Schedule { + float start_timestamp = 1; + float duration_days = 2; +} + +message GPS_Position { + float latitude = 1; + float longitude = 2; +} + +message Location { + oneof location { + string region = 1; + GPS_Position gps_position = 2; + } +} + +message Constraint_EndPointLocation { + EndPointId endpoint_id = 1; + Location location = 2; +} + +message Constraint_EndPointPriority { + EndPointId endpoint_id = 1; + uint32 priority = 2; +} + +message Constraint_SLA_Latency { + float e2e_latency_ms = 1; +} + +message Constraint_SLA_Capacity { + float capacity_gbps = 1; +} + +message Constraint_SLA_Availability { + uint32 num_disjoint_paths = 1; + bool all_active = 2; + float availability = 3; // 0.0 .. 100.0 percentage of availability +} + +enum IsolationLevelEnum { + NO_ISOLATION = 0; + PHYSICAL_ISOLATION = 1; + LOGICAL_ISOLATION = 2; + PROCESS_ISOLATION = 3; + PHYSICAL_MEMORY_ISOLATION = 4; + PHYSICAL_NETWORK_ISOLATION = 5; + VIRTUAL_RESOURCE_ISOLATION = 6; + NETWORK_FUNCTIONS_ISOLATION = 7; + SERVICE_ISOLATION = 8; +} + +message Constraint_SLA_Isolation_level { + repeated IsolationLevelEnum isolation_level = 1; +} + +message Constraint_Exclusions { + bool is_permanent = 1; + repeated DeviceId device_ids = 2; + repeated EndPointId endpoint_ids = 3; + repeated LinkId link_ids = 4; +} + +message Constraint { + ConstraintActionEnum action = 1; + oneof constraint { + Constraint_Custom custom = 2; + Constraint_Schedule schedule = 3; + Constraint_EndPointLocation endpoint_location = 4; + Constraint_EndPointPriority endpoint_priority = 5; + Constraint_SLA_Capacity sla_capacity = 6; + Constraint_SLA_Latency sla_latency = 7; + Constraint_SLA_Availability sla_availability = 8; + Constraint_SLA_Isolation_level sla_isolation = 9; + Constraint_Exclusions exclusions = 10; + } +} + + +// ----- Miscellaneous ------------------------------------------------------------------------------------------------- +message TeraFlowController { + ContextId context_id = 1; + string ip_address = 2; + uint32 port = 3; +} + +message AuthenticationResult { + ContextId context_id = 1; + bool authenticated = 2; +} diff --git a/src/ztp/src/main/proto/device.proto b/src/ztp/src/main/proto/device.proto deleted file mode 120000 index ad6e7c47e..000000000 --- a/src/ztp/src/main/proto/device.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/device.proto \ No newline at end of file diff --git a/src/ztp/src/main/proto/device.proto b/src/ztp/src/main/proto/device.proto new file mode 100644 index 000000000..30e60079d --- /dev/null +++ b/src/ztp/src/main/proto/device.proto @@ -0,0 +1,34 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package device; + +import "context.proto"; +import "monitoring.proto"; + +service DeviceService { + rpc AddDevice (context.Device ) returns (context.DeviceId ) {} + rpc ConfigureDevice (context.Device ) returns (context.DeviceId ) {} + rpc DeleteDevice (context.DeviceId ) returns (context.Empty ) {} + rpc GetInitialConfig(context.DeviceId ) returns (context.DeviceConfig) {} + rpc MonitorDeviceKpi(MonitoringSettings) returns (context.Empty ) {} +} + +message MonitoringSettings { + monitoring.KpiId kpi_id = 1; + monitoring.KpiDescriptor kpi_descriptor = 2; + float sampling_duration_s = 3; + float sampling_interval_s = 4; +} diff --git a/src/ztp/src/main/proto/kpi_sample_types.proto b/src/ztp/src/main/proto/kpi_sample_types.proto deleted file mode 120000 index 98e748bbf..000000000 --- a/src/ztp/src/main/proto/kpi_sample_types.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/kpi_sample_types.proto \ No newline at end of file diff --git a/src/ztp/src/main/proto/kpi_sample_types.proto b/src/ztp/src/main/proto/kpi_sample_types.proto new file mode 100644 index 000000000..5b234a4e3 --- /dev/null +++ b/src/ztp/src/main/proto/kpi_sample_types.proto @@ -0,0 +1,42 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package kpi_sample_types; + +enum KpiSampleType { + KPISAMPLETYPE_UNKNOWN = 0; + + KPISAMPLETYPE_PACKETS_TRANSMITTED = 101; + KPISAMPLETYPE_PACKETS_RECEIVED = 102; + KPISAMPLETYPE_PACKETS_DROPPED = 103; + KPISAMPLETYPE_BYTES_TRANSMITTED = 201; + KPISAMPLETYPE_BYTES_RECEIVED = 202; + KPISAMPLETYPE_BYTES_DROPPED = 203; + + KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS = 301; + KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS = 302; + + KPISAMPLETYPE_ML_CONFIDENCE = 401; //. can be used by both optical and L3 without any issue + + KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501; //. can be used by both optical and L3 without any issue + + KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601; + KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602; + KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603; + KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604; + KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605; + + KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; +} diff --git a/src/ztp/src/main/proto/monitoring.proto b/src/ztp/src/main/proto/monitoring.proto deleted file mode 120000 index aceaa7328..000000000 --- a/src/ztp/src/main/proto/monitoring.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/monitoring.proto \ No newline at end of file diff --git a/src/ztp/src/main/proto/monitoring.proto b/src/ztp/src/main/proto/monitoring.proto new file mode 100644 index 000000000..45ba48b02 --- /dev/null +++ b/src/ztp/src/main/proto/monitoring.proto @@ -0,0 +1,174 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package monitoring; + +import "context.proto"; +import "kpi_sample_types.proto"; + +service MonitoringService { + rpc SetKpi (KpiDescriptor ) returns (KpiId ) {} // Stable not final + rpc DeleteKpi (KpiId ) returns (context.Empty ) {} // Stable and final + rpc GetKpiDescriptor (KpiId ) returns (KpiDescriptor ) {} // Stable and final + rpc GetKpiDescriptorList (context.Empty ) returns (KpiDescriptorList ) {} // Stable and final + rpc IncludeKpi (Kpi ) returns (context.Empty ) {} // Stable and final + rpc MonitorKpi (MonitorKpiRequest ) returns (context.Empty ) {} // Stable and final + rpc QueryKpiData (KpiQuery ) returns (RawKpiTable ) {} // Not implemented + rpc SetKpiSubscription (SubsDescriptor ) returns (stream SubsResponse ) {} // Stable not final + rpc GetSubsDescriptor (SubscriptionID ) returns (SubsDescriptor ) {} // Stable and final + rpc GetSubscriptions (context.Empty ) returns (SubsList ) {} // Stable and final + rpc DeleteSubscription (SubscriptionID ) returns (context.Empty ) {} // Stable and final + rpc SetKpiAlarm (AlarmDescriptor ) returns (AlarmID ) {} // Stable not final + rpc GetAlarms (context.Empty ) returns (AlarmList ) {} // Stable and final + rpc GetAlarmDescriptor (AlarmID ) returns (AlarmDescriptor ) {} // Stable and final + rpc GetAlarmResponseStream(AlarmSubscription ) returns (stream AlarmResponse) {} // Not Stable not final + rpc DeleteAlarm (AlarmID ) returns (context.Empty ) {} // Stable and final + rpc GetStreamKpi (KpiId ) returns (stream Kpi ) {} // Stable not final + rpc GetInstantKpi (KpiId ) returns (Kpi ) {} // Stable not final +} + +message KpiDescriptor { + KpiId kpi_id = 1; + string kpi_description = 2; + repeated KpiId kpi_id_list = 3; + kpi_sample_types.KpiSampleType kpi_sample_type = 4; + context.DeviceId device_id = 5; + context.EndPointId endpoint_id = 6; + context.ServiceId service_id = 7; + context.SliceId slice_id = 8; + context.ConnectionId connection_id = 9; + context.LinkId link_id = 10; +} + +message MonitorKpiRequest { + KpiId kpi_id = 1; + float monitoring_window_s = 2; + float sampling_rate_s = 3; + // Pending add field to reflect Available Device Protocols +} + +message KpiQuery { + repeated KpiId kpi_ids = 1; + float monitoring_window_s = 2; + uint32 last_n_samples = 3; // used when you want something like "get the last N many samples + context.Timestamp start_timestamp = 4; // used when you want something like "get the samples since X date/time" + context.Timestamp end_timestamp = 5; // used when you want something like "get the samples until X date/time" +} + + +message RawKpi { // cell + context.Timestamp timestamp = 1; + KpiValue kpi_value = 2; +} + +message RawKpiList { // column + KpiId kpi_id = 1; + repeated RawKpi raw_kpis = 2; +} + +message RawKpiTable { // table + repeated RawKpiList raw_kpi_lists = 1; +} + +message KpiId { + context.Uuid kpi_id = 1; +} + +message Kpi { + KpiId kpi_id = 1; + context.Timestamp timestamp = 2; + KpiValue kpi_value = 3; +} + +message KpiValueRange { + KpiValue kpiMinValue = 1; + KpiValue kpiMaxValue = 2; + bool inRange = 3; // by default True + bool includeMinValue = 4; // False is outside the interval + bool includeMaxValue = 5; // False is outside the interval +} + +message KpiValue { + oneof value { + int32 int32Val = 1; + uint32 uint32Val = 2; + int64 int64Val = 3; + uint64 uint64Val = 4; + float floatVal = 5; + string stringVal = 6; + bool boolVal = 7; + } +} + + +message KpiList { + repeated Kpi kpi = 1; +} + +message KpiDescriptorList { + repeated KpiDescriptor kpi_descriptor_list = 1; +} + +message SubsDescriptor{ + SubscriptionID subs_id = 1; + KpiId kpi_id = 2; + float sampling_duration_s = 3; + float sampling_interval_s = 4; + context.Timestamp start_timestamp = 5; // used when you want something like "get the samples since X date/time" + context.Timestamp end_timestamp = 6; // used when you want something like "get the samples until X date/time" + // Pending add field to reflect Available Device Protocols +} + +message SubscriptionID { + context.Uuid subs_id = 1; +} + +message SubsResponse { + SubscriptionID subs_id = 1; + KpiList kpi_list = 2; +} + +message SubsList { + repeated SubsDescriptor subs_descriptor = 1; +} + +message AlarmDescriptor { + AlarmID alarm_id = 1; + string alarm_description = 2; + string name = 3; + KpiId kpi_id = 4; + KpiValueRange kpi_value_range = 5; + context.Timestamp timestamp = 6; +} + +message AlarmID{ + context.Uuid alarm_id = 1; +} + +message AlarmSubscription{ + AlarmID alarm_id = 1; + float subscription_timeout_s = 2; + float subscription_frequency_ms = 3; +} + +message AlarmResponse { + AlarmID alarm_id = 1; + string text = 2; + KpiList kpi_list = 3; +} + +message AlarmList { + repeated AlarmDescriptor alarm_descriptor = 1; +} diff --git a/src/ztp/src/main/proto/ztp.proto b/src/ztp/src/main/proto/ztp.proto deleted file mode 120000 index 9183ce531..000000000 --- a/src/ztp/src/main/proto/ztp.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/ztp.proto \ No newline at end of file diff --git a/src/ztp/src/main/proto/ztp.proto b/src/ztp/src/main/proto/ztp.proto new file mode 100644 index 000000000..5c895900d --- /dev/null +++ b/src/ztp/src/main/proto/ztp.proto @@ -0,0 +1,69 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package ztp; + +import "context.proto"; + +service ZtpService { + rpc ZtpGetDeviceRole(DeviceRoleId) returns (DeviceRole) {} + rpc ZtpGetDeviceRolesByDeviceId(context.DeviceId) returns (DeviceRoleList) {} + rpc ZtpAdd(DeviceRole) returns (DeviceRoleState) {} + rpc ZtpUpdate(DeviceRoleConfig) returns (DeviceRoleState) {} + rpc ZtpDelete(DeviceRole) returns (DeviceRoleState) {} + rpc ZtpDeleteAll(context.Empty) returns (DeviceDeletionResult) {} +} + +enum DeviceRoleType { + NONE = 0; + DEV_OPS = 1; + DEV_CONF = 2; + PIPELINE_CONF = 3; +} + +message DeviceRoleId { + context.Uuid devRoleId = 1; + context.DeviceId devId = 2; +} + +message DeviceRole { + DeviceRoleId devRoleId = 1; + DeviceRoleType devRoleType = 2; +} + +message DeviceRoleConfig { + DeviceRole devRole = 1; + context.DeviceConfig devConfig = 2; +} + +message DeviceRoleList { + repeated DeviceRole devRole = 1; +} + +message DeviceRoleState { + DeviceRoleId devRoleId = 1; + ZtpDeviceState devRoleState = 2; +} + +message DeviceDeletionResult { + repeated string deleted = 1; +} + +enum ZtpDeviceState { + ZTP_DEV_STATE_UNDEFINED = 0; + ZTP_DEV_STATE_CREATED = 1; + ZTP_DEV_STATE_UPDATED = 2; + ZTP_DEV_STATE_DELETED = 3; +} -- GitLab From 87b5aa6f30df31a03fbb7991a2bb51b027179e80 Mon Sep 17 00:00:00 2001 From: carcel Date: Fri, 22 Mar 2024 08:40:38 +0000 Subject: [PATCH 011/463] Update - Morpheus Client Extension --- src/common/tools/object_factory/Device.py | 5 +++-- .../drivers/smartnic/SmartnicDriver.py | 12 +++++++---- src/device/service/drivers/smartnic/Tools.py | 12 +++++++---- .../service/drivers/smartnic/__init__.py | 2 -- .../ietf-yang-types.yang | 0 .../openconfig-extensions.yang | 0 .../openconfig-inet-types.yang | 0 .../openconfig-probes-types.yang | 0 .../openconfig-probes.yang | 0 .../openconfig-types.yang | 0 .../probes-agent.yang | 0 .../references_probes_libraries.txt | 0 .../service/drivers/smartnic_probes/.gitkeep | 0 .../smartnics_probes_agent/.gitkeep | 0 .../nbi_plugins/agent_probes/Resources.py | 21 ++++++++++++------- .../nbi_plugins/agent_probes/Tools.py | 12 +++++++---- 16 files changed, 40 insertions(+), 24 deletions(-) rename src/device/service/drivers/{smartnic_probes => smartnic}/ietf-yang-types.yang (100%) rename src/device/service/drivers/{smartnic_probes => smartnic}/openconfig-extensions.yang (100%) rename src/device/service/drivers/{smartnic_probes => smartnic}/openconfig-inet-types.yang (100%) rename src/device/service/drivers/{smartnic_probes => smartnic}/openconfig-probes-types.yang (100%) rename src/device/service/drivers/{smartnic_probes => smartnic}/openconfig-probes.yang (100%) rename src/device/service/drivers/{smartnic_probes => smartnic}/openconfig-types.yang (100%) rename src/device/service/drivers/{smartnic_probes => smartnic}/probes-agent.yang (100%) rename src/device/service/drivers/{smartnic_probes => smartnic}/references_probes_libraries.txt (100%) delete mode 100644 src/device/service/drivers/smartnic_probes/.gitkeep delete mode 100644 src/device/service/drivers/smartnic_probes/smartnics_probes_agent/.gitkeep diff --git a/src/common/tools/object_factory/Device.py b/src/common/tools/object_factory/Device.py index b3182e302..5a7ff398a 100644 --- a/src/common/tools/object_factory/Device.py +++ b/src/common/tools/object_factory/Device.py @@ -12,12 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -import copy +import copy, logging from typing import Dict, List, Optional, Tuple from common.DeviceTypes import DeviceTypeEnum from common.proto.context_pb2 import DeviceDriverEnum, DeviceOperationalStatusEnum from common.tools.object_factory.ConfigRule import json_config_rule_set +LOGGER = logging.getLogger(__name__) DEVICE_DISABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_DISABLED DEVICE_EMUDC_TYPE = DeviceTypeEnum.EMULATED_DATACENTER.value @@ -62,13 +63,13 @@ def json_device( ): result = { 'device_id' : json_device_id(device_uuid), + 'name' : name, 'device_type' : device_type, 'device_config' : {'config_rules': copy.deepcopy(config_rules)}, 'device_operational_status': status, 'device_drivers' : copy.deepcopy(drivers), 'device_endpoints' : copy.deepcopy(endpoints), } - if name is not None: result['name'] = name return result def json_device_emulated_packet_router_disabled( diff --git a/src/device/service/drivers/smartnic/SmartnicDriver.py b/src/device/service/drivers/smartnic/SmartnicDriver.py index 4bad52db4..f827bbbff 100644 --- a/src/device/service/drivers/smartnic/SmartnicDriver.py +++ b/src/device/service/drivers/smartnic/SmartnicDriver.py @@ -20,8 +20,11 @@ from common.type_checkers.Checkers import chk_string, chk_type from device.service.driver_api._Driver import _Driver from . import ALL_RESOURCE_KEYS from .Tools import create_connectivity_service, find_key, config_getter, delete_connectivity_service +from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string + LOGGER = logging.getLogger(__name__) +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_SERVICES, RESOURCE_INTERFACES DRIVER_NAME = 'smartnic' METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) @@ -75,8 +78,9 @@ class SmartnicDriver(_Driver): for i, resource_key in enumerate(resource_keys): str_resource_name = 'resource_key[#{:d}]'.format(i) chk_string(str_resource_name, resource_key, allow_empty=False) - results.extend(config_getter( - self.__tapi_root, resource_key, timeout=self.__timeout)) + if resource_key == RESOURCE_ENDPOINTS: + results.extend(config_getter( + self.__tapi_root, resource_key, timeout=self.__timeout)) return results @metered_subclass_method(METRICS_POOL) @@ -87,9 +91,9 @@ class SmartnicDriver(_Driver): with self.__lock: for resource in resources: LOGGER.info('resource = {:s}'.format(str(resource))) - config_rules = find_key(resource, 'config_rules') + #config_rules = find_key(resource, 'config_rules') data = create_connectivity_service( - self.__tapi_root, config_rules, timeout=self.__timeout) + self.__tapi_root, resource[1], timeout=self.__timeout) results.extend(data) return results diff --git a/src/device/service/drivers/smartnic/Tools.py b/src/device/service/drivers/smartnic/Tools.py index 54961bbdd..bd155441c 100644 --- a/src/device/service/drivers/smartnic/Tools.py +++ b/src/device/service/drivers/smartnic/Tools.py @@ -50,6 +50,11 @@ def config_getter( result = [] try: response = requests.get(url, timeout=timeout, verify=False) + data = response.json() + for item in data: + tupla = ('/endpoints/endpoint', item) + result.append(tupla) + return result except requests.exceptions.Timeout: LOGGER.exception('Timeout connecting {:s}'.format(url)) return result @@ -57,7 +62,6 @@ def config_getter( LOGGER.exception('Exception retrieving {:s}'.format(resource_key)) result.append((resource_key, e)) return result - return response # try: # context = json.loads(response.content) @@ -72,13 +76,13 @@ def create_connectivity_service( root_url, config_rules, timeout : Optional[int] = None, auth : Optional[HTTPBasicAuth] = None ): - url = '{:s}/configure'.format(root_url) + url = '{:s}/manage-probe/configure'.format(root_url) headers = {'content-type': 'application/json'} results = [] try: LOGGER.info('Configuring Smartnic rules') response = requests.post( - url=url, data=json.dumps(config_rules), timeout=timeout, headers=headers, verify=False) + url=url, data=config_rules, timeout=timeout, headers=headers, verify=False) LOGGER.info('SmartNIC Probes response: {:s}'.format(str(response))) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Exception creating ConfigRule') @@ -92,7 +96,7 @@ def create_connectivity_service( def delete_connectivity_service(root_url, config_rules, timeout : Optional[int] = None, auth : Optional[HTTPBasicAuth] = None ): - url = '{:s}/configure'.format(root_url) + url = '{:s}/manage-probe/configure'.format(root_url) results = [] try: response = requests.delete(url=url, timeout=timeout, verify=False) diff --git a/src/device/service/drivers/smartnic/__init__.py b/src/device/service/drivers/smartnic/__init__.py index bc88d00fa..b3626c633 100644 --- a/src/device/service/drivers/smartnic/__init__.py +++ b/src/device/service/drivers/smartnic/__init__.py @@ -14,7 +14,5 @@ from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_SERVICES, RESOURCE_INTERFACES ALL_RESOURCE_KEYS = [ - RESOURCE_ENDPOINTS, - RESOURCE_SERVICES, RESOURCE_INTERFACES ] diff --git a/src/device/service/drivers/smartnic_probes/ietf-yang-types.yang b/src/device/service/drivers/smartnic/ietf-yang-types.yang similarity index 100% rename from src/device/service/drivers/smartnic_probes/ietf-yang-types.yang rename to src/device/service/drivers/smartnic/ietf-yang-types.yang diff --git a/src/device/service/drivers/smartnic_probes/openconfig-extensions.yang b/src/device/service/drivers/smartnic/openconfig-extensions.yang similarity index 100% rename from src/device/service/drivers/smartnic_probes/openconfig-extensions.yang rename to src/device/service/drivers/smartnic/openconfig-extensions.yang diff --git a/src/device/service/drivers/smartnic_probes/openconfig-inet-types.yang b/src/device/service/drivers/smartnic/openconfig-inet-types.yang similarity index 100% rename from src/device/service/drivers/smartnic_probes/openconfig-inet-types.yang rename to src/device/service/drivers/smartnic/openconfig-inet-types.yang diff --git a/src/device/service/drivers/smartnic_probes/openconfig-probes-types.yang b/src/device/service/drivers/smartnic/openconfig-probes-types.yang similarity index 100% rename from src/device/service/drivers/smartnic_probes/openconfig-probes-types.yang rename to src/device/service/drivers/smartnic/openconfig-probes-types.yang diff --git a/src/device/service/drivers/smartnic_probes/openconfig-probes.yang b/src/device/service/drivers/smartnic/openconfig-probes.yang similarity index 100% rename from src/device/service/drivers/smartnic_probes/openconfig-probes.yang rename to src/device/service/drivers/smartnic/openconfig-probes.yang diff --git a/src/device/service/drivers/smartnic_probes/openconfig-types.yang b/src/device/service/drivers/smartnic/openconfig-types.yang similarity index 100% rename from src/device/service/drivers/smartnic_probes/openconfig-types.yang rename to src/device/service/drivers/smartnic/openconfig-types.yang diff --git a/src/device/service/drivers/smartnic_probes/probes-agent.yang b/src/device/service/drivers/smartnic/probes-agent.yang similarity index 100% rename from src/device/service/drivers/smartnic_probes/probes-agent.yang rename to src/device/service/drivers/smartnic/probes-agent.yang diff --git a/src/device/service/drivers/smartnic_probes/references_probes_libraries.txt b/src/device/service/drivers/smartnic/references_probes_libraries.txt similarity index 100% rename from src/device/service/drivers/smartnic_probes/references_probes_libraries.txt rename to src/device/service/drivers/smartnic/references_probes_libraries.txt diff --git a/src/device/service/drivers/smartnic_probes/.gitkeep b/src/device/service/drivers/smartnic_probes/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/device/service/drivers/smartnic_probes/smartnics_probes_agent/.gitkeep b/src/device/service/drivers/smartnic_probes/smartnics_probes_agent/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py index 2b0a537cc..daafd79ab 100644 --- a/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py @@ -181,10 +181,10 @@ class Device(_Resource): return format_grpc_to_json(self.device_client.AddDevice(grpc_device( device_uuid = device['device_id']['device_uuid']['uuid'], device_type = device['device_type'], - config_rules = device['device_config']['config_rules'], status = device['device_operational_status'], - drivers = device['device_drivers'], - endpoints = device['device_endpoints'] + endpoints = device['device_endpoints'], + config_rules = device['device_config']['config_rules'], + drivers = device['device_drivers'] ))) def put(self, device_uuid : str): # pylint: disable=unused-argument @@ -192,12 +192,17 @@ class Device(_Resource): return format_grpc_to_json(self.device_client.ConfigureDevice(grpc_device( device_uuid = device['device_id']['device_uuid']['uuid'], device_type = device['device_type'], - device_config = device['device_config']['config_rules'], - device_operational_status = device['device_operational_status'], - device_drivers = device['device_drivers'], - device_endpoints = device['device_endpoints'] + status = device['device_operational_status'], + endpoints = device['device_endpoints'], + config_rules = device['device_config']['config_rules'], + drivers = device['device_drivers'] + ))) + + def delete(self, device_uuid : str): + device = request.get_json()['devices'][0] + return format_grpc_to_json(self.device_client.DeleteDevice(grpc_device( + device_uuid = device['device_id']['device_uuid']['uuid'] ))) - class LinkIds(_Resource): def get(self): diff --git a/src/nbi/service/rest_server/nbi_plugins/agent_probes/Tools.py b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Tools.py index 17b6dcdfd..6cffbb5cc 100644 --- a/src/nbi/service/rest_server/nbi_plugins/agent_probes/Tools.py +++ b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Tools.py @@ -12,12 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +import logging from flask.json import jsonify from common.proto.context_pb2 import ( ConnectionId, ContextId, DeviceDriverEnum, Device, DeviceId, DeviceOperationalStatusEnum, LinkId, ServiceId, SliceId, TopologyId, Service, ServiceStatusEnum ) from common.proto.policy_pb2 import PolicyRuleId -from common.tools.grpc.Tools import grpc_message_to_json +from common.proto.context_pb2 import ConfigActionEnum +from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string from common.tools.object_factory.Connection import json_connection_id from common.tools.object_factory.Context import json_context_id from common.tools.object_factory.ConfigRule import json_config_rule @@ -30,6 +32,8 @@ from common.tools.object_factory.Service import json_service_id, json_service from common.tools.object_factory.Slice import json_slice_id from common.tools.object_factory.Topology import json_topology_id +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) def format_grpc_to_json(grpc_reply): return jsonify(grpc_message_to_json(grpc_reply)) @@ -44,8 +48,9 @@ def grpc_device_id(device_uuid): return DeviceId(**json_device_id(device_uuid)) def grpc_device( - device_uuid, device_type, config_rules=None, status=None, drivers=None, endpoints=None + device_uuid, device_type, status, endpoints=None, config_rules=None, drivers=None ): + json_config_rules = [ json_config_rule( config_rule['action'], @@ -68,8 +73,7 @@ def grpc_device( for endpoint in endpoints ] if endpoints else [] return Device(**json_device( - device_uuid, device_type, json_config_rules, json_status, - json_drivers, json_endpoints)) + device_uuid, device_type, json_status, None, json_endpoints, json_config_rules, json_drivers)) def grpc_link_id(link_uuid): return LinkId(**json_link_id(link_uuid)) -- GitLab From 9bdfc3c75bdb2dc7ad493272565436150cfb4f34 Mon Sep 17 00:00:00 2001 From: carcel Date: Fri, 22 Mar 2024 09:40:51 +0000 Subject: [PATCH 012/463] Update - Morpheus Client Extension --- src/device/service/drivers/smartnic/SmartnicDriver.py | 4 ++-- src/device/service/drivers/smartnic/Tools.py | 2 +- .../rest_server/nbi_plugins/agent_probes/Resources.py | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/device/service/drivers/smartnic/SmartnicDriver.py b/src/device/service/drivers/smartnic/SmartnicDriver.py index f827bbbff..35d05edde 100644 --- a/src/device/service/drivers/smartnic/SmartnicDriver.py +++ b/src/device/service/drivers/smartnic/SmartnicDriver.py @@ -104,9 +104,9 @@ class SmartnicDriver(_Driver): with self.__lock: for resource in resources: LOGGER.info('resource = {:s}'.format(str(resource))) - config_rules = find_key(resource, 'config_rules') + #config_rules = find_key(resource, 'config_rules') results.extend(delete_connectivity_service( - self.__tapi_root, config_rules, timeout=self.__timeout)) + self.__tapi_root, resource[1], timeout=self.__timeout)) return results @metered_subclass_method(METRICS_POOL) diff --git a/src/device/service/drivers/smartnic/Tools.py b/src/device/service/drivers/smartnic/Tools.py index bd155441c..13345b618 100644 --- a/src/device/service/drivers/smartnic/Tools.py +++ b/src/device/service/drivers/smartnic/Tools.py @@ -99,7 +99,7 @@ def delete_connectivity_service(root_url, config_rules, timeout : Optional[int] url = '{:s}/manage-probe/configure'.format(root_url) results = [] try: - response = requests.delete(url=url, timeout=timeout, verify=False) + response = requests.delete(url=url, data=config_rules, timeout=timeout, verify=False) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Exception deleting ConfigRule') results.append(e) diff --git a/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py index daafd79ab..50e8e77af 100644 --- a/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py @@ -201,7 +201,12 @@ class Device(_Resource): def delete(self, device_uuid : str): device = request.get_json()['devices'][0] return format_grpc_to_json(self.device_client.DeleteDevice(grpc_device( - device_uuid = device['device_id']['device_uuid']['uuid'] + device_uuid = device['device_id']['device_uuid']['uuid'], + device_type = device['device_type'], + status = device['device_operational_status'], + endpoints = device['device_endpoints'], + config_rules = device['device_config']['config_rules'], + drivers = device['device_drivers'] ))) class LinkIds(_Resource): -- GitLab From 56f63933fa18dfaea2186cb5565ae0bd768770b5 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Sat, 12 Oct 2024 15:05:02 +0000 Subject: [PATCH 013/463] Additions to Backend Telemetry: - Added Emulated Metric Collector. - Implemented a few other changes. --- .../run_tests_locally-telemetry-backend.sh | 7 +- .../backend/service/EmulatedCollector.py | 75 +++++++++++ .../service/TelemetryBackendService.py | 125 ++++++++---------- src/telemetry/backend/tests/messages.py | 16 +++ src/telemetry/backend/tests/test_backend.py | 22 ++- .../TelemetryFrontendServiceServicerImpl.py | 4 +- 6 files changed, 171 insertions(+), 78 deletions(-) create mode 100644 src/telemetry/backend/service/EmulatedCollector.py diff --git a/scripts/run_tests_locally-telemetry-backend.sh b/scripts/run_tests_locally-telemetry-backend.sh index f71128240..89f22611f 100755 --- a/scripts/run_tests_locally-telemetry-backend.sh +++ b/scripts/run_tests_locally-telemetry-backend.sh @@ -18,15 +18,12 @@ PROJECTDIR=`pwd` cd $PROJECTDIR/src # RCFILE=$PROJECTDIR/coverage/.coveragerc -# coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ -# kpi_manager/tests/test_unitary.py -# python3 kpi_manager/tests/test_unitary.py export KFK_SERVER_ADDRESS='127.0.0.1:9092' CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}') export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_telemetry?sslmode=require" RCFILE=$PROJECTDIR/coverage/.coveragerc -python3 -m pytest --log-level=INFO --log-cli-level=debug --verbose \ - telemetry/backend/tests/test_TelemetryBackend.py +python3 -m pytest --log-level=debug --log-cli-level=debug --verbose \ + telemetry/backend/tests/test_backend.py diff --git a/src/telemetry/backend/service/EmulatedCollector.py b/src/telemetry/backend/service/EmulatedCollector.py new file mode 100644 index 000000000..716292ae0 --- /dev/null +++ b/src/telemetry/backend/service/EmulatedCollector.py @@ -0,0 +1,75 @@ +import numpy as np +import random +import threading +import time +import logging +import queue + +LOGGER = logging.getLogger(__name__) + +class NetworkMetricsEmulator(threading.Thread): + def __init__(self, interval=1, duration=10, metric_queue=None, network_state="moderate"): + LOGGER.info("Initiaitng Emulator") + super().__init__() + self.interval = interval + self.duration = duration + self.metric_queue = metric_queue if metric_queue is not None else queue.Queue() + self.network_state = network_state + self.running = True + self.base_utilization = None + self.states = None + self.state_probabilities = None + self.set_inital_parameter_values() + + def set_inital_parameter_values(self): + self.states = ["good", "moderate", "poor"] + self.state_probabilities = { + "good" : [0.9, 0.1, 0.0], + "moderate": [0.2, 0.7, 0.1], + "poor" : [0.0, 0.3, 0.7] + } + if self.network_state == "good": + self.base_utilization = random.uniform(700, 900) + elif self.network_state == "moderate": + self.base_utilization = random.uniform(300, 700) + else: + self.base_utilization = random.uniform(100, 300) + + def generate_synthetic_data_point(self): + if self.network_state == "good": + variance = random.uniform(-5, 5) + elif self.network_state == "moderate": + variance = random.uniform(-50, 50) + elif self.network_state == "poor": + variance = random.uniform(-100, 100) + else: + raise ValueError("Invalid network state. Must be 'good', 'moderate', or 'poor'.") + self.base_utilization += variance + + period = 60 * 60 * random.uniform(10, 100) + amplitude = random.uniform(50, 100) + sin_wave = amplitude * np.sin(2 * np.pi * 100 / period) + self.base_utilization + random_noise = random.uniform(-10, 10) + utilization = sin_wave + random_noise + + state_prob = self.state_probabilities[self.network_state] + self.network_state = random.choices(self.states, state_prob)[0] + + return utilization + + def run(self): + while self.running and (self.duration == -1 or self.duration > 0): + utilization = self.generate_synthetic_data_point() + self.metric_queue.put(round(utilization,3)) + time.sleep(self.interval) + if self.duration > 0: + self.duration -= self.interval + if self.duration == -1: + self.duration = 0 + LOGGER.debug("Emulator collector is stopped.") + self.stop() + + def stop(self): + self.running = False + if not self.is_alive(): + LOGGER.debug("Emulator Collector is Termintated.") diff --git a/src/telemetry/backend/service/TelemetryBackendService.py b/src/telemetry/backend/service/TelemetryBackendService.py index 81ef24481..2d7333715 100755 --- a/src/telemetry/backend/service/TelemetryBackendService.py +++ b/src/telemetry/backend/service/TelemetryBackendService.py @@ -12,22 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. +import queue import json import time -import random import logging import threading -from typing import Any, Dict -from datetime import datetime, timezone -# from common.proto.context_pb2 import Empty -from confluent_kafka import Producer as KafkaProducer -from confluent_kafka import Consumer as KafkaConsumer -from confluent_kafka import KafkaError +from typing import Any, Dict +from datetime import datetime, timezone +from confluent_kafka import Producer as KafkaProducer +from confluent_kafka import Consumer as KafkaConsumer +from confluent_kafka import KafkaError +from numpy import info from common.Constants import ServiceNameEnum -from common.Settings import get_service_port_grpc -from common.tools.kafka.Variables import KafkaConfig, KafkaTopic -from common.method_wrappers.Decorator import MetricsPool +from common.Settings import get_service_port_grpc +from common.method_wrappers.Decorator import MetricsPool +from common.tools.kafka.Variables import KafkaConfig, KafkaTopic from common.tools.service.GenericGrpcService import GenericGrpcService +from telemetry.backend.service.EmulatedCollector import NetworkMetricsEmulator LOGGER = logging.getLogger(__name__) METRICS_POOL = MetricsPool('TelemetryBackend', 'backendService') @@ -45,7 +46,9 @@ class TelemetryBackendService(GenericGrpcService): self.kafka_consumer = KafkaConsumer({'bootstrap.servers' : KafkaConfig.get_kafka_address(), 'group.id' : 'backend', 'auto.offset.reset' : 'latest'}) - self.running_threads = {} + self.running_threads = {} + self.emulatorCollector = None + self.metric_queue = queue.Queue() def install_servicers(self): threading.Thread(target=self.RequestListener).start() @@ -66,93 +69,84 @@ class TelemetryBackendService(GenericGrpcService): if receive_msg.error().code() == KafkaError._PARTITION_EOF: continue else: - # print("Consumer error: {}".format(receive_msg.error())) + LOGGER.error("Consumer error: {}".format(receive_msg.error())) break try: collector = json.loads(receive_msg.value().decode('utf-8')) collector_id = receive_msg.key().decode('utf-8') LOGGER.debug('Recevied Collector: {:} - {:}'.format(collector_id, collector)) - # print('Recevied Collector: {:} - {:}'.format(collector_id, collector)) if collector['duration'] == -1 and collector['interval'] == -1: self.TerminateCollectorBackend(collector_id) else: - self.RunInitiateCollectorBackend(collector_id, collector) + threading.Thread(target=self.InitiateCollectorBackend, + args=(collector_id, collector)).start() except Exception as e: LOGGER.warning("Unable to consumer message from topic: {:}. ERROR: {:}".format(KafkaTopic.REQUEST.value, e)) - # print ("Unable to consumer message from topic: {:}. ERROR: {:}".format(KafkaTopic.REQUEST.value, e)) - def TerminateCollectorBackend(self, collector_id): - if collector_id in self.running_threads: - thread, stop_event = self.running_threads[collector_id] - stop_event.set() - thread.join() - # print ("Terminating backend (by StopCollector): Collector Id: ", collector_id) - del self.running_threads[collector_id] - self.GenerateCollectorTerminationSignal(collector_id, "-1", -1) # Termination confirmation to frontend. - else: - # print ('Backend collector {:} not found'.format(collector_id)) - LOGGER.warning('Backend collector {:} not found'.format(collector_id)) - - def RunInitiateCollectorBackend(self, collector_id: str, collector: str): - stop_event = threading.Event() - thread = threading.Thread(target=self.InitiateCollectorBackend, - args=(collector_id, collector, stop_event)) - self.running_threads[collector_id] = (thread, stop_event) - thread.start() - - def InitiateCollectorBackend(self, collector_id, collector, stop_event): + def InitiateCollectorBackend(self, collector_id, collector): """ Method receives collector request and initiates collecter backend. """ # print("Initiating backend for collector: ", collector_id) LOGGER.info("Initiating backend for collector: {:s}".format(str(collector_id))) start_time = time.time() - while not stop_event.is_set(): - if int(collector['duration']) != -1 and time.time() - start_time >= collector['duration']: # condition to terminate backend - print("Execuation duration completed: Terminating backend: Collector Id: ", collector_id, " - ", time.time() - start_time) - self.GenerateCollectorTerminationSignal(collector_id, "-1", -1) # Termination confirmation to frontend. - break - self.ExtractKpiValue(collector_id, collector['kpi_id']) - time.sleep(collector['interval']) + self.emulatorCollector = NetworkMetricsEmulator( + duration = collector['duration'], + interval = collector['interval'], + metric_queue = self.metric_queue + ) + self.emulatorCollector.start() + self.running_threads[collector_id] = self.emulatorCollector - def GenerateCollectorTerminationSignal(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): + while self.emulatorCollector.is_alive(): + if not self.metric_queue.empty(): + metric_value = self.metric_queue.get() + LOGGER.debug("Metric: {:} - Value : {:}".format(collector['kpi_id'], metric_value)) + self.GenerateCollectorResponse(collector_id, collector['kpi_id'] , metric_value) + time.sleep(1) + self.TerminateCollectorBackend(collector_id) + + def GenerateCollectorResponse(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): """ - Method to write kpi Termination signat on RESPONSE Kafka topic + Method to write kpi value on RESPONSE Kafka topic """ producer = self.kafka_producer kpi_value : Dict = { + "time_stamp": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"), "kpi_id" : kpi_id, - "kpi_value" : measured_kpi_value, + "kpi_value" : measured_kpi_value } producer.produce( - KafkaTopic.RESPONSE.value, # TODO: to the topic ... + KafkaTopic.VALUE.value, # TODO: to the topic ... key = collector_id, value = json.dumps(kpi_value), callback = self.delivery_callback ) producer.flush() - def ExtractKpiValue(self, collector_id: str, kpi_id: str): - """ - Method to extract kpi value. - """ - measured_kpi_value = random.randint(1,100) # TODO: To be extracted from a device - # print ("Measured Kpi value: {:}".format(measured_kpi_value)) - self.GenerateCollectorResponse(collector_id, kpi_id , measured_kpi_value) + def TerminateCollectorBackend(self, collector_id): + LOGGER.debug("Terminating collector backend...") + if collector_id in self.running_threads: + thread = self.running_threads[collector_id] + thread.stop() + del self.running_threads[collector_id] + LOGGER.debug("Collector backend terminated. Collector ID: {:}".format(collector_id)) + self.GenerateCollectorTerminationSignal(collector_id, "-1", -1) # Termination confirmation to frontend. + else: + LOGGER.warning('Backend collector {:} not found'.format(collector_id)) - def GenerateCollectorResponse(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): + def GenerateCollectorTerminationSignal(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): """ - Method to write kpi value on RESPONSE Kafka topic + Method to write kpi Termination signat on RESPONSE Kafka topic """ producer = self.kafka_producer kpi_value : Dict = { - "time_stamp": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"), "kpi_id" : kpi_id, - "kpi_value" : measured_kpi_value + "kpi_value" : measured_kpi_value, } producer.produce( - KafkaTopic.VALUE.value, # TODO: to the topic ... + KafkaTopic.RESPONSE.value, # TODO: to the topic ... key = collector_id, value = json.dumps(kpi_value), callback = self.delivery_callback @@ -160,14 +154,9 @@ class TelemetryBackendService(GenericGrpcService): producer.flush() def delivery_callback(self, err, msg): - """ - Callback function to handle message delivery status. - Args: err (KafkaError): Kafka error object. - msg (Message): Kafka message object. - """ - if err: - LOGGER.error('Message delivery failed: {:}'.format(err)) + if err: + LOGGER.error('Message delivery failed: {:s}'.format(str(err))) # print(f'Message delivery failed: {err}') - #else: - # LOGGER.debug('Message delivered to topic {:}'.format(msg.topic())) - # # print(f'Message delivered to topic {msg.topic()}') + # else: + # LOGGER.info('Message delivered to topic {:}'.format(msg.topic())) + # print(f'Message delivered to topic {msg.topic()}') diff --git a/src/telemetry/backend/tests/messages.py b/src/telemetry/backend/tests/messages.py index 5cf553eaa..e6c9b9e16 100644 --- a/src/telemetry/backend/tests/messages.py +++ b/src/telemetry/backend/tests/messages.py @@ -12,4 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. +import uuid +import random +from common.proto import telemetry_frontend_pb2 +# from common.proto.kpi_sample_types_pb2 import KpiSampleType +# from common.proto.kpi_manager_pb2 import KpiId + +def create_collector_request(): + _create_collector_request = telemetry_frontend_pb2.Collector() + _create_collector_request.collector_id.collector_id.uuid = str(uuid.uuid4()) + # _create_collector_request.collector_id.collector_id.uuid = "efef4d95-1cf1-43c4-9742-95c283dddddd" + _create_collector_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) + # _create_collector_request.kpi_id.kpi_id.uuid = "6e22f180-ba28-4641-b190-2287bf448888" + _create_collector_request.duration_s = float(random.randint(8, 16)) + # _create_collector_request.duration_s = -1 + _create_collector_request.interval_s = float(random.randint(2, 4)) + return _create_collector_request diff --git a/src/telemetry/backend/tests/test_backend.py b/src/telemetry/backend/tests/test_backend.py index 8bbde9769..3ddbedf93 100644 --- a/src/telemetry/backend/tests/test_backend.py +++ b/src/telemetry/backend/tests/test_backend.py @@ -13,10 +13,11 @@ # limitations under the License. import logging -import threading +from typing import Dict +from .messages import create_collector_request from common.tools.kafka.Variables import KafkaTopic from telemetry.backend.service.TelemetryBackendService import TelemetryBackendService - +import time LOGGER = logging.getLogger(__name__) @@ -34,4 +35,19 @@ def test_validate_kafka_topics(): # def test_RunRequestListener(): # LOGGER.info('test_RunRequestListener') # TelemetryBackendServiceObj = TelemetryBackendService() -# threading.Thread(target=TelemetryBackendServiceObj.RequestListener).start() \ No newline at end of file +# threading.Thread(target=TelemetryBackendServiceObj.RequestListener).start() + +def test_RunInitiateCollectorBackend(): + LOGGER.debug(">>> RunInitiateCollectorBackend <<<") + collector_obj = create_collector_request() + collector_id = collector_obj.collector_id.collector_id.uuid + collector_dict : Dict = { + "kpi_id" : collector_obj.kpi_id.kpi_id.uuid, + "duration": collector_obj.duration_s, + "interval": collector_obj.interval_s + } + TeleObj = TelemetryBackendService() + TeleObj.InitiateCollectorBackend(collector_id, collector_dict) + time.sleep(20) + + LOGGER.debug("--- Execution Finished Sucessfully---") diff --git a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py index 5c569e2dd..f2540fd79 100644 --- a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py +++ b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py @@ -196,7 +196,7 @@ class TelemetryFrontendServiceServicerImpl(TelemetryFrontendServiceServicer): def process_response(self, collector_id: str, kpi_id: str, kpi_value: Any): if kpi_id == "-1" and kpi_value == -1: # print ("Backend termination confirmation for collector id: ", collector_id) - LOGGER.info("Backend termination confirmation for collector id: ", collector_id) + LOGGER.info("Backend termination confirmation for collector id: {:}".format(collector_id)) else: - LOGGER.info("Backend termination confirmation for collector id: ", collector_id) + LOGGER.info("Backend termination confirmation for collector id: {:}".format(collector_id)) # print ("KPI Value: Collector Id:", collector_id, ", Kpi Id:", kpi_id, ", Value:", kpi_value) -- GitLab From 3a9369744e250d5a7714513857c69de6ce907493 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Sat, 12 Oct 2024 15:18:59 +0000 Subject: [PATCH 014/463] Updated Kafka topic names for Telemetry service. --- src/common/tools/kafka/Variables.py | 8 ++++---- .../backend/service/TelemetryBackendService.py | 12 ++++++------ .../service/TelemetryFrontendServiceServicerImpl.py | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/common/tools/kafka/Variables.py b/src/common/tools/kafka/Variables.py index 8ff6447f7..9a1aec273 100644 --- a/src/common/tools/kafka/Variables.py +++ b/src/common/tools/kafka/Variables.py @@ -41,14 +41,14 @@ class KafkaConfig(Enum): class KafkaTopic(Enum): # TODO: Later to be populated from ENV variable. - REQUEST = 'topic_request' - RESPONSE = 'topic_response' + TELEMETRY_REQUEST = 'topic_telemetry_request' + TELEMETRY_RESPONSE = 'topic_telemetry_response' RAW = 'topic_raw' LABELED = 'topic_labeled' VALUE = 'topic_value' ALARMS = 'topic_alarms' - ANALYTICS_REQUEST = 'topic_request_analytics' - ANALYTICS_RESPONSE = 'topic_response_analytics' + ANALYTICS_REQUEST = 'topic_analytics_request' + ANALYTICS_RESPONSE = 'topic_analytics_response' @staticmethod def create_all_topics() -> bool: diff --git a/src/telemetry/backend/service/TelemetryBackendService.py b/src/telemetry/backend/service/TelemetryBackendService.py index 2d7333715..8cef95292 100755 --- a/src/telemetry/backend/service/TelemetryBackendService.py +++ b/src/telemetry/backend/service/TelemetryBackendService.py @@ -36,7 +36,7 @@ METRICS_POOL = MetricsPool('TelemetryBackend', 'backendService') class TelemetryBackendService(GenericGrpcService): """ Class listens for request on Kafka topic, fetches requested metrics from device. - Produces metrics on both RESPONSE and VALUE kafka topics. + Produces metrics on both TELEMETRY_RESPONSE and VALUE kafka topics. """ def __init__(self, cls_name : str = __name__) -> None: LOGGER.info('Init TelemetryBackendService') @@ -60,7 +60,7 @@ class TelemetryBackendService(GenericGrpcService): LOGGER.info('Telemetry backend request listener is running ...') # print ('Telemetry backend request listener is running ...') consumer = self.kafka_consumer - consumer.subscribe([KafkaTopic.REQUEST.value]) + consumer.subscribe([KafkaTopic.TELEMETRY_REQUEST.value]) while True: receive_msg = consumer.poll(2.0) if receive_msg is None: @@ -82,7 +82,7 @@ class TelemetryBackendService(GenericGrpcService): threading.Thread(target=self.InitiateCollectorBackend, args=(collector_id, collector)).start() except Exception as e: - LOGGER.warning("Unable to consumer message from topic: {:}. ERROR: {:}".format(KafkaTopic.REQUEST.value, e)) + LOGGER.warning("Unable to consumer message from topic: {:}. ERROR: {:}".format(KafkaTopic.TELEMETRY_REQUEST.value, e)) def InitiateCollectorBackend(self, collector_id, collector): """ @@ -109,7 +109,7 @@ class TelemetryBackendService(GenericGrpcService): def GenerateCollectorResponse(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): """ - Method to write kpi value on RESPONSE Kafka topic + Method to write kpi value on TELEMETRY_RESPONSE Kafka topic """ producer = self.kafka_producer kpi_value : Dict = { @@ -138,7 +138,7 @@ class TelemetryBackendService(GenericGrpcService): def GenerateCollectorTerminationSignal(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): """ - Method to write kpi Termination signat on RESPONSE Kafka topic + Method to write kpi Termination signat on TELEMETRY_RESPONSE Kafka topic """ producer = self.kafka_producer kpi_value : Dict = { @@ -146,7 +146,7 @@ class TelemetryBackendService(GenericGrpcService): "kpi_value" : measured_kpi_value, } producer.produce( - KafkaTopic.RESPONSE.value, # TODO: to the topic ... + KafkaTopic.TELEMETRY_RESPONSE.value, # TODO: to the topic ... key = collector_id, value = json.dumps(kpi_value), callback = self.delivery_callback diff --git a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py index f2540fd79..b7dcdbb6b 100644 --- a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py +++ b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py @@ -74,7 +74,7 @@ class TelemetryFrontendServiceServicerImpl(TelemetryFrontendServiceServicer): "interval": collector_obj.interval_s } self.kafka_producer.produce( - KafkaTopic.REQUEST.value, + KafkaTopic.TELEMETRY_REQUEST.value, key = collector_uuid, value = json.dumps(collector_to_generate), callback = self.delivery_callback @@ -110,7 +110,7 @@ class TelemetryFrontendServiceServicerImpl(TelemetryFrontendServiceServicer): "interval": -1 } self.kafka_producer.produce( - KafkaTopic.REQUEST.value, + KafkaTopic.TELEMETRY_REQUEST.value, key = collector_uuid, value = json.dumps(collector_to_stop), callback = self.delivery_callback @@ -168,7 +168,7 @@ class TelemetryFrontendServiceServicerImpl(TelemetryFrontendServiceServicer): """ listener for response on Kafka topic. """ - self.kafka_consumer.subscribe([KafkaTopic.RESPONSE.value]) + self.kafka_consumer.subscribe([KafkaTopic.TELEMETRY_RESPONSE.value]) while True: receive_msg = self.kafka_consumer.poll(2.0) if receive_msg is None: -- GitLab From 29e64a62290b3100b27e86aa03ab7f7da799479f Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Sat, 12 Oct 2024 15:26:51 +0000 Subject: [PATCH 015/463] Minor changes in Telemetry backend --- .../backend/service/TelemetryBackendService.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/telemetry/backend/service/TelemetryBackendService.py b/src/telemetry/backend/service/TelemetryBackendService.py index 8cef95292..ab4991690 100755 --- a/src/telemetry/backend/service/TelemetryBackendService.py +++ b/src/telemetry/backend/service/TelemetryBackendService.py @@ -88,7 +88,6 @@ class TelemetryBackendService(GenericGrpcService): """ Method receives collector request and initiates collecter backend. """ - # print("Initiating backend for collector: ", collector_id) LOGGER.info("Initiating backend for collector: {:s}".format(str(collector_id))) start_time = time.time() self.emulatorCollector = NetworkMetricsEmulator( @@ -103,13 +102,13 @@ class TelemetryBackendService(GenericGrpcService): if not self.metric_queue.empty(): metric_value = self.metric_queue.get() LOGGER.debug("Metric: {:} - Value : {:}".format(collector['kpi_id'], metric_value)) - self.GenerateCollectorResponse(collector_id, collector['kpi_id'] , metric_value) + self.GenerateKpiValue(collector_id, collector['kpi_id'] , metric_value) time.sleep(1) self.TerminateCollectorBackend(collector_id) - def GenerateCollectorResponse(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): + def GenerateKpiValue(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): """ - Method to write kpi value on TELEMETRY_RESPONSE Kafka topic + Method to write kpi value on VALUE Kafka topic """ producer = self.kafka_producer kpi_value : Dict = { @@ -118,7 +117,7 @@ class TelemetryBackendService(GenericGrpcService): "kpi_value" : measured_kpi_value } producer.produce( - KafkaTopic.VALUE.value, # TODO: to the topic ... + KafkaTopic.VALUE.value, key = collector_id, value = json.dumps(kpi_value), callback = self.delivery_callback @@ -146,7 +145,7 @@ class TelemetryBackendService(GenericGrpcService): "kpi_value" : measured_kpi_value, } producer.produce( - KafkaTopic.TELEMETRY_RESPONSE.value, # TODO: to the topic ... + KafkaTopic.TELEMETRY_RESPONSE.value, key = collector_id, value = json.dumps(kpi_value), callback = self.delivery_callback -- GitLab From 4467726216ac7f455a487e960040ecfd4c52f03e Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Sun, 13 Oct 2024 15:26:53 +0000 Subject: [PATCH 016/463] Emulated Collector is added in Telemetry backend to produce multiple metrics at single timestamp. --- .../backend/service/EmulatedCollector.py | 3 + .../service/EmulatedCollectorMultiple.py | 83 +++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 src/telemetry/backend/service/EmulatedCollectorMultiple.py diff --git a/src/telemetry/backend/service/EmulatedCollector.py b/src/telemetry/backend/service/EmulatedCollector.py index 716292ae0..5f546d043 100644 --- a/src/telemetry/backend/service/EmulatedCollector.py +++ b/src/telemetry/backend/service/EmulatedCollector.py @@ -8,6 +8,9 @@ import queue LOGGER = logging.getLogger(__name__) class NetworkMetricsEmulator(threading.Thread): + """ + This collector class will generate a single emulated metric value. + """ def __init__(self, interval=1, duration=10, metric_queue=None, network_state="moderate"): LOGGER.info("Initiaitng Emulator") super().__init__() diff --git a/src/telemetry/backend/service/EmulatedCollectorMultiple.py b/src/telemetry/backend/service/EmulatedCollectorMultiple.py new file mode 100644 index 000000000..54886e5db --- /dev/null +++ b/src/telemetry/backend/service/EmulatedCollectorMultiple.py @@ -0,0 +1,83 @@ +import numpy as np +import random +import threading +import time +import logging +import queue + +LOGGER = logging.getLogger(__name__) + +class NetworkMetricsEmulator(threading.Thread): + """ + This collector class will generate the emulated metrics for PKT_IN, PKT_OUT, BYTES_IN, BYTES_OUT and PKT_DROP as a list. + """ + def __init__(self, interval=1, duration=10, metric_queue=None, network_state="moderate"): + LOGGER.info("Initiaitng Emulator") + super().__init__() + self.interval = interval + self.duration = duration + self.metric_queue = metric_queue if metric_queue is not None else queue.Queue() + self.network_state = network_state + self.running = True + self.set_inital_parameter_values() + + def set_inital_parameter_values(self): + self.bytes_per_pkt = random.uniform(65, 150) + self.states = ["good", "moderate", "poor"] + self.state_probabilities = { + "good" : [0.8, 0.2, 0.0], + "moderate": [0.2, 0.6, 0.2], + "poor" : [0.0, 0.4, 0.6] + } + if self.network_state == "good": + self.packet_in = random.uniform(700, 900) + elif self.network_state == "moderate": + self.packet_in = random.uniform(300, 700) + else: + self.packet_in = random.uniform(100, 300) + + def generate_synthetic_data_point(self): + if self.network_state == "good": + packet_loss = random.uniform(0.01, 0.1) + random_noise = random.uniform(1,10) + elif self.network_state == "moderate": + packet_loss = random.uniform(0.1, 1) + random_noise = random.uniform(10, 40) + elif self.network_state == "poor": + packet_loss = random.uniform(1, 3) + random_noise = random.uniform(40, 100) + else: + raise ValueError("Invalid network state. Must be 'good', 'moderate', or 'poor'.") + # self.packet_in += random_noise + + period = 60 * 60 * random.uniform(10, 100) + amplitude = random.uniform(50, 100) + sin_wave = amplitude * np.sin(2 * np.pi * 100 / period) + self.packet_in + packet_in = sin_wave + ((sin_wave/100) * random_noise) + packet_out = packet_in - ((packet_in / 100) * packet_loss) + bytes_in = packet_in * self.bytes_per_pkt + bytes_out = packet_out * self.bytes_per_pkt + + state_prob = self.state_probabilities[self.network_state] + self.network_state = random.choices(self.states, state_prob)[0] + print (self.network_state) + + return [float(packet_in), float(packet_out), float(bytes_in), float(bytes_out), float(packet_loss)] + # return packet_in + + def run(self): + while self.running and (self.duration == -1 or self.duration > 0): + packet_in = self.generate_synthetic_data_point() + self.metric_queue.put(packet_in) + time.sleep(self.interval) + if self.duration > 0: + self.duration -= self.interval + if self.duration == -1: + self.duration = 0 + LOGGER.debug("Emulator collector is stopped.") + self.stop() + + def stop(self): + self.running = False + if not self.is_alive(): + print("Thread is terminated.") -- GitLab From ca614228b6c065f995a0b0b3addeb8acb8c7e1b0 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 16 Oct 2024 07:47:44 +0000 Subject: [PATCH 017/463] Pre-merge code cleanup --- src/telemetry/backend/service/EmulatedCollector.py | 14 ++++++++++++++ .../backend/service/EmulatedCollectorMultiple.py | 14 ++++++++++++++ src/telemetry/backend/tests/test_backend.py | 4 ++-- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/telemetry/backend/service/EmulatedCollector.py b/src/telemetry/backend/service/EmulatedCollector.py index 5f546d043..cffff516f 100644 --- a/src/telemetry/backend/service/EmulatedCollector.py +++ b/src/telemetry/backend/service/EmulatedCollector.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 numpy as np import random import threading diff --git a/src/telemetry/backend/service/EmulatedCollectorMultiple.py b/src/telemetry/backend/service/EmulatedCollectorMultiple.py index 54886e5db..5be634dea 100644 --- a/src/telemetry/backend/service/EmulatedCollectorMultiple.py +++ b/src/telemetry/backend/service/EmulatedCollectorMultiple.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 numpy as np import random import threading diff --git a/src/telemetry/backend/tests/test_backend.py b/src/telemetry/backend/tests/test_backend.py index 3ddbedf93..a8d47da45 100644 --- a/src/telemetry/backend/tests/test_backend.py +++ b/src/telemetry/backend/tests/test_backend.py @@ -13,11 +13,11 @@ # limitations under the License. import logging +import time from typing import Dict -from .messages import create_collector_request from common.tools.kafka.Variables import KafkaTopic from telemetry.backend.service.TelemetryBackendService import TelemetryBackendService -import time +from .messages import create_collector_request LOGGER = logging.getLogger(__name__) -- GitLab From 0a67951cfdbf6c6d853a203e7f16882faf90f899 Mon Sep 17 00:00:00 2001 From: mansoca Date: Fri, 18 Oct 2024 14:05:43 +0000 Subject: [PATCH 018/463] alpha --- src/tests/ecoc24/.gitlab-ci.yml | 124 +++++++++++++++++++++++++++ src/tests/ecoc24/Dockerfile | 102 ++++++++++++++++++++++ src/tests/ecoc24/deploy_specs_e2e.sh | 2 +- src/tests/ecoc24/deploy_specs_ip.sh | 2 +- src/tests/ecoc24/deploy_specs_opt.sh | 2 +- src/tests/ecoc24/tests/__init__.py | 14 +++ src/tests/ofc24/Dockerfile | 31 +++---- 7 files changed, 259 insertions(+), 18 deletions(-) create mode 100644 src/tests/ecoc24/.gitlab-ci.yml create mode 100644 src/tests/ecoc24/Dockerfile create mode 100644 src/tests/ecoc24/tests/__init__.py diff --git a/src/tests/ecoc24/.gitlab-ci.yml b/src/tests/ecoc24/.gitlab-ci.yml new file mode 100644 index 000000000..3fb66f399 --- /dev/null +++ b/src/tests/ecoc24/.gitlab-ci.yml @@ -0,0 +1,124 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Build, tag, and push the Docker image to the GitLab Docker registry +build ecoc24: + variables: + TEST_NAME: 'ecoc24' + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . + - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + after_script: + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/tests/${TEST_NAME}/**/*.{py,in,sh,yml} + - src/tests/${TEST_NAME}/Dockerfile + - .gitlab-ci.yml + +# Deploy TeraFlowSDN and Execute end-2-end test +end2end_test ecoc24: + variables: + TEST_NAME: 'ecoc24' + stage: end2end_test + # Disable to force running it after all other tasks + #needs: + # - build ecoc24 + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - docker network rm -f na-br + + script: + # Download Docker image to run the test + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}:latest" + + + # Check MicroK8s is ready + - microk8s status --wait-ready + - kubectl get pods --all-namespaces + + # Deploy Optical Device Node Agents + - > + docker network create -d bridge --subnet=172.254.253.0/24 --gateway=172.254.253.254 + --ip-range=172.254.253.0/24 na-br + + + # Configure TeraFlowSDN deployment + # Uncomment if DEBUG log level is needed for the components + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/sliceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml + - source src/tests/${TEST_NAME}/deploy_specs.sh + #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" + #- export TFS_SKIP_BUILD="YES" + #- export TFS_IMAGE_TAG="latest" + #- echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" + + # Deploy TeraFlowSDN + - ./deploy/crdb.sh + - ./deploy/nats.sh + - ./deploy/qdb.sh + - ./deploy/expose_dashboard.sh + - ./deploy/tfs.sh + - ./deploy/show.sh + + # Wait for Context to be subscribed to NATS + #- while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do sleep 1; done + #- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + + # Run end-to-end tests + #- if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi + #- > + # docker run -t --name ${TEST_NAME} --network=host + # --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + # --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + # $CI_REGISTRY_IMAGE/${TEST_NAME}:latest + + after_script: + # Dump TeraFlowSDN component logs + - source src/tests/${TEST_NAME}/deploy_specs.sh + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/deviceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/pathcompservice -c frontend + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/serviceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/sliceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/nbiservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/opticalcontrollerservice -c server + - if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi + + # Dump Optical Device Node Agents container status and logs + - docker ps -a + + # Clean old docker images + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + + #coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + artifacts: + when: always + reports: + junit: ./src/tests/${TEST_NAME}/report_*.xml diff --git a/src/tests/ecoc24/Dockerfile b/src/tests/ecoc24/Dockerfile new file mode 100644 index 000000000..734cf6233 --- /dev/null +++ b/src/tests/ecoc24/Dockerfile @@ -0,0 +1,102 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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 + +# Install dependencies +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install wget g++ git && \ + rm -rf /var/lib/apt/lists/* + +# Set Python to show logs as they occur +ENV PYTHONUNBUFFERED=0 + +# Download the gRPC health probe +RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ + wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ + chmod +x /bin/grpc_health_probe + +# 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 + +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + +# Add common files into working directory +WORKDIR /var/teraflow/common +COPY src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto +RUN touch __init__.py +COPY proto/*.proto ./ +RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto +RUN rm *.proto +RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; + +# Create component sub-folders, get specific Python packages +RUN mkdir -p /var/teraflow/tests/ofc24 +WORKDIR /var/teraflow/tests/ofc24 +COPY src/tests/ofc24/requirements.in requirements.in +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +# Add component files into working directory +WORKDIR /var/teraflow +COPY src/__init__.py ./__init__.py +COPY src/common/*.py ./common/ +COPY src/common/tests/. ./common/tests/ +COPY src/common/tools/. ./common/tools/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ +COPY src/monitoring/__init__.py monitoring/__init__.py +COPY src/monitoring/client/. monitoring/client/ +COPY src/e2e_orchestrator/__init__.py e2e_orchestrator/__init__.py +COPY src/e2e_orchestrator/client/. e2e_orchestrator/client/ +COPY src/service/__init__.py service/__init__.py +COPY src/service/client/. service/client/ +COPY src/slice/__init__.py slice/__init__.py +COPY src/slice/client/. slice/client/ +COPY src/tests/*.py ./tests/ +COPY src/tests/ofc24/__init__.py ./tests/ofc24/__init__.py +COPY src/tests/ofc24/descriptors/topology.json ./tests/ofc24/descriptors/topology.json +COPY src/tests/ofc24/descriptors/service-unidir.json ./tests/ofc24/descriptors/service-unidir.json +COPY src/tests/ofc24/descriptors/service-bidir.json ./tests/ofc24/descriptors/service-bidir.json +COPY src/tests/ofc24/tests/. ./tests/ofc24/tests/ + +RUN tee ./run_tests.sh < Date: Fri, 18 Oct 2024 14:05:43 +0000 Subject: [PATCH 019/463] alpha --- src/tests/ecoc24/.gitlab-ci.yml | 124 +++++++++++++++++++++++++++ src/tests/ecoc24/Dockerfile | 102 ++++++++++++++++++++++ src/tests/ecoc24/deploy_specs_e2e.sh | 2 +- src/tests/ecoc24/deploy_specs_ip.sh | 2 +- src/tests/ecoc24/deploy_specs_opt.sh | 2 +- src/tests/ecoc24/tests/__init__.py | 14 +++ src/tests/ofc24/Dockerfile | 35 ++++---- 7 files changed, 261 insertions(+), 20 deletions(-) create mode 100644 src/tests/ecoc24/.gitlab-ci.yml create mode 100644 src/tests/ecoc24/Dockerfile create mode 100644 src/tests/ecoc24/tests/__init__.py diff --git a/src/tests/ecoc24/.gitlab-ci.yml b/src/tests/ecoc24/.gitlab-ci.yml new file mode 100644 index 000000000..3fb66f399 --- /dev/null +++ b/src/tests/ecoc24/.gitlab-ci.yml @@ -0,0 +1,124 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Build, tag, and push the Docker image to the GitLab Docker registry +build ecoc24: + variables: + TEST_NAME: 'ecoc24' + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . + - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + after_script: + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/tests/${TEST_NAME}/**/*.{py,in,sh,yml} + - src/tests/${TEST_NAME}/Dockerfile + - .gitlab-ci.yml + +# Deploy TeraFlowSDN and Execute end-2-end test +end2end_test ecoc24: + variables: + TEST_NAME: 'ecoc24' + stage: end2end_test + # Disable to force running it after all other tasks + #needs: + # - build ecoc24 + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - docker network rm -f na-br + + script: + # Download Docker image to run the test + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}:latest" + + + # Check MicroK8s is ready + - microk8s status --wait-ready + - kubectl get pods --all-namespaces + + # Deploy Optical Device Node Agents + - > + docker network create -d bridge --subnet=172.254.253.0/24 --gateway=172.254.253.254 + --ip-range=172.254.253.0/24 na-br + + + # Configure TeraFlowSDN deployment + # Uncomment if DEBUG log level is needed for the components + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/sliceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml + - source src/tests/${TEST_NAME}/deploy_specs.sh + #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" + #- export TFS_SKIP_BUILD="YES" + #- export TFS_IMAGE_TAG="latest" + #- echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" + + # Deploy TeraFlowSDN + - ./deploy/crdb.sh + - ./deploy/nats.sh + - ./deploy/qdb.sh + - ./deploy/expose_dashboard.sh + - ./deploy/tfs.sh + - ./deploy/show.sh + + # Wait for Context to be subscribed to NATS + #- while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do sleep 1; done + #- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + + # Run end-to-end tests + #- if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi + #- > + # docker run -t --name ${TEST_NAME} --network=host + # --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + # --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + # $CI_REGISTRY_IMAGE/${TEST_NAME}:latest + + after_script: + # Dump TeraFlowSDN component logs + - source src/tests/${TEST_NAME}/deploy_specs.sh + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/deviceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/pathcompservice -c frontend + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/serviceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/sliceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/nbiservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/opticalcontrollerservice -c server + - if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi + + # Dump Optical Device Node Agents container status and logs + - docker ps -a + + # Clean old docker images + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + + #coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + artifacts: + when: always + reports: + junit: ./src/tests/${TEST_NAME}/report_*.xml diff --git a/src/tests/ecoc24/Dockerfile b/src/tests/ecoc24/Dockerfile new file mode 100644 index 000000000..734cf6233 --- /dev/null +++ b/src/tests/ecoc24/Dockerfile @@ -0,0 +1,102 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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 + +# Install dependencies +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install wget g++ git && \ + rm -rf /var/lib/apt/lists/* + +# Set Python to show logs as they occur +ENV PYTHONUNBUFFERED=0 + +# Download the gRPC health probe +RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ + wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ + chmod +x /bin/grpc_health_probe + +# 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 + +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + +# Add common files into working directory +WORKDIR /var/teraflow/common +COPY src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto +RUN touch __init__.py +COPY proto/*.proto ./ +RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto +RUN rm *.proto +RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; + +# Create component sub-folders, get specific Python packages +RUN mkdir -p /var/teraflow/tests/ofc24 +WORKDIR /var/teraflow/tests/ofc24 +COPY src/tests/ofc24/requirements.in requirements.in +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +# Add component files into working directory +WORKDIR /var/teraflow +COPY src/__init__.py ./__init__.py +COPY src/common/*.py ./common/ +COPY src/common/tests/. ./common/tests/ +COPY src/common/tools/. ./common/tools/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ +COPY src/monitoring/__init__.py monitoring/__init__.py +COPY src/monitoring/client/. monitoring/client/ +COPY src/e2e_orchestrator/__init__.py e2e_orchestrator/__init__.py +COPY src/e2e_orchestrator/client/. e2e_orchestrator/client/ +COPY src/service/__init__.py service/__init__.py +COPY src/service/client/. service/client/ +COPY src/slice/__init__.py slice/__init__.py +COPY src/slice/client/. slice/client/ +COPY src/tests/*.py ./tests/ +COPY src/tests/ofc24/__init__.py ./tests/ofc24/__init__.py +COPY src/tests/ofc24/descriptors/topology.json ./tests/ofc24/descriptors/topology.json +COPY src/tests/ofc24/descriptors/service-unidir.json ./tests/ofc24/descriptors/service-unidir.json +COPY src/tests/ofc24/descriptors/service-bidir.json ./tests/ofc24/descriptors/service-bidir.json +COPY src/tests/ofc24/tests/. ./tests/ofc24/tests/ + +RUN tee ./run_tests.sh < Date: Sat, 26 Oct 2024 12:33:18 +0200 Subject: [PATCH 020/463] feat: L3VPN driver added - L3VPN added to DeviceDriverEnum of context.proto - ietf_l3vpn plugin added to src/device/service/drivers directory --- proto/context.proto | 1 + src/device/service/drivers/__init__.py | 10 + .../drivers/ietf_l3vpn/TfsApiClient.py | 174 +++++++++++ .../service/drivers/ietf_l3vpn/Tools.py | 284 ++++++++++++++++++ .../service/drivers/ietf_l3vpn/__init__.py | 13 + .../service/drivers/ietf_l3vpn/driver.py | 240 +++++++++++++++ 6 files changed, 722 insertions(+) create mode 100644 src/device/service/drivers/ietf_l3vpn/TfsApiClient.py create mode 100644 src/device/service/drivers/ietf_l3vpn/Tools.py create mode 100644 src/device/service/drivers/ietf_l3vpn/__init__.py create mode 100644 src/device/service/drivers/ietf_l3vpn/driver.py diff --git a/proto/context.proto b/proto/context.proto index 85972d956..b125646c0 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -215,6 +215,7 @@ enum DeviceDriverEnum { DEVICEDRIVER_IETF_ACTN = 10; DEVICEDRIVER_OC = 11; DEVICEDRIVER_QKD = 12; + DEVICEDRIVER_IETF_L3VPN = 13; } enum DeviceOperationalStatusEnum { diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index a5e7f3771..ff5aa44f9 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -81,6 +81,16 @@ DRIVERS.append( } ])) + +from .ietf_l3vpn.driver import IetfL3VpnDriver # pylint: disable=wrong-import-position +DRIVERS.append( + (IetfL3VpnDriver, [ + { + FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.TERAFLOWSDN_CONTROLLER, + FilterFieldEnum.DRIVER: DeviceDriverEnum.DEVICEDRIVER_IETF_L3VPN, + } + ])) + from .ietf_actn.IetfActnDriver import IetfActnDriver # pylint: disable=wrong-import-position DRIVERS.append( (IetfActnDriver, [ diff --git a/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py new file mode 100644 index 000000000..86ee2b1be --- /dev/null +++ b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py @@ -0,0 +1,174 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Dict, List, Optional + +import requests +from requests.auth import HTTPBasicAuth + +from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum + +GET_DEVICES_URL = "{:s}://{:s}:{:d}/tfs-api/devices" +GET_LINKS_URL = "{:s}://{:s}:{:d}/tfs-api/links" +L3VPN_URL = "{:s}://{:s}:{:d}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" +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_532": 5, + "DEVICEDRIVER_XR": 6, + "DEVICEDRIVER_IETF_L2VPN": 7, + "DEVICEDRIVER_GNMI_OPENCONFIG": 8, + "DEVICEDRIVER_OPTICAL_TFS": 9, + "DEVICEDRIVER_IETF_ACTN": 10, + "DEVICEDRIVER_OC": 11, +} + +MSG_ERROR = "Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}" + +LOGGER = logging.getLogger(__name__) + + +class TfsApiClient: + def __init__( + self, + address: str, + port: int, + scheme: str = "http", + username: Optional[str] = None, + password: Optional[str] = None, + ) -> None: + self._devices_url = GET_DEVICES_URL.format(scheme, address, port) + self._links_url = GET_LINKS_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, import_topology: ImportTopologyEnum = ImportTopologyEnum.DEVICES + ) -> List[Dict]: + LOGGER.debug("[get_devices_endpoints] begin") + LOGGER.debug( + "[get_devices_endpoints] import_topology={:s}".format(str(import_topology)) + ) + + reply = requests.get( + self._devices_url, timeout=TIMEOUT, verify=False, auth=self._auth + ) + if reply.status_code not in HTTP_OK_CODES: + msg = MSG_ERROR.format( + str(self._devices_url), str(reply.status_code), str(reply) + ) + LOGGER.error(msg) + raise Exception(msg) + + if import_topology == ImportTopologyEnum.DISABLED: + raise Exception( + "Unsupported import_topology mode: {:s}".format(str(import_topology)) + ) + + 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"] + 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)) + + if import_topology == ImportTopologyEnum.DEVICES: + LOGGER.debug("[get_devices_endpoints] devices only; returning") + return result + + reply = requests.get( + self._links_url, timeout=TIMEOUT, verify=False, auth=self._auth + ) + if reply.status_code not in HTTP_OK_CODES: + msg = MSG_ERROR.format( + str(self._links_url), str(reply.status_code), str(reply) + ) + LOGGER.error(msg) + raise Exception(msg) + + for json_link in reply.json()["links"]: + link_uuid: str = json_link["link_id"]["link_uuid"]["uuid"] + link_url = "/links/link[{:s}]".format(link_uuid) + link_endpoint_ids = [ + ( + json_endpoint_id["device_id"]["device_uuid"]["uuid"], + json_endpoint_id["endpoint_uuid"]["uuid"], + ) + for json_endpoint_id in json_link["link_endpoint_ids"] + ] + link_data = { + "uuid": json_link["link_id"]["link_uuid"]["uuid"], + "name": json_link["name"], + "endpoints": link_endpoint_ids, + } + result.append((link_url, link_data)) + + LOGGER.debug("[get_devices_endpoints] topology; returning") + return result + + def create_connectivity_service(self, l3vpn_data: dict) -> None: + try: + requests.post(L3VPN_URL, json=l3vpn_data, auth=self._auth) + except requests.exceptions.ConnectionError: + raise Exception("faild to send post request to TFS L3VPN NBI") + + def delete_connectivity_service(self, service_uuid: str) -> None: + url = L3VPN_URL + f"/vpn-service={service_uuid}" + try: + requests.delete(url, auth=self._auth) + except requests.exceptions.ConnectionError: + raise Exception("faild to send delete request to TFS L3VPN NBI") diff --git a/src/device/service/drivers/ietf_l3vpn/Tools.py b/src/device/service/drivers/ietf_l3vpn/Tools.py new file mode 100644 index 000000000..8930cde00 --- /dev/null +++ b/src/device/service/drivers/ietf_l3vpn/Tools.py @@ -0,0 +1,284 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import TypedDict + +import requests + + +class LANPrefixesDict(TypedDict): + lan: str + lan_tag: str + + +LOGGER = logging.getLogger(__name__) + +SITE_NETWORK_ACCESS_TYPE = "ietf-l3vpn-svc:multipoint" + + +def service_exists(wim_url: str, auth, service_uuid: str) -> bool: + try: + get_connectivity_service(wim_url, auth, service_uuid) + return True + except: # pylint: disable=bare-except + return False + + +def get_all_active_connectivity_services(wim_url: str, auth): + try: + LOGGER.info("Sending get all connectivity services") + servicepoint = f"{wim_url}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" + response = requests.get(servicepoint, auth=auth) + + if response.status_code != requests.codes.ok: + raise Exception( + "Unable to get all connectivity services", + http_code=response.status_code, + ) + + return response + except requests.exceptions.ConnectionError: + raise Exception("Request Timeout", http_code=408) + + +def get_connectivity_service(wim_url, auth, service_uuid): + try: + LOGGER.info("Sending get connectivity service") + servicepoint = f"{wim_url}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-service={service_uuid}" + + response = requests.get(servicepoint, auth=auth) + + if response.status_code != requests.codes.ok: + raise Exception( + "Unable to get connectivity service{:s}".format(str(service_uuid)), + http_code=response.status_code, + ) + + return response + except requests.exceptions.ConnectionError: + raise Exception("Request Timeout", http_code=408) + + +def create_l3vpn_datamodel(service_uuid, resource_value: dict) -> dict: + src_device_uuid: str = resource_value["src_device_name"] + src_endpoint_uuid: str = resource_value["src_endpoint_name"] + src_site_location: str = resource_value["src_site_location"] + src_ipv4_lan_prefixes: list[LANPrefixesDict] = resource_value.get( + "src_ipv4_lan_prefixes" + ) + src_site_id: str = resource_value.get("src_site_id", f"site_{src_site_location}") + src_management_type: str = resource_value.get( + "src_management_type", "ietf-l3vpn-svc:provider-managed" + ) + if src_management_type != "ietf-l3vpn-svc:provider-managed": + raise Exception("management type %s not supported", src_management_type) + src_role: str = "ietf-l3vpn-svc:hub-role" + src_ce_address: str = resource_value["src_ce_address"] + src_pe_address: str = resource_value["src_pe_address"] + src_ce_pe_network_prefix: int = resource_value["src_ce_pe_network_prefix"] + src_mtu: int = resource_value["src_mtu"] + src_input_bw: int = resource_value["src_input_bw"] + src_output_bw: int = resource_value["src_output_bw"] + src_qos_profile_id: str = resource_value["src_qos_profile_id"] + src_qos_profile_direction: str = resource_value["src_qos_profile_direction"] + src_qos_profile_latency: int = resource_value["src_qos_profile_latency"] + src_qos_profile_bw_guarantee: int = resource_value["src_qos_profile_bw_guarantee"] + + dst_device_uuid = resource_value["dst_device_name"] + dst_endpoint_uuid = resource_value["dst_endpoint_name"] + dst_site_location: str = resource_value["dst_site_location"] + dst_ipv4_lan_prefixes: list[LANPrefixesDict] = resource_value.get( + "dst_ipv4_lan_prefixes" + ) + dst_site_id: str = resource_value.get("dst_site_id", f"site_{dst_site_location}") + dst_management_type: str = resource_value.get( + "dst_management_type", "ietf-l3vpn-svc:provider-managed" + ) + if dst_management_type != "ietf-l3vpn-svc:provider-managed": + raise Exception("management type %s not supported", dst_management_type) + dst_role: str = "ietf-l3vpn-svc:spoke-role" + dst_ce_address: str = resource_value["dst_ce_address"] + dst_pe_address: str = resource_value["dst_pe_address"] + dst_ce_pe_network_prefix: int = resource_value["dst_ce_pe_network_prefix"] + dst_mtu: int = resource_value["dst_mtu"] + dst_input_bw: int = resource_value["dst_input_bw"] + dst_output_bw: int = resource_value["dst_output_bw"] + dst_qos_profile_id: str = resource_value["dst_qos_profile_id"] + dst_qos_profile_direction: str = resource_value["dst_qos_profile_direction"] + dst_qos_profile_latency: int = resource_value["dst_qos_profile_latency"] + dst_qos_profile_bw_guarantee: int = resource_value["dst_qos_profile_bw_guarantee"] + + # Create source site information + src_management = {"type": "ietf-l3vpn-svc:provider-managed"} + src_locations = {"location": [{"location-id": src_site_location}]} + src_devices = { + "device": [{"device-id": src_device_uuid, "location": src_site_location}] + } + src_site_lan_prefixes = [ + {"lan": lp["lan"], "lan-tag": lp["lan_tag"], "next-hop": src_ce_address} + for lp in src_ipv4_lan_prefixes + ] + src_site_routing_protocols = { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": src_site_lan_prefixes + } + }, + } + ] + } + src_site_network_accesses = { + "site-network-access": [ + { + "site-network-access-id": src_endpoint_uuid, + "site-network-access-type": SITE_NETWORK_ACCESS_TYPE, + "device-reference": src_device_uuid, + "vpn-attachment": {"vpn-id": service_uuid, "site-role": src_role}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": src_pe_address, + "customer-address": src_ce_address, + "prefix-length": src_ce_pe_network_prefix, + }, + } + }, + "service": { + "svc-mtu": src_mtu, + "svc-input-bandwidth": src_input_bw, + "svc-output-bandwidth": src_output_bw, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": src_qos_profile_id, + "direction": src_qos_profile_direction, + "latency": { + "latency-boundary": src_qos_profile_latency + }, + "bandwidth": { + "guaranteed-bw-percent": src_qos_profile_bw_guarantee + }, + } + ] + } + } + }, + }, + } + ] + } + + # Create destination site information + dst_management = {"type": "ietf-l3vpn-svc:provider-managed"} + dst_locations = {"location": [{"location-id": dst_site_location}]} + dst_devices = { + "device": [{"device-id": dst_device_uuid, "location": dst_site_location}] + } + dst_site_lan_prefixes = [ + {"lan": lp["lan"], "lan-tag": lp["lan_tag"], "next-hop": dst_ce_address} + for lp in dst_ipv4_lan_prefixes + ] + dst_site_routing_protocols = { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": dst_site_lan_prefixes + } + }, + } + ] + } + dst_site_network_accesses = { + "site-network-access": [ + { + "site-network-access-id": dst_endpoint_uuid, + "site-network-access-type": SITE_NETWORK_ACCESS_TYPE, + "device-reference": dst_device_uuid, + "vpn-attachment": {"vpn-id": service_uuid, "site-role": dst_role}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": dst_pe_address, + "customer-address": dst_ce_address, + "prefix-length": dst_ce_pe_network_prefix, + }, + } + }, + "service": { + "svc-mtu": dst_mtu, + "svc-input-bandwidth": dst_input_bw, + "svc-output-bandwidth": dst_output_bw, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": dst_qos_profile_id, + "direction": dst_qos_profile_direction, + "latency": { + "latency-boundary": dst_qos_profile_latency + }, + "bandwidth": { + "guaranteed-bw-percent": dst_qos_profile_bw_guarantee + }, + } + ] + } + } + }, + }, + } + ] + } + + sites = { + "site": [ + { + "site-id": src_site_id, + "management": src_management, + "locations": src_locations, + "devices": src_devices, + "routing-protocols": src_site_routing_protocols, + "site-network-accesses": src_site_network_accesses, + }, + { + { + "site-id": dst_site_id, + "management": dst_management, + "locations": dst_locations, + "devices": dst_devices, + "routing-protocols": dst_site_routing_protocols, + "site-network-accesses": dst_site_network_accesses, + }, + }, + ] + } + + l3_vpn_data_model = { + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": {"vpn-service": [{"vpn-id": service_uuid}]}, + "sites": sites, + } + } + + return l3_vpn_data_model diff --git a/src/device/service/drivers/ietf_l3vpn/__init__.py b/src/device/service/drivers/ietf_l3vpn/__init__.py new file mode 100644 index 000000000..bbfc943b6 --- /dev/null +++ b/src/device/service/drivers/ietf_l3vpn/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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_l3vpn/driver.py b/src/device/service/drivers/ietf_l3vpn/driver.py new file mode 100644 index 000000000..3d3fa2299 --- /dev/null +++ b/src/device/service/drivers/ietf_l3vpn/driver.py @@ -0,0 +1,240 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 threading +from typing import Any, Iterator, List, Optional, Tuple, Union + +import requests +from requests.auth import HTTPBasicAuth + +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.type_checkers.Checkers import chk_string, chk_type +from device.service.driver_api._Driver import ( + RESOURCE_ENDPOINTS, + RESOURCE_SERVICES, + _Driver, +) +from device.service.driver_api.ImportTopologyEnum import ( + ImportTopologyEnum, + get_import_topology, +) + +from .TfsApiClient import TfsApiClient +from .Tools import ( + create_l3vpn_datamodel, + get_all_active_connectivity_services, + get_connectivity_service, + service_exists, +) + +LOGGER = logging.getLogger(__name__) + + +ALL_RESOURCE_KEYS = [ + RESOURCE_ENDPOINTS, + RESOURCE_SERVICES, +] + +DRIVER_NAME = "ietf_l3vpn" +METRICS_POOL = MetricsPool("Device", "Driver", labels={"driver": DRIVER_NAME}) + + +class IetfL3VpnDriver(_Driver): + def __init__(self, address: str, port: int, **settings) -> None: + super().__init__(DRIVER_NAME, address, port, **settings) + self.__lock = threading.Lock() + self.__started = threading.Event() + self.__terminate = threading.Event() + scheme = self.settings.get("scheme", "http") + username = self.settings.get("username") + password = self.settings.get("password") + self.tac = TfsApiClient( + self.address, + int(self.port), + scheme=scheme, + username=username, + password=password, + ) + self.__auth = ( + HTTPBasicAuth(username, password) + if username is not None and password is not None + else None + ) + self.__tfs_nbi_root = "{:s}://{:s}:{:d}".format( + scheme, self.address, int(self.port) + ) + self.__timeout = int(self.settings.get("timeout", 120)) + self.__import_topology = get_import_topology( + self.settings, default=ImportTopologyEnum.DEVICES + ) + + def Connect(self) -> bool: + url = ( + self.__tfs_nbi_root + "/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" + ) + with self.__lock: + if self.__started.is_set(): + return True + try: + requests.get( + url, timeout=self.__timeout, verify=False, auth=self.__auth + ) + except requests.exceptions.Timeout: + LOGGER.exception( + "Timeout connecting {:s}".format(str(self.__tapi_root)) + ) + return False + except Exception: # pylint: disable=broad-except + LOGGER.exception( + "Exception connecting {:s}".format(str(self.__tapi_root)) + ) + 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: + 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 TFS NBI API and list-devices method + results.extend( + self.tac.get_devices_endpoints(self.__import_topology) + ) + elif resource_key == RESOURCE_SERVICES: + # return all services through + reply = get_all_active_connectivity_services( + wim_url=self.__tfs_nbi_root, auth=self.__auth + ) + results.extend(reply.json()) + else: + # assume single-service retrieval + reply = get_connectivity_service( + self.__tfs_nbi_root, 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: + 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"] #! fix based on resources + + if service_exists(self.__tfs_nbi_root, self.__auth, service_uuid): + exc = NotImplementedError( + "IETF L3VPN Service Update is still not supported" + ) + results.append((resource[0], exc)) + continue + + l3vpn_datamodel = create_l3vpn_datamodel( + service_uuid, resource_value + ) + self.tac.create_connectivity_service(l3vpn_datamodel) + 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: + 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.__tfs_nbi_root, self.__auth, service_uuid): + self.tac.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 L3VPN 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 L3VPN 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 L3VPN does not support monitoring by now + return [] -- GitLab From 9e77e349c9f7d72fa8408b66c3296032bd2cfe0b Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 2 Nov 2024 18:17:43 +0100 Subject: [PATCH 021/463] l3vpn debug & feat: - l3vpn driver debuged and refactored - emulted device driver features added to l3vpn driver onboarding - test_unitary_ietf_l3vpn.py added --- .../service/drivers/ietf_l3vpn/Constants.py | 25 ++ .../drivers/ietf_l3vpn/TfsApiClient.py | 5 +- .../service/drivers/ietf_l3vpn/Tools.py | 186 ++++++++-- .../service/drivers/ietf_l3vpn/driver.py | 111 ++++-- src/device/tests/test_unitary_ietf_l3vpn.py | 345 ++++++++++++++++++ 5 files changed, 612 insertions(+), 60 deletions(-) create mode 100644 src/device/service/drivers/ietf_l3vpn/Constants.py create mode 100644 src/device/tests/test_unitary_ietf_l3vpn.py diff --git a/src/device/service/drivers/ietf_l3vpn/Constants.py b/src/device/service/drivers/ietf_l3vpn/Constants.py new file mode 100644 index 000000000..df66eb16b --- /dev/null +++ b/src/device/service/drivers/ietf_l3vpn/Constants.py @@ -0,0 +1,25 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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, +) + +SPECIAL_RESOURCE_MAPPINGS = { + RESOURCE_ENDPOINTS: "/endpoints", + RESOURCE_INTERFACES: "/interfaces", + RESOURCE_NETWORK_INSTANCES: "/net-instances", +} diff --git a/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py index 86ee2b1be..661907a73 100644 --- a/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py +++ b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py @@ -69,6 +69,7 @@ class TfsApiClient: ) -> None: self._devices_url = GET_DEVICES_URL.format(scheme, address, port) self._links_url = GET_LINKS_URL.format(scheme, address, port) + self._l3vph_url = L3VPN_URL.format(scheme, address, port) self._auth = ( HTTPBasicAuth(username, password) if username is not None and password is not None @@ -162,12 +163,12 @@ class TfsApiClient: def create_connectivity_service(self, l3vpn_data: dict) -> None: try: - requests.post(L3VPN_URL, json=l3vpn_data, auth=self._auth) + requests.post(self._l3vph_url, json=l3vpn_data, auth=self._auth) except requests.exceptions.ConnectionError: raise Exception("faild to send post request to TFS L3VPN NBI") def delete_connectivity_service(self, service_uuid: str) -> None: - url = L3VPN_URL + f"/vpn-service={service_uuid}" + url = self._l3vph_url + f"/vpn-service={service_uuid}" try: requests.delete(url, auth=self._auth) except requests.exceptions.ConnectionError: diff --git a/src/device/service/drivers/ietf_l3vpn/Tools.py b/src/device/service/drivers/ietf_l3vpn/Tools.py index 8930cde00..bf9c40732 100644 --- a/src/device/service/drivers/ietf_l3vpn/Tools.py +++ b/src/device/service/drivers/ietf_l3vpn/Tools.py @@ -12,10 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. import logging -from typing import TypedDict +from typing import Any, Dict, Optional, Tuple, TypedDict import requests +from common.proto.kpi_sample_types_pb2 import KpiSampleType +from common.type_checkers.Checkers import chk_attribute, chk_string, chk_type +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS + +from .Constants import SPECIAL_RESOURCE_MAPPINGS + class LANPrefixesDict(TypedDict): lan: str @@ -79,54 +85,66 @@ def create_l3vpn_datamodel(service_uuid, resource_value: dict) -> dict: ) src_site_id: str = resource_value.get("src_site_id", f"site_{src_site_location}") src_management_type: str = resource_value.get( - "src_management_type", "ietf-l3vpn-svc:provider-managed" + "src_management_type", "ietf-l3vpn-svc:customer-managed" ) - if src_management_type != "ietf-l3vpn-svc:provider-managed": + if src_management_type != "ietf-l3vpn-svc:customer-managed": raise Exception("management type %s not supported", src_management_type) src_role: str = "ietf-l3vpn-svc:hub-role" src_ce_address: str = resource_value["src_ce_address"] src_pe_address: str = resource_value["src_pe_address"] src_ce_pe_network_prefix: int = resource_value["src_ce_pe_network_prefix"] src_mtu: int = resource_value["src_mtu"] - src_input_bw: int = resource_value["src_input_bw"] - src_output_bw: int = resource_value["src_output_bw"] - src_qos_profile_id: str = resource_value["src_qos_profile_id"] - src_qos_profile_direction: str = resource_value["src_qos_profile_direction"] - src_qos_profile_latency: int = resource_value["src_qos_profile_latency"] - src_qos_profile_bw_guarantee: int = resource_value["src_qos_profile_bw_guarantee"] + src_input_bw: int = resource_value.get("src_input_bw", 1000000000) + src_output_bw: int = resource_value.get("src_input_bw", 1000000000) + src_qos_profile_id: str = resource_value.get( + "src_qos_profile_id", "src_qos_profile" + ) + src_qos_profile_direction: str = ( + resource_value.get("src_qos_profile_direction", "ietf-l3vpn-svc:both"), + ) + src_qos_profile_latency: int = resource_value.get("src_qos_profile_latency", 10) + src_qos_profile_bw_guarantee: int = resource_value.get( + "src_qos_profile_bw_guarantee", 100 + ) dst_device_uuid = resource_value["dst_device_name"] dst_endpoint_uuid = resource_value["dst_endpoint_name"] dst_site_location: str = resource_value["dst_site_location"] - dst_ipv4_lan_prefixes: list[LANPrefixesDict] = resource_value.get( + dst_ipv4_lan_prefixes: list[LANPrefixesDict] = resource_value[ "dst_ipv4_lan_prefixes" - ) + ] dst_site_id: str = resource_value.get("dst_site_id", f"site_{dst_site_location}") dst_management_type: str = resource_value.get( - "dst_management_type", "ietf-l3vpn-svc:provider-managed" + "dst_management_type", "ietf-l3vpn-svc:customer-managed" ) - if dst_management_type != "ietf-l3vpn-svc:provider-managed": + if dst_management_type != "ietf-l3vpn-svc:customer-managed": raise Exception("management type %s not supported", dst_management_type) dst_role: str = "ietf-l3vpn-svc:spoke-role" dst_ce_address: str = resource_value["dst_ce_address"] dst_pe_address: str = resource_value["dst_pe_address"] dst_ce_pe_network_prefix: int = resource_value["dst_ce_pe_network_prefix"] dst_mtu: int = resource_value["dst_mtu"] - dst_input_bw: int = resource_value["dst_input_bw"] - dst_output_bw: int = resource_value["dst_output_bw"] - dst_qos_profile_id: str = resource_value["dst_qos_profile_id"] - dst_qos_profile_direction: str = resource_value["dst_qos_profile_direction"] - dst_qos_profile_latency: int = resource_value["dst_qos_profile_latency"] - dst_qos_profile_bw_guarantee: int = resource_value["dst_qos_profile_bw_guarantee"] + dst_input_bw: int = resource_value.get("dst_input_bw", 1000000000) + dst_output_bw: int = resource_value.get("dst_output_bw", 1000000000) + dst_qos_profile_id: str = resource_value.get( + "dst_qos_profile_id", "dst_qos_profile" + ) + dst_qos_profile_direction: str = ( + resource_value.get("dst_qos_profile_direction", "ietf-l3vpn-svc:both"), + ) + dst_qos_profile_latency: int = resource_value.get("dst_qos_profile_latency", 10) + dst_qos_profile_bw_guarantee: int = resource_value.get( + "dst_qos_profile_bw_guarantee", 100 + ) # Create source site information - src_management = {"type": "ietf-l3vpn-svc:provider-managed"} + src_management = {"type": src_management_type} src_locations = {"location": [{"location-id": src_site_location}]} src_devices = { "device": [{"device-id": src_device_uuid, "location": src_site_location}] } src_site_lan_prefixes = [ - {"lan": lp["lan"], "lan-tag": lp["lan_tag"], "next-hop": src_ce_address} + {"lan": lp["lan"], "lan-tag": lp["lan_tag"], "next-hop": src_pe_address} for lp in src_ipv4_lan_prefixes ] src_site_routing_protocols = { @@ -186,13 +204,13 @@ def create_l3vpn_datamodel(service_uuid, resource_value: dict) -> dict: } # Create destination site information - dst_management = {"type": "ietf-l3vpn-svc:provider-managed"} + dst_management = {"type": src_management_type} dst_locations = {"location": [{"location-id": dst_site_location}]} dst_devices = { "device": [{"device-id": dst_device_uuid, "location": dst_site_location}] } dst_site_lan_prefixes = [ - {"lan": lp["lan"], "lan-tag": lp["lan_tag"], "next-hop": dst_ce_address} + {"lan": lp["lan"], "lan-tag": lp["lan_tag"], "next-hop": dst_pe_address} for lp in dst_ipv4_lan_prefixes ] dst_site_routing_protocols = { @@ -262,14 +280,12 @@ def create_l3vpn_datamodel(service_uuid, resource_value: dict) -> dict: "site-network-accesses": src_site_network_accesses, }, { - { - "site-id": dst_site_id, - "management": dst_management, - "locations": dst_locations, - "devices": dst_devices, - "routing-protocols": dst_site_routing_protocols, - "site-network-accesses": dst_site_network_accesses, - }, + "site-id": dst_site_id, + "management": dst_management, + "locations": dst_locations, + "devices": dst_devices, + "routing-protocols": dst_site_routing_protocols, + "site-network-accesses": dst_site_network_accesses, }, ] } @@ -282,3 +298,111 @@ def create_l3vpn_datamodel(service_uuid, resource_value: dict) -> dict: } return l3_vpn_data_model + + +def process_optional_string_field( + endpoint_data: Dict[str, Any], + field_name: str, + endpoint_resource_value: Dict[str, Any], +) -> None: + field_value = chk_attribute( + field_name, endpoint_data, "endpoint_data", default=None + ) + if field_value is None: + return + chk_string("endpoint_data.{:s}".format(field_name), field_value) + if len(field_value) > 0: + endpoint_resource_value[field_name] = field_value + + +def compose_resource_endpoint( + endpoint_data: Dict[str, Any], +) -> Optional[Tuple[str, Dict]]: + try: + # Check type of endpoint_data + chk_type("endpoint_data", endpoint_data, dict) + + # Check endpoint UUID (mandatory) + endpoint_uuid = chk_attribute("uuid", endpoint_data, "endpoint_data") + chk_string("endpoint_data.uuid", endpoint_uuid, min_length=1) + endpoint_resource_path = SPECIAL_RESOURCE_MAPPINGS.get(RESOURCE_ENDPOINTS) + endpoint_resource_key = "{:s}/endpoint[{:s}]".format( + endpoint_resource_path, endpoint_uuid + ) + endpoint_resource_value = {"uuid": endpoint_uuid} + + # Check endpoint optional string fields + process_optional_string_field(endpoint_data, "name", endpoint_resource_value) + process_optional_string_field(endpoint_data, "type", endpoint_resource_value) + process_optional_string_field( + endpoint_data, "context_uuid", endpoint_resource_value + ) + process_optional_string_field( + endpoint_data, "topology_uuid", endpoint_resource_value + ) + + # Check endpoint sample types (optional) + endpoint_sample_types = chk_attribute( + "sample_types", endpoint_data, "endpoint_data", default=[] + ) + chk_type("endpoint_data.sample_types", endpoint_sample_types, list) + sample_types = {} + sample_type_errors = [] + for i, endpoint_sample_type in enumerate(endpoint_sample_types): + field_name = "endpoint_data.sample_types[{:d}]".format(i) + try: + chk_type(field_name, endpoint_sample_type, (int, str)) + if isinstance(endpoint_sample_type, int): + metric_name = KpiSampleType.Name(endpoint_sample_type) + metric_id = endpoint_sample_type + elif isinstance(endpoint_sample_type, str): + metric_id = KpiSampleType.Value(endpoint_sample_type) + metric_name = endpoint_sample_type + else: + str_type = str(type(endpoint_sample_type)) + raise Exception("Bad format: {:s}".format(str_type)) # pylint: disable=broad-exception-raised + except Exception as e: # pylint: disable=broad-exception-caught + MSG = "Unsupported {:s}({:s}) : {:s}" + sample_type_errors.append( + MSG.format(field_name, str(endpoint_sample_type), str(e)) + ) + + metric_name = metric_name.lower().replace("kpisampletype_", "") + monitoring_resource_key = "{:s}/state/{:s}".format( + endpoint_resource_key, metric_name + ) + sample_types[metric_id] = monitoring_resource_key + + if len(sample_type_errors) > 0: + # pylint: disable=broad-exception-raised + raise Exception( + "Malformed Sample Types:\n{:s}".format("\n".join(sample_type_errors)) + ) + + if len(sample_types) > 0: + endpoint_resource_value["sample_types"] = sample_types + + if "location" in endpoint_data: + endpoint_resource_value["location"] = endpoint_data["location"] + + if "ce-ip" in endpoint_data: + endpoint_resource_value["ce-ip"] = endpoint_data["ce-ip"] + + if "address_ip" in endpoint_data: + endpoint_resource_value["address_ip"] = endpoint_data["address_ip"] + + if "address_prefix" in endpoint_data: + endpoint_resource_value["address_prefix"] = endpoint_data["address_prefix"] + + if "mtu" in endpoint_data: + endpoint_resource_value["mtu"] = endpoint_data["mtu"] + + if "ipv4_lan_prefixes" in endpoint_data: + endpoint_resource_value["ipv4_lan_prefixes"] = endpoint_data[ + "ipv4_lan_prefixes" + ] + + return endpoint_resource_key, endpoint_resource_value + except: # pylint: disable=bare-except + LOGGER.exception("Problem composing endpoint({:s})".format(str(endpoint_data))) + return None diff --git a/src/device/service/drivers/ietf_l3vpn/driver.py b/src/device/service/drivers/ietf_l3vpn/driver.py index 3d3fa2299..e81736d43 100644 --- a/src/device/service/drivers/ietf_l3vpn/driver.py +++ b/src/device/service/drivers/ietf_l3vpn/driver.py @@ -14,29 +14,37 @@ import json import logging +import re import threading from typing import Any, Iterator, List, Optional, Tuple, Union +import anytree import requests from requests.auth import HTTPBasicAuth from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method -from common.type_checkers.Checkers import chk_string, chk_type +from common.type_checkers.Checkers import chk_length, chk_string, chk_type from device.service.driver_api._Driver import ( RESOURCE_ENDPOINTS, RESOURCE_SERVICES, _Driver, ) +from device.service.driver_api.AnyTreeTools import ( + TreeNode, + dump_subtree, + get_subnode, + set_subnode_value, +) from device.service.driver_api.ImportTopologyEnum import ( ImportTopologyEnum, get_import_topology, ) +from .Constants import SPECIAL_RESOURCE_MAPPINGS from .TfsApiClient import TfsApiClient from .Tools import ( + compose_resource_endpoint, create_l3vpn_datamodel, - get_all_active_connectivity_services, - get_connectivity_service, service_exists, ) @@ -48,6 +56,8 @@ ALL_RESOURCE_KEYS = [ RESOURCE_SERVICES, ] +RE_GET_ENDPOINT_FROM_INTERFACE = re.compile(r"^\/interface\[([^\]]+)\].*") + DRIVER_NAME = "ietf_l3vpn" METRICS_POOL = MetricsPool("Device", "Driver", labels={"driver": DRIVER_NAME}) @@ -58,12 +68,13 @@ class IetfL3VpnDriver(_Driver): self.__lock = threading.Lock() self.__started = threading.Event() self.__terminate = threading.Event() + self.__running = TreeNode(".") scheme = self.settings.get("scheme", "http") username = self.settings.get("username") password = self.settings.get("password") self.tac = TfsApiClient( self.address, - int(self.port), + self.port, scheme=scheme, username=username, password=password, @@ -80,6 +91,52 @@ class IetfL3VpnDriver(_Driver): self.__import_topology = get_import_topology( self.settings, default=ImportTopologyEnum.DEVICES ) + endpoints = self.settings.get("endpoints", []) + endpoint_resources = [] + for endpoint in endpoints: + endpoint_resource = compose_resource_endpoint(endpoint) + if endpoint_resource is None: + continue + endpoint_resources.append(endpoint_resource) + self._set_initial_config(endpoint_resources) + + def _set_initial_config( + self, resources: List[Tuple[str, Any]] + ) -> List[Union[bool, Exception]]: + chk_type("resources", resources, list) + if len(resources) == 0: + return [] + results = [] + resolver = anytree.Resolver(pathattr="name") + with self.__lock: + for i, resource in enumerate(resources): + str_resource_name = "resources[#{:d}]".format(i) + try: + chk_type(str_resource_name, resource, (list, tuple)) + chk_length(str_resource_name, resource, min_length=2, max_length=2) + resource_key, resource_value = resource + chk_string(str_resource_name, resource_key, allow_empty=False) + resource_path = resource_key.split("/") + except Exception as e: # pylint: disable=broad-except + LOGGER.exception( + "Exception validating {:s}: {:s}".format( + str_resource_name, str(resource_key) + ) + ) + results.append(e) # if validation fails, store the exception + continue + + try: + resource_value = json.loads(resource_value) + except: # pylint: disable=bare-except + pass + + set_subnode_value( + resolver, self.__running, resource_path, resource_value + ) + + results.append(True) + return results def Connect(self) -> bool: url = ( @@ -121,38 +178,38 @@ class IetfL3VpnDriver(_Driver): self, resource_keys: List[str] = [] ) -> List[Tuple[str, Union[Any, None, Exception]]]: chk_type("resources", resource_keys, list) - results = [] with self.__lock: if len(resource_keys) == 0: - resource_keys = ALL_RESOURCE_KEYS + return dump_subtree(self.__running) + results = [] + resolver = anytree.Resolver(pathattr="name") 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 TFS NBI API and list-devices method - results.extend( - self.tac.get_devices_endpoints(self.__import_topology) - ) - elif resource_key == RESOURCE_SERVICES: - # return all services through - reply = get_all_active_connectivity_services( - wim_url=self.__tfs_nbi_root, auth=self.__auth - ) - results.extend(reply.json()) - else: - # assume single-service retrieval - reply = get_connectivity_service( - self.__tfs_nbi_root, resource_key - ) - results.append(reply.json()) + resource_key = SPECIAL_RESOURCE_MAPPINGS.get( + resource_key, resource_key + ) + resource_path = resource_key.split("/") except Exception as e: # pylint: disable=broad-except LOGGER.exception( - "Unhandled error processing resource_key({:s})".format( - str(resource_key) + "Exception validating {:s}: {:s}".format( + str_resource_name, str(resource_key) ) ) - results.append((resource_key, e)) + results.append( + (resource_key, e) + ) # if validation fails, store the exception + continue + + resource_node = get_subnode( + resolver, self.__running, resource_path, default=None + ) + # if not found, resource_node is None + if resource_node is None: + continue + results.extend(dump_subtree(resource_node)) + return results return results @metered_subclass_method(METRICS_POOL) @@ -169,7 +226,7 @@ class IetfL3VpnDriver(_Driver): try: resource_value = json.loads(resource_value) - service_uuid = resource_value["uuid"] #! fix based on resources + service_uuid = resource_value["uuid"] if service_exists(self.__tfs_nbi_root, self.__auth, service_uuid): exc = NotImplementedError( diff --git a/src/device/tests/test_unitary_ietf_l3vpn.py b/src/device/tests/test_unitary_ietf_l3vpn.py new file mode 100644 index 000000000..8683c3454 --- /dev/null +++ b/src/device/tests/test_unitary_ietf_l3vpn.py @@ -0,0 +1,345 @@ +import json +from json import dumps + +import requests + +from device.service.drivers.ietf_l3vpn.driver import IetfL3VpnDriver +from device.service.Tools import RESOURCE_ENDPOINTS + +settings = { + "endpoints": [ + { + "uuid": "access-pe", + "name": "access-pe", + "type": "copper", + "ce-ip": "1.1.1.1", + "address_ip": "3.3.2.1", + "address_prefix": 24, + "location": "access", + "mtu": 1500, + "ipv4_lan_prefixes": [ + {"lan": "128.32.10.0/24", "lan_tag": 10}, + {"lan": "128.32.20.0/24", "lan_tag": 20}, + ], + }, + { + "uuid": "cloud-pe", + "name": "cloud-pe", + "type": "copper", + "ce-ip": "1.1.1.1", + "address_ip": "3.3.2.1", + "address_prefix": 24, + "location": "cloud", + "mtu": 1500, + "ipv4_lan_prefixes": [{"lan": "172.1.101.0/24", "lan_tag": 101}], + }, + ], + "scheme": "http", + "username": "admin", + "password": "admin", + "base_url": "/restconf/v2/data", + "timeout": 120, + "verify": False, +} + +post_request_data = [] +get_request_data = [] + + +def mock_post(*args, **kwargs): + post_request_data.append((args, kwargs)) + + +def mock_get(*args, **kwargs): + get_request_data.append((args, kwargs)) + + +driver = IetfL3VpnDriver(address="1.2.3.4", port=0, **settings) + + +def test_connect(monkeypatch): + global post_request_data + global get_request_data + post_request_data = [] + get_request_data = [] + monkeypatch.setattr(requests, "post", mock_post) + monkeypatch.setattr(requests, "get", mock_get) + + driver.Connect() + assert not post_request_data + assert len(get_request_data) == 1 + assert get_request_data[0][0] == ( + "http://1.2.3.4:0/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services", + ) + assert list(get_request_data[0][1].keys()) == ["timeout", "verify", "auth"] + + +def test_GetConfig(monkeypatch): + global post_request_data + global get_request_data + post_request_data = [] + get_request_data = [] + monkeypatch.setattr(requests, "post", mock_post) + monkeypatch.setattr(requests, "get", mock_get) + + resources_to_get = [RESOURCE_ENDPOINTS] + result_GetConfig = driver.GetConfig(resources_to_get) + assert result_GetConfig == [ + ( + "/endpoints/endpoint[access-pe]", + { + "uuid": "access-pe", + "name": "access-pe", + "type": "copper", + "location": "access", + "ce-ip": "1.1.1.1", + "address_ip": "3.3.2.1", + "address_prefix": 24, + "mtu": 1500, + "ipv4_lan_prefixes": [ + {"lan": "128.32.10.0/24", "lan_tag": 10}, + {"lan": "128.32.20.0/24", "lan_tag": 20}, + ], + }, + ), + ( + "/endpoints/endpoint[cloud-pe]", + { + "uuid": "cloud-pe", + "name": "cloud-pe", + "type": "copper", + "location": "cloud", + "ce-ip": "1.1.1.1", + "address_ip": "3.3.2.1", + "address_prefix": 24, + "mtu": 1500, + "ipv4_lan_prefixes": [{"lan": "172.1.101.0/24", "lan_tag": 101}], + }, + ), + ] + + +def test_SetConfig(monkeypatch): + global post_request_data + global get_request_data + post_request_data = [] + get_request_data = [] + monkeypatch.setattr(requests, "post", mock_post) + monkeypatch.setattr(requests, "get", mock_get) + + resources = [ + ( + "/services/service[vpn_A]", + json.dumps( + { + "uuid": "vpn_A", + "src_device_name": "ip-net-controller", + "src_endpoint_name": settings["endpoints"][0]["name"], + "src_site_location": settings["endpoints"][0]["location"], + "src_ipv4_lan_prefixes": settings["endpoints"][0][ + "ipv4_lan_prefixes" + ], + "src_ce_address": settings["endpoints"][0]["ce-ip"], + "src_pe_address": settings["endpoints"][0]["address_ip"], + "src_ce_pe_network_prefix": settings["endpoints"][0][ + "address_prefix" + ], + "src_mtu": settings["endpoints"][0]["mtu"], + "dst_device_name": "ip-net-controller", + "dst_endpoint_name": settings["endpoints"][1]["name"], + "dst_site_location": settings["endpoints"][1]["location"], + "dst_ipv4_lan_prefixes": settings["endpoints"][1][ + "ipv4_lan_prefixes" + ], + "dst_ce_address": settings["endpoints"][1]["ce-ip"], + "dst_pe_address": settings["endpoints"][1]["address_ip"], + "dst_ce_pe_network_prefix": settings["endpoints"][1][ + "address_prefix" + ], + "dst_mtu": settings["endpoints"][1]["mtu"], + } + ), + ) + ] + result_SetConfig = driver.SetConfig(resources) + assert result_SetConfig == [("/services/service[vpn_A]", True)] + assert len(get_request_data) == 1 + assert get_request_data[0][0] == ( + "http://1.2.3.4:0/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-service=vpn_A", + ) + assert len(post_request_data) == 1 + assert post_request_data[0][0] == ( + "http://1.2.3.4:0/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services", + ) + assert post_request_data[0][1]["json"] == { + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": {"vpn-service": [{"vpn-id": "vpn_A"}]}, + "sites": { + "site": [ + { + "site-id": "site_access", + "management": {"type": "ietf-l3vpn-svc:customer-managed"}, + "locations": {"location": [{"location-id": "access"}]}, + "devices": { + "device": [ + { + "device-id": "ip-net-controller", + "location": "access", + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "128.32.10.0/24", + "lan-tag": 10, + "next-hop": "3.3.2.1", + }, + { + "lan": "128.32.20.0/24", + "lan-tag": 20, + "next-hop": "3.3.2.1", + }, + ] + } + }, + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "access-pe", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "ip-net-controller", + "vpn-attachment": { + "vpn-id": "vpn_A", + "site-role": "ietf-l3vpn-svc:hub-role", + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "3.3.2.1", + "customer-address": "1.1.1.1", + "prefix-length": 24, + }, + } + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "src_qos_profile", + "direction": ( + "ietf-l3vpn-svc:both", + ), + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + } + ] + } + } + }, + }, + } + ] + }, + }, + { + "site-id": "site_cloud", + "management": {"type": "ietf-l3vpn-svc:customer-managed"}, + "locations": {"location": [{"location-id": "cloud"}]}, + "devices": { + "device": [ + { + "device-id": "ip-net-controller", + "location": "cloud", + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.101.0/24", + "lan-tag": 101, + "next-hop": "3.3.2.1", + } + ] + } + }, + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "cloud-pe", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "ip-net-controller", + "vpn-attachment": { + "vpn-id": "vpn_A", + "site-role": "ietf-l3vpn-svc:spoke-role", + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "3.3.2.1", + "customer-address": "1.1.1.1", + "prefix-length": 24, + }, + } + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "dst_qos_profile", + "direction": ( + "ietf-l3vpn-svc:both", + ), + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + } + ] + } + } + }, + }, + } + ] + }, + }, + ] + }, + } + } -- GitLab From 158c1050f7c39703eebea64f30a8bd56d1d1d92a Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 2 Nov 2024 21:18:12 +0100 Subject: [PATCH 022/463] feat: L3VPN service handler added --- .../service_handler_api/FilterFields.py | 1 + .../service/service_handlers/__init__.py | 7 + .../L3NM_IETFL3VPN_ServiceHandler.py | 230 ++++++++++++++++++ .../l3nm_ietfl3vpn/__init__.py | 14 ++ 4 files changed, 252 insertions(+) create mode 100644 src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py create mode 100644 src/service/service/service_handlers/l3nm_ietfl3vpn/__init__.py diff --git a/src/service/service/service_handler_api/FilterFields.py b/src/service/service/service_handler_api/FilterFields.py index 494e59e3c..c2a8aae8d 100644 --- a/src/service/service/service_handler_api/FilterFields.py +++ b/src/service/service/service_handler_api/FilterFields.py @@ -44,6 +44,7 @@ DEVICE_DRIVER_VALUES = { DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN, DeviceDriverEnum.DEVICEDRIVER_OC, DeviceDriverEnum.DEVICEDRIVER_QKD, + DeviceDriverEnum.DEVICEDRIVER_IETF_L3VPN, } # 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_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index 3beb7c9ee..7d74e4232 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -16,6 +16,7 @@ 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 .l3nm_ietfl3vpn.L3NM_IETFL3VPN_ServiceHandler import L3NM_IETFL3VPN_ServiceHandler from .l2nm_openconfig.L2NMOpenConfigServiceHandler import L2NMOpenConfigServiceHandler from .l3nm_emulated.L3NMEmulatedServiceHandler import L3NMEmulatedServiceHandler from .l3nm_openconfig.L3NMOpenConfigServiceHandler import L3NMOpenConfigServiceHandler @@ -66,6 +67,12 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN, } ]), + (L3NM_IETFL3VPN_ServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L3NM, + FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_IETF_L3VPN, + } + ]), (TapiServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py new file mode 100644 index 000000000..7957fe76d --- /dev/null +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py @@ -0,0 +1,230 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 +from typing import Any, 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._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.service_handler_api.Tools import ( + get_device_endpoint_uuids, + get_endpoint_matching, +) +from service.service.task_scheduler.TaskExecutor import TaskExecutor + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool("Service", "Handler", labels={"handler": "l3nm_ietf_l3vpn"}) + + +class L3NM_IETFL3VPN_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 + + results = [] + try: + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) + + src_device_obj = self.__task_executor.get_device( + DeviceId(**json_device_id(src_device_uuid)) + ) + src_endpoint_obj = get_endpoint_matching(src_device_obj, src_endpoint_uuid) + src_endpoint_settings = self.__settings_handler.get_endpoint_settings( + src_device_obj, src_endpoint_obj + ).value + + dst_device_uuid, dst_endpoint_uuid = get_device_endpoint_uuids( + endpoints[-1] + ) + dst_device_obj = self.__task_executor.get_device( + DeviceId(**json_device_id(dst_device_uuid)) + ) + dst_endpoint_obj = get_endpoint_matching(dst_device_obj, dst_endpoint_uuid) + dst_endpoint_settings = self.__settings_handler.get_endpoint_settings( + dst_device_obj, dst_endpoint_obj + ).value + + if dst_device_uuid != src_device_uuid: + raise Exception("Different Src-Dst devices not supported by now") + + json_config_rule = json_config_rule_set( + "/services/service[{:s}]".format(service_uuid), + { + "uuid": service_uuid, + "src_device_name": src_device_obj.name, + "src_endpoint_name": src_endpoint_obj.name, + "src_site_location": src_endpoint_settings["location"], + "src_ipv4_lan_prefixes": src_endpoint_settings["ipv4_lan_prefixes"], + "src_ce_address": src_endpoint_settings["ce-ip"], + "src_pe_address": src_endpoint_settings["address_ip"], + "src_ce_pe_network_prefix": src_endpoint_settings["address_prefix"], + "src_mtu": src_endpoint_settings["mtu"], + "dst_device_name": dst_device_obj.name, + "dst_endpoint_name": dst_endpoint_obj.name, + "dst_site_location": dst_endpoint_settings["location"], + "dst_ipv4_lan_prefixes": dst_endpoint_settings["ipv4_lan_prefixes"], + "dst_ce_address": dst_endpoint_settings["ce-ip"], + "dst_pe_address": dst_endpoint_settings["address_ip"], + "dst_ce_pe_network_prefix": dst_endpoint_settings["address_prefix"], + "dst_mtu": dst_endpoint_settings["mtu"], + }, + ) + del src_device_obj.device_config.config_rules[:] + src_device_obj.device_config.config_rules.append( + ConfigRule(**json_config_rule) + ) + self.__task_executor.configure_device(src_device_obj) + 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/l3nm_ietfl3vpn/__init__.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/__init__.py new file mode 100644 index 000000000..3ee6f7071 --- /dev/null +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + -- GitLab From 979117e18b2808a3a6ba1b11aa205bfdb248608d Mon Sep 17 00:00:00 2001 From: mansoca Date: Tue, 5 Nov 2024 11:18:18 +0000 Subject: [PATCH 023/463] deploy --- manifests/e2e_orchestratorservice.yaml | 10 ++- manifests/nbiservice.yaml | 12 ++-- manifests/serviceservice.yaml | 2 +- .../service/drivers/oc_driver/OCDriver.py | 2 +- src/e2e_orchestrator/requirements.in | 1 + .../E2EOrchestratorServiceServicerImpl.py | 39 +++++++++-- .../service/context_subscription/__init__.py | 6 +- .../nbi_plugins/tfs_api/Resources.py | 5 ++ .../nbi_plugins/tfs_api/__init__.py | 53 ++++++++------- src/tests/ecoc24/.gitlab-ci.yml | 31 +++++---- src/tests/ecoc24/deploy_e2e.sh | 5 ++ src/tests/ecoc24/deploy_ip.sh | 5 ++ src/tests/ecoc24/deploy_opt.sh | 6 ++ src/tests/ecoc24/deploy_specs_e2e.sh | 5 +- src/tests/ecoc24/deploy_specs_ip.sh | 4 +- src/tests/ecoc24/deploy_specs_opt.sh | 4 +- ...{link_mapping.json => descriptor_e2e.json} | 3 +- .../ecoc24/descriptors/descriptor_ip.json | 3 +- .../ecoc24/descriptors/descriptor_opt.json | 3 +- .../tests/test_functional_bootstrap_e2e.py | 67 +++++++++++++++++++ ...rap.py => test_functional_bootstrap_ip.py} | 0 .../tests/test_functional_bootstrap_opt.py | 67 +++++++++++++++++++ .../service/VNTManagerServiceServicerImpl.py | 4 +- 23 files changed, 268 insertions(+), 69 deletions(-) rename src/tests/ecoc24/descriptors/{link_mapping.json => descriptor_e2e.json} (99%) create mode 100644 src/tests/ecoc24/tests/test_functional_bootstrap_e2e.py rename src/tests/ecoc24/tests/{test_functional_bootstrap.py => test_functional_bootstrap_ip.py} (100%) create mode 100644 src/tests/ecoc24/tests/test_functional_bootstrap_opt.py diff --git a/manifests/e2e_orchestratorservice.yaml b/manifests/e2e_orchestratorservice.yaml index 893f3464f..21e5d49cb 100644 --- a/manifests/e2e_orchestratorservice.yaml +++ b/manifests/e2e_orchestratorservice.yaml @@ -37,7 +37,7 @@ spec: ports: - containerPort: 10050 - containerPort: 9192 - - containerPort: 8761 + - containerPort: 8762 env: - name: LOG_LEVEL value: "INFO" @@ -49,6 +49,10 @@ spec: value: "e2e-orchestratorservice.tfs-e2e.svc.cluster.local" - name: WS_E2E_PORT value: "8762" + - name: EXT_CONTROLLER1_ADD + value: "10.1.1.96" + - name: EXT_CONTROLLER1_PORT + value: "8003" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:10050"] @@ -81,5 +85,5 @@ spec: port: 9192 targetPort: 9192 - name: ws - port: 8761 - targetPort: 8761 + port: 8762 + targetPort: 8762 diff --git a/manifests/nbiservice.yaml b/manifests/nbiservice.yaml index 72cfde514..ac9c9bec5 100644 --- a/manifests/nbiservice.yaml +++ b/manifests/nbiservice.yaml @@ -38,14 +38,14 @@ spec: - containerPort: 8080 - containerPort: 9090 - containerPort: 9192 - - containerPort: 8762 + - containerPort: 8761 env: - name: LOG_LEVEL value: "INFO" - name: IETF_NETWORK_RENDERER value: "LIBYANG" - - name: WS_E2E_PORT - value: "8762" + - name: WS_IP_PORT + value: "8761" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:9090"] @@ -83,7 +83,7 @@ spec: protocol: TCP port: 9192 targetPort: 9192 - - name: ws + - name: websocket protocol: TCP - port: 8762 - targetPort: 8762 + port: 8761 + targetPort: 8761 diff --git a/manifests/serviceservice.yaml b/manifests/serviceservice.yaml index 1dd383d61..bcfb47ee3 100644 --- a/manifests/serviceservice.yaml +++ b/manifests/serviceservice.yaml @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" + value: "DEBUG" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:3030"] diff --git a/src/device/service/drivers/oc_driver/OCDriver.py b/src/device/service/drivers/oc_driver/OCDriver.py index 6351f26e5..087e58b76 100644 --- a/src/device/service/drivers/oc_driver/OCDriver.py +++ b/src/device/service/drivers/oc_driver/OCDriver.py @@ -300,7 +300,7 @@ class OCDriver(_Driver): self.__netconf_handler, self.__logger, resources, conditions, target='candidate', commit_per_rule=self.__netconf_handler.commit_per_rule ) - else: + else: results = edit_config( self.__netconf_handler, self.__logger, resources, conditions=conditions ) diff --git a/src/e2e_orchestrator/requirements.in b/src/e2e_orchestrator/requirements.in index 5732b1bf0..7ab2d5ded 100644 --- a/src/e2e_orchestrator/requirements.in +++ b/src/e2e_orchestrator/requirements.in @@ -14,3 +14,4 @@ networkx websockets==12.0 +requests==2.27.* diff --git a/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py index 4fc0ea3ba..52b5a21f8 100644 --- a/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py +++ b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py @@ -13,6 +13,7 @@ # limitations under the License. import copy +import requests from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.proto.e2eorchestrator_pb2 import E2EOrchestratorRequest, E2EOrchestratorReply from common.proto.context_pb2 import ( @@ -33,7 +34,7 @@ import networkx as nx from threading import Thread from websockets.sync.client import connect from websockets.sync.server import serve -from common.Constants import DEFAULT_CONTEXT_NAME +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME LOGGER = logging.getLogger(__name__) @@ -98,7 +99,6 @@ class SubscriptionServer(Thread): def _event_received(self, connection): - LOGGER.info("EVENT received!") for message in connection: message_json = json.loads(message) # LOGGER.info("message_json: {}".format(message_json)) @@ -142,7 +142,6 @@ class SubscriptionServer(Thread): connection.send(grpc_message_to_json_string(link)) # Link removal elif 'link_uuid' in message_json: - LOGGER.info('REMOVING VIRTUAL LINK') link_id = LinkId(**message_json) service_id = ServiceId() @@ -153,7 +152,6 @@ class SubscriptionServer(Thread): context_client.RemoveLink(link_id) # Topology received else: - LOGGER.info('TOPOLOGY') topology_details = TopologyDetails(**message_json) context = Context() @@ -181,10 +179,41 @@ class E2EOrchestratorServiceServicerImpl(E2EOrchestratorServiceServicer): sub_server = SubscriptionServer() sub_server.start() LOGGER.debug("Servicer Created") - + self.retrieve_external_topologies() except Exception as ex: LOGGER.info("Exception!: {}".format(ex)) + def retrieve_external_topologies(self): + i = 1 + while True: + try: + LOGGER.info(f'Retrieving external controller #{i}') + ADD = str(get_setting(f'EXT_CONTROLLER{i}_ADD')) + PORT = str(get_setting(f'EXT_CONTROLLER{i}_PORT')) + except Exception as e: + break + try: + url = f'http://{ADD}:{PORT}/tfs-api/context/{DEFAULT_CONTEXT_NAME}/topology_details/{DEFAULT_TOPOLOGY_NAME}' + topo = requests.get(url).json() + except Exception as e: + LOGGER.info(f'Exception retrieven topology from external controler #{i}: {e}') + topology_details = TopologyDetails(**topo) + context = Context() + context.context_id.context_uuid.uuid = topology_details.topology_id.context_id.context_uuid.uuid + context_client.SetContext(context) + + topology = Topology() + topology.topology_id.context_id.CopyFrom(context.context_id) + topology.topology_id.topology_uuid.uuid = topology_details.topology_id.topology_uuid.uuid + context_client.SetTopology(topology) + + for device in topology_details.devices: + context_client.SetDevice(device) + + for link in topology_details.links: + context_client.SetLink(link) + + i+=1 @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) diff --git a/src/nbi/service/context_subscription/__init__.py b/src/nbi/service/context_subscription/__init__.py index d2ae85070..e33728ece 100644 --- a/src/nbi/service/context_subscription/__init__.py +++ b/src/nbi/service/context_subscription/__init__.py @@ -34,14 +34,14 @@ vnt_manager_client: VNTManagerClient = VNTManagerClient() context_client: ContextClient = ContextClient() ALL_HOSTS = "0.0.0.0" -WS_E2E_PORT = int(get_setting('WS_E2E_PORT', default='8762')) +WS_IP_PORT = int(get_setting('WS_IP_PORT', default='8761')) LOGGER = logging.getLogger(__name__) def register_context_subscription(): - with serve(subcript_to_vnt_manager, ALL_HOSTS, WS_E2E_PORT, logger=LOGGER) as server: - LOGGER.info("Running subscription server...: {}:{}".format(ALL_HOSTS, str(WS_E2E_PORT))) + with serve(subcript_to_vnt_manager, ALL_HOSTS, WS_IP_PORT, logger=LOGGER) as server: + LOGGER.info("Running subscription server...: {}:{}".format(ALL_HOSTS, str(WS_IP_PORT))) server.serve_forever() LOGGER.info("Exiting subscription server...") diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py index 28f94887a..58cf9aa01 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py @@ -177,6 +177,11 @@ class Topology(_Resource): def delete(self, context_uuid : str, topology_uuid : str): return format_grpc_to_json(self.context_client.RemoveTopology(grpc_topology_id(context_uuid, topology_uuid))) +class TopologyDetails(_Resource): + def get(self, context_uuid : str, topology_uuid : str): + return format_grpc_to_json(self.context_client.GetTopologyDetails(grpc_topology_id( + context_uuid, topology_uuid))) + class ServiceIds(_Resource): def get(self, context_uuid : str): return format_grpc_to_json(self.context_client.ListServiceIds(grpc_context_id(context_uuid))) diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py index 41e8ff1ea..984e0442a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py @@ -22,7 +22,7 @@ from .Resources import ( PolicyRule, PolicyRuleIds, PolicyRules, Service, ServiceIds, Services, Slice, SliceIds, Slices, - Topologies, Topology, TopologyIds + Topologies, Topology, TopologyIds, TopologyDetails ) URL_PREFIX = '/tfs-api' @@ -30,38 +30,39 @@ URL_PREFIX = '/tfs-api' # Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. RESOURCES = [ # (endpoint_name, resource_class, resource_url) - ('api.context_ids', ContextIds, '/context_ids'), - ('api.contexts', Contexts, '/contexts'), - ('api.dummy_contexts', DummyContexts, '/dummy_contexts'), - ('api.context', Context, '/context/'), + ('api.context_ids', ContextIds, '/context_ids'), + ('api.contexts', Contexts, '/contexts'), + ('api.dummy_contexts', DummyContexts, '/dummy_contexts'), + ('api.context', Context, '/context/'), - ('api.topology_ids', TopologyIds, '/context//topology_ids'), - ('api.topologies', Topologies, '/context//topologies'), - ('api.topology', Topology, '/context//topology/'), + ('api.topology_ids', TopologyIds, '/context//topology_ids'), + ('api.topologies', Topologies, '/context//topologies'), + ('api.topology', Topology, '/context//topology/'), + ('api.topology_details', TopologyDetails, '/context//topology_details/'), - ('api.service_ids', ServiceIds, '/context//service_ids'), - ('api.services', Services, '/context//services'), - ('api.service', Service, '/context//service/'), + ('api.service_ids', ServiceIds, '/context//service_ids'), + ('api.services', Services, '/context//services'), + ('api.service', Service, '/context//service/'), - ('api.slice_ids', SliceIds, '/context//slice_ids'), - ('api.slices', Slices, '/context//slices'), - ('api.slice', Slice, '/context//slice/'), + ('api.slice_ids', SliceIds, '/context//slice_ids'), + ('api.slices', Slices, '/context//slices'), + ('api.slice', Slice, '/context//slice/'), - ('api.device_ids', DeviceIds, '/device_ids'), - ('api.devices', Devices, '/devices'), - ('api.device', Device, '/device/'), + ('api.device_ids', DeviceIds, '/device_ids'), + ('api.devices', Devices, '/devices'), + ('api.device', Device, '/device/'), - ('api.link_ids', LinkIds, '/link_ids'), - ('api.links', Links, '/links'), - ('api.link', Link, '/link/'), + ('api.link_ids', LinkIds, '/link_ids'), + ('api.links', Links, '/links'), + ('api.link', Link, '/link/'), - ('api.connection_ids', ConnectionIds, '/context//service//connection_ids'), - ('api.connections', Connections, '/context//service//connections'), - ('api.connection', Connection, '/connection/'), + ('api.connection_ids', ConnectionIds, '/context//service//connection_ids'), + ('api.connections', Connections, '/context//service//connections'), + ('api.connection', Connection, '/connection/'), - ('api.policyrule_ids', PolicyRuleIds, '/policyrule_ids'), - ('api.policyrules', PolicyRules, '/policyrules'), - ('api.policyrule', PolicyRule, '/policyrule/'), + ('api.policyrule_ids', PolicyRuleIds, '/policyrule_ids'), + ('api.policyrules', PolicyRules, '/policyrules'), + ('api.policyrule', PolicyRule, '/policyrule/'), ] def register_tfs_api(rest_server : RestServer): diff --git a/src/tests/ecoc24/.gitlab-ci.yml b/src/tests/ecoc24/.gitlab-ci.yml index af0646a0f..412b25450 100644 --- a/src/tests/ecoc24/.gitlab-ci.yml +++ b/src/tests/ecoc24/.gitlab-ci.yml @@ -56,10 +56,6 @@ end2end_test ecoc24: - microk8s status --wait-ready - kubectl get pods --all-namespaces - # Deploy Optical Device Node Agents - #- > - # docker network create -d bridge --subnet=172.254.253.0/24 --gateway=172.254.253.254 - # --ip-range=172.254.253.0/24 na-br # Configure TeraFlowSDN deployment @@ -70,36 +66,45 @@ end2end_test ecoc24: #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/sliceservice.yaml #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml - - source src/tests/${TEST_NAME}/deploy_specs_e2e.sh - # Deploy TeraFlowSDN + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/e2eorchestratorservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/vntmservice.yaml + + + + # Deploy Optical TeraFlowSDN + - source src/tests/${TEST_NAME}/deploy_specs_opt.sh - ./deploy/crdb.sh - ./deploy/nats.sh - ./deploy/qdb.sh - ./deploy/expose_dashboard.sh - ./deploy/tfs.sh - ./deploy/show.sh - - ./src/tests/${TEST_NAME}/subscription_ws_e2e.sh + - cp /var/teraflow/tfs_runtime_env_vars.sh /var/teraflow/tfs_runtime_env_vars_opt.sh - - source src/tests/${TEST_NAME}/deploy_specs_opt.sh - # Deploy TeraFlowSDN + + # Deploy IP TeraFlowSDN + - source src/tests/${TEST_NAME}/deploy_specs_ip.sh - ./deploy/crdb.sh - ./deploy/nats.sh - ./deploy/qdb.sh - ./deploy/expose_dashboard.sh - ./deploy/tfs.sh - ./deploy/show.sh + - ./src/tests/${TEST_NAME}/subscription_ws_ip.sh + - cp /var/teraflow/tfs_runtime_env_vars.sh /var/teraflow/tfs_runtime_env_vars_ip.sh - - source src/tests/${TEST_NAME}/deploy_specs_ip.sh - # Deploy TeraFlowSDN + # Deploy E2E TeraFlowSDN + - source src/tests/${TEST_NAME}/deploy_specs_e2e.sh - ./deploy/crdb.sh - ./deploy/nats.sh - ./deploy/qdb.sh - ./deploy/expose_dashboard.sh - ./deploy/tfs.sh - ./deploy/show.sh - - ./src/tests/${TEST_NAME}/subscription_ws_ip.sh - + - ./src/tests/${TEST_NAME}/subscription_ws_e2e.sh + - cp /var/teraflow/tfs_runtime_env_vars.sh /var/teraflow/tfs_runtime_env_vars_e2e.sh + # Run end-to-end tests diff --git a/src/tests/ecoc24/deploy_e2e.sh b/src/tests/ecoc24/deploy_e2e.sh index da7ef252c..a135835c7 100755 --- a/src/tests/ecoc24/deploy_e2e.sh +++ b/src/tests/ecoc24/deploy_e2e.sh @@ -25,7 +25,12 @@ kubectl apply -f src/tests/ecoc24/nginx-ingress-controller-e2e.yaml # Deploy TFS for E2E source src/tests/ecoc24/deploy_specs_e2e.sh + +# Change the name for the database +cp manifests/contextservice.yaml manifests/contextservice.yaml.bak +sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfse2e_context"/}' manifests/contextservice.yaml ./deploy/all.sh +mv manifests/contextservice.yaml.bak manifests/contextservice.yaml #Configure Subscription WS ./src/tests/ecoc24/subscription_ws_e2e.sh diff --git a/src/tests/ecoc24/deploy_ip.sh b/src/tests/ecoc24/deploy_ip.sh index a6c5e8255..418a270bc 100755 --- a/src/tests/ecoc24/deploy_ip.sh +++ b/src/tests/ecoc24/deploy_ip.sh @@ -25,7 +25,12 @@ kubectl apply -f src/tests/ecoc24/nginx-ingress-controller-ip.yaml # Deploy TFS for IP source src/tests/ecoc24/deploy_specs_ip.sh + +# Change the name for the database +cp manifests/contextservice.yaml manifests/contextservice.yaml.bak +sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfsip_context"/}' manifests/contextservice.yaml ./deploy/all.sh +mv manifests/contextservice.yaml.bak manifests/contextservice.yaml #Configure Subscription WS ./src/tests/ecoc24/subscription_ws_ip.sh diff --git a/src/tests/ecoc24/deploy_opt.sh b/src/tests/ecoc24/deploy_opt.sh index 3a9523768..ab2971fd5 100755 --- a/src/tests/ecoc24/deploy_opt.sh +++ b/src/tests/ecoc24/deploy_opt.sh @@ -25,5 +25,11 @@ kubectl apply -f src/tests/ecoc24/nginx-ingress-controller-opt.yaml # Deploy TFS for OPT source src/tests/ecoc24/deploy_specs_opt.sh + +# Change the name for the database +cp manifests/contextservice.yaml manifests/contextservice.yaml.bak +sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfsopt_context"/}' manifests/contextservice.yaml ./deploy/all.sh +mv manifests/contextservice.yaml.bak manifests/contextservice.yaml + mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_opt.sh diff --git a/src/tests/ecoc24/deploy_specs_e2e.sh b/src/tests/ecoc24/deploy_specs_e2e.sh index a8353db54..3b287ba89 100755 --- a/src/tests/ecoc24/deploy_specs_e2e.sh +++ b/src/tests/ecoc24/deploy_specs_e2e.sh @@ -20,7 +20,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device pathcomp service nbi" +export TFS_COMPONENTS="context device pathcomp service nbi webui" # Uncomment to activate Monitoring (old) #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" @@ -137,7 +137,7 @@ export CRDB_DATABASE="tfs_e2e" export CRDB_DEPLOY_MODE="single" # Disable flag for dropping database, if it exists. -export CRDB_DROP_DATABASE_IF_EXISTS="YES" +export CRDB_DROP_DATABASE_IF_EXISTS="NO" # Disable flag for re-deploying CockroachDB from scratch. export CRDB_REDEPLOY="" @@ -214,3 +214,4 @@ export KFK_SERVER_PORT="9092" # Set the flag to YES for redeploying of Apache Kafka export KFK_REDEPLOY="" + \ No newline at end of file diff --git a/src/tests/ecoc24/deploy_specs_ip.sh b/src/tests/ecoc24/deploy_specs_ip.sh index 52bd545ce..114289f4d 100755 --- a/src/tests/ecoc24/deploy_specs_ip.sh +++ b/src/tests/ecoc24/deploy_specs_ip.sh @@ -20,7 +20,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device pathcomp service nbi" +export TFS_COMPONENTS="context device pathcomp service nbi webui" # Uncomment to activate Monitoring (old) #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" @@ -137,7 +137,7 @@ export CRDB_DATABASE="tfs_ip" export CRDB_DEPLOY_MODE="single" # Disable flag for dropping database, if it exists. -export CRDB_DROP_DATABASE_IF_EXISTS="YES" +export CRDB_DROP_DATABASE_IF_EXISTS="NO" # Disable flag for re-deploying CockroachDB from scratch. export CRDB_REDEPLOY="" diff --git a/src/tests/ecoc24/deploy_specs_opt.sh b/src/tests/ecoc24/deploy_specs_opt.sh index 999fba045..4c7997f52 100755 --- a/src/tests/ecoc24/deploy_specs_opt.sh +++ b/src/tests/ecoc24/deploy_specs_opt.sh @@ -20,7 +20,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device pathcomp service nbi" +export TFS_COMPONENTS="context device pathcomp service nbi webui" # Uncomment to activate Monitoring (old) #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" @@ -137,7 +137,7 @@ export CRDB_DATABASE="tfs_ip" export CRDB_DEPLOY_MODE="single" # Disable flag for dropping database, if it exists. -export CRDB_DROP_DATABASE_IF_EXISTS="YES" +export CRDB_DROP_DATABASE_IF_EXISTS="NO" # Disable flag for re-deploying CockroachDB from scratch. export CRDB_REDEPLOY="" diff --git a/src/tests/ecoc24/descriptors/link_mapping.json b/src/tests/ecoc24/descriptors/descriptor_e2e.json similarity index 99% rename from src/tests/ecoc24/descriptors/link_mapping.json rename to src/tests/ecoc24/descriptors/descriptor_e2e.json index d2e9f11d7..41649d92e 100644 --- a/src/tests/ecoc24/descriptors/link_mapping.json +++ b/src/tests/ecoc24/descriptors/descriptor_e2e.json @@ -82,4 +82,5 @@ ] } ] - } \ No newline at end of file + } + \ No newline at end of file diff --git a/src/tests/ecoc24/descriptors/descriptor_ip.json b/src/tests/ecoc24/descriptors/descriptor_ip.json index b0909321c..11ad2d5c1 100644 --- a/src/tests/ecoc24/descriptors/descriptor_ip.json +++ b/src/tests/ecoc24/descriptors/descriptor_ip.json @@ -209,4 +209,5 @@ } ], "dummy_mode":true - } \ No newline at end of file + } + \ No newline at end of file diff --git a/src/tests/ecoc24/descriptors/descriptor_opt.json b/src/tests/ecoc24/descriptors/descriptor_opt.json index 320da8692..cfb86b966 100644 --- a/src/tests/ecoc24/descriptors/descriptor_opt.json +++ b/src/tests/ecoc24/descriptors/descriptor_opt.json @@ -799,4 +799,5 @@ ] } ] - } \ No newline at end of file + } + \ No newline at end of file diff --git a/src/tests/ecoc24/tests/test_functional_bootstrap_e2e.py b/src/tests/ecoc24/tests/test_functional_bootstrap_e2e.py new file mode 100644 index 000000000..cd72f5e94 --- /dev/null +++ b/src/tests/ecoc24/tests/test_functional_bootstrap_e2e.py @@ -0,0 +1,67 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os, time +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum, Empty +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'descriptor_e2e.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_scenario_bootstrap( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + validate_empty_scenario(context_client) + + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + +def test_scenario_devices_enabled( + context_client : ContextClient, # pylint: disable=redefined-outer-name +) -> None: + """ + This test validates that the devices are enabled. + """ + """ DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + num_devices = -1 + num_devices_enabled, num_retry = 0, 0 + while (num_devices != num_devices_enabled) and (num_retry < 10): + time.sleep(1.0) + response = context_client.ListDevices(Empty()) + num_devices = len(response.devices) + num_devices_enabled = 0 + for device in response.devices: + if device.device_operational_status != DEVICE_OP_STATUS_ENABLED: continue + num_devices_enabled += 1 + LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) + num_retry += 1 """ + assert 1 == 1 diff --git a/src/tests/ecoc24/tests/test_functional_bootstrap.py b/src/tests/ecoc24/tests/test_functional_bootstrap_ip.py similarity index 100% rename from src/tests/ecoc24/tests/test_functional_bootstrap.py rename to src/tests/ecoc24/tests/test_functional_bootstrap_ip.py diff --git a/src/tests/ecoc24/tests/test_functional_bootstrap_opt.py b/src/tests/ecoc24/tests/test_functional_bootstrap_opt.py new file mode 100644 index 000000000..2f400c346 --- /dev/null +++ b/src/tests/ecoc24/tests/test_functional_bootstrap_opt.py @@ -0,0 +1,67 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os, time +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum, Empty +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'descriptor_opt.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_scenario_bootstrap( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + validate_empty_scenario(context_client) + + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + +def test_scenario_devices_enabled( + context_client : ContextClient, # pylint: disable=redefined-outer-name +) -> None: + """ + This test validates that the devices are enabled. + """ + """ DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + num_devices = -1 + num_devices_enabled, num_retry = 0, 0 + while (num_devices != num_devices_enabled) and (num_retry < 10): + time.sleep(1.0) + response = context_client.ListDevices(Empty()) + num_devices = len(response.devices) + num_devices_enabled = 0 + for device in response.devices: + if device.device_operational_status != DEVICE_OP_STATUS_ENABLED: continue + num_devices_enabled += 1 + LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) + num_retry += 1 """ + assert 1 == 1 diff --git a/src/vnt_manager/service/VNTManagerServiceServicerImpl.py b/src/vnt_manager/service/VNTManagerServiceServicerImpl.py index d684e044e..b33705ed5 100644 --- a/src/vnt_manager/service/VNTManagerServiceServicerImpl.py +++ b/src/vnt_manager/service/VNTManagerServiceServicerImpl.py @@ -45,7 +45,7 @@ GET_EVENT_TIMEOUT = 0.5 class VNTMEventDispatcher(threading.Thread): def __init__(self, host, port) -> None: - LOGGER.debug('Creating VTNM connector...') + LOGGER.debug('Creating VNTM connector...') self.host = host self.port = port super().__init__(name='VNTMEventDispatcher', daemon=True) @@ -107,8 +107,8 @@ class VNTMEventDispatcher(threading.Thread): while not self._terminate.is_set(): event = events_collector.get_event(block=True, timeout=GET_EVENT_TIMEOUT) - LOGGER.info('Event type: {}'.format(event)) if event is None: continue + LOGGER.info('Event type: {}'.format(event)) LOGGER.debug('Received event: {}'.format(event)) topology_details = context_client.GetTopologyDetails(TopologyId(**topology_id)) -- GitLab From 1df8f6ad56093db2c4c9a095fdd60b9e23d45f7d Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 5 Nov 2024 12:47:03 +0000 Subject: [PATCH 024/463] WebUI component: - Corrected home page copyright message - Corrected topology.js --- src/webui/service/templates/base.html | 2 +- src/webui/service/templates/js/topology.js | 45 +++++++++++----------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/webui/service/templates/base.html b/src/webui/service/templates/base.html index 8bded20ff..d2eadf121 100644 --- a/src/webui/service/templates/base.html +++ b/src/webui/service/templates/base.html @@ -192,7 +192,7 @@
diff --git a/src/webui/service/templates/js/topology.js b/src/webui/service/templates/js/topology.js index 3e0a766ee..8a8ba0e40 100644 --- a/src/webui/service/templates/js/topology.js +++ b/src/webui/service/templates/js/topology.js @@ -86,21 +86,21 @@ d3.json("{{ url_for('main.topology') }}", function(data) { return l.name.toLowerCase().includes('mgmt') ? "5,5" : "0"; }); - optical_link = svg.append("g").attr("class", "links").style('stroke', '#aaa') - .selectAll("line") - .data(data.optical_links) - .enter() - .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"; - }); + optical_link = svg.append("g").attr("class", "links")//.style('stroke', '#aaa') + .selectAll("line") + .data(data.optical_links) + .enter() + .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") @@ -130,18 +130,19 @@ d3.json("{{ url_for('main.topology') }}", function(data) { simulation.nodes(data.devices); // add forces, associate each with a name, and set their properties + // Experimental : Optical link part + all_links = data.links.concat(data.optical_links) simulation .force("link", d3.forceLink() .id(function(d) {return d.id;}) .distance(forceProperties.link.distance) .iterations(forceProperties.link.iterations) - .links(forceProperties.link.enabled ? data.links.length>0? data.links :[]:[])) -// ------------------ Experimental : Optical link part - .force("link", d3.forceLink() - .id(function(d) {return d.id;}) - .distance(forceProperties.link.distance) - .iterations(forceProperties.link.iterations) - .links(forceProperties.link.enabled ? data.optical_links.length>0?data.optical_links:[]:[])) + .links( + forceProperties.link.enabled ? ( + (all_links.length > 0) ? all_links : [] + ) : [] + ) + ) .force("charge", d3.forceManyBody() .strength(forceProperties.charge.strength * forceProperties.charge.enabled) -- GitLab From 1df3c8de009afe25502c94b913ed4149c5d0f603 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 5 Nov 2024 12:52:46 +0000 Subject: [PATCH 025/463] CockroachDB: - Corrected deploy script --- deploy/crdb.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deploy/crdb.sh b/deploy/crdb.sh index f27df12fc..f13ce43b7 100755 --- a/deploy/crdb.sh +++ b/deploy/crdb.sh @@ -153,14 +153,14 @@ function crdb_undeploy_single() { function crdb_drop_databases_single() { echo "Drop TFS databases, if exist" - if [[ -z "${GITLAB_CI}" ]]; then + #if [[ -z "${GITLAB_CI}" ]]; then #kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o yaml CRDB_HOST=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.clusterIP}') CRDB_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') - else - CRDB_HOST="127.0.0.1" - CRDB_PORT=${CRDB_EXT_PORT_SQL} - fi + #else + # CRDB_HOST="127.0.0.1" + # CRDB_PORT=${CRDB_EXT_PORT_SQL} + #fi CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@${CRDB_HOST}:${CRDB_PORT}/defaultdb?sslmode=require" echo "CRDB_CLIENT_URL=${CRDB_CLIENT_URL}" -- GitLab From 483b238a62bb631366fa63f59fcb143710a02894 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 5 Nov 2024 12:52:59 +0000 Subject: [PATCH 026/463] Device component: - Corrected Dockerfile --- src/device/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/device/Dockerfile b/src/device/Dockerfile index 670b96cb3..d760e0c70 100644 --- a/src/device/Dockerfile +++ b/src/device/Dockerfile @@ -91,12 +91,13 @@ RUN touch tests/tools/mock_ietf_actn_sdn_ctrl/__init__.py COPY src/tests/tools/mock_ietf_actn_sdn_ctrl/. tests/tools/mock_ietf_actn_sdn_ctrl/ # Clone OpenConfig YANG models -RUN mkdir -p /var/teraflow/device/service/drivers/gnmi_openconfig/git/openconfig/public RUN mkdir -p /tmp/openconfig RUN git clone https://github.com/openconfig/public.git /tmp/openconfig WORKDIR /tmp/openconfig RUN git fetch RUN git checkout v4.4.0 +RUN rm -rf /var/teraflow/device/service/drivers/gnmi_openconfig/git +RUN mkdir -p /var/teraflow/device/service/drivers/gnmi_openconfig/git/openconfig/public RUN mv /tmp/openconfig/release /var/teraflow/device/service/drivers/gnmi_openconfig/git/openconfig/public RUN mv /tmp/openconfig/third_party /var/teraflow/device/service/drivers/gnmi_openconfig/git/openconfig/public RUN rm -rf /tmp/openconfig -- GitLab From 7120aea14025c788b039fe02a6b4b452b981acf5 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 5 Nov 2024 13:11:54 +0000 Subject: [PATCH 027/463] CockroachDB: - Corrected deploy script --- deploy/crdb.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/deploy/crdb.sh b/deploy/crdb.sh index f13ce43b7..1c5f53bc2 100755 --- a/deploy/crdb.sh +++ b/deploy/crdb.sh @@ -154,21 +154,24 @@ function crdb_drop_databases_single() { echo "Drop TFS databases, if exist" #if [[ -z "${GITLAB_CI}" ]]; then - #kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o yaml - CRDB_HOST=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.clusterIP}') - CRDB_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') + # #kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o yaml + # CRDB_HOST=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.clusterIP}') + # CRDB_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') #else # CRDB_HOST="127.0.0.1" # CRDB_PORT=${CRDB_EXT_PORT_SQL} #fi - CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@${CRDB_HOST}:${CRDB_PORT}/defaultdb?sslmode=require" - echo "CRDB_CLIENT_URL=${CRDB_CLIENT_URL}" + #CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@${CRDB_HOST}:${CRDB_PORT}/defaultdb?sslmode=require" + #echo "CRDB_CLIENT_URL=${CRDB_CLIENT_URL}" DATABASES=$( kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ - ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \ + ./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public \ --execute "SHOW DATABASES;" --format=tsv | awk '{print $1}' | grep "^tfs" + #kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ + # ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \ + # --execute "SHOW DATABASES;" --format=tsv | awk '{print $1}' | grep "^tfs" ) echo "Found TFS databases: ${DATABASES}" | tr '\n' ' ' echo @@ -176,8 +179,11 @@ function crdb_drop_databases_single() { for DB_NAME in $DATABASES; do echo "Dropping TFS database: $DB_NAME" kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ - ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \ + ./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public \ --execute="DROP DATABASE IF EXISTS $DB_NAME CASCADE;" + #kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ + # ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \ + # --execute="DROP DATABASE IF EXISTS $DB_NAME CASCADE;" done echo } -- GitLab From 2d23b59dbd1f381898a5a1f92127b394167fa13e Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 5 Nov 2024 14:52:18 +0000 Subject: [PATCH 028/463] CockroachDB: - Corrected deploy script --- deploy/crdb.sh | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/deploy/crdb.sh b/deploy/crdb.sh index 1c5f53bc2..ad0bdd30b 100755 --- a/deploy/crdb.sh +++ b/deploy/crdb.sh @@ -153,25 +153,14 @@ function crdb_undeploy_single() { function crdb_drop_databases_single() { echo "Drop TFS databases, if exist" - #if [[ -z "${GITLAB_CI}" ]]; then - # #kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o yaml - # CRDB_HOST=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.clusterIP}') - # CRDB_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') - #else - # CRDB_HOST="127.0.0.1" - # CRDB_PORT=${CRDB_EXT_PORT_SQL} - #fi - - #CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@${CRDB_HOST}:${CRDB_PORT}/defaultdb?sslmode=require" - #echo "CRDB_CLIENT_URL=${CRDB_CLIENT_URL}" + CRDB_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') + CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@cockroachdb-0:${CRDB_PORT}/defaultdb?sslmode=require" + echo "CRDB_CLIENT_URL=${CRDB_CLIENT_URL}" DATABASES=$( kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ - ./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public \ + ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \ --execute "SHOW DATABASES;" --format=tsv | awk '{print $1}' | grep "^tfs" - #kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ - # ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \ - # --execute "SHOW DATABASES;" --format=tsv | awk '{print $1}' | grep "^tfs" ) echo "Found TFS databases: ${DATABASES}" | tr '\n' ' ' echo @@ -179,11 +168,8 @@ function crdb_drop_databases_single() { for DB_NAME in $DATABASES; do echo "Dropping TFS database: $DB_NAME" kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ - ./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public \ + ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \ --execute="DROP DATABASE IF EXISTS $DB_NAME CASCADE;" - #kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ - # ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \ - # --execute="DROP DATABASE IF EXISTS $DB_NAME CASCADE;" done echo } -- GitLab From 33fbfebd380879470a342da4061e3e8f6820addb Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 8 Nov 2024 11:26:56 +0000 Subject: [PATCH 029/463] Service component - L3NM gNMI OpenConfig: - StaticRouteGenerator: Fixed link endpoints compuotation - ConfigRuleComposer: Reverted to default network instance as cEOS does not work properly with VRFs - ConfigRuleComposer: Added interface deactivation - Improved logging - Updated unitary tests --- .../ConfigRuleComposer.py | 32 +++++++++++++---- .../L3NMGnmiOpenConfigServiceHandler.py | 9 ++--- .../StaticRouteGenerator.py | 12 +++++-- .../MockServiceHandler.py | 36 +++++++++++++++++-- .../test_unitary_sns4sns.py | 20 +++++------ 5 files changed, 83 insertions(+), 26 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py index c8227975f..54101d041 100644 --- a/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py @@ -21,7 +21,8 @@ from service.service.service_handler_api.AnyTreeTools import TreeNode LOGGER = logging.getLogger(__name__) -NETWORK_INSTANCE = 'teraflowsdn' +#NETWORK_INSTANCE = 'teraflowsdn' +NETWORK_INSTANCE = 'default' RE_IF = re.compile(r'^\/interface\[([^\]]+)\]$') RE_SUBIF = re.compile(r'^\/interface\[([^\]]+)\]\/subinterface\[([^\]]+)\]$') @@ -109,11 +110,18 @@ class EndpointComposer: if self.ipv4_prefix_len is None: return [] json_config_rule = json_config_rule_delete if delete else json_config_rule_set config_rules = [ - json_config_rule(*_network_instance_interface( - network_instance_name, self.objekt.name, self.sub_interface_index - )), + #json_config_rule(*_network_instance_interface( + # network_instance_name, self.objekt.name, self.sub_interface_index + #)), ] - if not delete: + if delete: + config_rules.extend([ + json_config_rule(*_interface( + self.objekt.name, index=self.sub_interface_index, address_ip=None, + address_prefix=None, enabled=False + )), + ]) + else: config_rules.extend([ json_config_rule(*_interface( self.objekt.name, index=self.sub_interface_index, address_ip=self.ipv4_address, @@ -128,6 +136,12 @@ class EndpointComposer: 'address_ip' : self.ipv4_address, 'address_prefix': self.ipv4_prefix_len, } + + def __str__(self): + data = {'uuid': self.uuid} + if self.objekt is not None: data['name'] = self.objekt.name + data.update(self.dump()) + return json.dumps(data) class DeviceComposer: def __init__(self, device_uuid : str) -> None: @@ -212,7 +226,7 @@ class DeviceComposer: json_config_rule = json_config_rule_delete if delete else json_config_rule_set config_rules = [ - json_config_rule(*_network_instance(network_instance_name, 'L3VRF')) + #json_config_rule(*_network_instance(network_instance_name, 'L3VRF')) ] for endpoint in self.endpoints.values(): config_rules.extend(endpoint.get_config_rules(network_instance_name, delete=delete)) @@ -240,6 +254,12 @@ class DeviceComposer: 'static_routes' : self.static_routes, } + def __str__(self): + data = {'uuid': self.uuid} + if self.objekt is not None: data['name'] = self.objekt.name + data.update(self.dump()) + return json.dumps(data) + class ConfigRuleComposer: def __init__(self) -> None: self.objekt : Optional[Service] = None diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/L3NMGnmiOpenConfigServiceHandler.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/L3NMGnmiOpenConfigServiceHandler.py index 8aa3781a4..4099675fa 100644 --- a/src/service/service/service_handlers/l3nm_gnmi_openconfig/L3NMGnmiOpenConfigServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/L3NMGnmiOpenConfigServiceHandler.py @@ -65,8 +65,9 @@ class L3NMGnmiOpenConfigServiceHandler(_ServiceHandler): self.__endpoint_map[(device_uuid, endpoint_uuid)] = (device_obj.name, endpoint_obj.name) + LOGGER.debug('[pre] config_rule_composer = {:s}'.format(json.dumps(self.__config_rule_composer.dump()))) self.__static_route_generator.compose(endpoints) - LOGGER.debug('config_rule_composer = {:s}'.format(json.dumps(self.__config_rule_composer.dump()))) + LOGGER.debug('[post] config_rule_composer = {:s}'.format(json.dumps(self.__config_rule_composer.dump()))) def _do_configurations( self, config_rules_per_device : Dict[str, List[Dict]], endpoints : List[Tuple[str, str, Optional[str]]], @@ -110,8 +111,8 @@ class L3NMGnmiOpenConfigServiceHandler(_ServiceHandler): #network_instance_name = service_uuid.split('-')[0] #config_rules_per_device = self.__config_rule_composer.get_config_rules(network_instance_name, delete=False) config_rules_per_device = self.__config_rule_composer.get_config_rules(delete=False) - LOGGER.debug('config_rules_per_device={:s}'.format(str(config_rules_per_device))) - results = self._do_configurations(config_rules_per_device, endpoints) + LOGGER.debug('config_rules_per_device={:s}'.format(json.dumps(config_rules_per_device))) + results = self._do_configurations(config_rules_per_device, endpoints, delete=False) LOGGER.debug('results={:s}'.format(str(results))) return results @@ -128,7 +129,7 @@ class L3NMGnmiOpenConfigServiceHandler(_ServiceHandler): #network_instance_name = service_uuid.split('-')[0] #config_rules_per_device = self.__config_rule_composer.get_config_rules(network_instance_name, delete=True) config_rules_per_device = self.__config_rule_composer.get_config_rules(delete=True) - LOGGER.debug('config_rules_per_device={:s}'.format(str(config_rules_per_device))) + LOGGER.debug('config_rules_per_device={:s}'.format(json.dumps(config_rules_per_device))) results = self._do_configurations(config_rules_per_device, endpoints, delete=True) LOGGER.debug('results={:s}'.format(str(results))) return results diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py index 201f22e63..c52321473 100644 --- a/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py @@ -63,12 +63,20 @@ class StaticRouteGenerator: def _compute_link_endpoints( self, connection_hop_list : List[Tuple[str, str, Optional[str]]] ) -> List[Tuple[Tuple[str, str, Optional[str]], Tuple[str, str, Optional[str]]]]: + # In some cases connection_hop_list might contain repeated endpoints, remove them here. + added_connection_hops = set() + filtered_connection_hop_list = list() + for connection_hop in connection_hop_list: + if connection_hop in added_connection_hops: continue + filtered_connection_hop_list.append(connection_hop) + added_connection_hops.add(connection_hop) + connection_hop_list = filtered_connection_hop_list + num_connection_hops = len(connection_hop_list) if num_connection_hops % 2 != 0: raise Exception('Number of connection hops must be even') if num_connection_hops < 4: raise Exception('Number of connection hops must be >= 4') - # Skip service endpoints (first and last) - it_connection_hops = iter(connection_hop_list[1:-1]) + it_connection_hops = iter(connection_hop_list) return list(zip(it_connection_hops, it_connection_hops)) def _compute_link_addresses( diff --git a/src/service/tests/test_l3nm_gnmi_static_rule_gen/MockServiceHandler.py b/src/service/tests/test_l3nm_gnmi_static_rule_gen/MockServiceHandler.py index 22da218ab..a480f6b31 100644 --- a/src/service/tests/test_l3nm_gnmi_static_rule_gen/MockServiceHandler.py +++ b/src/service/tests/test_l3nm_gnmi_static_rule_gen/MockServiceHandler.py @@ -19,6 +19,7 @@ from common.tools.object_factory.Connection import json_connection_id from common.tools.object_factory.Device import json_device_id from common.type_checkers.Checkers import chk_type from service.service.service_handler_api._ServiceHandler import _ServiceHandler +#from service.service.service_handler_api.AnyTreeTools import TreeNode from service.service.service_handler_api.SettingsHandler import SettingsHandler from service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching from .MockTaskExecutor import MockTaskExecutor @@ -45,6 +46,10 @@ class MockServiceHandler(_ServiceHandler): service_settings = self.__settings_handler.get_service_settings() self.__config_rule_composer.configure(self.__service, service_settings) + #prev_endpoint_obj = None + #prev_endpoint = None + #settings_for_next = None + #for i,endpoint in enumerate(endpoints): for endpoint in endpoints: device_uuid, endpoint_uuid = get_device_endpoint_uuids(endpoint) @@ -60,8 +65,35 @@ class MockServiceHandler(_ServiceHandler): _endpoint = _device.get_endpoint(endpoint_obj.name) _endpoint.configure(endpoint_obj, endpoint_settings) + #if settings_for_next is not None: + # _endpoint.configure(endpoint_obj, settings_for_next) + # settings_for_next = None + + #if endpoint_settings is not None and 'neighbor_address' in endpoint_settings.value: + # _neighbor_settings = {'address_ip': endpoint_settings.value['neighbor_address']} + # + # if 'address_prefix' in endpoint_settings.value: + # _neighbor_settings['address_prefix'] = endpoint_settings.value['address_prefix'] + # elif 'prefix_length' in endpoint_settings.value: + # _neighbor_settings['address_prefix'] = endpoint_settings.value['prefix_length'] + # else: + # MSG = 'IP Address Prefix not found. Tried: address_prefix and prefix_length. endpoint_settings.value={:s}' + # raise Exception(MSG.format(str(endpoint_settings.value))) + # + # neighbor_settings = TreeNode('.') + # neighbor_settings.value = _neighbor_settings + # if i % 2 == 0: + # # configure in next endpoint + # settings_for_next = neighbor_settings + # else: + # # configure in previous endpoint + # prev_endpoint.configure(prev_endpoint_obj, neighbor_settings) + self.__endpoint_map[(device_uuid, endpoint_uuid)] = (device_obj.name, endpoint_obj.name) + #prev_endpoint = _endpoint + #prev_endpoint_obj = endpoint_obj + self.__static_route_generator.compose(endpoints) LOGGER.debug('config_rule_composer = {:s}'.format(json.dumps(self.__config_rule_composer.dump()))) @@ -106,7 +138,7 @@ class MockServiceHandler(_ServiceHandler): #network_instance_name = service_uuid.split('-')[0] #config_rules_per_device = self.__config_rule_composer.get_config_rules(network_instance_name, delete=False) config_rules_per_device = self.__config_rule_composer.get_config_rules(delete=False) - LOGGER.debug('config_rules_per_device={:s}'.format(str(config_rules_per_device))) + LOGGER.debug('config_rules_per_device={:s}'.format(json.dumps(config_rules_per_device))) results = self._do_configurations(config_rules_per_device, endpoints) LOGGER.debug('results={:s}'.format(str(results))) return results @@ -123,7 +155,7 @@ class MockServiceHandler(_ServiceHandler): #network_instance_name = service_uuid.split('-')[0] #config_rules_per_device = self.__config_rule_composer.get_config_rules(network_instance_name, delete=True) config_rules_per_device = self.__config_rule_composer.get_config_rules(delete=True) - LOGGER.debug('config_rules_per_device={:s}'.format(str(config_rules_per_device))) + LOGGER.debug('config_rules_per_device={:s}'.format(json.dumps(config_rules_per_device))) results = self._do_configurations(config_rules_per_device, endpoints, delete=True) LOGGER.debug('results={:s}'.format(str(results))) return results diff --git a/src/service/tests/test_l3nm_gnmi_static_rule_gen/test_unitary_sns4sns.py b/src/service/tests/test_l3nm_gnmi_static_rule_gen/test_unitary_sns4sns.py index 0177500e2..64035f1bb 100644 --- a/src/service/tests/test_l3nm_gnmi_static_rule_gen/test_unitary_sns4sns.py +++ b/src/service/tests/test_l3nm_gnmi_static_rule_gen/test_unitary_sns4sns.py @@ -37,27 +37,23 @@ SERVICE = Service(**json_service_l3nm_planned( json_endpoint_id(json_device_id('edge-net'), 'eth1'), ], config_rules=[ + json_config_rule_set('/settings', {'address_families': ['IPV4'], 'mtu': 1500}), + json_config_rule_set('/static_routing', {}), + json_config_rule_set('/device[core-net]/endpoint[eth1]/settings', { - 'address_ip': '10.10.10.0', 'address_prefix': 24, 'index': 0 - }), - json_config_rule_set('/device[r1]/endpoint[eth10]/settings', { - 'address_ip': '10.10.10.229', 'address_prefix': 24, 'index': 0 - }), - json_config_rule_set('/device[r2]/endpoint[eth10]/settings', { - 'address_ip': '10.158.72.229', 'address_prefix': 24, 'index': 0 + 'address_ip': '10.10.10.0', 'neighbor_address': '10.10.10.229', 'address_prefix': 24, 'index': 0 }), json_config_rule_set('/device[edge-net]/endpoint[eth1]/settings', { - 'address_ip': '10.158.72.0', 'address_prefix': 24, 'index': 0 + 'address_ip': '10.158.72.0', 'neighbor_address': '10.158.72.229', 'address_prefix': 24, 'index': 0 }), ] )) CONNECTION_ENDPOINTS : List[Tuple[str, str, Optional[str]]] = [ #('core-net', 'int', None), - ('core-net', 'eth1', None), - ('r1', 'eth10', None), ('r1', 'eth2', None), - ('r2', 'eth1', None), ('r2', 'eth10', None), - ('edge-net', 'eth1', None), + ('core-net', 'eth1', None), ('r1', 'eth10', None), + ('r1', 'eth2', None), ('r2', 'eth1', None), + ('r2', 'eth10', None), ('edge-net', 'eth1', None), #('edge-net', 'int', None), ] -- GitLab From 85cd754435f83449488c7b0d798b5303b73b4d46 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 8 Nov 2024 11:27:15 +0000 Subject: [PATCH 030/463] Updated sns4sns test IETF L3VPN request --- src/tests/sns4sns24/02-ietf-l3vpn-nbi.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/sns4sns24/02-ietf-l3vpn-nbi.json b/src/tests/sns4sns24/02-ietf-l3vpn-nbi.json index 31d7e0a6d..0d34cfe9a 100644 --- a/src/tests/sns4sns24/02-ietf-l3vpn-nbi.json +++ b/src/tests/sns4sns24/02-ietf-l3vpn-nbi.json @@ -11,7 +11,7 @@ "site-network-accesses": { "site-network-access": [ { - "site-network-access-id": "int", + "site-network-access-id": "eth1", "site-network-access-type": "ietf-l3vpn-svc:multipoint", "device-reference": "core-net", "vpn-attachment": {"vpn-id": "ietf-l3vpn-edge-core", "site-role": "ietf-l3vpn-svc:spoke-role"}, @@ -48,7 +48,7 @@ "site-network-accesses": { "site-network-access": [ { - "site-network-access-id": "int", + "site-network-access-id": "eth1", "site-network-access-type": "ietf-l3vpn-svc:multipoint", "device-reference": "edge-net", "vpn-attachment": {"vpn-id": "ietf-l3vpn-edge-core", "site-role": "ietf-l3vpn-svc:hub-role"}, -- GitLab From 06a6a510ba288e581e0d520b8140c0cc3842c793 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 8 Nov 2024 11:27:58 +0000 Subject: [PATCH 031/463] Device - gNMI OpenConfig driver: - Disabled MTUs, some devices crash when setting it --- .../service/drivers/gnmi_openconfig/handlers/Interface.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index fda3ab71b..36a024bd1 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -41,14 +41,14 @@ class InterfaceHandler(_Handler): vlan_id = get_int (resource_value, 'vlan_id', ) # 127 address_ip = get_str (resource_value, 'address_ip' ) # 172.16.0.1 address_prefix = get_int (resource_value, 'address_prefix') # 24 - mtu = get_int (resource_value, 'mtu' ) # 1500 + #mtu = get_int (resource_value, 'mtu', 1450) # 1500 yang_ifs : libyang.DContainer = yang_handler.get_data_path('/openconfig-interfaces:interfaces') yang_if_path = 'interface[name="{:s}"]'.format(if_name) yang_if : libyang.DContainer = yang_ifs.create_path(yang_if_path) yang_if.create_path('config/name', if_name ) if enabled is not None: yang_if.create_path('config/enabled', enabled) - if mtu is not None: yang_if.create_path('config/mtu', mtu) + #if mtu is not None: yang_if.create_path('config/mtu', mtu) yang_sifs : libyang.DContainer = yang_if.create_path('subinterfaces') yang_sif_path = 'subinterface[index="{:d}"]'.format(sif_index) @@ -69,7 +69,7 @@ class InterfaceHandler(_Handler): yang_ipv4_addr : libyang.DContainer = yang_ipv4_addrs.create_path(yang_ipv4_addr_path) yang_ipv4_addr.create_path('config/ip', address_ip) yang_ipv4_addr.create_path('config/prefix-length', address_prefix) - if mtu is not None: yang_ipv4_addr.create_path('config/mtu', mtu) + #if mtu is not None: yang_ipv4_addr.create_path('config/mtu', mtu) str_path = '/interfaces/interface[name={:s}]'.format(if_name) str_data = yang_if.print_mem('json') -- GitLab From f0c8f6f99156370e745721a7ee6129969305c03c Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 8 Nov 2024 11:54:34 +0000 Subject: [PATCH 032/463] Added Hackfest 5 material --- hackfest5/.gitignore | 4 + hackfest5/README.md | 109 +++++++++++++ hackfest5/clab-cli-dc1.sh | 16 ++ hackfest5/clab-cli-dc2.sh | 16 ++ hackfest5/clab-cli-r1.sh | 16 ++ hackfest5/clab-cli-r2.sh | 16 ++ hackfest5/clab-deploy.sh | 17 ++ hackfest5/clab-destroy.sh | 18 +++ hackfest5/clab-graph.sh | 17 ++ hackfest5/clab-inspect.sh | 17 ++ hackfest5/clab/hackfest5.clab.yml | 65 ++++++++ hackfest5/data/ietf-l3vpn-service.json | 83 ++++++++++ hackfest5/data/tfs-service.json | 26 ++++ hackfest5/data/tfs-topology.json | 100 ++++++++++++ hackfest5/deploy_specs.sh | 208 +++++++++++++++++++++++++ hackfest5/images/arista/.gitignore | 3 + hackfest5/images/arista/.gitkeep | 0 hackfest5/redeploy-tfs.sh | 17 ++ 18 files changed, 748 insertions(+) create mode 100644 hackfest5/.gitignore create mode 100644 hackfest5/README.md create mode 100755 hackfest5/clab-cli-dc1.sh create mode 100755 hackfest5/clab-cli-dc2.sh create mode 100755 hackfest5/clab-cli-r1.sh create mode 100755 hackfest5/clab-cli-r2.sh create mode 100755 hackfest5/clab-deploy.sh create mode 100755 hackfest5/clab-destroy.sh create mode 100755 hackfest5/clab-graph.sh create mode 100755 hackfest5/clab-inspect.sh create mode 100644 hackfest5/clab/hackfest5.clab.yml create mode 100644 hackfest5/data/ietf-l3vpn-service.json create mode 100644 hackfest5/data/tfs-service.json create mode 100644 hackfest5/data/tfs-topology.json create mode 100755 hackfest5/deploy_specs.sh create mode 100644 hackfest5/images/arista/.gitignore create mode 100644 hackfest5/images/arista/.gitkeep create mode 100755 hackfest5/redeploy-tfs.sh diff --git a/hackfest5/.gitignore b/hackfest5/.gitignore new file mode 100644 index 000000000..0ba4756f1 --- /dev/null +++ b/hackfest5/.gitignore @@ -0,0 +1,4 @@ +clab-*/ +*.clab.yml.bak +*.tar +*.tar.gz diff --git a/hackfest5/README.md b/hackfest5/README.md new file mode 100644 index 000000000..03f5b9629 --- /dev/null +++ b/hackfest5/README.md @@ -0,0 +1,109 @@ +# Hackfest 5 - Control an Emulated DataPlane through TeraFlowSDN + +## TeraFlowSDN Deployment +```bash +cd ~/tfs-ctrl +source hackfest5/deploy_specs.sh +./deploy/all.sh +``` + +# ContainerLab - hackfest5 cEOS - Commands + +## Download and install ContainerLab +```bash +sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.59.0 +``` + +## Download hackfest5 cEOS image and create Docker image +- Note: Image to be downloaded for free from [Arista](https://www.arista.com/en/login) website. +```bash +cd ~/tfs-ctrl/hackfest5/images/arista +docker import cEOS64-lab-4.32.2F.tar ceos:4.32.2F +``` + +## Deploy scenario +```bash +~/tfs-ctrl/hackfest5/clab-deploy.sh +``` + +## Inspect scenario +```bash +~/tfs-ctrl/hackfest5/clab-inspect.sh +``` + +## Show scenario's topology +```bash +~/tfs-ctrl/hackfest5/clab-graph.sh +``` + +## Destroy scenario +```bash +~/tfs-ctrl/hackfest5/clab-destroy.sh +``` + +## Access cEOS Bash +```bash +docker exec -it clab-hackfest5-r1 bash +``` + +## Access cEOS CLI +```bash +docker exec -it clab-hackfest5-r1 Cli +docker exec -it clab-hackfest5-r2 Cli +``` + +## Configure ContainerLab clients +```bash +docker exec -it clab-hackfest5-client1 bash + ip address add 192.168.1.10/24 dev eth1 + ip route add 192.168.2.0/24 via 192.168.1.1 + ping 192.168.2.10 + +docker exec -it clab-hackfest5-client2 bash + ip address add 192.168.2.10/24 dev eth1 + ip route add 192.168.1.0/24 via 192.168.2.1 + ping 192.168.1.10 +``` + +## Install gNMIc +```bash +sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)" +``` + +## gNMI Capabilities request +```bash +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure capabilities +``` + +## gNMI Get request +```bash +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path / > r1.json +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /interfaces/interface > r1-ifaces.json +``` + +## gNMI Set request +```bash +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --update-path /system/config/hostname --update-value "my-r1" +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /system/config/hostname +``` + +## Subscribe request +```bash +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf subscribe --path /interfaces/interface[name=Management0]/state/ + +# In another terminal, you can generate traffic opening SSH connection +ssh admin@clab-hackfest5-r1 +``` + +# Check configurations done: +```bash +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/network-instances' > r1-nis.json +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/interfaces' > r1-ifs.json +``` + +# Delete elements: +```bash +--address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/network-instances/network-instance[name=b19229e8]' +--address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/1]/subinterfaces/subinterface[index=0]' +--address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/2]/subinterfaces/subinterface[index=0]' +``` diff --git a/hackfest5/clab-cli-dc1.sh b/hackfest5/clab-cli-dc1.sh new file mode 100755 index 000000000..44631fa22 --- /dev/null +++ b/hackfest5/clab-cli-dc1.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker exec -it clab-hackfest5-dc1 bash diff --git a/hackfest5/clab-cli-dc2.sh b/hackfest5/clab-cli-dc2.sh new file mode 100755 index 000000000..56e152014 --- /dev/null +++ b/hackfest5/clab-cli-dc2.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker exec -it clab-hackfest5-dc2 bash diff --git a/hackfest5/clab-cli-r1.sh b/hackfest5/clab-cli-r1.sh new file mode 100755 index 000000000..f921809bf --- /dev/null +++ b/hackfest5/clab-cli-r1.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker exec -it clab-hackfest5-r1 Cli diff --git a/hackfest5/clab-cli-r2.sh b/hackfest5/clab-cli-r2.sh new file mode 100755 index 000000000..154179a63 --- /dev/null +++ b/hackfest5/clab-cli-r2.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker exec -it clab-hackfest5-r2 Cli diff --git a/hackfest5/clab-deploy.sh b/hackfest5/clab-deploy.sh new file mode 100755 index 000000000..84b4d2c22 --- /dev/null +++ b/hackfest5/clab-deploy.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cd ~/tfs-ctrl/hackfest5 +sudo containerlab deploy --topo hackfest5.clab.yml diff --git a/hackfest5/clab-destroy.sh b/hackfest5/clab-destroy.sh new file mode 100755 index 000000000..dc65a82e7 --- /dev/null +++ b/hackfest5/clab-destroy.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cd ~/tfs-ctrl/hackfest5 +sudo containerlab destroy --topo hackfest5.clab.yml +sudo rm -rf clab-hackfest5/ .hackfest5.clab.yml.bak diff --git a/hackfest5/clab-graph.sh b/hackfest5/clab-graph.sh new file mode 100755 index 000000000..f0ad96932 --- /dev/null +++ b/hackfest5/clab-graph.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cd ~/tfs-ctrl/hackfest5 +sudo containerlab graph --topo hackfest5.clab.yml diff --git a/hackfest5/clab-inspect.sh b/hackfest5/clab-inspect.sh new file mode 100755 index 000000000..5e1fc7a62 --- /dev/null +++ b/hackfest5/clab-inspect.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cd ~/tfs-ctrl/hackfest5 +sudo containerlab inspect --topo hackfest5.clab.yml diff --git a/hackfest5/clab/hackfest5.clab.yml b/hackfest5/clab/hackfest5.clab.yml new file mode 100644 index 000000000..f3887d869 --- /dev/null +++ b/hackfest5/clab/hackfest5.clab.yml @@ -0,0 +1,65 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# TFS - Arista devices + Linux clients + +name: hackfest5 + +mgmt: + network: mgmt-net + ipv4-subnet: 172.20.20.0/24 + +topology: + kinds: + arista_ceos: + kind: arista_ceos + #image: ceos:4.30.4M + #image: ceos:4.31.2F + #image: ceos:4.31.5M + #image: ceos:4.32.0F + image: ceos:4.32.2F + #image: ceos:4.32.2.1F + linux: + kind: linux + image: ghcr.io/hellt/network-multitool:latest + + nodes: + r1: + kind: arista_ceos + mgmt-ipv4: 172.20.20.101 + + r2: + kind: arista_ceos + mgmt-ipv4: 172.20.20.102 + + dc1: + kind: linux + mgmt-ipv4: 172.20.20.211 + exec: + - ip link set address 00:c1:ab:00:01:01 dev eth1 + - ip address add 192.168.1.10/24 dev eth1 + - ip route add 192.168.2.0/24 via 192.168.1.1 + + dc2: + kind: linux + mgmt-ipv4: 172.20.20.221 + exec: + - ip link set address 00:c1:ab:00:02:01 dev eth1 + - ip address add 192.168.2.10/24 dev eth1 + - ip route add 192.168.1.0/24 via 192.168.2.1 + + links: + - endpoints: ["r1:eth2", "r2:eth1"] + - endpoints: ["r1:eth10", "dc1:eth1"] + - endpoints: ["r2:eth10", "dc2:eth1"] diff --git a/hackfest5/data/ietf-l3vpn-service.json b/hackfest5/data/ietf-l3vpn-service.json new file mode 100644 index 000000000..9eb70db54 --- /dev/null +++ b/hackfest5/data/ietf-l3vpn-service.json @@ -0,0 +1,83 @@ +{ + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": {"vpn-service": [{"vpn-id": "ietf-l3vpn-svc"}]}, + "sites": { + "site": [ + { + "site-id": "site_DC1", + "management": {"type": "ietf-l3vpn-svc:provider-managed"}, + "locations": {"location": [{"location-id": "DC1"}]}, + "devices": {"device": [{"device-id": "dc1", "location": "DC1"}]}, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "eth1", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "dc1", + "vpn-attachment": {"vpn-id": "ietf-l3vpn-svc", "site-role": "ietf-l3vpn-svc:spoke-role"}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "192.168.1.1", + "customer-address": "192.168.1.10", + "prefix-length": 24 + } + } + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": {"qos-profile": {"classes": {"class": [{ + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": {"latency-boundary": 10}, + "bandwidth": {"guaranteed-bw-percent": 100} + }]}}} + } + } + ] + } + }, + { + "site-id": "site_DC2", + "management": {"type": "ietf-l3vpn-svc:provider-managed"}, + "locations": {"location": [{"location-id": "DC2"}]}, + "devices": {"device": [{"device-id": "dc2", "location": "DC2"}]}, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "eth1", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "dc2", + "vpn-attachment": {"vpn-id": "ietf-l3vpn-svc", "site-role": "ietf-l3vpn-svc:hub-role"}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "192.168.2.1", + "customer-address": "192.168.2.10", + "prefix-length": 24 + } + } + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": {"qos-profile": {"classes": {"class": [{ + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": {"latency-boundary": 10}, + "bandwidth": {"guaranteed-bw-percent": 100} + }]}}} + } + } + ] + } + } + ] + } + } +} diff --git a/hackfest5/data/tfs-service.json b/hackfest5/data/tfs-service.json new file mode 100644 index 000000000..397fc8478 --- /dev/null +++ b/hackfest5/data/tfs-service.json @@ -0,0 +1,26 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "tfs-l3vpn-svc"} + }, + "service_type": "SERVICETYPE_L3NM", + "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, + "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": [], + "service_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[dc1]/endpoint[eth1]/settings", + "resource_value": {"address_ip": "192.168.1.10", "address_prefix": 24, "index": 0} + }}, + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[dc2]/endpoint[eth1]/settings", + "resource_value": {"address_ip": "192.168.2.10", "address_prefix": 24, "index": 0} + }} + ]} + } + ] +} diff --git a/hackfest5/data/tfs-topology.json b/hackfest5/data/tfs-topology.json new file mode 100644 index 000000000..49df9de42 --- /dev/null +++ b/hackfest5/data/tfs-topology.json @@ -0,0 +1,100 @@ +{ + "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": "dc1"}}, "device_type": "emu-datacenter", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "type": "copper"}, {"uuid": "int", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "dc2"}}, "device_type": "emu-datacenter", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "type": "copper"}, {"uuid": "int", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "r1"}}, "device_type": "packet-router", + "device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.101"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "use_tls": false + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "r2"}}, "device_type": "packet-router", + "device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.102"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "use_tls": false + }}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "r1/Ethernet2==r2/Ethernet1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}}, + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "r2/Ethernet1==r1/Ethernet2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}}, + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "r1/Ethernet10==dc1/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, + {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "dc1/eth1==r1/Ethernet10"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "r2/Ethernet10==dc2/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, + {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "dc2/eth1==r2/Ethernet10"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} + ] + } + ] +} diff --git a/hackfest5/deploy_specs.sh b/hackfest5/deploy_specs.sh new file mode 100755 index 000000000..2b59fa62b --- /dev/null +++ b/hackfest5/deploy_specs.sh @@ -0,0 +1,208 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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. +#export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator" +export TFS_COMPONENTS="context device pathcomp service nbi webui" + +# Uncomment to activate Monitoring (old) +#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" + +# Uncomment to activate Monitoring Framework (new) +#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" + +# Uncomment to activate QoS Profiles +#export TFS_COMPONENTS="${TFS_COMPONENTS} qos_profile" + +# Uncomment to activate BGP-LS Speaker +#export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker" + +# Uncomment to activate Optical Controller +# To manage optical connections, "service" requires "opticalcontroller" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "opticalcontroller" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} opticalcontroller service ${AFTER}" +#fi + +# Uncomment to activate ZTP +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" + +# Uncomment to activate Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} policy" + +# Uncomment to activate Optical CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" + +# Uncomment to activate L3 CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector" + +# Uncomment to activate TE +#export TFS_COMPONENTS="${TFS_COMPONENTS} te" + +# Uncomment to activate Forecaster +#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster" + +# Uncomment to activate E2E Orchestrator +#export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator" + +# Uncomment to activate DLT and Interdomain +#export TFS_COMPONENTS="${TFS_COMPONENTS} interdomain dlt" +#if [[ "$TFS_COMPONENTS" == *"dlt"* ]]; then +# export KEY_DIRECTORY_PATH="src/dlt/gateway/keys/priv_sk" +# export CERT_DIRECTORY_PATH="src/dlt/gateway/keys/cert.pem" +# export TLS_CERT_PATH="src/dlt/gateway/keys/ca.crt" +#fi + +# Uncomment to activate QKD App +# To manage QKD Apps, "service" requires "qkd_app" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "qkd_app" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}" +#fi + + +# 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" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Uncomment to monitor performance of components +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" + +# Uncomment when deploying Optical CyberSecurity +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.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 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" + +# 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" + +# Set NATS installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/nats.sh for additional details +export NATS_DEPLOY_MODE="single" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb" + +# 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="9009" + +# 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="" + + +# ----- K8s Observability ------------------------------------------------------ + +# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to. +export PROM_EXT_PORT_HTTP="9090" + +# Set the external port Grafana HTTP Dashboards will be exposed to. +export GRAF_EXT_PORT_HTTP="3000" + + +# ----- Apache Kafka ----------------------------------------------------------- + +# Set the namespace where Apache Kafka will be deployed. +export KFK_NAMESPACE="kafka" + +# Set the port Apache Kafka server will be exposed to. +export KFK_SERVER_PORT="9092" + +# Set the flag to YES for redeploying of Apache Kafka +export KFK_REDEPLOY="" diff --git a/hackfest5/images/arista/.gitignore b/hackfest5/images/arista/.gitignore new file mode 100644 index 000000000..284b64ce5 --- /dev/null +++ b/hackfest5/images/arista/.gitignore @@ -0,0 +1,3 @@ +!.gitkeep +*.tar +*.tar.gz diff --git a/hackfest5/images/arista/.gitkeep b/hackfest5/images/arista/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/hackfest5/redeploy-tfs.sh b/hackfest5/redeploy-tfs.sh new file mode 100755 index 000000000..13f97cc77 --- /dev/null +++ b/hackfest5/redeploy-tfs.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source ~/tfs-ctrl/hackfest5/deploy_specs.sh +./deploy/all.sh -- GitLab From 33d61617bdfa48b7270fdeed95760ece637861df Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 8 Nov 2024 12:12:11 +0000 Subject: [PATCH 033/463] Update hackfest5.clab.yml --- hackfest5/clab/hackfest5.clab.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hackfest5/clab/hackfest5.clab.yml b/hackfest5/clab/hackfest5.clab.yml index f3887d869..2d1fe763c 100644 --- a/hackfest5/clab/hackfest5.clab.yml +++ b/hackfest5/clab/hackfest5.clab.yml @@ -45,7 +45,7 @@ topology: dc1: kind: linux - mgmt-ipv4: 172.20.20.211 + mgmt-ipv4: 172.20.20.201 exec: - ip link set address 00:c1:ab:00:01:01 dev eth1 - ip address add 192.168.1.10/24 dev eth1 @@ -53,7 +53,7 @@ topology: dc2: kind: linux - mgmt-ipv4: 172.20.20.221 + mgmt-ipv4: 172.20.20.202 exec: - ip link set address 00:c1:ab:00:02:01 dev eth1 - ip address add 192.168.2.10/24 dev eth1 -- GitLab From 4a3be7f8ae00786fc4d280d0e5c286a759f86adc Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 8 Nov 2024 12:26:01 +0000 Subject: [PATCH 034/463] Update clab-deploy.sh --- hackfest5/clab-deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hackfest5/clab-deploy.sh b/hackfest5/clab-deploy.sh index 84b4d2c22..56626a90a 100755 --- a/hackfest5/clab-deploy.sh +++ b/hackfest5/clab-deploy.sh @@ -13,5 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -cd ~/tfs-ctrl/hackfest5 +cd ~/tfs-ctrl/hackfest5/clab sudo containerlab deploy --topo hackfest5.clab.yml -- GitLab From d8d09fefc46565722ed5b5c659f1717baf65b157 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 8 Nov 2024 12:26:52 +0000 Subject: [PATCH 035/463] Update hackfest5.clab.yml --- hackfest5/{clab => }/hackfest5.clab.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename hackfest5/{clab => }/hackfest5.clab.yml (100%) diff --git a/hackfest5/clab/hackfest5.clab.yml b/hackfest5/hackfest5.clab.yml similarity index 100% rename from hackfest5/clab/hackfest5.clab.yml rename to hackfest5/hackfest5.clab.yml -- GitLab From 35230182e76e462f832cfeafc26164c34d638af5 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 8 Nov 2024 12:27:10 +0000 Subject: [PATCH 036/463] Update clab-deploy.sh --- hackfest5/clab-deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hackfest5/clab-deploy.sh b/hackfest5/clab-deploy.sh index 56626a90a..84b4d2c22 100755 --- a/hackfest5/clab-deploy.sh +++ b/hackfest5/clab-deploy.sh @@ -13,5 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -cd ~/tfs-ctrl/hackfest5/clab +cd ~/tfs-ctrl/hackfest5 sudo containerlab deploy --topo hackfest5.clab.yml -- GitLab From dd1164aac579cd9fc058c53fb4b7256c127b03e9 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 8 Nov 2024 16:39:14 +0000 Subject: [PATCH 037/463] Update deploy_specs.sh --- hackfest5/deploy_specs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hackfest5/deploy_specs.sh b/hackfest5/deploy_specs.sh index 2b59fa62b..e9565218a 100755 --- a/hackfest5/deploy_specs.sh +++ b/hackfest5/deploy_specs.sh @@ -24,7 +24,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" export TFS_COMPONENTS="context device pathcomp service nbi webui" # Uncomment to activate Monitoring (old) -#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" +export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" # Uncomment to activate Monitoring Framework (new) #export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" @@ -199,10 +199,10 @@ export GRAF_EXT_PORT_HTTP="3000" # ----- Apache Kafka ----------------------------------------------------------- # Set the namespace where Apache Kafka will be deployed. -export KFK_NAMESPACE="kafka" +#export KFK_NAMESPACE="kafka" # Set the port Apache Kafka server will be exposed to. -export KFK_SERVER_PORT="9092" +#export KFK_SERVER_PORT="9092" # Set the flag to YES for redeploying of Apache Kafka -export KFK_REDEPLOY="" +#export KFK_REDEPLOY="" -- GitLab From a8a7e9434a5c84fc0463d12ae3a50ba6090412bf Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Sat, 9 Nov 2024 11:29:18 +0000 Subject: [PATCH 038/463] chore: remove unecessary imports and add comment in _Driver --- src/device/service/driver_api/_Driver.py | 2 ++ src/tests/p4-fwd-l1/tests/Objects.py | 12 +++--------- .../p4-fwd-l1/tests/test_functional_bootstrap.py | 7 +------ .../p4-fwd-l1/tests/test_functional_cleanup.py | 11 +++-------- .../tests/test_functional_create_service.py | 14 +++----------- .../tests/test_functional_delete_service.py | 10 ++-------- 6 files changed, 14 insertions(+), 42 deletions(-) diff --git a/src/device/service/driver_api/_Driver.py b/src/device/service/driver_api/_Driver.py index 2580c3e78..f17004d24 100644 --- a/src/device/service/driver_api/_Driver.py +++ b/src/device/service/driver_api/_Driver.py @@ -31,6 +31,8 @@ class _Driver: def __init__(self, name : str, address: str, port: int, **settings) -> None: """ Initialize Driver. Parameters: + name : str + Device driver name address : str The address of the device port : int diff --git a/src/tests/p4-fwd-l1/tests/Objects.py b/src/tests/p4-fwd-l1/tests/Objects.py index ba260e936..83d1e23b4 100644 --- a/src/tests/p4-fwd-l1/tests/Objects.py +++ b/src/tests/p4-fwd-l1/tests/Objects.py @@ -13,18 +13,12 @@ # limitations under the License. import os -from typing import Dict, List, Tuple from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME from common.tools.object_factory.Context import json_context, json_context_id from common.tools.object_factory.Device import ( - json_device_connect_rules, json_device_emulated_connect_rules, json_device_emulated_packet_router_disabled, - json_device_connect_rules, json_device_id, json_device_p4_disabled, - json_device_emulated_tapi_disabled, json_device_id, json_device_packetrouter_disabled, json_device_tapi_disabled) -from common.tools.object_factory.Service import ( - get_service_uuid, json_service_l3nm_planned,json_service_p4_planned) -from common.tools.object_factory.ConfigRule import ( - json_config_rule_set, json_config_rule_delete) -from common.tools.object_factory.EndPoint import json_endpoint, json_endpoint_ids, json_endpoints, json_endpoint_id + json_device_connect_rules, json_device_id, json_device_p4_disabled) +from common.tools.object_factory.Service import get_service_uuid, json_service_p4_planned +from common.tools.object_factory.EndPoint import json_endpoint_ids, json_endpoints from common.tools.object_factory.EndPoint import json_endpoint_descriptor from common.tools.object_factory.Link import get_link_uuid, json_link, json_link_id from common.tools.object_factory.Topology import json_topology, json_topology_id diff --git a/src/tests/p4-fwd-l1/tests/test_functional_bootstrap.py b/src/tests/p4-fwd-l1/tests/test_functional_bootstrap.py index fe622c908..341799c02 100644 --- a/src/tests/p4-fwd-l1/tests/test_functional_bootstrap.py +++ b/src/tests/p4-fwd-l1/tests/test_functional_bootstrap.py @@ -14,14 +14,9 @@ import copy, logging, pytest from common.Settings import get_setting -from common.tests.EventTools import EVENT_CREATE, EVENT_UPDATE, check_events from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Device import json_device_id -from common.tools.object_factory.Link import json_link_id -from common.tools.object_factory.Topology import json_topology_id from context.client.ContextClient import ContextClient -from context.client.EventsCollector import EventsCollector -from common.proto.context_pb2 import ConfigActionEnum, Context, ContextId, Device, Empty, Link, Topology, DeviceOperationalStatusEnum +from common.proto.context_pb2 import Context, ContextId, Device, Empty, Link, Topology, DeviceOperationalStatusEnum from device.client.DeviceClient import DeviceClient from .Objects import CONTEXT_ID, CONTEXTS, DEVICES, LINKS, TOPOLOGIES diff --git a/src/tests/p4-fwd-l1/tests/test_functional_cleanup.py b/src/tests/p4-fwd-l1/tests/test_functional_cleanup.py index 67934ff8a..0b44f794d 100644 --- a/src/tests/p4-fwd-l1/tests/test_functional_cleanup.py +++ b/src/tests/p4-fwd-l1/tests/test_functional_cleanup.py @@ -12,18 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -import copy, logging, pytest +import logging, pytest from common.Settings import get_setting -from common.tests.EventTools import EVENT_REMOVE, check_events from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Device import json_device_id -from common.tools.object_factory.Link import json_link_id -from common.tools.object_factory.Topology import json_topology_id from context.client.ContextClient import ContextClient -from context.client.EventsCollector import EventsCollector -from common.proto.context_pb2 import ConfigActionEnum, ContextId, Device, DeviceId, Empty, Link, LinkId, TopologyId, DeviceOperationalStatusEnum +from common.proto.context_pb2 import ContextId, DeviceId, Empty, LinkId, TopologyId from device.client.DeviceClient import DeviceClient -from .Objects import CONTEXT_ID, CONTEXTS, DEVICES, LINKS, TOPOLOGIES +from .Objects import CONTEXTS, DEVICES, LINKS, TOPOLOGIES LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/tests/p4-fwd-l1/tests/test_functional_create_service.py b/src/tests/p4-fwd-l1/tests/test_functional_create_service.py index 9f82da129..ee714c477 100644 --- a/src/tests/p4-fwd-l1/tests/test_functional_create_service.py +++ b/src/tests/p4-fwd-l1/tests/test_functional_create_service.py @@ -14,24 +14,16 @@ import copy, logging, pytest from common.Settings import get_setting -from common.tests.EventTools import EVENT_CREATE, EVENT_UPDATE, check_events -from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Device import json_device_id -from common.tools.object_factory.Service import json_service_id -from common.tools.object_factory.Link import json_link_id -from common.tools.object_factory.Topology import json_topology_id from context.client.ContextClient import ContextClient -from context.client.EventsCollector import EventsCollector -from common.proto.context_pb2 import Context, ContextId, Device, Empty, Link, Topology, Service, ServiceId +from common.proto.context_pb2 import Service from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient -from tests.p4.tests.Objects import CONTEXT_ID, CONTEXTS, DEVICES, LINKS, TOPOLOGIES, SERVICES -from common.proto.context_pb2 import ConfigActionEnum, Device, DeviceId,\ - DeviceOperationalStatusEnum +from tests.p4.tests.Objects import SERVICES LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) + @pytest.fixture(scope='session') def context_client(): _client = ContextClient(get_setting('CONTEXTSERVICE_SERVICE_HOST'), get_setting('CONTEXTSERVICE_SERVICE_PORT_GRPC')) diff --git a/src/tests/p4-fwd-l1/tests/test_functional_delete_service.py b/src/tests/p4-fwd-l1/tests/test_functional_delete_service.py index 98b6a01c1..439a88efd 100644 --- a/src/tests/p4-fwd-l1/tests/test_functional_delete_service.py +++ b/src/tests/p4-fwd-l1/tests/test_functional_delete_service.py @@ -14,18 +14,12 @@ import copy, logging, pytest from common.Settings import get_setting -from common.tests.EventTools import EVENT_REMOVE, check_events -from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.Service import json_service_id -from common.tools.object_factory.Link import json_link_id -from common.tools.object_factory.Topology import json_topology_id from context.client.ContextClient import ContextClient -from context.client.EventsCollector import EventsCollector -from common.proto.context_pb2 import ConfigActionEnum, ContextId, Device, DeviceId, Empty, LinkId, TopologyId, Service, ServiceId, DeviceOperationalStatusEnum +from common.proto.context_pb2 import ServiceId from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient -from .Objects import CONTEXT_ID, CONTEXTS, DEVICES, LINKS, TOPOLOGIES, SERVICES +from .Objects import CONTEXT_ID, SERVICES LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) -- GitLab From 7fae0639b8f7eb6f56b63b0208ff0243d8f61aa6 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 11 Nov 2024 09:18:10 +0000 Subject: [PATCH 039/463] Updated Hackfest 5 scripts --- deploy/all.sh | 4 ++-- deploy/nats.sh | 3 +-- deploy/tfs.sh | 32 ++++++++++++++++---------------- hackfest5/redeploy-tfs.sh | 5 +++++ 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/deploy/all.sh b/deploy/all.sh index 97f4db37d..96d9e30ca 100755 --- a/deploy/all.sh +++ b/deploy/all.sh @@ -212,8 +212,8 @@ export GRAF_EXT_PORT_HTTP=${GRAF_EXT_PORT_HTTP:-"3000"} # Deploy QuestDB ./deploy/qdb.sh -# Deploy Apache Kafka -./deploy/kafka.sh +## Deploy Apache Kafka +#./deploy/kafka.sh # Expose Dashboard ./deploy/expose_dashboard.sh diff --git a/deploy/nats.sh b/deploy/nats.sh index cb3dd2318..b6df8066b 100755 --- a/deploy/nats.sh +++ b/deploy/nats.sh @@ -69,8 +69,7 @@ function nats_deploy_single() { echo ">>> NATS is present; skipping step." else echo ">>> Deploy NATS" - helm3 install ${NATS_NAMESPACE} nats/nats --namespace ${NATS_NAMESPACE} --set nats.image=nats:2.9-alpine --set config.cluster.enabled=true --set config.cluster.tls.enabled=true - + helm3 install ${NATS_NAMESPACE} nats/nats --namespace ${NATS_NAMESPACE} --set nats.image=nats:2.9-alpine echo ">>> Waiting NATS statefulset to be created..." while ! kubectl get --namespace ${NATS_NAMESPACE} statefulset/${NATS_NAMESPACE} &> /dev/null; do diff --git a/deploy/tfs.sh b/deploy/tfs.sh index f39609408..76e0a7383 100755 --- a/deploy/tfs.sh +++ b/deploy/tfs.sh @@ -112,16 +112,16 @@ export PROM_EXT_PORT_HTTP=${PROM_EXT_PORT_HTTP:-"9090"} export GRAF_EXT_PORT_HTTP=${GRAF_EXT_PORT_HTTP:-"3000"} -# ----- Apache Kafka ------------------------------------------------------ - -# If not already set, set the namespace where Apache Kafka will be deployed. -export KFK_NAMESPACE=${KFK_NAMESPACE:-"kafka"} - -# If not already set, set the port Apache Kafka server will be exposed to. -export KFK_SERVER_PORT=${KFK_SERVER_PORT:-"9092"} - -# If not already set, if flag is YES, Apache Kafka will be redeployed and topic will be lost. -export KFK_REDEPLOY=${KFK_REDEPLOY:-""} +## ----- Apache Kafka ------------------------------------------------------ +# +## If not already set, set the namespace where Apache Kafka will be deployed. +#export KFK_NAMESPACE=${KFK_NAMESPACE:-"kafka"} +# +## If not already set, set the port Apache Kafka server will be exposed to. +#export KFK_SERVER_PORT=${KFK_SERVER_PORT:-"9092"} +# +## If not already set, if flag is YES, Apache Kafka will be redeployed and topic will be lost. +#export KFK_REDEPLOY=${KFK_REDEPLOY:-""} ######################################################################################################################## # Automated steps start here @@ -153,12 +153,12 @@ kubectl create secret generic crdb-data --namespace ${TFS_K8S_NAMESPACE} --type= --from-literal=CRDB_SSLMODE=require printf "\n" -echo ">>> Create Secret with Apache Kakfa..." -KFK_SERVER_PORT=$(kubectl --namespace ${KFK_NAMESPACE} get service kafka-service -o 'jsonpath={.spec.ports[0].port}') -kubectl create secret generic kfk-kpi-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \ - --from-literal=KFK_NAMESPACE=${KFK_NAMESPACE} \ - --from-literal=KFK_SERVER_PORT=${KFK_SERVER_PORT} -printf "\n" +#echo ">>> Create Secret with Apache Kafka..." +#KFK_SERVER_PORT=$(kubectl --namespace ${KFK_NAMESPACE} get service kafka-service -o 'jsonpath={.spec.ports[0].port}') +#kubectl create secret generic kfk-kpi-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \ +# --from-literal=KFK_NAMESPACE=${KFK_NAMESPACE} \ +# --from-literal=KFK_SERVER_PORT=${KFK_SERVER_PORT} +#printf "\n" echo "Create secret with NATS data" NATS_CLIENT_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service ${NATS_NAMESPACE} -o 'jsonpath={.spec.ports[?(@.name=="client")].port}') diff --git a/hackfest5/redeploy-tfs.sh b/hackfest5/redeploy-tfs.sh index 13f97cc77..8ea927241 100755 --- a/hackfest5/redeploy-tfs.sh +++ b/hackfest5/redeploy-tfs.sh @@ -14,4 +14,9 @@ # limitations under the License. source ~/tfs-ctrl/hackfest5/deploy_specs.sh + +helm3 uninstall --namespace ${NATS_NAMESPACE} ${NATS_NAMESPACE} +kubectl delete namespace ${NATS_NAMESPACE} --ignore-not-found +kubectl delete namespace ${KFK_NAMESPACE} --ignore-not-found + ./deploy/all.sh -- GitLab From 43ab63884a8c2f88255395f87a42f0eefc62328d Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 11 Nov 2024 10:09:37 +0000 Subject: [PATCH 040/463] Hackfest 5: - Updated redeploy-tfs script - Updated CLab descriptor - Updated README --- hackfest5/README.md | 122 ++++++++++++++++++++++++++--------- hackfest5/hackfest5.clab.yml | 4 +- hackfest5/redeploy-tfs.sh | 12 ++++ 3 files changed, 104 insertions(+), 34 deletions(-) diff --git a/hackfest5/README.md b/hackfest5/README.md index 03f5b9629..c64105389 100644 --- a/hackfest5/README.md +++ b/hackfest5/README.md @@ -1,93 +1,151 @@ # Hackfest 5 - Control an Emulated DataPlane through TeraFlowSDN -## TeraFlowSDN Deployment + +## Prepare your VM ```bash cd ~/tfs-ctrl -source hackfest5/deploy_specs.sh -./deploy/all.sh +git checkout feat/hackfest5 +git pull ``` -# ContainerLab - hackfest5 cEOS - Commands -## Download and install ContainerLab + +## ContainerLab Commands + +### Download and install ContainerLab ```bash sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.59.0 ``` -## Download hackfest5 cEOS image and create Docker image +### Check available images in Docker +```bash +docker images | grep -E "ceos|multitool" +``` + +### Download hackfest5 cEOS image and create Docker image [already done] - Note: Image to be downloaded for free from [Arista](https://www.arista.com/en/login) website. ```bash -cd ~/tfs-ctrl/hackfest5/images/arista -docker import cEOS64-lab-4.32.2F.tar ceos:4.32.2F +docker import ~/tfs-ctrl/hackfest5/images/arista/cEOS64-lab-4.31.5M.tar ceos:4.31.5M +docker import ~/tfs-ctrl/hackfest5/images/arista/cEOS64-lab-4.32.2F.tar ceos:4.32.2F ``` -## Deploy scenario +### Deploy scenario ```bash ~/tfs-ctrl/hackfest5/clab-deploy.sh ``` -## Inspect scenario +### Inspect scenario ```bash ~/tfs-ctrl/hackfest5/clab-inspect.sh ``` -## Show scenario's topology +### Show scenario's topology ```bash ~/tfs-ctrl/hackfest5/clab-graph.sh ``` -## Destroy scenario +### Destroy scenario ```bash ~/tfs-ctrl/hackfest5/clab-destroy.sh ``` -## Access cEOS Bash +### Access cEOS CLI ```bash -docker exec -it clab-hackfest5-r1 bash +~/tfs-ctrl/hackfest5/clab-cli-r1.sh ``` -## Access cEOS CLI +### Access DC CLI ```bash -docker exec -it clab-hackfest5-r1 Cli -docker exec -it clab-hackfest5-r2 Cli +~/tfs-ctrl/hackfest5/clab-cli-dc1.sh ``` -## Configure ContainerLab clients +### Start pinging remote DC ```bash -docker exec -it clab-hackfest5-client1 bash - ip address add 192.168.1.10/24 dev eth1 - ip route add 192.168.2.0/24 via 192.168.1.1 +~/tfs-ctrl/hackfest5/clab-cli-dc1.sh ping 192.168.2.10 +``` + + + +## TeraFlowSDN Commands -docker exec -it clab-hackfest5-client2 bash - ip address add 192.168.2.10/24 dev eth1 - ip route add 192.168.1.0/24 via 192.168.2.1 - ping 192.168.1.10 +### Re-Deploy TeraFlowSDN +```bash +~/tfs-ctrl/hackfest5/redeploy-tfs.sh ``` -## Install gNMIc +### Show TeraFlowSDN Deployment status +```bash +source ~/tfs-ctrl/hackfest5/deploy_specs.sh +./deploy/show.sh +``` + +### Show log of a TeraFlowSDN component +```bash +source ~/tfs-ctrl/hackfest5/deploy_specs.sh +~/tfs-ctrl/scripts/show_logs_device.sh +``` + + + +## L3VPN Commands + +### Create a new IETF L3VPN through TeraFlowSDN NBI +```bash +cd ~/tfs-ctrl/hackfest5/data +curl -X POST \ + --header "Content-Type: application/json" \ + --data @ietf-l3vpn-service.json \ + --user "admin:admin" \ + http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services +``` + +### Get UUID of a IETF L3VPN through TeraFlowSDN NBI +```bash +curl --user "admin:admin" \ + http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=ietf-l3vpn-svc/ +``` + +### Delete a IETF L3VPN through TeraFlowSDN NBI +```bash +curl -X DELETE --user "admin:admin" \ + http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=ietf-l3vpn-svc/ +``` + +### Start pinging remote DC +```bash +~/tfs-ctrl/hackfest5/clab-cli-dc1.sh + ping 192.168.2.10 +``` + + + + +## gNMIc Commands + +### Install gNMIc ```bash sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)" ``` -## gNMI Capabilities request +### gNMI Capabilities request ```bash gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure capabilities ``` -## gNMI Get request +### gNMI Get request ```bash gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path / > r1.json gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /interfaces/interface > r1-ifaces.json ``` -## gNMI Set request +### gNMI Set request ```bash gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --update-path /system/config/hostname --update-value "my-r1" gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /system/config/hostname ``` -## Subscribe request +### Subscribe request ```bash gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf subscribe --path /interfaces/interface[name=Management0]/state/ @@ -95,13 +153,13 @@ gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin ssh admin@clab-hackfest5-r1 ``` -# Check configurations done: +### Check configurations done: ```bash gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/network-instances' > r1-nis.json gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/interfaces' > r1-ifs.json ``` -# Delete elements: +### Delete elements: ```bash --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/network-instances/network-instance[name=b19229e8]' --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/1]/subinterfaces/subinterface[index=0]' diff --git a/hackfest5/hackfest5.clab.yml b/hackfest5/hackfest5.clab.yml index 2d1fe763c..2fb703df0 100644 --- a/hackfest5/hackfest5.clab.yml +++ b/hackfest5/hackfest5.clab.yml @@ -26,9 +26,9 @@ topology: kind: arista_ceos #image: ceos:4.30.4M #image: ceos:4.31.2F - #image: ceos:4.31.5M + image: ceos:4.31.5M #image: ceos:4.32.0F - image: ceos:4.32.2F + #image: ceos:4.32.2F #image: ceos:4.32.2.1F linux: kind: linux diff --git a/hackfest5/redeploy-tfs.sh b/hackfest5/redeploy-tfs.sh index 8ea927241..8369b2b61 100755 --- a/hackfest5/redeploy-tfs.sh +++ b/hackfest5/redeploy-tfs.sh @@ -15,8 +15,20 @@ source ~/tfs-ctrl/hackfest5/deploy_specs.sh +echo "Cleaning-up old NATS and Kafka deployments..." helm3 uninstall --namespace ${NATS_NAMESPACE} ${NATS_NAMESPACE} kubectl delete namespace ${NATS_NAMESPACE} --ignore-not-found kubectl delete namespace ${KFK_NAMESPACE} --ignore-not-found +printf "\n" +echo "Deployting TeraFlowSDN..." ./deploy/all.sh +printf "\n" + +echo "Waiting for Context to be subscribed to NATS..." +while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do + printf "%c" "." + sleep 1 +done +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server +printf "\n" -- GitLab From e10bd36794f149b29859ff2401c7c576f6146689 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 11 Nov 2024 10:10:15 +0000 Subject: [PATCH 041/463] Service component - L3NM gNMI OpenConfig: - Ignore default networks 0.0.0.0/* --- .../l3nm_gnmi_openconfig/ConfigRuleComposer.py | 3 ++- .../l3nm_gnmi_openconfig/StaticRouteGenerator.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py index 54101d041..ec03f1b7a 100644 --- a/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py @@ -201,7 +201,8 @@ class DeviceComposer: endpoint.ipv4_prefix_len = ipv4_prefix_len endpoint.sub_interface_index = int(subif_index) endpoint_ip_network = netaddr.IPNetwork('{:s}/{:d}'.format(ipv4_network, ipv4_prefix_len)) - self.connected.add(str(endpoint_ip_network.cidr)) + if '0.0.0.0/' not in str(endpoint_ip_network.cidr): + self.connected.add(str(endpoint_ip_network.cidr)) match = RE_SR.match(config_rule_custom.resource_key) if match is not None: diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py index c52321473..b315c7f4d 100644 --- a/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py @@ -138,6 +138,7 @@ class StaticRouteGenerator: if endpoint.ipv4_address is None: continue ip_network = _compose_ipv4_network(endpoint.ipv4_address, endpoint.ipv4_prefix_len) + if '0.0.0.0/' in str(ip_network.cidr): continue device.connected.add(str(ip_network.cidr)) def _compute_static_routes( -- GitLab From c4ae09781466bd279a8c59278ddef3ff1e5b5831 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 11 Nov 2024 14:09:33 +0000 Subject: [PATCH 042/463] Hackfest 5: - Updated redeploy-tfs script - Updated CLab descriptor - Updated commands in README --- hackfest5/README.md | 20 ++++++++++++++++++ hackfest5/hackfest5.clab.yml | 2 ++ hackfest5/r1-startup.cfg | 39 ++++++++++++++++++++++++++++++++++++ hackfest5/r2-startup.cfg | 39 ++++++++++++++++++++++++++++++++++++ hackfest5/redeploy-tfs.sh | 2 +- 5 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 hackfest5/r1-startup.cfg create mode 100644 hackfest5/r2-startup.cfg diff --git a/hackfest5/README.md b/hackfest5/README.md index c64105389..1906a5005 100644 --- a/hackfest5/README.md +++ b/hackfest5/README.md @@ -69,6 +69,26 @@ docker import ~/tfs-ctrl/hackfest5/images/arista/cEOS64-lab-4.32.2F.tar ceos:4.3 ## TeraFlowSDN Commands +### Check status of MicroK8s +```bash +microk8s.status --wait-ready +``` + +### Start MicroK8s +```bash +microk8s.start +``` + +### Periodically report status of MicroK8s every second +```bash +watch -n 1 microk8s.status --wait-ready +``` + +### Periodically report status of workload in MicroK8s every second +```bash +watch -n 1 kubectl get all --all-namespaces +``` + ### Re-Deploy TeraFlowSDN ```bash ~/tfs-ctrl/hackfest5/redeploy-tfs.sh diff --git a/hackfest5/hackfest5.clab.yml b/hackfest5/hackfest5.clab.yml index 2fb703df0..acc58e9d0 100644 --- a/hackfest5/hackfest5.clab.yml +++ b/hackfest5/hackfest5.clab.yml @@ -38,10 +38,12 @@ topology: r1: kind: arista_ceos mgmt-ipv4: 172.20.20.101 + startup-config: r1-startup.cfg r2: kind: arista_ceos mgmt-ipv4: 172.20.20.102 + startup-config: r2-startup.cfg dc1: kind: linux diff --git a/hackfest5/r1-startup.cfg b/hackfest5/r1-startup.cfg new file mode 100644 index 000000000..2d1964f5f --- /dev/null +++ b/hackfest5/r1-startup.cfg @@ -0,0 +1,39 @@ +! device: r1 (cEOSLab, EOS-4.31.2F-35442176.4312F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$tUMBMqI5iPca5XcJ$5QU/R83S.zjpHQyeB3H63BGWOgxewjqZ1NsxdaWPo3gLwRXVTrgYvMmwwZlzjYoqrD7yp7e9YD073/.FKLYEY1 +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r1 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api http-commands + no shutdown +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet2 +! +interface Ethernet10 +! +interface Management0 + ip address 172.20.20.101/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +! +end diff --git a/hackfest5/r2-startup.cfg b/hackfest5/r2-startup.cfg new file mode 100644 index 000000000..7acd56bf6 --- /dev/null +++ b/hackfest5/r2-startup.cfg @@ -0,0 +1,39 @@ +! device: r2 (cEOSLab, EOS-4.31.2F-35442176.4312F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$Z/om4jI3S5BmwxfB$igaSOaJnh3m36TbSMHKCusA77m07CU8JJxalupXIUFuy7HaGt6k.C1kfSJsPqjn1AhLaL.LvLkt/hcqTFgpjG. +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r2 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api http-commands + no shutdown +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet1 +! +interface Ethernet10 +! +interface Management0 + ip address 172.20.20.102/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +! +end diff --git a/hackfest5/redeploy-tfs.sh b/hackfest5/redeploy-tfs.sh index 8369b2b61..688d8ef39 100755 --- a/hackfest5/redeploy-tfs.sh +++ b/hackfest5/redeploy-tfs.sh @@ -18,7 +18,7 @@ source ~/tfs-ctrl/hackfest5/deploy_specs.sh echo "Cleaning-up old NATS and Kafka deployments..." helm3 uninstall --namespace ${NATS_NAMESPACE} ${NATS_NAMESPACE} kubectl delete namespace ${NATS_NAMESPACE} --ignore-not-found -kubectl delete namespace ${KFK_NAMESPACE} --ignore-not-found +kubectl delete namespace kafka --ignore-not-found printf "\n" echo "Deployting TeraFlowSDN..." -- GitLab From 63571f203fa590f481b4b8456473b686096d6509 Mon Sep 17 00:00:00 2001 From: mansoca Date: Tue, 12 Nov 2024 14:49:52 +0000 Subject: [PATCH 043/463] working version --- src/context/service/database/Link.py | 7 ++-- .../service/database/models/LinkModel.py | 8 ++++- .../service/database/models/enums/LinkType.py | 32 +++++++++++++++++++ .../E2EOrchestratorServiceServicerImpl.py | 22 +++++++------ src/e2e_orchestrator/service/__main__.py | 11 +++---- .../nbi_plugins/tfs_api/Resources.py | 16 ++++++++-- .../service/ServiceServiceServicerImpl.py | 8 ++--- src/tests/ecoc24/Dockerfile | 11 ++++--- src/tests/ecoc24/deploy_e2e.sh | 2 +- src/tests/ecoc24/deploy_ip.sh | 2 +- src/tests/ecoc24/deploy_opt.sh | 2 +- src/tests/ecoc24/deploy_specs_opt.sh | 4 +-- .../service/VNTManagerServiceServicerImpl.py | 20 ++++++------ 13 files changed, 99 insertions(+), 46 deletions(-) create mode 100644 src/context/service/database/models/enums/LinkType.py diff --git a/src/context/service/database/Link.py b/src/context/service/database/Link.py index deef3769c..673947f03 100644 --- a/src/context/service/database/Link.py +++ b/src/context/service/database/Link.py @@ -28,6 +28,7 @@ from .models.TopologyModel import TopologyLinkModel, TopologyModel from .uuids.EndPoint import endpoint_get_uuid from .uuids.Link import link_get_uuid from .Events import notify_event_context, notify_event_link, notify_event_topology +from .models.enums.LinkType import grpc_to_enum__link_type_enum LOGGER = logging.getLogger(__name__) @@ -67,8 +68,8 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) raw_link_name = request.name link_name = raw_link_uuid if len(raw_link_name) == 0 else raw_link_name link_uuid = link_get_uuid(request.link_id, link_name=link_name, allow_random=True) - - now = datetime.datetime.utcnow() + link_type = grpc_to_enum__link_type_enum(request.link_type) + now = datetime.datetime.now(datetime.timezone.utc) topology_uuids : Set[str] = set() related_topologies : List[Dict] = list() @@ -117,6 +118,7 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) link_data = [{ 'link_uuid' : link_uuid, 'link_name' : link_name, + 'link_type' : link_type, 'total_capacity_gbps' : total_capacity_gbps, 'used_capacity_gbps' : used_capacity_gbps, 'created_at' : now, @@ -129,6 +131,7 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) index_elements=[LinkModel.link_uuid], set_=dict( link_name = stmt.excluded.link_name, + link_type = stmt.excluded.link_type, total_capacity_gbps = stmt.excluded.total_capacity_gbps, used_capacity_gbps = stmt.excluded.used_capacity_gbps, updated_at = stmt.excluded.updated_at, diff --git a/src/context/service/database/models/LinkModel.py b/src/context/service/database/models/LinkModel.py index 423e39832..2de279a6e 100644 --- a/src/context/service/database/models/LinkModel.py +++ b/src/context/service/database/models/LinkModel.py @@ -13,17 +13,20 @@ # limitations under the License. import operator -from sqlalchemy import CheckConstraint, Column, DateTime, Float, ForeignKey, Integer, String +from sqlalchemy import CheckConstraint, Column, DateTime, Enum, Float, ForeignKey, Integer, String from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.orm import relationship from typing import Dict from ._Base import _Base +from common.proto.context_pb2 import LinkTypeEnum +from .enums.LinkType import ORM_LinkTypeEnum class LinkModel(_Base): __tablename__ = 'link' link_uuid = Column(UUID(as_uuid=False), primary_key=True) link_name = Column(String, nullable=False) + link_type = Column(Enum(ORM_LinkTypeEnum), nullable=False) total_capacity_gbps = Column(Float, nullable=True) used_capacity_gbps = Column(Float, nullable=True) created_at = Column(DateTime, nullable=False) @@ -44,11 +47,14 @@ class LinkModel(_Base): result = { 'link_id' : self.dump_id(), 'name' : self.link_name, + 'link_type' : self.link_type.value, 'link_endpoint_ids': [ link_endpoint.endpoint.dump_id() for link_endpoint in sorted(self.link_endpoints, key=operator.attrgetter('position')) ], } + if self.link_type is None: + self.link_type = LinkTypeEnum.LINKTYPE_UNKNOWN if self.total_capacity_gbps is not None: attributes : Dict = result.setdefault('attributes', dict()) attributes.setdefault('total_capacity_gbps', self.total_capacity_gbps) diff --git a/src/context/service/database/models/enums/LinkType.py b/src/context/service/database/models/enums/LinkType.py new file mode 100644 index 000000000..1ac1a547f --- /dev/null +++ b/src/context/service/database/models/enums/LinkType.py @@ -0,0 +1,32 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 enum, functools +from common.proto.context_pb2 import LinkTypeEnum +from ._GrpcToEnum import grpc_to_enum + +# IMPORTANT: Entries of enum class ORM_DeviceDriverEnum should be named as in +# the proto files removing the prefixes. For example, proto item +# DeviceDriverEnum.DEVICEDRIVER_OPENCONFIG should be included as +# OPENCONFIG. If item name does not match, automatic mapping of +# proto enums to database enums will fail. +class ORM_LinkTypeEnum(enum.Enum): + UNKNOWN = LinkTypeEnum.LINKTYPE_UNKNOWN + COPPER = LinkTypeEnum.LINKTYPE_COPPER + VIRTUAL_COPPER = LinkTypeEnum.LINKTYPE_VIRTUAL_COPPER + OPTICAL = LinkTypeEnum.LINKTYPE_OPTICAL + VIRTUAL_OPTICAL = LinkTypeEnum.LINKTYPE_VIRTUAL_OPTICAL + +grpc_to_enum__link_type_enum = functools.partial( + grpc_to_enum, LinkTypeEnum, ORM_LinkTypeEnum) diff --git a/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py index ae9bfc7d2..c9681f708 100644 --- a/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py +++ b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py @@ -80,7 +80,6 @@ class SubscriptionServer(Thread): LOGGER.debug("Received message from WebSocket: {}".format(message)) except Exception as ex: LOGGER.error('Exception receiving from WebSocket: {}'.format(ex)) - self._events_server() @@ -99,12 +98,13 @@ class SubscriptionServer(Thread): def _event_received(self, connection): + LOGGER.debug('Event received') for message in connection: message_json = json.loads(message) - # LOGGER.info("message_json: {}".format(message_json)) # Link creation if 'link_id' in message_json: + LOGGER.debug('Link creation') link = Link(**message_json) service = Service() @@ -114,12 +114,12 @@ class SubscriptionServer(Thread): service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED service_client.CreateService(service) - links = context_client.ListLinks(Empty()).links a_device_uuid = device_get_uuid(link.link_endpoint_ids[0].device_id) a_endpoint_uuid = endpoint_get_uuid(link.link_endpoint_ids[0])[2] z_device_uuid = device_get_uuid(link.link_endpoint_ids[1].device_id) z_endpoint_uuid = endpoint_get_uuid(link.link_endpoint_ids[1])[2] + links = context_client.ListLinks(Empty()).links for _link in links: for _endpoint_id in _link.link_endpoint_ids: if _endpoint_id.device_id.device_uuid.uuid == a_device_uuid and \ @@ -130,7 +130,9 @@ class SubscriptionServer(Thread): z_ep_id = _endpoint_id if (not 'a_ep_id' in locals()) or (not 'z_ep_id' in locals()): - error_msg = 'Could not get VNT link endpoints' + error_msg = f'Could not get VNT link endpoints\ + \n\ta_endpoint_uuid= {a_endpoint_uuid}\ + \n\tz_endpoint_uuid= {z_device_uuid}' LOGGER.error(error_msg) connection.send(error_msg) return @@ -138,20 +140,22 @@ class SubscriptionServer(Thread): service.service_endpoint_ids.append(copy.deepcopy(a_ep_id)) service.service_endpoint_ids.append(copy.deepcopy(z_ep_id)) - # service_client.UpdateService(service) + service_client.UpdateService(service) + re_svc = context_client.GetService(service.service_id) connection.send(grpc_message_to_json_string(link)) - # Link removal + context_client.SetLink(link) elif 'link_uuid' in message_json: + LOGGER.debug('Link removal') link_id = LinkId(**message_json) service_id = ServiceId() service_id.service_uuid.uuid = link_id.link_uuid.uuid service_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME - # service_client.DeleteService(service_id) + service_client.DeleteService(service_id) connection.send(grpc_message_to_json_string(link_id)) context_client.RemoveLink(link_id) - # Topology received else: + LOGGER.debug('Topology received') topology_details = TopologyDetails(**message_json) context = Context() @@ -187,12 +191,12 @@ class E2EOrchestratorServiceServicerImpl(E2EOrchestratorServiceServicer): i = 1 while True: try: - LOGGER.info(f'Retrieving external controller #{i}') ADD = str(get_setting(f'EXT_CONTROLLER{i}_ADD')) PORT = str(get_setting(f'EXT_CONTROLLER{i}_PORT')) except Exception as e: break try: + LOGGER.info(f'Retrieving external controller #{i}') url = f'http://{ADD}:{PORT}/tfs-api/context/{DEFAULT_CONTEXT_NAME}/topology_details/{DEFAULT_TOPOLOGY_NAME}' topo = requests.get(url).json() except Exception as e: diff --git a/src/e2e_orchestrator/service/__main__.py b/src/e2e_orchestrator/service/__main__.py index 0854aed2d..4c0a6d471 100644 --- a/src/e2e_orchestrator/service/__main__.py +++ b/src/e2e_orchestrator/service/__main__.py @@ -28,7 +28,10 @@ from common.Settings import (ENVVAR_SUFIX_SERVICE_HOST, from .E2EOrchestratorService import E2EOrchestratorService terminate = threading.Event() -LOGGER = None + +LOG_LEVEL = get_log_level() +logging.basicConfig(level=LOG_LEVEL, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") +LOGGER = logging.getLogger(__name__) def signal_handler(signal, frame): # pylint: disable=redefined-outer-name @@ -37,12 +40,6 @@ def signal_handler(signal, frame): # pylint: disable=redefined-outer-name def main(): - global LOGGER # pylint: disable=global-statement - - log_level = get_log_level() - logging.basicConfig(level=log_level) - LOGGER = logging.getLogger(__name__) - signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGTERM, signal_handler) diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py index 484ccff66..0b99fba50 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py @@ -300,21 +300,31 @@ class Links(_Resource): ] class Link(_Resource): + @staticmethod + def _virtual_link(link): + virtual_types = {LinkTypeEnum.LINKTYPE_VIRTUAL_COPPER, LinkTypeEnum.LINKTYPE_VIRTUAL_OPTICAL} + if link.link_type in virtual_types: + return True + return False + + def get(self, link_uuid : str): return format_grpc_to_json(self.context_client.GetLink(grpc_link_id(link_uuid))) def put(self, link_uuid : str): link_json = request.get_json() link = grpc_link(link_json) - virtual_types = {LinkTypeEnum.LINKTYPE_VIRTUAL_COPPER, LinkTypeEnum.LINKTYPE_VIRTUAL_OPTICAL} if link_uuid != link.link_id.link_uuid.uuid: raise BadRequest('Mismatching link_uuid') - elif link.link_type in virtual_types: + elif self._virtual_link(link): link = grpc_link(link_json) return format_grpc_to_json(self.vntmanager_client.SetVirtualLink(link)) - return format_grpc_to_json(self.context_client.SetLink(grpc_link(link))) + return format_grpc_to_json(self.context_client.SetLink(link)) def delete(self, link_uuid : str): + link = self.context_client.GetLink(grpc_link_id(link_uuid)) + if self._virtual_link(link): + format_grpc_to_json(self.vntmanager_client.RemoveVirtualLink(grpc_link_id(link_uuid))) return format_grpc_to_json(self.context_client.RemoveLink(grpc_link_id(link_uuid))) class ConnectionIds(_Resource): diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py index 9120d475b..b6f8a7faf 100644 --- a/src/service/service/ServiceServiceServicerImpl.py +++ b/src/service/service/ServiceServiceServicerImpl.py @@ -384,10 +384,10 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): if "bandwidth" in constraint.custom.constraint_type: bitrate = int(float(constraint.custom.constraint_value)) break - - bitrate = int(float( - service.service_constraints[0].custom.constraint_value - )) + if service.service_constraints: + bitrate = int(float( + service.service_constraints[0].custom.constraint_value + )) if len(service.service_config.config_rules) > 0: c_rules_dict = json.loads( service.service_config.config_rules[0].custom.resource_value) diff --git a/src/tests/ecoc24/Dockerfile b/src/tests/ecoc24/Dockerfile index 727abbd3a..f9a616e76 100644 --- a/src/tests/ecoc24/Dockerfile +++ b/src/tests/ecoc24/Dockerfile @@ -82,19 +82,22 @@ COPY src/tests/*.py ./tests/ COPY src/tests/ecoc24/__init__.py ./tests/ecoc24/__init__.py COPY src/tests/ecoc24/descriptors/descriptor_ip.json ./tests/ecoc24/descriptors/descriptor_ip.json COPY src/tests/ecoc24/descriptors/descriptor_opt.json ./tests/ecoc24/descriptors/descriptor_opt.json -COPY src/tests/ecoc24/descriptors/link_mapping.json ./tests/ecoc24/descriptors/link_mapping.json +COPY src/tests/ecoc24/descriptors/link_mapping.json ./tests/ecoc24/descriptors/descriptor_e2e.json COPY src/tests/ecoc24/tests/. ./tests/ecoc24/tests/ RUN tee ./run_tests.sh < None: - - time.sleep(5) events_collector = EventsCollector( context_client, log_events_received=True, - activate_context_collector = False, + activate_context_collector = True, activate_topology_collector = True, - activate_device_collector = False, - activate_link_collector = False, + activate_device_collector = True, + activate_link_collector = True, activate_service_collector = False, activate_slice_collector = False, activate_connection_collector = False,) @@ -92,7 +90,7 @@ class VNTMEventDispatcher(threading.Thread): LOGGER.info("Connecting to events server...: {}".format(url)) self.websocket = connect(url) except Exception as ex: - LOGGER.error('Error connecting to {}'.format(url)) + LOGGER.error(f'Error connecting to {url}\n\t{ex}') else: LOGGER.info('Connected to {}'.format(url)) context_id = json_context_id(DEFAULT_CONTEXT_NAME) @@ -108,12 +106,9 @@ class VNTMEventDispatcher(threading.Thread): while not self._terminate.is_set(): event = events_collector.get_event(block=True, timeout=GET_EVENT_TIMEOUT) if event is None: continue - LOGGER.info('Event type: {}'.format(event)) - LOGGER.debug('Received event: {}'.format(event)) + LOGGER.debug('Event type: {}'.format(event)) topology_details = context_client.GetTopologyDetails(TopologyId(**topology_id)) - to_send = grpc_message_to_json_string(topology_details) - self.send_msg(to_send) LOGGER.info('Exiting') @@ -135,6 +130,8 @@ class VNTManagerServiceServicerImpl(VNTManagerServiceServicer): self.event_dispatcher = VNTMEventDispatcher(request.host, int(request.port)) self.host = request.host self.port = request.port + LOGGER.info('sleeping 5...') + time.sleep(5) self.event_dispatcher.start() return reply @@ -158,12 +155,13 @@ class VNTManagerServiceServicerImpl(VNTManagerServiceServicer): link = Link(**message_json) context_client.SetLink(link) except Exception as e: - LOGGER.error('Exception setting virtual link={}\n\t{}'.format(request.link_id.link_uuid.uuid, e)) + LOGGER.error(f'Exception setting virtual link={request.link_id.link_uuid.uuid}\n\t{e}') return request.link_id @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RemoveVirtualLink(self, request : LinkId, context : grpc.ServicerContext) -> Empty: try: + LOGGER.debug('Removing virtual link') self.event_dispatcher.send_msg(grpc_message_to_json_string(request)) # deconfigure('CSGW1', 'xe5', 'CSGW2', 'xe5', 'ecoc2024-1') response = self.event_dispatcher.recv_msg() -- GitLab From 7235b7e7e6ab592b012b0365de6260c7271556df Mon Sep 17 00:00:00 2001 From: mansoca Date: Tue, 12 Nov 2024 15:13:33 +0000 Subject: [PATCH 044/463] check cicd --- src/tests/ecoc24/Dockerfile | 14 ++-- src/tests/ecoc24/tests/create_service.py | 27 +++++++ src/tests/ecoc24/tests/delete_service.py | 10 +++ .../ecoc24/tests/test_functional_cleanup.py | 44 ++++++++++ .../tests/test_functional_create_service.py | 74 +++++++++++++++++ .../tests/test_functional_delete_service.py | 80 +++++++++++++++++++ 6 files changed, 241 insertions(+), 8 deletions(-) create mode 100644 src/tests/ecoc24/tests/create_service.py create mode 100644 src/tests/ecoc24/tests/delete_service.py create mode 100644 src/tests/ecoc24/tests/test_functional_cleanup.py create mode 100644 src/tests/ecoc24/tests/test_functional_create_service.py create mode 100644 src/tests/ecoc24/tests/test_functional_delete_service.py diff --git a/src/tests/ecoc24/Dockerfile b/src/tests/ecoc24/Dockerfile index f9a616e76..52558e338 100644 --- a/src/tests/ecoc24/Dockerfile +++ b/src/tests/ecoc24/Dockerfile @@ -87,16 +87,14 @@ COPY src/tests/ecoc24/tests/. ./tests/ecoc24/tests/ RUN tee ./run_tests.sh < None: + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/tests/ecoc24/tests/test_functional_create_service.py b/src/tests/ecoc24/tests/test_functional_create_service.py new file mode 100644 index 000000000..d4f21978c --- /dev/null +++ b/src/tests/ecoc24/tests/test_functional_create_service.py @@ -0,0 +1,74 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'virtual_link.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_service_creation_bidir( + context_client : ContextClient, # pylint: disable=redefined-outer-name + # device_client : DeviceClient, # pylint: disable=redefined-outer-name + # service_client : ServiceClient, # pylint: disable=redefined-outer-name +): + # Load descriptors and validate the base scenario + # descriptor_loader = DescriptorLoader( + # descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client, + # service_client=service_client + # ) + # results = descriptor_loader.process() + # check_descriptor_load_results(results, descriptor_loader) + + import create_service + + # Verify the scenario has 1 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 1 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 1 + + for service in response.services: + service_id = service.service_id + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + + response = context_client.ListConnections(service_id) + LOGGER.warning(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response))) + + if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + assert len(response.connections) == 2 + else: + str_service = grpc_message_to_json_string(service) + raise Exception('Unexpected ServiceType: {:s}'.format(str_service)) diff --git a/src/tests/ecoc24/tests/test_functional_delete_service.py b/src/tests/ecoc24/tests/test_functional_delete_service.py new file mode 100644 index 000000000..475c58e61 --- /dev/null +++ b/src/tests/ecoc24/tests/test_functional_delete_service.py @@ -0,0 +1,80 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Set, Tuple +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, ServiceId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Service import json_service_id +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, service_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_service_removal_bidir( + context_client : ContextClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient, # pylint: disable=redefined-outer-name +): + # Verify the scenario has 1 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 1 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 1 + + context_service_uuids : Set[Tuple[str, str]] = set() + for service in response.services: + service_id = service.service_id + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + + response = context_client.ListConnections(service_id) + LOGGER.warning(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response))) + + if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + assert len(response.connections) == 2 + context_uuid = service_id.context_id.context_uuid.uuid + service_uuid = service_id.service_uuid.uuid + context_service_uuids.add((context_uuid, service_uuid)) + else: + str_service = grpc_message_to_json_string(service) + raise Exception('Unexpected ServiceType: {:s}'.format(str_service)) + + # Identify service to delete + assert len(context_service_uuids) == 1 + context_uuid, service_uuid = set(context_service_uuids).pop() + + # Delete Service + # service_client.DeleteService(ServiceId(**json_service_id(service_uuid, json_context_id(context_uuid)))) + + import delete_service + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 -- GitLab From 74fe9c3508426ea074e1f5d9abc65a350e0b32a8 Mon Sep 17 00:00:00 2001 From: mansoca Date: Tue, 12 Nov 2024 15:13:33 +0000 Subject: [PATCH 045/463] check cicd --- src/tests/ecoc24/Dockerfile | 16 ++-- src/tests/ecoc24/tests/create_service.py | 27 +++++++ src/tests/ecoc24/tests/delete_service.py | 10 +++ .../ecoc24/tests/test_functional_cleanup.py | 44 ++++++++++ .../tests/test_functional_create_service.py | 74 +++++++++++++++++ .../tests/test_functional_delete_service.py | 80 +++++++++++++++++++ 6 files changed, 242 insertions(+), 9 deletions(-) create mode 100644 src/tests/ecoc24/tests/create_service.py create mode 100644 src/tests/ecoc24/tests/delete_service.py create mode 100644 src/tests/ecoc24/tests/test_functional_cleanup.py create mode 100644 src/tests/ecoc24/tests/test_functional_create_service.py create mode 100644 src/tests/ecoc24/tests/test_functional_delete_service.py diff --git a/src/tests/ecoc24/Dockerfile b/src/tests/ecoc24/Dockerfile index f9a616e76..822e2a0c0 100644 --- a/src/tests/ecoc24/Dockerfile +++ b/src/tests/ecoc24/Dockerfile @@ -82,21 +82,19 @@ COPY src/tests/*.py ./tests/ COPY src/tests/ecoc24/__init__.py ./tests/ecoc24/__init__.py COPY src/tests/ecoc24/descriptors/descriptor_ip.json ./tests/ecoc24/descriptors/descriptor_ip.json COPY src/tests/ecoc24/descriptors/descriptor_opt.json ./tests/ecoc24/descriptors/descriptor_opt.json -COPY src/tests/ecoc24/descriptors/link_mapping.json ./tests/ecoc24/descriptors/descriptor_e2e.json +COPY src/tests/ecoc24/descriptors/descriptor_e2e.json ./tests/ecoc24/descriptors/descriptor_e2e.json COPY src/tests/ecoc24/tests/. ./tests/ecoc24/tests/ RUN tee ./run_tests.sh < None: + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/tests/ecoc24/tests/test_functional_create_service.py b/src/tests/ecoc24/tests/test_functional_create_service.py new file mode 100644 index 000000000..d4f21978c --- /dev/null +++ b/src/tests/ecoc24/tests/test_functional_create_service.py @@ -0,0 +1,74 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'virtual_link.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_service_creation_bidir( + context_client : ContextClient, # pylint: disable=redefined-outer-name + # device_client : DeviceClient, # pylint: disable=redefined-outer-name + # service_client : ServiceClient, # pylint: disable=redefined-outer-name +): + # Load descriptors and validate the base scenario + # descriptor_loader = DescriptorLoader( + # descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client, + # service_client=service_client + # ) + # results = descriptor_loader.process() + # check_descriptor_load_results(results, descriptor_loader) + + import create_service + + # Verify the scenario has 1 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 1 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 1 + + for service in response.services: + service_id = service.service_id + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + + response = context_client.ListConnections(service_id) + LOGGER.warning(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response))) + + if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + assert len(response.connections) == 2 + else: + str_service = grpc_message_to_json_string(service) + raise Exception('Unexpected ServiceType: {:s}'.format(str_service)) diff --git a/src/tests/ecoc24/tests/test_functional_delete_service.py b/src/tests/ecoc24/tests/test_functional_delete_service.py new file mode 100644 index 000000000..475c58e61 --- /dev/null +++ b/src/tests/ecoc24/tests/test_functional_delete_service.py @@ -0,0 +1,80 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Set, Tuple +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, ServiceId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Service import json_service_id +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, service_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_service_removal_bidir( + context_client : ContextClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient, # pylint: disable=redefined-outer-name +): + # Verify the scenario has 1 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 1 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 1 + + context_service_uuids : Set[Tuple[str, str]] = set() + for service in response.services: + service_id = service.service_id + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + + response = context_client.ListConnections(service_id) + LOGGER.warning(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response))) + + if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + assert len(response.connections) == 2 + context_uuid = service_id.context_id.context_uuid.uuid + service_uuid = service_id.service_uuid.uuid + context_service_uuids.add((context_uuid, service_uuid)) + else: + str_service = grpc_message_to_json_string(service) + raise Exception('Unexpected ServiceType: {:s}'.format(str_service)) + + # Identify service to delete + assert len(context_service_uuids) == 1 + context_uuid, service_uuid = set(context_service_uuids).pop() + + # Delete Service + # service_client.DeleteService(ServiceId(**json_service_id(service_uuid, json_context_id(context_uuid)))) + + import delete_service + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 -- GitLab From 2c4b6e0d89ec56ff9fb213dda1a741b4acec443d Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 19 Nov 2024 09:49:55 +0000 Subject: [PATCH 046/463] Device component: - Updated version of websockets --- src/device/requirements.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device/requirements.in b/src/device/requirements.in index 30c982650..c89303df3 100644 --- a/src/device/requirements.in +++ b/src/device/requirements.in @@ -39,7 +39,7 @@ python-json-logger==2.0.2 requests==2.27.1 requests-mock==1.9.3 tabulate -websockets==10.4 +websockets==12.0 werkzeug==2.3.7 xmltodict==0.12.0 yattag -- GitLab From eba2fe40954a9da9a3f83c50ebac2ef1e7aebc42 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 19 Nov 2024 10:33:13 +0000 Subject: [PATCH 047/463] Updated deployment scripts --- deploy/all.sh | 4 ++-- deploy/tfs.sh | 32 ++++++++++++++++---------------- hackfest5/redeploy-tfs.sh | 20 +++++++++++++++++++- 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/deploy/all.sh b/deploy/all.sh index 96d9e30ca..97f4db37d 100755 --- a/deploy/all.sh +++ b/deploy/all.sh @@ -212,8 +212,8 @@ export GRAF_EXT_PORT_HTTP=${GRAF_EXT_PORT_HTTP:-"3000"} # Deploy QuestDB ./deploy/qdb.sh -## Deploy Apache Kafka -#./deploy/kafka.sh +# Deploy Apache Kafka +./deploy/kafka.sh # Expose Dashboard ./deploy/expose_dashboard.sh diff --git a/deploy/tfs.sh b/deploy/tfs.sh index 76e0a7383..a1429e443 100755 --- a/deploy/tfs.sh +++ b/deploy/tfs.sh @@ -112,16 +112,16 @@ export PROM_EXT_PORT_HTTP=${PROM_EXT_PORT_HTTP:-"9090"} export GRAF_EXT_PORT_HTTP=${GRAF_EXT_PORT_HTTP:-"3000"} -## ----- Apache Kafka ------------------------------------------------------ -# -## If not already set, set the namespace where Apache Kafka will be deployed. -#export KFK_NAMESPACE=${KFK_NAMESPACE:-"kafka"} -# -## If not already set, set the port Apache Kafka server will be exposed to. -#export KFK_SERVER_PORT=${KFK_SERVER_PORT:-"9092"} -# -## If not already set, if flag is YES, Apache Kafka will be redeployed and topic will be lost. -#export KFK_REDEPLOY=${KFK_REDEPLOY:-""} +# ----- Apache Kafka ------------------------------------------------------ + +# If not already set, set the namespace where Apache Kafka will be deployed. +export KFK_NAMESPACE=${KFK_NAMESPACE:-"kafka"} + +# If not already set, set the port Apache Kafka server will be exposed to. +export KFK_SERVER_PORT=${KFK_SERVER_PORT:-"9092"} + +# If not already set, if flag is YES, Apache Kafka will be redeployed and topic will be lost. +export KFK_REDEPLOY=${KFK_REDEPLOY:-""} ######################################################################################################################## # Automated steps start here @@ -153,12 +153,12 @@ kubectl create secret generic crdb-data --namespace ${TFS_K8S_NAMESPACE} --type= --from-literal=CRDB_SSLMODE=require printf "\n" -#echo ">>> Create Secret with Apache Kafka..." -#KFK_SERVER_PORT=$(kubectl --namespace ${KFK_NAMESPACE} get service kafka-service -o 'jsonpath={.spec.ports[0].port}') -#kubectl create secret generic kfk-kpi-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \ -# --from-literal=KFK_NAMESPACE=${KFK_NAMESPACE} \ -# --from-literal=KFK_SERVER_PORT=${KFK_SERVER_PORT} -#printf "\n" +echo ">>> Create Secret with Apache Kafka..." +KFK_SERVER_PORT=$(kubectl --namespace ${KFK_NAMESPACE} get service kafka-service -o 'jsonpath={.spec.ports[0].port}') +kubectl create secret generic kfk-kpi-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \ + --from-literal=KFK_NAMESPACE=${KFK_NAMESPACE} \ + --from-literal=KFK_SERVER_PORT=${KFK_SERVER_PORT} +printf "\n" echo "Create secret with NATS data" NATS_CLIENT_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service ${NATS_NAMESPACE} -o 'jsonpath={.spec.ports[?(@.name=="client")].port}') diff --git a/hackfest5/redeploy-tfs.sh b/hackfest5/redeploy-tfs.sh index 688d8ef39..ff55bed3f 100755 --- a/hackfest5/redeploy-tfs.sh +++ b/hackfest5/redeploy-tfs.sh @@ -22,7 +22,25 @@ kubectl delete namespace kafka --ignore-not-found printf "\n" echo "Deployting TeraFlowSDN..." -./deploy/all.sh + +# Deploy CockroachDB +./deploy/crdb.sh + +# Deploy NATS +./deploy/nats.sh + +# Deploy QuestDB +./deploy/qdb.sh + +# Expose Dashboard +./deploy/expose_dashboard.sh + +# Deploy TeraFlowSDN +./deploy/tfs.sh + +# Show deploy summary +./deploy/show.sh + printf "\n" echo "Waiting for Context to be subscribed to NATS..." -- GitLab From 664432b7685fd0144c5c57f2855353c9815363d9 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 19 Nov 2024 10:33:29 +0000 Subject: [PATCH 048/463] Device - gNMI OpenConfig Driver: - Corrected MTU logic --- .../service/drivers/gnmi_openconfig/handlers/Interface.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index 36a024bd1..1fb418542 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -41,14 +41,14 @@ class InterfaceHandler(_Handler): vlan_id = get_int (resource_value, 'vlan_id', ) # 127 address_ip = get_str (resource_value, 'address_ip' ) # 172.16.0.1 address_prefix = get_int (resource_value, 'address_prefix') # 24 - #mtu = get_int (resource_value, 'mtu', 1450) # 1500 + mtu = get_int (resource_value, 'mtu', ) # 1500 yang_ifs : libyang.DContainer = yang_handler.get_data_path('/openconfig-interfaces:interfaces') yang_if_path = 'interface[name="{:s}"]'.format(if_name) yang_if : libyang.DContainer = yang_ifs.create_path(yang_if_path) yang_if.create_path('config/name', if_name ) if enabled is not None: yang_if.create_path('config/enabled', enabled) - #if mtu is not None: yang_if.create_path('config/mtu', mtu) + if mtu is not None: yang_if.create_path('config/mtu', mtu) yang_sifs : libyang.DContainer = yang_if.create_path('subinterfaces') yang_sif_path = 'subinterface[index="{:d}"]'.format(sif_index) @@ -69,7 +69,6 @@ class InterfaceHandler(_Handler): yang_ipv4_addr : libyang.DContainer = yang_ipv4_addrs.create_path(yang_ipv4_addr_path) yang_ipv4_addr.create_path('config/ip', address_ip) yang_ipv4_addr.create_path('config/prefix-length', address_prefix) - #if mtu is not None: yang_ipv4_addr.create_path('config/mtu', mtu) str_path = '/interfaces/interface[name={:s}]'.format(if_name) str_data = yang_if.print_mem('json') -- GitLab From 8c0ed513cf8d97e3ff52d8d54a2e26c1425c4e2f Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 19 Nov 2024 10:34:25 +0000 Subject: [PATCH 049/463] Device - gNMI OpenConfig Driver: - Corrected MTU logic --- .../service/drivers/gnmi_openconfig/handlers/Interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index 1fb418542..a52c84691 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -41,7 +41,7 @@ class InterfaceHandler(_Handler): vlan_id = get_int (resource_value, 'vlan_id', ) # 127 address_ip = get_str (resource_value, 'address_ip' ) # 172.16.0.1 address_prefix = get_int (resource_value, 'address_prefix') # 24 - mtu = get_int (resource_value, 'mtu', ) # 1500 + mtu = get_int (resource_value, 'mtu' ) # 1500 yang_ifs : libyang.DContainer = yang_handler.get_data_path('/openconfig-interfaces:interfaces') yang_if_path = 'interface[name="{:s}"]'.format(if_name) -- GitLab From 8655f81568ac500cbf9f87e7bfa85373f63b01f5 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 19 Nov 2024 10:39:10 +0000 Subject: [PATCH 050/463] Service - gNMI OpenConfig Service Handler: - Generalized configuration of network instances --- .../ConfigRuleComposer.py | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py index ec03f1b7a..277d6d7e1 100644 --- a/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py @@ -21,8 +21,9 @@ from service.service.service_handler_api.AnyTreeTools import TreeNode LOGGER = logging.getLogger(__name__) -#NETWORK_INSTANCE = 'teraflowsdn' +#NETWORK_INSTANCE = 'teraflowsdn' # TODO: investigate; sometimes it does not create/delete static rules properly NETWORK_INSTANCE = 'default' +DEFAULT_NETWORK_INSTANCE = 'default' RE_IF = re.compile(r'^\/interface\[([^\]]+)\]$') RE_SUBIF = re.compile(r'^\/interface\[([^\]]+)\]\/subinterface\[([^\]]+)\]$') @@ -109,11 +110,13 @@ class EndpointComposer: if self.ipv4_address is None: return [] if self.ipv4_prefix_len is None: return [] json_config_rule = json_config_rule_delete if delete else json_config_rule_set - config_rules = [ - #json_config_rule(*_network_instance_interface( - # network_instance_name, self.objekt.name, self.sub_interface_index - #)), - ] + + config_rules : List[Dict] = list() + if network_instance_name != DEFAULT_NETWORK_INSTANCE: + config_rules.append(json_config_rule(*_network_instance_interface( + network_instance_name, self.objekt.name, self.sub_interface_index + ))) + if delete: config_rules.extend([ json_config_rule(*_interface( @@ -226,9 +229,9 @@ class DeviceComposer: if self.objekt.device_type not in SELECTED_DEVICES: return [] json_config_rule = json_config_rule_delete if delete else json_config_rule_set - config_rules = [ - #json_config_rule(*_network_instance(network_instance_name, 'L3VRF')) - ] + config_rules : List[Dict] = list() + if network_instance_name != DEFAULT_NETWORK_INSTANCE: + json_config_rule(*_network_instance(network_instance_name, 'L3VRF')) for endpoint in self.endpoints.values(): config_rules.extend(endpoint.get_config_rules(network_instance_name, delete=delete)) if len(self.static_routes) > 0: -- GitLab From b99f456b0acb2405a723500d81d7bdb12958b9ad Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 19 Nov 2024 15:41:56 +0000 Subject: [PATCH 051/463] Disabled CI/CD unitary tests temporarily for debugging --- .gitlab-ci.yml | 66 +++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2fe405733..25dcab336 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,39 +21,39 @@ stages: # include the individual .gitlab-ci.yml of each micro-service and tests include: - #- local: '/manifests/.gitlab-ci.yml' - - local: '/src/monitoring/.gitlab-ci.yml' - - local: '/src/nbi/.gitlab-ci.yml' - - local: '/src/context/.gitlab-ci.yml' - - local: '/src/device/.gitlab-ci.yml' - - local: '/src/service/.gitlab-ci.yml' - - local: '/src/dbscanserving/.gitlab-ci.yml' - - local: '/src/opticalattackmitigator/.gitlab-ci.yml' - - local: '/src/opticalattackdetector/.gitlab-ci.yml' - - local: '/src/opticalattackmanager/.gitlab-ci.yml' - - local: '/src/opticalcontroller/.gitlab-ci.yml' - - local: '/src/ztp/.gitlab-ci.yml' - - local: '/src/policy/.gitlab-ci.yml' - - local: '/src/automation/.gitlab-ci.yml' - - local: '/src/forecaster/.gitlab-ci.yml' - #- local: '/src/webui/.gitlab-ci.yml' - #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' - - local: '/src/slice/.gitlab-ci.yml' - #- local: '/src/interdomain/.gitlab-ci.yml' - - local: '/src/pathcomp/.gitlab-ci.yml' - #- local: '/src/dlt/.gitlab-ci.yml' - - local: '/src/load_generator/.gitlab-ci.yml' - - local: '/src/bgpls_speaker/.gitlab-ci.yml' - - local: '/src/kpi_manager/.gitlab-ci.yml' - - local: '/src/kpi_value_api/.gitlab-ci.yml' - - local: '/src/kpi_value_writer/.gitlab-ci.yml' - - local: '/src/telemetry/.gitlab-ci.yml' - - local: '/src/analytics/.gitlab-ci.yml' - - local: '/src/qos_profile/.gitlab-ci.yml' - - local: '/src/vnt_manager/.gitlab-ci.yml' - - local: '/src/e2e_orchestrator/.gitlab-ci.yml' +# #- local: '/manifests/.gitlab-ci.yml' +# - local: '/src/monitoring/.gitlab-ci.yml' +# - local: '/src/nbi/.gitlab-ci.yml' +# - local: '/src/context/.gitlab-ci.yml' +# - local: '/src/device/.gitlab-ci.yml' +# - local: '/src/service/.gitlab-ci.yml' +# - local: '/src/dbscanserving/.gitlab-ci.yml' +# - local: '/src/opticalattackmitigator/.gitlab-ci.yml' +# - local: '/src/opticalattackdetector/.gitlab-ci.yml' +# - local: '/src/opticalattackmanager/.gitlab-ci.yml' +# - local: '/src/opticalcontroller/.gitlab-ci.yml' +# - local: '/src/ztp/.gitlab-ci.yml' +# - local: '/src/policy/.gitlab-ci.yml' +# - local: '/src/automation/.gitlab-ci.yml' +# - local: '/src/forecaster/.gitlab-ci.yml' +# #- local: '/src/webui/.gitlab-ci.yml' +# #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' +# #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' +# #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' +# - local: '/src/slice/.gitlab-ci.yml' +# #- local: '/src/interdomain/.gitlab-ci.yml' +# - local: '/src/pathcomp/.gitlab-ci.yml' +# #- local: '/src/dlt/.gitlab-ci.yml' +# - local: '/src/load_generator/.gitlab-ci.yml' +# - local: '/src/bgpls_speaker/.gitlab-ci.yml' +# - local: '/src/kpi_manager/.gitlab-ci.yml' +# - local: '/src/kpi_value_api/.gitlab-ci.yml' +# - local: '/src/kpi_value_writer/.gitlab-ci.yml' +# - local: '/src/telemetry/.gitlab-ci.yml' +# - local: '/src/analytics/.gitlab-ci.yml' +# - local: '/src/qos_profile/.gitlab-ci.yml' +# - local: '/src/vnt_manager/.gitlab-ci.yml' +# - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' -- GitLab From 578d7067308a2862ffd01a09b258f3da9cca1643 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 19 Nov 2024 15:42:32 +0000 Subject: [PATCH 052/463] Manifests: - Corrected Service Monitors for KPI Value and KPI Writter - Enabled DEBUG on Device and PathComp that fail --- manifests/deviceservice.yaml | 2 +- manifests/pathcompservice.yaml | 2 +- manifests/servicemonitors.yaml | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/manifests/deviceservice.yaml b/manifests/deviceservice.yaml index 950b98442..ef5195eae 100644 --- a/manifests/deviceservice.yaml +++ b/manifests/deviceservice.yaml @@ -39,7 +39,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" + value: "DEBUG" startupProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:2020"] diff --git a/manifests/pathcompservice.yaml b/manifests/pathcompservice.yaml index 0cac6cc18..b6f969bf4 100644 --- a/manifests/pathcompservice.yaml +++ b/manifests/pathcompservice.yaml @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" + value: "DEBUG" - name: ENABLE_FORECASTER value: "NO" readinessProbe: diff --git a/manifests/servicemonitors.yaml b/manifests/servicemonitors.yaml index d486ca971..fa6aed0f9 100644 --- a/manifests/servicemonitors.yaml +++ b/manifests/servicemonitors.yaml @@ -575,9 +575,9 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: namespace: monitoring # namespace where prometheus is running - name: tfs-kpi_value_apiservice-metric + name: tfs-kpi-value-apiservice-metric labels: - app: kpi_value_apiservice + app: kpi-value-apiservice #release: prometheus #release: prom # name of the release # ( VERY IMPORTANT: You need to know the correct release name by viewing @@ -588,7 +588,7 @@ spec: matchLabels: # Target app service #namespace: tfs - app: kpi_value_apiservice # same as above + app: kpi-value-apiservice # same as above #release: prometheus # same as above endpoints: - port: metrics # named port in target app @@ -604,9 +604,9 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: namespace: monitoring # namespace where prometheus is running - name: tfs-kpi_value_writerservice-metric + name: tfs-kpi-value-writerservice-metric labels: - app: kpi_value_writerservice + app: kpi-value-writerservice #release: prometheus #release: prom # name of the release # ( VERY IMPORTANT: You need to know the correct release name by viewing @@ -617,7 +617,7 @@ spec: matchLabels: # Target app service #namespace: tfs - app: kpi_value_writerservice # same as above + app: kpi-value-writerservice # same as above #release: prometheus # same as above endpoints: - port: metrics # named port in target app -- GitLab From c8b24867b30f8e2632a9f597f70e4d46f6c7dbbf Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Wed, 27 Nov 2024 16:21:42 +0100 Subject: [PATCH 053/463] First draft --- proto/ztp_server.proto | 23 + src/common/Constants.py | 2 + src/ztp_server/.gitlab-ci.yml | 120 + src/ztp_server/Config.py | 20 + src/ztp_server/Dockerfile | 97 + src/ztp_server/README.md | 35 + src/ztp_server/__init__.py | 14 + src/ztp_server/client/ZtpClient.py | 61 + src/ztp_server/client/__init__.py | 14 + src/ztp_server/data/nso_client.proto | 60 + .../data/provisioning_script_sonic.sh | 38 + src/ztp_server/data/ztp.json | 11 + src/ztp_server/requirements.in | 28 + src/ztp_server/service/ZtpServerService.py | 28 + .../service/ZtpServerServiceServicerImpl.py | 40 + src/ztp_server/service/__init__.py | 14 + src/ztp_server/service/__main__.py | 78 + .../service/context_subscription/__init__.py | 64 + .../service/rest_server/RestServer.py | 23 + .../service/rest_server/__init__.py | 14 + .../rest_server/ztpServer_plugins/__init__.py | 14 + .../ztpServer_plugins/tfs_api/Resources.py | 47 + .../ztpServer_plugins/tfs_api/Tools.py | 41 + .../ztpServer_plugins/tfs_api/__init__.py | 30 + .../ztpServer_plugins/tools/Authentication.py | 25 + .../tools/HttpStatusCodes.py | 20 + .../ztpServer_plugins/tools/Validator.py | 35 + .../ztpServer_plugins/tools/__init__.py | 14 + src/ztp_server/tests/Constants.py | 85 + .../tests/MockService_Dependencies.py | 58 + src/ztp_server/tests/PrepareTestScenario.py | 169 + src/ztp_server/tests/__init__.py | 14 + src/ztp_server/tests/data/ietf_acl.json | 56 + .../tests/data/ietf_l3vpn_req_svc1.json | 231 ++ .../tests/data/ietf_l3vpn_req_svc2.json | 231 ++ .../tests/data/test-ietf-network.json | 1962 +++++++++++ src/ztp_server/tests/data/tfs_api_dummy.json | 442 +++ .../data/topology-7router-emu-dummy.json | 157 + .../tests/data/topology-7router-emu.json | 156 + src/ztp_server/tests/data/topology-dummy.json | 3134 +++++++++++++++++ src/ztp_server/tests/data/topology-real.json | 259 ++ src/ztp_server/tests/ietf_acl_client.py | 89 + src/ztp_server/tests/test_etsi_bwm.py | 240 ++ src/ztp_server/tests/test_ietf_l2vpn.py | 75 + src/ztp_server/tests/test_ietf_l3vpn.py | 113 + src/ztp_server/tests/test_ietf_network.py | 105 + src/ztp_server/tests/test_slice.py | 125 + src/ztp_server/tests/test_tfs_api.py | 217 ++ src/ztp_server/tests/test_yang_acl.py | 104 + 49 files changed, 9032 insertions(+) create mode 100755 proto/ztp_server.proto create mode 100755 src/ztp_server/.gitlab-ci.yml create mode 100755 src/ztp_server/Config.py create mode 100755 src/ztp_server/Dockerfile create mode 100755 src/ztp_server/README.md create mode 100755 src/ztp_server/__init__.py create mode 100755 src/ztp_server/client/ZtpClient.py create mode 100755 src/ztp_server/client/__init__.py create mode 100644 src/ztp_server/data/nso_client.proto create mode 100644 src/ztp_server/data/provisioning_script_sonic.sh create mode 100644 src/ztp_server/data/ztp.json create mode 100755 src/ztp_server/requirements.in create mode 100755 src/ztp_server/service/ZtpServerService.py create mode 100755 src/ztp_server/service/ZtpServerServiceServicerImpl.py create mode 100755 src/ztp_server/service/__init__.py create mode 100755 src/ztp_server/service/__main__.py create mode 100755 src/ztp_server/service/context_subscription/__init__.py create mode 100755 src/ztp_server/service/rest_server/RestServer.py create mode 100755 src/ztp_server/service/rest_server/__init__.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/__init__.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/__init__.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tools/Authentication.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tools/HttpStatusCodes.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tools/__init__.py create mode 100755 src/ztp_server/tests/Constants.py create mode 100755 src/ztp_server/tests/MockService_Dependencies.py create mode 100755 src/ztp_server/tests/PrepareTestScenario.py create mode 100755 src/ztp_server/tests/__init__.py create mode 100755 src/ztp_server/tests/data/ietf_acl.json create mode 100755 src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json create mode 100755 src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json create mode 100755 src/ztp_server/tests/data/test-ietf-network.json create mode 100755 src/ztp_server/tests/data/tfs_api_dummy.json create mode 100755 src/ztp_server/tests/data/topology-7router-emu-dummy.json create mode 100755 src/ztp_server/tests/data/topology-7router-emu.json create mode 100755 src/ztp_server/tests/data/topology-dummy.json create mode 100755 src/ztp_server/tests/data/topology-real.json create mode 100755 src/ztp_server/tests/ietf_acl_client.py create mode 100755 src/ztp_server/tests/test_etsi_bwm.py create mode 100755 src/ztp_server/tests/test_ietf_l2vpn.py create mode 100755 src/ztp_server/tests/test_ietf_l3vpn.py create mode 100755 src/ztp_server/tests/test_ietf_network.py create mode 100755 src/ztp_server/tests/test_slice.py create mode 100755 src/ztp_server/tests/test_tfs_api.py create mode 100755 src/ztp_server/tests/test_yang_acl.py diff --git a/proto/ztp_server.proto b/proto/ztp_server.proto new file mode 100755 index 000000000..37ccc71d3 --- /dev/null +++ b/proto/ztp_server.proto @@ -0,0 +1,23 @@ +// Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package ztpServer; + +import "context.proto"; + +service ZtpServerService { + rpc GetProvisioningScript (context.ProvisioningScriptName ) returns (context.ProvisioningScript ) {} + rpc GetZtpProvisioning (context.ZtpFileName ) returns (context.ZtpFile ) {} +} diff --git a/src/common/Constants.py b/src/common/Constants.py index 682007646..660e99f04 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -42,6 +42,7 @@ class ServiceNameEnum(Enum): SERVICE = 'service' SLICE = 'slice' ZTP = 'ztp' + ZTP_SERVER = 'ztp_server' POLICY = 'policy' MONITORING = 'monitoring' DLT = 'dlt' @@ -84,6 +85,7 @@ DEFAULT_SERVICE_GRPC_PORTS = { ServiceNameEnum.SERVICE .value : 3030, ServiceNameEnum.SLICE .value : 4040, ServiceNameEnum.ZTP .value : 5050, + ServiceNameEnum.ZTP_SERVER .value : 5051, ServiceNameEnum.POLICY .value : 6060, ServiceNameEnum.MONITORING .value : 7070, ServiceNameEnum.DLT .value : 8080, diff --git a/src/ztp_server/.gitlab-ci.yml b/src/ztp_server/.gitlab-ci.yml new file mode 100755 index 000000000..71bf223ba --- /dev/null +++ b/src/ztp_server/.gitlab-ci.yml @@ -0,0 +1,120 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Build, tag, and push the Docker image to the GitLab Docker registry +build nbi: + variables: + IMAGE_NAME: 'nbi' # name of the microservice + IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - docker buildx build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker tag "$IMAGE_NAME:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + after_script: + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/$IMAGE_NAME/**/*.{py,in,yml} + - src/$IMAGE_NAME/Dockerfile + - src/$IMAGE_NAME/tests/*.py + - manifests/${IMAGE_NAME}service.yaml + - .gitlab-ci.yml + +# Apply unit test to the component +unit_test nbi: + variables: + IMAGE_NAME: 'nbi' # name of the microservice + IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) + stage: unit_test + needs: + - build nbi + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - > + if docker network list | grep teraflowbridge; then + echo "teraflowbridge is already created"; + else + docker network create -d bridge teraflowbridge; + fi + - > + if docker container ls | grep $IMAGE_NAME; then + docker rm -f $IMAGE_NAME; + else + echo "$IMAGE_NAME image is not in the system"; + fi + script: + - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + - docker run --name $IMAGE_NAME -d -p 9090:9090 -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG + - sleep 5 + - docker ps -a + - docker logs $IMAGE_NAME + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" + coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + after_script: + - docker rm -f $IMAGE_NAME + - docker network rm teraflowbridge + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/$IMAGE_NAME/**/*.{py,in,yml} + - src/$IMAGE_NAME/Dockerfile + - src/$IMAGE_NAME/tests/*.py + - src/$IMAGE_NAME/tests/Dockerfile + - manifests/${IMAGE_NAME}service.yaml + - .gitlab-ci.yml + artifacts: + when: always + reports: + junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report_*.xml + +## Deployment of the service in Kubernetes Cluster +#deploy nbi: +# variables: +# IMAGE_NAME: 'nbi' # name of the microservice +# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) +# stage: deploy +# needs: +# - unit test nbi +# # - integ_test execute +# script: +# - 'sed -i "s/$IMAGE_NAME:.*/$IMAGE_NAME:$IMAGE_TAG/" manifests/${IMAGE_NAME}service.yaml' +# - kubectl version +# - kubectl get all +# - kubectl apply -f "manifests/${IMAGE_NAME}service.yaml" +# - kubectl get all +# # environment: +# # name: test +# # url: https://example.com +# # kubernetes: +# # namespace: test +# rules: +# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' +# when: manual +# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' +# when: manual diff --git a/src/ztp_server/Config.py b/src/ztp_server/Config.py new file mode 100755 index 000000000..83a350058 --- /dev/null +++ b/src/ztp_server/Config.py @@ -0,0 +1,20 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from werkzeug.security import generate_password_hash + +# REST-API users +RESTAPI_USERS = { # TODO: implement a database of credentials and permissions + 'admin': generate_password_hash('admin'), +} diff --git a/src/ztp_server/Dockerfile b/src/ztp_server/Dockerfile new file mode 100755 index 000000000..a9be06d37 --- /dev/null +++ b/src/ztp_server/Dockerfile @@ -0,0 +1,97 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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 + +# Install dependencies +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install wget g++ git build-essential cmake libpcre2-dev python3-dev python3-cffi && \ + rm -rf /var/lib/apt/lists/* + +# Download, build and install libyang. Note that APT package is outdated +# - Ref: https://github.com/CESNET/libyang +# - Ref: https://github.com/CESNET/libyang-python/ +RUN mkdir -p /var/libyang +RUN git clone https://github.com/CESNET/libyang.git /var/libyang +WORKDIR /var/libyang +RUN git fetch +RUN git checkout v2.1.148 +RUN mkdir -p /var/libyang/build +WORKDIR /var/libyang/build +RUN cmake -D CMAKE_BUILD_TYPE:String="Release" .. +RUN make +RUN make install +RUN ldconfig + +# Set Python to show logs as they occur +ENV PYTHONUNBUFFERED=0 + +# Download the gRPC health probe +RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ + wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ + chmod +x /bin/grpc_health_probe + +# 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 + +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + +# Add common files into working directory +WORKDIR /var/teraflow/common +COPY src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto +RUN touch __init__.py +COPY proto/*.proto ./ +RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto +RUN rm *.proto +RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; + +# Create component sub-folders, get specific Python packages +RUN mkdir -p /var/teraflow/nbi +WORKDIR /var/teraflow/nbi +COPY src/nbi/requirements.in requirements.in +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +# Add component files into working directory +WORKDIR /var/teraflow +COPY src/nbi/. nbi/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ +COPY src/service/__init__.py service/__init__.py +COPY src/service/client/. service/client/ +COPY src/slice/__init__.py slice/__init__.py +COPY src/slice/client/. slice/client/ +COPY src/qkd_app/__init__.py qkd_app/__init__.py +COPY src/qkd_app/client/. qkd_app/client/ +COPY src/vnt_manager/__init__.py vnt_manager/__init__.py +COPY src/vnt_manager/client/. vnt_manager/client/ +RUN mkdir -p /var/teraflow/tests/tools +COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ + +# Start the service +ENTRYPOINT ["python", "-m", "nbi.service"] diff --git a/src/ztp_server/README.md b/src/ztp_server/README.md new file mode 100755 index 000000000..32902a0b3 --- /dev/null +++ b/src/ztp_server/README.md @@ -0,0 +1,35 @@ +# NBI Component + +The NBI component uses libyang to validate and process messages. Follow instructions below to install it. + +## Install libyang +- Ref: https://github.com/CESNET/libyang +- Ref: https://github.com/CESNET/libyang-python/ + +__NOTE__: APT package is extremely outdated and does not work for our purposes. + +### Build Requisites +```bash +sudo apt-get install build-essential cmake libpcre2-dev +sudo apt-get install python3-dev gcc python3-cffi +``` + +### Build from source +```bash +mkdir ~/tfs-ctrl/libyang +git clone https://github.com/CESNET/libyang.git ~/tfs-ctrl/libyang +cd ~/tfs-ctrl/libyang +git fetch +git checkout v2.1.148 +mkdir ~/tfs-ctrl/libyang/build +cd ~/tfs-ctrl/libyang/build +cmake -D CMAKE_BUILD_TYPE:String="Release" .. +make +sudo make install +sudo ldconfig +``` + +### Install Python bindings +```bash +pip install libyang==2.8.0 +``` diff --git a/src/ztp_server/__init__.py b/src/ztp_server/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/client/ZtpClient.py b/src/ztp_server/client/ZtpClient.py new file mode 100755 index 000000000..a790b76e2 --- /dev/null +++ b/src/ztp_server/client/ZtpClient.py @@ -0,0 +1,61 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 grpc, logging +from common.Constants import ServiceNameEnum +from common.Settings import get_service_host, get_service_port_grpc +from common.proto.ztpServer_pb2_grpc import ztpServerServiceStub #TODO +from common.proto.context_pb2 import ( + ZtpFileName, ZtpFile, ProvisioningScriptName, ProvisioningScript) +from common.tools.client.RetryDecorator import retry, delay_exponential +from common.tools.grpc.Tools import grpc_message_to_json_string + +LOGGER = logging.getLogger(__name__) +MAX_RETRIES = 15 +DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) +RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') + +class ZtpClient: + def __init__(self, host=None, port=None): + if not host: host = get_service_host(ServiceNameEnum.ZTP_SERVER) + if not port: port = get_service_port_grpc(ServiceNameEnum.ZTP_SERVER) + self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) + LOGGER.debug('Creating channel to {:s}...'.format(str(self.endpoint))) + self.channel = None + self.stub = None + self.connect() + LOGGER.debug('Channel created') + + def connect(self): + self.channel = grpc.insecure_channel(self.endpoint) + self.stub = ztpServerServiceStub(self.channel) #TODO + + def close(self): + if self.channel is not None: self.channel.close() + self.channel = None + self.stub = None + + @RETRY_DECORATOR + def GetProvisioningScript(self, request : ProvisioningScriptName) -> ProvisioningScript: + LOGGER.debug('GetProvisioningScript request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.GetProvisioningScript(request) + LOGGER.debug('GetProvisioningScript result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def GetZtpProvisioning(self, request : ZtpFileName) -> ZtpFile: + LOGGER.debug('GetZtpProvisioning request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.GetZtpProvisioning(request) + LOGGER.debug('GetZtpProvisioning result: {:s}'.format(grpc_message_to_json_string(response))) + return response diff --git a/src/ztp_server/client/__init__.py b/src/ztp_server/client/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/client/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/data/nso_client.proto b/src/ztp_server/data/nso_client.proto new file mode 100644 index 000000000..d5983c62c --- /dev/null +++ b/src/ztp_server/data/nso_client.proto @@ -0,0 +1,60 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package nos_client; + +message NOS_SW { + string ztp_device_sw_url = 1; + bytes ztp_device_sw_file = 2; +} + +// For ONIE Requests +message NOS_SW_REQ { + string serial_number = 1; + string eth_addr = 2; + string vendor_id = 3; + string machine = 4; + string machine_rev = 5; + string arch = 6; + string security_key = 7; + string operation = 8; +} + +message Config_Script { + string config_script_url = 1; + bytes config_script_file = 2; +} + +message Config_Script_REQ { + string agent = 1; + string machine = 2; + string serial_number = 3; + string eth_addr = 4; + string version = 5; +} + +message Status_Notification { + string status = 1; + string serial_number = 2; + string eth_addr = 3; +} + +message Empty{} + +service nos_client { + rpc GetNOSFile (NOS_SW_REQ) returns (NOS_SW) {} + rpc GetConfigScriptFile (Config_Script_REQ) returns (Config_Script) {} + rpc NotifyStatus (Status_Notification) returns (Empty) {} +} diff --git a/src/ztp_server/data/provisioning_script_sonic.sh b/src/ztp_server/data/provisioning_script_sonic.sh new file mode 100644 index 000000000..c4dd20438 --- /dev/null +++ b/src/ztp_server/data/provisioning_script_sonic.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +PRODUCT_NAME=$(show version | grep 'Platform' | awk '{print $2}') +SERIAL_NUMBER=$(show version | grep 'Serial Number' | awk '{print $3}') +BASE_MAC_ADDRESS=$(show platform syseeprom | grep 'Base MAC Address' | awk '{print $6}') +SONIC_VERSION=$(show version | grep 'SONiC Software Version' | awk '{print $4}') + +# URL of the config_db.json file +CONFIG_DB_URL="http://10.1.1.119:9001/config/config_db.json" + +# Directory where the file will be saved +DEST_DIR="/etc/sonic" +DEST_FILE="$DEST_DIR/config_db.json" + +# Download the config_db.json file +curl -o $DEST_FILE -H "User-Agent: SONiC-ZTP/0.1" \ + -H "PRODUCT-NAME: $PRODUCT_NAME" \ + -H "SERIAL-NUMBER: $SERIAL_NUMBER" \ + -H "BASE-MAC-ADDRESS: $BASE_MAC_ADDRESS" \ + -H "SONiC-VERSION: $SONIC_VERSION" \ + $CONFIG_DB_URL +if [ $? -ne 0 ]; then + logger "Error: Failed to download the file from $CONFIG_DB_URL" + exit 1 +fi + +# Reload the configuration database +sudo config reload -y + +# Check if the reload was successful +if [ $? -eq 0 ]; then + logger "The configuration database reloaded successfully." +else + logger "Error: Failed to reload the configuration database." + exit 1 +fi + +logger "Plugin executed successfully." diff --git a/src/ztp_server/data/ztp.json b/src/ztp_server/data/ztp.json new file mode 100644 index 000000000..6e606a5e8 --- /dev/null +++ b/src/ztp_server/data/ztp.json @@ -0,0 +1,11 @@ +{ + "ztp": { + "01-provisioning-script": { + "plugin": { + "url": "http://localhost:9001/provisioning/provisioning_script_sonic.sh" + }, + "reboot-on-success": true + } + } + } + \ No newline at end of file diff --git a/src/ztp_server/requirements.in b/src/ztp_server/requirements.in new file mode 100755 index 000000000..0d7804836 --- /dev/null +++ b/src/ztp_server/requirements.in @@ -0,0 +1,28 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +deepdiff==6.7.* +deepmerge==1.1.* +Flask==2.1.3 +Flask-HTTPAuth==4.5.0 +Flask-RESTful==0.3.9 +jsonschema==4.4.0 +libyang==2.8.0 +netaddr==0.9.0 +pyang==2.6.0 +git+https://github.com/robshakir/pyangbind.git +pydantic==2.6.3 +requests==2.27.1 +werkzeug==2.3.7 +websockets==12.0 diff --git a/src/ztp_server/service/ZtpServerService.py b/src/ztp_server/service/ZtpServerService.py new file mode 100755 index 000000000..2b4da4f93 --- /dev/null +++ b/src/ztp_server/service/ZtpServerService.py @@ -0,0 +1,28 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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.Constants import ServiceNameEnum +from common.Settings import get_service_port_grpc +from common.proto.ztpServer_pb2_grpc import add_Ztp_ServerServiceServicer_to_server +from common.tools.service.GenericGrpcService import GenericGrpcService +from ztp_server.service.ZtpServerServiceServicerImpl import ZtpServerServiceServicerImpl + +class ZtpServerService(GenericGrpcService): + def __init__(self, cls_name: str = __name__) -> None: + port = get_service_port_grpc(ServiceNameEnum.ZTP_SERVER) + super().__init__(port, cls_name=cls_name) + self.ztp_servicer = ZtpServerServiceServicerImpl() + + def install_servicers(self): + add_Ztp_ServerServiceServicer_to_server(self.ztp_servicer, self.server) diff --git a/src/ztp_server/service/ZtpServerServiceServicerImpl.py b/src/ztp_server/service/ZtpServerServiceServicerImpl.py new file mode 100755 index 000000000..009cda922 --- /dev/null +++ b/src/ztp_server/service/ZtpServerServiceServicerImpl.py @@ -0,0 +1,40 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 grpc, logging +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.proto.context_pb2 import ( + ZtpFileName, ZtpFile, ProvisioningScriptName, ProvisioningScript) +from common.proto.ztpServer_pb2_grpc import ztpServerServiceServicer + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('ZTP_SERVER', 'RPC') + +class ZtpServerServiceServicerImpl(ztpServerServiceServicer): + def __init__(self): + LOGGER.info('Creating Servicer...') + LOGGER.info('Servicer Created') + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetZtpProvisioning(self, request : ProvisioningScriptName, context : grpc.ServicerContext) -> ProvisioningScript: + LOGGER.warning('NOT IMPLEMENTED') + return ProvisioningScript() + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetZtpProvisioning(self, request : ZtpFileName, context : grpc.ServicerContext) -> ZtpFile: + LOGGER.warning('NOT IMPLEMENTED') + return ZtpFile() + + diff --git a/src/ztp_server/service/__init__.py b/src/ztp_server/service/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/service/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/service/__main__.py b/src/ztp_server/service/__main__.py new file mode 100755 index 000000000..25e8605d3 --- /dev/null +++ b/src/ztp_server/service/__main__.py @@ -0,0 +1,78 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, signal, sys, threading +from prometheus_client import start_http_server +from common.Constants import ServiceNameEnum +from common.Settings import ( + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, + get_env_var_name, get_log_level, get_metrics_port, +) +from .ZtpServerService import ZtpServerService +from .rest_server.RestServer import RestServer + +from .context_subscription import register_context_subscription + +terminate = threading.Event() +LOGGER = None + +def signal_handler(signal, frame): # pylint: disable=redefined-outer-name, unused-argument + LOGGER.warning('Terminate signal received') + terminate.set() + +def main(): + global LOGGER # pylint: disable=global-statement + + log_level = get_log_level() + logging.basicConfig(level=log_level) + LOGGER = logging.getLogger(__name__) + + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + + LOGGER.info('Starting...') + + # Start metrics server + metrics_port = get_metrics_port() + start_http_server(metrics_port) + + # Starting ZtpServer service + grpc_service = ZtpServerService() + grpc_service.start() + + rest_server = RestServer() + register_tfs_api(rest_server) + rest_server.start() + + LOGGER.debug('Configured Resources:') + for resource in rest_server.api.resources: + LOGGER.debug(' - {:s}'.format(str(resource))) + + LOGGER.debug('Configured Rules:') + for rule in rest_server.app.url_map.iter_rules(): + LOGGER.debug(' - {:s}'.format(str(rule))) + + # Wait for Ctrl+C or termination signal + while not terminate.wait(timeout=1.0): pass + + LOGGER.info('Terminating...') + grpc_service.stop() + rest_server.shutdown() + rest_server.join() + + LOGGER.info('Bye') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/ztp_server/service/context_subscription/__init__.py b/src/ztp_server/service/context_subscription/__init__.py new file mode 100755 index 000000000..758f3d82c --- /dev/null +++ b/src/ztp_server/service/context_subscription/__init__.py @@ -0,0 +1,64 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 websockets.sync.server import serve +from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest +from common.Settings import get_setting +from context.client.ContextClient import ContextClient +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.tools.object_factory.Topology import json_topology_id +from common.tools.object_factory.Context import json_context_id +from common.proto.context_pb2 import ContextId, TopologyId +import json +import os +from vnt_manager.client.VNTManagerClient import VNTManagerClient + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) +ADMIN_TOPOLOGY_ID = TopologyId(**json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id=JSON_ADMIN_CONTEXT_ID)) + +vnt_manager_client: VNTManagerClient = VNTManagerClient() +context_client: ContextClient = ContextClient() + +ALL_HOSTS = "0.0.0.0" +WS_E2E_PORT = int(get_setting('WS_E2E_PORT', default='8762')) + +LOGGER = logging.getLogger(__name__) + + +def register_context_subscription(): + with serve(subcript_to_vnt_manager, ALL_HOSTS, WS_E2E_PORT, logger=LOGGER) as server: + LOGGER.info("Running subscription server...: {}:{}".format(ALL_HOSTS, str(WS_E2E_PORT))) + server.serve_forever() + LOGGER.info("Exiting subscription server...") + + +def subcript_to_vnt_manager(websocket): + for message in websocket: + LOGGER.debug("Message received: {}".format(message)) + message_json = json.loads(message) + request = VNTSubscriptionRequest() + request.host = message_json['host'] + request.port = message_json['port'] + LOGGER.debug("Received gRPC from ws: {}".format(request)) + + try: + vntm_reply = vnt_manager_client.VNTSubscript(request) + LOGGER.debug("Received gRPC from vntm: {}".format(vntm_reply)) + except Exception as e: + LOGGER.error('Could not subscript to VTNManager: {}'.format(e)) + + websocket.send(vntm_reply.subscription) diff --git a/src/ztp_server/service/rest_server/RestServer.py b/src/ztp_server/service/rest_server/RestServer.py new file mode 100755 index 000000000..0c4e45a8c --- /dev/null +++ b/src/ztp_server/service/rest_server/RestServer.py @@ -0,0 +1,23 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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.Constants import ServiceNameEnum +from common.Settings import get_service_baseurl_http, get_service_port_http +from common.tools.service.GenericRestServer import GenericRestServer + +class RestServer(GenericRestServer): + def __init__(self, cls_name: str = __name__) -> None: + bind_port = get_service_port_http(ServiceNameEnum.ZTP_SERVER) + base_url = get_service_baseurl_http(ServiceNameEnum.ZTP_SERVER) + super().__init__(bind_port, base_url, cls_name=cls_name) diff --git a/src/ztp_server/service/rest_server/__init__.py b/src/ztp_server/service/rest_server/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/service/rest_server/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/service/rest_server/ztpServer_plugins/__init__.py b/src/ztp_server/service/rest_server/ztpServer_plugins/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py new file mode 100755 index 000000000..c1b8c3733 --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py @@ -0,0 +1,47 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 +from flask.json import jsonify +from flask_restful import Resource, request +from werkzeug.exceptions import BadRequest +from common.proto.context_pb2 import Empty, LinkTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from slice.client.SliceClient import SliceClient +from vnt_manager.client.VNTManagerClient import VNTManagerClient + +from .Tools import ( + format_grpc_to_json, returnConfigFile +) + +LOGGER = logging.getLogger(__name__) + + +class _Resource(Resource): + def __init__(self) -> None: + super().__init__() + self.context_client = ContextClient() + self.device_client = DeviceClient() + self.service_client = ServiceClient() + self.vntmanager_client = VNTManagerClient() + self.slice_client = SliceClient() + + +class config(_Resource): + def get(self, config_db : str): + return returnConfigFile(config_db) #TODO define how to return configFile.json diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py new file mode 100755 index 000000000..6665dd4ce --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py @@ -0,0 +1,41 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict +from flask.json import jsonify +from common.proto.context_pb2 import ( + ConnectionId, returnConfigFile +) +from common.proto.policy_pb2 import PolicyRule, PolicyRuleId +from common.tools.grpc.Tools import grpc_message_to_json +from common.tools.object_factory.Connection import json_connection_id +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Device import json_device_id +from common.tools.object_factory.Link import json_link_id +from common.tools.object_factory.PolicyRule import json_policyrule_id +from common.tools.object_factory.Service import json_service_id +from common.tools.object_factory.Slice import json_slice_id +from common.tools.object_factory.Topology import json_topology_id + + +def format_grpc_to_json(grpc_reply): + return jsonify(grpc_message_to_json(grpc_reply)) + +def returnConfigFile(config_db): + path = config_db + + with open(path, 'r', encoding='utf-8') as configFile: + content = configFile.read() + + return content \ No newline at end of file diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/__init__.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/__init__.py new file mode 100755 index 000000000..7062772b4 --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/__init__.py @@ -0,0 +1,30 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from ztp_server.service.rest_server.RestServer import RestServer +from .Resources import ( + config +) + +URL_PREFIX = '/provisioning' + +# Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. +RESOURCES = [ + # (endpoint_name, resource_class, resource_url) + ('api.config', config, '/config/'), +] + +def register_tfs_api(rest_server : RestServer): + for endpoint_name, resource_class, resource_url in RESOURCES: + rest_server.add_resource(resource_class, URL_PREFIX + resource_url, endpoint=endpoint_name) diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Authentication.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Authentication.py new file mode 100755 index 000000000..aab239f36 --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Authentication.py @@ -0,0 +1,25 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from flask_httpauth import HTTPBasicAuth +from werkzeug.security import check_password_hash +from ztp_server.Config import RESTAPI_USERS + +HTTP_AUTH = HTTPBasicAuth() + +@HTTP_AUTH.verify_password +def verify_password(username, password): + if username not in RESTAPI_USERS: return None + if not check_password_hash(RESTAPI_USERS[username], password): return None + return username diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/HttpStatusCodes.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/HttpStatusCodes.py new file mode 100755 index 000000000..56ea475c7 --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/HttpStatusCodes.py @@ -0,0 +1,20 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +HTTP_OK = 200 +HTTP_CREATED = 201 +HTTP_NOCONTENT = 204 +HTTP_BADREQUEST = 400 +HTTP_SERVERERROR = 500 +HTTP_GATEWAYTIMEOUT = 504 \ No newline at end of file diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py new file mode 100755 index 000000000..66b607c8b --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py @@ -0,0 +1,35 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import List +from flask.json import jsonify +from jsonschema import _utils +from jsonschema.validators import validator_for +from jsonschema.protocols import Validator +from jsonschema.exceptions import ValidationError +from werkzeug.exceptions import BadRequest +from .HttpStatusCodes import HTTP_BADREQUEST + +def validate_message(schema, message): + validator_class = validator_for(schema) + validator : Validator = validator_class(schema) + errors : List[ValidationError] = sorted(validator.iter_errors(message), key=str) + if len(errors) == 0: return + response = jsonify([ + {'message': str(error.message), 'schema': str(error.schema), 'validator': str(error.validator), + 'where': str(_utils.format_as_index(container='message', indices=error.relative_path))} + for error in errors + ]) + response.status_code = HTTP_BADREQUEST + raise BadRequest(response=response) diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/__init__.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/tests/Constants.py b/src/ztp_server/tests/Constants.py new file mode 100755 index 000000000..886ddcafa --- /dev/null +++ b/src/ztp_server/tests/Constants.py @@ -0,0 +1,85 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +USERNAME = 'admin' +PASSWORD = 'admin' + +# Ref: https://osm.etsi.org/wikipub/index.php/WIM +WIM_MAPPING = [ + { + 'device-id' : 'dev-1', # pop_switch_dpid + #'device_interface_id' : ??, # pop_switch_port + 'service_endpoint_id' : 'ep-1', # wan_service_endpoint_id + 'service_mapping_info': { # wan_service_mapping_info, other extra info + 'bearer': {'bearer-reference': 'R1-EMU:13/1/2'}, + 'site-id': '1', + }, + #'switch_dpid' : ??, # wan_switch_dpid + #'switch_port' : ??, # wan_switch_port + #'datacenter_id' : ??, # vim_account + }, + { + 'device-id' : 'dev-2', # pop_switch_dpid + #'device_interface_id' : ??, # pop_switch_port + 'service_endpoint_id' : 'ep-2', # wan_service_endpoint_id + 'service_mapping_info': { # wan_service_mapping_info, other extra info + 'bearer': {'bearer-reference': 'R2-EMU:13/1/2'}, + 'site-id': '2', + }, + #'switch_dpid' : ??, # wan_switch_dpid + #'switch_port' : ??, # wan_switch_port + #'datacenter_id' : ??, # vim_account + }, + { + 'device-id' : 'dev-3', # pop_switch_dpid + #'device_interface_id' : ??, # pop_switch_port + 'service_endpoint_id' : 'ep-3', # wan_service_endpoint_id + 'service_mapping_info': { # wan_service_mapping_info, other extra info + 'bearer': {'bearer-reference': 'R3-EMU:13/1/2'}, + 'site-id': '3', + }, + #'switch_dpid' : ??, # wan_switch_dpid + #'switch_port' : ??, # wan_switch_port + #'datacenter_id' : ??, # vim_account + }, + { + 'device-id' : 'dev-4', # pop_switch_dpid + #'device_interface_id' : ??, # pop_switch_port + 'service_endpoint_id' : 'ep-4', # wan_service_endpoint_id + 'service_mapping_info': { # wan_service_mapping_info, other extra info + 'bearer': {'bearer-reference': 'R4-EMU:13/1/2'}, + 'site-id': '4', + }, + #'switch_dpid' : ??, # wan_switch_dpid + #'switch_port' : ??, # wan_switch_port + #'datacenter_id' : ??, # vim_account + }, +] + +SERVICE_TYPE = 'ELINE' + +SERVICE_CONNECTION_POINTS_1 = [ + {'service_endpoint_id': 'ep-1', + 'service_endpoint_encapsulation_type': 'dot1q', + 'service_endpoint_encapsulation_info': {'vlan': 1234}}, + {'service_endpoint_id': 'ep-2', + 'service_endpoint_encapsulation_type': 'dot1q', + 'service_endpoint_encapsulation_info': {'vlan': 1234}}, +] + +SERVICE_CONNECTION_POINTS_2 = [ + {'service_endpoint_id': 'ep-3', + 'service_endpoint_encapsulation_type': 'dot1q', + 'service_endpoint_encapsulation_info': {'vlan': 1234}}, +] \ No newline at end of file diff --git a/src/ztp_server/tests/MockService_Dependencies.py b/src/ztp_server/tests/MockService_Dependencies.py new file mode 100755 index 000000000..322441367 --- /dev/null +++ b/src/ztp_server/tests/MockService_Dependencies.py @@ -0,0 +1,58 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 os +from typing import Union +from common.Constants import ServiceNameEnum +from common.Settings import ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name +from common.proto.context_pb2_grpc import add_ContextServiceServicer_to_server +from common.proto.service_pb2_grpc import add_ServiceServiceServicer_to_server +from common.proto.slice_pb2_grpc import add_SliceServiceServicer_to_server +from common.tests.MockServicerImpl_Context import MockServicerImpl_Context +from common.tests.MockServicerImpl_Service import MockServicerImpl_Service +from common.tests.MockServicerImpl_Slice import MockServicerImpl_Slice +from common.tools.service.GenericGrpcService import GenericGrpcService + +LOCAL_HOST = '127.0.0.1' + +SERVICE_CONTEXT = ServiceNameEnum.CONTEXT +SERVICE_SERVICE = ServiceNameEnum.SERVICE +SERVICE_SLICE = ServiceNameEnum.SLICE + +class MockService_Dependencies(GenericGrpcService): + # Mock Service implementing Context, Service and Slice to simplify unitary tests of NBI + + def __init__(self, bind_port: Union[str, int]) -> None: + super().__init__(bind_port, LOCAL_HOST, enable_health_servicer=False, cls_name='MockService') + + # pylint: disable=attribute-defined-outside-init + def install_servicers(self): + self.context_servicer = MockServicerImpl_Context() + add_ContextServiceServicer_to_server(self.context_servicer, self.server) + + self.service_servicer = MockServicerImpl_Service() + add_ServiceServiceServicer_to_server(self.service_servicer, self.server) + + self.slice_servicer = MockServicerImpl_Slice() + add_SliceServiceServicer_to_server(self.slice_servicer, self.server) + + def configure_env_vars(self): + os.environ[get_env_var_name(SERVICE_CONTEXT, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) + os.environ[get_env_var_name(SERVICE_CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) + + os.environ[get_env_var_name(SERVICE_SERVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) + os.environ[get_env_var_name(SERVICE_SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) + + os.environ[get_env_var_name(SERVICE_SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) + os.environ[get_env_var_name(SERVICE_SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) diff --git a/src/ztp_server/tests/PrepareTestScenario.py b/src/ztp_server/tests/PrepareTestScenario.py new file mode 100755 index 000000000..a574f086b --- /dev/null +++ b/src/ztp_server/tests/PrepareTestScenario.py @@ -0,0 +1,169 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 enum, logging, os, pytest, requests, time +from typing import Any, Dict, List, Optional, Set, Union +from common.Constants import ServiceNameEnum +from common.Settings import ( + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_HTTP, + get_env_var_name, get_service_baseurl_http, get_service_port_http +) +from context.client.ContextClient import ContextClient +from nbi.service.rest_server.RestServer import RestServer +from nbi.service.rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api +from nbi.service.rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn +from nbi.service.rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn +from nbi.service.rest_server.nbi_plugins.ietf_network import register_ietf_network +from nbi.service.rest_server.nbi_plugins.tfs_api import register_tfs_api +from nbi.tests.MockService_Dependencies import MockService_Dependencies +from service.client.ServiceClient import ServiceClient +from slice.client.SliceClient import SliceClient +from tests.tools.mock_osm.MockOSM import MockOSM +from .Constants import USERNAME, PASSWORD, WIM_MAPPING + +LOCAL_HOST = '127.0.0.1' +MOCKSERVICE_PORT = 10000 +NBI_SERVICE_PORT = MOCKSERVICE_PORT + get_service_port_http(ServiceNameEnum.NBI) # avoid privileged ports +os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(NBI_SERVICE_PORT) + +@pytest.fixture(scope='session') +def mock_service(): + _service = MockService_Dependencies(MOCKSERVICE_PORT) + _service.configure_env_vars() + _service.start() + yield _service + _service.stop() + +@pytest.fixture(scope='session') +def nbi_service_rest(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument + _rest_server = RestServer() + register_etsi_bwm_api(_rest_server) + register_ietf_l2vpn(_rest_server) + register_ietf_l3vpn(_rest_server) + register_ietf_network(_rest_server) + register_tfs_api(_rest_server) + _rest_server.start() + time.sleep(1) # bring time for the server to start + yield _rest_server + _rest_server.shutdown() + _rest_server.join() + +@pytest.fixture(scope='session') +def osm_wim(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + wim_url = 'http://{:s}:{:d}'.format(LOCAL_HOST, NBI_SERVICE_PORT) + return MockOSM(wim_url, WIM_MAPPING, USERNAME, PASSWORD) + +@pytest.fixture(scope='session') +def context_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument + _client = ContextClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def service_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument + _client = ServiceClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def slice_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument + _client = SliceClient() + yield _client + _client.close() + +class RestRequestMethod(enum.Enum): + GET = 'get' + POST = 'post' + PUT = 'put' + PATCH = 'patch' + DELETE = 'delete' + +EXPECTED_STATUS_CODES : Set[int] = { + requests.codes['OK' ], + requests.codes['CREATED' ], + requests.codes['ACCEPTED' ], + requests.codes['NO_CONTENT'], +} + +def do_rest_request( + method : RestRequestMethod, url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + base_url = get_service_baseurl_http(ServiceNameEnum.NBI) or '' + request_url = 'http://{:s}:{:s}@{:s}:{:d}{:s}{:s}'.format( + USERNAME, PASSWORD, LOCAL_HOST, NBI_SERVICE_PORT, str(base_url), url + ) + if logger is not None: + msg = 'Request: {:s} {:s}'.format(str(method.value).upper(), str(request_url)) + if body is not None: msg += ' body={:s}'.format(str(body)) + logger.warning(msg) + reply = requests.request(method.value, request_url, timeout=timeout, json=body, allow_redirects=allow_redirects) + if logger is not None: + logger.warning('Reply: {:s}'.format(str(reply.text))) + assert reply.status_code in expected_status_codes, 'Reply failed with status code {:d}'.format(reply.status_code) + + if reply.content and len(reply.content) > 0: return reply.json() + return None + +def do_rest_get_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.GET, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_post_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.POST, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_put_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.PUT, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_patch_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.PATCH, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_delete_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.DELETE, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) diff --git a/src/ztp_server/tests/__init__.py b/src/ztp_server/tests/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/tests/data/ietf_acl.json b/src/ztp_server/tests/data/ietf_acl.json new file mode 100755 index 000000000..072df6d01 --- /dev/null +++ b/src/ztp_server/tests/data/ietf_acl.json @@ -0,0 +1,56 @@ +{ + "ietf-access-control-list": { + "acls": { + "acl": [ + { + "name": "sample-ipv4-acl", + "type": "ipv4-acl-type", + "aces": { + "ace": [ + { + "name": "rule1", + "matches": { + "ipv4": { + "dscp": 18, + "source-ipv4-network": "128.32.10.6/24", + "destination-ipv4-network": "172.10.33.0/24" + }, + "tcp": { + "flags": "syn", + "source-port": { + "port": 1444, + "operator": "eq" + }, + "destination-port": { + "port": 1333, + "operator": "eq" + } + } + }, + "actions": { + "forwarding": "drop" + } + } + ] + } + } + ], + "attachment-points": { + "interface": [ + { + "interface-id": "200", + "ingress": { + "acl-sets": { + "acl-set": [ + { + "name": "sample-ipv4-acl" + } + ] + } + } + } + ] + } + } + } +} diff --git a/src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json b/src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json new file mode 100755 index 000000000..bfeb93fb7 --- /dev/null +++ b/src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json @@ -0,0 +1,231 @@ +{ + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": { + "vpn-service": [ + { + "vpn-id": "vpn1" + } + ] + }, + "sites": { + "site": [ + { + "site-id": "site_OLT", + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "locations": { + "location": [ + { + "location-id": "OLT" + } + ] + }, + "devices": { + "device": [ + { + "device-id": "128.32.33.5", + "location": "OLT" + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "128.32.10.1/24", + "lan-tag": "vlan21", + "next-hop": "128.32.33.2" + }, + { + "lan": "128.32.20.1/24", + "lan-tag": "vlan21", + "next-hop": "128.32.33.2" + } + ] + } + } + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "500", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "128.32.33.5", + "vpn-attachment": { + "vpn-id": "vpn1", + "site-role": "ietf-l3vpn-svc:spoke-role" + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "128.32.33.254", + "customer-address": "128.32.33.2", + "prefix-length": 24 + } + } + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.101.1/24", + "lan-tag": "vlan21", + "next-hop": "128.32.33.254" + } + ] + } + } + } + ] + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + } + } + ] + } + } + } + } + } + ] + } + }, + { + "site-id": "site_POP", + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "locations": { + "location": [ + { + "location-id": "POP" + } + ] + }, + "devices": { + "device": [ + { + "device-id": "172.10.33.5", + "location": "POP" + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.101.1/24", + "lan-tag": "vlan101", + "next-hop": "172.10.33.2" + } + ] + } + } + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "500", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "172.10.33.5", + "vpn-attachment": { + "vpn-id": "vpn1", + "site-role": "ietf-l3vpn-svc:hub-role" + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "172.10.33.254", + "customer-address": "172.10.33.2", + "prefix-length": 24 + } + } + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "128.32.10.1/24", + "lan-tag": "vlan101", + "next-hop": "172.10.33.254" + }, + { + "lan": "128.32.20.1/24", + "lan-tag": "vlan101", + "next-hop": "172.10.33.254" + } + ] + } + } + } + ] + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + } + } + ] + } + } + } + } + } + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json b/src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json new file mode 100755 index 000000000..2cc512e59 --- /dev/null +++ b/src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json @@ -0,0 +1,231 @@ +{ + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": { + "vpn-service": [ + { + "vpn-id": "vpn2" + } + ] + }, + "sites": { + "site": [ + { + "site-id": "site_OLT", + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "locations": { + "location": [ + { + "location-id": "OLT" + } + ] + }, + "devices": { + "device": [ + { + "device-id": "128.32.33.5", + "location": "OLT" + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "128.32.10.1/24", + "lan-tag": "vlan31", + "next-hop": "128.32.33.2" + }, + { + "lan": "128.32.20.1/24", + "lan-tag": "vlan31", + "next-hop": "128.32.33.2" + } + ] + } + } + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "500", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "128.32.33.5", + "vpn-attachment": { + "vpn-id": "vpn2", + "site-role": "ietf-l3vpn-svc:spoke-role" + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "128.32.33.254", + "customer-address": "128.32.33.2", + "prefix-length": 24 + } + } + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.201.1/24", + "lan-tag": "vlan31", + "next-hop": "128.32.33.254" + } + ] + } + } + } + ] + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + } + } + ] + } + } + } + } + } + ] + } + }, + { + "site-id": "site_POP", + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "locations": { + "location": [ + { + "location-id": "POP" + } + ] + }, + "devices": { + "device": [ + { + "device-id": "172.10.33.5", + "location": "POP" + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.201.1/24", + "lan-tag": "vlan201", + "next-hop": "172.10.33.2" + } + ] + } + } + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "500", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "172.10.33.5", + "vpn-attachment": { + "vpn-id": "vpn2", + "site-role": "ietf-l3vpn-svc:hub-role" + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "172.10.33.254", + "customer-address": "172.10.33.2", + "prefix-length": 24 + } + } + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "128.32.10.1/24", + "lan-tag": "vlan201", + "next-hop": "172.10.33.254" + }, + { + "lan": "128.32.20.1/24", + "lan-tag": "vlan201", + "next-hop": "172.10.33.254" + } + ] + } + } + } + ] + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + } + } + ] + } + } + } + } + } + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/src/ztp_server/tests/data/test-ietf-network.json b/src/ztp_server/tests/data/test-ietf-network.json new file mode 100755 index 000000000..7643ef53a --- /dev/null +++ b/src/ztp_server/tests/data/test-ietf-network.json @@ -0,0 +1,1962 @@ +{ + "ietf-network:networks": { + "network": [ + { + "network-id": "providerId-10-clientId-0-topologyId-1", + "ietf-te-topology:te": { + "name": "Huawei-Network" + }, + "ietf-te-topology:te-topology-identifier": { + "provider-id": 10, + "client-id": 0, + "topology-id": "1" + }, + "network-types": { + "ietf-te-topology:te-topology": { + "ietf-otn-topology:otn-topology": {} + } + }, + "node": [ + { + "node-id": "10.0.10.1", + "ietf-te-topology:te-node-id": "10.0.10.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OA" + }, + "tunnel-termination-point": [ + { + "tunnel-tp-id": "NTAx", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "501" + } + ] + } + }, + { + "tunnel-tp-id": "NTAw", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "500" + } + ] + } + } + ] + } + }, + { + "node-id": "10.0.20.1", + "ietf-te-topology:te-node-id": "10.0.20.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "P" + }, + "tunnel-termination-point": [ + { + "tunnel-tp-id": "NTAx", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "501" + } + ] + } + }, + { + "tunnel-tp-id": "NTAw", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "500" + } + ] + } + } + ] + } + }, + { + "node-id": "10.0.40.1", + "ietf-te-topology:te-node-id": "10.0.40.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + }, + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "P" + }, + "tunnel-termination-point": [ + { + "tunnel-tp-id": "NTAw", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "500" + } + ] + } + }, + { + "tunnel-tp-id": "NTAx", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "501" + } + ] + } + } + ] + } + }, + { + "node-id": "10.0.30.1", + "ietf-te-topology:te-node-id": "10.0.30.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + }, + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OE" + }, + "tunnel-termination-point": [ + { + "tunnel-tp-id": "NTAw", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "500" + } + ] + } + }, + { + "tunnel-tp-id": "NTAx", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "501" + } + ] + } + } + ] + } + } + ], + "ietf-network-topology:link": [ + { + "link-id": "10.0.10.1-501", + "source": { + "source-node": "10.0.10.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.20.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-501", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.10.1-500", + "source": { + "source-node": "10.0.10.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.40.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-500", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.20.1-501", + "source": { + "source-node": "10.0.20.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.20.1-501", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.20.1-500", + "source": { + "source-node": "10.0.20.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.30.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.20.1-500", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.40.1-500", + "source": { + "source-node": "10.0.40.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.40.1-500", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.40.1-501", + "source": { + "source-node": "10.0.40.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.30.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.40.1-501", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.30.1-500", + "source": { + "source-node": "10.0.30.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.20.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.30.1-500", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.30.1-501", + "source": { + "source-node": "10.0.30.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.40.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.30.1-501", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + } + ] + }, + { + "network-id": "providerId-10-clientId-0-topologyId-2", + "ietf-te-topology:te": { + "name": "Huawei-Network" + }, + "ietf-te-topology:te-topology-identifier": { + "provider-id": 10, + "client-id": 0, + "topology-id": "2" + }, + "network-types": { + "ietf-te-topology:te-topology": { + "ietf-eth-te-topology:eth-tran-topology": {} + } + }, + "node": [ + { + "node-id": "10.0.10.1", + "ietf-te-topology:te-node-id": "10.0.10.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": "128.32.33.254", + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OA" + } + } + }, + { + "node-id": "10.0.20.1", + "ietf-te-topology:te-node-id": "10.0.20.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "P" + } + } + }, + { + "node-id": "10.0.40.1", + "ietf-te-topology:te-node-id": "10.0.40.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "P" + } + } + }, + { + "node-id": "10.0.30.1", + "ietf-te-topology:te-node-id": "10.0.30.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": "172.10.33.254", + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OE" + } + } + }, + { + "node-id": "128.32.33.5", + "ietf-te-topology:te-node-id": "128.32.33.5", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": "128.32.33.2", + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": 200, + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + }, + { + "tp-id": "201", + "ietf-te-topology:te-tp-id": 201, + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OLT", + "connectivity-matrices": { + "label-restrictions": { + "label-restriction": [ + { + "index": 0, + "label-start": { + "te-label": { + "ietf-eth-te-topology:vlanid": 21 + } + }, + "label-end": { + "te-label": { + "ietf-eth-te-topology:vlanid": 21 + } + } + }, + { + "index": 1, + "label-start": { + "te-label": { + "ietf-eth-te-topology:vlanid": 31 + } + }, + "label-end": { + "te-label": { + "ietf-eth-te-topology:vlanid": 31 + } + } + } + ] + } + } + } + } + }, + { + "node-id": "128.32.10.1", + "ietf-te-topology:te-node-id": "128.32.10.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + }, + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": 200, + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "ONT1" + } + } + }, + { + "node-id": "128.32.20.1", + "ietf-te-topology:te-node-id": "128.32.20.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + }, + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": 200, + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "ONT2" + } + } + } + ], + "ietf-network-topology:link": [ + { + "link-id": "10.0.10.1-200", + "source": { + "source-node": "10.0.10.1", + "source-tp": "200" + }, + "destination": { + "dest-node": "128.32.33.5", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-200", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.33.5-500", + "source": { + "source-node": "128.32.33.5", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "200" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.33.5-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.10.1-501", + "source": { + "source-node": "10.0.10.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.20.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-501", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.10.1-500", + "source": { + "source-node": "10.0.10.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.40.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.20.1-501", + "source": { + "source-node": "10.0.20.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.20.1-501", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.20.1-500", + "source": { + "source-node": "10.0.20.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.30.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.20.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.40.1-501", + "source": { + "source-node": "10.0.40.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.30.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.40.1-501", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.40.1-500", + "source": { + "source-node": "10.0.40.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.40.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.30.1-501", + "source": { + "source-node": "10.0.30.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.40.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.30.1-501", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.30.1-500", + "source": { + "source-node": "10.0.30.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.20.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.30.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.33.5-200", + "source": { + "source-node": "128.32.33.5", + "source-tp": "200" + }, + "destination": { + "dest-node": "128.32.10.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.33.5-200", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.10.1-500", + "source": { + "source-node": "128.32.10.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "128.32.33.5", + "dest-tp": "200" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.10.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.33.5-201", + "source": { + "source-node": "128.32.33.5", + "source-tp": "201" + }, + "destination": { + "dest-node": "128.32.20.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.33.5-201", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.20.1-500", + "source": { + "source-node": "128.32.20.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "128.32.33.5", + "dest-tp": "201" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.20.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + } + ] + } + ] + } +} \ No newline at end of file diff --git a/src/ztp_server/tests/data/tfs_api_dummy.json b/src/ztp_server/tests/data/tfs_api_dummy.json new file mode 100755 index 000000000..d8f513757 --- /dev/null +++ b/src/ztp_server/tests/data/tfs_api_dummy.json @@ -0,0 +1,442 @@ +{ + "dummy_mode": true, + "contexts": [ + { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "name": "admin", + "topology_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + ], + "service_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}} + ], + "slice_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "slice_uuid": {"uuid": "SLC:R1-R2-R3"}} + ] + } + ], + "topologies": [ + { + "device_ids": [ + {"device_uuid": {"uuid": "R1"}}, + {"device_uuid": {"uuid": "R2"}}, + {"device_uuid": {"uuid": "R3"}} + ], + "link_ids": [ + {"link_uuid": {"uuid": "R1/502==R2/501"}}, + {"link_uuid": {"uuid": "R1/503==R3/501"}}, + {"link_uuid": {"uuid": "R2/501==R1/502"}}, + {"link_uuid": {"uuid": "R2/503==R3/502"}}, + {"link_uuid": {"uuid": "R3/501==R1/503"}}, + {"link_uuid": {"uuid": "R3/502==R2/503"}} + ], + "name": "admin", + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "name": "R1", "device_type": "emu-packet-router", + "device_drivers": [0], "device_operational_status": 2, + "device_endpoints": [ + {"name": "200", "endpoint_type": "copper", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "502", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "503", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "502", "name": "502", "type": "optical"}, + {"uuid": "503", "name": "503", "type": "optical"} + ]}}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { + "uuid": "200", "name": "200", "type": "copper" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[502]", "resource_value": { + "uuid": "502", "name": "502", "type": "optical" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { + "uuid": "503", "name": "503", "type": "optical" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "name": "R2", "device_type": "emu-packet-router", + "device_drivers": [0], "device_operational_status": 2, + "device_endpoints": [ + {"name": "200", "endpoint_type": "copper", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "501", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "503", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "501", "name": "501", "type": "optical"}, + {"uuid": "503", "name": "503", "type": "optical"} + ]}}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { + "uuid": "200", "name": "200", "type": "copper" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[501]", "resource_value": { + "uuid": "501", "name": "501", "type": "optical" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { + "uuid": "503", "name": "503", "type": "optical" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "name": "R3", "device_type": "emu-packet-router", + "device_drivers": [0], "device_operational_status": 2, + "device_endpoints": [ + {"name": "200", "endpoint_type": "copper", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "502", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "503", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "502", "name": "502", "type": "optical"}, + {"uuid": "503", "name": "503", "type": "optical"} + ]}}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { + "uuid": "200", "name": "200", "type": "copper" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[502]", "resource_value": { + "uuid": "502", "name": "502", "type": "optical" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { + "uuid": "503", "name": "503", "type": "optical" + }}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "R1/502==R2/501"}}, "name": "R1/502==R2/501", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R1/503==R3/501"}}, "name": "R1/503==R3/501", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R2/501==R1/502"}}, "name": "R2/501==R1/502", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R2/503==R3/502"}}, "name": "R2/503==R3/502", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R3/501==R1/503"}}, "name": "R3/501==R1/503", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R3/502==R2/503"}}, "name": "R3/502==R2/503", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + } + ], + "services": [ + { + "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, + "name": "SVC:R1/200==R2/200", "service_type": 1, "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "service_constraints": [ + {"action": 1, "sla_capacity": {"capacity_gbps": 40.0}}, + {"action": 1, "sla_latency": {"e2e_latency_ms": 10.0}}, + {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.99}} + ], + "service_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 + }}} + ]} + }, + { + "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, + "name": "SVC:R1/200==R3/200", "service_type": 1, "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "service_constraints": [ + {"action": 1, "sla_capacity": {"capacity_gbps": 50.0}}, + {"action": 1, "sla_latency": {"e2e_latency_ms": 8.0}}, + {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.9}} + ], + "service_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 + }}} + ]} + }, + { + "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}}, + "name": "SVC:R2/200==R3/200", "service_type": 1, "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "service_constraints": [ + {"action": 1, "sla_capacity": {"capacity_gbps": 10.0}}, + {"action": 1, "sla_latency": {"e2e_latency_ms": 3.0}}, + {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.9999}} + ], + "service_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 + }}} + ]} + } + ], + "slices": [ + { + "slice_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "slice_uuid": {"uuid": "SLC:R1-R2-R3"}}, + "name": "SLC:R1-R2-R3", + "slice_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "slice_constraints": [ + {"action": 1, "sla_capacity": {"capacity_gbps": 40.0}}, + {"action": 1, "sla_latency": {"e2e_latency_ms": 10.0}}, + {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.99}} + ], + "slice_service_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}} + ], + "slice_subslice_ids": [], + "slice_status": {"slice_status" : 1}, + "slice_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 + }}} + ]}, + "slice_owner": {"owner_uuid": {"uuid": "TFS"}, "owner_string": "TFS:SLC:R1-R2-R3"} + } + ], + "connections": [ + { + "connection_id": {"connection_uuid": {"uuid": "CON:R1/200==R2/200:1"}}, + "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, + "path_hops_endpoint_ids" : [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "sub_service_ids": [], + "settings": { + "l3": {"src_ip_address": "10.0.1.10", "dst_ip_address": "10.0.2.10", "ttl": 20} + } + }, + { + "connection_id": {"connection_uuid": {"uuid": "CON:R1/200==R3/200:1"}}, + "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, + "path_hops_endpoint_ids" : [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "sub_service_ids": [], + "settings": { + "l3": {"src_ip_address": "10.0.1.10", "dst_ip_address": "10.0.3.10", "ttl": 20} + } + }, + { + "connection_id": {"connection_uuid": {"uuid": "CON:R2/200==R3/200:1"}}, + "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}}, + "path_hops_endpoint_ids" : [ + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "sub_service_ids": [], + "settings": { + "l3": {"src_ip_address": "10.0.2.10", "dst_ip_address": "10.0.3.10", "ttl": 20} + } + } + ] +} diff --git a/src/ztp_server/tests/data/topology-7router-emu-dummy.json b/src/ztp_server/tests/data/topology-7router-emu-dummy.json new file mode 100755 index 000000000..3bb622626 --- /dev/null +++ b/src/ztp_server/tests/data/topology-7router-emu-dummy.json @@ -0,0 +1,157 @@ +{ + "dummy_mode": true, + "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": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, + {"uuid": "1/3", "type": "copper"}, {"uuid": "2/1", "type": "copper"}, + {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"}, + {"uuid": "2/4", "type": "copper"}, {"uuid": "2/5", "type": "copper"}, + {"uuid": "2/6", "type": "copper"} + ]}}} + ]}} + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "R1==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]} + ] +} diff --git a/src/ztp_server/tests/data/topology-7router-emu.json b/src/ztp_server/tests/data/topology-7router-emu.json new file mode 100755 index 000000000..4174f4fb4 --- /dev/null +++ b/src/ztp_server/tests/data/topology-7router-emu.json @@ -0,0 +1,156 @@ +{ + "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": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, + {"uuid": "1/3", "type": "copper"}, {"uuid": "2/1", "type": "copper"}, + {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"}, + {"uuid": "2/4", "type": "copper"}, {"uuid": "2/5", "type": "copper"}, + {"uuid": "2/6", "type": "copper"} + ]}}} + ]}} + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "R1==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]} + ] +} diff --git a/src/ztp_server/tests/data/topology-dummy.json b/src/ztp_server/tests/data/topology-dummy.json new file mode 100755 index 000000000..f066051ee --- /dev/null +++ b/src/ztp_server/tests/data/topology-dummy.json @@ -0,0 +1,3134 @@ +{ + "contexts": [ + { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "name": "admin", + "service_ids": [], + "slice_ids": [], + "topology_ids": [ + { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + ] + } + ], + "devices": [ + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + }, + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "500", + "type": "optical", + "uuid": "500" + }, + { + "name": "501", + "type": "optical", + "uuid": "501" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "optical", + "uuid": "500" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[501]", + "resource_value": { + "name": "501", + "type": "optical", + "uuid": "501" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "501" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "b72983bd-57d8-5cf8-8ec7-da9084382d7a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + } + ], + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "10.0.30.1" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "500", + "type": "copper", + "uuid": "500" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "copper", + "uuid": "500" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "500" + } + ], + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "128.32.10.1" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "201", + "type": "copper", + "uuid": "201" + }, + { + "name": "500", + "type": "copper", + "uuid": "500" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[201]", + "resource_value": { + "name": "201", + "type": "copper", + "uuid": "201" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "copper", + "uuid": "500" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "227b6bb2-dacf-5b3d-84e9-c1d0c107bcd8" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "201" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "d8528b70-9215-59ed-851d-b9590ab0c94b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + } + ], + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "device_operational_status": 2, + "device_type": "emu-datacenter", + "name": "172.10.33.5" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + }, + { + "name": "500", + "type": "optical", + "uuid": "500" + }, + { + "name": "501", + "type": "optical", + "uuid": "501" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "optical", + "uuid": "500" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[501]", + "resource_value": { + "name": "501", + "type": "optical", + "uuid": "501" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "501" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "ede34dea-6b51-5787-88d2-553fe548f540" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + } + ], + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "10.0.40.1" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "201", + "type": "copper", + "uuid": "201" + }, + { + "name": "500", + "type": "copper", + "uuid": "500" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[201]", + "resource_value": { + "name": "201", + "type": "copper", + "uuid": "201" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "copper", + "uuid": "500" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "201" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "c6435612-3aca-590f-89ba-e606f54df474" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + } + ], + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "device_operational_status": 2, + "device_type": "emu-optical-transponder", + "name": "128.32.33.5" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + }, + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "500", + "type": "optical", + "uuid": "500" + }, + { + "name": "501", + "type": "optical", + "uuid": "501" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "optical", + "uuid": "500" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[501]", + "resource_value": { + "name": "501", + "type": "optical", + "uuid": "501" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "59e1e30f-ea65-5e04-8a91-760a648a02c6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "70cbb732-8149-59ee-939b-011828e4292b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "501" + } + ], + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "10.0.10.1" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + }, + { + "name": "500", + "type": "optical", + "uuid": "500" + }, + { + "name": "501", + "type": "optical", + "uuid": "501" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "optical", + "uuid": "500" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[501]", + "resource_value": { + "name": "501", + "type": "optical", + "uuid": "501" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "501" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "356378dd-952b-5032-912d-37fc21284b4c" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "da826790-a4b0-5317-b30b-e1370918a644" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + } + ], + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "10.0.20.1" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "eth1", + "type": "copper", + "uuid": "eth1" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[eth1]", + "resource_value": { + "name": "eth1", + "type": "copper", + "uuid": "eth1" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + "endpoint_uuid": { + "uuid": "0701f406-633f-53e7-a44d-c93384745df8" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "eth1" + } + ], + "device_id": { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + "device_operational_status": 2, + "device_type": "emu-client", + "name": "128.32.20.5" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "500", + "type": "copper", + "uuid": "500" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "copper", + "uuid": "500" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + } + ], + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "128.32.20.1" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "eth1", + "type": "copper", + "uuid": "eth1" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[eth1]", + "resource_value": { + "name": "eth1", + "type": "copper", + "uuid": "eth1" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + "endpoint_uuid": { + "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "eth1" + } + ], + "device_id": { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + "device_operational_status": 2, + "device_type": "emu-client", + "name": "128.32.10.5" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + } + ], + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "device_operational_status": 2, + "device_type": "emu-open-line-system", + "name": "nce-t" + } + ], + "dummy_mode": true, + "links": [ + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "70cbb732-8149-59ee-939b-011828e4292b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "0b3d5943-c2bf-595f-a805-dc29c2be2f52" + } + }, + "name": "10.0.10.1-200" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "1490e70f-472c-5e4c-8280-21c48ed03477" + } + }, + "name": "10.0.40.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "c6435612-3aca-590f-89ba-e606f54df474" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "18ba8eb2-342b-5a73-aeae-7288ea9bb28b" + } + }, + "name": "128.32.10.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + "endpoint_uuid": { + "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "1901b0dc-1b5e-5fdf-b9ac-9168787464c1" + } + }, + "name": "128.32.10.1-200" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "70cbb732-8149-59ee-939b-011828e4292b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "1afdae8b-a281-53aa-99c2-205afb8f4ee7" + } + }, + "name": "128.32.33.5-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "356378dd-952b-5032-912d-37fc21284b4c" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "30ca0f8f-b150-57f2-ae5e-8a6844944783" + } + }, + "name": "10.0.20.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "34c9c6c3-0dcf-54e5-ba67-da33eb2d3c1a" + } + }, + "name": "10.0.20.1-501" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "356378dd-952b-5032-912d-37fc21284b4c" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "35801e61-45f3-564e-ad5c-09baf4aae906" + } + }, + "name": "10.0.30.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "36643dba-e8fa-5fb7-952d-dff313db957b" + } + }, + "name": "172.10.33.5-500" + }, + { + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "ede34dea-6b51-5787-88d2-553fe548f540" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "36856920-3387-5384-b1b1-dbc9e54da226" + } + }, + "name": "nce-t/mgmt==10.0.40.1/mgmt" + }, + { + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "b72983bd-57d8-5cf8-8ec7-da9084382d7a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "46ba12f9-dd17-5f2a-9558-e4611515a6b9" + } + }, + "name": "nce-t/mgmt==10.0.30.1/mgmt" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "4dfe28dd-ac28-53d5-b330-1707e350d772" + } + }, + "name": "10.0.30.1-501" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "644ab377-572c-53a4-8ab5-f5cf45591d88" + } + }, + "name": "128.32.20.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "c6435612-3aca-590f-89ba-e606f54df474" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "661ac531-4309-58cc-b70e-2a79492c2488" + } + }, + "name": "128.32.33.5-200" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "6a236e01-853c-51d0-8915-2d09b45923b0" + } + }, + "name": "128.32.33.5-201" + }, + { + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "da826790-a4b0-5317-b30b-e1370918a644" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "6c802ae7-59d1-55e7-9498-146c465bcab5" + } + }, + "name": "nce-t/mgmt==10.0.20.1/mgmt" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + "endpoint_uuid": { + "uuid": "0701f406-633f-53e7-a44d-c93384745df8" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "6fa77ad9-e4d7-5830-bf84-ab206eff613a" + } + }, + "name": "128.32.20.1-200" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "808b54e8-3d5a-5e03-a42e-d6c2a57cf6f3" + } + }, + "name": "10.0.30.1-200" + }, + { + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "59e1e30f-ea65-5e04-8a91-760a648a02c6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "85a18715-3ce0-57f9-8025-5634fe622a06" + } + }, + "name": "nce-t/mgmt==10.0.10.1/mgmt" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "8e8d1a2b-beae-5624-8826-9235bd73a3a8" + } + }, + "name": "10.0.40.1-501" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "e9c5b57e-de50-509c-9f5a-0107ff233703" + } + }, + "name": "10.0.10.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + "endpoint_uuid": { + "uuid": "0701f406-633f-53e7-a44d-c93384745df8" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "effca6e0-acf3-5c02-ba9a-d82c17a3f006" + } + }, + "name": "128.32.20.5-eth1" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "f45b4432-4ae2-5719-b4e8-a5e8baa1ccd2" + } + }, + "name": "10.0.10.1-501" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + "endpoint_uuid": { + "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "fd005f34-39f5-550e-b2c0-c6e6f8c16325" + } + }, + "name": "128.32.10.5-eth1" + } + ], + "topologies": [ + { + "device_ids": [ + { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + } + ], + "link_ids": [ + { + "link_uuid": { + "uuid": "0b3d5943-c2bf-595f-a805-dc29c2be2f52" + } + }, + { + "link_uuid": { + "uuid": "1490e70f-472c-5e4c-8280-21c48ed03477" + } + }, + { + "link_uuid": { + "uuid": "18ba8eb2-342b-5a73-aeae-7288ea9bb28b" + } + }, + { + "link_uuid": { + "uuid": "1901b0dc-1b5e-5fdf-b9ac-9168787464c1" + } + }, + { + "link_uuid": { + "uuid": "1afdae8b-a281-53aa-99c2-205afb8f4ee7" + } + }, + { + "link_uuid": { + "uuid": "30ca0f8f-b150-57f2-ae5e-8a6844944783" + } + }, + { + "link_uuid": { + "uuid": "34c9c6c3-0dcf-54e5-ba67-da33eb2d3c1a" + } + }, + { + "link_uuid": { + "uuid": "35801e61-45f3-564e-ad5c-09baf4aae906" + } + }, + { + "link_uuid": { + "uuid": "36643dba-e8fa-5fb7-952d-dff313db957b" + } + }, + { + "link_uuid": { + "uuid": "36856920-3387-5384-b1b1-dbc9e54da226" + } + }, + { + "link_uuid": { + "uuid": "46ba12f9-dd17-5f2a-9558-e4611515a6b9" + } + }, + { + "link_uuid": { + "uuid": "4dfe28dd-ac28-53d5-b330-1707e350d772" + } + }, + { + "link_uuid": { + "uuid": "644ab377-572c-53a4-8ab5-f5cf45591d88" + } + }, + { + "link_uuid": { + "uuid": "661ac531-4309-58cc-b70e-2a79492c2488" + } + }, + { + "link_uuid": { + "uuid": "6a236e01-853c-51d0-8915-2d09b45923b0" + } + }, + { + "link_uuid": { + "uuid": "6c802ae7-59d1-55e7-9498-146c465bcab5" + } + }, + { + "link_uuid": { + "uuid": "6fa77ad9-e4d7-5830-bf84-ab206eff613a" + } + }, + { + "link_uuid": { + "uuid": "808b54e8-3d5a-5e03-a42e-d6c2a57cf6f3" + } + }, + { + "link_uuid": { + "uuid": "85a18715-3ce0-57f9-8025-5634fe622a06" + } + }, + { + "link_uuid": { + "uuid": "8e8d1a2b-beae-5624-8826-9235bd73a3a8" + } + }, + { + "link_uuid": { + "uuid": "e9c5b57e-de50-509c-9f5a-0107ff233703" + } + }, + { + "link_uuid": { + "uuid": "effca6e0-acf3-5c02-ba9a-d82c17a3f006" + } + }, + { + "link_uuid": { + "uuid": "f45b4432-4ae2-5719-b4e8-a5e8baa1ccd2" + } + }, + { + "link_uuid": { + "uuid": "fd005f34-39f5-550e-b2c0-c6e6f8c16325" + } + } + ], + "name": "admin", + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ] +} \ No newline at end of file diff --git a/src/ztp_server/tests/data/topology-real.json b/src/ztp_server/tests/data/topology-real.json new file mode 100755 index 000000000..bb158d920 --- /dev/null +++ b/src/ztp_server/tests/data/topology-real.json @@ -0,0 +1,259 @@ +{ + "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": "nce-t"}}, "name": "nce-t", "device_type": "emu-open-line-system", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "name": "10.0.10.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "200", "name": "200", "type": "copper" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "name": "10.0.20.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "name": "10.0.30.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "200", "name": "200", "type": "copper" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "name": "10.0.40.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "name": "128.32.10.5", "device_type": "emu-client", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "eth1", "name": "eth1", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "name": "128.32.10.1", "device_type": "emu-packet-router", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "name": "128.32.20.5", "device_type": "emu-client", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "eth1", "name": "eth1", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "name": "128.32.20.1", "device_type": "emu-packet-router", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "name": "128.32.33.5", "device_type": "emu-optical-transponder", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "201", "name": "201", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "name": "172.10.33.5", "device_type": "emu-datacenter", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "201", "name": "201", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}} + ], + + "links": [ + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.10.1/mgmt"}}, "name": "nce-t/mgmt==10.0.10.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.20.1/mgmt"}}, "name": "nce-t/mgmt==10.0.20.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.30.1/mgmt"}}, "name": "nce-t/mgmt==10.0.30.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.40.1/mgmt"}}, "name": "nce-t/mgmt==10.0.40.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.10.1-501"}}, "name": "10.0.10.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.20.1-501"}}, "name": "10.0.20.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.10.1-500"}}, "name": "10.0.10.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.40.1-500"}}, "name": "10.0.40.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.20.1-500"}}, "name": "10.0.20.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.30.1-500"}}, "name": "10.0.30.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.40.1-501"}}, "name": "10.0.40.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.30.1-501"}}, "name": "10.0.30.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.10.5-eth1"}}, "name": "128.32.10.5-eth1", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "200" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.10.1-200"}}, "name": "128.32.10.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "200" }}, + {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "endpoint_uuid": {"uuid": "eth1"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.10.1-500"}}, "name": "128.32.10.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "200"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.33.5-200"}}, "name": "128.32.33.5-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "200"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.20.5-eth1"}}, "name": "128.32.20.5-eth1", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "200" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.20.1-200"}}, "name": "128.32.20.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "200" }}, + {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "endpoint_uuid": {"uuid": "eth1"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.20.1-500"}}, "name": "128.32.20.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "201"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.33.5-201"}}, "name": "128.32.33.5-201", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "201"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.33.5-500"}}, "name": "128.32.33.5-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "200"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.10.1-200"}}, "name": "10.0.10.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "200"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "172.10.33.5-500"}}, "name": "172.10.33.5-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "200"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.30.1-200"}}, "name": "10.0.30.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "200"}}, + {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "endpoint_uuid": {"uuid": "500"}} + ]} + ] +} diff --git a/src/ztp_server/tests/ietf_acl_client.py b/src/ztp_server/tests/ietf_acl_client.py new file mode 100755 index 000000000..20887f1a8 --- /dev/null +++ b/src/ztp_server/tests/ietf_acl_client.py @@ -0,0 +1,89 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 requests, time +from typing import Optional +from requests.auth import HTTPBasicAuth + +BASE_URL = '{:s}://{:s}:{:d}/restconf/data' +ACLS_URL = '{:s}/device={:s}/ietf-access-control-list:acls' +ACL_URL = '{:s}/device={:s}/ietf-access-control-list:acl={:s}' + +CSG1_DEVICE_UUID = '118295c8-318a-52ec-a394-529fc4b70f2f' # router: 128.32.10.1 +ACL_NAME = 'sample-ipv4-acl' +ACL_RULE = {"ietf-access-control-list:acls": { + "acl": [{ + "name": "sample-ipv4-acl", "type": "ipv4-acl-type", + "aces": {"ace": [{ + "name": "rule1", + "matches": { + "ipv4": { + "source-ipv4-network": "128.32.10.6/24", + "destination-ipv4-network": "172.10.33.0/24", + "dscp": 18 + }, + "tcp": { + "source-port": {"operator": "eq", "port": 1444}, + "destination-port": {"operator": "eq", "port": 1333}, + "flags": "syn" + } + }, + "actions": {"forwarding": "drop"} + }]} + }], + "attachment-points": {"interface": [{ + "interface-id": "200", + "ingress": {"acl-sets": {"acl-set": [{"name": "sample-ipv4-acl"}]}} + }] +}}} + +class TfsIetfAclClient: + def __init__( + self, host : str = 'localhost', port : int = 80, schema : str = 'http', + username : Optional[str] = 'admin', password : Optional[str] = 'admin', + timeout : int = 10, allow_redirects : bool = True, verify : bool = False + ) -> None: + self._base_url = BASE_URL.format(schema, host, port) + auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None + self._settings = dict(auth=auth, timeout=timeout, allow_redirects=allow_redirects, verify=verify) + + def post(self, device_uuid : str, ietf_acl_data : dict) -> str: + request_url = ACLS_URL.format(self._base_url, device_uuid) + reply = requests.post(request_url, json=ietf_acl_data, **(self._settings)) + return reply.text + + def get(self, device_uuid : str, acl_name : str) -> str: + request_url = ACL_URL.format(self._base_url, device_uuid, acl_name) + reply = requests.get(request_url, **(self._settings)) + return reply.text + + def delete(self, device_uuid : str, acl_name : str) -> str: + request_url = ACL_URL.format(self._base_url, device_uuid, acl_name) + reply = requests.delete(request_url, **(self._settings)) + return reply.text + +def main(): + client = TfsIetfAclClient() + print(f'ACL rule: {ACL_RULE}') + post_response = client.post(CSG1_DEVICE_UUID, ACL_RULE) + print(f'post response: {post_response}') + time.sleep(.5) + get_response = client.get(CSG1_DEVICE_UUID, ACL_NAME) + print(f'get response: {get_response}') + time.sleep(.5) + delete_response = client.delete(CSG1_DEVICE_UUID, ACL_NAME) + print(f'delete response: {delete_response}') + +if __name__ == '__main__': + main() diff --git a/src/ztp_server/tests/test_etsi_bwm.py b/src/ztp_server/tests/test_etsi_bwm.py new file mode 100755 index 000000000..9400de00f --- /dev/null +++ b/src/ztp_server/tests/test_etsi_bwm.py @@ -0,0 +1,240 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 deepdiff, json, logging, pytest +from typing import Dict +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.proto.context_pb2 import ContextId, TopologyId +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Topology import json_topology_id +from context.client.ContextClient import ContextClient +from nbi.service.rest_server import RestServer +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + do_rest_delete_request, do_rest_get_request, do_rest_patch_request, do_rest_post_request, do_rest_put_request, + mock_service, nbi_service_rest, context_client +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) +ADMIN_TOPOLOGY_ID = TopologyId(**json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id=JSON_ADMIN_CONTEXT_ID)) +BASE_URL = '/restconf/bwm/v1' + +@pytest.fixture(scope='session') +def storage() -> Dict: + yield dict() + +#def compare_dicts(dict1, dict2): +# # Function to recursively sort dictionaries +# def recursively_sort(d): +# if isinstance(d, dict): +# return {k: recursively_sort(v) for k, v in sorted(d.items())} +# if isinstance(d, list): +# return [recursively_sort(item) for item in d] +# return d +# +# # Sort dictionaries to ignore the order of fields +# sorted_dict1 = recursively_sort(dict1) +# sorted_dict2 = recursively_sort(dict2) +# +# if sorted_dict1 != sorted_dict2: +# LOGGER.error(sorted_dict1) +# LOGGER.error(sorted_dict2) +# +# return sorted_dict1 != sorted_dict2 + +def check_timestamps(bwm_service): + assert 'timeStamp' in bwm_service + assert 'seconds' in bwm_service['timeStamp'] + assert 'nanoseconds' in bwm_service['timeStamp'] + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + +def test_get_allocations_empty(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + URL = BASE_URL + '/bw_allocations' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + assert len(retrieved_data) == 0 + +def test_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + URL = BASE_URL + '/bw_allocations' + data = { + "appInsId" : "service_uuid_01", + "allocationDirection" : "00", + "fixedAllocation" : "123000.0", + "fixedBWPriority" : "SEE_DESCRIPTION", + "requestType" : 0, + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }] + } + retrieved_data = do_rest_post_request(URL, body=data, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + storage['service_uuid_01'] = 'service_uuid_01' + + +def test_get_allocations(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + assert len(retrieved_data) == 1 + good_result = [ + { + "appInsId" : "service_uuid_01", + "fixedAllocation" : "123000.0", + "allocationDirection" : "00", + "fixedBWPriority" : "SEE_DESCRIPTION", + "requestType" : "0", + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }], + } + ] + check_timestamps(retrieved_data[0]) + del retrieved_data[0]['timeStamp'] + diff_data = deepdiff.DeepDiff(good_result, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + + +def test_get_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations/service_uuid_01' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + good_result = { + "appInsId" : "service_uuid_01", + "fixedAllocation" : "123000.0", + "allocationDirection": "00", + "fixedBWPriority" : "SEE_DESCRIPTION", + "requestType" : "0", + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }] + } + check_timestamps(retrieved_data) + del retrieved_data['timeStamp'] + diff_data = deepdiff.DeepDiff(good_result, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + + +def test_put_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations/service_uuid_01' + changed_allocation = { + "appInsId" : "service_uuid_01", + "fixedAllocation" : "200.0", + "allocationDirection": "00", + "fixedBWPriority" : "NOPRIORITY", + "requestType" : "0", + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }] + } + retrieved_data = do_rest_put_request(URL, body=json.dumps(changed_allocation), logger=LOGGER, expected_status_codes={200}) + check_timestamps(retrieved_data) + del retrieved_data['timeStamp'] + diff_data = deepdiff.DeepDiff(changed_allocation, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + + +def test_patch_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations/service_uuid_01' + difference = { + "fixedBWPriority":"FULLPRIORITY", + } + changed_allocation = { + "appInsId" : "service_uuid_01", + "fixedAllocation" : "200.0", + "allocationDirection": "00", + "fixedBWPriority" : "FULLPRIORITY", + "requestType" : "0", + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }] + } + retrieved_data = do_rest_patch_request(URL, body=difference, logger=LOGGER, expected_status_codes={200}) + check_timestamps(retrieved_data) + del retrieved_data['timeStamp'] + diff_data = deepdiff.DeepDiff(changed_allocation, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + + +def test_delete_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations/service_uuid_01' + do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={200}) + + +def test_get_allocations_empty_final(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + URL = BASE_URL + '/bw_allocations' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + assert len(retrieved_data) == 0 + + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_ietf_l2vpn.py b/src/ztp_server/tests/test_ietf_l2vpn.py new file mode 100755 index 000000000..7bed8ff5d --- /dev/null +++ b/src/ztp_server/tests/test_ietf_l2vpn.py @@ -0,0 +1,75 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from tests.tools.mock_osm.MockOSM import MockOSM +from .Constants import SERVICE_CONNECTION_POINTS_1, SERVICE_CONNECTION_POINTS_2, SERVICE_TYPE +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + mock_service, nbi_service_rest, osm_wim, context_client +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/topology-7router-emu-dummy.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + +def test_create_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name + osm_wim.create_connectivity_service(SERVICE_TYPE, SERVICE_CONNECTION_POINTS_1) + +def test_get_service_status(osm_wim : MockOSM): # pylint: disable=redefined-outer-name + service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service + osm_wim.get_connectivity_service_status(service_uuid) + +def test_edit_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name + service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service + osm_wim.edit_connectivity_service(service_uuid, SERVICE_CONNECTION_POINTS_2) + +def test_delete_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name + service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service + osm_wim.delete_connectivity_service(service_uuid) + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_ietf_l3vpn.py b/src/ztp_server/tests/test_ietf_l3vpn.py new file mode 100755 index 000000000..0f214661f --- /dev/null +++ b/src/ztp_server/tests/test_ietf_l3vpn.py @@ -0,0 +1,113 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, pytest +from typing import Dict +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import ( + DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +) +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from nbi.service.rest_server.RestServer import RestServer +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + do_rest_delete_request, do_rest_get_request, do_rest_post_request, + mock_service, nbi_service_rest, osm_wim, context_client +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' +SVC1_DATA_FILE = 'nbi/tests/data/ietf_l3vpn_req_svc1.json' +SVC2_DATA_FILE = 'nbi/tests/data/ietf_l3vpn_req_svc2.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) + +@pytest.fixture(scope='session') +def storage() -> Dict: + yield dict() + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + +# pylint: disable=redefined-outer-name, unused-argument +def test_create_svc1(nbi_service_rest : RestServer, storage : Dict): + with open(SVC1_DATA_FILE, 'r', encoding='UTF-8') as f: + svc1_data = json.load(f) + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' + do_rest_post_request(URL, body=svc1_data, logger=LOGGER, expected_status_codes={201}) + storage['svc1-uuid'] = svc1_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] + +# pylint: disable=redefined-outer-name, unused-argument +def test_create_svc2(nbi_service_rest : RestServer, storage : Dict): + with open(SVC2_DATA_FILE, 'r', encoding='UTF-8') as f: + svc2_data = json.load(f) + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' + do_rest_post_request(URL, body=svc2_data, logger=LOGGER, expected_status_codes={201}) + storage['svc2-uuid'] = svc2_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] + +# pylint: disable=redefined-outer-name, unused-argument +def test_get_state_svc1(nbi_service_rest : RestServer, storage : Dict): + assert 'svc1-uuid' in storage + service_uuid = storage['svc1-uuid'] + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) + do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + +# pylint: disable=redefined-outer-name, unused-argument +def test_get_state_svc2(nbi_service_rest : RestServer, storage : Dict): + assert 'svc2-uuid' in storage + service_uuid = storage['svc2-uuid'] + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) + do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + +# pylint: disable=redefined-outer-name, unused-argument +def test_delete_svc1(nbi_service_rest : RestServer, storage : Dict): + assert 'svc1-uuid' in storage + service_uuid = storage['svc1-uuid'] + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) + do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={204}) + +# pylint: disable=redefined-outer-name, unused-argument +def test_delete_svc2(nbi_service_rest : RestServer, storage : Dict): + assert 'svc2-uuid' in storage + service_uuid = storage['svc2-uuid'] + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) + do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={204}) + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_ietf_network.py b/src/ztp_server/tests/test_ietf_network.py new file mode 100755 index 000000000..68337d0a8 --- /dev/null +++ b/src/ztp_server/tests/test_ietf_network.py @@ -0,0 +1,105 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 deepdiff, json, logging, operator, os +from typing import Dict +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import ( + DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +) +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from nbi.service.rest_server import RestServer + +# Explicitly state NBI to use PyangBind Renderer for this test +os.environ['IETF_NETWORK_RENDERER'] = 'PYANGBIND' + +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + do_rest_get_request, mock_service, nbi_service_rest, osm_wim, context_client +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' +TARGET_DATA_FILE = 'nbi/tests/data/test-ietf-network.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + +def sort_data(data : Dict) -> None: + if 'ietf-network:networks' not in data: return + if 'network' not in data['ietf-network:networks']: return + data['ietf-network:networks']['network'] = sorted( + data['ietf-network:networks']['network'], + key=operator.itemgetter('network-id') + ) + for network in data['ietf-network:networks']['network']: + if 'node' in network: + network['node'] = sorted( + network['node'], + key=operator.itemgetter('node-id') + ) + + for node in network['node']: + if 'ietf-network-topology:termination-point' in node: + node['ietf-network-topology:termination-point'] = sorted( + node['ietf-network-topology:termination-point'], + key=operator.itemgetter('tp-id') + ) + + if 'ietf-network-topology:link' in network: + network['ietf-network-topology:link'] = sorted( + network['ietf-network-topology:link'], + key=operator.itemgetter('link-id') + ) + +def test_rest_get_networks(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + with open(TARGET_DATA_FILE, 'r', encoding='UTF-8') as f: + target_data = json.load(f) + URL = '/restconf/data/ietf-network:networks' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + sort_data(retrieved_data) + sort_data(target_data) + diff_data = deepdiff.DeepDiff(target_data, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_slice.py b/src/ztp_server/tests/test_slice.py new file mode 100755 index 000000000..fe112e6fc --- /dev/null +++ b/src/ztp_server/tests/test_slice.py @@ -0,0 +1,125 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, random, uuid +from typing import Dict, Tuple +from nbi.service.rest_server.nbi_plugins.ietf_network_slice.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) -> Tuple[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__": + request = generate_request(123) + print(json.dumps(request[0], sort_keys=True, indent=4)) diff --git a/src/ztp_server/tests/test_tfs_api.py b/src/ztp_server/tests/test_tfs_api.py new file mode 100755 index 000000000..eab2f8d9b --- /dev/null +++ b/src/ztp_server/tests/test_tfs_api.py @@ -0,0 +1,217 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, urllib +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import ( + DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +) +from common.tools.object_factory.Context import json_context_id +from common.type_checkers.Assertions import ( + validate_connection, validate_connection_ids, validate_connections, + validate_context, validate_context_ids, validate_contexts, + validate_device, validate_device_ids, validate_devices, + validate_link, validate_link_ids, validate_links, + validate_service, validate_service_ids, validate_services, + validate_slice, validate_slice_ids, validate_slices, + validate_topologies, validate_topology, validate_topology_ids +) +from context.client.ContextClient import ContextClient +from nbi.service.rest_server.RestServer import RestServer +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + mock_service, nbi_service_rest, context_client, + do_rest_get_request +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/tfs_api_dummy.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) + + +# ----- Prepare Environment -------------------------------------------------------------------------------------------- + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 3 + assert len(response.slice_ids ) == 1 + + +# ----- Context -------------------------------------------------------------------------------------------------------- + +def test_rest_get_context_ids(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/context_ids') + validate_context_ids(reply) + +def test_rest_get_contexts(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/contexts') + validate_contexts(reply) + +def test_rest_get_context(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}'.format(context_uuid)) + validate_context(reply) + + +# ----- Topology ------------------------------------------------------------------------------------------------------- + +def test_rest_get_topology_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/topology_ids'.format(context_uuid)) + validate_topology_ids(reply) + +def test_rest_get_topologies(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/topologies'.format(context_uuid)) + validate_topologies(reply) + +def test_rest_get_topology(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + topology_uuid = urllib.parse.quote(DEFAULT_TOPOLOGY_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/topology/{:s}'.format(context_uuid, topology_uuid)) + validate_topology(reply, num_devices=3, num_links=6) + + +# ----- Device --------------------------------------------------------------------------------------------------------- + +def test_rest_get_device_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/device_ids') + validate_device_ids(reply) + +def test_rest_get_devices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/devices') + validate_devices(reply) + +def test_rest_get_device(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + device_uuid = urllib.parse.quote('R1', safe='') + reply = do_rest_get_request('/tfs-api/device/{:s}'.format(device_uuid)) + validate_device(reply) + + +# ----- Link ----------------------------------------------------------------------------------------------------------- + +def test_rest_get_link_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/link_ids') + validate_link_ids(reply) + +def test_rest_get_links(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/links') + validate_links(reply) + +def test_rest_get_link(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + link_uuid = urllib.parse.quote('R1/502==R2/501', safe='') + reply = do_rest_get_request('/tfs-api/link/{:s}'.format(link_uuid)) + validate_link(reply) + + +# ----- Service -------------------------------------------------------------------------------------------------------- + +def test_rest_get_service_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/service_ids'.format(context_uuid)) + validate_service_ids(reply) + +def test_rest_get_services(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/services'.format(context_uuid)) + validate_services(reply) + +def test_rest_get_service(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') + reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}'.format(context_uuid, service_uuid)) + validate_service(reply) + + +# ----- Slice ---------------------------------------------------------------------------------------------------------- + +def test_rest_get_slice_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/slice_ids'.format(context_uuid)) + validate_slice_ids(reply) + +def test_rest_get_slices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/slices'.format(context_uuid)) + validate_slices(reply) + +def test_rest_get_slice(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + slice_uuid = urllib.parse.quote('SLC:R1-R2-R3', safe='') + reply = do_rest_get_request('/tfs-api/context/{:s}/slice/{:s}'.format(context_uuid, slice_uuid)) + validate_slice(reply) + + +# ----- Connection ----------------------------------------------------------------------------------------------------- + +def test_rest_get_connection_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') + reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connection_ids'.format(context_uuid, service_uuid)) + validate_connection_ids(reply) + +def test_rest_get_connections(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') + reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connections'.format(context_uuid, service_uuid)) + validate_connections(reply) + +def test_rest_get_connection(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + connection_uuid = urllib.parse.quote('CON:R1/200==R2/200:1', safe='') + reply = do_rest_get_request('/tfs-api/connection/{:s}'.format(connection_uuid)) + validate_connection(reply) + +# ----- Policy --------------------------------------------------------------------------------------------------------- + +#def test_rest_get_policyrule_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +# reply = do_rest_get_request('/tfs-api/policyrule_ids') +# validate_policyrule_ids(reply) + +#def test_rest_get_policyrules(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +# reply = do_rest_get_request('/tfs-api/policyrules') +# validate_policyrules(reply) + +#def test_rest_get_policyrule(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +# policyrule_uuid_quoted = urllib.parse.quote(policyrule_uuid, safe='') +# reply = do_rest_get_request('/tfs-api/policyrule/{:s}'.format(policyrule_uuid_quoted)) +# validate_policyrule(reply) + + +# ----- Cleanup Environment -------------------------------------------------------------------------------------------- + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 3 + assert len(response.slice_ids ) == 1 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_yang_acl.py b/src/ztp_server/tests/test_yang_acl.py new file mode 100755 index 000000000..2f45c50bc --- /dev/null +++ b/src/ztp_server/tests/test_yang_acl.py @@ -0,0 +1,104 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 copy, json, libyang, logging, os +from typing import Dict, List, Optional + +LOGGER = logging.getLogger(__name__) + +YANG_DIR = os.path.join(os.path.dirname(__file__), 'yang') +YANG_MODULES = [ + 'ietf-yang-types', + 'ietf-interfaces', + 'iana-if-type', + 'ietf-access-control-list', +] + +class YangValidator: + def __init__(self) -> None: + self._yang_context = libyang.Context(YANG_DIR) + for module_name in YANG_MODULES: + LOGGER.info('Loading module: {:s}'.format(str(module_name))) + yang_module = self._yang_context.load_module(module_name) + yang_module.feature_enable_all() + yang_module_prefix = yang_module.prefix() + LOGGER.info(' Prefix: {:s}'.format(str(yang_module_prefix))) + + def parse_to_dict(self, message : Dict, interface_names : List[str]) -> Dict: + interfaces = self._yang_context.create_data_path('/ietf-interfaces:interfaces') + for if_index,interface_name in enumerate(interface_names): + if_path = 'interface[name="{:s}"]'.format(str(interface_name)) + interface = interfaces.create_path(if_path) + interface.create_path('if-index', if_index + 1) + interface.create_path('type', 'iana-if-type:ethernetCsmacd') + interface.create_path('admin-status', 'up') + interface.create_path('oper-status', 'up') + statistics = interface.create_path('statistics') + statistics.create_path('discontinuity-time', '2024-07-11T10:00:00.000000Z') + + message = copy.deepcopy(message) + message['ietf-interfaces:interfaces'] = interfaces.print_dict()['interfaces'] + + dnode : Optional[libyang.DNode] = self._yang_context.parse_data_mem( + json.dumps(message), 'json', validate_present=True, strict=True + ) + if dnode is None: raise Exception('Unable to parse Message({:s})'.format(str(message))) + message = dnode.print_dict() + dnode.free() + interfaces.free() + return message + + def destroy(self) -> None: + self._yang_context.destroy() + self._yang_context = None + +def main() -> None: + import uuid # pylint: disable=import-outside-toplevel + logging.basicConfig(level=logging.DEBUG) + + interface_names = {'200', '500', str(uuid.uuid4()), str(uuid.uuid4())} + ACL_RULE = {"ietf-access-control-list:acls": { + "acl": [{ + "name": "sample-ipv4-acl", "type": "ipv4-acl-type", + "aces": {"ace": [{ + "name": "rule1", + "matches": { + "ipv4": { + "source-ipv4-network": "128.32.10.6/24", + "destination-ipv4-network": "172.10.33.0/24", + "dscp": 18 + }, + "tcp": { + "source-port": {"operator": "eq", "port": 1444}, + "destination-port": {"operator": "eq", "port": 1333}, + "flags": "syn" + } + }, + "actions": {"forwarding": "drop"} + }]} + }], + "attachment-points": {"interface": [{ + "interface-id": "200", + "ingress": {"acl-sets": {"acl-set": [{"name": "sample-ipv4-acl"}]}} + }] + }}} + + yang_validator = YangValidator() + request_data = yang_validator.parse_to_dict(ACL_RULE, list(interface_names)) + yang_validator.destroy() + + LOGGER.info('request_data = {:s}'.format(str(request_data))) + +if __name__ == '__main__': + main() -- GitLab From 7b86b36eb0eff567a720926505c5c761e56414b7 Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Fri, 29 Nov 2024 13:12:16 +0000 Subject: [PATCH 054/463] feat: P4 endpoints support and several bug fixes --- src/device/service/driver_api/_Driver.py | 1 + src/device/service/drivers/p4/p4_common.py | 102 +++++++- src/device/service/drivers/p4/p4_context.py | 11 +- src/device/service/drivers/p4/p4_driver.py | 240 ++++++++++++----- src/device/service/drivers/p4/p4_manager.py | 276 ++++++++++++-------- 5 files changed, 451 insertions(+), 179 deletions(-) diff --git a/src/device/service/driver_api/_Driver.py b/src/device/service/driver_api/_Driver.py index 2580c3e78..bbb78cd43 100644 --- a/src/device/service/driver_api/_Driver.py +++ b/src/device/service/driver_api/_Driver.py @@ -25,6 +25,7 @@ RESOURCE_ROUTING_POLICIES = '__routing_policies__' RESOURCE_SERVICES = '__services__' RESOURCE_ACL = '__acl__' RESOURCE_INVENTORY = '__inventory__' +RESOURCE_RULES = "__rules__" class _Driver: diff --git a/src/device/service/drivers/p4/p4_common.py b/src/device/service/drivers/p4/p4_common.py index ec8514937..b55296a65 100644 --- a/src/device/service/drivers/p4/p4_common.py +++ b/src/device/service/drivers/p4/p4_common.py @@ -27,10 +27,12 @@ import math import re import socket import ipaddress +from typing import Any, Dict, List, Optional, Tuple from ctypes import c_uint16, sizeof import macaddress -from common.type_checkers.Checkers import chk_type +from common.type_checkers.Checkers import \ + chk_attribute, chk_string, chk_type, chk_issubclass try: from .p4_exception import UserBadValueError except ImportError: @@ -38,6 +40,7 @@ except ImportError: P4_ATTR_DEV_ID = "id" P4_ATTR_DEV_NAME = "name" +P4_ATTR_DEV_ENDPOINTS = "endpoints" P4_ATTR_DEV_VENDOR = "vendor" P4_ATTR_DEV_HW_VER = "hw_ver" P4_ATTR_DEV_SW_VER = "sw_ver" @@ -50,6 +53,7 @@ P4_VAL_DEF_HW_VER = "BMv2 simple_switch" P4_VAL_DEF_SW_VER = "Stratum" P4_VAL_DEF_TIMEOUT = 60 +RESOURCE_ENDPOINTS_ROOT_PATH = "/endpoints" # Logger instance LOGGER = logging.getLogger(__name__) @@ -422,6 +426,28 @@ def parse_action_parameters_from_json(resource): return action_params +def parse_replicas_from_json(resource): + """ + Parse the session replicas within a JSON-based object. + + :param resource: JSON-based object + :return: map of replicas + """ + if not resource or ("replicas" not in resource): + LOGGER.warning( + "JSON entry misses 'replicas' list of attributes") + return None + chk_type("replicas", resource["replicas"], list) + + replicas = {} + for rep in resource["replicas"]: + chk_type("egress-port", rep["egress-port"], int) + chk_type("instance", rep["instance"], int) + replicas[rep["egress-port"]] = rep["instance"] + + return replicas + + def parse_integer_list_from_json(resource, resource_list, resource_item): """ Parse the list of integers within a JSON-based object. @@ -443,3 +469,77 @@ def parse_integer_list_from_json(resource, resource_list, resource_item): integers_list.append(item[resource_item]) return integers_list + +def process_optional_string_field( + #TODO: Consider adding this in common methdos as it is taken by the Emulated driver + endpoint_data : Dict[str, Any], field_name : str, endpoint_resource_value : Dict[str, Any] +) -> None: + field_value = chk_attribute(field_name, endpoint_data, 'endpoint_data', default=None) + if field_value is None: return + chk_string('endpoint_data.{:s}'.format(field_name), field_value) + if len(field_value) > 0: endpoint_resource_value[field_name] = field_value + +def compose_resource_endpoints(endpoints_list : List[Tuple[str, Any]]): + #TODO: Consider adding this in common methods; currently taken by the Emulated driver + endpoint_resources = [] + for i, endpoint in enumerate(endpoints_list): + LOGGER.debug("P4 endpoint {}: {}".format(i, endpoint)) + endpoint_resource = compose_resource_endpoint(endpoint) + if endpoint_resource is None: continue + endpoint_resources.append(endpoint_resource) + return endpoint_resources + +def compose_resource_endpoint(endpoint_data : Dict[str, Any]) -> Optional[Tuple[str, Dict]]: + #TODO: Consider adding this in common methods; currently taken by the Emulated driver + try: + endpoint_uuid = chk_attribute('uuid', endpoint_data, 'endpoint_data') + chk_string('endpoint_data.uuid', endpoint_uuid, min_length=1) + endpoint_resource_path = RESOURCE_ENDPOINTS_ROOT_PATH + endpoint_resource_key = '{:s}/endpoint[{:s}]'.format(endpoint_resource_path, endpoint_uuid) + endpoint_resource_value = {'uuid': endpoint_uuid} + + # Check endpoint's optional string fields + process_optional_string_field(endpoint_data, 'name', endpoint_resource_value) + process_optional_string_field(endpoint_data, 'type', endpoint_resource_value) + process_optional_string_field(endpoint_data, 'context_uuid', endpoint_resource_value) + process_optional_string_field(endpoint_data, 'topology_uuid', endpoint_resource_value) + + return endpoint_resource_key, endpoint_resource_value + except: # pylint: disable=bare-except + LOGGER.error('Problem composing endpoint({:s})'.format(str(endpoint_data))) + return None + +def compose_resource_rules(rules_list : List[Tuple[str, Any]]): + rule_resources = [] + for i, rule in enumerate(rules_list): + rule_resource = compose_resource_rule(rule_data=rule, rule_cnt=i) + if rule_resource is None: continue + rule_resources.append(rule_resource) + return rule_resources + +def compose_resource_rule(rule_data : Dict[str, Any], rule_cnt : int) -> Optional[Tuple[str, Dict]]: + try: + LOGGER.info("Rule: {}".format(rule_data)) + + rule_resource_key = chk_attribute('resource_key', rule_data, 'rule_data') + chk_string('rule_data.resource_key', rule_resource_key, min_length=1) + + rule_resource_value = chk_attribute('resource_value', rule_data, 'rule_data') + chk_issubclass('rule_data.resource_value', rule_resource_value, dict) + + rule_key_unique = "" + + if "table" == rule_resource_key: + table_name = parse_resource_string_from_json(rule_resource_value, "table-name") + assert table_name, "Invalid table name in rule" + rule_key_unique = '/{0}s/{0}/{1}[{2}]'.format(rule_resource_key, table_name, rule_cnt) + else: + msg = f"Parsed an invalid key {rule_resource_key}" + LOGGER.error(msg) + raise Exception(msg) + + assert rule_key_unique, "Invalid unique resource key" + return rule_key_unique, rule_resource_value + except: # pylint: disable=bare-except + LOGGER.error('Problem composing rule({:s})'.format(str(rule_data))) + return None diff --git a/src/device/service/drivers/p4/p4_context.py b/src/device/service/drivers/p4/p4_context.py index ca8f0c19e..ce8e308e8 100644 --- a/src/device/service/drivers/p4/p4_context.py +++ b/src/device/service/drivers/p4/p4_context.py @@ -34,6 +34,7 @@ class P4Type(enum.Enum): meter = 6 direct_meter = 7 controller_packet_metadata = 8 + digest = 9 P4Type.table.p4info_name = "tables" @@ -44,6 +45,7 @@ P4Type.direct_counter.p4info_name = "direct_counters" P4Type.meter.p4info_name = "meters" P4Type.direct_meter.p4info_name = "direct_meters" P4Type.controller_packet_metadata.p4info_name = "controller_packet_metadata" +P4Type.digest.p4info_name = "digests" for object_type in P4Type: object_type.pretty_name = object_type.name.replace('_', ' ') @@ -58,11 +60,12 @@ class P4RuntimeEntity(enum.Enum): table_entry = 1 action_profile_member = 2 action_profile_group = 3 - meter_entry = 4 - direct_meter_entry = 5 - counter_entry = 6 - direct_counter_entry = 7 + counter_entry = 4 + direct_counter_entry = 5 + meter_entry = 6 + direct_meter_entry = 7 packet_replication_engine_entry = 8 + digest_entry = 9 class Context: diff --git a/src/device/service/drivers/p4/p4_driver.py b/src/device/service/drivers/p4/p4_driver.py index d31fa4673..c89a42bad 100644 --- a/src/device/service/drivers/p4/p4_driver.py +++ b/src/device/service/drivers/p4/p4_driver.py @@ -23,15 +23,19 @@ import threading from typing import Any, Iterator, List, Optional, Tuple, Union from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.type_checkers.Checkers import chk_type, chk_length, chk_string +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_RULES from .p4_common import matches_ipv4, matches_ipv6, valid_port,\ - P4_ATTR_DEV_ID, P4_ATTR_DEV_NAME, P4_ATTR_DEV_VENDOR,\ - P4_ATTR_DEV_HW_VER, P4_ATTR_DEV_SW_VER,\ + compose_resource_endpoints, parse_resource_string_from_json,\ + P4_ATTR_DEV_ID, P4_ATTR_DEV_NAME, P4_ATTR_DEV_ENDPOINTS,\ + P4_ATTR_DEV_VENDOR, P4_ATTR_DEV_HW_VER, P4_ATTR_DEV_SW_VER,\ P4_ATTR_DEV_P4BIN, P4_ATTR_DEV_P4INFO, P4_ATTR_DEV_TIMEOUT,\ P4_VAL_DEF_VENDOR, P4_VAL_DEF_HW_VER, P4_VAL_DEF_SW_VER,\ P4_VAL_DEF_TIMEOUT -from .p4_manager import P4Manager, KEY_TABLE, KEY_ACTION, \ - KEY_ACTION_PROFILE, KEY_COUNTER, KEY_DIR_COUNTER, KEY_METER, KEY_DIR_METER,\ - KEY_CTL_PKT_METADATA +from .p4_manager import P4Manager, \ + KEY_TABLE, KEY_ACTION, KEY_ACTION_PROFILE, \ + KEY_COUNTER, KEY_DIR_COUNTER, KEY_METER, KEY_DIR_METER,\ + KEY_CTL_PKT_METADATA, KEY_DIGEST, KEY_CLONE_SESSION,\ + KEY_ENDPOINT from .p4_client import WriteOperation try: @@ -59,6 +63,8 @@ class P4Driver(_Driver): P4 device datapath ID (Mandatory) name : str P4 device name (Optional) + endpoints : list + List of P4 device endpoints, i.e., ports (Optional) vendor : str P4 device vendor (Optional) hw_ver : str @@ -70,17 +76,22 @@ class P4Driver(_Driver): p4info : str Path to P4 info file (Optional, but must be combined with p4bin) timeout : int - Device timeout in seconds (Optional) + P4 device timeout in seconds (Optional) + rules : list + List of rules to configure the P4 device's pipeline """ def __init__(self, address: str, port: int, **settings) -> None: - super().__init__(settings.pop('name', DRIVER_NAME), address, port, **settings) + super().__init__(name=DRIVER_NAME, address=address, port=port, setting=settings) self.__manager = None self.__address = address self.__port = int(port) - self.__endpoint = None + self.__grpc_endpoint = None self.__settings = settings self.__id = None + self.__name = None + self.__endpoints = [] + self.__rules = {} self.__vendor = P4_VAL_DEF_VENDOR self.__hw_version = P4_VAL_DEF_HW_VER self.__sw_version = P4_VAL_DEF_SW_VER @@ -97,7 +108,7 @@ class P4Driver(_Driver): self.__address, self.__port) for key, value in settings.items(): - LOGGER.info("\t%8s = %s", key, value) + LOGGER.info("\t%9s = %s", key, value) def Connect(self) -> bool: """ @@ -105,14 +116,14 @@ class P4Driver(_Driver): :return: boolean connection status. """ - LOGGER.info("Connecting to P4 device %s ...", self.__endpoint) + LOGGER.info("Connecting to P4 device %s ...", self.__grpc_endpoint) with self.__lock: # Skip if already connected if self.__started.is_set(): return True - # Dynamically devise an election ID + # TODO: Dynamically devise an election ID election_id = (1, 0) # Spawn a P4 manager for this device @@ -140,7 +151,7 @@ class P4Driver(_Driver): :return: boolean disconnection status. """ - LOGGER.info("Disconnecting from P4 device %s ...", self.__endpoint) + LOGGER.info("Disconnecting from P4 device %s ...", self.__grpc_endpoint) # If not started, assume it is already disconnected if not self.__started.is_set(): @@ -167,13 +178,15 @@ class P4Driver(_Driver): :return: list of initial configuration items. """ - initial_conf = [] + + resource_keys = [RESOURCE_ENDPOINTS] if self.__endpoints else [] with self.__lock: - if not initial_conf: - LOGGER.warning("No initial configuration for P4 device %s ...", - self.__endpoint) - return [] + if not resource_keys: + LOGGER.warning("No initial configuration for P4 device {} ...".format(self.__grpc_endpoint)) + return [] + LOGGER.info("Initial configuration for P4 device {}:".format(self.__grpc_endpoint)) + return self.GetConfig(resource_keys) @metered_subclass_method(METRICS_POOL) def GetConfig(self, resource_keys: List[str] = [])\ @@ -186,7 +199,7 @@ class P4Driver(_Driver): None/Exception. """ LOGGER.info( - "Getting configuration from P4 device %s ...", self.__endpoint) + "Getting configuration from P4 device %s ...", self.__grpc_endpoint) # No resource keys means fetch all configuration if len(resource_keys) == 0: @@ -195,7 +208,7 @@ class P4Driver(_Driver): "implies getting all resource keys!") resource_keys = [ obj_name for obj_name, _ in self.__manager.p4_objects.items() - ] + ] + [RESOURCE_ENDPOINTS] + [RESOURCE_RULES] # Verify the input type chk_type("resources", resource_keys, list) @@ -214,7 +227,7 @@ class P4Driver(_Driver): changes requested. """ LOGGER.info( - "Setting configuration to P4 device %s ...", self.__endpoint) + "Setting configuration to P4 device %s ...", self.__grpc_endpoint) if not resources or len(resources) == 0: LOGGER.warning( @@ -238,7 +251,7 @@ class P4Driver(_Driver): deletions requested. """ LOGGER.info( - "Deleting configuration from P4 device %s ...", self.__endpoint) + "Deleting configuration from P4 device %s ...", self.__grpc_endpoint) if not resources or len(resources) == 0: LOGGER.warning( @@ -308,6 +321,14 @@ class P4Driver(_Driver): """ return self.__manager + def is_started(self): + """ + Check if an instance of the P4 manager is started. + + :return: boolean P4 manager instance status + """ + return self.__started.is_set() + def __parse_and_validate_settings(self): """ Verify that the driver inputs comply to what is expected. @@ -319,7 +340,7 @@ class P4Driver(_Driver): f"{self.__address} not a valid IPv4 or IPv6 address" assert valid_port(self.__port), \ f"{self.__port} not a valid transport port" - self.__endpoint = f"{self.__address}:{self.__port}" + self.__grpc_endpoint = f"{self.__address}:{self.__port}" # Device ID try: @@ -337,6 +358,16 @@ class P4Driver(_Driver): "No device name is provided. Setting default name: %s", self.__name) + # Device endpoints + if P4_ATTR_DEV_ENDPOINTS in self.__settings: + endpoints = self.__settings.get(P4_ATTR_DEV_ENDPOINTS, []) + endpoint_resources = compose_resource_endpoints(endpoints) + if endpoint_resources: + LOGGER.info("Setting endpoints: {}".format(endpoint_resources)) + self.SetConfig(endpoint_resources) + else: + LOGGER.warning("No device endpoints are provided.") + # Device vendor if P4_ATTR_DEV_VENDOR in self.__settings: self.__vendor = self.__settings.get(P4_ATTR_DEV_VENDOR) @@ -365,7 +396,7 @@ class P4Driver(_Driver): if P4_ATTR_DEV_P4BIN in self.__settings: self.__p4bin_path = self.__settings.get(P4_ATTR_DEV_P4BIN) assert os.path.exists(self.__p4bin_path),\ - "Invalid path to p4bin file" + "Invalid path to p4bin file: {}".format(self.__p4bin_path) assert P4_ATTR_DEV_P4INFO in self.__settings,\ "p4info and p4bin settings must be provided together" @@ -373,7 +404,7 @@ class P4Driver(_Driver): if P4_ATTR_DEV_P4INFO in self.__settings: self.__p4info_path = self.__settings.get(P4_ATTR_DEV_P4INFO) assert os.path.exists(self.__p4info_path),\ - "Invalid path to p4info file" + "Invalid path to p4info file: {}".format(self.__p4info_path) assert P4_ATTR_DEV_P4BIN in self.__settings,\ "p4info and p4bin settings must be provided together" @@ -404,7 +435,7 @@ class P4Driver(_Driver): """ resources = [] - LOGGER.debug("GetConfig() -> Keys: %s", resource_keys) + LOGGER.info("GetConfig() -> Keys: {}".format(resource_keys)) for resource_key in resource_keys: entries = [] @@ -423,8 +454,7 @@ class P4Driver(_Driver): entries.append(c_entries) elif KEY_DIR_COUNTER == resource_key: for d_cnt_name in self.__manager.get_direct_counter_names(): - dc_entries = \ - self.__manager.direct_counter_entries_to_json( + dc_entries = self.__manager.direct_counter_entries_to_json( d_cnt_name) if dc_entries: entries.append(dc_entries) @@ -436,28 +466,35 @@ class P4Driver(_Driver): entries.append(m_entries) elif KEY_DIR_METER == resource_key: for d_meter_name in self.__manager.get_direct_meter_names(): - dm_entries = \ - self.__manager.direct_meter_entries_to_json( + dm_entries = self.__manager.direct_meter_entries_to_json( d_meter_name) if dm_entries: entries.append(dm_entries) elif KEY_ACTION_PROFILE == resource_key: for ap_name in self.__manager.get_action_profile_names(): - ap_entries = \ - self.__manager.action_prof_member_entries_to_json( + ap_entries = self.__manager.action_prof_member_entries_to_json( ap_name) if ap_entries: entries.append(ap_entries) elif KEY_ACTION == resource_key: - #To be implemented or deprecated - pass - elif '__endpoints__' == resource_key: - #Not Supported for P4 devices + # To be implemented or deprecated pass elif KEY_CTL_PKT_METADATA == resource_key: + #TODO: Handle controller packet metadata msg = f"{resource_key.capitalize()} is not a " \ f"retrievable resource" - raise Exception(msg) + LOGGER.warning("%s", msg) + elif KEY_DIGEST == resource_key: + #TODO: Handle digests + msg = f"{resource_key.capitalize()} is not a " \ + f"retrievable resource" + LOGGER.warning("%s", msg) + elif RESOURCE_ENDPOINTS == resource_key: + resources += self.__endpoints + continue + elif RESOURCE_RULES == resource_key: + resources = self.__rules_into_resources() + continue else: msg = f"GetConfig failed due to invalid " \ f"resource key: {resource_key}" @@ -465,8 +502,10 @@ class P4Driver(_Driver): resources.append( (resource_key, entries if entries else None) ) - except Exception as ex: # pylint: disable=broad-except - resources.append((resource_key, ex)) + except Exception as e: # pylint: disable=broad-except + resources.append((resource_key, e)) + + LOGGER.info("GetConfig() -> Results: %s", resources) return resources @@ -480,6 +519,8 @@ class P4Driver(_Driver): """ results = [] + LOGGER.info("SetConfig -> Resources {}".format(resources)) + for i, resource in enumerate(resources): str_resource_name = f"resources[#{i}]" resource_key = "" @@ -499,11 +540,15 @@ class P4Driver(_Driver): continue try: - resource_value = json.loads(resource_value) - except Exception: # pylint: disable=broad-except - pass + # Rules are JSON-based, endpoints are not + if "endpoint" not in resource_key: + resource_value = json.loads(resource_value) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception("Exception validating resource value {}".format(resource_value)) + results.append(e) + continue - LOGGER.debug( + LOGGER.info( "SetConfig() -> Key: %s - Value: %s", resource_key, resource_value) @@ -512,13 +557,22 @@ class P4Driver(_Driver): # to be inserted already exists, thus simply needs an update. operation = WriteOperation.insert + # Dataplane and cache rule insertion process try: - self.__apply_operation(resource_key, resource_value, operation) - results.append(True) - except Exception as ex: # pylint: disable=broad-except - results.append(ex) + r2, r3 = False, True + r1 = self.__cache_rule_insert(resource_key, resource_value, operation) + # Cache insertion succeeded, proceed to dataplane + if r1: + r2 = self.__apply_operation(resource_key, resource_value, operation) + # Dataplane insertion did not succeed --> Revert caching + if not r2 and r1: + r3 = self.__cache_rule_remove(resource_key) + results.append(r1 & r2 & r3) + except Exception as e: # pylint: disable=broad-except + results.append(e) + continue - print(results) + LOGGER.info("SetConfig() -> Results: {}".format(results)) return results @@ -552,21 +606,31 @@ class P4Driver(_Driver): try: resource_value = json.loads(resource_value) - except Exception: # pylint: disable=broad-except - pass + except Exception as e: # pylint: disable=broad-except + results.append(e) + continue - LOGGER.debug("DeleteConfig() -> Key: %s - Value: %s", + LOGGER.info("DeleteConfig() -> Key: %s - Value: %s", resource_key, resource_value) operation = WriteOperation.delete + # Dataplane and cache rule removal process try: - self.__apply_operation(resource_key, resource_value, operation) - results.append(True) - except Exception as ex: # pylint: disable=broad-except - results.append(ex) + r2, r3 = False, True + r1 = self.__cache_rule_remove(resource_key) + # Cache removal succeeded, proceed to dataplane + if r1: + r2 = self.__apply_operation(resource_key, resource_value, operation) + # Dataplane removal did not succeed --> Revert caching + if not r2 and r1: + r3 = self.__cache_rule_insert(resource_key, resource_value, WriteOperation.insert) + results.append(r1 & r2 & r3) + except Exception as e: # pylint: disable=broad-except + results.append(e) + continue - print(results) + LOGGER.info("DeleteConfig() -> Results: {}".format(results)) return results @@ -583,35 +647,85 @@ class P4Driver(_Driver): """ # Apply settings to the various tables - if KEY_TABLE == resource_key: + if KEY_TABLE in resource_key: self.__manager.table_entry_operation_from_json( resource_value, operation) - elif KEY_COUNTER == resource_key: + elif KEY_COUNTER in resource_key: self.__manager.counter_entry_operation_from_json( resource_value, operation) - elif KEY_DIR_COUNTER == resource_key: + elif KEY_DIR_COUNTER in resource_key: self.__manager.direct_counter_entry_operation_from_json( resource_value, operation) - elif KEY_METER == resource_key: + elif KEY_METER in resource_key: self.__manager.meter_entry_operation_from_json( resource_value, operation) - elif KEY_DIR_METER == resource_key: + elif KEY_DIR_METER in resource_key: self.__manager.direct_meter_entry_operation_from_json( resource_value, operation) - elif KEY_ACTION_PROFILE == resource_key: + elif KEY_ACTION_PROFILE in resource_key: self.__manager.action_prof_member_entry_operation_from_json( resource_value, operation) self.__manager.action_prof_group_entry_operation_from_json( resource_value, operation) - elif KEY_CTL_PKT_METADATA == resource_key: + elif KEY_CLONE_SESSION in resource_key: + self.__manager.clone_session_entry_operation_from_json( + resource_value, operation) + elif KEY_CTL_PKT_METADATA in resource_key: msg = f"{resource_key.capitalize()} is not a " \ f"configurable resource" raise Exception(msg) + elif KEY_DIGEST in resource_key: + msg = f"{resource_key.capitalize()} is not a " \ + f"configurable resource" + raise Exception(msg) + elif KEY_ENDPOINT in resource_key: + self.__endpoints.append((resource_key, resource_value)) else: msg = f"{operation} on invalid key {resource_key}" LOGGER.error(msg) raise Exception(msg) - LOGGER.debug("%s operation: %s", resource_key.capitalize(), operation) + return True + + def __cache_rule_insert(self, resource_key, resource_value, operation): + """ + Insert a new rule into the rule cache or update an existing one. + + :param resource_key: P4 resource key + :param resource_value: P4 resource value in JSON format + :param operation: write operation (i.e., insert, update) to apply + :return: True if new rule is inserted or existing is updated, otherwise False + """ + if (resource_key in self.__rules.keys()) and (operation == WriteOperation.insert): + LOGGER.error("Attempting to insert an existing rule key: {}".format(resource_key)) + return False + elif (resource_key not in self.__rules.keys()) and (operation == WriteOperation.update): + LOGGER.error("Attempting to update a non-existing rule key: {}".format(resource_key)) + return False + elif (resource_key in self.__rules.keys()) and (operation == WriteOperation.update): + LOGGER.warning("Updating an existing rule key: {}".format(resource_key)) + self.__rules[resource_key] = resource_value + return True + + def __cache_rule_remove(self, resource_key): + """ + Remove an existing rule from the rule cache. + :param resource_key: P4 resource key + :return: True if existing rule is removed, otherwise False + """ + if resource_key not in self.__rules.keys(): + LOGGER.error("Attempting to remove a non-existing rule key: {}".format(resource_key)) + return False + self.__rules.pop(resource_key) return True + + def __rules_into_resources(self): + """ + Transform rules from the driver's rule map into + resources exposed through the SBI API. + """ + resource_list = [] + for rule_key, rule_val in self.__rules.items(): + resource_list.append((rule_key, rule_val)) + return resource_list diff --git a/src/device/service/drivers/p4/p4_manager.py b/src/device/service/drivers/p4/p4_manager.py index f6684412a..210422ed8 100644 --- a/src/device/service/drivers/p4/p4_manager.py +++ b/src/device/service/drivers/p4/p4_manager.py @@ -35,7 +35,8 @@ try: from .p4_common import encode,\ parse_resource_string_from_json, parse_resource_integer_from_json,\ parse_resource_bytes_from_json, parse_match_operations_from_json,\ - parse_action_parameters_from_json, parse_integer_list_from_json + parse_action_parameters_from_json, parse_integer_list_from_json,\ + parse_replicas_from_json from .p4_exception import UserError, InvalidP4InfoError except ImportError: from p4_client import P4RuntimeClient, P4RuntimeException,\ @@ -58,6 +59,7 @@ CONTEXT = Context() CLIENTS = {} # Constant P4 entities +KEYS_P4 = [] KEY_TABLE = "table" KEY_ACTION = "action" KEY_ACTION_PROFILE = "action_profile" @@ -66,6 +68,11 @@ KEY_DIR_COUNTER = "direct_counter" KEY_METER = "meter" KEY_DIR_METER = "direct_meter" KEY_CTL_PKT_METADATA = "controller_packet_metadata" +KEY_DIGEST = "digest" + +# Extra resource keys +KEY_CLONE_SESSION = "clone_session" +KEY_ENDPOINT = "endpoint" def get_context(): @@ -83,19 +90,20 @@ def get_table_type(table): :param table: P4 table :return: P4 table type """ - for m_f in table.match_fields: - if m_f.match_type == p4info_pb2.MatchField.EXACT: - return p4info_pb2.MatchField.EXACT - if m_f.match_type == p4info_pb2.MatchField.LPM: - return p4info_pb2.MatchField.LPM - if m_f.match_type == p4info_pb2.MatchField.TERNARY: - return p4info_pb2.MatchField.TERNARY - if m_f.match_type == p4info_pb2.MatchField.RANGE: - return p4info_pb2.MatchField.RANGE - if m_f.match_type == p4info_pb2.MatchField.OPTIONAL: - return p4info_pb2.MatchField.OPTIONAL - return None + is_ternary = False + for m_f in table.match_fields: + # LPM and range are special forms of ternary + if m_f.match_type in [ + p4info_pb2.MatchField.TERNARY, + p4info_pb2.MatchField.LPM, + p4info_pb2.MatchField.RANGE + ]: + is_ternary = True + + if is_ternary: + return p4info_pb2.MatchField.TERNARY + return p4info_pb2.MatchField.EXACT def match_type_to_str(match_type): """ @@ -132,12 +140,12 @@ class P4Manager: self.__id = device_id self.__ip_address = ip_address self.__port = int(port) - self.__endpoint = f"{self.__ip_address}:{self.__port}" + self.__grpc_endpoint = f"{self.__ip_address}:{self.__port}" self.key_id = ip_address+str(port) CLIENTS[self.key_id] = P4RuntimeClient( - self.__id, self.__endpoint, election_id, role_name, ssl_options) + self.__id, self.__grpc_endpoint, election_id, role_name, ssl_options) self.__p4info = None - + self.local_client = CLIENTS[self.key_id] # Internal memory for whitebox management @@ -146,14 +154,14 @@ class P4Manager: # | -> P4 entities self.table_entries = {} + self.action_profile_members = {} + self.action_profile_groups = {} self.counter_entries = {} self.direct_counter_entries = {} self.meter_entries = {} self.direct_meter_entries = {} - self.multicast_groups = {} self.clone_session_entries = {} - self.action_profile_members = {} - self.action_profile_groups = {} + self.multicast_groups = {} def start(self, p4bin_path, p4info_path): """ @@ -234,7 +242,7 @@ class P4Manager: self.__id = None self.__ip_address = None self.__port = None - self.__endpoint = None + self.__grpc_endpoint = None self.__clear_state() def __clear_state(self): @@ -244,14 +252,14 @@ class P4Manager: :return: void """ self.table_entries.clear() + self.action_profile_members.clear() + self.action_profile_groups.clear() self.counter_entries.clear() self.direct_counter_entries.clear() self.meter_entries.clear() self.direct_meter_entries.clear() - self.multicast_groups.clear() self.clone_session_entries.clear() - self.action_profile_members.clear() - self.action_profile_groups.clear() + self.multicast_groups.clear() self.p4_objects.clear() def __init_objects(self): @@ -264,7 +272,7 @@ class P4Manager: global KEY_TABLE, KEY_ACTION, KEY_ACTION_PROFILE, \ KEY_COUNTER, KEY_DIR_COUNTER, \ KEY_METER, KEY_DIR_METER, \ - KEY_CTL_PKT_METADATA + KEY_CTL_PKT_METADATA, KEY_DIGEST, KEYS_P4 KEY_TABLE = P4Type.table.name KEY_ACTION = P4Type.action.name @@ -274,12 +282,15 @@ class P4Manager: KEY_METER = P4Type.meter.name KEY_DIR_METER = P4Type.direct_meter.name KEY_CTL_PKT_METADATA = P4Type.controller_packet_metadata.name - assert (k for k in [ + KEY_DIGEST = P4Type.digest.name + + KEYS_P4 = [ KEY_TABLE, KEY_ACTION, KEY_ACTION_PROFILE, KEY_COUNTER, KEY_DIR_COUNTER, KEY_METER, KEY_DIR_METER, - KEY_CTL_PKT_METADATA - ]) + KEY_CTL_PKT_METADATA, KEY_DIGEST + ] + assert (k for k in KEYS_P4) if not self.p4_objects: LOGGER.warning( @@ -292,6 +303,11 @@ class P4Manager: for table in self.p4_objects[KEY_TABLE]: self.table_entries[table.name] = [] + if KEY_ACTION_PROFILE in self.p4_objects: + for act_prof in self.p4_objects[KEY_ACTION_PROFILE]: + self.action_profile_members[act_prof.name] = [] + self.action_profile_groups[act_prof.name] = [] + if KEY_COUNTER in self.p4_objects: for cnt in self.p4_objects[KEY_COUNTER]: self.counter_entries[cnt.name] = [] @@ -308,11 +324,6 @@ class P4Manager: for d_meter in self.p4_objects[KEY_DIR_METER]: self.direct_meter_entries[d_meter.name] = [] - if KEY_ACTION_PROFILE in self.p4_objects: - for act_prof in self.p4_objects[KEY_ACTION_PROFILE]: - self.action_profile_members[act_prof.name] = [] - self.action_profile_groups[act_prof.name] = [] - def __discover_objects(self): """ Discover and store all P4 objects. @@ -509,6 +520,20 @@ class P4Manager: return pkt_meta return None + def get_digest(self, digest_name): + """ + Get a digest object by name. + + :param digest_name: name of a digest object + :return: digest object or None + """ + if KEY_DIGEST not in self.p4_objects: + return None + for dg in self.p4_objects[KEY_DIGEST]: + if dg == digest_name.name: + return digest_name + return None + def get_resource_keys(self): """ Retrieve the available P4 resource keys. @@ -561,15 +586,15 @@ class P4Manager: self.table_entries[table_name] = [] try: - for count, table_entry in enumerate( - TableEntry(self.local_client, table_name)(action=action_name).read()): - LOGGER.debug( - "Table %s - Entry %d\n%s", table_name, count, table_entry) + entries = TableEntry(self.local_client, table_name).read() + assert self.local_client + for table_entry in entries: self.table_entries[table_name].append(table_entry) return self.table_entries[table_name] except P4RuntimeException as ex: - LOGGER.error(ex) - return [] + LOGGER.error("Failed to get table %s entries: %s", + table_name, str(ex)) + return [] def table_entries_to_json(self, table_name): """ @@ -634,10 +659,14 @@ class P4Manager: :return: number of P4 table entries or negative integer upon missing table """ - entries = self.get_table_entries(table_name, action_name) - if entries is None: - return -1 - return len(entries) + count = 0 + try: + entries = TableEntry(self.local_client, table_name).read() + count = sum(1 for _ in entries) + except Exception as e: # pylint: disable=broad-except + LOGGER.error("Failed to read entries of table: %s", table_name) + + return count def count_table_entries_all(self): """ @@ -675,7 +704,7 @@ class P4Manager: metadata = parse_resource_bytes_from_json(json_resource, "metadata") if operation in [WriteOperation.insert, WriteOperation.update]: - LOGGER.debug("Table entry to insert/update: %s", json_resource) + LOGGER.info("Table entry to insert/update: %s", json_resource) return self.insert_table_entry( table_name=table_name, match_map=match_map, @@ -685,7 +714,7 @@ class P4Manager: metadata=metadata if metadata else None ) if operation == WriteOperation.delete: - LOGGER.debug("Table entry to delete: %s", json_resource) + LOGGER.info("Table entry to delete: %s", json_resource) return self.delete_table_entry( table_name=table_name, match_map=match_map, @@ -700,7 +729,7 @@ class P4Manager: cnt_pkt=-1, cnt_byte=-1): """ Insert an entry into an exact match table. - + :param table_name: P4 table name :param match_map: Map of match operations :param action_name: Action name @@ -712,45 +741,45 @@ class P4Manager: """ assert match_map, "Table entry without match operations is not accepted" assert action_name, "Table entry without action is not accepted" - + table_entry = TableEntry(self.local_client, table_name)(action=action_name) - + for match_k, match_v in match_map.items(): table_entry.match[match_k] = match_v - + for action_k, action_v in action_params.items(): table_entry.action[action_k] = action_v - + if metadata: table_entry.metadata = metadata - + if cnt_pkt > 0: table_entry.counter_data.packet_count = cnt_pkt - + if cnt_byte > 0: table_entry.counter_data.byte_count = cnt_byte - + ex_msg = "" try: table_entry.insert() LOGGER.info("Inserted exact table entry: %s", table_entry) except (P4RuntimeException, P4RuntimeWriteException) as ex: - raise P4RuntimeException from ex - + ex_msg = str(ex) + LOGGER.warning(ex) + # Table entry exists, needs to be modified if "ALREADY_EXISTS" in ex_msg: table_entry.modify() LOGGER.info("Updated exact table entry: %s", table_entry) - + return table_entry - - + def insert_table_entry_ternary(self, table_name, match_map, action_name, action_params, metadata, priority, cnt_pkt=-1, cnt_byte=-1): """ Insert an entry into a ternary match table. - + :param table_name: P4 table name :param match_map: Map of match operations :param action_name: Action name @@ -763,47 +792,47 @@ class P4Manager: """ assert match_map, "Table entry without match operations is not accepted" assert action_name, "Table entry without action is not accepted" - + table_entry = TableEntry(self.local_client, table_name)(action=action_name) - + for match_k, match_v in match_map.items(): table_entry.match[match_k] = match_v - + for action_k, action_v in action_params.items(): table_entry.action[action_k] = action_v - + table_entry.priority = priority - + if metadata: table_entry.metadata = metadata - + if cnt_pkt > 0: table_entry.counter_data.packet_count = cnt_pkt - + if cnt_byte > 0: table_entry.counter_data.byte_count = cnt_byte - + ex_msg = "" try: table_entry.insert() LOGGER.info("Inserted ternary table entry: %s", table_entry) except (P4RuntimeException, P4RuntimeWriteException) as ex: - raise P4RuntimeException from ex - + ex_msg = str(ex) + LOGGER.error(ex) + # Table entry exists, needs to be modified if "ALREADY_EXISTS" in ex_msg: table_entry.modify() LOGGER.info("Updated ternary table entry: %s", table_entry) - + return table_entry - - + def insert_table_entry_range(self, table_name, match_map, action_name, action_params, metadata, priority, cnt_pkt=-1, cnt_byte=-1): # pylint: disable=unused-argument """ Insert an entry into a range match table. - + :param table_name: P4 table name :param match_map: Map of match operations :param action_name: Action name @@ -816,17 +845,16 @@ class P4Manager: """ assert match_map, "Table entry without match operations is not accepted" assert action_name, "Table entry without action is not accepted" - + raise NotImplementedError( "Range-based table insertion not implemented yet") - - + def insert_table_entry_optional(self, table_name, match_map, action_name, action_params, metadata, priority, cnt_pkt=-1, cnt_byte=-1): # pylint: disable=unused-argument """ Insert an entry into an optional match table. - + :param table_name: P4 table name :param match_map: Map of match operations :param action_name: Action name @@ -839,7 +867,7 @@ class P4Manager: """ assert match_map, "Table entry without match operations is not accepted" assert action_name, "Table entry without action is not accepted" - + raise NotImplementedError( "Optional-based table insertion not implemented yet") @@ -869,32 +897,36 @@ class P4Manager: assert table, \ "P4 pipeline does not implement table " + table_name - if not get_table_type(table): + table_type = get_table_type(table) + + if not table_type: msg = f"Table {table_name} is undefined, cannot insert entry" LOGGER.error(msg) raise UserError(msg) + LOGGER.debug("Table {}: {}".format(table_name, match_type_to_str(table_type))) + # Exact match is supported - if get_table_type(table) == p4info_pb2.MatchField.EXACT: + if table_type == p4info_pb2.MatchField.EXACT: return self.insert_table_entry_exact( table_name, match_map, action_name, action_params, metadata, cnt_pkt, cnt_byte) # Ternary and LPM matches are supported - if get_table_type(table) in \ + if table_type in \ [p4info_pb2.MatchField.TERNARY, p4info_pb2.MatchField.LPM]: return self.insert_table_entry_ternary( table_name, match_map, action_name, action_params, metadata, priority, cnt_pkt, cnt_byte) # TODO: Cover RANGE match # pylint: disable=W0511 - if get_table_type(table) == p4info_pb2.MatchField.RANGE: + if table_type == p4info_pb2.MatchField.RANGE: return self.insert_table_entry_range( table_name, match_map, action_name, action_params, metadata, priority, cnt_pkt, cnt_byte) # TODO: Cover OPTIONAL match # pylint: disable=W0511 - if get_table_type(table) == p4info_pb2.MatchField.OPTIONAL: + if table_type == p4info_pb2.MatchField.OPTIONAL: return self.insert_table_entry_optional( table_name, match_map, action_name, action_params, metadata, priority, cnt_pkt, cnt_byte) @@ -917,7 +949,9 @@ class P4Manager: assert table, \ "P4 pipeline does not implement table " + table_name - if not get_table_type(table): + table_type = get_table_type(table) + + if not table_type: msg = f"Table {table_name} is undefined, cannot delete entry" LOGGER.error(msg) raise UserError(msg) @@ -930,7 +964,7 @@ class P4Manager: for action_k, action_v in action_params.items(): table_entry.action[action_k] = action_v - if get_table_type(table) in \ + if table_type in \ [p4info_pb2.MatchField.TERNARY, p4info_pb2.MatchField.LPM]: if priority == 0: msg = f"Table {table_name} is ternary, priority must be != 0" @@ -938,15 +972,25 @@ class P4Manager: raise UserError(msg) # TODO: Ensure correctness of RANGE & OPTIONAL # pylint: disable=W0511 - if get_table_type(table) in \ + if table_type in \ [p4info_pb2.MatchField.RANGE, p4info_pb2.MatchField.OPTIONAL]: raise NotImplementedError( "Range and optional-based table deletion not implemented yet") table_entry.priority = priority - table_entry.delete() - LOGGER.info("Deleted entry %s from table: %s", table_entry, table_name) + ex_msg = "" + try: + table_entry.delete() + LOGGER.info("Deleted entry %s from table: %s", table_entry, table_name) + except (P4RuntimeException, P4RuntimeWriteException) as ex: + ex_msg = str(ex) + LOGGER.warning(ex) + + # Table entry exists, needs to be modified + if "NOT_FOUND" in ex_msg: + # TODO: No way to discriminate between a modified entry and an actual table miss + LOGGER.warning("Table entry was initially modified, thus cannot be removed: %s", table_entry) return table_entry @@ -1172,7 +1216,8 @@ class P4Manager: self.counter_entries[cnt_name].append(cnt_entry) return self.counter_entries[cnt_name] except P4RuntimeException as ex: - LOGGER.error(ex) + LOGGER.error("Failed to get counter %s entries: %s", + cnt_name, str(ex)) return [] def counter_entries_to_json(self, cnt_name): @@ -1620,7 +1665,8 @@ class P4Manager: self.meter_entries[meter_name].append(meter_entry) return self.meter_entries[meter_name] except P4RuntimeException as ex: - LOGGER.error(ex) + LOGGER.error("Failed to get meter %s entries: %s", + meter_name, str(ex)) return [] def meter_entries_to_json(self, meter_name): @@ -1852,7 +1898,8 @@ class P4Manager: self.direct_meter_entries[d_meter_name].append(d_meter_entry) return self.direct_meter_entries[d_meter_name] except P4RuntimeException as ex: - LOGGER.error(ex) + LOGGER.error("Failed to get direct meter %s entries: %s", + d_meter_name, str(ex)) return [] def direct_meter_entries_to_json(self, d_meter_name): @@ -2094,7 +2141,8 @@ class P4Manager: self.action_profile_members[ap_name].append(ap_entry) return self.action_profile_members[ap_name] except P4RuntimeException as ex: - LOGGER.error(ex) + LOGGER.error("Failed to get action profile member %s entries: %s", + ap_name, str(ex)) return [] def action_prof_member_entries_to_json(self, ap_name): @@ -2357,7 +2405,8 @@ class P4Manager: self.action_profile_groups[ap_name].append(ap_entry) return self.action_profile_groups[ap_name] except P4RuntimeException as ex: - LOGGER.error(ex) + LOGGER.error("Failed to get action profile group %s entries: %s", + ap_name, str(ex)) return [] def count_action_prof_group_entries(self, ap_name): @@ -2880,14 +2929,13 @@ class P4Manager: json_resource, "session-id") if operation in [WriteOperation.insert, WriteOperation.update]: - ports = parse_integer_list_from_json( - json_resource, "ports", "port") + replicas = parse_replicas_from_json(json_resource) LOGGER.debug( "Clone session entry to insert/update: %s", json_resource) return self.insert_clone_session_entry( session_id=session_id, - ports=ports + replicas=replicas ) if operation == WriteOperation.delete: LOGGER.debug( @@ -2897,22 +2945,24 @@ class P4Manager: ) return None - def insert_clone_session_entry(self, session_id, ports): + def insert_clone_session_entry(self, session_id, replicas): """ Insert a new clone session. :param session_id: id of a clone session - :param ports: list of egress ports to clone session + :param replicas: list of egress ports to clone session :return: inserted clone session """ assert session_id > 0, \ "Clone session " + session_id + " must be > 0" - assert ports, \ - "No clone session ports are provided" + assert replicas, \ + "No clone session replicas are provided" + assert isinstance(replicas, dict), \ + "Clone session replicas must be a dictionary" session = CloneSessionEntry(self.local_client, session_id) - for p in ports: - session.add(p, 1) + for eg_port,instance in replicas.items(): + session.add(eg_port, instance) ex_msg = "" try: @@ -2943,12 +2993,15 @@ class P4Manager: "Clone session " + session_id + " must be > 0" session = CloneSessionEntry(self.local_client, session_id) - session.delete() + + try: + session.delete() + LOGGER.info("Deleted clone session %d", session_id) + except (P4RuntimeException, P4RuntimeWriteException) as ex: + LOGGER.error(ex) if session_id in self.clone_session_entries: del self.clone_session_entries[session_id] - LOGGER.info( - "Deleted clone session %d", session_id) return session @@ -3786,6 +3839,7 @@ class _P4EntityBase(_EntityBase): def __init__(self, p4_client, p4_type, entity_type, p4runtime_cls, name=None, modify_only=False): super().__init__(p4_client, entity_type, p4runtime_cls, modify_only) + assert self.local_client, "No local P4 client instance" self._p4_type = p4_type if name is None: raise UserError( @@ -3815,7 +3869,7 @@ class ActionProfileMember(_P4EntityBase): """ def __init__(self, p4_client, action_profile_name=None): - super().__init__( p4_client, + super().__init__(p4_client, P4Type.action_profile, P4RuntimeEntity.action_profile_member, p4runtime_pb2.ActionProfileMember, action_profile_name) self.member_id = 0 @@ -3981,7 +4035,7 @@ class ActionProfileGroup(_P4EntityBase): """ def __init__(self, p4_client, action_profile_name=None): - super().__init__( p4_client, + super().__init__(p4_client, P4Type.action_profile, P4RuntimeEntity.action_profile_group, p4runtime_pb2.ActionProfileGroup, action_profile_name) self.group_id = 0 @@ -5055,7 +5109,7 @@ class CounterEntry(_CounterEntryBase): """ def __init__(self, p4_client, counter_name=None): - super().__init__( p4_client, + super().__init__(p4_client, P4Type.counter, P4RuntimeEntity.counter_entry, p4runtime_pb2.CounterEntry, counter_name, modify_only=True) @@ -5115,11 +5169,11 @@ To write to the counter, use .modify class DirectCounterEntry(_CounterEntryBase): """ Direct P4 counter entry. - """ + """ local_client = None def __init__(self, p4_client, direct_counter_name=None): - super().__init__( p4_client, + super().__init__(p4_client, P4Type.direct_counter, P4RuntimeEntity.direct_counter_entry, p4runtime_pb2.DirectCounterEntry, direct_counter_name, modify_only=True) @@ -5213,7 +5267,7 @@ class _MeterEntryBase(_P4EntityBase): """ def __init__(self, p4_client, *args, **kwargs): - super().__init__(*args, **kwargs) + super().__init__(p4_client, *args, **kwargs) self._meter_type = self._info.spec.unit self.index = -1 self.cir = -1 @@ -5910,7 +5964,7 @@ class IdleTimeoutNotification(): """ P4 idle timeout notification. """ - + local_client = None def __init__(self, p4_client): -- GitLab From 74fb99ac904d509477777ffe0b2e3e65ace09e0a Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 3 Dec 2024 11:44:49 +0100 Subject: [PATCH 055/463] feat: hierarchial L3VPN service creation with emulated devices added - http login deactivated temporary from l3vpn NBI - PE and CE ip addresses swapped temporary in L3VPN NBI handler. --- .../database/models/enums/DeviceDriver.py | 1 + src/device/service/drivers/emulated/Tools.py | 20 ++++++++ .../drivers/ietf_l3vpn/TfsApiClient.py | 25 +++++----- .../service/drivers/ietf_l3vpn/Tools.py | 46 +++++++++++-------- .../service/drivers/ietf_l3vpn/driver.py | 27 +++++------ src/device/tests/test_unitary_ietf_l3vpn.py | 4 +- .../nbi_plugins/ietf_l3vpn/Handlers.py | 17 +++++-- .../nbi_plugins/ietf_l3vpn/L3VPN_Service.py | 4 +- .../nbi_plugins/ietf_l3vpn/L3VPN_Services.py | 4 +- .../L3NM_IETFL3VPN_ServiceHandler.py | 42 +++++++++++------ 10 files changed, 118 insertions(+), 72 deletions(-) diff --git a/src/context/service/database/models/enums/DeviceDriver.py b/src/context/service/database/models/enums/DeviceDriver.py index cf900ed6d..ca00f6e80 100644 --- a/src/context/service/database/models/enums/DeviceDriver.py +++ b/src/context/service/database/models/enums/DeviceDriver.py @@ -35,6 +35,7 @@ class ORM_DeviceDriverEnum(enum.Enum): IETF_ACTN = DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN OC = DeviceDriverEnum.DEVICEDRIVER_OC QKD = DeviceDriverEnum.DEVICEDRIVER_QKD + IETF_L3VPN = DeviceDriverEnum.DEVICEDRIVER_IETF_L3VPN grpc_to_enum__device_driver = functools.partial( grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum) diff --git a/src/device/service/drivers/emulated/Tools.py b/src/device/service/drivers/emulated/Tools.py index cdd84fccf..f452712bb 100644 --- a/src/device/service/drivers/emulated/Tools.py +++ b/src/device/service/drivers/emulated/Tools.py @@ -82,6 +82,26 @@ def compose_resource_endpoint(endpoint_data : Dict[str, Any]) -> Optional[Tuple[ if 'location' in endpoint_data: endpoint_resource_value['location'] = endpoint_data['location'] + + if "site_location" in endpoint_data: + endpoint_resource_value["site_location"] = endpoint_data["site_location"] + + if "ce-ip" in endpoint_data: + endpoint_resource_value["ce-ip"] = endpoint_data["ce-ip"] + + if "address_ip" in endpoint_data: + endpoint_resource_value["address_ip"] = endpoint_data["address_ip"] + + if "address_prefix" in endpoint_data: + endpoint_resource_value["address_prefix"] = endpoint_data["address_prefix"] + + if "mtu" in endpoint_data: + endpoint_resource_value["mtu"] = endpoint_data["mtu"] + + if "ipv4_lan_prefixes" in endpoint_data: + endpoint_resource_value["ipv4_lan_prefixes"] = endpoint_data[ + "ipv4_lan_prefixes" + ] return endpoint_resource_key, endpoint_resource_value except: # pylint: disable=bare-except diff --git a/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py index 661907a73..f635f1a75 100644 --- a/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py +++ b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py @@ -69,12 +69,13 @@ class TfsApiClient: ) -> None: self._devices_url = GET_DEVICES_URL.format(scheme, address, port) self._links_url = GET_LINKS_URL.format(scheme, address, port) - self._l3vph_url = L3VPN_URL.format(scheme, address, port) - self._auth = ( - HTTPBasicAuth(username, password) - if username is not None and password is not None - else None - ) + self._l3vpn_url = L3VPN_URL.format(scheme, address, port) + self._auth = None + # ( + # HTTPBasicAuth(username, password) + # if username is not None and password is not None + # else None + # ) def get_devices_endpoints( self, import_topology: ImportTopologyEnum = ImportTopologyEnum.DEVICES @@ -84,9 +85,7 @@ class TfsApiClient: "[get_devices_endpoints] import_topology={:s}".format(str(import_topology)) ) - reply = requests.get( - self._devices_url, timeout=TIMEOUT, verify=False, auth=self._auth - ) + reply = requests.get(self._devices_url, timeout=TIMEOUT, auth=self._auth) if reply.status_code not in HTTP_OK_CODES: msg = MSG_ERROR.format( str(self._devices_url), str(reply.status_code), str(reply) @@ -131,9 +130,7 @@ class TfsApiClient: LOGGER.debug("[get_devices_endpoints] devices only; returning") return result - reply = requests.get( - self._links_url, timeout=TIMEOUT, verify=False, auth=self._auth - ) + reply = requests.get(self._links_url, timeout=TIMEOUT, auth=self._auth) if reply.status_code not in HTTP_OK_CODES: msg = MSG_ERROR.format( str(self._links_url), str(reply.status_code), str(reply) @@ -163,12 +160,12 @@ class TfsApiClient: def create_connectivity_service(self, l3vpn_data: dict) -> None: try: - requests.post(self._l3vph_url, json=l3vpn_data, auth=self._auth) + requests.post(self._l3vpn_url, json=l3vpn_data) except requests.exceptions.ConnectionError: raise Exception("faild to send post request to TFS L3VPN NBI") def delete_connectivity_service(self, service_uuid: str) -> None: - url = self._l3vph_url + f"/vpn-service={service_uuid}" + url = self._l3vpn_url + f"/vpn-service={service_uuid}" try: requests.delete(url, auth=self._auth) except requests.exceptions.ConnectionError: diff --git a/src/device/service/drivers/ietf_l3vpn/Tools.py b/src/device/service/drivers/ietf_l3vpn/Tools.py index bf9c40732..eeb0d87f1 100644 --- a/src/device/service/drivers/ietf_l3vpn/Tools.py +++ b/src/device/service/drivers/ietf_l3vpn/Tools.py @@ -61,9 +61,9 @@ def get_all_active_connectivity_services(wim_url: str, auth): def get_connectivity_service(wim_url, auth, service_uuid): try: LOGGER.info("Sending get connectivity service") - servicepoint = f"{wim_url}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-service={service_uuid}" + servicepoint = f"{wim_url}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={service_uuid}" - response = requests.get(servicepoint, auth=auth) + response = requests.get(servicepoint) if response.status_code != requests.codes.ok: raise Exception( @@ -85,9 +85,9 @@ def create_l3vpn_datamodel(service_uuid, resource_value: dict) -> dict: ) src_site_id: str = resource_value.get("src_site_id", f"site_{src_site_location}") src_management_type: str = resource_value.get( - "src_management_type", "ietf-l3vpn-svc:customer-managed" + "src_management_type", "ietf-l3vpn-svc:provider-managed" ) - if src_management_type != "ietf-l3vpn-svc:customer-managed": + if src_management_type != "ietf-l3vpn-svc:provider-managed": raise Exception("management type %s not supported", src_management_type) src_role: str = "ietf-l3vpn-svc:hub-role" src_ce_address: str = resource_value["src_ce_address"] @@ -96,12 +96,8 @@ def create_l3vpn_datamodel(service_uuid, resource_value: dict) -> dict: src_mtu: int = resource_value["src_mtu"] src_input_bw: int = resource_value.get("src_input_bw", 1000000000) src_output_bw: int = resource_value.get("src_input_bw", 1000000000) - src_qos_profile_id: str = resource_value.get( - "src_qos_profile_id", "src_qos_profile" - ) - src_qos_profile_direction: str = ( - resource_value.get("src_qos_profile_direction", "ietf-l3vpn-svc:both"), - ) + src_qos_profile_id = "qos-realtime" + src_qos_profile_direction = "ietf-l3vpn-svc:both" src_qos_profile_latency: int = resource_value.get("src_qos_profile_latency", 10) src_qos_profile_bw_guarantee: int = resource_value.get( "src_qos_profile_bw_guarantee", 100 @@ -115,9 +111,9 @@ def create_l3vpn_datamodel(service_uuid, resource_value: dict) -> dict: ] dst_site_id: str = resource_value.get("dst_site_id", f"site_{dst_site_location}") dst_management_type: str = resource_value.get( - "dst_management_type", "ietf-l3vpn-svc:customer-managed" + "dst_management_type", "ietf-l3vpn-svc:provider-managed" ) - if dst_management_type != "ietf-l3vpn-svc:customer-managed": + if dst_management_type != "ietf-l3vpn-svc:provider-managed": raise Exception("management type %s not supported", dst_management_type) dst_role: str = "ietf-l3vpn-svc:spoke-role" dst_ce_address: str = resource_value["dst_ce_address"] @@ -126,12 +122,8 @@ def create_l3vpn_datamodel(service_uuid, resource_value: dict) -> dict: dst_mtu: int = resource_value["dst_mtu"] dst_input_bw: int = resource_value.get("dst_input_bw", 1000000000) dst_output_bw: int = resource_value.get("dst_output_bw", 1000000000) - dst_qos_profile_id: str = resource_value.get( - "dst_qos_profile_id", "dst_qos_profile" - ) - dst_qos_profile_direction: str = ( - resource_value.get("dst_qos_profile_direction", "ietf-l3vpn-svc:both"), - ) + dst_qos_profile_id = "qos-realtime" + dst_qos_profile_direction = "ietf-l3vpn-svc:both" dst_qos_profile_latency: int = resource_value.get("dst_qos_profile_latency", 10) dst_qos_profile_bw_guarantee: int = resource_value.get( "dst_qos_profile_bw_guarantee", 100 @@ -333,6 +325,20 @@ def compose_resource_endpoint( # Check endpoint optional string fields process_optional_string_field(endpoint_data, "name", endpoint_resource_value) + process_optional_string_field( + endpoint_data, "site_location", endpoint_resource_value + ) + process_optional_string_field(endpoint_data, "ce-ip", endpoint_resource_value) + process_optional_string_field( + endpoint_data, "address_ip", endpoint_resource_value + ) + process_optional_string_field( + endpoint_data, "address_prefix", endpoint_resource_value + ) + process_optional_string_field(endpoint_data, "mtu", endpoint_resource_value) + process_optional_string_field( + endpoint_data, "ipv4_lan_prefixes", endpoint_resource_value + ) process_optional_string_field(endpoint_data, "type", endpoint_resource_value) process_optional_string_field( endpoint_data, "context_uuid", endpoint_resource_value @@ -382,8 +388,8 @@ def compose_resource_endpoint( if len(sample_types) > 0: endpoint_resource_value["sample_types"] = sample_types - if "location" in endpoint_data: - endpoint_resource_value["location"] = endpoint_data["location"] + if "site_location" in endpoint_data: + endpoint_resource_value["site_location"] = endpoint_data["site_location"] if "ce-ip" in endpoint_data: endpoint_resource_value["ce-ip"] = endpoint_data["ce-ip"] diff --git a/src/device/service/drivers/ietf_l3vpn/driver.py b/src/device/service/drivers/ietf_l3vpn/driver.py index e81736d43..25d8f9319 100644 --- a/src/device/service/drivers/ietf_l3vpn/driver.py +++ b/src/device/service/drivers/ietf_l3vpn/driver.py @@ -63,8 +63,8 @@ METRICS_POOL = MetricsPool("Device", "Driver", labels={"driver": DRIVER_NAME}) class IetfL3VpnDriver(_Driver): - def __init__(self, address: str, port: int, **settings) -> None: - super().__init__(DRIVER_NAME, address, port, **settings) + def __init__(self, address: str, port: str, **settings) -> None: + super().__init__(DRIVER_NAME, address, int(port), **settings) self.__lock = threading.Lock() self.__started = threading.Event() self.__terminate = threading.Event() @@ -79,11 +79,12 @@ class IetfL3VpnDriver(_Driver): username=username, password=password, ) - self.__auth = ( - HTTPBasicAuth(username, password) - if username is not None and password is not None - else None - ) + self.__auth = None + # ( + # HTTPBasicAuth(username, password) + # if username is not None and password is not None + # else None + # ) self.__tfs_nbi_root = "{:s}://{:s}:{:d}".format( scheme, self.address, int(self.port) ) @@ -146,18 +147,12 @@ class IetfL3VpnDriver(_Driver): if self.__started.is_set(): return True try: - requests.get( - url, timeout=self.__timeout, verify=False, auth=self.__auth - ) + requests.get(url, timeout=self.__timeout, auth=self.__auth) except requests.exceptions.Timeout: - LOGGER.exception( - "Timeout connecting {:s}".format(str(self.__tapi_root)) - ) + LOGGER.exception("Timeout connecting {:s}".format(url)) return False except Exception: # pylint: disable=broad-except - LOGGER.exception( - "Exception connecting {:s}".format(str(self.__tapi_root)) - ) + LOGGER.exception("Exception connecting {:s}".format(url)) return False else: self.__started.set() diff --git a/src/device/tests/test_unitary_ietf_l3vpn.py b/src/device/tests/test_unitary_ietf_l3vpn.py index 8683c3454..728ca6913 100644 --- a/src/device/tests/test_unitary_ietf_l3vpn.py +++ b/src/device/tests/test_unitary_ietf_l3vpn.py @@ -165,11 +165,11 @@ def test_SetConfig(monkeypatch): assert result_SetConfig == [("/services/service[vpn_A]", True)] assert len(get_request_data) == 1 assert get_request_data[0][0] == ( - "http://1.2.3.4:0/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-service=vpn_A", + "http://1.2.3.4:0/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=vpn_A", ) assert len(post_request_data) == 1 assert post_request_data[0][0] == ( - "http://1.2.3.4:0/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services", + "http://1.2.3.4:0/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-services", ) assert post_request_data[0][1]["json"] == { "ietf-l3vpn-svc:l3vpn-svc": { diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py index f7329cb35..3a1395365 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py @@ -15,7 +15,7 @@ import logging, netaddr from typing import Dict, List, Optional, Tuple from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import Service, ServiceStatusEnum, ServiceTypeEnum +from common.proto.context_pb2 import Service, ServiceStatusEnum, ServiceTypeEnum, Empty from common.tools.context_queries.Service import get_service_by_uuid from common.tools.grpc.ConfigRules import update_config_rule_custom from common.tools.grpc.Constraints import ( @@ -97,8 +97,11 @@ def update_service_endpoint( endpoint_settings_key = ENDPOINT_SETTINGS_KEY.format(device_uuid, endpoint_uuid) field_updates = {} if vlan_tag is not None: field_updates['vlan_tag' ] = (vlan_tag, True) - if ipv4_address is not None: field_updates['ip_address' ] = (ipv4_address, True) - if neighbor_ipv4_address is not None: field_updates['neighbor_address'] = (neighbor_ipv4_address, True) + # if ipv4_address is not None: field_updates['ip_address' ] = (ipv4_address, True) + # if neighbor_ipv4_address is not None: field_updates['neighbor_address'] = (neighbor_ipv4_address, True) + #! neighbor_ipv4_address and ipv4_address' field swapped to manage the PE. Fix it later + if ipv4_address is not None: field_updates['ip_address' ] = (neighbor_ipv4_address, True) + if neighbor_ipv4_address is not None: field_updates['neighbor_address'] = (ipv4_address, True) if ipv4_prefix_length is not None: field_updates['prefix_length' ] = (ipv4_prefix_length, True) update_config_rule_custom(config_rules, endpoint_settings_key, field_updates) @@ -113,6 +116,8 @@ def update_service_endpoint( def process_site_network_access( site_id : str, network_access : Dict, site_static_routing : Dict[Tuple[str, str], str], errors : List[Dict] ) -> None: + # client = ContextClient() + # devices = client.ListDevices(Empty()).devices endpoint_uuid = network_access['site-network-access-id'] if network_access['site-network-access-type'] != 'ietf-l3vpn-svc:multipoint': @@ -120,6 +125,12 @@ def process_site_network_access( raise NotImplementedError(MSG.format(str(network_access['site-network-access-type']))) device_uuid = network_access['device-reference'] + + # location = network_access['location-reference'] + # for device in devices: + # for cr in device.device_config.config_rules: + # if cr.WhichOneof('config_rule') != 'custom': + # continue service_uuid = network_access['vpn-attachment']['vpn-id'] access_role : str = network_access['vpn-attachment']['site-role'] diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py index a313677c1..245d20861 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py @@ -26,7 +26,7 @@ from ..tools.HttpStatusCodes import HTTP_GATEWAYTIMEOUT, HTTP_NOCONTENT, HTTP_OK LOGGER = logging.getLogger(__name__) class L3VPN_Service(Resource): - @HTTP_AUTH.login_required + # @HTTP_AUTH.login_required def get(self, vpn_id : str): LOGGER.debug('VPN_Id: {:s}'.format(str(vpn_id))) LOGGER.debug('Request: {:s}'.format(str(request))) @@ -52,7 +52,7 @@ class L3VPN_Service(Resource): response.status_code = HTTP_SERVERERROR return response - @HTTP_AUTH.login_required + # @HTTP_AUTH.login_required def delete(self, vpn_id : str): LOGGER.debug('VPN_Id: {:s}'.format(str(vpn_id))) LOGGER.debug('Request: {:s}'.format(str(request))) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.py index 11f2d6dae..dc3bb0df2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.py @@ -26,11 +26,11 @@ from .YangValidator import YangValidator LOGGER = logging.getLogger(__name__) class L3VPN_Services(Resource): - @HTTP_AUTH.login_required + # @HTTP_AUTH.login_required def get(self): return {} - @HTTP_AUTH.login_required + # @HTTP_AUTH.login_required def post(self): if not request.is_json: raise UnsupportedMediaType('JSON payload is required') request_data : Dict = request.json diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py index 7957fe76d..5f18e4657 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py @@ -65,9 +65,16 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): DeviceId(**json_device_id(src_device_uuid)) ) src_endpoint_obj = get_endpoint_matching(src_device_obj, src_endpoint_uuid) - src_endpoint_settings = self.__settings_handler.get_endpoint_settings( - src_device_obj, src_endpoint_obj - ).value + for cr in src_device_obj.device_config.config_rules: + if cr.WhichOneof('config_rule') == 'custom' and cr.custom.resource_key == f'/endpoints/endpoint[{src_endpoint_obj.name}]': + src_endpoint_settings = json.loads(cr.custom.resource_value) + break + # src_endpoint_settings = self.__settings_handler.get_endpoint_settings( + # src_device_obj, src_endpoint_obj + # ).value + + src_controller = self.__task_executor.get_device_controller(src_device_obj) + if src_controller is None: src_controller = src_device_obj dst_device_uuid, dst_endpoint_uuid = get_device_endpoint_uuids( endpoints[-1] @@ -76,12 +83,21 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): DeviceId(**json_device_id(dst_device_uuid)) ) dst_endpoint_obj = get_endpoint_matching(dst_device_obj, dst_endpoint_uuid) - dst_endpoint_settings = self.__settings_handler.get_endpoint_settings( - dst_device_obj, dst_endpoint_obj - ).value - if dst_device_uuid != src_device_uuid: - raise Exception("Different Src-Dst devices not supported by now") + for cr in dst_device_obj.device_config.config_rules: + if cr.WhichOneof('config_rule') == 'custom' and cr.custom.resource_key == f'/endpoints/endpoint[{dst_endpoint_obj.name}]': + dst_endpoint_settings = json.loads(cr.custom.resource_value) + break + # dst_endpoint_settings = self.__settings_handler.get_endpoint_settings( + # dst_device_obj, dst_endpoint_obj + # ).value + dst_controller = self.__task_executor.get_device_controller(dst_device_obj) + if dst_controller is None: dst_controller = dst_device_obj + + 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), @@ -89,7 +105,7 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): "uuid": service_uuid, "src_device_name": src_device_obj.name, "src_endpoint_name": src_endpoint_obj.name, - "src_site_location": src_endpoint_settings["location"], + "src_site_location": src_endpoint_settings["site_location"], "src_ipv4_lan_prefixes": src_endpoint_settings["ipv4_lan_prefixes"], "src_ce_address": src_endpoint_settings["ce-ip"], "src_pe_address": src_endpoint_settings["address_ip"], @@ -97,7 +113,7 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): "src_mtu": src_endpoint_settings["mtu"], "dst_device_name": dst_device_obj.name, "dst_endpoint_name": dst_endpoint_obj.name, - "dst_site_location": dst_endpoint_settings["location"], + "dst_site_location": dst_endpoint_settings["site_location"], "dst_ipv4_lan_prefixes": dst_endpoint_settings["ipv4_lan_prefixes"], "dst_ce_address": dst_endpoint_settings["ce-ip"], "dst_pe_address": dst_endpoint_settings["address_ip"], @@ -105,11 +121,11 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): "dst_mtu": dst_endpoint_settings["mtu"], }, ) - del src_device_obj.device_config.config_rules[:] - src_device_obj.device_config.config_rules.append( + del controller.device_config.config_rules[:] + controller.device_config.config_rules.append( ConfigRule(**json_config_rule) ) - self.__task_executor.configure_device(src_device_obj) + self.__task_executor.configure_device(controller) results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception( -- GitLab From c1febf362df34dac0a01b2744247c267dc552290 Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 3 Dec 2024 11:48:53 +0100 Subject: [PATCH 056/463] feat: L3VPN descriptors added --- src/nbi/tests/data/agg-net-descriptor.json | 628 +++++++++++++++++++++ src/nbi/tests/data/ip-net-descriptor.json | 535 ++++++++++++++++++ 2 files changed, 1163 insertions(+) create mode 100644 src/nbi/tests/data/agg-net-descriptor.json create mode 100644 src/nbi/tests/data/ip-net-descriptor.json diff --git a/src/nbi/tests/data/agg-net-descriptor.json b/src/nbi/tests/data/agg-net-descriptor.json new file mode 100644 index 000000000..bde4db628 --- /dev/null +++ b/src/nbi/tests/data/agg-net-descriptor.json @@ -0,0 +1,628 @@ +{ + "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": "ip-net-controller" + } + }, + "name": "ip-net-controller", + "device_type": "ip-sdn-controller", + "device_operational_status": 1, + "device_drivers": [ + 13 + ], + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "10.10.10.10" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "80" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [], + "scheme": "http", + "username": "admin", + "password": "admin", + "base_url": "/restconf/v2/data", + "timeout": 120, + "verify": false + } + } + } + ] + }, + "device_endpoints": [] + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "name": "172.16.182.25", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "ce-ip": "128.32.33.2", + "address_ip": "128.32.33.254", + "address_prefix": "24", + "site_location": "access", + "mtu": "1500", + "ipv4_lan_prefixes": [ + { + "lan": "128.32.10.0/24", + "lan_tag": "10" + }, + { + "lan": "128.32.20.0/24", + "lan_tag": "20" + } + ] + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "name": "172.16.185.31", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "name": "172.16.185.33", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "name": "172.16.185.32", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "ce-ip": "172.10.33.2", + "address_ip": "172.10.33.254", + "address_prefix": "24", + "site_location": "cloud", + "mtu": "1500", + "ipv4_lan_prefixes": [ + { + "lan": "172.1.101.0/24", + "lan_tag": "101" + } + ] + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + } + ], + "links": [ + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-500" + } + }, + "name": "172.16.182.25-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.33-500" + } + }, + "name": "172.16.185.33-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-501" + } + }, + "name": "172.16.182.25-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.31-501" + } + }, + "name": "172.16.185.31-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.31-500" + } + }, + "name": "172.16.185.31-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-500" + } + }, + "name": "172.16.185.32-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.33-501" + } + }, + "name": "172.16.185.33-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-501" + } + }, + "name": "172.16.185.32-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/src/nbi/tests/data/ip-net-descriptor.json b/src/nbi/tests/data/ip-net-descriptor.json new file mode 100644 index 000000000..dafeeb5bc --- /dev/null +++ b/src/nbi/tests/data/ip-net-descriptor.json @@ -0,0 +1,535 @@ +{ + "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": "172.16.182.25" + } + }, + "name": "172.16.182.25", + "device_type": "emu-packet-router", + "device_operational_status": 1, + "device_drivers": [ + 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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "name": "172.16.185.31", + "device_type": "emu-packet-router", + "device_operational_status": 1, + "device_drivers": [ + 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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "name": "172.16.185.33", + "device_type": "emu-packet-router", + "device_operational_status": 1, + "device_drivers": [ + 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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "name": "172.16.185.32", + "device_type": "emu-packet-router", + "device_operational_status": 1, + "device_drivers": [ + 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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + } + ], + "links": [ + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-500" + } + }, + "name": "172.16.182.25-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.33-500" + } + }, + "name": "172.16.185.33-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-501" + } + }, + "name": "172.16.182.25-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.31-501" + } + }, + "name": "172.16.185.31-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.31-500" + } + }, + "name": "172.16.185.31-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-500" + } + }, + "name": "172.16.185.32-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.33-501" + } + }, + "name": "172.16.185.33-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-501" + } + }, + "name": "172.16.185.32-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + } + ] +} \ No newline at end of file -- GitLab From ee2963cf44875844e8f1dcceaf9eed9721aba394 Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 10 Dec 2024 11:56:55 +0100 Subject: [PATCH 057/463] feat: ietf-slice operations draft added to NBI to support the CAMARA PoC --- .../ietf_network_slice/NSS_Service.py | 6 +- .../NSS_Service_Match_Criteria.py | 55 + .../ietf_network_slice/NSS_Services.py | 106 +- .../NSS_Services_Connection_Groups.py | 52 + .../ietf_network_slice/NSS_Services_SDPs.py | 51 + .../ietf_network_slice/YangValidator.py | 36 + .../ietf_network_slice/__init__.py | 9 +- .../ietf_network_slice/ietf_slice_handler.py | 239 + .../yang/ietf-ac-common@2023-11-13.yang | 1651 +++++++ .../yang/ietf-ac-svc@2024-08-06.yang | 1252 +++++ .../yang/ietf-ethertypes@2019-03-04.yang | 381 ++ .../yang/ietf-geo-location@2022-02-11.yang | 278 ++ .../yang/ietf-inet-types@2024-10-21.yang | 657 +++ .../yang/ietf-key-chain@2017-06-15.yang | 382 ++ .../yang/ietf-netconf-acm@2018-02-14.yang | 464 ++ .../{ => yang}/ietf-network-slice-service.txt | 0 ...ietf-network-slice-service@2024-08-28.yang | 1375 ++++++ .../yang/ietf-network-slice@2022-03-04.yang | 1130 +++++ .../ietf-network-topology@2018-02-26.yang | 294 ++ .../yang/ietf-network@2018-02-26.yang | 192 + .../yang/ietf-packet-fields@2019-03-04.yang | 576 +++ .../yang/ietf-routing-types@2017-12-04.yang | 771 +++ .../yang/ietf-te-packet-types@2024-10-30.yang | 806 +++ .../yang/ietf-te-types@2024-10-30.yang | 4399 +++++++++++++++++ .../yang/ietf-vpn-common@2021-09-10.yang | 2205 +++++++++ ...st_connection_group_to_network_slice1.json | 66 + ...post_match_criteria_to_sdp1_in_slice1.json | 40 + .../tests/data/slice/post_network_slice1.json | 194 + .../slice/post_sdp_to_network_slice1.json | 61 + src/nbi/tests/test_slice_2.py | 100 + 30 files changed, 17734 insertions(+), 94 deletions(-) create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criteria.py create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Groups.py create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDPs.py create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/YangValidator.py create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ac-common@2023-11-13.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ac-svc@2024-08-06.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ethertypes@2019-03-04.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-geo-location@2022-02-11.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-inet-types@2024-10-21.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-key-chain@2017-06-15.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-netconf-acm@2018-02-14.yang rename src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/{ => yang}/ietf-network-slice-service.txt (100%) create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice-service@2024-08-28.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice@2022-03-04.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-topology@2018-02-26.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network@2018-02-26.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-packet-fields@2019-03-04.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-routing-types@2017-12-04.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-te-packet-types@2024-10-30.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-te-types@2024-10-30.yang create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-vpn-common@2021-09-10.yang create mode 100644 src/nbi/tests/data/slice/post_connection_group_to_network_slice1.json create mode 100644 src/nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice1.json create mode 100644 src/nbi/tests/data/slice/post_network_slice1.json create mode 100644 src/nbi/tests/data/slice/post_sdp_to_network_slice1.json create mode 100644 src/nbi/tests/test_slice_2.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py index e25270d36..0add8fdf0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ from ..tools.HttpStatusCodes import HTTP_GATEWAYTIMEOUT, HTTP_NOCONTENT, HTTP_OK LOGGER = logging.getLogger(__name__) class NSS_Service(Resource): - @HTTP_AUTH.login_required + # @HTTP_AUTH.login_required def get(self, slice_id : str): LOGGER.debug('GET Slice ID: {:s}'.format(str(slice_id))) try: @@ -51,7 +51,7 @@ class NSS_Service(Resource): return response - @HTTP_AUTH.login_required + # @HTTP_AUTH.login_required def delete(self, slice_id : str): LOGGER.debug('DELETE Slice ID: {:s}'.format(str(slice_id))) try: diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criteria.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criteria.py new file mode 100644 index 000000000..1ec8c0636 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criteria.py @@ -0,0 +1,55 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Dict + +from flask import request +from flask.json import jsonify +from flask_restful import Resource +from werkzeug.exceptions import UnsupportedMediaType + +from context.client.ContextClient import ContextClient +from slice.client.SliceClient import SliceClient + +from ..tools.Authentication import HTTP_AUTH +from ..tools.HttpStatusCodes import ( + HTTP_CREATED, +) +from .ietf_slice_handler import IETFSliceHandler + +LOGGER = logging.getLogger(__name__) + + +class NSS_Service_Match_Criteria(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, slice_id: str, sdp_id: str): + if not request.is_json: + raise UnsupportedMediaType("JSON payload is required") + request_data: Dict = request.json + context_client = ContextClient() + slice_request = IETFSliceHandler.create_match_criteria( + request_data, slice_id, sdp_id, context_client + ) + slice_client = SliceClient() + slice_client.UpdateSlice(slice_request) + + response = jsonify({}) + response.status_code = HTTP_CREATED + return response diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py index 11a73141d..7a392eafd 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,112 +11,38 @@ # WITHOUT 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 import request 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 + +from ..tools.HttpStatusCodes import HTTP_CREATED +from .ietf_slice_handler import IETFSliceHandler LOGGER = logging.getLogger(__name__) + class NSS_Services(Resource): - @HTTP_AUTH.login_required - def get(self): + # @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 + # @HTTP_AUTH.login_required def post(self): if not request.is_json: - raise UnsupportedMediaType('JSON payload is required') - request_data = json.dumps(request.json) + raise UnsupportedMediaType("JSON payload is required") + request_data: Dict = request.json + slice_request = IETFSliceHandler.create_slice_service(request_data) + slice_client = SliceClient() + slice_client.CreateSlice(slice_request) + 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/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Groups.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Groups.py new file mode 100644 index 000000000..bee8349ef --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Groups.py @@ -0,0 +1,52 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Dict + +from flask import request +from flask.json import jsonify +from flask_restful import Resource +from werkzeug.exceptions import UnsupportedMediaType + +from context.client.ContextClient import ContextClient + +from ..tools.Authentication import HTTP_AUTH +from ..tools.HttpStatusCodes import HTTP_CREATED +from .ietf_slice_handler import IETFSliceHandler + +LOGGER = logging.getLogger(__name__) + + +class NSS_Service_Connection_Groups(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, slice_id: str): + if not request.is_json: + raise UnsupportedMediaType("JSON payload is required") + request_data: Dict = request.json + + context_client = ContextClient() + slice_request = IETFSliceHandler.create_connection_group( + request_data, slice_id, context_client + ) + _ = context_client.SetSlice(slice_request) + + response = jsonify({}) + response.status_code = HTTP_CREATED + return response diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDPs.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDPs.py new file mode 100644 index 000000000..8a3fb8c42 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDPs.py @@ -0,0 +1,51 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Dict + +from flask import request +from flask.json import jsonify +from flask_restful import Resource +from werkzeug.exceptions import UnsupportedMediaType + +from context.client.ContextClient import ContextClient + +from ..tools.HttpStatusCodes import HTTP_CREATED +from .ietf_slice_handler import IETFSliceHandler + +LOGGER = logging.getLogger(__name__) + + +class NSS_Service_SDPs(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, slice_id: str): + if not request.is_json: + raise UnsupportedMediaType("JSON payload is required") + request_data: Dict = request.json + + context_client = ContextClient() + slice_request = IETFSliceHandler.create_sdp( + request_data, slice_id, context_client + ) + _ = context_client.SetSlice(slice_request) + + response = jsonify({}) + response.status_code = HTTP_CREATED + return response diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/YangValidator.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/YangValidator.py new file mode 100644 index 000000000..77071f7f7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/YangValidator.py @@ -0,0 +1,36 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 libyang, os +from typing import Dict, Optional + +YANG_DIR = os.path.join(os.path.dirname(__file__), 'yang') + +class YangValidator: + def __init__(self, module_name : str) -> None: + self._yang_context = libyang.Context(YANG_DIR) + self._yang_module = self._yang_context.load_module(module_name) + self._yang_module.feature_enable_all() + + def parse_to_dict(self, message : Dict) -> Dict: + dnode : Optional[libyang.DNode] = self._yang_module.parse_data_dict( + message, validate_present=True, validate=True, strict=True + ) + if dnode is None: raise Exception('Unable to parse Message({:s})'.format(str(message))) + message = dnode.print_dict() + dnode.free() + return message + + def destroy(self) -> None: + self._yang_context.destroy() diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py index e900c27e9..9442ac6e9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,6 +19,9 @@ from flask_restful import Resource from nbi.service.rest_server.RestServer import RestServer from .NSS_Services import NSS_Services from .NSS_Service import NSS_Service +from .NSS_Services_SDPs import NSS_Service_SDPs +from .NSS_Services_Connection_Groups import NSS_Service_Connection_Groups +from .NSS_Service_Match_Criteria import NSS_Service_Match_Criteria URL_PREFIX = '/restconf/data/ietf-network-slice-service:ietf-nss' @@ -29,3 +32,7 @@ def _add_resource(rest_server : RestServer, 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=') + _add_resource(rest_server, NSS_Service_SDPs, '/network-slice-services/slice-service=/sdps') + _add_resource(rest_server, NSS_Service_Connection_Groups, '/network-slice-services/slice-service=/connection-groups') + _add_resource(rest_server, NSS_Service_Match_Criteria, '/network-slice-services/slice-service=/sdps/sdp=/service-match-criteria') + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py new file mode 100644 index 000000000..269bfc432 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py @@ -0,0 +1,239 @@ +import json +import logging +import uuid + +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import Constraint, EndPointId, Slice, SliceStatusEnum +from common.tools.context_queries.Slice import get_slice_by_uuid +from common.tools.grpc.ConfigRules import update_config_rule_custom +from common.tools.grpc.Tools import grpc_message_to_json +from context.client import ContextClient + +from .YangValidator import YangValidator + +LOGGER = logging.getLogger(__name__) + + +RESOURCE_KEY = "ietf_data" + + +class IETFSliceHandler: + @staticmethod + def create_slice_service(request_data: dict) -> Slice: + yang_validator = YangValidator("ietf-network-slice-service") + _ = yang_validator.parse_to_dict(request_data) + yang_validator.destroy() + + slice_services = request_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + slice_id = slice_service["id"] + sdps = slice_service["sdps"]["sdp"] + connection_groups = slice_service["connection-groups"]["connection-group"] + if len(sdps) != 2: + raise Exception("Number of SDPs should be 2") + slice_request: Slice = Slice() + slice_request.slice_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + slice_request.slice_id.slice_uuid.uuid = slice_id + slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED + list_endpoints = [] + connection_group_ids = set() + for sdp in sdps: + attachment_circuits = sdp["attachment-circuits"]["attachment-circuit"] + if len(attachment_circuits) != 1: + raise Exception("All SDPs should have 1 attachment-circuit") + 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 = attachment_circuits[0]["ac-tp-id"] + list_endpoints.append(endpoint) + connection_group_ids.add( + sdp["service-match-criteria"]["match-criterion"][0][ + "target-connection-group-id" + ] + ) + slice_request.slice_endpoint_ids.extend(list_endpoints) + if len(connection_group_ids) != 1: + raise Exception("SDPs target-connection-group-id do not match") + LOGGER.debug(f"Connection groups detected: {len(connection_groups)}") + list_constraints = [] + for cg in connection_groups: + if cg["id"] != list(connection_group_ids)[0]: + continue + metric_bounds = cg["connectivity-construct"][0]["service-slo-sle-policy"][ + "slo-policy" + ]["metric-bound"] + for metric in metric_bounds: + if metric["metric-type"] == "ietf-nss:one-way-delay-maximum": + constraint = Constraint() + constraint.sla_latency.e2e_latency_ms = float(metric["bound"]) + list_constraints.append(constraint) + elif metric["metric-type"] == "ietf-nss:one-way-bandwidth": + constraint = Constraint() + constraint.sla_capacity.capacity_gbps = ( + float(metric["bound"]) / 1.0e3 + ) + list_constraints.append(constraint) + break + 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 = slice_id + slice_request.slice_owner.owner_string = owner + slice_request.slice_owner.owner_uuid.uuid = str( + uuid.uuid5(uuid.NAMESPACE_DNS, owner) + ) + raise_if_differs = False + fields = { + name: (value, raise_if_differs) for name, value in request_data.items() + } + update_config_rule_custom( + slice_request.slice_config.config_rules, RESOURCE_KEY, fields + ) + return slice_request + + @staticmethod + def create_sdp( + request_data: dict, slice_uuid: str, context_client: ContextClient + ) -> Slice: + sdps = request_data["sdp"] + if len(sdps) != 1: + raise Exception("Number of SDPs should be 1") + new_sdp = sdps[0] + slice_request = get_slice_by_uuid(context_client, slice_uuid) + for cr in slice_request.slice_config.config_rules: + if cr.WhichOneof("config_rule") != "custom": + continue + if cr.custom.resource_key == RESOURCE_KEY: + ietf_data = json.loads(cr.custom.resource_value) + break + else: + raise Exception("ietf data not found") + slice_services = ietf_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + slice_sdps = slice_service["sdps"]["sdp"] + slice_sdps.append(new_sdp) + raise_if_differs = False + fields = {name: (value, raise_if_differs) for name, value in ietf_data.items()} + update_config_rule_custom( + slice_request.slice_config.config_rules, RESOURCE_KEY, fields + ) + return slice_request + + @staticmethod + def create_connection_group( + request_data: dict, slice_id: str, context_client: ContextClient + ) -> Slice: + connection_groups = request_data["connection-group"] + if len(connection_groups) != 1: + raise Exception("Number of connection groups should be 1") + new_connection_group = connection_groups[0] + slice = get_slice_by_uuid(context_client, slice_id) + for cr in slice.slice_config.config_rules: + if cr.WhichOneof("config_rule") != "custom": + continue + if cr.custom.resource_key == RESOURCE_KEY: + ietf_data = json.loads(cr.custom.resource_value) + break + else: + raise Exception("ietf data not found") + slice_services = ietf_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + slice_connection_groups = slice_service["connection-groups"]["connection-group"] + slice_connection_groups.append(new_connection_group) + raise_if_differs = False + fields = {name: (value, raise_if_differs) for name, value in ietf_data.items()} + update_config_rule_custom(slice.slice_config.config_rules, RESOURCE_KEY, fields) + return slice + + @staticmethod + def create_match_criteria( + request_data: dict, slice_id: str, sdp_id: str, context_client: ContextClient + ) -> Slice: + match_criteria = request_data["match-criterion"] + if len(match_criteria) != 1: + raise Exception("Number of SDPs should be 1") + new_match_criterion = match_criteria[0] + target_connection_group_id = new_match_criterion["target-connection-group-id"] + slice_request = get_slice_by_uuid(context_client, slice_id) + for cr in slice_request.slice_config.config_rules: + if cr.WhichOneof("config_rule") != "custom": + continue + if cr.custom.resource_key == RESOURCE_KEY: + ietf_data = json.loads(cr.custom.resource_value) + break + else: + raise Exception("ietf data not found") + slice_services = ietf_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + slice_id = slice_service["id"] + sdps = slice_service["sdps"]["sdp"] + connection_groups = slice_service["connection-groups"]["connection-group"] + slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED + list_endpoints = [] + for sdp in sdps: + if ( + sdp["service-match-criteria"]["match-criterion"][0][ + "target-connection-group-id" + ] + == target_connection_group_id + ): + attachment_circuits = sdp["attachment-circuits"]["attachment-circuit"] + if len(attachment_circuits) != 1: + raise Exception("All SDPs should have 1 attachment-circuit") + 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 = attachment_circuits[0]["ac-tp-id"] + list_endpoints.append(endpoint) + break + else: + raise Exception("Second SDP not found") + for sdp in sdps: + if sdp["id"] == sdp_id: + sdp["service-match-criteria"]["match-criterion"].append( + new_match_criterion + ) + attachment_circuits = sdp["attachment-circuits"]["attachment-circuit"] + if len(attachment_circuits) != 1: + raise Exception("All SDPs should have 1 attachment-circuit") + 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 = attachment_circuits[0]["ac-tp-id"] + list_endpoints.append(endpoint) + break + else: + raise Exception("SDP not found") + del slice_request.slice_endpoint_ids[:] + slice_request.slice_endpoint_ids.extend(list_endpoints) + LOGGER.debug(f"Connection groups detected: {len(connection_groups)}") + list_constraints = [] + for cg in connection_groups: + if cg["id"] != target_connection_group_id: + continue + metric_bounds = cg["connectivity-construct"][0]["service-slo-sle-policy"][ + "slo-policy" + ]["metric-bound"] + for metric in metric_bounds: + if metric["metric-type"] == "ietf-nss:one-way-delay-maximum": + constraint = Constraint() + constraint.sla_latency.e2e_latency_ms = float(metric["bound"]) + list_constraints.append(constraint) + elif metric["metric-type"] == "ietf-nss:one-way-bandwidth": + constraint = Constraint() + constraint.sla_capacity.capacity_gbps = ( + float(metric["bound"]) / 1.0e3 + ) + list_constraints.append(constraint) + break + else: + raise Exception("Connection group not found") + del slice_request.slice_constraints[:] + slice_request.slice_constraints.extend(list_constraints) + LOGGER.debug(grpc_message_to_json(slice_request)) # TODO remove + raise_if_differs = False + fields = {name: (value, raise_if_differs) for name, value in ietf_data.items()} + update_config_rule_custom( + slice_request.slice_config.config_rules, RESOURCE_KEY, fields + ) + return slice_request diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ac-common@2023-11-13.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ac-common@2023-11-13.yang new file mode 100644 index 000000000..170e70fff --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ac-common@2023-11-13.yang @@ -0,0 +1,1651 @@ +module ietf-ac-common { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-ac-common"; + prefix ac-common; + + import ietf-vpn-common { + prefix vpn-common; + reference + "RFC 9181: A Common YANG Data Model for Layer 2 and Layer 3 + VPNs"; + } + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types, Section 4"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types, Section 3"; + } + import ietf-key-chain { + prefix key-chain; + reference + "RFC 8177: YANG Data Model for Key Chains"; + } + + organization + "IETF OPSAWG (Operations and Management Area Working Group)"; + contact + "WG Web: + WG List: + + Editor: Mohamed Boucadair + + Author: Richard Roberts + + Author: Oscar Gonzalez de Dios + + Author: Samier Barguil + + Author: Bo Wu + "; + description + "This YANG module defines a common attachment circuit (AC) + YANG model. + + Copyright (c) 2024 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Revised BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see the + RFC itself for full legal notices."; + + revision 2023-11-13 { + description + "Initial revision."; + reference + "RFC XXXX: A Common YANG Data Model for Attachment Circuits"; + } + + /****************************Features************************/ + + feature layer2-ac { + description + "Indicates support of Layer 2 ACs."; + } + + feature layer3-ac { + description + "Indicates support of Layer 3 ACs."; + } + + feature server-assigned-reference { + description + "This feature indicates support for server-generated references + and use of such references to access related resources."; + } + + /****************************Identities************************/ + // IP address allocation types + + identity address-allocation-type { + description + "Base identity for address allocation type in the AC."; + } + + identity provider-dhcp { + base address-allocation-type; + description + "The provider's network provides a DHCP service to the + customer."; + } + + identity provider-dhcp-relay { + base address-allocation-type; + description + "The provider's network provides a DHCP relay service to the + customer."; + } + + identity provider-dhcp-slaac { + if-feature "vpn-common:ipv6"; + base address-allocation-type; + description + "The provider's network provides a DHCP service to the customer + as well as IPv6 Stateless Address Autoconfiguration (SLAAC)."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + + identity static-address { + base address-allocation-type; + description + "The provider's network provides static IP addressing to the + customer."; + } + + identity slaac { + if-feature "vpn-common:ipv6"; + base address-allocation-type; + description + "The provider's network uses IPv6 SLAAC to provide addressing + to the customer."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + + identity dynamic-infra { + base address-allocation-type; + description + "The IP address is dynamically allocated by the hosting + infrastrcture."; + } + + // next-hop actions + + identity local-defined-next-hop { + description + "Base identity of local defined next hops."; + } + + identity discard { + base local-defined-next-hop; + description + "Indicates an action to discard traffic for the corresponding + destination. For example, this can be used to black-hole + traffic."; + } + + identity local-link { + base local-defined-next-hop; + description + "Treat traffic towards addresses within the specified next-hop + prefix as though they are connected to a local link."; + } + + // Layer 2 tunnel types + + identity l2-tunnel-type { + description + "Base identity for Layer 2 tunnel selection for an AC."; + } + + identity pseudowire { + base l2-tunnel-type; + description + "Pseudowire tunnel termination for the AC."; + } + + identity vpls { + base l2-tunnel-type; + description + "Virtual Private LAN Service (VPLS) tunnel termination for + the AC."; + } + + identity vxlan { + base l2-tunnel-type; + description + "Virtual eXtensible Local Area Network (VXLAN) tunnel + termination for the AC."; + } + + // Layer 3 tunnel types + + identity l3-tunnel-type { + description + "Base identity for Layer 3 tunnel selection for an AC."; + } + + identity ip-in-ip { + base l3-tunnel-type; + description + "IP in IP Tunneling."; + } + + identity ipsec { + base l3-tunnel-type; + description + "IP Security (IPsec)."; + } + + identity gre { + base l3-tunnel-type; + description + "Generic Routing Encapsulation (GRE)."; + } + + // Tagging precedence + + identity precedence-type { + description + "Redundancy type. The service can be created with primary and + secondary tagging."; + } + + identity primary { + base precedence-type; + description + "Identifies the main attachment circuit."; + } + + identity secondary { + base precedence-type; + description + "Identifies the secondary attachment circuit."; + } + // AC Type + + identity role { + description + "Base identity for the network role of an AC."; + } + + identity uni { + base role; + description + "User-to-Network Interface (UNI)."; + } + + identity nni { + base role; + description + "Network-to-Network Interface (NNI)."; + } + + identity public-nni { + base role; + description + "Public peering."; + } + + // More Admin status types + + identity awaiting-validation { + base vpn-common:administrative-status; + description + "This administrative status reflects that a request is + pending an adiministrator approval."; + } + + identity awaiting-processing { + base vpn-common:administrative-status; + description + "This administrative status reflects that a request was + approved and validated, but is awaiting more processing + before activation."; + } + + identity admin-prohibited { + base vpn-common:administrative-status; + description + "This administrative status reflects that a request cannot + be handled because of administrative policies."; + } + identity rejected { + base vpn-common:administrative-status; + description + "This administrative status reflects that a request was + rejected because, e.g., there are no sufficient resources + or other reasons not covered by the other status types."; + } + + identity bgp-role { + description + "Used to indicate BGP role when establishing a BGP session."; + reference + "RFC 9234: Route Leak Prevention and Detection Using + Roles in UPDATE and OPEN Messages, Section 4"; + } + + identity provider { + base bgp-role; + description + "The local AS is a transit provider of the remote AS."; + } + + identity client { + base bgp-role; + description + "The local AS is a transit provider of the remote AS."; + } + + identity rs { + base bgp-role; + description + "The local AS is a Route Server (RS)."; + } + + identity rs-client { + base bgp-role; + description + "The local AS is a client of an RS and the RS is the + remote AS."; + } + + identity peer { + base bgp-role; + description + "The local and remote ASes have a peering relationship."; + } + + /****************************Typedefs************************/ + typedef predefined-next-hop { + type identityref { + base local-defined-next-hop; + } + description + "Predefined next-hop designation for locally generated + routes."; + } + + typedef area-address { + type string { + pattern '[0-9A-Fa-f]{2}(\.[0-9A-Fa-f]{4}){0,6}'; + } + description + "This type defines the area address format."; + } + + /************************Reusable groupings********************/ + /**** Service Status ****/ + + grouping service-status { + description + "Service status grouping."; + container status { + description + "Service status."; + container admin-status { + description + "Administrative service status."; + leaf status { + type identityref { + base vpn-common:administrative-status; + } + description + "Administrative service status."; + } + leaf last-change { + type yang:date-and-time; + config false; + description + "Indicates the actual date and time of the service + status change."; + } + } + container oper-status { + config false; + description + "Operational service status."; + uses vpn-common:oper-status-timestamp; + } + } + } + + /**** A set of profiles ****/ + + grouping ac-profile-cfg { + description + "Grouping for AC profile configuration."; + container valid-provider-identifiers { + description + "Container for valid provider profile identifiers. + The profiles only have significance within the service + provider's administrative domain."; + list encryption-profile-identifier { + key "id"; + description + "List of encryption profile identifiers."; + leaf id { + type string; + description + "Identification of the encryption profile to be used."; + } + } + list qos-profile-identifier { + key "id"; + description + "List of QoS profile identifiers."; + leaf id { + type string; + description + "Identification of the QoS profile to be used."; + } + } + list failure-detection-profile-identifier { + key "id"; + description + "List of BFD profile identifiers."; + leaf id { + type string; + description + "Identification of the a failure detection (e.g., BFD) + profile to be used."; + } + } + list forwarding-profile-identifier { + key "id"; + description + "List of forwarding profile identifiers."; + leaf id { + type string; + description + "Identification of the forwarding profile to be used."; + } + } + list routing-profile-identifier { + key "id"; + description + "List of routing profile identifiers."; + leaf id { + type string; + description + "Identification of the routing profile to be used by + the routing protocols over an AC."; + } + } + nacm:default-deny-write; + } + } + + /**** Operational instructions ****/ + + grouping op-instructions { + description + "Scheduling instructions."; + leaf requested-start { + type yang:date-and-time; + description + "Indicates the requested date and time when the service is + expected to be active."; + } + leaf requested-stop { + type yang:date-and-time; + description + "Indicates the requested date and time when the service is + expected to be disabled."; + } + leaf actual-start { + type yang:date-and-time; + config false; + description + "Indicates the actual date and time when the service + actually was enabled."; + } + leaf actual-stop { + type yang:date-and-time; + config false; + description + "Indicates the actual date and time when the service + actually was disabled."; + } + } + + /**** Layer 2 encapsulations ****/ + // Dot1q + + grouping dot1q { + description + "Defines a grouping for tagged interfaces."; + leaf tag-type { + type identityref { + base vpn-common:tag-type; + } + description + "Tag type."; + } + leaf cvlan-id { + type uint16 { + range "1..4094"; + } + description + "VLAN identifier."; + } + } + + // priority-tagged + + grouping priority-tagged { + description + "Priority tagged."; + leaf tag-type { + type identityref { + base vpn-common:tag-type; + } + description + "Tag type."; + } + } + + // QinQ + + grouping qinq { + description + "Includes QinQ parameters."; + leaf tag-type { + type identityref { + base vpn-common:tag-type; + } + description + "Tag type."; + } + leaf svlan-id { + type uint16 { + range "1..4094"; + } + description + "Service VLAN (S-VLAN) identifier."; + } + leaf cvlan-id { + type uint16 { + range "1..4094"; + } + description + "Customer VLAN (C-VLAN) identifier."; + } + } + + /**** Layer 2 tunnel services ****/ + // pseudowire (PW) + + grouping pseudowire { + description + "Includes pseudowire termination parameters."; + leaf vcid { + type uint32; + description + "Indicates a PW or virtual circuit (VC) identifier."; + } + leaf far-end { + type union { + type uint32; + type inet:ip-address; + } + description + "Neighbor reference."; + reference + "RFC 8077: Pseudowire Setup and Maintenance Using the Label + Distribution Protocol (LDP), Section 6.1"; + } + } + // VPLS + + grouping vpls { + description + "VPLS termination parameters."; + leaf vcid { + type uint32; + description + "VC identifier."; + } + leaf-list far-end { + type union { + type uint32; + type inet:ip-address; + } + description + "Neighbor reference."; + } + } + + // VXLAN + + grouping vxlan { + description + "VXLAN termination parameters."; + leaf vni-id { + type uint32; + description + "VXLAN Network Identifier (VNI)."; + } + leaf peer-mode { + type identityref { + base vpn-common:vxlan-peer-mode; + } + description + "Specifies the VXLAN access mode. By default, + the peer mode is set to 'static-mode'."; + } + leaf-list peer-ip-address { + type inet:ip-address; + description + "List of a peer's IP addresses."; + } + } + + // Layer 2 Tunnel service + + grouping l2-tunnel-service { + description + "Defines a Layer 2 tunnel termination."; + leaf type { + type identityref { + base l2-tunnel-type; + } + description + "Selects the tunnel termination type for an AC."; + } + container pseudowire { + when "derived-from-or-self(../type, 'ac-common:pseudowire')" { + description + "Only applies when the Layer 2 service type is + 'pseudowire'."; + } + description + "Includes pseudowire termination parameters."; + uses pseudowire; + } + container vpls { + when "derived-from-or-self(../type, 'ac-common:vpls')" { + description + "Only applies when the Layer 2 service type is 'vpls'."; + } + description + "VPLS termination parameters."; + uses vpls; + } + container vxlan { + when "derived-from-or-self(../type, 'ac-common:vxlan')" { + description + "Only applies when the Layer 2 service type is 'vxlan'."; + } + description + "VXLAN termination parameters."; + uses vxlan; + } + } + + /**** Layer 3 connection *****/ + // IPv4 allocation type + + grouping ipv4-allocation-type { + description + "IPv4-specific parameters."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "Subnet prefix length expressed in bits. It is applied to + both local and customer addresses."; + } + leaf address-allocation-type { + type identityref { + base address-allocation-type; + } + must "not(derived-from-or-self(current(), 'ac-common:slaac') " + + "or derived-from-or-self(current(), " + + "'ac-common:provider-dhcp-slaac'))" { + error-message "SLAAC is only applicable to IPv6."; + } + description + "Defines how IPv4 addresses are allocated to the peer site."; + } + } + + // IPv6 allocation type + + grouping ipv6-allocation-type { + description + "IPv6-specific parameters."; + leaf prefix-length { + type uint8 { + range "0..128"; + } + description + "Subnet prefix length expressed in bits. It is applied to + both local and customer addresses."; + } + leaf address-allocation-type { + type identityref { + base address-allocation-type; + } + description + "Defines how IPv6 addresses are allocated to the peer site."; + } + } + + // Basic parameters for IPv4 connection + + grouping ipv4-connection-basic { + description + "Basic set fof IPv4-specific parameters for the connection."; + uses ipv4-allocation-type; + choice allocation-type { + description + "Choice of the IPv4 address allocation."; + case dynamic { + description + "When the addresses are allocated by DHCP or other dynamic + means local to the infrastructure."; + choice provider-dhcp { + description + "Parameters related to DHCP-allocated addresses. IP + addresses are allocated by DHCP, that is provided by + the operator."; + leaf dhcp-service-type { + type enumeration { + enum server { + description + "Local DHCP server."; + } + enum relay { + description + "Local DHCP relay. DHCP requests are relayed to + a provider's server."; + } + } + description + "Indicates the type of DHCP service to be enabled on + an AC."; + } + } + choice dhcp-relay { + description + "The DHCP relay is provided by the operator."; + container customer-dhcp-servers { + description + "Container for a list of the customer's DHCP servers."; + leaf-list server-ip-address { + type inet:ipv4-address; + description + "IPv4 addresses of the customer's DHCP server."; + } + } + } + } + } + } + + // Basic parameters for IPv6 connection + + grouping ipv6-connection-basic { + description + "Basic set fof IPv6-specific parameters for the connection."; + uses ipv6-allocation-type; + choice allocation-type { + description + "Choice of the IPv6 address allocation."; + case dynamic { + description + "When the addresses are allocated by DHCP or other dynamic + means local to the infrastructure."; + choice provider-dhcp { + description + "Parameters related to DHCP-allocated addresses. + IP addresses are allocated by DHCP, that is provided + by the operator."; + leaf dhcp-service-type { + type enumeration { + enum server { + description + "Local DHCP server."; + } + enum relay { + description + "Local DHCP relay. DHCP requests are relayed to a + provider's server."; + } + } + description + "Indicates the type of DHCP service to be enabled on + the AC."; + } + } + choice dhcp-relay { + description + "The DHCP relay is provided by the operator."; + container customer-dhcp-servers { + description + "Container for a list of the customer's DHCP servers."; + leaf-list server-ip-address { + type inet:ipv6-address; + description + "IPv6 addresses of the customer's DHCP server."; + } + } + } + } + } + } + // Full parameters for the IPv4 connection + + grouping ipv4-connection { + description + "IPv4-specific parameters."; + leaf local-address { + type inet:ipv4-address; + description + "The IP address used at the provider's interface."; + } + leaf virtual-address { + type inet:ipv4-address; + description + "This addresss may be used for redundancy purposes."; + } + uses ipv4-allocation-type; + choice allocation-type { + description + "Choice of the IPv4 address allocation."; + case dynamic { + description + "When the addresses are allocated by DHCP or other + dynamic means local to the infrastructure."; + choice address-assign { + description + "A choice for how IPv4 addresses are assigned."; + case number { + leaf number-of-dynamic-address { + type uint16; + description + "Specifies the number of IP addresses to be assigned + to the customer on the AC."; + } + } + case explicit { + container customer-addresses { + description + "Container for customer addresses to be allocated + using DHCP."; + list address-pool { + key "pool-id"; + description + "Describes IP addresses to be dyncamically + allocated. + + When only 'start-address' is present, it + represents a single address. + + When both 'start-address' and 'end-address' are + specified, it implies a range inclusive of both + addresses."; + leaf pool-id { + type string; + description + "A pool identifier for the address range from + 'start-address' to 'end-address'."; + } + leaf start-address { + type inet:ipv4-address; + mandatory true; + description + "Indicates the first address in the pool."; + } + leaf end-address { + type inet:ipv4-address; + description + "Indicates the last address in the pool."; + } + } + } + } + } + choice provider-dhcp { + description + "Parameters related to DHCP-allocated addresses. IP + addresses are allocated by DHCP, which is provided by + the operator."; + leaf dhcp-service-type { + type enumeration { + enum server { + description + "Local DHCP server."; + } + enum relay { + description + "Local DHCP relay. DHCP requests are relayed to + a provider's server."; + } + } + description + "Indicates the type of DHCP service to be enabled on + this AC."; + } + } + choice dhcp-relay { + description + "The DHCP relay is provided by the operator."; + container customer-dhcp-servers { + description + "Container for a list of the customer's DHCP servers."; + leaf-list server-ip-address { + type inet:ipv4-address; + description + "IPv4 addresses of the customer's DHCP server."; + } + } + } + } + case static-addresses { + description + "Lists the IPv4 addresses that are used."; + list address { + key "address-id"; + ordered-by user; + description + "Lists the IPv4 addresses that are used. The first + address of the list is the primary address of the + connection."; + leaf address-id { + type string; + description + "An identifier of the static IPv4 address."; + } + leaf customer-address { + type inet:ipv4-address; + description + "An IPv4 address of the customer side."; + } + } + } + } + } + + // Full parameters for the IPv6 connection + + grouping ipv6-connection { + description + "IPv6-specific parameters."; + leaf local-address { + type inet:ipv6-address; + description + "IPv6 address of the provider side."; + } + leaf virtual-address { + type inet:ipv6-address; + description + "This addresss may be used for redundancy purposes."; + } + uses ipv6-allocation-type; + choice allocation-type { + description + "Choice of the IPv6 address allocation."; + case dynamic { + description + "When the addresses are allocated by DHCP or other + dynamic means local to the infrastructure."; + choice address-assign { + description + "A choice for how IPv6 addresses are assigned."; + case number { + leaf number-of-dynamic-address { + type uint16; + description + "Specifies the number of IP addresses to be + assigned to the customer on this access."; + } + } + case explicit { + container customer-addresses { + description + "Container for customer addresses to be allocated + using DHCP."; + list address-pool { + key "pool-id"; + description + "Describes IP addresses to be dyncamically + allocated. + + When only 'start-address' is present, it + represents a single address. + + When both 'start-address' and 'end-address' are + specified, it implies a range inclusive of both + addresses."; + leaf pool-id { + type string; + description + "A pool identifier for the address range from + 'start-address' to 'end-address'."; + } + leaf start-address { + type inet:ipv6-address; + mandatory true; + description + "Indicates the first address in the pool."; + } + leaf end-address { + type inet:ipv6-address; + description + "Indicates the last address in the pool."; + } + } + } + } + } + choice provider-dhcp { + description + "Parameters related to DHCP-allocated addresses. + IP addresses are allocated by DHCP, which is provided + by the operator."; + leaf dhcp-service-type { + type enumeration { + enum server { + description + "Local DHCP server."; + } + enum relay { + description + "Local DHCP relay. DHCP requests are relayed + to a provider's server."; + } + } + description + "Indicates the type of DHCP service to + be enabled on this access."; + } + } + choice dhcp-relay { + description + "The DHCP relay is provided by the operator."; + container customer-dhcp-servers { + description + "Container for a list of the customer's DHCP servers."; + leaf-list server-ip-address { + type inet:ipv6-address; + description + "IPv6 addresses of the customer's DHCP server."; + } + } + } + } + case static-addresses { + description + "Lists the IPv6 addresses that are used."; + list address { + key "address-id"; + ordered-by user; + description + "Lists the IPv6 addresses that are used. The first + address of the list is the primary IP address of + the connection."; + leaf address-id { + type string; + description + "An identifier of the static IPv6 address."; + } + leaf customer-address { + type inet:ipv6-address; + description + "An IPv6 address of the customer side."; + } + } + } + } + } + + /**** Routing ****/ + // Routing authentication + + grouping bgp-authentication { + description + "Grouping for BGP authentication parameters."; + container authentication { + description + "Container for BGP authentication parameters."; + leaf enabled { + type boolean; + description + "Enables or disables authentication."; + } + container keying-material { + when "../enabled = 'true'"; + description + "Container for describing how a BGP routing session is to + be secured on an AC."; + choice option { + description + "Choice of authentication options."; + case ao { + description + "Uses the TCP Authentication Option (TCP-AO)."; + reference + "RFC 5925: The TCP Authentication Option"; + leaf enable-ao { + type boolean; + description + "Enables the TCP-AO."; + } + leaf ao-keychain { + type key-chain:key-chain-ref; + description + "Reference to the TCP-AO key chain."; + reference + "RFC 8177: YANG Data Model for Key Chains"; + } + } + case md5 { + description + "Uses MD5 to secure the session."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks + (VPNs), Section 13.2"; + leaf md5-keychain { + type key-chain:key-chain-ref; + description + "Reference to the MD5 key chain."; + reference + "RFC 8177: YANG Data Model for Key Chains"; + } + } + case explicit { + leaf key-id { + type uint32; + description + "Key identifier."; + } + leaf key { + type string; + description + "BGP authentication key. + + This model only supports the subset of keys that + are representable as ASCII strings."; + } + leaf crypto-algorithm { + type identityref { + base key-chain:crypto-algorithm; + } + description + "Indicates the cryptographic algorithm associated + with the key."; + } + } + } + } + } + } + + grouping ospf-authentication { + description + "Authentication configuration."; + container authentication { + description + "Container for OSPF authentication parameters."; + leaf enabled { + type boolean; + description + "Enables or disables authentication."; + } + container keying-material { + when "../enabled = 'true'"; + description + "Container for describing how an OSPF session is to be + secured for this AC."; + choice option { + description + "Options for OSPF authentication."; + case auth-key-chain { + leaf key-chain { + type key-chain:key-chain-ref; + description + "Name of the key chain."; + } + } + case auth-key-explicit { + leaf key-id { + type uint32; + description + "Key identifier."; + } + leaf key { + type string; + description + "OSPF authentication key. + This model only supports the subset of keys that + are representable as ASCII strings."; + } + leaf crypto-algorithm { + type identityref { + base key-chain:crypto-algorithm; + } + description + "Indicates the cryptographic algorithm associated + with the key."; + } + } + } + } + } + } + + grouping isis-authentication { + description + "IS-IS authentication configuration."; + container authentication { + description + "Container for IS-IS authentication parameters."; + leaf enabled { + type boolean; + description + "Enables or disables authentication."; + } + container keying-material { + when "../enabled = 'true'"; + description + "Container for describing how an IS-IS session is secured + over an AC."; + choice option { + description + "Options for IS-IS authentication."; + case auth-key-chain { + leaf key-chain { + type key-chain:key-chain-ref; + description + "Name of the key chain."; + } + } + case auth-key-explicit { + leaf key-id { + type uint32; + description + "Key identifier."; + } + leaf key { + type string; + description + "IS-IS authentication key. + + This model only supports the subset of keys that + are representable as ASCII strings."; + } + leaf crypto-algorithm { + type identityref { + base key-chain:crypto-algorithm; + } + description + "Indicates the cryptographic algorithm associated + with the key."; + } + } + } + } + } + } + + grouping rip-authentication { + description + "RIP authentication configuration."; + container authentication { + description + "Container for RIP authentication parameters."; + leaf enabled { + type boolean; + description + "Enables or disables authentication."; + } + container keying-material { + when "../enabled = 'true'"; + description + "Container for describing how a RIP session is to be + secured on this AC."; + choice option { + description + "Specifies the authentication + scheme."; + case auth-key-chain { + leaf key-chain { + type key-chain:key-chain-ref; + description + "Name of the key chain."; + } + } + case auth-key-explicit { + leaf key { + type string; + description + "RIP authentication key. + + This model only supports the subset of keys that + are representable as ASCII strings."; + } + leaf crypto-algorithm { + type identityref { + base key-chain:crypto-algorithm; + } + description + "Indicates the cryptographic algorithm associated + with the key."; + } + } + } + } + } + } + + // Basic routing parameters + + grouping bgp-peer-group-without-name { + description + "Identifies a BGP peer-group configured on the local system."; + leaf local-as { + type inet:as-number; + description + "Indicates a local AS Number (ASN). This ASN is exposed + to a customer so that it knows which ASN to use + to set up a BGP session."; + } + leaf peer-as { + type inet:as-number; + description + "Indicates the customer's ASN when the customer + requests BGP routing."; + } + leaf address-family { + type identityref { + base vpn-common:address-family; + } + description + "This node contains the address families to be activated. + 'dual-stack' means that both IPv4 and IPv6 will be + activated."; + } + leaf role { + type identityref { + base ac-common:bgp-role; + } + description + "Specifies the BGP role (provider, customer, peer, etc.)."; + reference + "RFC 9234: Route Leak Prevention and Detection Using + Roles in UPDATE and OPEN Messages, Section 4"; + } + } + + grouping bgp-peer-group-with-name { + description + "Identifies a BGP peer-group configured on the local system - + identified by a peer-group name."; + leaf name { + type string; + description + "Name of the BGP peer-group."; + } + uses bgp-peer-group-without-name; + } + + grouping ospf-basic { + description + "Configuration specific to OSPF."; + leaf address-family { + type identityref { + base vpn-common:address-family; + } + description + "Indicates whether IPv4, IPv6, or both are to be activated."; + } + leaf area-id { + type yang:dotted-quad; + mandatory true; + description + "Area ID."; + reference + "RFC 4577: OSPF as the Provider/Customer Edge Protocol + for BGP/MPLS IP Virtual Private Networks + (VPNs), Section 4.2.3 + RFC 6565: OSPFv3 as a Provider Edge to Customer Edge + (PE-CE) Routing Protocol, Section 4.2"; + } + leaf metric { + type uint16; + description + "Metric of the AC. It is used in the routing state + calculation and path selection."; + } + } + + grouping isis-basic { + description + "Basic configuration specific to IS-IS."; + leaf address-family { + type identityref { + base vpn-common:address-family; + } + description + "Indicates whether IPv4, IPv6, or both are to be activated."; + } + leaf area-address { + type area-address; + mandatory true; + description + "Area address."; + } + } + + // Static routing + + grouping ipv4-static-rtg-entry { + description + "Paramters to configure a specific IPv4 static routing entry."; + leaf lan { + type inet:ipv4-prefix; + description + "LAN prefix."; + } + leaf lan-tag { + type string; + description + "Internal tag to be used in service policies."; + } + leaf next-hop { + type union { + type inet:ip-address; + type predefined-next-hop; + } + description + "The next hop that is to be used for the static route. + This may be specified as an IP address or a + predefined next-hop type (e.g., 'discard' or + 'local-link')."; + } + leaf metric { + type uint32; + description + "Indicates the metric associated with the static route."; + } + } + + grouping ipv4-static-rtg { + description + "Configuration specific to IPv4 static routing."; + list ipv4-lan-prefixes { + if-feature "vpn-common:ipv4"; + key "lan next-hop"; + description + "List of LAN prefixes for the site."; + uses ipv4-static-rtg-entry; + uses ac-common:service-status; + } + } + + grouping ipv6-static-rtg-entry { + description + "Paramters to configure a specific IPv6 static routing entry."; + leaf lan { + type inet:ipv6-prefix; + description + "LAN prefixes."; + } + leaf lan-tag { + type string; + description + "Internal tag to be used in service (e.g., VPN) policies."; + } + leaf next-hop { + type union { + type inet:ip-address; + type predefined-next-hop; + } + description + "The next hop that is to be used for the static route. + This may be specified as an IP address or a predefined + next-hop type (e.g., 'discard' or 'local-link')."; + } + leaf metric { + type uint32; + description + "Indicates the metric associated with the static route."; + } + } + + grouping ipv6-static-rtg { + description + "Configuration specific to IPv6 static routing."; + list ipv6-lan-prefixes { + if-feature "vpn-common:ipv6"; + key "lan next-hop"; + description + "List of LAN prefixes for the site."; + uses ipv6-static-rtg-entry; + uses ac-common:service-status; + } + } + + // OAM + + grouping bfd { + description + "A grouping for basic BFD."; + leaf holdtime { + type uint32; + units "milliseconds"; + description + "Expected BFD holdtime. + The customer may impose some fixed values + for the holdtime period if the provider allows + the customer to use this function. + If the provider doesn't allow the customer to + use this function, fixed values will not be set."; + reference + "RFC 5880: Bidirectional Forwarding Detection (BFD), + Section 6.8.18"; + } + } + + // redundancy + + grouping redundancy-group { + description + "A grouping for redundancy group."; + list group { + key "group-id"; + description + "List of group-ids."; + leaf group-id { + type string; + description + "Indicates the group-id to which the AC belongs."; + } + leaf precedence { + type identityref { + base ac-common:precedence-type; + } + description + "Defines redundancy of an AC."; + } + } + } + + // QoS + + grouping bandwidth-parameters { + description + "A grouping for bandwidth parameters."; + leaf cir { + type uint64; + units "bps"; + description + "Committed Information Rate (CIR). The maximum number of bits + that a port can receive or send during one second over + an interface."; + } + leaf cbs { + type uint64; + units "bytes"; + description + "Committed Burst Size (CBS). CBS controls the bursty nature + of the traffic. Traffic that does not use the configured + CIR accumulates credits until the credits reach the + configured CBS."; + } + leaf eir { + type uint64; + units "bps"; + description + "Excess Information Rate (EIR), i.e., excess frame delivery + allowed not subject to a Service Level Agreement (SLA). + The traffic rate can be limited by EIR."; + } + leaf ebs { + type uint64; + units "bytes"; + description + "Excess Burst Size (EBS). The bandwidth available for burst + traffic from the EBS is subject to the amount of bandwidth + that is accumulated during periods when traffic allocated + by the EIR policy is not used."; + } + leaf pir { + type uint64; + units "bps"; + description + "Peak Information Rate (PIR), i.e., maximum frame delivery + allowed. It is equal to or less than sum of CIR and EIR."; + } + leaf pbs { + type uint64; + units "bytes"; + description + "Peak Burst Size (PBS)."; + } + } + + grouping bandwidth-per-type { + description + "Grouping for bandwidth per type."; + list bandwidth { + key "bw-type"; + description + "List for bandwidth per type data nodes."; + leaf bw-type { + type identityref { + base vpn-common:bw-type; + } + description + "Indicates the bandwidth type."; + } + choice type { + description + "Choice based upon bandwidth type."; + case per-cos { + description + "Bandwidth per CoS."; + list cos { + key "cos-id"; + description + "List of Class of Services."; + leaf cos-id { + type uint8; + description + "Identifier of the CoS, indicated by a Differentiated + Services Code Point (DSCP) or a CE-CLAN CoS (802.1p) + value in the service frame."; + reference + "IEEE Std 802.1Q: Bridges and Bridged Networks"; + } + uses bandwidth-parameters; + } + } + case other { + description + "Other bandwidth types."; + uses bandwidth-parameters; + } + } + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ac-svc@2024-08-06.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ac-svc@2024-08-06.yang new file mode 100644 index 000000000..a5790644f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ac-svc@2024-08-06.yang @@ -0,0 +1,1252 @@ +module ietf-ac-svc { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-ac-svc"; + prefix ac-svc; + + import ietf-ac-common { + prefix ac-common; + reference + "RFC CCCC: A Common YANG Data Model for Attachment Circuits"; + } + import ietf-vpn-common { + prefix vpn-common; + reference + "RFC 9181: A Common YANG Data Model for Layer 2 and Layer 3 + VPNs"; + } + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types, Section 4"; + } + import ietf-key-chain { + prefix key-chain; + reference + "RFC 8177: YANG Data Model for Key Chains"; + } + + organization + "IETF OPSAWG (Operations and Management Area Working Group)"; + contact + "WG Web: + WG List: + + Editor: Mohamed Boucadair + + Author: Richard Roberts + + Author: Oscar Gonzalez de Dios + + Author: Samier Barguil + + Author: Bo Wu + "; + description + "This YANG module defines a YANG model for exposing + attachment circuits as a service (ACaaS). + + Copyright (c) 2024 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Revised BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see the + RFC itself for full legal notices."; + + revision 2024-08-06 { + description + "Initial revision."; + reference + "RFC XXXX: YANG Data Models for Bearers and 'Attachment + Circuits'-as-a-Service (ACaaS)"; + } + + /* A set of typedefs to ease referencing cross-modules */ + + typedef attachment-circuit-reference { + type leafref { + path "/ac-svc:attachment-circuits/ac-svc:ac/ac-svc:name"; + } + description + "Defines a reference to an attachment circuit that can be used + by other modules."; + } + + typedef ac-group-reference { + type leafref { + path "/ac-svc:attachment-circuits/ac-svc:ac-group-profile" + + "/ac-svc:name"; + } + description + "Defines a reference to an attachment circuit profile."; + } + + typedef encryption-profile-reference { + type leafref { + path + "/ac-svc:specific-provisioning-profiles" + + "/ac-svc:valid-provider-identifiers" + + "/ac-svc:encryption-profile-identifier/ac-svc:id"; + } + description + "Defines a reference to an encryption profile."; + } + + typedef qos-profile-reference { + type leafref { + path + "/ac-svc:specific-provisioning-profiles" + + "/ac-svc:valid-provider-identifiers" + + "/ac-svc:qos-profile-identifier/ac-svc:id"; + } + description + "Defines a reference to a QoS profile."; + } + + typedef failure-detection-profile-reference { + type leafref { + path + "/ac-svc:specific-provisioning-profiles" + + "/ac-svc:valid-provider-identifiers" + + "/ac-svc:failure-detection-profile-identifier" + + "/ac-svc:id"; + } + description + "Defines a reference to a BFD profile."; + } + + typedef forwarding-profile-reference { + type leafref { + path + "/ac-svc:specific-provisioning-profiles" + + "/ac-svc:valid-provider-identifiers" + + "/ac-svc:forwarding-profile-identifier/ac-svc:id"; + } + description + "Defines a reference to a forwarding profile."; + } + + typedef routing-profile-reference { + type leafref { + path + "/ac-svc:specific-provisioning-profiles" + + "/ac-svc:valid-provider-identifiers" + + "/ac-svc:routing-profile-identifier/ac-svc:id"; + } + description + "Defines a reference to a routing profile."; + } + + typedef service-profile-reference { + type leafref { + path + "/ac-svc:service-provisioning-profiles" + + "/ac-svc:service-profile-identifier" + + "/ac-svc:id"; + } + description + "Defines a reference to a service profile."; + } + + /******************** Reusable groupings ********************/ + // Basic Layer 2 connection + + grouping l2-connection-basic { + description + "Defines Layer 2 protocols and parameters that can be + factorized when provisioning Layer 2 connectivity + among multiple ACs."; + container encapsulation { + description + "Container for Layer 2 encapsulation."; + leaf type { + type identityref { + base vpn-common:encapsulation-type; + } + description + "Encapsulation type."; + } + container dot1q { + when "derived-from-or-self(../type, 'vpn-common:dot1q')" { + description + "Only applies when the type of the tagged interface + is 'dot1q'."; + } + description + "Tagged interface."; + uses ac-common:dot1q; + } + container qinq { + when "derived-from-or-self(../type, 'vpn-common:qinq')" { + description + "Only applies when the type of the tagged interface + is 'qinq'."; + } + description + "Includes QinQ parameters."; + uses ac-common:qinq; + } + } + } + + // Full Layer 2 connection + + grouping l2-connection { + description + "Defines Layer 2 protocols and parameters that are used to + enable AC connectivity."; + container encapsulation { + description + "Container for Layer 2 encapsulation."; + leaf type { + type identityref { + base vpn-common:encapsulation-type; + } + description + "Indicates the encapsulation type."; + } + container dot1q { + when "derived-from-or-self(../type, 'vpn-common:dot1q')" { + description + "Only applies when the type of the tagged interface + is 'dot1q'."; + } + description + "Tagged interface."; + uses ac-common:dot1q; + } + container priority-tagged { + when "derived-from-or-self(../type, " + + "'vpn-common:priority-tagged')" { + description + "Only applies when the type of the tagged interface is + 'priority-tagged'."; + } + description + "Priority-tagged interface."; + uses ac-common:priority-tagged; + } + container qinq { + when "derived-from-or-self(../type, 'vpn-common:qinq')" { + description + "Only applies when the type of the tagged interface + is 'qinq'."; + } + description + "Includes QinQ parameters."; + uses ac-common:qinq; + } + } + choice l2-service { + description + "The Layer 2 connectivity service can be provided by + indicating a pointer to an L2VPN or by specifying a + Layer 2 tunnel service."; + container l2-tunnel-service { + description + "Defines a Layer 2 tunnel termination. + It is only applicable when a tunnel is required."; + uses ac-common:l2-tunnel-service; + } + case l2vpn { + leaf l2vpn-id { + type vpn-common:vpn-id; + description + "Indicates the L2VPN service associated with an + Integrated Routing and Bridging (IRB) interface."; + } + } + } + leaf bearer-reference { + if-feature "ac-common:server-assigned-reference"; + type string; + description + "This is an internal reference for the service provider + to identify the bearer associated with this AC."; + } + } + + // Basic IP connection + + grouping ip-connection-basic { + description + "Defines basic IP connection parameters."; + container ipv4 { + if-feature "vpn-common:ipv4"; + description + "IPv4-specific parameters."; + uses ac-common:ipv4-connection-basic; + } + container ipv6 { + if-feature "vpn-common:ipv6"; + description + "IPv6-specific parameters."; + uses ac-common:ipv6-connection-basic; + } + } + + // Full IP connection + + grouping ip-connection { + description + "Defines IP connection parameters."; + container ipv4 { + if-feature "vpn-common:ipv4"; + description + "IPv4-specific parameters."; + uses ac-common:ipv4-connection { + augment ac-svc:allocation-type/static-addresses/address { + leaf failure-detection-profile { + if-feature "vpn-common:bfd"; + type failure-detection-profile-reference; + description + "Points to a failure detection profile."; + } + description + "Adds a failure detection profile."; + } + } + } + container ipv6 { + if-feature "vpn-common:ipv6"; + description + "IPv6-specific parameters."; + uses ac-common:ipv6-connection { + augment ac-svc:allocation-type/static-addresses/address { + leaf failure-detection-profile { + if-feature "vpn-common:bfd"; + type failure-detection-profile-reference; + description + "Points to a failure detection profile."; + } + description + "Adds a failure detection profile."; + } + } + } + choice l3-service { + description + "The Layer 3 connectivity service can be provided by + specifying a Layer 3 tunnel service."; + container l3-tunnel-service { + description + "Defines a Layer 3 tunnel termination. + It is only applicable when a tunnel is required."; + leaf type { + type identityref { + base ac-common:l3-tunnel-type; + } + description + "Selects the tunnel termination type for an AC."; + } + } + } + } + + // Routing protocol list + + grouping routing-protocol-list { + description + "List of routing protocols used on the AC."; + leaf type { + type identityref { + base vpn-common:routing-protocol-type; + } + description + "Type of routing protocol."; + } + list routing-profiles { + key "id"; + description + "Routing profiles."; + leaf id { + type routing-profile-reference; + description + "Reference to the routing profile to be used."; + } + leaf type { + type identityref { + base vpn-common:ie-type; + } + description + "Import, export, or both."; + } + } + } + + // Static routing with BFD + + grouping ipv4-static-rtg-with-bfd { + description + "Configuration specific to IPv4 static routing with + failure protection (e.g., BFD)."; + list ipv4-lan-prefix { + if-feature "vpn-common:ipv4"; + key "lan next-hop"; + description + "List of LAN prefixes for the site."; + uses ac-common:ipv4-static-rtg-entry; + leaf failure-detection-profile { + if-feature "vpn-common:bfd"; + type failure-detection-profile-reference; + description + "Points to a failure detection profile."; + } + uses ac-common:service-status; + } + } + + grouping ipv6-static-rtg-with-bfd { + description + "Configuration specific to IPv6 static routing with + failure protection (e.g., BFD)."; + list ipv6-lan-prefix { + if-feature "vpn-common:ipv6"; + key "lan next-hop"; + description + "List of LAN prefixes for the site."; + uses ac-common:ipv6-static-rtg-entry; + leaf failure-detection-profile { + if-feature "vpn-common:bfd"; + type failure-detection-profile-reference; + description + "Points to a failure detection profile."; + } + uses ac-common:service-status; + } + } + + // BGP Service + + grouping bgp-neighbor-without-name { + description + "A grouping with generic parameters for configuring a BGP + neighbor."; + leaf remote-address { + type inet:ip-address; + description + "The remote IP address of this entry's BGP peer. This is + a customer IP address. + + If this leaf is not present, this means that the primary + customer IP address is used as remote IP address."; + } + leaf local-address { + type inet:ip-address; + description + "The provider's IP address that will be used to establish + the BGP session."; + } + uses ac-common:bgp-peer-group-without-name; + container bgp-max-prefix { + description + "A container for the maximum number of BGP prefixes + allowed in the BGP session."; + leaf max-prefix { + type uint32; + description + "Indicates the maximum number of BGP prefixes allowed + in the BGP session. + + It allows control of how many prefixes can be received + from a neighbor."; + reference + "RFC 4271: A Border Gateway Protocol 4 (BGP-4), + Section 8.2.2"; + } + } + uses ac-common:bgp-authentication; + uses ac-common:op-instructions; + uses ac-common:service-status; + } + + grouping bgp-neighbor-with-name { + description + "A grouping with generic parameters for configuring a BGP + neighbor with an identifier."; + leaf id { + type string; + description + "An identifier that uniquely identifies a neighbor."; + } + uses ac-svc:bgp-neighbor-without-name; + } + + grouping bgp-neighbor-with-server-reference { + description + "A grouping with generic parameters for configuring a BGP + neighbor with a reference generated by the provider."; + leaf server-reference { + if-feature "ac-common:server-assigned-reference"; + type string; + config false; + description + "This is an internal reference for the service provider + to identify the BGP session."; + } + uses ac-svc:bgp-neighbor-without-name; + } + + grouping bgp-neighbor-with-name-server-reference { + description + "A grouping with generic parameters for configuring a BGP + neighbor with an identifier and a reference generated by + the provider."; + leaf id { + type string; + description + "An identifier that uniquely identifiers a neighbor."; + } + uses ac-svc:bgp-neighbor-with-server-reference; + } + + grouping bgp-svc { + description + "Configuration specific to BGP."; + container peer-groups { + description + "Configuration for BGP peer-groups"; + list peer-group { + key "name"; + description + "List of BGP peer-groups configured on the local + system - uniquely identified by peer-group + name."; + uses ac-common:bgp-peer-group-with-name; + leaf local-address { + type inet:ip-address; + description + "The provider's local IP address that will be used to + establish the BGP session."; + } + container bgp-max-prefix { + description + "A container for the maximum number of BGP prefixes + allowed in the BGP session."; + leaf max-prefix { + type uint32; + description + "Indicates the maximum number of BGP prefixes allowed + in the BGP session. + + It allows control of how many prefixes can be received + from a neighbor."; + reference + "RFC 4271: A Border Gateway Protocol 4 (BGP-4), + Section 8.2.2"; + } + } + uses ac-common:bgp-authentication; + } + } + list neighbor { + key "id"; + description + "List of BGP neighbors."; + uses ac-svc:bgp-neighbor-with-name-server-reference; + leaf peer-group { + type leafref { + path "../../peer-groups/peer-group/name"; + } + description + "The peer-group with which this neighbor is associated."; + } + leaf failure-detection-profile { + if-feature "vpn-common:bfd"; + type failure-detection-profile-reference; + description + "Points to a failure detection profile."; + } + } + } + + // OSPF Service + + grouping ospf-svc { + description + "Service configuration specific to OSPF."; + uses ac-common:ospf-basic; + uses ac-common:ospf-authentication; + uses ac-common:service-status; + } + + // IS-IS Service + + grouping isis-svc { + description + "Service configuration specific to IS-IS."; + uses ac-common:isis-basic; + uses ac-common:isis-authentication; + uses ac-common:service-status; + } + + // RIP Service + + grouping rip-svc { + description + "Service configuration specific to RIP routing."; + leaf address-family { + type identityref { + base vpn-common:address-family; + } + description + "Indicates whether IPv4, IPv6, or both address families + are to be activated."; + } + uses ac-common:rip-authentication; + uses ac-common:service-status; + } + + // VRRP Service + + grouping vrrp-svc { + description + "Service configuration specific to VRRP."; + reference + "RFC 9568: Virtual Router Redundancy Protocol (VRRP) + Version 3 for IPv4 and IPv6"; + leaf address-family { + type identityref { + base vpn-common:address-family; + } + description + "Indicates whether IPv4, IPv6, or both + address families are to be enabled."; + } + uses ac-common:service-status; + } + + // Basic routing parameters + + grouping routing-basic { + description + "Defines basic parameters for routing protocols."; + list routing-protocol { + key "id"; + description + "List of routing protocols used on the AC."; + leaf id { + type string; + description + "Unique identifier for the routing protocol."; + } + uses routing-protocol-list; + container bgp { + when + "derived-from-or-self(../type, 'vpn-common:bgp-routing')" { + description + "Only applies when the protocol is BGP."; + } + if-feature "vpn-common:rtg-bgp"; + description + "Configuration specific to BGP."; + container peer-groups { + description + "Configuration for BGP peer-groups"; + list peer-group { + key "name"; + description + "List of BGP peer-groups configured on the local + system - uniquely identified by peer-group + name."; + uses ac-common:bgp-peer-group-with-name; + } + } + } + container ospf { + when "derived-from-or-self(../type, " + + "'vpn-common:ospf-routing')" { + description + "Only applies when the protocol is OSPF."; + } + if-feature "vpn-common:rtg-ospf"; + description + "Configuration specific to OSPF."; + uses ac-common:ospf-basic; + } + container isis { + when "derived-from-or-self(../type, " + + "'vpn-common:isis-routing')" { + description + "Only applies when the protocol is IS-IS."; + } + if-feature "vpn-common:rtg-isis"; + description + "Configuration specific to IS-IS."; + uses ac-common:isis-basic; + } + container rip { + when "derived-from-or-self(../type, " + + "'vpn-common:rip-routing')" { + description + "Only applies when the protocol is RIP. + For IPv4, the model assumes that RIP + version 2 is used."; + } + if-feature "vpn-common:rtg-rip"; + description + "Configuration specific to RIP routing."; + leaf address-family { + type identityref { + base vpn-common:address-family; + } + description + "Indicates whether IPv4, IPv6, or both + address families are to be activated."; + } + } + container vrrp { + when "derived-from-or-self(../type, " + + "'vpn-common:vrrp-routing')" { + description + "Only applies when the protocol is the + Virtual Router Redundancy Protocol (VRRP)."; + } + if-feature "vpn-common:rtg-vrrp"; + description + "Configuration specific to VRRP."; + leaf address-family { + type identityref { + base vpn-common:address-family; + } + description + "Indicates whether IPv4, IPv6, or both address families + are to be enabled."; + } + } + } + } + + // Full routing parameters + + grouping routing { + description + "Defines routing protocols."; + list routing-protocol { + key "id"; + description + "List of routing protocols used on the AC."; + leaf id { + type string; + description + "Unique identifier for the routing protocol."; + } + uses routing-protocol-list; + container static { + when "derived-from-or-self(../type, " + + "'vpn-common:static-routing')" { + description + "Only applies when the protocol is static routing + protocol."; + } + description + "Configuration specific to static routing."; + container cascaded-lan-prefixes { + description + "LAN prefixes from the customer."; + uses ipv4-static-rtg-with-bfd; + uses ipv6-static-rtg-with-bfd; + } + } + container bgp { + when "derived-from-or-self(../type, " + + "'vpn-common:bgp-routing')" { + description + "Only applies when the protocol is BGP."; + } + if-feature "vpn-common:rtg-bgp"; + description + "Configuration specific to BGP."; + uses bgp-svc; + } + container ospf { + when "derived-from-or-self(../type, " + + "'vpn-common:ospf-routing')" { + description + "Only applies when the protocol is OSPF."; + } + if-feature "vpn-common:rtg-ospf"; + description + "Configuration specific to OSPF."; + uses ospf-svc; + } + container isis { + when "derived-from-or-self(../type, " + + "'vpn-common:isis-routing')" { + description + "Only applies when the protocol is IS-IS."; + } + if-feature "vpn-common:rtg-isis"; + description + "Configuration specific to IS-IS."; + uses isis-svc; + } + container rip { + when "derived-from-or-self(../type, " + + "'vpn-common:rip-routing')" { + description + "Only applies when the protocol is RIP. + For IPv4, the model assumes that RIP version 2 is + used."; + } + if-feature "vpn-common:rtg-rip"; + description + "Configuration specific to RIP routing."; + uses rip-svc; + } + container vrrp { + when "derived-from-or-self(../type, " + + "'vpn-common:vrrp-routing')" { + description + "Only applies when the protocol is the Virtual Router + Redundancy Protocol (VRRP)."; + } + if-feature "vpn-common:rtg-vrrp"; + description + "Configuration specific to VRRP."; + uses vrrp-svc; + } + } + } + + // Encryption choice + + grouping encryption-choice { + description + "Container for the encryption profile."; + choice profile { + description + "Choice for the encryption profile."; + case provider-profile { + leaf provider-profile { + type encryption-profile-reference; + description + "Reference to a provider encryption profile."; + } + } + case customer-profile { + leaf customer-key-chain { + type key-chain:key-chain-ref; + description + "Customer-supplied key chain."; + } + } + } + } + + // Basic security parameters + + grouping ac-security-basic { + description + "AC-specific security parameters."; + container encryption { + if-feature "vpn-common:encryption"; + description + "Container for AC security encryption."; + leaf enabled { + type boolean; + description + "If set to 'true', traffic encryption on the connection + is required. Otherwise, it is disabled."; + } + leaf layer { + when "../enabled = 'true'" { + description + "Included only when encryption is enabled."; + } + type enumeration { + enum layer2 { + description + "Encryption occurs at Layer 2."; + } + enum layer3 { + description + "Encryption occurs at Layer 3. + For example, IPsec may be used when a customer + requests Layer 3 encryption."; + } + } + description + "Indicates the layer on which encryption is applied."; + } + } + container encryption-profile { + when "../encryption/enabled = 'true'" { + description + "Indicates the layer on which encryption is enabled."; + } + description + "Container for the encryption profile."; + uses encryption-choice; + } + } + + // Bandwith parameters + + grouping bandwidth { + description + "Container for bandwidth."; + container svc-pe-to-ce-bandwidth { + if-feature "vpn-common:inbound-bw"; + description + "From the customer site's perspective, the inbound + bandwidth of the AC or download bandwidth from the + service provider to the site."; + uses ac-common:bandwidth-per-type; + } + container svc-ce-to-pe-bandwidth { + if-feature "vpn-common:outbound-bw"; + description + "From the customer site's perspective, the outbound + bandwidth of the AC or upload bandwidth from + the CE to the PE."; + uses ac-common:bandwidth-per-type; + } + } + + // Basic AC parameters + + grouping ac-basic { + description + "Grouping for basic parameters for an attachment circuit."; + leaf name { + type string; + description + "A name that uniquely identifies the AC."; + } + container l2-connection { + if-feature "ac-common:layer2-ac"; + description + "Defines Layer 2 protocols and parameters that are required + to enable AC connectivity."; + uses l2-connection-basic; + } + container ip-connection { + if-feature "ac-common:layer3-ac"; + description + "Defines IP connection parameters."; + uses ip-connection-basic; + } + container routing-protocols { + description + "Defines routing protocols."; + uses routing-basic; + } + container oam { + description + "Defines the Operations, Administration, and Maintenance + (OAM) mechanisms used."; + container bfd { + if-feature "vpn-common:bfd"; + description + "Container for BFD."; + uses ac-common:bfd; + } + } + container security { + description + "AC-specific security parameters."; + uses ac-security-basic; + } + container service { + description + "AC-specific bandwith parameters."; + leaf mtu { + type uint32; + units "bytes"; + description + "Layer 2 MTU."; + } + uses bandwidth; + } + } + + // Full AC parameters + + grouping ac { + description + "Grouping for an attachment circuit."; + leaf name { + type string; + description + "A name of the AC. Data models that need to reference + an attachment circuit should use + attachment-circuit-reference."; + } + leaf-list service-profile { + type service-profile-reference; + description + "A reference to a service profile."; + } + container l2-connection { + if-feature "ac-common:layer2-ac"; + description + "Defines Layer 2 protocols and parameters that are required + to enable AC connectivity."; + uses l2-connection; + } + container ip-connection { + if-feature "ac-common:layer3-ac"; + description + "Defines IP connection parameters."; + uses ip-connection; + } + container routing-protocols { + description + "Defines routing protocols."; + uses routing; + } + container oam { + description + "Defines the OAM mechanisms used."; + container bfd { + if-feature "vpn-common:bfd"; + description + "Container for BFD."; + list session { + key "id"; + description + "List of BFD sessions."; + leaf id { + type string; + description + "A unique identifer for the BFD session."; + } + leaf local-address { + type inet:ip-address; + description + "Provider's IP address of the BFD session."; + } + leaf remote-address { + type inet:ip-address; + description + "Customer's IP address of the BFD session."; + } + leaf profile { + type failure-detection-profile-reference; + description + "Points to a BFD profile."; + } + uses ac-common:bfd; + uses ac-common:service-status; + } + } + } + container security { + description + "AC-specific security parameters."; + uses ac-security-basic; + } + container service { + description + "AC-specific bandwith parameters."; + leaf mtu { + type uint32; + units "bytes"; + description + "Layer 2 MTU."; + } + uses bandwidth; + container qos { + if-feature "vpn-common:qos"; + description + "QoS configuration."; + container qos-profiles { + description + "QoS profile configuration."; + list qos-profile { + key "profile"; + description + "Points to a QoS profile."; + leaf profile { + type qos-profile-reference; + description + "QoS profile to be used."; + } + leaf direction { + type identityref { + base vpn-common:qos-profile-direction; + } + description + "The direction to which the QoS profile + is applied."; + } + } + } + } + container access-control-list { + description + "Container for the Access Control List (ACL)."; + container acl-profiles { + description + "ACL profile configuration."; + list acl-profile { + key "profile"; + description + "Points to an ACL profile."; + leaf profile { + type forwarding-profile-reference; + description + "Forwarding profile to be used."; + } + } + } + } + } + } + + // Parent and Child ACs + + grouping ac-hierarchy { + description + "Container for parent and child AC references."; + leaf-list parent-ref { + type ac-svc:attachment-circuit-reference; + description + "Specifies a parent AC that is inherited by an AC. + In contexts where dynamic terminating points are + bound to the same AC, a parent AC with stable + information is created with a set of child ACs + to track dynamic AC information."; + } + leaf-list child-ref { + type ac-svc:attachment-circuit-reference; + config false; + description + "Specifies a child AC that relies upon a parent AC."; + } + } + + /******************** Main AC containers ********************/ + + container specific-provisioning-profiles { + description + "Contains a set of valid profiles to reference for an AC."; + uses ac-common:ac-profile-cfg; + } + container service-provisioning-profiles { + description + "Contains a set of valid profiles to reference for an AC."; + list service-profile-identifier { + key "id"; + description + "List of generic service profile identifiers."; + leaf id { + type string; + description + "Identification of the service profile to be used. + The profile only has significance within the service + provider's administrative domain."; + } + } + nacm:default-deny-write; + } + container attachment-circuits { + description + "Main container for the attachment circuits."; + list ac-group-profile { + key "name"; + description + "Maintains a list of profiles that are shared among + a set of ACs."; + uses ac; + } + container placement-constraints { + description + "Diversity constraint type."; + uses vpn-common:placement-constraints; + } + leaf customer-name { + type string; + description + "Indicates the name of the customer that requested these + ACs."; + } + uses ac-common:op-instructions; + list ac { + key "name"; + description + "Global provisioning of attachment circuits."; + leaf customer-name { + type string; + description + "Indicates the name of the customer that requested this + AC."; + } + leaf description { + type string; + description + "Associates a description with an AC."; + } + leaf test-only { + type empty; + description + "When present, this indicates that this is a feasibility + check request. No resources are commited for such AC + requests."; + } + uses ac-common:op-instructions; + leaf role { + type identityref { + base ac-common:role; + } + description + "Indicates whether this AC is used as UNI, NNI, etc."; + } + leaf-list peer-sap-id { + type string; + description + "One or more peer SAPs can be indicated."; + } + leaf-list group-profile-ref { + type ac-group-reference; + description + "A reference to an AC profile."; + } + uses ac-hierarchy; + uses ac-common:redundancy-group; + list service-ref { + key "service-type service-id"; + config false; + description + "Reports the set of services that are bound to the AC."; + leaf service-type { + type identityref { + base vpn-common:service-type; + } + description + "Indicates the service type (e.g., L3VPN or Network Slice + Service)."; + reference + "RFC 9408: A YANG Network Data Model for Service + Attachment Points (SAPs), Section 5"; + } + leaf service-id { + type string; + description + "Indicates an identifier of a service instance + of a given type that uses the AC."; + } + } + leaf server-reference { + if-feature "ac-common:server-assigned-reference"; + type string; + config false; + description + "Reports an internal reference for the service provider + to identify the AC."; + } + uses ac; + } + } +} \ No newline at end of file diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ethertypes@2019-03-04.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ethertypes@2019-03-04.yang new file mode 100644 index 000000000..fd055074a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ethertypes@2019-03-04.yang @@ -0,0 +1,381 @@ +module ietf-ethertypes { + namespace "urn:ietf:params:xml:ns:yang:ietf-ethertypes"; + prefix ethertypes; + + organization + "IETF NETMOD (Network Modeling) Working Group."; + + contact + "WG Web: + WG List: + + Editor: Mahesh Jethanandani + "; + + description + "This module contains common definitions for the + Ethertype used by different modules. It is a + placeholder module, till such time that IEEE + starts a project to define these Ethertypes + and publishes a standard. + + At that time, this module can be deprecated. + + Copyright (c) 2019 IETF Trust and the persons identified as + the document authors. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD + License set forth in Section 4.c of the IETF Trust's Legal + Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8519; see + the RFC itself for full legal notices."; + + revision 2019-03-04 { + description + "Initial revision."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)."; + } + + typedef ethertype { + type union { + type uint16; + type enumeration { + enum ipv4 { + value 2048; + description + "Internet Protocol version 4 (IPv4) with a + hex value of 0x0800."; + reference + "RFC 791: Internet Protocol."; + } + enum arp { + value 2054; + description + "Address Resolution Protocol (ARP) with a + hex value of 0x0806."; + reference + "RFC 826: An Ethernet Address Resolution Protocol: Or + Converting Network Protocol Addresses to 48.bit + Ethernet Address for Transmission on Ethernet + Hardware."; + } + enum wlan { + value 2114; + description + "Wake-on-LAN. Hex value of 0x0842."; + } + enum trill { + value 8947; + description + "Transparent Interconnection of Lots of Links. + Hex value of 0x22F3."; + reference + "RFC 6325: Routing Bridges (RBridges): Base Protocol + Specification."; + } + enum srp { + value 8938; + description + "Stream Reservation Protocol. Hex value of + 0x22EA."; + reference + "IEEE 801.1Q-2011."; + } + enum decnet { + value 24579; + description + "DECnet Phase IV. Hex value of 0x6003."; + } + enum rarp { + value 32821; + description + "Reverse Address Resolution Protocol. + Hex value 0x8035."; + reference + "RFC 903: A Reverse Address Resolution Protocol."; + } + enum appletalk { + value 32923; + description + "Appletalk (Ethertalk). Hex value of 0x809B."; + } + enum aarp { + value 33011; + description + "Appletalk Address Resolution Protocol. Hex value + of 0x80F3."; + } + enum vlan { + value 33024; + description + "VLAN-tagged frame (IEEE 802.1Q) and Shortest Path + Bridging IEEE 802.1aq with Network-Network + Interface (NNI) compatibility. Hex value of + 0x8100."; + reference + "IEEE 802.1Q."; + } + enum ipx { + value 33079; + description + "Internetwork Packet Exchange (IPX). Hex value + of 0x8137."; + } + enum qnx { + value 33284; + description + "QNX Qnet. Hex value of 0x8204."; + } + enum ipv6 { + value 34525; + description + "Internet Protocol Version 6 (IPv6). Hex value + of 0x86DD."; + reference + "RFC 8200: Internet Protocol, Version 6 (IPv6) + Specification + RFC 8201: Path MTU Discovery for IP version 6."; + } + enum efc { + value 34824; + description + "Ethernet flow control using pause frames. + Hex value of 0x8808."; + reference + "IEEE 802.1Qbb."; + } + enum esp { + value 34825; + description + "Ethernet Slow Protocol. Hex value of 0x8809."; + reference + "IEEE 802.3-2015."; + } + enum cobranet { + value 34841; + description + "CobraNet. Hex value of 0x8819."; + } + enum mpls-unicast { + value 34887; + description + "Multiprotocol Label Switching (MPLS) unicast traffic. + Hex value of 0x8847."; + reference + "RFC 3031: Multiprotocol Label Switching Architecture."; + } + enum mpls-multicast { + value 34888; + description + "MPLS multicast traffic. Hex value of 0x8848."; + reference + "RFC 3031: Multiprotocol Label Switching Architecture."; + } + enum pppoe-discovery { + value 34915; + description + "Point-to-Point Protocol over Ethernet. Used during + the discovery process. Hex value of 0x8863."; + reference + "RFC 2516: A Method for Transmitting PPP Over Ethernet + (PPPoE)."; + } + enum pppoe-session { + value 34916; + description + "Point-to-Point Protocol over Ethernet. Used during + session stage. Hex value of 0x8864."; + reference + "RFC 2516: A Method for Transmitting PPP Over Ethernet + (PPPoE)."; + } + enum intel-ans { + value 34925; + description + "Intel Advanced Networking Services. Hex value of + 0x886D."; + } + enum jumbo-frames { + value 34928; + description + "Jumbo frames or Ethernet frames with more than + 1500 bytes of payload, up to 9000 bytes."; + } + enum homeplug { + value 34939; + description + "Family name for the various power line + communications. Hex value of 0x887B."; + } + enum eap { + value 34958; + description + "Ethernet Access Protocol (EAP) over LAN. Hex value + of 0x888E."; + reference + "IEEE 802.1X."; + } + enum profinet { + value 34962; + description + "PROcess FIeld Net (PROFINET). Hex value of 0x8892."; + } + enum hyperscsi { + value 34970; + description + "Small Computer System Interface (SCSI) over Ethernet. + Hex value of 0x889A."; + } + enum aoe { + value 34978; + description + "Advanced Technology Advancement (ATA) over Ethernet. + Hex value of 0x88A2."; + } + enum ethercat { + value 34980; + description + "Ethernet for Control Automation Technology (EtherCAT). + Hex value of 0x88A4."; + } + enum provider-bridging { + value 34984; + description + "Provider Bridging (802.1ad) and Shortest Path Bridging + (801.1aq). Hex value of 0x88A8."; + reference + "IEEE 802.1ad and IEEE 802.1aq)."; + } + enum ethernet-powerlink { + value 34987; + description + "Ethernet Powerlink. Hex value of 0x88AB."; + } + enum goose { + value 35000; + description + "Generic Object Oriented Substation Event (GOOSE). + Hex value of 0x88B8."; + reference + "IEC/ISO 8802-2 and 8802-3."; + } + enum gse { + value 35001; + description + "Generic Substation Events. Hex value of 88B9."; + reference + "IEC 61850."; + } + enum sv { + value 35002; + description + "Sampled Value Transmission. Hex value of 0x88BA."; + reference + "IEC 61850."; + } + enum lldp { + value 35020; + description + "Link Layer Discovery Protocol (LLDP). Hex value of + 0x88CC."; + reference + "IEEE 802.1AB."; + } + enum sercos { + value 35021; + description + "Sercos Interface. Hex value of 0x88CD."; + } + enum wsmp { + value 35036; + description + "WAVE Short Message Protocol (WSMP). Hex value of + 0x88DC."; + } + enum homeplug-av-mme { + value 35041; + description + "HomePlug AV Mobile Management Entity (MME). Hex value + of 88E1."; + } + enum mrp { + value 35043; + description + "Media Redundancy Protocol (MRP). Hex value of + 0x88E3."; + reference + "IEC 62439-2."; + } + enum macsec { + value 35045; + description + "MAC Security. Hex value of 0x88E5."; + reference + "IEEE 802.1AE."; + } + enum pbb { + value 35047; + description + "Provider Backbone Bridges (PBB). Hex value of + 0x88E7."; + reference + "IEEE 802.1ah."; + } + enum cfm { + value 35074; + description + "Connectivity Fault Management (CFM). Hex value of + 0x8902."; + reference + "IEEE 802.1ag."; + } + enum fcoe { + value 35078; + description + "Fiber Channel over Ethernet (FCoE). Hex value of + 0x8906."; + reference + "T11 FC-BB-5."; + } + enum fcoe-ip { + value 35092; + description + "FCoE Initialization Protocol. Hex value of 0x8914."; + } + enum roce { + value 35093; + description + "RDMA over Converged Ethernet (RoCE). Hex value of + 0x8915."; + } + enum tte { + value 35101; + description + "TTEthernet Protocol Control Frame (TTE). Hex value + of 0x891D."; + reference + "SAE AS6802."; + } + enum hsr { + value 35119; + description + "High-availability Seamless Redundancy (HSR). Hex + value of 0x892F."; + reference + "IEC 62439-3:2016."; + } + } + } + description + "The uint16 type placeholder is defined to enable + users to manage their own ethertypes not + covered by the module. Otherwise, the module contains + enum definitions for the more commonly used ethertypes."; + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-geo-location@2022-02-11.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-geo-location@2022-02-11.yang new file mode 100644 index 000000000..b815446f8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-geo-location@2022-02-11.yang @@ -0,0 +1,278 @@ +module ietf-geo-location { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-geo-location"; + prefix geo; + import ietf-yang-types { + prefix yang; + reference "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF NETMOD Working Group (NETMOD)"; + contact + "WG Web: + WG List: + + Editor: Christian Hopps + "; + + description + "This module defines a grouping of a container object for + specifying a location on or around an astronomical object (e.g., + 'earth'). + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', + 'MAY', and 'OPTIONAL' in this document are to be interpreted as + described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, + they appear in all capitals, as shown here. + + Copyright (c) 2022 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, + with or without modification, is permitted pursuant to, + and subject to the license terms contained in, the + Revised BSD License set forth in Section 4.c of the + IETF Trust's Legal Provisions Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 9179 + (https://www.rfc-editor.org/info/rfc9179); see the RFC itself + for full legal notices."; + + revision 2022-02-11 { + description + "Initial Revision"; + reference + "RFC 9179: A YANG Grouping for Geographic Locations"; + } + + feature alternate-systems { + description + "This feature means the device supports specifying locations + using alternate systems for reference frames."; + } + + grouping geo-location { + description + "Grouping to identify a location on an astronomical object."; + + container geo-location { + description + "A location on an astronomical body (e.g., 'earth') + somewhere in a universe."; + + container reference-frame { + description + "The Frame of Reference for the location values."; + + leaf alternate-system { + if-feature "alternate-systems"; + type string; + description + "The system in which the astronomical body and + geodetic-datum is defined. Normally, this value is not + present and the system is the natural universe; however, + when present, this value allows for specifying alternate + systems (e.g., virtual realities). An alternate-system + modifies the definition (but not the type) of the other + values in the reference frame."; + } + leaf astronomical-body { + type string { + pattern '[ -@\[-\^_-~]*'; + } + default "earth"; + description + "An astronomical body as named by the International + Astronomical Union (IAU) or according to the alternate + system if specified. Examples include 'sun' (our star), + 'earth' (our planet), 'moon' (our moon), 'enceladus' (a + moon of Saturn), 'ceres' (an asteroid), and + '67p/churyumov-gerasimenko (a comet). The ASCII value + SHOULD have uppercase converted to lowercase and not + include control characters (i.e., values 32..64, and + 91..126). Any preceding 'the' in the name SHOULD NOT be + included."; + reference + "https://www.iau.org/"; + } + container geodetic-system { + description + "The geodetic system of the location data."; + leaf geodetic-datum { + type string { + pattern '[ -@\[-\^_-~]*'; + } + description + "A geodetic-datum defining the meaning of latitude, + longitude, and height. The default when the + astronomical body is 'earth' is 'wgs-84', which is + used by the Global Positioning System (GPS). The + ASCII value SHOULD have uppercase converted to + lowercase and not include control characters + (i.e., values 32..64, and 91..126). The IANA registry + further restricts the value by converting all spaces + (' ') to dashes ('-'). + The specification for the geodetic-datum indicates + how accurately it models the astronomical body in + question, both for the 'horizontal' + latitude/longitude coordinates and for height + coordinates."; + reference + "RFC 9179: A YANG Grouping for Geographic Locations, + Section 6.1"; + } + leaf coord-accuracy { + type decimal64 { + fraction-digits 6; + } + description + "The accuracy of the latitude/longitude pair for + ellipsoidal coordinates, or the X, Y, and Z components + for Cartesian coordinates. When coord-accuracy is + specified, it indicates how precisely the coordinates + in the associated list of locations have been + determined with respect to the coordinate system + defined by the geodetic-datum. For example, there + might be uncertainty due to measurement error if an + experimental measurement was made to determine each + location."; + } + leaf height-accuracy { + type decimal64 { + fraction-digits 6; + } + units "meters"; + description + "The accuracy of the height value for ellipsoidal + coordinates; this value is not used with Cartesian + coordinates. When height-accuracy is specified, it + indicates how precisely the heights in the + associated list of locations have been determined + with respect to the coordinate system defined by the + geodetic-datum. For example, there might be + uncertainty due to measurement error if an + experimental measurement was made to determine each + location."; + } + } + } + choice location { + description + "The location data either in latitude/longitude or + Cartesian values"; + case ellipsoid { + leaf latitude { + type decimal64 { + fraction-digits 16; + } + units "decimal degrees"; + description + "The latitude value on the astronomical body. The + definition and precision of this measurement is + indicated by the reference-frame."; + } + leaf longitude { + type decimal64 { + fraction-digits 16; + } + units "decimal degrees"; + description + "The longitude value on the astronomical body. The + definition and precision of this measurement is + indicated by the reference-frame."; + } + leaf height { + type decimal64 { + fraction-digits 6; + } + units "meters"; + description + "Height from a reference 0 value. The precision and + '0' value is defined by the reference-frame."; + } + } + case cartesian { + leaf x { + type decimal64 { + fraction-digits 6; + } + units "meters"; + description + "The X value as defined by the reference-frame."; + } + leaf y { + type decimal64 { + fraction-digits 6; + } + units "meters"; + description + "The Y value as defined by the reference-frame."; + } + leaf z { + type decimal64 { + fraction-digits 6; + } + units "meters"; + description + "The Z value as defined by the reference-frame."; + } + } + } + container velocity { + description + "If the object is in motion, the velocity vector describes + this motion at the time given by the timestamp. For a + formula to convert these values to speed and heading, see + RFC 9179."; + reference + "RFC 9179: A YANG Grouping for Geographic Locations"; + + leaf v-north { + type decimal64 { + fraction-digits 12; + } + units "meters per second"; + description + "v-north is the rate of change (i.e., speed) towards + true north as defined by the geodetic-system."; + } + + leaf v-east { + type decimal64 { + fraction-digits 12; + } + units "meters per second"; + description + "v-east is the rate of change (i.e., speed) perpendicular + to the right of true north as defined by + the geodetic-system."; + } + + leaf v-up { + type decimal64 { + fraction-digits 12; + } + units "meters per second"; + description + "v-up is the rate of change (i.e., speed) away from the + center of mass."; + } + } + leaf timestamp { + type yang:date-and-time; + description + "Reference time when location was recorded."; + } + leaf valid-until { + type yang:date-and-time; + description + "The timestamp for which this geo-location is valid until. + If unspecified, the geo-location has no specific + expiration time."; + } + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-inet-types@2024-10-21.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-inet-types@2024-10-21.yang new file mode 100644 index 000000000..78c5201ba --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-inet-types@2024-10-21.yang @@ -0,0 +1,657 @@ +module ietf-inet-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types"; + prefix "inet"; + + organization + "IETF Network Modeling (NETMOD) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Juergen Schoenwaelder + "; + + description + "This module contains a collection of generally useful derived + YANG data types for Internet addresses and related things. + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', + 'MAY', and 'OPTIONAL' in this document are to be interpreted as + described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, + they appear in all capitals, as shown here. + + Copyright (c) 2024 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Revised BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; + see the RFC itself for full legal notices."; + + revision 2024-10-21 { + description + "This revision adds the following new data types: + - inet:ip-address-and-prefix + - inet:ipv4-address-and-prefix + - inet:ipv6-address-and-prefix + - inet:protocol-number + - inet:host-name + - inet:email-address + - inet:ip-address-link-local + - inet:ipv4-address-link-local + - inet:ipv6-address-link-local + The inet:host union was changed to use inet:host-name instead + of inet:domain-name. Several pattern statements have been + improved."; + reference + "RFC XXXX: Common YANG Data Types"; + } + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - inet:ip-address-no-zone + - inet:ipv4-address-no-zone + - inet:ipv6-address-no-zone"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of types related to protocol fields ***/ + + typedef ip-version { + type enumeration { + enum unknown { + value "0"; + description + "An unknown or unspecified version of the Internet + protocol."; + } + enum ipv4 { + value "1"; + description + "The IPv4 protocol as defined in RFC 791."; + } + enum ipv6 { + value "2"; + description + "The IPv6 protocol as defined in RFC 8200."; + } + } + description + "This value represents the version of the IP protocol. + + In the value set and its semantics, this type is equivalent + to the InetVersion textual convention of the SMIv2."; + reference + "RFC 791: Internet Protocol + RFC 8200: Internet Protocol, Version 6 (IPv6) Specification + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + typedef dscp { + type uint8 { + range "0..63"; + } + description + "The dscp type represents a Differentiated Services Code Point + that may be used for marking packets in a traffic stream. + + In the value set and its semantics, this type is equivalent + to the Dscp textual convention of the SMIv2."; + reference + "RFC 3289: Management Information Base for the Differentiated + Services Architecture + RFC 2474: Definition of the Differentiated Services Field + (DS Field) in the IPv4 and IPv6 Headers + RFC 2780: IANA Allocation Guidelines For Values In + the Internet Protocol and Related Headers"; + } + + typedef ipv6-flow-label { + type uint32 { + range "0..1048575"; + } + description + "The ipv6-flow-label type represents the flow identifier or + Flow Label in an IPv6 packet header that may be used to + discriminate traffic flows. + + In the value set and its semantics, this type is equivalent + to the IPv6FlowLabel textual convention of the SMIv2."; + reference + "RFC 3595: Textual Conventions for IPv6 Flow Label + RFC 8200: Internet Protocol, Version 6 (IPv6) Specification"; + } + + typedef port-number { + type uint16 { + range "0..65535"; + } + description + "The port-number type represents a 16-bit port number of an + Internet transport-layer protocol such as UDP, TCP, DCCP, or + SCTP. + + Port numbers are assigned by IANA. The current list of + all assignments is available from . + + Note that the port number value zero is reserved by IANA. In + situations where the value zero does not make sense, it can + be excluded by subtyping the port-number type. + + In the value set and its semantics, this type is equivalent + to the InetPortNumber textual convention of the SMIv2."; + reference + "RFC 768: User Datagram Protocol + RFC 9293: Transmission Control Protocol (TCP) + RFC 9260: Stream Control Transmission Protocol + RFC 4340: Datagram Congestion Control Protocol (DCCP) + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + typedef protocol-number { + type uint8; + description + "The protocol-number type represents an 8-bit Internet + protocol number, carried in the 'protocol' field of the + IPv4 header or in the 'next header' field of the IPv6 + header. If IPv6 extension headers are present, then the + protocol number type represents the upper layer protocol + number, i.e., the number of the last 'next header' field + of the IPv6 extension headers. + + Protocol numbers are assigned by IANA. The current list of + all assignments is available from ."; + reference + "RFC 791: Internet Protocol + RFC 8200: Internet Protocol, Version 6 (IPv6) Specification"; + } + + /*** collection of types related to autonomous systems ***/ + + typedef as-number { + type uint32; + description + "The as-number type represents autonomous system numbers + which identify an Autonomous System (AS). An AS is a set + of routers under a single technical administration, using + an interior gateway protocol and common metrics to route + packets within the AS, and using an exterior gateway + protocol to route packets to other ASes. IANA maintains + the AS number space and has delegated large parts to the + regional registries. + + Autonomous system numbers were originally limited to 16 + bits. BGP extensions have enlarged the autonomous system + number space to 32 bits. This type therefore uses an uint32 + base type without a range restriction in order to support + a larger autonomous system number space. + + In the value set and its semantics, this type is equivalent + to the InetAutonomousSystemNumber textual convention of + the SMIv2."; + reference + "RFC 1930: Guidelines for creation, selection, and registration + of an Autonomous System (AS) + RFC 4271: A Border Gateway Protocol 4 (BGP-4) + RFC 4001: Textual Conventions for Internet Network Addresses + RFC 6793: BGP Support for Four-Octet Autonomous System (AS) + Number Space"; + } + + /*** collection of types related to IP addresses and hostnames ***/ + + typedef ip-address { + type union { + type ipv4-address; + type ipv6-address; + } + description + "The ip-address type represents an IP address and is IP + version neutral. The format of the textual representation + implies the IP version. This type supports scoped addresses + by allowing zone identifiers in the address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '(%.+)?'; + } + description + "The ipv4-address type represents an IPv4 address in + dotted-quad notation. The IPv4 address may include a zone + index, separated by a % sign. If a system uses zone names + that are not represented in UTF-8, then an implementation + needs to use some mechanism to transform the local name + into UTF-8. The definition of such a mechanism is outside + the scope of this document. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format for the zone index is the numerical + format"; + } + + typedef ipv6-address { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(%[A-Za-z0-9][A-Za-z0-9\-\._~/]*)?'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(%.+)?'; + } + description + "The ipv6-address type represents an IPv6 address in full, + mixed, shortened, and shortened-mixed notation. The IPv6 + address may include a zone index, separated by a % sign. + If a system uses zone names that are not represented in + UTF-8, then an implementation needs to use some mechanism + to transform the local name into UTF-8. The definition of + such a mechanism is outside the scope of this document. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format of IPv6 addresses uses the textual + representation defined in Section 4 of RFC 5952. The + canonical format for the zone index is the numerical + format as described in Section 11.2 of RFC 4007."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-address-no-zone { + type union { + type ipv4-address-no-zone; + type ipv6-address-no-zone; + } + description + "The ip-address-no-zone type represents an IP address and is + IP version neutral. The format of the textual representation + implies the IP version. This type does not support scoped + addresses since it does not allow zone identifiers in the + address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address-no-zone { + type ipv4-address { + pattern '[0-9\.]*'; + } + description + "An IPv4 address without a zone index. This type, derived + from the type ipv4-address, may be used in situations where + the zone is known from the context and no zone index is + needed."; + } + + typedef ipv6-address-no-zone { + type ipv6-address { + pattern '[0-9a-fA-F:\.]*'; + } + description + "An IPv6 address without a zone index. This type, derived + from the type ipv6-address, may be used in situations where + the zone is known from the context and no zone index is + needed."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-address-link-local { + type union { + type ipv4-address-link-local; + type ipv6-address-link-local; + } + description + "The ip-address-link-local type represents a link-local IP + address and is IP version neutral. The format of the textual + representation implies the IP version."; + } + + typedef ipv4-address-link-local { + type ipv4-address { + pattern '169\.254\..*'; + } + description + "A link-local IPv4 address in the prefix 169.254.0.0/16 as + defined in section 2.1. of RFC 3927."; + reference + "RFC 3927: Dynamic Configuration of IPv4 Link-Local Addresses"; + } + + typedef ipv6-address-link-local { + type ipv6-address { + pattern '[fF][eE]80:.*'; + } + description + "A link-local IPv6 address in the prefix fe80::/10 as defined + in section 2.5.6. of RFC 4291."; + reference + "RFC 4291: IP Version 6 Addressing Architecture"; + } + + typedef ip-prefix { + type union { + type ipv4-prefix; + type ipv6-prefix; + } + description + "The ip-prefix type represents an IP prefix and is IP + version neutral. The format of the textual representations + implies the IP version."; + } + + typedef ipv4-prefix { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '/(([0-9])|([1-2][0-9])|(3[0-2]))'; + } + description + "The ipv4-prefix type represents an IPv4 prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 32. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The canonical format of an IPv4 prefix has all bits of + the IPv4 address set to zero that are not part of the + IPv4 prefix. + + The definition of ipv4-prefix does not require that bits, + which are not part of the prefix, are set to zero. However, + implementations have to return values in canonical format, + which requires non-prefix bits to be set to zero. This means + that 192.0.2.1/24 must be accepted as a valid value but it + will be converted into the canonical format 192.0.2.0/24."; + } + + typedef ipv6-prefix { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(/.+)'; + } + description + "The ipv6-prefix type represents an IPv6 prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 128. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The canonical format of an IPv6 prefix has all bits of + the IPv6 address set to zero that are not part of the + IPv6 prefix. Furthermore, the IPv6 address is represented + as defined in Section 4 of RFC 5952. + + The definition of ipv6-prefix does not require that bits, + which are not part of the prefix, are set to zero. However, + implementations have to return values in canonical format, + which requires non-prefix bits to be set to zero. This means + that 2001:db8::1/64 must be accepted as a valid value but it + will be converted into the canonical format 2001:db8::/64."; + reference + "RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-address-and-prefix { + type union { + type ipv4-address-and-prefix; + type ipv6-address-and-prefix; + } + description + "The ip-address-and-prefix type represents an IP address and + prefix and is IP version neutral. The format of the textual + representations implies the IP version."; + } + + typedef ipv4-address-and-prefix { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '/(([0-9])|([1-2][0-9])|(3[0-2]))'; + } + description + "The ipv4-address-and-prefix type represents an IPv4 + address and an associated IPv4 prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 32. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0."; + } + + typedef ipv6-address-and-prefix { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(/.+)'; + } + description + "The ipv6-address-and-prefix type represents an IPv6 + address and an associated IPv6 prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 128. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The canonical format requires that the IPv6 address is + represented as defined in Section 4 of RFC 5952."; + reference + "RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + /*** collection of domain name and URI types ***/ + + typedef domain-name { + type string { + length "1..253"; + pattern + '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + + '|\.'; + } + description + "The domain-name type represents a DNS domain name. The + name SHOULD be fully qualified whenever possible. This + type does not support wildcards (see RFC 4592) or + classless in-addr.arpa delegations (see RFC 2317). + + Internet domain names are only loosely specified. Section + 3.5 of RFC 1034 recommends a syntax (modified in Section + 2.1 of RFC 1123). The pattern above is intended to allow + for current practice in domain name use, and some possible + future expansion. Note that Internet host names have a + stricter syntax (described in RFC 952) than the DNS + recommendations in RFCs 1034 and 1123. Schema nodes + representing host names should use the host-name type + instead of the domain-type. + + The encoding of DNS names in the DNS protocol is limited + to 255 characters. Since the encoding consists of labels + prefixed by a length bytes and there is a trailing NULL + byte, only 253 characters can appear in the textual dotted + notation. + + The description clause of schema nodes using the domain-name + type MUST describe when and how these names are resolved to + IP addresses. Note that the resolution of a domain-name value + may require to query multiple DNS records (e.g., A for IPv4 + and AAAA for IPv6). The order of the resolution process and + which DNS record takes precedence can either be defined + explicitly or may depend on the configuration of the + resolver. + + Domain-name values use the US-ASCII encoding. Their canonical + format uses lowercase US-ASCII characters. Internationalized + domain names MUST be A-labels as per RFC 5890."; + reference + "RFC 952: DoD Internet Host Table Specification + RFC 1034: Domain Names - Concepts and Facilities + RFC 1123: Requirements for Internet Hosts -- Application + and Support + RFC 2317: Classless IN-ADDR.ARPA delegation + RFC 2782: A DNS RR for specifying the location of services + (DNS SRV) + RFC 4592: The Role of Wildcards in the Domain Name System + RFC 5890: Internationalized Domain Names in Applications + (IDNA): Definitions and Document Framework + RFC 9499: DNS Terminology"; + } + + typedef host-name { + type domain-name { + length "2..max"; + pattern '[a-zA-Z0-9\-\.]+'; + } + description + "The host-name type represents (fully qualified) host names. + Host names must be at least two characters long (see RFC 952) + and they are restricted to labels consisting of letters, digits + and hyphens separated by dots (see RFC1123 and RFC 952)."; + reference + "RFC 952: DoD Internet Host Table Specification + RFC 1123: Requirements for Internet Hosts -- Application + and Support"; + } + + typedef host { + type union { + type ip-address; + type host-name; + } + description + "The host type represents either an IP address or a (fully + qualified) host name."; + } + + typedef uri { + type string { + pattern '[a-z][a-z0-9+.-]*:.*'; + } + description + "The uri type represents a Uniform Resource Identifier + (URI) as defined by the rule 'URI' in RFC 3986. + + Objects using the uri type MUST be in US-ASCII encoding, + and MUST be normalized as described by RFC 3986 Sections + 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary + percent-encoding is removed, and all case-insensitive + characters are set to lowercase except for hexadecimal + digits within a percent-encoded triplet, which are + normalized to uppercase as described in Section 6.2.2.1 + of RFC 3986. + + The purpose of this normalization is to help provide + unique URIs. Note that this normalization is not + sufficient to provide uniqueness. Two URIs that are + textually distinct after this normalization may still be + equivalent. + + Objects using the uri type may restrict the schemes that + they permit. For example, 'data:' and 'urn:' schemes + might not be appropriate. + + A zero-length URI is not a valid URI. This can be used to + express 'URI absent' where required. + + In the value set and its semantics, this type is equivalent + to the Uri SMIv2 textual convention defined in RFC 5017."; + reference + "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax + RFC 3305: Report from the Joint W3C/IETF URI Planning Interest + Group: Uniform Resource Identifiers (URIs), URLs, + and Uniform Resource Names (URNs): Clarifications + and Recommendations + RFC 5017: MIB Textual Conventions for Uniform Resource + Identifiers (URIs)"; + } + + typedef email-address { + type string { + pattern '.+@.+'; + } + description + "The email-address type represents an internationalized + email address. + + The email address format is defined by the addr-spec + ABNF rule in RFC 5322 section 3.4.1. This format has + been extended by RFC 6532 to support internationalized + email addresses. Implementations MUST support the + internationalization extensions of RFC 6532. Support + of the obsolete obs-local-part, obs-domain, and + obs-qtext parts of RFC 5322 is not required. + + The domain part may use both A-labels and U-labels + (see RFC 5890). The canonical format of the domain part + uses lowercase characters and U-labels (RFC 5890) where + applicable."; + reference + "RFC 5322: Internet Message Format + RFC 5890: Internationalized Domain Names in Applications + (IDNA): Definitions and Document Framework + RFC 6531: SMTP Extension for Internationalized Email"; + } + +} \ No newline at end of file diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-key-chain@2017-06-15.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-key-chain@2017-06-15.yang new file mode 100644 index 000000000..445d1994a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-key-chain@2017-06-15.yang @@ -0,0 +1,382 @@ +module ietf-key-chain { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-key-chain"; + prefix key-chain; + + import ietf-yang-types { + prefix yang; + } + import ietf-netconf-acm { + prefix nacm; + } + + organization + "IETF RTGWG - Routing Area Working Group"; + contact + "WG Web: + WG List: + + Editor: Acee Lindem + + Yingzhen Qu + + Derek Yeung + + Ing-Wher Chen + + Jeffrey Zhang + "; + + description + "This YANG module defines the generic configuration + data for key chains. It is intended that the module + will be extended by vendors to define vendor-specific + key chain configuration parameters. + + Copyright (c) 2017 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8177; + see the RFC itself for full legal notices."; + + reference "RFC 8177"; + + revision 2017-06-15 { + description + "Initial RFC Revision"; + reference "RFC 8177: YANG Data Model for Key Chains"; + } + + feature hex-key-string { + description + "Support hexadecimal key string."; + } + + feature accept-tolerance { + description + "Support the tolerance or acceptance limit."; + } + + feature independent-send-accept-lifetime { + description + "Support for independent send and accept key lifetimes."; + } + + feature crypto-hmac-sha-1-12 { + description + "Support for TCP HMAC-SHA-1 12-byte digest hack."; + } + + feature cleartext { + description + "Support for cleartext algorithm. Usage is + NOT RECOMMENDED."; + } + + feature aes-cmac-prf-128 { + description + "Support for AES Cipher-based Message Authentication + Code Pseudorandom Function."; + } + + feature aes-key-wrap { + description + "Support for Advanced Encryption Standard (AES) Key Wrap."; + } + + feature replay-protection-only { + description + "Provide replay protection without any authentication + as required by protocols such as Bidirectional + Forwarding Detection (BFD)."; + } + identity crypto-algorithm { + description + "Base identity of cryptographic algorithm options."; + } + + identity hmac-sha-1-12 { + base crypto-algorithm; + if-feature "crypto-hmac-sha-1-12"; + description + "The HMAC-SHA1-12 algorithm."; + } + + identity aes-cmac-prf-128 { + base crypto-algorithm; + if-feature "aes-cmac-prf-128"; + description + "The AES-CMAC-PRF-128 algorithm - required by + RFC 5926 for TCP-AO key derivation functions."; + } + + identity md5 { + base crypto-algorithm; + description + "The MD5 algorithm."; + } + + identity sha-1 { + base crypto-algorithm; + description + "The SHA-1 algorithm."; + } + + identity hmac-sha-1 { + base crypto-algorithm; + description + "HMAC-SHA-1 authentication algorithm."; + } + + identity hmac-sha-256 { + base crypto-algorithm; + description + "HMAC-SHA-256 authentication algorithm."; + } + + identity hmac-sha-384 { + base crypto-algorithm; + description + "HMAC-SHA-384 authentication algorithm."; + } + + identity hmac-sha-512 { + base crypto-algorithm; + description + "HMAC-SHA-512 authentication algorithm."; + } + + identity cleartext { + base crypto-algorithm; + if-feature "cleartext"; + description + "cleartext."; + } + + identity replay-protection-only { + base crypto-algorithm; + if-feature "replay-protection-only"; + description + "Provide replay protection without any authentication as + required by protocols such as Bidirectional Forwarding + Detection (BFD)."; + } + + typedef key-chain-ref { + type leafref { + path + "/key-chain:key-chains/key-chain:key-chain/key-chain:name"; + } + description + "This type is used by data models that need to reference + configured key chains."; + } + + grouping lifetime { + description + "Key lifetime specification."; + choice lifetime { + default "always"; + description + "Options for specifying key accept or send lifetimes"; + case always { + leaf always { + type empty; + description + "Indicates key lifetime is always valid."; + } + } + case start-end-time { + leaf start-date-time { + type yang:date-and-time; + description + "Start time."; + } + choice end-time { + default "infinite"; + description + "End-time setting."; + case infinite { + leaf no-end-time { + type empty; + description + "Indicates key lifetime end-time is infinite."; + } + } + case duration { + leaf duration { + type uint32 { + range "1..2147483646"; + } + units "seconds"; + description + "Key lifetime duration, in seconds"; + } + } + case end-date-time { + leaf end-date-time { + type yang:date-and-time; + description + "End time."; + } + } + } + } + } + } + + container key-chains { + description + "All configured key-chains on the device."; + list key-chain { + key "name"; + description + "List of key-chains."; + leaf name { + type string; + description + "Name of the key-chain."; + } + leaf description { + type string; + description + "A description of the key-chain"; + } + container accept-tolerance { + if-feature "accept-tolerance"; + description + "Tolerance for key lifetime acceptance (seconds)."; + leaf duration { + type uint32; + units "seconds"; + default "0"; + description + "Tolerance range, in seconds."; + } + } + leaf last-modified-timestamp { + type yang:date-and-time; + config false; + description + "Timestamp of the most recent update to the key-chain"; + } + list key { + key "key-id"; + description + "Single key in key chain."; + leaf key-id { + type uint64; + description + "Numeric value uniquely identifying the key"; + } + container lifetime { + description + "Specify a key's lifetime."; + choice lifetime { + description + "Options for specification of send and accept + lifetimes."; + case send-and-accept-lifetime { + description + "Send and accept key have the same lifetime."; + container send-accept-lifetime { + description + "Single lifetime specification for both + send and accept lifetimes."; + uses lifetime; + } + } + case independent-send-accept-lifetime { + if-feature "independent-send-accept-lifetime"; + description + "Independent send and accept key lifetimes."; + container send-lifetime { + description + "Separate lifetime specification for send + lifetime."; + uses lifetime; + } + container accept-lifetime { + description + "Separate lifetime specification for accept + lifetime."; + uses lifetime; + } + } + } + } + leaf crypto-algorithm { + type identityref { + base crypto-algorithm; + } + mandatory true; + description + "Cryptographic algorithm associated with key."; + } + container key-string { + description + "The key string."; + nacm:default-deny-all; + choice key-string-style { + description + "Key string styles"; + case keystring { + leaf keystring { + type string; + description + "Key string in ASCII format."; + } + } + case hexadecimal { + if-feature "hex-key-string"; + leaf hexadecimal-string { + type yang:hex-string; + description + "Key in hexadecimal string format. When compared + to ASCII, specification in hexadecimal affords + greater key entropy with the same number of + internal key-string octets. Additionally, it + discourages usage of well-known words or + numbers."; + } + } + } + } + leaf send-lifetime-active { + type boolean; + config false; + description + "Indicates if the send lifetime of the + key-chain key is currently active."; + } + leaf accept-lifetime-active { + type boolean; + config false; + description + "Indicates if the accept lifetime of the + key-chain key is currently active."; + } + } + } + container aes-key-wrap { + if-feature "aes-key-wrap"; + description + "AES Key Wrap encryption for key-chain key-strings. The + encrypted key-strings are encoded as hexadecimal key + strings using the hex-key-string leaf."; + leaf enable { + type boolean; + default "false"; + description + "Enable AES Key Wrap encryption."; + } + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-netconf-acm@2018-02-14.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-netconf-acm@2018-02-14.yang new file mode 100644 index 000000000..bf4855faf --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-netconf-acm@2018-02-14.yang @@ -0,0 +1,464 @@ +module ietf-netconf-acm { + + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-acm"; + + prefix nacm; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: + WG List: + + Author: Andy Bierman + + + Author: Martin Bjorklund + "; + + description + "Network Configuration Access Control Model. + + Copyright (c) 2012 - 2018 IETF Trust and the persons + identified as authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD + License set forth in Section 4.c of the IETF Trust's + Legal Provisions Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8341; see + the RFC itself for full legal notices."; + + revision "2018-02-14" { + description + "Added support for YANG 1.1 actions and notifications tied to + data nodes. Clarified how NACM extensions can be used by + other data models."; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + + revision "2012-02-22" { + description + "Initial version."; + reference + "RFC 6536: Network Configuration Protocol (NETCONF) + Access Control Model"; + } + + /* + * Extension statements + */ + + extension default-deny-write { + description + "Used to indicate that the data model node + represents a sensitive security system parameter. + + If present, the NETCONF server will only allow the designated + 'recovery session' to have write access to the node. An + explicit access control rule is required for all other users. + + If the NACM module is used, then it must be enabled (i.e., + /nacm/enable-nacm object equals 'true'), or this extension + is ignored. + + The 'default-deny-write' extension MAY appear within a data + definition statement. It is ignored otherwise."; + } + + extension default-deny-all { + description + "Used to indicate that the data model node + controls a very sensitive security system parameter. + + If present, the NETCONF server will only allow the designated + 'recovery session' to have read, write, or execute access to + the node. An explicit access control rule is required for all + other users. + + If the NACM module is used, then it must be enabled (i.e., + /nacm/enable-nacm object equals 'true'), or this extension + is ignored. + + The 'default-deny-all' extension MAY appear within a data + definition statement, 'rpc' statement, or 'notification' + statement. It is ignored otherwise."; + } + + /* + * Derived types + */ + + typedef user-name-type { + type string { + length "1..max"; + } + description + "General-purpose username string."; + } + + typedef matchall-string-type { + type string { + pattern '\*'; + } + description + "The string containing a single asterisk '*' is used + to conceptually represent all possible values + for the particular leaf using this data type."; + } + + typedef access-operations-type { + type bits { + bit create { + description + "Any protocol operation that creates a + new data node."; + } + bit read { + description + "Any protocol operation or notification that + returns the value of a data node."; + } + bit update { + description + "Any protocol operation that alters an existing + data node."; + } + bit delete { + description + "Any protocol operation that removes a data node."; + } + bit exec { + description + "Execution access to the specified protocol operation."; + } + } + description + "Access operation."; + } + + typedef group-name-type { + type string { + length "1..max"; + pattern '[^\*].*'; + } + description + "Name of administrative group to which + users can be assigned."; + } + + typedef action-type { + type enumeration { + enum permit { + description + "Requested action is permitted."; + } + enum deny { + description + "Requested action is denied."; + } + } + description + "Action taken by the server when a particular + rule matches."; + } + + typedef node-instance-identifier { + type yang:xpath1.0; + description + "Path expression used to represent a special + data node, action, or notification instance-identifier + string. + + A node-instance-identifier value is an + unrestricted YANG instance-identifier expression. + All the same rules as an instance-identifier apply, + except that predicates for keys are optional. If a key + predicate is missing, then the node-instance-identifier + represents all possible server instances for that key. + + This XML Path Language (XPath) expression is evaluated in the + following context: + + o The set of namespace declarations are those in scope on + the leaf element where this type is used. + + o The set of variable bindings contains one variable, + 'USER', which contains the name of the user of the + current session. + + o The function library is the core function library, but + note that due to the syntax restrictions of an + instance-identifier, no functions are allowed. + + o The context node is the root node in the data tree. + + The accessible tree includes actions and notifications tied + to data nodes."; + } + + /* + * Data definition statements + */ + + container nacm { + nacm:default-deny-all; + + description + "Parameters for NETCONF access control model."; + + leaf enable-nacm { + type boolean; + default "true"; + description + "Enables or disables all NETCONF access control + enforcement. If 'true', then enforcement + is enabled. If 'false', then enforcement + is disabled."; + } + + leaf read-default { + type action-type; + default "permit"; + description + "Controls whether read access is granted if + no appropriate rule is found for a + particular read request."; + } + + leaf write-default { + type action-type; + default "deny"; + description + "Controls whether create, update, or delete access + is granted if no appropriate rule is found for a + particular write request."; + } + + leaf exec-default { + type action-type; + default "permit"; + description + "Controls whether exec access is granted if no appropriate + rule is found for a particular protocol operation request."; + } + + leaf enable-external-groups { + type boolean; + default "true"; + description + "Controls whether the server uses the groups reported by the + NETCONF transport layer when it assigns the user to a set of + NACM groups. If this leaf has the value 'false', any group + names reported by the transport layer are ignored by the + server."; + } + + leaf denied-operations { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that a + protocol operation request was denied."; + } + + leaf denied-data-writes { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that a + protocol operation request to alter + a configuration datastore was denied."; + } + + leaf denied-notifications { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that + a notification was dropped for a subscription because + access to the event type was denied."; + } + + container groups { + description + "NETCONF access control groups."; + + list group { + key name; + + description + "One NACM group entry. This list will only contain + configured entries, not any entries learned from + any transport protocols."; + + leaf name { + type group-name-type; + description + "Group name associated with this entry."; + } + + leaf-list user-name { + type user-name-type; + description + "Each entry identifies the username of + a member of the group associated with + this entry."; + } + } + } + + list rule-list { + key name; + ordered-by user; + description + "An ordered collection of access control rules."; + + leaf name { + type string { + length "1..max"; + } + description + "Arbitrary name assigned to the rule-list."; + } + leaf-list group { + type union { + type matchall-string-type; + type group-name-type; + } + description + "List of administrative groups that will be + assigned the associated access rights + defined by the 'rule' list. + + The string '*' indicates that all groups apply to the + entry."; + } + + list rule { + key name; + ordered-by user; + description + "One access control rule. + + Rules are processed in user-defined order until a match is + found. A rule matches if 'module-name', 'rule-type', and + 'access-operations' match the request. If a rule + matches, the 'action' leaf determines whether or not + access is granted."; + + leaf name { + type string { + length "1..max"; + } + description + "Arbitrary name assigned to the rule."; + } + + leaf module-name { + type union { + type matchall-string-type; + type string; + } + default "*"; + description + "Name of the module associated with this rule. + + This leaf matches if it has the value '*' or if the + object being accessed is defined in the module with the + specified module name."; + } + choice rule-type { + description + "This choice matches if all leafs present in the rule + match the request. If no leafs are present, the + choice matches all requests."; + case protocol-operation { + leaf rpc-name { + type union { + type matchall-string-type; + type string; + } + description + "This leaf matches if it has the value '*' or if + its value equals the requested protocol operation + name."; + } + } + case notification { + leaf notification-name { + type union { + type matchall-string-type; + type string; + } + description + "This leaf matches if it has the value '*' or if its + value equals the requested notification name."; + } + } + + case data-node { + leaf path { + type node-instance-identifier; + mandatory true; + description + "Data node instance-identifier associated with the + data node, action, or notification controlled by + this rule. + + Configuration data or state data + instance-identifiers start with a top-level + data node. A complete instance-identifier is + required for this type of path value. + + The special value '/' refers to all possible + datastore contents."; + } + } + } + + leaf access-operations { + type union { + type matchall-string-type; + type access-operations-type; + } + default "*"; + description + "Access operations associated with this rule. + + This leaf matches if it has the value '*' or if the + bit corresponding to the requested operation is set."; + } + + leaf action { + type action-type; + mandatory true; + description + "The access control action associated with the + rule. If a rule has been determined to match a + particular request, then this object is used + to determine whether to permit or deny the + request."; + } + + leaf comment { + type string; + description + "A textual description of the access rule."; + } + } + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf-network-slice-service.txt b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice-service.txt similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf-network-slice-service.txt rename to src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice-service.txt diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice-service@2024-08-28.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice-service@2024-08-28.yang new file mode 100644 index 000000000..d72dd1ed3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice-service@2024-08-28.yang @@ -0,0 +1,1375 @@ +module ietf-network-slice-service { + yang-version 1.1; + namespace + "urn:ietf:params:xml:ns:yang:ietf-network-slice-service"; + prefix ietf-nss; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Types"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-geo-location { + prefix geo; + reference + "RFC 9179: A YANG Grouping for Geographic Locations"; + } + import ietf-vpn-common { + prefix vpn-common; + reference + "RFC 9181: A Common YANG Data Model for Layer 2 and Layer 3 + VPNs"; + } + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology { + prefix nt; + reference + "RFC 8345: A YANG Data Model for Network + Topologies, Section 6.2"; + } + import ietf-ac-common { + prefix ac-common; + reference + "RFC BBBB: A Common YANG Data Model for Attachment Circuits"; + } + import ietf-ac-svc { + prefix ac-svc; + reference + "RFC CCCC: YANG Data Models for Bearers and 'Attachment + Circuits'-as-a-Service (ACaaS)"; + } + import ietf-te-types { + prefix te-types; + reference + "RFC DDDD: Common YANG Types for Traffic Engineering"; + } + import ietf-te-packet-types { + prefix te-packet-types; + reference + "RFC DDDD: Common YANG Data Types for Traffic Engineering"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: + WG List: + + Editor: Bo Wu + + Editor: Dhruv Dhody + + Editor: Reza Rokui + + Editor: Tarek Saad + + Editor: John Mullooly + "; + description + "This YANG module defines a service model for the RFC 9543 + Network Slice Service. + + Copyright (c) 2024 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Revised BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC AAAA; see the + RFC itself for full legal notices."; + + revision 2024-08-28 { + description + "Initial revision."; + reference + "RFC AAAA: A YANG Data Model for the RFC 9543 Network Slice + Service"; + } + + /* Identities */ + + identity service-tag-type { + description + "Base identity of Network Slice Service tag type, which is + used for management purposes, such as classification + (e.g., customer names) and policy constraints + (e.g., Layer 2 or Layer 3 technology realization)."; + } + + identity customer { + base service-tag-type; + description + "The Network Slice Service customer name tag type, + e.g., adding tags with 'customer name' when multiple actual + customers use the same Network Slice Service."; + } + + identity service { + base service-tag-type; + description + "The Network Slice Service tag type, which can indicate the + technical constraints used during service realization, + for example, Layer 2 or Layer 3 technologies."; + } + + identity opaque { + base service-tag-type; + description + "An opaque type, which can be used for future use, + such as filtering of services."; + } + + identity attachment-circuit-tag-type { + description + "Base identity for the attachment circuit tag type."; + } + + identity vlan-id { + base attachment-circuit-tag-type; + description + "Identity for VLAN ID tag type, 802.1Q dot1Q."; + reference + "IEEE Std 802.1Q: IEEE Standard for Local and Metropolitan + Area Networks--Bridges and Bridged + Networks"; + } + + identity cvlan-id { + base attachment-circuit-tag-type; + description + "Identity for C-VLAN ID tag type, 802.1ad QinQ VLAN IDs."; + reference + "IEEE Std 802.1ad: IEEE Standard for Local and Metropolitan + Area Networks---Virtual Bridged Local + Area Networks---Amendment 4: Provider + Bridges"; + } + + identity svlan-id { + base attachment-circuit-tag-type; + description + "Identity for S-VLAN ID tag type, 802.1ad QinQ VLAN IDs."; + reference + "IEEE Std 802.1ad: IEEE Standard for Local and Metropolitan + Area Networks---Virtual Bridged Local + Area Networks---Amendment 4: Provider + Bridges"; + } + + identity ip-address-mask { + base attachment-circuit-tag-type; + description + "Identity for IP address mask tag type."; + } + + identity service-isolation-type { + description + "Base identity for Network Slice Service isolation type."; + } + + identity traffic-isolation { + base service-isolation-type; + description + "Specify the requirement for separating the traffic of the + customer's Network Slice Service from other services, + which may be provided by the service provider using VPN + technologies, such as L3VPN, L2VPN, EVPN, etc."; + } + + identity service-security-type { + description + "Base identity for Network Slice Service security type."; + } + + identity authentication { + base service-security-type; + description + "Indicates that the Slice Service requires authentication."; + } + + identity integrity { + base service-security-type; + description + "Indicates that the Slice Service requires data integrity."; + } + + identity encryption { + base service-security-type; + description + "Indicates that the Slice Service requires data encryption."; + } + + identity point-to-point { + base vpn-common:vpn-topology; + description + "Identity for point-to-point Network Slice + Service connectivity."; + } + + identity point-to-multipoint { + base vpn-common:vpn-topology; + description + "Identity for point-to-multipoint Network Slice + Service connectivity."; + } + + identity multipoint-to-multipoint { + base vpn-common:vpn-topology; + description + "Identity for multipoint-to-multipoint Network Slice + Service connectivity."; + } + + identity multipoint-to-point { + base vpn-common:vpn-topology; + description + "Identity for multipoint-to-point Network Slice + Service connectivity."; + } + + identity sender-role { + base vpn-common:role; + description + "Indicates that an SDP is acting as a sender."; + } + + identity receiver-role { + base vpn-common:role; + description + "Indicates that an SDP is acting as a receiver."; + } + + identity service-slo-metric-type { + description + "Base identity for Network Slice Service SLO metric type."; + } + + identity one-way-bandwidth { + base service-slo-metric-type; + description + "SLO bandwidth metric. Minimum guaranteed bandwidth between + two SDPs at any time and is measured unidirectionally."; + } + + identity two-way-bandwidth { + base service-slo-metric-type; + description + "SLO bandwidth metric. Minimum guaranteed bandwidth between + two SDPs at any time."; + } + + identity shared-bandwidth { + base service-slo-metric-type; + description + "The shared SLO bandwidth bound. It is the limit on the + bandwidth that can be shared amongst a group of + connectivity constructs of a Slice Service."; + } + + identity one-way-delay-maximum { + base service-slo-metric-type; + description + "The SLO objective of this metric is the upper bound of network + delay when transmitting between two SDPs."; + reference + "RFC 7679: A One-Way Delay Metric for IP Performance + Metrics (IPPM)"; + } + + identity one-way-delay-percentile { + base service-slo-metric-type; + description + "The SLO objective of this metric is percentile objective of + network delay when transmitting between two SDPs. + The metric is defined in RFC7679."; + reference + "RFC 7679: A One-Way Delay Metric for IP Performance + Metrics (IPPM)"; + } + + identity two-way-delay-maximum { + base service-slo-metric-type; + description + "SLO two-way delay is the upper bound of network delay when + transmitting between two SDPs"; + reference + "RFC 2681: A Round-trip Delay Metric for IPPM"; + } + + identity two-way-delay-percentile { + base service-slo-metric-type; + description + "The SLO objective of this metric is the percentile + objective of network delay when the traffic transmitting + between two SDPs."; + reference + "RFC 2681: A Round-trip Delay Metric for IPPM"; + } + + identity one-way-delay-variation-maximum { + base service-slo-metric-type; + description + "The SLO objective of this metric is maximum bound of the + difference in the one-way delay between sequential packets + between two SDPs."; + reference + "RFC 3393: IP Packet Delay Variation Metric for IP Performance + Metrics (IPPM)"; + } + + identity one-way-delay-variation-percentile { + base service-slo-metric-type; + description + "The SLO objective of this metric is the percentile objective + in the one-way delay between sequential packets between two + SDPs."; + reference + "RFC 3393: IP Packet Delay Variation Metric for IP Performance + Metrics (IPPM)"; + } + + identity two-way-delay-variation-maximum { + base service-slo-metric-type; + description + "SLO two-way delay variation is the difference in the + round-trip delay between sequential packets between two + SDPs."; + reference + "RFC 5481: Packet Delay Variation Applicability Statement"; + } + + identity two-way-delay-variation-percentile { + base service-slo-metric-type; + description + "The SLO objective of this metric is the percentile objective + in the round-trip delay between sequential packets between + two SDPs."; + reference + "RFC 5481: Packet Delay Variation Applicability Statement"; + } + + identity one-way-packet-loss { + base service-slo-metric-type; + description + "This metric type refers to the ratio of packets dropped + to packets transmitted between two SDPs in one-way."; + reference + "RFC 7680: A One-Way Loss Metric for IP Performance + Metrics (IPPM)"; + } + + identity two-way-packet-loss { + base service-slo-metric-type; + description + "This metric type refers to the ratio of packets dropped + to packets transmitted between two SDPs in two-way."; + reference + "RFC 7680: A One-Way Loss Metric for IP Performance + Metrics (IPPM)"; + } + + identity availability-type { + description + "Base identity for availability."; + } + + identity six-nines { + base availability-type; + description + "Specifies the availability level: 99.9999%"; + } + + identity five-nines { + base availability-type; + description + "Specifies the availability level: 99.999%"; + } + + identity four-nines { + base availability-type; + description + "Specifies the availability level: 99.99%"; + } + + identity three-nines { + base availability-type; + description + "Specifies the availability level: 99.9%"; + } + + identity two-nines { + base availability-type; + description + "Specifies the availability level: 99%"; + } + + identity service-match-type { + description + "Base identity for Network Slice Service traffic + match type."; + } + identity phy-interface { + base service-match-type; + description + "Uses the physical interface as match criteria for + Slice Service traffic."; + } + + identity vlan { + base service-match-type; + description + "Uses the VLAN ID as match criteria for the Slice Service + traffic."; + } + + identity label { + base service-match-type; + description + "Uses the MPLS label as match criteria for the Slice Service + traffic."; + } + + identity source-ip-prefix { + base service-match-type; + description + "Uses source IP prefix as match criteria for the Slice Service + traffic. Examples of 'value' of this match type are + '192.0.2.0/24' and '2001:db8::1/64'."; + } + + identity destination-ip-prefix { + base service-match-type; + description + "Uses destination IP prefix as match criteria for the Slice + Service traffic. Examples of 'value' of this match type are + '203.0.113.1/32' and '2001:db8::2/128'."; + } + + identity dscp { + base service-match-type; + description + "Uses DSCP field in the IP packet header as match criteria + for the Slice Service traffic."; + } + + identity acl { + base service-match-type; + description + "Uses Access Control List (ACL) as match criteria + for the Slice Service traffic."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)"; + } + + identity any { + base service-match-type; + description + "Matches any Slice Service traffic."; + } + + identity source-tcp-port { + base service-match-type; + description + "Uses source TCP port as match criteria for the Slice Service + traffic. Examples of 'value' of this match type are + '8080' and '22'."; + } + + identity destination-tcp-port { + base service-match-type; + description + "Uses destination TCP port as match criteria for the Slice + Service traffic. Examples of 'value' of this match type are + '8080' and '22'."; + } + + identity source-udp-port { + base service-match-type; + description + "Uses source UDP port as match criteria for the Slice Service + traffic. Examples of 'value' of this match type are + '53', '67' and '68'."; + } + +identity destination-udp-port { + base service-match-type; + description + "Uses destination UDP port as match criteria for the Slice + Service traffic. Examples of 'value' of this match type are + '53', '67' and '68'."; +} + + identity slo-sle-policy-override { + description + "Base identity for SLO/SLE policy override options."; + } + + identity full-override { + base slo-sle-policy-override; + description + "The SLO/SLE policy defined at the child level overrides a + parent SLO/SLE policy, which means that no SLO/SLEs are + inherited from parent if a child SLO/SLE policy exists."; + } + + identity partial-override { + base slo-sle-policy-override; + description + "The SLO/SLE policy defined at the child level updates the + parent SLO/SLE policy. For example, if a specific SLO is + defined at the child level, that specific SLO overrides + the one inherited from a parent SLO/SLE policy, while all + other SLOs in the parent SLO-SLE policy still apply."; + } + + /* Typedef */ + + typedef percentage { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + description + "Percentage to 5 decimal places."; + } + + typedef percentile { + type decimal64 { + fraction-digits 3; + range "0..100"; + } + description + "The percentile is a value between 0 and 100 + to 3 decimal places, e.g., 10.000, 99.900,99.990, etc. + For example, for a given one-way delay measurement, + if the percentile is set to 95.000 and the 95th percentile + one-way delay is 2 milliseconds, then the 95 percent of + the sample value is less than or equal to 2 milliseconds."; + } + + typedef slice-template-ref { + type leafref { + path "/ietf-nss:network-slice-services" + + "/ietf-nss:slo-sle-templates" + + "/ietf-nss:slo-sle-template" + + "/ietf-nss:id"; + } + description + "This type is used by data models that need to reference + Network Slice templates."; + } + + typedef slice-service-ref { + type leafref { + path + "/ietf-nss:network-slice-services/ietf-nss:slice-service" + + "/ietf-nss:id"; + } + description + "Defines a reference to a slice service that can be used + by other modules."; + } + + /* Groupings */ + + grouping service-slos { + description + "A reusable grouping for directly measurable objectives of + a Slice Service."; + container slo-policy { + description + "Contains the SLO policy."; + list metric-bound { + key "metric-type"; + description + "List of Slice Service metric bounds."; + leaf metric-type { + type identityref { + base service-slo-metric-type; + } + description + "Identifies SLO metric type of the Slice Service."; + } + leaf metric-unit { + type string; + mandatory true; + description + "The metric unit of the parameter. For example, + for time units, where the options are hours, minutes, + seconds, milliseconds, microseconds, and nanoseconds; + for bandwidth units, where the options are bps, Kbps, + Mbps, Gbps; for the packet loss rate unit, + the options can be a percentage."; + } + leaf value-description { + type string; + description + "The description of the provided value."; + } + leaf percentile-value { + type percentile; + description + "The percentile value of the metric type."; + } + leaf bound { + type uint64; + description + "The bound on the Slice Service connection metric. + When set to zero, this indicates an unbounded + upper limit for the specific metric-type."; + } + } + leaf availability { + type identityref { + base availability-type; + } + description + "Service availability level"; + } + leaf mtu { + type uint32; + units "bytes"; + description + "Specifies the maximum length of Layer 2 data + packets of the Slice Service. + If the customer sends packets that are longer than the + requested service MTU, the network may discard them + (or for IPv4, fragment them). + This service MTU takes precedence over the MTUs of + all attachment circuits (ACs). The value needs to be + less than or equal to the minimum MTU value of + all ACs in the SDPs."; + } + } + } + + grouping service-sles { + description + "A reusable grouping for indirectly measurable objectives of + a Slice Service."; + container sle-policy { + description + "Contains the SLE policy."; + leaf-list security { + type identityref { + base service-security-type; + } + description + "The security functions that the customer requests + the operator to apply to traffic between the two SDPs."; + } + leaf-list isolation { + type identityref { + base service-isolation-type; + } + description + "The Slice Service isolation requirement."; + } + leaf max-occupancy-level { + type uint8 { + range "1..100"; + } + description + "The maximal occupancy level specifies the number of flows + to be admitted and optionally a maximum number of + countable resource units (e.g., IP or MAC addresses) + a Network Slice Service can consume."; + } + container path-constraints { + description + "Container for the policy of path constraints + applicable to the Slice Service."; + container service-functions { + description + "Container for the policy of service function + applicable to the Slice Service."; + } + container diversity { + description + "Container for the policy of disjointness + applicable to the Slice Service."; + leaf diversity-type { + type te-types:te-path-disjointness; + description + "The type of disjointness on Slice Service, i.e., + across all connectivity constructs."; + } + } + } + } + } + + grouping slice-service-template { + description + "A reusable grouping for Slice Service templates."; + container slo-sle-templates { + description + "Contains a set of Slice Service templates."; + list slo-sle-template { + key "id"; + description + "List for SLO and SLE template identifiers."; + leaf id { + type string; + description + "Identification of the Service Level Objective (SLO) + and Service Level Expectation (SLE) template to be used. + Local administration meaning."; + } + leaf description { + type string; + description + "Describes the SLO and SLE policy template."; + } + leaf template-ref { + type slice-template-ref; + description + "The reference to a standard template. When set it + indicates the base template over which further + SLO/SLE policy changes are made."; + } + uses service-slos; + uses service-sles; + } + } + } + + grouping service-slo-sle-policy { + description + "Slice service policy grouping."; + choice slo-sle-policy { + description + "Choice for SLO and SLE policy template. + Can be standard template or customized template."; + case standard { + description + "Standard SLO template."; + leaf slo-sle-template { + type slice-template-ref; + description + "Standard SLO and SLE template to be used."; + } + } + case custom { + description + "Customized SLO and SLE template."; + container service-slo-sle-policy { + description + "Contains the SLO and SLE policy."; + leaf description { + type string; + description + "Describes the SLO and SLE policy."; + } + uses service-slos; + uses service-sles; + } + } + } + } + + grouping service-qos { + description + "Grouping for the Slice Service QoS policy."; + container incoming-qos-policy { + description + "The QoS policy imposed on ingress direction of the traffic, + from the customer network or from another provider's + network."; + leaf qos-policy-name { + type string; + description + "The name of the QoS policy that is applied to the + attachment circuit. The name can reference a QoS + profile that is pre-provisioned on the device."; + } + container rate-limits { + description + "Container for the asymmetric traffic control."; + uses ac-common:bandwidth-parameters; + container classes { + description + "Container for service class bandwidth control."; + list cos { + key "cos-id"; + description + "List of Class of Services."; + leaf cos-id { + type uint8; + description + "Identifier of the CoS, indicated by + a Differentiated Services Code Point + (DSCP) or a CE-CLAN CoS (802.1p) + value in the service frame."; + reference + "IEEE Std 802.1Q: Bridges and Bridged + Networks"; + } + uses ac-common:bandwidth-parameters; + } + } + } + } + container outgoing-qos-policy { + description + "The QoS policy imposed on egress direction of the traffic, + towards the customer network or towards another + provider's network."; + leaf qos-policy-name { + type string; + description + "The name of the QoS policy that is applied to the + attachment circuit. The name can reference a QoS + profile that is pre-provisioned on the device."; + } + container rate-limits { + description + "The rate-limit imposed on outgoing traffic."; + uses ac-common:bandwidth-parameters; + container classes { + description + "Container for classes."; + list cos { + key "cos-id"; + description + "List of Class of Services."; + leaf cos-id { + type uint8; + description + "Identifier of the CoS, indicated by + a Differentiated Services Code Point + (DSCP) or a CE-CLAN CoS (802.1p) + value in the service frame."; + reference + "IEEE Std 802.1Q: Bridges and Bridged + Networks"; + } + uses ac-common:bandwidth-parameters; + } + } + } + } + } + + grouping service-slo-sle-policy-override { + description + "Slice Service policy override grouping."; + leaf service-slo-sle-policy-override { + type identityref { + base slo-sle-policy-override; + } + description + "SLO/SLE policy override option."; + } + } + + grouping connectivity-construct-monitoring-metrics { + description + "Grouping for connectivity construct monitoring metrics."; + uses + te-packet-types:one-way-performance-metrics-gauge-packet; + uses + te-packet-types:two-way-performance-metrics-gauge-packet; + } + /* Main Network Slice Services Container */ + + container network-slice-services { + description + "Contains a list of Network Slice Services"; + uses slice-service-template; + list slice-service { + key "id"; + description + "A Slice Service is identified by a service id."; + leaf id { + type string; + description + "A unique Slice Service identifier within an NSC."; + } + leaf description { + type string; + description + "Textual description of the Slice Service."; + } + container service-tags { + description + "Container for a list of service tags for management + purposes, such as policy constraints + (e.g., Layer 2 or Layer 3 technology realization), + classification (e.g., customer names, opaque values)."; + list tag-type { + key "tag-type"; + description + "The service tag list."; + leaf tag-type { + type identityref { + base service-tag-type; + } + description + "Slice Service tag type, e.g., realization technology + constraints, customer name, or other customer-defined + opaque types."; + } + leaf-list value { + type string; + description + "The tag values, e.g., 5G customer names when multiple + customers share the same Slice Service in 5G scenario, + or Slice realization technology (such as Layer 2 or + Layer 3)."; + } + } + } + uses service-slo-sle-policy; + leaf compute-only { + type empty; + description + "When present, this is a feasibility check. That is, no + resources are reserved in the network."; + } + uses ac-common:service-status; + container sdps { + description + "Slice Service SDPs."; + list sdp { + key "id"; + min-elements 2; + description + "List of SDPs in this Slice Service."; + leaf id { + type string; + description + "The unique identifier of the SDP within the scope of + an NSC."; + } + leaf description { + type string; + description + "Provides a description of the SDP."; + } + uses geo:geo-location; + leaf node-id { + type string; + description + "A unique identifier of an edge node of the SDP + within the scope of the NSC."; + } + leaf-list sdp-ip-address { + type inet:ip-address; + description + "IPv4 or IPv6 address of the SDP."; + } + leaf tp-ref { + type leafref { + path + "/nw:networks/nw:network[nw:network-id=" + + "current()/../../../custom-topology/network-ref]/" + + "nw:node/nt:termination-point/nt:tp-id"; + } + description + "A reference to Termination Point (TP) in the custom + topology"; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + container service-match-criteria { + description + "Describes the Slice Service match criteria."; + list match-criterion { + key "index"; + description + "List of the Slice Service traffic match criteria."; + leaf index { + type uint32; + description + "The identifier of a match criteria."; + } + list match-type { + key "type"; + description + "List of the Slice Service traffic match types."; + leaf type { + type identityref { + base service-match-type; + } + mandatory true; + description + "Indicates the match type of the entry in the + list of the Slice Service match criteria."; + } + leaf-list value { + type string; + description + "Provides a value for the Slice Service match + criteria, e.g., IP prefix, VLAN ID, or + ACL name."; + } + } + leaf target-connection-group-id { + type leafref { + path + "../../../../../ietf-nss:connection-groups" + + "/ietf-nss:connection-group" + + "/ietf-nss:id"; + } + mandatory true; + description + "Reference to the Slice Service connection group."; + } + leaf connection-group-sdp-role { + type identityref { + base vpn-common:role; + } + description + "Specifies the role of SDP in the connection group + When the service connection type is MP2MP, + such as hub and spoke service connection type. + In addition, this helps to create connectivity + construct automatically, rather than explicitly + specifying each one."; + } + leaf target-connectivity-construct-id { + type leafref { + path + "../../../../../ietf-nss:connection-groups" + + "/ietf-nss:connection-group[ietf-nss:id=" + + "current()/../target-connection-group-id]" + + "/ietf-nss:connectivity-construct/ietf-nss:id"; + } + description + "Reference to a Network Slice connection + construct."; + } + } + } + uses service-qos; + container sdp-peering { + description + "Describes SDP peering attributes."; + leaf-list peer-sap-id { + type string; + description + "Indicates the reference to the remote endpoints of + the attachment circuits. This information can be + used for correlation purposes, such as identifying + SAPs of provider equipments when requesting + a service with CE based SDP attributes."; + reference + "RFC 9408: A YANG Network Data Model for Service + Attachment Points (SAPs)"; + } + container protocols { + description + "Serves as an augmentation target. + Protocols can be augmented into this container, + e.g., BGP, static routing."; + } + } + leaf-list ac-svc-ref { + type ac-svc:attachment-circuit-reference; + description + "A reference to the ACs that have been created before + the slice creation."; + reference + "RFC CCCC: YANG Data Models for Bearers and + 'Attachment Circuits'-as-a-Service (ACaaS)"; + } + leaf ce-mode { + type boolean; + description + "Indicates that SDP is on the CE."; + } + container attachment-circuits { + description + "List of attachment circuits."; + list attachment-circuit { + key "id"; + description + "The Network Slice Service SDP attachment circuit + related parameters."; + leaf id { + type string; + description + "The identifier of attachment circuit."; + } + leaf description { + type string; + description + "The attachment circuit's description."; + } + leaf ac-svc-ref { + type ac-svc:attachment-circuit-reference; + description + "A reference to the AC service that has been + created before the slice creation."; + reference + "RFC CCCC: YANG Data Models for Bearers and + 'Attachment Circuits'-as-a-Service (ACaaS)"; + } + leaf ac-node-id { + type string; + description + "The attachment circuit node ID in the case of + multi-homing."; + } + leaf ac-tp-id { + type string; + description + "The termination port ID of the + attachment circuit."; + } + leaf ac-ipv4-address { + type inet:ipv4-address; + description + "The IPv4 address of the AC."; + } + leaf ac-ipv4-prefix-length { + type uint8; + description + "The IPv4 subnet prefix length expressed in bits."; + } + leaf ac-ipv6-address { + type inet:ipv6-address; + description + "The IPv6 address of the AC."; + } + leaf ac-ipv6-prefix-length { + type uint8; + description + "The IPv6 subnet prefix length expressed in bits."; + } + leaf mtu { + type uint32; + units "bytes"; + description + "Maximum size of the Slice Service Layer 2 data + packet that can traverse an SDP."; + } + container ac-tags { + description + "Container for the attachment circuit tags."; + list ac-tag { + key "tag-type"; + description + "The attachment circuit tag list."; + leaf tag-type { + type identityref { + base attachment-circuit-tag-type; + } + description + "The attachment circuit tag type."; + } + leaf-list value { + type string; + description + "The attachment circuit tag values. + For example, the tag may indicate + multiple VLAN identifiers."; + } + } + } + uses service-qos; + container sdp-peering { + description + "Describes SDP peering attributes."; + leaf peer-sap-id { + type string; + description + "Indicates a reference to the remote endpoints + of an attachment circuit. This information can + be used for correlation purposes, such as + identifying a service attachment point (SAP) + of a provider equipment when requesting a + service with CE based SDP attributes."; + reference + "RFC 9408: A YANG Network Data Model for + Service Attachment Points (SAPs)"; + } + container protocols { + description + "Serves as an augmentation target. + Protocols can be augmented into this container, + e.g., BGP or static routing."; + } + } + uses ac-common:service-status; + } + } + uses ac-common:service-status; + container sdp-monitoring { + config false; + description + "Container for SDP monitoring metrics."; + leaf incoming-bw-value { + type yang:gauge64; + units "bps"; + description + "Indicates the absolute value of the incoming + bandwidth at an SDP from the customer network or + from another provider's network."; + } + leaf incoming-bw-percent { + type percentage; + units "percent"; + description + "Indicates a percentage of the incoming bandwidth + at an SDP from the customer network or + from another provider's network."; + } + leaf outgoing-bw-value { + type yang:gauge64; + units "bps"; + description + "Indicates the absolute value of the outgoing + bandwidth at an SDP towards the customer network or + towards another provider's network."; + } + leaf outgoing-bw-percent { + type percentage; + units "percent"; + description + "Indicates a percentage of the outgoing bandwidth + at an SDP towards the customer network or towards + another provider's network."; + } + } + } + } + container connection-groups { + description + "Contains connection groups."; + list connection-group { + key "id"; + description + "List of connection groups."; + leaf id { + type string; + description + "The connection group identifier."; + } + leaf connectivity-type { + type identityref { + base vpn-common:vpn-topology; + } + description + "Connection group connectivity type."; + } + uses service-slo-sle-policy; + /* Per connection group SLO/SLE policy + * overrides the per Slice SLO/SLE policy. + */ + uses service-slo-sle-policy-override; + list connectivity-construct { + key "id"; + description + "List of connectivity constructs."; + leaf id { + type string; + description + "The connectivity construct identifier."; + } + choice type { + default "p2p"; + description + "Choice for connectivity construct type."; + case p2p { + description + "P2P connectivity construct."; + leaf p2p-sender-sdp { + type leafref { + path "../../../../sdps/sdp/id"; + } + description + "Reference to a sender SDP."; + } + leaf p2p-receiver-sdp { + type leafref { + path "../../../../sdps/sdp/id"; + } + description + "Reference to a receiver SDP."; + } + } + case p2mp { + description + "P2MP connectivity construct."; + leaf p2mp-sender-sdp { + type leafref { + path "../../../../sdps/sdp/id"; + } + description + "Reference to a sender SDP."; + } + leaf-list p2mp-receiver-sdp { + type leafref { + path "../../../../sdps/sdp/id"; + } + description + "Reference to a receiver SDP."; + } + } + case a2a { + description + "A2A connectivity construct."; + list a2a-sdp { + key "sdp-id"; + description + "List of included A2A SDPs."; + leaf sdp-id { + type leafref { + path "../../../../../sdps/sdp/id"; + } + description + "Reference to an SDP."; + } + uses service-slo-sle-policy; + } + } + } + uses service-slo-sle-policy; + /* Per connectivity construct SLO/SLE policy + * overrides the per slice SLO/SLE policy. + */ + uses service-slo-sle-policy-override; + uses ac-common:service-status; + container connectivity-construct-monitoring { + config false; + description + "SLO status per connectivity construct."; + uses connectivity-construct-monitoring-metrics; + } + } + container connection-group-monitoring { + config false; + description + "SLO status per connection group."; + uses connectivity-construct-monitoring-metrics; + } + } + } + container custom-topology { + description + "Serves as an augmentation target. + Container for custom topology, which is indicated by the + referenced topology predefined, e.g., an abstract RFC8345 + topology."; + uses nw:network-ref; + } + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice@2022-03-04.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice@2022-03-04.yang new file mode 100644 index 000000000..b1ead4bf0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice@2022-03-04.yang @@ -0,0 +1,1130 @@ +module ietf-network-slice { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-slice"; + prefix ietf-ns; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Types."; + } + import ietf-te-types { + prefix te-types; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering."; + } + import ietf-te-packet-types { + prefix te-packet-types; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering."; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: + WG List: + + Editor: Bo Wu + + Editor: Dhruv Dhody + + Editor: Reza Rokui + + Editor: Tarek Saad + + Author: Liuyan Han + "; + description + "This module contains a YANG module for the IETF Network Slice. + + Copyright (c) 2022 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Revised BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see the + RFC itself for full legal notices."; + + revision 2022-03-04 { + description + "initial version."; + reference + "RFC XXXX: A Yang Data Model for IETF Network Slice Operation"; + } + + /* Features */ + /* Identities */ + + identity ns-tag-type { + description + "Base identity for IETF Network Slice tag type."; + } + + identity ns-tag-customer { + base ns-tag-type; + description + "The IETF Network Slice customer ID tag type."; + } + + identity ns-tag-service { + base ns-tag-type; + description + "The IETF Network Slice service tag type."; + } + + identity ns-tag-opaque { + base ns-tag-type; + description + "The IETF Network Slice opaque tag type."; + } + + identity network-access-tag-type { + description + "Base identity for the network access tag type."; + } + + identity network-access-tag-vlan-id { + base network-access-tag-type; + description + "The network access interface VLAN ID tag type."; + } + + identity network-access-tag-ip-mask { + base network-access-tag-type; + description + "The network access tag IP mask."; + } + + identity network-access-tag-opaque { + base network-access-tag-type; + description + "The network access opaque tag type."; + } + + identity ns-isolation-type { + description + "Base identity for IETF Network slice isolation level."; + } + + identity ns-isolation-shared { + base ns-isolation-type; + description + "Shared resources (e.g. queues) are associated with the Network + Slice traffic. Hence, the IETF network slice traffic can be + impacted by effects of other services traffic sharing + the same resources."; + } + + identity ns-isolation-dedicated { + base ns-isolation-type; + description + "Dedicated resources (e.g. queues) are associated with the + Network Slice traffic. Hence, the IETF network slice traffic + is isolated from other servceis traffic sharing the same + resources."; + } + + identity ns-security-type { + description + "Base identity for for IETF Network security level."; + } + + identity ns-security-authenticate { + base ns-security-type; + description + "IETF Network Slice requires authentication."; + } + + identity ns-security-integrity { + base ns-security-type; + description + "IETF Network Slice requires data integrity."; + } + + identity ns-security-encryption { + base ns-security-type; + description + "IETF Network Slice requires data encryption."; + } + + identity ns-connectivity-type { + description + "Base identity for IETF Network Slice connectivity."; + } + + identity point-to-point { + base ns-connectivity-type; + description + "Identity for point-to-point IETF Network Slice connectivity."; + } + + identity point-to-multipoint { + base ns-connectivity-type; + description + "Identity for point-to-multipoint IETF Network Slice + connectivity."; + } + + identity multipoint-to-multipoint { + base ns-connectivity-type; + description + "Identity for multipoint-to-multipoint IETF Network Slice + connectivity."; + } + + identity any-to-any { + base ns-connectivity-type; + description + "Identity for any-to-any IETF Network Slice connectivity."; + } + + identity hub-spoke { + base ns-connectivity-type; + description + "Identity for Hub-and-Spoke IETF Network Slice connectivity."; + } + + identity custom { + base ns-connectivity-type; + description + "Identity of a custom NS topology where Hubs can act as + Spoke for certain parts of the network or Spokes as Hubs."; + } + + identity endpoint-role { + description + "Base identity of a NSE role in an IETF Network Slice topology."; + } + + identity any-to-any-role { + base endpoint-role; + description + "Identity of any-to-any NS."; + } + + identity spoke-role { + base endpoint-role; + description + "A NSE is acting as a Spoke."; + } + + identity hub-role { + base endpoint-role; + description + "A NSE is acting as a Hub."; + } + + identity ns-slo-metric-type { + description + "Base identity for IETF Network Slice SLO metric type."; + } + + identity ns-slo-one-way-bandwidth { + base ns-slo-metric-type; + description + "SLO bandwidth metric. Minimum guaranteed bandwidth between + two endpoints at any time and is measured unidirectionally."; + } + + identity ns-slo-two-way-bandwidth { + base ns-slo-metric-type; + description + "SLO bandwidth metric. Minimum guaranteed bandwidth between + two endpoints at any time."; + } + + identity ns-slo-shared-bandwidth { + base ns-slo-metric-type; + description + "The shared SLO bandwidth bound. It is the limit on the + bandwidth that can be shared amongst a group of connections + of an IETF Network Slice."; + } + + identity ns-slo-one-way-delay { + base ns-slo-metric-type; + description + "SLO one-way-delay is the upper bound of network delay when + transmitting between two endpoints. The metric is defined in + RFC7679."; + } + + identity ns-slo-two-way-delay { + base ns-slo-metric-type; + description + "SLO two-way delay is the upper bound of network delay when + transmitting between two endpoints. The metric is defined in + RFC2681."; + } + identity ns-slo-one-way-delay-variation { + base ns-slo-metric-type; + description + "SLO one-way delay variation is defined by RFC3393, is the + difference in the one-way delay between sequential packets + between two endpoints."; + } + + identity ns-slo-two-way-delay-variation { + base ns-slo-metric-type; + description + "SLO two-way delay variation is defined by RFC5481, is the + difference in the round-trip delay between sequential packets + between two endpoints."; + } + + identity ns-slo-one-way-packet-loss { + base ns-slo-metric-type; + description + "SLO loss metric. The ratio of packets dropped to packets + transmitted between two endpoints in one-way + over a period of time as specified in RFC7680."; + } + + identity ns-slo-two-way-packet-loss { + base ns-slo-metric-type; + description + "SLO loss metric. The ratio of packets dropped to packets + transmitted between two endpoints in two-way + over a period of time as specified in RFC7680."; + } + + identity ns-slo-availability { + base ns-slo-metric-type; + description + "SLO availability level."; + } + + identity ns-match-type { + description + "Base identity for IETF Network Slice traffic match type."; + } + + identity ns-phy-interface-match { + base ns-match-type; + description + "Use the physical interface as match criteria for the IETF + Network Slice traffic."; + } + + identity ns-vlan-match { + base ns-match-type; + description + "Use the VLAN ID as match criteria for the IETF Network Slice + traffic."; + } + + identity ns-label-match { + base ns-match-type; + description + "Use the MPLS label as match criteria for the IETF Network + Slice traffic."; + } + + identity peering-protocol-type { + description + "Base identity for NSE peering protocol type."; + } + + identity peering-protocol-bgp { + base peering-protocol-type; + description + "Use BGP as protocol for NSE peering with customer device."; + } + + identity peering-static-routing { + base peering-protocol-type; + description + "Use static routing for NSE peering with customer device."; + } + + /* + * Identity for availability-type + */ + + identity availability-type { + description + "Base identity from which specific availability types are + derived."; + } + + identity level-1 { + base availability-type; + description + "level 1: 99.9999%"; + } + identity level-2 { + base availability-type; + description + "level 2: 99.999%"; + } + + identity level-3 { + base availability-type; + description + "level 3: 99.99%"; + } + + identity level-4 { + base availability-type; + description + "level 4: 99.9%"; + } + + identity level-5 { + base availability-type; + description + "level 5: 99%"; + } + + /* typedef */ + + typedef operational-type { + type enumeration { + enum up { + value 0; + description + "Operational status UP."; + } + enum down { + value 1; + description + "Operational status DOWN."; + } + enum unknown { + value 2; + description + "Operational status UNKNOWN."; + } + } + description + "This is a read-only attribute used to determine the + status of a particular element."; + } + typedef ns-monitoring-type { + type enumeration { + enum one-way { + description + "Represents one-way measurments monitoring type."; + } + enum two-way { + description + "represents two-way measurements monitoring type."; + } + } + description + "An enumerated type for monitoring on a IETF Network Slice + connection."; + } + + /* Groupings */ + + grouping status-params { + description + "A grouping used to join operational and administrative status."; + container status { + description + "A container for the administrative and operational state."; + leaf admin-enabled { + type boolean; + description + "The administrative status."; + } + leaf oper-status { + type operational-type; + config false; + description + "The operational status."; + } + } + } + + grouping ns-match-criteria { + description + "A grouping for the IETF Network Slice match definition."; + container ns-match-criteria { + description + "Describes the IETF Network Slice match criteria."; + list ns-match-criterion { + key "index"; + description + "List of the IETF Network Slice traffic match criteria."; + leaf index { + type uint32; + description + "The entry index."; + } + leaf match-type { + type identityref { + base ns-match-type; + } + description + "Identifies an entry in the list of the IETF Network Slice + match criteria."; + } + list values { + key "index"; + description + "List of match criteria values."; + leaf index { + type uint8; + description + "Index of an entry in the list."; + } + leaf value { + type string; + description + "Describes the IETF Network Slice match criteria, e.g. + IP address, VLAN, etc."; + } + } + leaf target-ns-connection-group-id { + type leafref { + path "/network-slices/network-slice" + + "/ns-connection-groups/ns-connection-group" + + "/ns-connection-group-id"; + } + description + "reference to a Network Slice connection group."; + } + } + } + } + + grouping ns-sles { + description + "Indirectly Measurable Objectives of a IETF Network + Slice."; + leaf-list security { + type identityref { + base ns-security-type; + } + description + "The IETF Network Slice security SLE(s)"; + } + leaf isolation { + type identityref { + base ns-isolation-type; + } + default "ns-isolation-shared"; + description + "The IETF Network Slice isolation SLE requirement."; + } + leaf max-occupancy-level { + type uint8 { + range "1..100"; + } + description + "The maximal occupancy level specifies the number of flows to + be admitted."; + } + leaf mtu { + type uint16; + units "bytes"; + mandatory true; + description + "The MTU specifies the maximum length in octets of data + packets that can be transmitted by the NS. The value needs + to be less than or equal to the minimum MTU value of + all 'ep-network-access-points' in the NSEs of the NS."; + } + container steering-constraints { + description + "Container for the policy of steering constraints + applicable to IETF Network Slice."; + container path-constraints { + description + "Container for the policy of path constraints + applicable to IETF Network Slice."; + } + container service-function { + description + "Container for the policy of service function + applicable to IETF Network Slice."; + } + } + } + + grouping ns-metric-bounds { + description + "IETF Network Slice metric bounds grouping."; + container ns-metric-bounds { + description + "IETF Network Slice metric bounds container."; + list ns-metric-bound { + key "metric-type"; + description + "List of IETF Network Slice metric bounds."; + leaf metric-type { + type identityref { + base ns-slo-metric-type; + } + description + "Identifies an entry in the list of metric type + bounds for the IETF Network Slice."; + } + leaf metric-unit { + type string; + mandatory true; + description + "The metric unit of the parameter. For example, + s, ms, ns, and so on."; + } + leaf value-description { + type string; + description + "The description of previous value."; + } + leaf bound { + type uint64; + default "0"; + description + "The Bound on the Network Slice connection metric. A + zero indicate an unbounded upper limit for the + specific metric-type."; + } + } + } + } + + grouping ep-peering { + description + "A grouping for the IETF Network Slice Endpoint peering."; + container ep-peering { + description + "Describes NSE peering attributes."; + list protocol { + key "protocol-type"; + description + "List of the NSE peering protocol."; + leaf protocol-type { + type identityref { + base peering-protocol-type; + } + description + "Identifies an entry in the list of NSE peering + protocol type."; + } + list attribute { + key "index"; + description + "List of protocol attribute."; + leaf index { + type uint8; + description + "Index of an entry in the list."; + } + leaf attribute-description { + type string; + description + "The description of the attribute."; + } + leaf value { + type string; + description + "Describes the value of protocol attribute, e.g. + nexthop address, peer address, etc."; + } + } + } + } + } + + grouping ep-network-access-points { + description + "Grouping for the endpoint network access definition."; + container ep-network-access-points { + description + "List of network access points."; + list ep-network-access-point { + key "network-access-id"; + description + "The IETF Network Slice network access points + related parameters."; + leaf network-access-id { + type string; + description + "Uniquely identifier a network access point."; + } + leaf network-access-description { + type string; + description + "The network access point description."; + } + leaf network-access-node-id { + type string; + description + "The network access point node ID in the case of + multi-homing."; + } + leaf network-access-tp-id { + type string; + description + "The termination port ID of the EP network access + point."; + } + leaf network-access-tp-ip-address { + type inet:ip-address; + description + "The IP address of the EP network access point."; + } + leaf network-access-tp-ip-prefix-length { + type uint8; + description + "The subnet prefix length expressed in bits."; + } + leaf network-access-qos-policy-name { + type string; + description + "The name of the QoS policy that is applied to the + network access point. The name can reference a QoS + profile that is pre-provisioned on the device."; + } + leaf mtu { + type uint16; + units "bytes"; + mandatory true; + description + "Maximum size in octets of a data packet that + can traverse a NSE network access point."; + } + container network-access-tags { + description + "Container for the network access tags."; + list network-access-tag { + key "index"; + description + "The network access point tags list."; + leaf index { + type uint32; + description + "The entry index."; + } + leaf network-access-tag-type { + type identityref { + base network-access-tag-type; + } + description + "The network access point tag type."; + } + leaf network-access-tag-value { + type string; + description + "The network access point tag value."; + } + } + } + /* Per ep-network-access-point rate limits */ + uses ns-match-criteria; + uses ep-peering; + uses ns-rate-limit; + } + } + } + + grouping ep-monitoring-metrics { + description + "Grouping for the NS endpoint monitoring metrics."; + container ep-monitoring { + config false; + description + "Container for NS endpoint monitoring metrics."; + leaf incoming-utilized-bandwidth { + type te-types:te-bandwidth; + description + "Incoming bandwidth utilization at an endpoint."; + } + leaf incoming-bw-utilization { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + units "percent"; + mandatory true; + description + "To be used to define the bandwidth utilization + as a percentage of the available bandwidth."; + } + leaf outgoing-utilized-bandwidth { + type te-types:te-bandwidth; + description + "Outoing bandwidth utilization at an endpoint."; + } + leaf outgoing-bw-utilization { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + units "percent"; + mandatory true; + description + "To be used to define the bandwidth utilization + as a percentage of the available bandwidth."; + } + } + } + + grouping ns-connection-monitoring-metrics { + description + "Grouping for NS connection monitoring metrics."; + uses te-packet-types:one-way-performance-metrics-packet; + uses te-packet-types:two-way-performance-metrics-packet; + } + + grouping geolocation-container { + description + "A grouping containing a GPS location."; + container location { + description + "A container containing a GPS location."; + leaf altitude { + type int64; + units "millimeter"; + description + "Distance above the sea level."; + } + leaf latitude { + type decimal64 { + fraction-digits 8; + range "-90..90"; + } + description + "Relative position north or south on the Earth's surface."; + } + leaf longitude { + type decimal64 { + fraction-digits 8; + range "-180..180"; + } + description + "Angular distance east or west on the Earth's surface."; + } + } + // gps-location + } + + // geolocation-container + + grouping bw-rate-limits { + description + "Bandwidth rate limits grouping."; + reference + "RFC 7640: Traffic Management Benchmarking"; + leaf cir { + type uint64; + units "bps"; + description + "Committed Information Rate. The maximum number of bits + that a port can receive or send during one-second over an + interface."; + } + leaf cbs { + type uint64; + units "bytes"; + description + "Committed Burst Size. CBS controls the bursty nature + of the traffic. Traffic that does not use the configured + CIR accumulates credits until the credits reach the + configured CBS."; + } + leaf eir { + type uint64; + units "bps"; + description + "Excess Information Rate, i.e., excess frame delivery + allowed not subject to SLA. The traffic rate can be + limited by EIR."; + } + leaf ebs { + type uint64; + units "bytes"; + description + "Excess Burst Size. The bandwidth available for burst + traffic from the EBS is subject to the amount of + bandwidth that is accumulated during periods when + traffic allocated by the EIR policy is not used."; + } + leaf pir { + type uint64; + units "bps"; + description + "Peak Information Rate, i.e., maximum frame delivery + allowed. It is equal to or less than sum of CIR and EIR."; + } + leaf pbs { + type uint64; + units "bytes"; + description + "Peak Burst Size."; + } + } + + grouping ns-rate-limit { + description + "The rate limits grouping."; + container incoming-rate-limits { + description + "Container for the asymmetric traffic control."; + uses bw-rate-limits; + } + container outgoing-rate-limits { + description + "The rate-limit imposed on outgoing traffic."; + uses bw-rate-limits; + } + } + + grouping endpoint { + description + "IETF Network Slice endpoint related information"; + leaf ep-id { + type string; + description + "Unique identifier for the referred IETF Network + Slice endpoint."; + } + leaf ep-description { + type string; + description + "Give more description of the Network Slice endpoint."; + } + uses geolocation-container; + leaf node-id { + type string; + description + "Uniquely identifies an edge node within the IETF slice + network."; + } + leaf ep-ip { + type inet:ip-address; + description + "The IP address of the endpoint."; + } + uses ns-match-criteria; + uses ep-peering; + uses ep-network-access-points; + uses ns-rate-limit; + /* Per NSE rate limits */ + uses status-params; + uses ep-monitoring-metrics; + } + + //ns-endpoint + + grouping ns-connection { + description + "The network slice connection grouping."; + list ns-connection { + key "ns-connection-id"; + description + "List of Network Slice connections."; + leaf ns-connection-id { + type uint32; + description + "The Network Slice connection identifier."; + } + leaf ns-connectivity-type { + type identityref { + base ns-connectivity-type; + } + default "point-to-point"; + description + "Network Slice connection construct type."; + } + leaf-list src-nse { + type leafref { + path "/network-slices/network-slice" + + "/ns-endpoints/ns-endpoint/ep-id"; + } + description + "reference to source Network Slice endpoint."; + } + leaf-list dest-nse { + type leafref { + path "/network-slices/network-slice" + + "/ns-endpoints/ns-endpoint/ep-id"; + } + description + "reference to source Network Slice endpoint."; + } + uses ns-slo-sle-policy; + /* Per connection ns-slo-sle-policy overrides + * the per network slice ns-slo-sle-policy. + */ + container ns-connection-monitoring { + config false; + description + "SLO status Per NS connection."; + uses ns-connection-monitoring-metrics; + } + } + } + + //ns-connection + + grouping ns-connection-group { + description + "The Network Slice connection group is described in this + container."; + leaf ns-connection-group-id { + type string; + description + "The Network Slice connection group identifier."; + } + uses ns-slo-sle-policy; + uses ns-connection; + /* Per connection ns-slo-sle-policy overrides + * the per network slice ns-slo-sle-policy. + */ + container ns-connection-group-monitoring { + config false; + description + "SLO status Per NS connection."; + uses ns-connection-monitoring-metrics; + } + } + + //ns-connection-group + + grouping slice-template { + description + "Grouping for slice-templates."; + container ns-slo-sle-templates { + description + "Contains a set of network slice templates to + reference in the IETF network slice."; + list ns-slo-sle-template { + key "id"; + leaf id { + type string; + description + "Identification of the Service Level Objective (SLO) + and Service Level Expectation (SLE) template to be used. + Local administration meaning."; + } + leaf template-description { + type string; + description + "Description of the SLO & SLE policy template."; + } + description + "List for SLO and SLE template identifiers."; + } + } + } + + /* Configuration data nodes */ + + grouping ns-slo-sle-policy { + description + "Network Slice policy grouping."; + choice ns-slo-sle-policy { + description + "Choice for SLO and SLE policy template. + Can be standard template or customized template."; + case standard { + description + "Standard SLO template."; + leaf slo-sle-template { + type leafref { + path "/network-slices" + + "/ns-slo-sle-templates/ns-slo-sle-template/id"; + } + description + "Standard SLO and SLE template to be used."; + } + } + case custom { + description + "Customized SLO template."; + container slo-sle-policy { + description + "Contains the SLO policy."; + leaf policy-description { + type string; + description + "Description of the SLO policy."; + } + uses ns-metric-bounds; + uses ns-sles; + } + } + } + } + + container network-slices { + description + "Containes a list of IETF network slice"; + uses slice-template; + list network-slice { + key "ns-id"; + description + "A network-slice is identified by a ns-id."; + leaf ns-id { + type string; + description + "A unique network-slice identifier across an IETF NSC."; + } + leaf ns-description { + type string; + description + "Give more description of the network slice."; + } + container ns-tags { + description + "Container for the list of IETF Network Slice tags."; + list ns-tag { + key "index"; + description + "IETF Network Slice tag list."; + leaf index { + type uint32; + description + "The entry index."; + } + leaf ns-tag-type { + type identityref { + base ns-tag-type; + } + description + "The IETF Network Slice tag type."; + } + leaf ns-tag-value { + type string; + description + "The IETF Network Slice tag value."; + } + } + } + uses ns-slo-sle-policy; + uses status-params; + container ns-endpoints { + description + "NS Endpoints."; + list ns-endpoint { + key "ep-id"; + uses endpoint; + description + "List of endpoints in this slice."; + } + } + container ns-connection-groups { + description + "Contains NS connections group."; + list ns-connection-group { + key "ns-connection-group-id"; + description + "List of Network Slice connections."; + uses ns-connection-group; + } + } + } + //ietf-network-slice list + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-topology@2018-02-26.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-topology@2018-02-26.yang new file mode 100644 index 000000000..1ec944d79 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-topology@2018-02-26.yang @@ -0,0 +1,294 @@ +module ietf-network-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology"; + prefix nt; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Alexander Clemm + + + Editor: Jan Medved + + + Editor: Robert Varga + + + Editor: Nitin Bahadur + + + Editor: Hariharan Ananthakrishnan + + + Editor: Xufeng Liu + "; + + description + "This module defines a common base model for a network topology, + augmenting the base network data model with links to connect + nodes, as well as termination points to terminate links + on nodes. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef link-id { + type inet:uri; + description + "An identifier for a link in a topology. The precise + structure of the link-id will be up to the implementation. + The identifier SHOULD be chosen such that the same link in a + real network topology will always be identified through the + same identifier, even if the data model is instantiated in + separate datastores. An implementation MAY choose to capture + semantics in the identifier -- for example, to indicate the + type of link and/or the type of topology of which the link is + a part."; + } + + typedef tp-id { + type inet:uri; + description + "An identifier for termination points on a node. The precise + structure of the tp-id will be up to the implementation. + The identifier SHOULD be chosen such that the same termination + point in a real network topology will always be identified + through the same identifier, even if the data model is + instantiated in separate datastores. An implementation MAY + choose to capture semantics in the identifier -- for example, + to indicate the type of termination point and/or the type of + node that contains the termination point."; + } + + grouping link-ref { + description + "This grouping can be used to reference a link in a specific + network. Although it is not used in this module, it is + defined here for the convenience of augmenting modules."; + leaf link-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nt:link/nt:link-id"; + require-instance false; + } + description + "A type for an absolute reference to a link instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw:network-ref; + } + + grouping tp-ref { + description + "This grouping can be used to reference a termination point + in a specific node. Although it is not used in this module, + it is defined here for the convenience of augmenting + modules."; + leaf tp-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nw:node[nw:node-id=current()/../"+ + "node-ref]/nt:termination-point/nt:tp-id"; + require-instance false; + } + description + "A type for an absolute reference to a termination point. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw:node-ref; + } + + augment "/nw:networks/nw:network" { + description + "Add links to the network data model."; + list link { + key "link-id"; + description + "A network link connects a local (source) node and + a remote (destination) node via a set of the respective + node's termination points. It is possible to have several + links between the same source and destination nodes. + Likewise, a link could potentially be re-homed between + termination points. Therefore, in order to ensure that we + would always know to distinguish between links, every link + is identified by a dedicated link identifier. Note that a + link models a point-to-point link, not a multipoint link."; + leaf link-id { + type link-id; + description + "The identifier of a link in the topology. + A link is specific to a topology to which it belongs."; + } + container source { + description + "This container holds the logical source of a particular + link."; + leaf source-node { + type leafref { + path "../../../nw:node/nw:node-id"; + require-instance false; + } + description + "Source node identifier. Must be in the same topology."; + } + leaf source-tp { + type leafref { + path "../../../nw:node[nw:node-id=current()/../"+ + "source-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the source node + and terminates the link."; + } + } + + container destination { + description + "This container holds the logical destination of a + particular link."; + leaf dest-node { + type leafref { + path "../../../nw:node/nw:node-id"; + require-instance false; + } + description + "Destination node identifier. Must be in the same + network."; + } + leaf dest-tp { + type leafref { + path "../../../nw:node[nw:node-id=current()/../"+ + "dest-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the + destination node and terminates the link."; + } + } + list supporting-link { + key "network-ref link-ref"; + description + "Identifies the link or links on which this link depends."; + leaf network-ref { + type leafref { + path "../../../nw:supporting-network/nw:network-ref"; + require-instance false; + } + description + "This leaf identifies in which underlay topology + the supporting link is present."; + } + + leaf link-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/"+ + "../network-ref]/link/link-id"; + require-instance false; + } + description + "This leaf identifies a link that is a part + of this link's underlay. Reference loops in which + a link identifies itself as its underlay, either + directly or transitively, are not allowed."; + } + } + } + } + augment "/nw:networks/nw:network/nw:node" { + description + "Augments termination points that terminate links. + Termination points can ultimately be mapped to interfaces."; + list termination-point { + key "tp-id"; + description + "A termination point can terminate a link. + Depending on the type of topology, a termination point + could, for example, refer to a port or an interface."; + leaf tp-id { + type tp-id; + description + "Termination point identifier."; + } + list supporting-termination-point { + key "network-ref node-ref tp-ref"; + description + "This list identifies any termination points on which a + given termination point depends or onto which it maps. + Those termination points will themselves be contained + in a supporting node. This dependency information can be + inferred from the dependencies between links. Therefore, + this item is not separately configurable. Hence, no + corresponding constraint needs to be articulated. + The corresponding information is simply provided by the + implementing system."; + + leaf network-ref { + type leafref { + path "../../../nw:supporting-node/nw:network-ref"; + require-instance false; + } + description + "This leaf identifies in which topology the + supporting termination point is present."; + } + leaf node-ref { + type leafref { + path "../../../nw:supporting-node/nw:node-ref"; + require-instance false; + } + description + "This leaf identifies in which node the supporting + termination point is present."; + } + leaf tp-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/"+ + "../network-ref]/nw:node[nw:node-id=current()/../"+ + "node-ref]/termination-point/tp-id"; + require-instance false; + } + description + "Reference to the underlay node (the underlay node must + be in a different topology)."; + } + } + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network@2018-02-26.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network@2018-02-26.yang new file mode 100644 index 000000000..6a03d7e41 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network@2018-02-26.yang @@ -0,0 +1,192 @@ +module ietf-network { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network"; + prefix nw; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Alexander Clemm + + + Editor: Jan Medved + + + Editor: Robert Varga + + + Editor: Nitin Bahadur + + + Editor: Hariharan Ananthakrishnan + + + Editor: Xufeng Liu + "; + description + "This module defines a common base data model for a collection + of nodes in a network. Node definitions are further used + in network topologies and inventories. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef node-id { + type inet:uri; + description + "Identifier for a node. The precise structure of the node-id + will be up to the implementation. For example, some + implementations MAY pick a URI that includes the network-id + as part of the path. The identifier SHOULD be chosen + such that the same node in a real network topology will + always be identified through the same identifier, even if + the data model is instantiated in separate datastores. An + implementation MAY choose to capture semantics in the + identifier -- for example, to indicate the type of node."; + } + + typedef network-id { + type inet:uri; + description + "Identifier for a network. The precise structure of the + network-id will be up to the implementation. The identifier + SHOULD be chosen such that the same network will always be + identified through the same identifier, even if the data model + is instantiated in separate datastores. An implementation MAY + choose to capture semantics in the identifier -- for example, + to indicate the type of network."; + } + + grouping network-ref { + description + "Contains the information necessary to reference a network -- + for example, an underlay network."; + leaf network-ref { + type leafref { + path "/nw:networks/nw:network/nw:network-id"; + require-instance false; + } + description + "Used to reference a network -- for example, an underlay + network."; + } + } + + grouping node-ref { + description + "Contains the information necessary to reference a node."; + leaf node-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nw:node/nw:node-id"; + require-instance false; + } + description + "Used to reference a node. + Nodes are identified relative to the network that + contains them."; + } + uses network-ref; + } + + container networks { + description + "Serves as a top-level container for a list of networks."; + list network { + key "network-id"; + description + "Describes a network. + A network typically contains an inventory of nodes, + topological information (augmented through the + network-topology data model), and layering information."; + leaf network-id { + type network-id; + description + "Identifies a network."; + } + container network-types { + description + "Serves as an augmentation target. + The network type is indicated through corresponding + presence containers augmented into this container."; + } + list supporting-network { + key "network-ref"; + description + "An underlay network, used to represent layered network + topologies."; + leaf network-ref { + type leafref { + path "/nw:networks/nw:network/nw:network-id"; + require-instance false; + } + description + "References the underlay network."; + } + } + + list node { + key "node-id"; + description + "The inventory of nodes of this network."; + leaf node-id { + type node-id; + description + "Uniquely identifies a node within the containing + network."; + } + list supporting-node { + key "network-ref node-ref"; + description + "Represents another node that is in an underlay network + and that supports this node. Used to represent layering + structure."; + leaf network-ref { + type leafref { + path "../../../nw:supporting-network/nw:network-ref"; + require-instance false; + } + description + "References the underlay network of which the + underlay node is a part."; + } + leaf node-ref { + type leafref { + path "/nw:networks/nw:network/nw:node/nw:node-id"; + require-instance false; + } + description + "References the underlay node itself."; + } + } + } + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-packet-fields@2019-03-04.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-packet-fields@2019-03-04.yang new file mode 100644 index 000000000..2fb797bd8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-packet-fields@2019-03-04.yang @@ -0,0 +1,576 @@ +module ietf-packet-fields { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-packet-fields"; + prefix packet-fields; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991 - Common YANG Data Types."; + } + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991 - Common YANG Data Types."; + } + + import ietf-ethertypes { + prefix eth; + reference + "RFC 8519 - YANG Data Model for Network Access Control + Lists (ACLs)."; + } + + organization + "IETF NETMOD (Network Modeling) Working Group."; + + contact + "WG Web: + WG List: netmod@ietf.org + + Editor: Mahesh Jethanandani + mjethanandani@gmail.com + Editor: Lisa Huang + huangyi_99@yahoo.com + Editor: Sonal Agarwal + sagarwal12@gmail.com + Editor: Dana Blair + dana@blairhome.com"; + + description + "This YANG module defines groupings that are used by + the ietf-access-control-list YANG module. Their usage + is not limited to ietf-access-control-list and can be + used anywhere as applicable. + + Copyright (c) 2019 IETF Trust and the persons identified as + the document authors. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD + License set forth in Section 4.c of the IETF Trust's Legal + Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8519; see + the RFC itself for full legal notices."; + + revision 2019-03-04 { + description + "Initial version."; + reference + "RFC 8519: YANG Data Model for Network Access Control + Lists (ACLs)."; + } + + /* + * Typedefs + */ + typedef operator { + type enumeration { + enum lte { + description + "Less than or equal to."; + } + enum gte { + description + "Greater than or equal to."; + } + enum eq { + description + "Equal to."; + } + enum neq { + description + "Not equal to."; + } + } + description + "The source and destination port range definitions + can be further qualified using an operator. An + operator is needed only if the lower-port is specified + and the upper-port is not specified. The operator + therefore further qualifies the lower-port only."; + } + + /* + * Groupings + */ + grouping port-range-or-operator { + choice port-range-or-operator { + case range { + leaf lower-port { + type inet:port-number; + must '. <= ../upper-port' { + error-message + "The lower-port must be less than or equal to + the upper-port."; + } + mandatory true; + description + "Lower boundary for a port."; + } + leaf upper-port { + type inet:port-number; + mandatory true; + description + "Upper boundary for a port."; + } + } + case operator { + leaf operator { + type operator; + default "eq"; + description + "Operator to be applied on the port below."; + } + leaf port { + type inet:port-number; + mandatory true; + description + "Port number along with the operator on which to + match."; + } + } + description + "Choice of specifying a port range or a single + port along with an operator."; + } + description + "Grouping for port definitions in the form of a + choice statement."; + } + + grouping acl-ip-header-fields { + description + "IP header fields common to IPv4 and IPv6"; + reference + "RFC 791: Internet Protocol."; + + leaf dscp { + type inet:dscp; + description + "Differentiated Services Code Point."; + reference + "RFC 2474: Definition of the Differentiated Services + Field (DS Field) in the IPv4 and IPv6 + Headers."; + } + + leaf ecn { + type uint8 { + range "0..3"; + } + description + "Explicit Congestion Notification."; + reference + "RFC 3168: The Addition of Explicit Congestion + Notification (ECN) to IP."; + } + + leaf length { + type uint16; + description + "In the IPv4 header field, this field is known as the Total + Length. Total Length is the length of the datagram, measured + in octets, including internet header and data. + + In the IPv6 header field, this field is known as the Payload + Length, which is the length of the IPv6 payload, i.e., the rest + of the packet following the IPv6 header, in octets."; + reference + "RFC 791: Internet Protocol + RFC 8200: Internet Protocol, Version 6 (IPv6) Specification."; + } + leaf ttl { + type uint8; + description + "This field indicates the maximum time the datagram is allowed + to remain in the internet system. If this field contains the + value zero, then the datagram must be dropped. + + In IPv6, this field is known as the Hop Limit."; + reference + "RFC 791: Internet Protocol + RFC 8200: Internet Protocol, Version 6 (IPv6) Specification."; + } + leaf protocol { + type uint8; + description + "Internet Protocol number. Refers to the protocol of the + payload. In IPv6, this field is known as 'next-header', + and if extension headers are present, the protocol is + present in the 'upper-layer' header."; + reference + "RFC 791: Internet Protocol + RFC 8200: Internet Protocol, Version 6 (IPv6) Specification."; + } + } + + grouping acl-ipv4-header-fields { + description + "Fields in the IPv4 header."; + leaf ihl { + type uint8 { + range "5..60"; + } + description + "In an IPv4 header field, the Internet Header Length (IHL) is + the length of the internet header in 32-bit words and + thus points to the beginning of the data. Note that the + minimum value for a correct header is 5."; + } + leaf flags { + type bits { + bit reserved { + position 0; + description + "Reserved. Must be zero."; + } + bit fragment { + position 1; + description + "Setting the value to 0 indicates may fragment, while + setting the value to 1 indicates do not fragment."; + } + bit more { + position 2; + description + "Setting the value to 0 indicates this is the last fragment, + and setting the value to 1 indicates more fragments are + coming."; + } + } + description + "Bit definitions for the Flags field in the IPv4 header."; + } + leaf offset { + type uint16 { + range "20..65535"; + } + description + "The fragment offset is measured in units of 8 octets (64 bits). + The first fragment has offset zero. The length is 13 bits"; + } + leaf identification { + type uint16; + description + "An identifying value assigned by the sender to aid in + assembling the fragments of a datagram."; + } + + choice destination-network { + case destination-ipv4-network { + leaf destination-ipv4-network { + type inet:ipv4-prefix; + description + "Destination IPv4 address prefix."; + } + } + description + "Choice of specifying a destination IPv4 address or + referring to a group of IPv4 destination addresses."; + } + + choice source-network { + case source-ipv4-network { + leaf source-ipv4-network { + type inet:ipv4-prefix; + description + "Source IPv4 address prefix."; + } + } + description + "Choice of specifying a source IPv4 address or + referring to a group of IPv4 source addresses."; + } + } + + grouping acl-ipv6-header-fields { + description + "Fields in the IPv6 header."; + + choice destination-network { + case destination-ipv6-network { + leaf destination-ipv6-network { + type inet:ipv6-prefix; + description + "Destination IPv6 address prefix."; + } + } + description + "Choice of specifying a destination IPv6 address + or referring to a group of IPv6 destination + addresses."; + } + + choice source-network { + case source-ipv6-network { + leaf source-ipv6-network { + type inet:ipv6-prefix; + description + "Source IPv6 address prefix."; + } + } + description + "Choice of specifying a source IPv6 address or + referring to a group of IPv6 source addresses."; + } + + leaf flow-label { + type inet:ipv6-flow-label; + description + "IPv6 Flow label."; + } + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation."; + } + + grouping acl-eth-header-fields { + description + "Fields in the Ethernet header."; + leaf destination-mac-address { + type yang:mac-address; + description + "Destination IEEE 802 Media Access Control (MAC) + address."; + } + leaf destination-mac-address-mask { + type yang:mac-address; + description + "Destination IEEE 802 MAC address mask."; + } + leaf source-mac-address { + type yang:mac-address; + description + "Source IEEE 802 MAC address."; + } + leaf source-mac-address-mask { + type yang:mac-address; + description + "Source IEEE 802 MAC address mask."; + } + leaf ethertype { + type eth:ethertype; + description + "The Ethernet Type (or Length) value represented + in the canonical order defined by IEEE 802. + The canonical representation uses lowercase + characters."; + reference + "IEEE 802-2014, Clause 9.2."; + } + reference + "IEEE 802: IEEE Standard for Local and Metropolitan + Area Networks: Overview and Architecture."; + } + + grouping acl-tcp-header-fields { + description + "Collection of TCP header fields that can be used to + set up a match filter."; + leaf sequence-number { + type uint32; + description + "Sequence number that appears in the packet."; + } + leaf acknowledgement-number { + type uint32; + description + "The acknowledgement number that appears in the + packet."; + } + leaf data-offset { + type uint8 { + range "5..15"; + } + description + "Specifies the size of the TCP header in 32-bit + words. The minimum size header is 5 words and + the maximum is 15 words; thus, this gives a + minimum size of 20 bytes and a maximum of 60 + bytes, allowing for up to 40 bytes of options + in the header."; + } + leaf reserved { + type uint8; + description + "Reserved for future use."; + } + leaf flags { + type bits { + bit cwr { + position 1; + description + "The Congestion Window Reduced (CWR) flag is set + by the sending host to indicate that it received + a TCP segment with the ECN-Echo (ECE) flag set + and had responded in the congestion control + mechanism."; + reference + "RFC 3168: The Addition of Explicit Congestion + Notification (ECN) to IP."; + } + bit ece { + position 2; + description + "ECN-Echo has a dual role, depending on the value + of the SYN flag. It indicates the following: if + the SYN flag is set (1), the TCP peer is ECN + capable, and if the SYN flag is clear (0), a packet + with the Congestion Experienced flag set (ECN=11) + in the IP header was received during normal + transmission (added to the header by RFC 3168). + This serves as an indication of network congestion + (or impending congestion) to the TCP sender."; + reference + "RFC 3168: The Addition of Explicit Congestion + Notification (ECN) to IP."; + } + bit urg { + position 3; + description + "Indicates that the Urgent Pointer field is significant."; + } + bit ack { + position 4; + description + "Indicates that the Acknowledgement field is significant. + All packets after the initial SYN packet sent by the + client should have this flag set."; + } + bit psh { + position 5; + description + "Push function. Asks to push the buffered data to the + receiving application."; + } + bit rst { + position 6; + description + "Reset the connection."; + } + bit syn { + position 7; + description + "Synchronize sequence numbers. Only the first packet + sent from each end should have this flag set. Some + other flags and fields change meaning based on this + flag, and some are only valid for when it is set, + and others when it is clear."; + } + bit fin { + position 8; + description + "Last package from the sender."; + } + } + description + "Also known as Control Bits. Contains nine 1-bit flags."; + reference + "RFC 793: Transmission Control Protocol."; + } + leaf window-size { + type uint16; + units "bytes"; + description + "The size of the receive window, which specifies + the number of window size units beyond the segment + identified by the sequence number in the Acknowledgement + field that the sender of this segment is currently + willing to receive."; + } + leaf urgent-pointer { + type uint16; + description + "This field is an offset from the sequence number + indicating the last urgent data byte."; + } + leaf options { + type binary { + length "1..40"; + } + description + "The length of this field is determined by the + Data Offset field. Options have up to three + fields: Option-Kind (1 byte), Option-Length + (1 byte), and Option-Data (variable). The Option-Kind + field indicates the type of option and is the + only field that is not optional. Depending on + what kind of option we are dealing with, + the next two fields may be set: the Option-Length + field indicates the total length of the option, + and the Option-Data field contains the value of + the option, if applicable."; + } + } + + grouping acl-udp-header-fields { + description + "Collection of UDP header fields that can be used + to set up a match filter."; + leaf length { + type uint16; + description + "A field that specifies the length in bytes of + the UDP header and UDP data. The minimum + length is 8 bytes because that is the length of + the header. The field size sets a theoretical + limit of 65,535 bytes (8-byte header plus 65,527 + bytes of data) for a UDP datagram. However, the + actual limit for the data length, which is + imposed by the underlying IPv4 protocol, is + 65,507 bytes (65,535 minus 8-byte UDP header + minus 20-byte IP header). + + In IPv6 jumbograms, it is possible to have + UDP packets of a size greater than 65,535 bytes. + RFC 2675 specifies that the Length field is set + to zero if the length of the UDP header plus + UDP data is greater than 65,535."; + } + } + + grouping acl-icmp-header-fields { + description + "Collection of ICMP header fields that can be + used to set up a match filter."; + leaf type { + type uint8; + description + "Also known as control messages."; + reference + "RFC 792: Internet Control Message Protocol + RFC 4443: Internet Control Message Protocol (ICMPv6) + for Internet Protocol Version 6 (IPv6) + Specification."; + } + leaf code { + type uint8; + description + "ICMP subtype. Also known as control messages."; + reference + "RFC 792: Internet Control Message Protocol + RFC 4443: Internet Control Message Protocol (ICMPv6) + for Internet Protocol Version 6 (IPv6) + Specification."; + } + leaf rest-of-header { + type binary; + description + "Unbounded in length, the contents vary based on the + ICMP type and code. Also referred to as 'Message Body' + in ICMPv6."; + reference + "RFC 792: Internet Control Message Protocol + RFC 4443: Internet Control Message Protocol (ICMPv6) + for Internet Protocol Version 6 (IPv6) + Specification."; + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-routing-types@2017-12-04.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-routing-types@2017-12-04.yang new file mode 100644 index 000000000..24319c155 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-routing-types@2017-12-04.yang @@ -0,0 +1,771 @@ +module ietf-routing-types { + namespace "urn:ietf:params:xml:ns:yang:ietf-routing-types"; + prefix rt-types; + + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF RTGWG - Routing Area Working Group"; + contact + "WG Web: + WG List: + + Editors: Xufeng Liu + + Yingzhen Qu + + Acee Lindem + + Christian Hopps + + Lou Berger + "; + + description + "This module contains a collection of YANG data types + considered generally useful for routing protocols. + + Copyright (c) 2017 IETF Trust and the persons + identified as authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8294; see + the RFC itself for full legal notices."; + revision 2017-12-04 { + description "Initial revision."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area. + Section 3."; + } + + /*** Identities related to MPLS/GMPLS ***/ + + identity mpls-label-special-purpose-value { + description + "Base identity for deriving identities describing + special-purpose Multiprotocol Label Switching (MPLS) label + values."; + reference + "RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + identity ipv4-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv4 Explicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity router-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Router Alert Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity ipv6-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv6 Explicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity implicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Implicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity entropy-label-indicator { + base mpls-label-special-purpose-value; + description + "This identity represents the Entropy Label Indicator."; + reference + "RFC 6790: The Use of Entropy Labels in MPLS Forwarding. + Sections 3 and 10.1."; + } + + identity gal-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Generic Associated Channel + (G-ACh) Label (GAL)."; + reference + "RFC 5586: MPLS Generic Associated Channel. + Sections 4 and 10."; + } + + identity oam-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the OAM Alert Label."; + reference + "RFC 3429: Assignment of the 'OAM Alert Label' for + Multiprotocol Label Switching Architecture (MPLS) + Operation and Maintenance (OAM) Functions. + Sections 3 and 6."; + } + + identity extension-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Extension Label."; + reference + "RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels. Sections 3.1 and 5."; + } + + /*** Collection of types related to routing ***/ + + typedef router-id { + type yang:dotted-quad; + description + "A 32-bit number in the dotted-quad format assigned to each + router. This number uniquely identifies the router within + an Autonomous System."; + } + + /*** Collection of types related to VPNs ***/ + + typedef route-target { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + + description + "A Route Target is an 8-octet BGP extended community + initially identifying a set of sites in a BGP VPN + (RFC 4364). However, it has since taken on a more general + role in BGP route filtering. A Route Target consists of two + or three fields: a 2-octet Type field, an administrator + field, and, optionally, an assigned number field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + + Additionally, a generic pattern is defined for future + Route Target types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef ipv6-route-target { + type string { + pattern + '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 Route Target is a 20-octet BGP IPv6 Address + Specific Extended Community serving the same function + as a standard 8-octet Route Target, except that it only + allows an IPv6 address as the global administrator. + The format is . + + Two valid examples are 2001:db8::1:6544 and + 2001:db8::5eb1:791:6b37:17958."; + reference + "RFC 5701: IPv6 Address Specific BGP Extended Community + Attribute."; + } + + typedef route-target-type { + type enumeration { + enum import { + value 0; + description + "The Route Target applies to route import."; + } + enum export { + value 1; + description + "The Route Target applies to route export."; + } + + enum both { + value 2; + description + "The Route Target applies to both route import and + route export."; + } + } + description + "Indicates the role a Route Target takes in route filtering."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)."; + } + + typedef route-distinguisher { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + + description + "A Route Distinguisher is an 8-octet value used to + distinguish routes from different BGP VPNs (RFC 4364). + A Route Distinguisher will have the same format as a + Route Target as per RFC 4360 and will consist of + two or three fields: a 2-octet Type field, an administrator + field, and, optionally, an assigned number field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + + Additionally, a generic pattern is defined for future + route discriminator types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef route-origin { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + description + "A Route Origin is an 8-octet BGP extended community + identifying the set of sites where the BGP route + originated (RFC 4364). A Route Origin will have the same + format as a Route Target as per RFC 4360 and will consist + of two or three fields: a 2-octet Type field, an + administrator field, and, optionally, an assigned number + field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + Additionally, a generic pattern is defined for future + Route Origin types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef ipv6-route-origin { + type string { + pattern + '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 Route Origin is a 20-octet BGP IPv6 Address + Specific Extended Community serving the same function + as a standard 8-octet route, except that it only allows + an IPv6 address as the global administrator. The format + is . + + Two valid examples are 2001:db8::1:6544 and + 2001:db8::5eb1:791:6b37:17958."; + reference + "RFC 5701: IPv6 Address Specific BGP Extended Community + Attribute."; + } + + /*** Collection of types common to multicast ***/ + + typedef ipv4-multicast-group-address { + type inet:ipv4-address { + pattern '(2((2[4-9])|(3[0-9]))\.).*'; + } + description + "This type represents an IPv4 multicast group address, + which is in the range of 224.0.0.0 to 239.255.255.255."; + reference + "RFC 1112: Host Extensions for IP Multicasting."; + } + + typedef ipv6-multicast-group-address { + type inet:ipv6-address { + pattern '(([fF]{2}[0-9a-fA-F]{2}):).*'; + } + description + "This type represents an IPv6 multicast group address, + which is in the range of ff00::/8."; + reference + "RFC 4291: IP Version 6 Addressing Architecture. Section 2.7. + RFC 7346: IPv6 Multicast Address Scopes."; + } + + typedef ip-multicast-group-address { + type union { + type ipv4-multicast-group-address; + type ipv6-multicast-group-address; + } + description + "This type represents a version-neutral IP multicast group + address. The format of the textual representation implies + the IP version."; + } + + typedef ipv4-multicast-source-address { + type union { + type enumeration { + enum * { + description + "Any source address."; + } + } + type inet:ipv4-address; + } + description + "Multicast source IPv4 address type."; + } + + typedef ipv6-multicast-source-address { + type union { + type enumeration { + enum * { + description + "Any source address."; + } + } + type inet:ipv6-address; + } + description + "Multicast source IPv6 address type."; + } + + /*** Collection of types common to protocols ***/ + + typedef bandwidth-ieee-float32 { + type string { + pattern + '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([0-9a-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|' + + '1[01][0-9]|0?[0-9]?[0-9])?)'; + } + description + "Bandwidth in IEEE 754 floating-point 32-bit binary format: + (-1)**(S) * 2**(Exponent-127) * (1 + Fraction), + where Exponent uses 8 bits and Fraction uses 23 bits. + The units are octets per second. + The encoding format is the external hexadecimal-significant + character sequences specified in IEEE 754 and ISO/IEC C99. + The format is restricted to be normalized, non-negative, and + non-fraction: 0x1.hhhhhhp{+}d, 0X1.HHHHHHP{+}D, or 0x0p0, + where 'h' and 'H' are hexadecimal digits and 'd' and 'D' are + integers in the range of [0..127]. + When six hexadecimal digits are used for 'hhhhhh' or + 'HHHHHH', the least significant digit must be an even + number. 'x' and 'X' indicate hexadecimal; 'p' and 'P' + indicate a power of two. Some examples are 0x0p0, 0x1p10, + and 0x1.abcde2p+20."; + reference + "IEEE Std 754-2008: IEEE Standard for Floating-Point + Arithmetic. + ISO/IEC C99: Information technology - Programming + Languages - C."; + } + + typedef link-access-type { + type enumeration { + enum broadcast { + description + "Specify broadcast multi-access network."; + } + enum non-broadcast-multiaccess { + description + "Specify Non-Broadcast Multi-Access (NBMA) network."; + } + enum point-to-multipoint { + description + "Specify point-to-multipoint network."; + } + enum point-to-point { + description + "Specify point-to-point network."; + } + } + description + "Link access type."; + } + + typedef timer-multiplier { + type uint8; + description + "The number of timer value intervals that should be + interpreted as a failure."; + } + + typedef timer-value-seconds16 { + type union { + type uint16 { + range "1..65535"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (16-bit range)."; + } + + typedef timer-value-seconds32 { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (32-bit range)."; + } + + typedef timer-value-milliseconds { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "milliseconds"; + description + "Timer value type, in milliseconds."; + } + + typedef percentage { + type uint8 { + range "0..100"; + } + description + "Integer indicating a percentage value."; + } + + typedef timeticks64 { + type uint64; + description + "This type is based on the timeticks type defined in + RFC 6991, but with 64-bit width. It represents the time, + modulo 2^64, in hundredths of a second between two epochs."; + reference + "RFC 6991: Common YANG Data Types."; + } + + typedef uint24 { + type uint32 { + range "0..16777215"; + } + description + "24-bit unsigned integer."; + } + + /*** Collection of types related to MPLS/GMPLS ***/ + + typedef generalized-label { + type binary; + description + "Generalized Label. Nodes sending and receiving the + Generalized Label are aware of the link-specific + label context and type."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description. Section 3.2."; + } + + typedef mpls-label-special-purpose { + type identityref { + base mpls-label-special-purpose-value; + } + description + "This type represents the special-purpose MPLS label values."; + reference + "RFC 3032: MPLS Label Stack Encoding. + RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + typedef mpls-label-general-use { + type uint32 { + range "16..1048575"; + } + description + "The 20-bit label value in an MPLS label stack as specified + in RFC 3032. This label value does not include the + encodings of Traffic Class and TTL (Time to Live). + The label range specified by this type is for general use, + with special-purpose MPLS label values excluded."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + + typedef mpls-label { + type union { + type mpls-label-special-purpose; + type mpls-label-general-use; + } + description + "The 20-bit label value in an MPLS label stack as specified + in RFC 3032. This label value does not include the + encodings of Traffic Class and TTL."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + + /*** Groupings **/ + + grouping mpls-label-stack { + description + "This grouping specifies an MPLS label stack. The label + stack is encoded as a list of label stack entries. The + list key is an identifier that indicates the relative + ordering of each entry, with the lowest-value identifier + corresponding to the top of the label stack."; + container mpls-label-stack { + description + "Container for a list of MPLS label stack entries."; + list entry { + key "id"; + description + "List of MPLS label stack entries."; + leaf id { + type uint8; + description + "Identifies the entry in a sequence of MPLS label + stack entries. An entry with a smaller identifier + value precedes an entry with a larger identifier + value in the label stack. The value of this ID has + no semantic meaning other than relative ordering + and referencing the entry."; + } + leaf label { + type rt-types:mpls-label; + description + "Label value."; + } + + leaf ttl { + type uint8; + description + "Time to Live (TTL)."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + leaf traffic-class { + type uint8 { + range "0..7"; + } + description + "Traffic Class (TC)."; + reference + "RFC 5462: Multiprotocol Label Switching (MPLS) Label + Stack Entry: 'EXP' Field Renamed to 'Traffic Class' + Field."; + } + } + } + } + + grouping vpn-route-targets { + description + "A grouping that specifies Route Target import-export rules + used in BGP-enabled VPNs."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 4664: Framework for Layer 2 Virtual Private Networks + (L2VPNs)."; + list vpn-target { + key "route-target"; + description + "List of Route Targets."; + leaf route-target { + type rt-types:route-target; + description + "Route Target value."; + } + leaf route-target-type { + type rt-types:route-target-type; + mandatory true; + description + "Import/export type of the Route Target."; + } + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-te-packet-types@2024-10-30.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-te-packet-types@2024-10-30.yang new file mode 100644 index 000000000..70bead463 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-te-packet-types@2024-10-30.yang @@ -0,0 +1,806 @@ +module ietf-te-packet-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-te-packet-types"; + prefix te-packet-types; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + + import ietf-te-types { + prefix te-types; + reference + "RFC XXXX: Common YANG Data Types for Traffic Engineering"; + } + // RFC Editor: replace XXXX with actual RFC number + // and remove this note + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: + WG List: + + Editor: Tarek Saad + + + Editor: Rakesh Gandhi + + + Editor: Vishnu Pavan Beeram + + + Editor: Xufeng Liu + + + Editor: Igor Bryskin + "; + description + "This YANG module contains a collection of generally useful YANG + data type definitions specific to Packet Traffic Enginnering + (TE). + + The model fully conforms to the Network Management Datastore + Architecture (NMDA). + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', + 'MAY', and 'OPTIONAL' in this document are to be interpreted as + described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, + they appear in all capitals, as shown here. + + Copyright (c) 2024 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Revised BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX + (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself + for full legal notices."; + revision 2024-10-30 { + description + "This revision adds the following new identities: + - bandwidth-profile-type; + - link-metric-delay-variation; + - link-metric-loss; + - path-metric-delay-variation; + - path-metric-loss. + + This revision adds the following new groupings: + - bandwidth-profile-parameters; + - te-packet-path-bandwidth; + - te-packet-link-bandwidth. + + This revision provides also few editorial changes."; + reference + "RFC XXXX: Common YANG Data Types for Traffic Engineering"; + } + // RFC Editor: replace XXXX with actual RFC number, update date + // information and remove this note + + revision 2020-06-10 { + description + "Latest revision of TE MPLS types."; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + + /* + * Identities + */ + + identity bandwidth-profile-type { + description + "Bandwidth Profile Types"; + } + + identity mef-10 { + base bandwidth-profile-type; + description + "MEF 10 Bandwidth Profile"; + reference + "MEF 10.3: Ethernet Services Attributes Phase 3"; + } + + identity rfc-2697 { + base bandwidth-profile-type; + description + "RFC 2697 Bandwidth Profile"; + reference + "RFC 2697: A Single Rate Three Color Marker"; + } + + identity rfc-2698 { + base bandwidth-profile-type; + description + "RFC 2698 Bandwidth Profile"; + reference + "RFC 2698: A Two Rate Three Color Marker"; + } + + // Derived identities from te-types:link-metric-type + + identity link-metric-delay-variation { + base te-types:link-metric-type; + description + "The Unidirectional Delay Variation Metric, + measured in units of microseconds."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions, + Section 4.3 + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions, + Section 4.3"; + } + + identity link-metric-loss { + base te-types:link-metric-type; + description + "The Unidirectional Link Loss Metric, + measured in units of 0.000003%."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions, + Section 4.4 + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions, + Section 4.4"; + } + + // Derived identities from te-types:link-metric-type + + identity path-metric-delay-variation { + base te-types:path-metric-type; + description + "The Path Delay Variation Metric, + measured in units of microseconds."; + reference + "RFC 8233: Extensions to the Path Computation Element + Communication Protocol (PCEP) to Compute + Service-Aware Label Switched Paths (LSPs), + Section 3.1.2"; + } + + identity path-metric-loss { + base te-types:path-metric-type; + description + "The Path Loss Metric, measured in units of 0.000003%."; + reference + "RFC 8233: Extensions to the Path Computation Element + Communication Protocol (PCEP) to Compute + Service-Aware Label Switched Paths (LSPs), + Section 3.1.3"; + } + + /* + * Typedefs + */ + + typedef te-bandwidth-requested-type { + type enumeration { + enum specified-value { + description + "Bandwidth value is explicitly specified."; + } + enum specified-profile { + description + "Bandwidth profile is explicitly specified."; + } + enum auto { + description + "Bandwidth is automatically computed."; + } + } + description + "Enumerated type for specifying whether bandwidth is + explicitly specified or automatically computed."; + } + + typedef te-class-type { + type uint8; + description + "Diffserv-TE Class-Type. Defines a set of Traffic Trunks + crossing a link that is governed by a specific set of + bandwidth constraints. Class-Type is used for the purposes + of link bandwidth allocation, constraint-based routing, and + admission control."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering"; + } + + typedef bc-type { + type uint8 { + range "0..7"; + } + description + "Diffserv-TE bandwidth constraints as defined in RFC 4124."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering"; + } + + typedef bandwidth-kbps { + type uint64; + units "Kbps"; + description + "Bandwidth values, expressed in kilobits per second."; + } + + typedef bandwidth-mbps { + type uint64; + units "Mbps"; + description + "Bandwidth values, expressed in megabits per second."; + } + + typedef bandwidth-gbps { + type uint64; + units "Gbps"; + description + "Bandwidth values, expressed in gigabits per second."; + } + + identity backup-protection-type { + description + "Base identity for the backup protection type."; + } + + identity backup-protection-link { + base backup-protection-type; + description + "Backup provides link protection only."; + } + + identity backup-protection-node-link { + base backup-protection-type; + description + "Backup offers node (preferred) or link protection."; + } + + identity bc-model-type { + description + "Base identity for the Diffserv-TE Bandwidth Constraints + Model type."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering"; + } + + identity bc-model-rdm { + base bc-model-type; + description + "Russian Dolls Bandwidth Constraints Model type."; + reference + "RFC 4127: Russian Dolls Bandwidth Constraints Model for + Diffserv-aware MPLS Traffic Engineering"; + } + + identity bc-model-mam { + base bc-model-type; + description + "Maximum Allocation Bandwidth Constraints Model type."; + reference + "RFC 4125: Maximum Allocation Bandwidth Constraints Model for + Diffserv-aware MPLS Traffic Engineering"; + } + + identity bc-model-mar { + base bc-model-type; + description + "Maximum Allocation with Reservation Bandwidth Constraints + Model type."; + reference + "RFC 4126: Max Allocation with Reservation Bandwidth + Constraints Model for Diffserv-aware MPLS Traffic + Engineering & Performance Comparisons"; + } + + /* + * Groupings + */ + + grouping performance-metrics-attributes-packet { + description + "Contains PM attributes."; + uses te-types:performance-metrics-attributes { + augment "performance-metrics-one-way" { + leaf one-way-min-delay { + type uint32 { + range "0..16777215"; + } + description + "One-way minimum delay or latency in microseconds."; + } + leaf one-way-min-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "One-way minimum delay or latency normality."; + } + leaf one-way-max-delay { + type uint32 { + range "0..16777215"; + } + description + "One-way maximum delay or latency in microseconds."; + } + leaf one-way-max-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "One-way maximum delay or latency normality."; + } + leaf one-way-delay-variation { + type uint32 { + range "0..16777215"; + } + description + "One-way delay variation in microseconds."; + reference + "RFC 5481: Packet Delay Variation Applicability + Statement, Section 4.2"; + } + leaf one-way-delay-variation-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "One-way delay variation normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) + Using TE Metric Extensions"; + } + leaf one-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + description + "One-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision + is 0.000003%, where the maximum is 50.331642%."; + reference + "RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions, Section 4.4"; + } + leaf one-way-packet-loss-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Packet loss normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) + Using TE Metric Extensions"; + } + description + "PM one-way packet-specific augmentation for a generic PM + grouping."; + } + augment "performance-metrics-two-way" { + leaf two-way-min-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way minimum delay or latency in microseconds."; + } + leaf two-way-min-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way minimum delay or latency normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) + Using TE Metric Extensions"; + } + leaf two-way-max-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way maximum delay or latency in microseconds."; + } + leaf two-way-max-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way maximum delay or latency normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) + Using TE Metric Extensions"; + } + leaf two-way-delay-variation { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way delay variation in microseconds."; + reference + "RFC 5481: Packet Delay Variation Applicability + Statement, Section 4.2"; + } + leaf two-way-delay-variation-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way delay variation normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) + Using TE Metric Extensions"; + } + leaf two-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + default "0"; + description + "Two-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision + is 0.000003%."; + } + leaf two-way-packet-loss-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way packet loss normality."; + } + description + "PM two-way packet-specific augmentation for a generic PM + grouping."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE + Metric Extensions"; + } + } + } + + grouping one-way-performance-metrics-packet { + description + "One-way packet PM throttle grouping."; + leaf one-way-min-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way minimum delay or latency in microseconds."; + } + leaf one-way-max-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way maximum delay or latency in microseconds."; + } + leaf one-way-delay-variation { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way delay variation in microseconds."; + } + leaf one-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + default "0"; + description + "One-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision is + 0.000003%."; + } + } + + grouping one-way-performance-metrics-gauge-packet { + description + "One-way packet PM throttle grouping. + + This grouping is used to report the same metrics defined in + the one-way-performance-metrics-packet grouping, using gauges + instead of uint32 data types and referencing IPPM RFCs + instead of IGP-TE RFCs."; + leaf one-way-min-delay { + type yang:gauge64; + description + "One-way minimum delay or latency in microseconds."; + } + leaf one-way-max-delay { + type yang:gauge64; + description + "One-way maximum delay or latency in microseconds."; + reference + "RFC 7679: A One-Way Delay Metric for IP Performance + Metrics (IPPM)"; + } + leaf one-way-delay-variation { + type yang:gauge64; + description + "One-way delay variation in microseconds."; + reference + "RFC 3393: IP Packet Delay Variation Metric for IP + Performance Metrics (IPPM)"; + } + leaf one-way-packet-loss { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + description + "The ratio of packets dropped to packets transmitted between + two endpoints."; + reference + "RFC 7680: A One-Way Loss Metric for IP Performance + Metrics (IPPM)"; + } + } + + grouping two-way-performance-metrics-packet { + description + "Two-way packet PM throttle grouping."; + leaf two-way-min-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way minimum delay or latency in microseconds."; + } + leaf two-way-max-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way maximum delay or latency in microseconds."; + } + leaf two-way-delay-variation { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way delay variation in microseconds."; + } + leaf two-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + default "0"; + description + "Two-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision is + 0.000003%."; + } + } + + grouping two-way-performance-metrics-gauge-packet { + description + "Two-way packet PM throttle grouping. + + This grouping is used to report the same metrics defined in + the two-way-performance-metrics-packet grouping, using gauges + instead of uint32 data types and referencing IPPM RFCs + instead of IGP-TE RFCs."; + leaf two-way-min-delay { + type yang:gauge64; + description + "Two-way minimum delay or latency in microseconds."; + reference + "RFC 2681: A Round-trip Delay Metric for IPPM"; + } + leaf two-way-max-delay { + type yang:gauge64; + description + "Two-way maximum delay or latency in microseconds."; + reference + "RFC 2681: A Round-trip Delay Metric for IPPM"; + } + leaf two-way-delay-variation { + type yang:gauge64; + description + "Two-way delay variation in microseconds."; + reference + "RFC 5481: Packet Delay Variation Applicability Statement"; + } + leaf two-way-packet-loss { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + description + "The ratio of packets dropped to packets transmitted between + two endpoints."; + } + } + + grouping performance-metrics-throttle-container-packet { + description + "Packet PM threshold grouping."; + uses te-types:performance-metrics-throttle-container { + augment "throttle/threshold-out" { + uses one-way-performance-metrics-packet; + uses two-way-performance-metrics-packet; + description + "PM threshold-out packet augmentation for a + generic grouping."; + } + augment "throttle/threshold-in" { + uses one-way-performance-metrics-packet; + uses two-way-performance-metrics-packet; + description + "PM threshold-in packet augmentation for a + generic grouping."; + } + augment "throttle/threshold-accelerated-advertisement" { + uses one-way-performance-metrics-packet; + uses two-way-performance-metrics-packet; + description + "PM accelerated advertisement packet augmentation for a + generic grouping."; + } + } + } + + grouping bandwidth-profile-parameters { + description + "Common parameters to define bandwidth profiles in packet + networks."; + leaf cir { + type uint64; + units "bits/second"; + description + "Committed Information Rate (CIR)."; + } + leaf cbs { + type uint64; + units "bytes"; + description + "Committed Burst Size (CBS)."; + } + leaf eir { + type uint64; + units "bits/second"; + description + "Excess Information Rate (EIR)."; + } + leaf ebs { + type uint64; + units "bytes"; + description + "Excess Burst Size (EBS)."; + } + leaf pir { + type uint64; + units "bits/second"; + description + "Peak Information Rate (PIR)."; + } + leaf pbs { + type uint64; + units "bytes"; + description + "Peak Burst Size (PBS)."; + } + } + + grouping te-packet-path-bandwidth { + description + "Bandwidth attributes for TE Packet paths."; + container packet-bandwidth { + description + "Bandwidth attributes for TE Packet paths."; + leaf specification-type { + type te-bandwidth-requested-type; + description + "The bandwidth specification type, either explicitly + specified or automatically computed."; + } + leaf set-bandwidth { + when "../specification-type = 'specified-value'" { + description + "When the bandwidth value is explicitly specified."; + } + type bandwidth-kbps; + description + "Set the bandwidth value explicitly, e.g., using offline + calculation."; + } + container bandwidth-profile { + when "../specification-type = 'specified-profile'" { + description + "When the bandwidth profile is explicitly specified."; + } + description + "Set the bandwidth profile attributes explicitly."; + leaf bandwidth-profile-name { + type string; + description + "Name of Bandwidth Profile."; + } + leaf bandwidth-profile-type { + type identityref { + base bandwidth-profile-type; + } + description + "Type of Bandwidth Profile."; + } + uses bandwidth-profile-parameters; + } + leaf class-type { + type te-types:te-ds-class; + description + "The Class-Type of traffic transported by the LSP."; + reference + "RFC 4124: Protocol Extensions for Support of + Diffserv-aware MPLS Traffic Engineering, + Section 4.3.1"; + } + leaf signaled-bandwidth { + type te-packet-types:bandwidth-kbps; + config false; + description + "The currently signaled bandwidth of the LSP. + + In the case where the bandwidth is specified + explicitly, then this will match the value of the + set-bandwidth leaf. + + In the cases where the bandwidth is dynamically + computed by the system, the current value of the + bandwidth should be reflected."; + } + } + } + + grouping te-packet-link-bandwidth { + description + "Bandwidth attributes for Packet TE links."; + leaf packet-bandwidth { + type uint64; + units "bits/second"; + description + "Bandwidth value for Packet TE links."; + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-te-types@2024-10-30.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-te-types@2024-10-30.yang new file mode 100644 index 000000000..5d9ae16f4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-te-types@2024-10-30.yang @@ -0,0 +1,4399 @@ +module ietf-te-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-te-types"; + prefix te-types; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-routing-types { + prefix rt-types; + reference + "RFC 8294: Common YANG Data Types for the Routing Area"; + } + + import ietf-network { + prefix "nw"; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + import ietf-network-topology { + prefix "nt"; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: + WG List: + + Editor: Tarek Saad + + + Editor: Rakesh Gandhi + + + Editor: Vishnu Pavan Beeram + + + Editor: Xufeng Liu + + + Editor: Igor Bryskin + "; + description + "This YANG module contains a collection of generally useful + YANG data type definitions specific to TE. The model fully + conforms to the Network Management Datastore Architecture + (NMDA). + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', + 'MAY', and 'OPTIONAL' in this document are to be interpreted as + described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, + they appear in all capitals, as shown here. + + Copyright (c) 2024 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Revised BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX + (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself + for full legal notices."; + revision 2024-10-30 { + description + "This revision adds the following new identities: + - lsp-provisioning-error-reason; + - association-type-diversity; + - tunnel-admin-state-auto; + - lsp-restoration-restore-none; + - restoration-scheme-rerouting; + - path-metric-optimization-type; + - link-path-metric-type; + - link-metric-type and its derived identities; + - path-computation-error-reason and its derived identities; + - protocol-origin-type and its derived identities; + - svec-objective-function-type and its derived identities; + - svec-metric-type and its derived identities. + + This revision adds the following new data types: + - path-type. + + This revision adds the following new groupings: + - encoding-and-switching-type; + - te-generic-node-id. + + This revision updates the following identities: + - objective-function-type; + - action-exercise; + - path-metric-type; + - path-metric-te; + - path-metric-igp; + - path-metric-hop; + - path-metric-delay-average; + - path-metric-delay-minimum; + - path-metric-residual-bandwidth; + - path-metric-optimize-includes; + - path-metric-optimize-excludes; + - te-optimization-criterion. + + This revision updates the following data types: + - te-node-id. + + This revision updates the following groupings: + - explicit-route-hop: + - adds the following leaves: + - node-id-uri; + - link-tp-id-uri; + - updates the following leaves: + - node-id; + - link-tp-id; + - record-route-state: + - adds the following leaves: + - node-id-uri; + - link-tp-id-uri; + - updates the following leaves: + - node-id; + - link-tp-id; + - optimization-metric-entry: + - updates the following leaves: + - metric-type; + - tunnel-constraints; + - adds the following leaves: + - network-id; + - path-constraints-route-objects: + - updates the following containers: + - explicit-route-objects-always; + - generic-path-metric-bounds: + - updates the following leaves: + - metric-type; + - generic-path-optimization + - adds the following leaves: + - tiebreaker; + - deprecate the following containers: + - tiebreakers. + + This revision obsoletes the following identities: + - of-minimize-agg-bandwidth-consumption; + - of-minimize-load-most-loaded-link; + - of-minimize-cost-path-set; + - lsp-protection-reroute-extra; + - lsp-protection-reroute. + + This revision provides also few editorial changes."; + reference + "RFC XXXX: Common YANG Data Types for Traffic Engineering"; + } + // RFC Editor: replace XXXX with actual RFC number, update date + // information and remove this note + + revision 2020-06-10 { + description + "Initial Version of TE types."; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + + /** + * Typedefs + */ + + typedef admin-group { + type yang:hex-string { + /* 01:02:03:04 */ + length "1..11"; + } + description + "Administrative group / resource class / color representation + in 'hex-string' type. + + The most significant byte in the hex-string is the farthest + to the left in the byte sequence. Leading zero bytes in the + configured value may be omitted for brevity."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering + RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + + typedef admin-groups { + type union { + type admin-group; + type extended-admin-group; + } + description + "Derived types for TE administrative groups."; + } + + typedef extended-admin-group { + type yang:hex-string; + description + "Extended administrative group / resource class / color + representation in 'hex-string' type. + + The most significant byte in the hex-string is the farthest + to the left in the byte sequence. Leading zero bytes in the + configured value may be omitted for brevity."; + reference + "RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + + typedef path-attribute-flags { + type union { + type identityref { + base session-attributes-flags; + } + type identityref { + base lsp-attributes-flags; + } + } + description + "Path attributes flags type."; + } + + typedef performance-metrics-normality { + type enumeration { + enum unknown { + value 0; + description + "Unknown."; + } + enum normal { + value 1; + description + "Normal. Indicates that the anomalous bit is not set."; + } + enum abnormal { + value 2; + description + "Abnormal. Indicates that the anomalous bit is set."; + } + } + description + "Indicates whether a performance metric is normal (anomalous + bit not set), abnormal (anomalous bit set), or unknown."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + } + + typedef srlg { + type uint32; + description + "SRLG type."; + reference + "RFC 4203: OSPF Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS) + RFC 5307: IS-IS Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS)"; + } + + typedef te-common-status { + type enumeration { + enum up { + description + "Enabled."; + } + enum down { + description + "Disabled."; + } + enum testing { + description + "In some test mode."; + } + enum preparing-maintenance { + description + "The resource is disabled in the control plane to prepare + for a graceful shutdown for maintenance purposes."; + reference + "RFC 5817: Graceful Shutdown in MPLS and Generalized MPLS + Traffic Engineering Networks"; + } + enum maintenance { + description + "The resource is disabled in the data plane for maintenance + purposes."; + } + enum unknown { + description + "Status is unknown."; + } + } + description + "Defines a type representing the common states of a TE + resource."; + } + + typedef te-bandwidth { + type string { + pattern '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([\da-fA-F]{0,5}[02468aAcCeE]?)?)?' + + '[pP](\+)?(12[0-7]|' + + '1[01]\d|0?\d?\d)?)|0[xX][\da-fA-F]{1,8}|\d+' + + '(,(0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([\da-fA-F]{0,5}[02468aAcCeE]?)?)?' + + '[pP](\+)?(12[0-7]|' + + '1[01]\d|0?\d?\d)?)|0[xX][\da-fA-F]{1,8}|\d+))*'; + } + description + "This is the generic bandwidth type. It is a string containing + a list of numbers separated by commas, where each of these + numbers can be non-negative decimal, hex integer, or + hex float: + + (dec | hex | float)[*(','(dec | hex | float))] + + For the packet-switching type, the string encoding follows + the type 'bandwidth-ieee-float32' as defined in RFC 8294 + (e.g., 0x1p10), where the units are in bytes per second. + + For the Optical Transport Network (OTN) switching type, + a list of integers can be used, such as '0,2,3,1', indicating + two ODU0s and one ODU3. ('ODU' stands for 'Optical Data + Unit'.) For Dense Wavelength Division Multiplexing (DWDM), + a list of pairs of slot numbers and widths can be used, + such as '0,2,3,3', indicating a frequency slot 0 with + slot width 2 and a frequency slot 3 with slot width 3. + Canonically, the string is represented as all lowercase and in + hex, where the prefix '0x' precedes the hex number."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area + ITU-T G.709: Interfaces for the optical transport network - + Edition 6.0 (06/2020)"; + } + + typedef te-ds-class { + type uint8 { + range "0..7"; + } + description + "The Differentiated Services Class-Type of traffic."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering, Section 4.3.1"; + } + + typedef te-global-id { + type uint32; + description + "An identifier to uniquely identify an operator, which can be + either a provider or a client. + + The definition of this type is taken from RFCs 6370 and 5003. + + This attribute type is used solely to provide a globally + unique context for TE topologies."; + reference + "RFC 5003: Attachment Individual Identifier (AII) Types for + Aggregation + RFC 6370: MPLS Transport Profile (MPLS-TP) Identifiers"; + } + + typedef te-hop-type { + type enumeration { + enum loose { + description + "A loose hop in an explicit path."; + } + enum strict { + description + "A strict hop in an explicit path."; + } + } + description + "Enumerated type for specifying loose or strict paths."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3.3"; + } + + typedef te-link-access-type { + type enumeration { + enum point-to-point { + description + "The link is point-to-point."; + } + enum multi-access { + description + "The link is multi-access, including broadcast and NBMA."; + } + } + description + "Defines a type representing the access type of a TE link."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + + typedef te-label-direction { + type enumeration { + enum forward { + description + "Label allocated for the forward LSP direction."; + } + enum reverse { + description + "Label allocated for the reverse LSP direction."; + } + } + description + "Enumerated type for specifying the forward or reverse + label."; + } + + typedef te-link-direction { + type enumeration { + enum incoming { + description + "The explicit route represents an incoming link on + a node."; + } + enum outgoing { + description + "The explicit route represents an outgoing link on + a node."; + } + } + description + "Enumerated type for specifying the direction of a link on + a node."; + } + + typedef te-metric { + type uint32; + description + "TE metric."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a + second MPLS Traffic Engineering (TE) Metric"; + } + + typedef te-node-id { + type union { + type yang:dotted-quad; + type inet:ipv6-address-no-zone; + } + description + "A type representing the identifier for a node in a TE + topology. + + The identifier is represented either as 4 octets in + dotted-quad notation, or as 16 octets in full, mixed, + shortened, or shortened-mixed IPv6 address notation. + + This attribute MAY be mapped to the Router Address TLV + described in Section 2.4.1 of RFC 3630, the TE Router ID + described in Section 3 of RFC 6827, the Traffic Engineering + Router ID TLV described in Section 4.3 of RFC 5305, the TE + Router ID TLV described in Section 3.2.1 of RFC 6119, or the + IPv6 TE Router ID TLV described in Section 4.1 of RFC 6119. + + The reachability of such a TE node MAY be achieved by a + mechanism such as that described in Section 6.2 of RFC 6827."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2, Section 2.4.1 + RFC 5305: IS-IS Extensions for Traffic Engineering, + Section 4.3 + RFC 6119: IPv6 Traffic Engineering in IS-IS, Section 3.2.1 + RFC 6827: Automatically Switched Optical Network (ASON) + Routing for OSPFv2 Protocols, Section 3"; + } + + typedef te-oper-status { + type te-common-status; + description + "Defines a type representing the operational status of + a TE resource."; + } + + typedef te-admin-status { + type te-common-status; + description + "Defines a type representing the administrative status of + a TE resource."; + } + + typedef te-path-disjointness { + type bits { + bit node { + position 0; + description + "Node disjoint."; + } + bit link { + position 1; + description + "Link disjoint."; + } + bit srlg { + position 2; + description + "SRLG (Shared Risk Link Group) disjoint."; + } + } + description + "Type of the resource disjointness for a TE tunnel path."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + typedef te-recovery-status { + type enumeration { + enum normal { + description + "Both the recovery span and the working span are fully + allocated and active, data traffic is being + transported over (or selected from) the working + span, and no trigger events are reported."; + } + enum recovery-started { + description + "The recovery action has been started but not completed."; + } + enum recovery-succeeded { + description + "The recovery action has succeeded. The working span has + reported a failure/degrade condition, and the user traffic + is being transported (or selected) on the recovery span."; + } + enum recovery-failed { + description + "The recovery action has failed."; + } + enum reversion-started { + description + "The reversion has started."; + } + enum reversion-succeeded { + description + "The reversion action has succeeded."; + } + enum reversion-failed { + description + "The reversion has failed."; + } + enum recovery-unavailable { + description + "The recovery is unavailable, as a result of either an + operator's lockout command or a failure condition + detected on the recovery span."; + } + enum recovery-admin { + description + "The operator has issued a command to switch the user + traffic to the recovery span."; + } + enum wait-to-restore { + description + "The recovery domain is recovering from a failure/degrade + condition on the working span that is being controlled by + the Wait-to-Restore (WTR) timer."; + } + } + description + "Defines the status of a recovery action."; + reference + "RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + typedef te-template-name { + type string { + pattern '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*'; + } + description + "A type for the name of a TE node template or TE link + template."; + } + + typedef te-topology-event-type { + type enumeration { + enum add { + value 0; + description + "A TE node or TE link has been added."; + } + enum remove { + value 1; + description + "A TE node or TE link has been removed."; + } + enum update { + value 2; + description + "A TE node or TE link has been updated."; + } + } + description + "TE event type for notifications."; + } + + typedef te-topology-id { + type union { + type string { + length "0"; + // empty string + } + type string { + pattern '([a-zA-Z0-9\-_.]+:)*' + + '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*'; + } + } + description + "An identifier for a topology. + + It is optional to have one or more prefixes at the beginning, + separated by colons. The prefixes can be 'network-types' as + defined in the 'ietf-network' module in RFC 8345, to help the + user better understand the topology before further inquiry + is made."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef te-tp-id { + type union { + type uint32; + // Unnumbered + type inet:ip-address; + // IPv4 or IPv6 address + } + description + "An identifier for a TE link endpoint on a node. + + This attribute is mapped to a local or remote link identifier + as defined in RFCs 3630 and 5305."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + } + + typedef path-type { + type enumeration { + enum primary-path { + description + "Indicates that the TE path is a primary path."; + } + enum secondary-path { + description + "Indicates that the TE path is a secondary path."; + } + enum primary-reverse-path { + description + "Indicates that the TE path is a primary reverse path."; + } + enum secondary-reverse-path { + description + "Indicates that the TE path is a secondary reverse path."; + } + } + description + "The type of TE path, indicating whether a path is a primary, + or a reverse primary, or a secondary, or a reverse secondary + path."; + } + + /* TE features */ + + feature p2mp-te { + description + "Indicates support for Point-to-Multipoint TE (P2MP-TE)."; + reference + "RFC 4875: Extensions to Resource Reservation Protocol - + Traffic Engineering (RSVP-TE) for + Point-to-Multipoint TE Label Switched Paths (LSPs)"; + } + + feature frr-te { + description + "Indicates support for TE Fast Reroute (FRR)."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP Tunnels"; + } + + feature extended-admin-groups { + description + "Indicates support for TE link extended administrative + groups."; + reference + "RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + + feature named-path-affinities { + description + "Indicates support for named path affinities."; + } + + feature named-extended-admin-groups { + description + "Indicates support for named extended administrative groups."; + } + + feature named-srlg-groups { + description + "Indicates support for named SRLG groups."; + } + + feature named-path-constraints { + description + "Indicates support for named path constraints."; + } + + feature path-optimization-metric { + description + "Indicates support for path optimization metrics."; + } + + feature path-optimization-objective-function { + description + "Indicates support for path optimization objective functions."; + } + + /* + * Identities + */ + + identity lsp-provisioning-error-reason { + description + "Base identity for LSP provisioning errors."; + } + + identity session-attributes-flags { + description + "Base identity for the RSVP-TE session attributes flags."; + } + + identity local-protection-desired { + base session-attributes-flags; + description + "Local protection is desired."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.7.1"; + } + + identity se-style-desired { + base session-attributes-flags; + description + "Shared explicit style, to allow the LSP to be established + and share resources with the old LSP."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity local-recording-desired { + base session-attributes-flags; + description + "Label recording is desired."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.7.1"; + } + + identity bandwidth-protection-desired { + base session-attributes-flags; + description + "Requests FRR bandwidth protection on LSRs, if present."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels"; + } + + identity node-protection-desired { + base session-attributes-flags; + description + "Requests FRR node protection on LSRs, if present."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels"; + } + + identity path-reevaluation-request { + base session-attributes-flags; + description + "This flag indicates that a path re-evaluation (of the + current path in use) is requested. Note that this does + not trigger any LSP reroutes but instead just signals a + request to evaluate whether a preferable path exists."; + reference + "RFC 4736: Reoptimization of Multiprotocol Label Switching + (MPLS) Traffic Engineering (TE) Loosely Routed + Label Switched Path (LSP)"; + } + + identity soft-preemption-desired { + base session-attributes-flags; + description + "Soft preemption of LSP resources is desired."; + reference + "RFC 5712: MPLS Traffic Engineering Soft Preemption"; + } + + identity lsp-attributes-flags { + description + "Base identity for LSP attributes flags."; + } + + identity end-to-end-rerouting-desired { + base lsp-attributes-flags; + description + "Indicates end-to-end rerouting behavior for an LSP + undergoing establishment. This MAY also be used to + specify the behavior of end-to-end LSP recovery for + established LSPs."; + reference + "RFC 4920: Crankback Signaling Extensions for MPLS and GMPLS + RSVP-TE + RFC 5420: Encoding of Attributes for MPLS LSP Establishment + Using Resource Reservation Protocol Traffic + Engineering (RSVP-TE) + RFC 7570: Label Switched Path (LSP) Attribute in the + Explicit Route Object (ERO)"; + } + + identity boundary-rerouting-desired { + base lsp-attributes-flags; + description + "Indicates boundary rerouting behavior for an LSP undergoing + establishment. This MAY also be used to specify + segment-based LSP recovery through nested crankback for + established LSPs. The boundary Area Border Router (ABR) / + Autonomous System Border Router (ASBR) can decide to forward + the PathErr message upstream to either an upstream boundary + ABR/ASBR or the ingress LSR. Alternatively, it can try to + select another egress boundary LSR."; + reference + "RFC 4920: Crankback Signaling Extensions for MPLS and GMPLS + RSVP-TE + RFC 5420: Encoding of Attributes for MPLS LSP Establishment + Using Resource Reservation Protocol Traffic + Engineering (RSVP-TE) + RFC 7570: Label Switched Path (LSP) Attribute in the + Explicit Route Object (ERO)"; + } + + identity segment-based-rerouting-desired { + base lsp-attributes-flags; + description + "Indicates segment-based rerouting behavior for an LSP + undergoing establishment. This MAY also be used to specify + segment-based LSP recovery for established LSPs."; + reference + "RFC 4920: Crankback Signaling Extensions for MPLS and GMPLS + RSVP-TE + RFC 5420: Encoding of Attributes for MPLS LSP Establishment + Using Resource Reservation Protocol + Traffic Engineering (RSVP-TE) + RFC 7570: Label Switched Path (LSP) Attribute in the + Explicit Route Object (ERO)"; + } + + identity lsp-integrity-required { + base lsp-attributes-flags; + description + "Indicates that LSP integrity is required."; + reference + "RFC 4875: Extensions to Resource Reservation Protocol - + Traffic Engineering (RSVP-TE) for + Point-to-Multipoint TE Label Switched Paths (LSPs) + RFC 7570: Label Switched Path (LSP) Attribute in the + Explicit Route Object (ERO)"; + } + + identity contiguous-lsp-desired { + base lsp-attributes-flags; + description + "Indicates that a contiguous LSP is desired."; + reference + "RFC 5151: Inter-Domain MPLS and GMPLS Traffic Engineering -- + Resource Reservation Protocol-Traffic Engineering + (RSVP-TE) Extensions + RFC 7570: Label Switched Path (LSP) Attribute in the + Explicit Route Object (ERO)"; + } + + identity lsp-stitching-desired { + base lsp-attributes-flags; + description + "Indicates that LSP stitching is desired."; + reference + "RFC 5150: Label Switched Path Stitching with Generalized + Multiprotocol Label Switching Traffic Engineering + (GMPLS TE) + RFC 7570: Label Switched Path (LSP) Attribute in the + Explicit Route Object (ERO)"; + } + + identity pre-planned-lsp-flag { + base lsp-attributes-flags; + description + "Indicates that the LSP MUST be provisioned in the + control plane only."; + reference + "RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions for + Multi-Layer and Multi-Region Networks (MLN/MRN) + RFC 7570: Label Switched Path (LSP) Attribute in the + Explicit Route Object (ERO)"; + } + + identity non-php-behavior-flag { + base lsp-attributes-flags; + description + "Indicates that non-PHP (non-Penultimate Hop Popping) + behavior for the LSP is desired."; + reference + "RFC 6511: Non-Penultimate Hop Popping Behavior and + Out-of-Band Mapping for RSVP-TE Label Switched + Paths + RFC 7570: Label Switched Path (LSP) Attribute in the + Explicit Route Object (ERO)"; + } + + identity oob-mapping-flag { + base lsp-attributes-flags; + description + "Indicates that signaling of the egress binding information + is out of band (e.g., via the Border Gateway Protocol + (BGP))."; + reference + "RFC 6511: Non-Penultimate Hop Popping Behavior and + Out-of-Band Mapping for RSVP-TE Label Switched + Paths + RFC 7570: Label Switched Path (LSP) Attribute in the + Explicit Route Object (ERO)"; + } + + identity entropy-label-capability { + base lsp-attributes-flags; + description + "Indicates entropy label capability."; + reference + "RFC 6790: The Use of Entropy Labels in MPLS Forwarding + RFC 7570: Label Switched Path (LSP) Attribute in the + Explicit Route Object (ERO)"; + } + + identity oam-mep-entity-desired { + base lsp-attributes-flags; + description + "OAM Maintenance Entity Group End Point (MEP) entities + desired."; + reference + "RFC 7260: GMPLS RSVP-TE Extensions for Operations, + Administration, and Maintenance (OAM) + Configuration"; + } + + identity oam-mip-entity-desired { + base lsp-attributes-flags; + description + "OAM Maintenance Entity Group Intermediate Points (MIP) + entities desired."; + reference + "RFC 7260: GMPLS RSVP-TE Extensions for Operations, + Administration, and Maintenance (OAM) + Configuration"; + } + + identity srlg-collection-desired { + base lsp-attributes-flags; + description + "SRLG collection desired."; + reference + "RFC 7570: Label Switched Path (LSP) Attribute in the + Explicit Route Object (ERO) + RFC 8001: RSVP-TE Extensions for Collecting Shared Risk + Link Group (SRLG) Information"; + } + + identity loopback-desired { + base lsp-attributes-flags; + description + "This flag indicates that a particular node on the LSP is + required to enter loopback mode. This can also be + used to specify the loopback state of the node."; + reference + "RFC 7571: GMPLS RSVP-TE Extensions for Lock Instruct and + Loopback"; + } + + identity p2mp-te-tree-eval-request { + base lsp-attributes-flags; + description + "P2MP-TE tree re-evaluation request."; + reference + "RFC 8149: RSVP Extensions for Reoptimization of Loosely + Routed Point-to-Multipoint Traffic Engineering + Label Switched Paths (LSPs)"; + } + + identity rtm-set-desired { + base lsp-attributes-flags; + description + "Residence Time Measurement (RTM) attribute flag requested."; + reference + "RFC 8169: Residence Time Measurement in MPLS Networks"; + } + + identity link-protection-type { + description + "Base identity for the link protection type."; + } + + identity link-protection-unprotected { + base link-protection-type; + description + "Unprotected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity link-protection-extra-traffic { + base link-protection-type; + description + "Extra-Traffic protected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity link-protection-shared { + base link-protection-type; + description + "Shared protected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity link-protection-1-for-1 { + base link-protection-type; + description + "One-for-one (1:1) protected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity link-protection-1-plus-1 { + base link-protection-type; + description + "One-plus-one (1+1) protected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity link-protection-enhanced { + base link-protection-type; + description + "A compound link protection type derived from the underlay + TE tunnel protection configuration supporting the TE link."; + } + + identity association-type { + description + "Base identity for the tunnel association."; + } + + identity association-type-recovery { + base association-type; + description + "Association type for recovery, used to associate LSPs of the + same tunnel for recovery."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery + RFC 6780: RSVP ASSOCIATION Object Extensions"; + } + + identity association-type-resource-sharing { + base association-type; + description + "Association type for resource sharing, used to enable + resource sharing during make-before-break."; + reference + "RFC 4873: GMPLS Segment Recovery + RFC 6780: RSVP ASSOCIATION Object Extensions"; + } + + identity association-type-double-sided-bidir { + base association-type; + description + "Association type for double-sided bidirectional LSPs, + used to associate two LSPs of two tunnels that are + independently configured on either endpoint."; + reference + "RFC 7551: RSVP-TE Extensions for Associated Bidirectional + Label Switched Paths (LSPs)"; + } + + identity association-type-single-sided-bidir { + base association-type; + description + "Association type for single-sided bidirectional LSPs, + used to associate two LSPs of two tunnels, where one + tunnel is configured on one side/endpoint and the other + tunnel is dynamically created on the other endpoint."; + reference + "RFC 6780: RSVP ASSOCIATION Object Extensions + RFC 7551: RSVP-TE Extensions for Associated Bidirectional + Label Switched Paths (LSPs)"; + } + + identity association-type-diversity { + base association-type; + description + "Association Type diversity used to associate LSPs whose + paths are to be diverse from each other."; + reference + "RFC 8800: Path Computation Element Communication Protocol + (PCEP) Extension for Label Switched Path (LSP) + Diversity Constraint Signaling"; + } + + identity objective-function-type { + description + "Base identity for path objective function types."; + } + + identity of-minimize-cost-path { + base objective-function-type; + description + "Objective function for minimizing path cost."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity of-minimize-load-path { + base objective-function-type; + description + "Objective function for minimizing the load on one or more + paths."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity of-maximize-residual-bandwidth { + base objective-function-type; + description + "Objective function for maximizing residual bandwidth."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity of-minimize-agg-bandwidth-consumption { + base objective-function-type; + status obsolete; + description + "Objective function for minimizing aggregate bandwidth + consumption. + + This identity has been obsoleted: the + 'svec-of-minimize-agg-bandwidth-consumption' identity SHOULD + be used instead."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity of-minimize-load-most-loaded-link { + base objective-function-type; + status obsolete; + description + "Objective function for minimizing the load on the link that + is carrying the highest load. + + This identity has been obsoleted: the + 'svec-of-minimize-load-most-loaded-link' identity SHOULD + be used instead."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity of-minimize-cost-path-set { + base objective-function-type; + status obsolete; + description + "Objective function for minimizing the cost on a path set. + + This identity has been obsoleted: the + 'svec-of-minimize-cost-path-set' identity SHOULD + be used instead."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity path-computation-method { + description + "Base identity for supported path computation mechanisms."; + } + + identity path-locally-computed { + base path-computation-method; + description + "Indicates a constrained-path LSP in which the + path is computed by the local LER."; + reference + "RFC 9522: Overview and Principles of Internet Traffic + Engineering, Section 4.4"; + } + + identity path-externally-queried { + base path-computation-method; + description + "Constrained-path LSP in which the path is obtained by + querying an external source, such as a PCE server. + In the case that an LSP is defined to be externally queried, + it may also have associated explicit definitions (provided + to the external source to aid computation). The path that + is returned by the external source may require further local + computation on the device."; + reference + "RFC 9522: Overview and Principles of Internet Traffic + Engineering + RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity path-explicitly-defined { + base path-computation-method; + description + "Constrained-path LSP in which the path is + explicitly specified as a collection of strict and/or loose + hops."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 9522: Overview and Principles of Internet Traffic + Engineering"; + } + + identity lsp-metric-type { + description + "Base identity for the LSP metric specification types."; + } + + identity lsp-metric-relative { + base lsp-metric-type; + description + "The metric specified for the LSPs to which this identity + refers is specified as a value relative to the IGP metric + cost to the LSP's tail end."; + reference + "RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity lsp-metric-absolute { + base lsp-metric-type; + description + "The metric specified for the LSPs to which this identity + refers is specified as an absolute value."; + reference + "RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity lsp-metric-inherited { + base lsp-metric-type; + description + "The metric for the LSPs to which this identity refers is + not specified explicitly; rather, it is directly inherited + from the IGP cost."; + reference + "RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity te-tunnel-type { + description + "Base identity from which specific tunnel types are derived."; + } + + identity te-tunnel-p2p { + base te-tunnel-type; + description + "TE Point-to-Point (P2P) tunnel type."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity te-tunnel-p2mp { + base te-tunnel-type; + description + "TE P2MP tunnel type."; + reference + "RFC 4875: Extensions to Resource Reservation Protocol - + Traffic Engineering (RSVP-TE) for + Point-to-Multipoint TE Label Switched Paths + (LSPs)"; + } + + identity tunnel-action-type { + description + "Base identity from which specific tunnel action types + are derived."; + } + + identity tunnel-action-resetup { + base tunnel-action-type; + description + "TE tunnel action that tears down the tunnel's current LSP + (if any) and attempts to re-establish a new LSP."; + } + + identity tunnel-action-reoptimize { + base tunnel-action-type; + description + "TE tunnel action that reoptimizes the placement of the + tunnel LSP(s)."; + } + + identity tunnel-action-switchpath { + base tunnel-action-type; + description + "TE tunnel action that switches the tunnel's LSP to use the + specified path."; + } + + identity te-action-result { + description + "Base identity from which specific TE action results + are derived."; + } + + identity te-action-success { + base te-action-result; + description + "TE action was successful."; + } + + identity te-action-fail { + base te-action-result; + description + "TE action failed."; + } + + identity tunnel-action-inprogress { + base te-action-result; + description + "TE action is in progress."; + } + + identity tunnel-admin-state-type { + description + "Base identity for TE tunnel administrative states."; + } + + identity tunnel-admin-state-up { + base tunnel-admin-state-type; + description + "Tunnel's administrative state is up."; + } + + identity tunnel-admin-state-down { + base tunnel-admin-state-type; + description + "Tunnel's administrative state is down."; + } + + identity tunnel-admin-state-auto { + base tunnel-admin-state-type; + description + "Tunnel administrative auto state. The administrative status + in state datastore transitions to 'tunnel-admin-up' when the + tunnel used by the client layer, and to 'tunnel-admin-down' + when it is not used by the client layer."; + } + + identity tunnel-state-type { + description + "Base identity for TE tunnel states."; + } + + identity tunnel-state-up { + base tunnel-state-type; + description + "Tunnel's state is up."; + } + + identity tunnel-state-down { + base tunnel-state-type; + description + "Tunnel's state is down."; + } + + identity lsp-state-type { + description + "Base identity for TE LSP states."; + } + + identity lsp-path-computing { + base lsp-state-type; + description + "State path computation is in progress."; + } + + identity lsp-path-computation-ok { + base lsp-state-type; + description + "State path computation was successful."; + } + + identity lsp-path-computation-failed { + base lsp-state-type; + description + "State path computation failed."; + } + + identity lsp-state-setting-up { + base lsp-state-type; + description + "State is being set up."; + } + + identity lsp-state-setup-ok { + base lsp-state-type; + description + "State setup was successful."; + } + + identity lsp-state-setup-failed { + base lsp-state-type; + description + "State setup failed."; + } + + identity lsp-state-up { + base lsp-state-type; + description + "State is up."; + } + + identity lsp-state-tearing-down { + base lsp-state-type; + description + "State is being torn down."; + } + + identity lsp-state-down { + base lsp-state-type; + description + "State is down."; + } + + identity path-invalidation-action-type { + description + "Base identity for TE path invalidation action types."; + } + + identity path-invalidation-action-drop { + base path-invalidation-action-type; + description + "Upon invalidation of the TE tunnel path, the tunnel remains + valid, but any packet mapped over the tunnel is dropped."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 2.5"; + } + + identity path-invalidation-action-teardown { + base path-invalidation-action-type; + description + "TE path invalidation action teardown."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 2.5"; + } + + identity lsp-restoration-type { + description + "Base identity from which LSP restoration types are derived."; + } + + identity lsp-restoration-restore-none { + base lsp-restoration-type; + description + "No LSP affected by a failure is restored."; + } + + identity lsp-restoration-restore-any { + base lsp-restoration-type; + description + "Any LSP affected by a failure is restored."; + } + + identity lsp-restoration-restore-all { + base lsp-restoration-type; + description + "Affected LSPs are restored after all LSPs of the tunnel are + broken."; + } + + identity restoration-scheme-type { + description + "Base identity for LSP restoration schemes."; + } + + identity restoration-scheme-rerouting { + base restoration-scheme-type; + description + "Restoration LSP is computed after the failure detection. + + This restoration scheme is also known as + 'Full LSP Re-routing.'"; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity restoration-scheme-preconfigured { + base restoration-scheme-type; + description + "Restoration LSP is preconfigured prior to the failure."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity restoration-scheme-precomputed { + base restoration-scheme-type; + description + "Restoration LSP is precomputed prior to the failure."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity restoration-scheme-presignaled { + base restoration-scheme-type; + description + "Restoration LSP is presignaled prior to the failure."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity lsp-protection-type { + description + "Base identity from which LSP protection types are derived."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity lsp-protection-unprotected { + base lsp-protection-type; + description + "'Unprotected' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity lsp-protection-reroute-extra { + base lsp-protection-type; + status obsolete; + description + "'(Full) Rerouting' LSP protection type. + + This identity has been obsoleted: the + 'restoration-scheme-rerouting' identity SHOULD be used + instead."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity lsp-protection-reroute { + base lsp-protection-type; + status obsolete; + description + "'Rerouting without Extra-Traffic' LSP protection type. + + This identity has been obsoleted: the + 'restoration-scheme-rerouting' identity SHOULD be used + instead."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity lsp-protection-1-for-n { + base lsp-protection-type; + description + "'1:N Protection with Extra-Traffic' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity lsp-protection-1-for-1 { + base lsp-protection-type; + description + "LSP protection '1:1 Protection Type'."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity lsp-protection-unidir-1-plus-1 { + base lsp-protection-type; + description + "'1+1 Unidirectional Protection' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity lsp-protection-bidir-1-plus-1 { + base lsp-protection-type; + description + "'1+1 Bidirectional Protection' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity lsp-protection-extra-traffic { + base lsp-protection-type; + description + "Extra-Traffic LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + + identity lsp-protection-state { + description + "Base identity of protection states for reporting purposes."; + } + + identity normal { + base lsp-protection-state; + description + "Normal state."; + reference + "RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity signal-fail-of-protection { + base lsp-protection-state; + description + "The protection transport entity has a signal fail condition + that is of higher priority than the forced switchover + command."; + reference + "RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity lockout-of-protection { + base lsp-protection-state; + description + "A Loss of Protection (LoP) command is active."; + reference + "RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity forced-switch { + base lsp-protection-state; + description + "A forced switchover command is active."; + reference + "RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity signal-fail { + base lsp-protection-state; + description + "There is a signal fail condition on either the working path + or the protection path."; + reference + "RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity signal-degrade { + base lsp-protection-state; + description + "There is a signal degrade condition on either the working + path or the protection path."; + reference + "RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity manual-switch { + base lsp-protection-state; + description + "A manual switchover command is active."; + reference + "RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity wait-to-restore { + base lsp-protection-state; + description + "A Wait-to-Restore (WTR) timer is running."; + reference + "RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity do-not-revert { + base lsp-protection-state; + description + "A Do Not Revert (DNR) condition is active because of + non-revertive behavior."; + reference + "RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity failure-of-protocol { + base lsp-protection-state; + description + "LSP protection is not working because of a protocol failure + condition."; + reference + "RFC 7271: MPLS Transport Profile (MPLS-TP) Linear Protection + to Match the Operational Expectations of + Synchronous Digital Hierarchy, Optical Transport + Network, and Ethernet Transport Network Operators + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity protection-external-commands { + description + "Base identity from which protection-related external commands + used for troubleshooting purposes are derived."; + } + + identity action-freeze { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command that prevents any switchover action from being taken + and, as such, freezes the current state."; + reference + "RFC 7271: MPLS Transport Profile (MPLS-TP) Linear Protection + to Match the Operational Expectations of + Synchronous Digital Hierarchy, Optical Transport + Network, and Ethernet Transport Network Operators + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity clear-freeze { + base protection-external-commands; + description + "An action that clears the active freeze state."; + reference + "RFC 7271: MPLS Transport Profile (MPLS-TP) Linear Protection + to Match the Operational Expectations of + Synchronous Digital Hierarchy, Optical Transport + Network, and Ethernet Transport Network Operators + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity action-lockout-of-normal { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command to ensure that the normal traffic is not allowed + to use the protection transport entity."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity clear-lockout-of-normal { + base protection-external-commands; + description + "An action that clears the active lockout of the + normal state."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity action-lockout-of-protection { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command to ensure that the protection transport entity is + temporarily not available to transport a traffic signal + (either normal or Extra-Traffic)."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity action-forced-switch { + base protection-external-commands; + description + "A switchover action initiated by an operator command to + switch the Extra-Traffic signal, the normal traffic signal, + or the null signal to the protection transport entity, + unless a switchover command of equal or higher priority is + in effect."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity action-manual-switch { + base protection-external-commands; + description + "A switchover action initiated by an operator command to + switch the Extra-Traffic signal, the normal traffic signal, + or the null signal to the protection transport entity, + unless a fault condition exists on other transport entities + or a switchover command of equal or higher priority is in + effect."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity action-exercise { + base protection-external-commands; + description + "An action that starts testing whether or not Automatic + Protection Switching (APS) communication is operating + correctly. It is of lower priority than any + other state or command."; + reference + "RFC 7271: MPLS Transport Profile (MPLS-TP) Linear Protection + to Match the Operational Expectations of + Synchronous Digital Hierarchy, Optical Transport + Network, and Ethernet Transport Network Operators + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity clear { + base protection-external-commands; + description + "An action that clears the active near-end lockout of a + protection, forced switchover, manual switchover, + Wait-to-Restore (WTR) state, or exercise command."; + reference + "RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection + RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + + identity switching-capabilities { + description + "Base identity for interface switching capabilities."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-psc1 { + base switching-capabilities; + description + "Packet-Switch Capable-1 (PSC-1)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-evpl { + base switching-capabilities; + description + "Ethernet Virtual Private Line (EVPL)."; + reference + "RFC 6004: Generalized MPLS (GMPLS) Support for Metro + Ethernet Forum and G.8011 Ethernet Service + Switching"; + } + + identity switching-l2sc { + base switching-capabilities; + description + "Layer-2 Switch Capable (L2SC)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-tdm { + base switching-capabilities; + description + "Time-Division-Multiplex Capable (TDM)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-otn { + base switching-capabilities; + description + "OTN-TDM capable."; + reference + "RFC 7138: Traffic Engineering Extensions to OSPF for GMPLS + Control of Evolving G.709 Optical Transport + Networks"; + } + + identity switching-dcsc { + base switching-capabilities; + description + "Data Channel Switching Capable (DCSC)."; + reference + "RFC 6002: Generalized MPLS (GMPLS) Data Channel + Switching Capable (DCSC) and Channel Set Label + Extensions"; + } + + identity switching-lsc { + base switching-capabilities; + description + "Lambda-Switch Capable (LSC)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-fsc { + base switching-capabilities; + description + "Fiber-Switch Capable (FSC)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-types { + description + "Base identity for encoding types."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-packet { + base lsp-encoding-types; + description + "Packet LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-ethernet { + base lsp-encoding-types; + description + "Ethernet LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-pdh { + base lsp-encoding-types; + description + "ANSI/ETSI PDH LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-sdh { + base lsp-encoding-types; + description + "SDH ITU-T G.707 / SONET ANSI T1.105 LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-digital-wrapper { + base lsp-encoding-types; + description + "Digital Wrapper LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-lambda { + base lsp-encoding-types; + description + "Lambda (photonic) LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-fiber { + base lsp-encoding-types; + description + "Fiber LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-fiber-channel { + base lsp-encoding-types; + description + "FiberChannel LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-oduk { + base lsp-encoding-types; + description + "G.709 ODUk (Digital Path) LSP encoding."; + reference + "RFC 4328: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Extensions for G.709 Optical Transport + Networks Control"; + } + + identity lsp-encoding-optical-channel { + base lsp-encoding-types; + description + "G.709 Optical Channel LSP encoding."; + reference + "RFC 4328: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Extensions for G.709 Optical Transport + Networks Control"; + } + + identity lsp-encoding-line { + base lsp-encoding-types; + description + "Line (e.g., 8B/10B) LSP encoding."; + reference + "RFC 6004: Generalized MPLS (GMPLS) Support for Metro + Ethernet Forum and G.8011 Ethernet Service + Switching"; + } + + identity path-signaling-type { + description + "Base identity from which specific LSP path setup types + are derived."; + } + + identity path-setup-static { + base path-signaling-type; + description + "Static LSP provisioning path setup."; + } + + identity path-setup-rsvp { + base path-signaling-type; + description + "RSVP-TE signaling path setup."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity path-setup-sr { + base path-signaling-type; + description + "Segment-routing path setup."; + } + + identity path-scope-type { + description + "Base identity from which specific path scope types are + derived."; + } + + identity path-scope-segment { + base path-scope-type; + description + "Path scope segment."; + reference + "RFC 4873: GMPLS Segment Recovery"; + } + + identity path-scope-end-to-end { + base path-scope-type; + description + "Path scope end to end."; + reference + "RFC 4873: GMPLS Segment Recovery"; + } + + identity route-usage-type { + description + "Base identity for route usage."; + } + + identity route-include-object { + base route-usage-type; + description + "'Include route' object."; + } + + identity route-exclude-object { + base route-usage-type; + description + "'Exclude route' object."; + reference + "RFC 4874: Exclude Routes - Extension to Resource ReserVation + Protocol-Traffic Engineering (RSVP-TE)"; + } + + identity route-exclude-srlg { + base route-usage-type; + description + "Excludes SRLGs."; + reference + "RFC 4874: Exclude Routes - Extension to Resource ReserVation + Protocol-Traffic Engineering (RSVP-TE)"; + } + + identity path-metric-optimization-type { + description + "Base identity used to define the path metric optimization + types."; + } + + identity link-path-metric-type { + description + "Base identity used to define the link and the path metric + types. + + The unit of the path metric value is interpreted in the + context of the path metric type and the derived identities + SHOULD describe the unit of the path metric types they + define."; + } + + identity link-metric-type { + base link-path-metric-type; + description + "Base identity for the link metric types."; + } + + identity link-metric-te { + base link-metric-type; + description + "Traffic Engineering (TE) Link Metric."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2, Section 2.5.5 + RFC 5305: IS-IS Extensions for Traffic Engineering, + Section 3.7"; + } + + identity link-metric-igp { + base link-metric-type; + description + "Interior Gateway Protocol (IGP) Link Metric."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric + as a second MPLS Traffic Engineering (TE) + Metric"; + } + + identity link-metric-delay-average { + base link-metric-type; + description + "Unidirectional Link Delay, measured in units of + microseconds."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions, Section 4.1 + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions, Section 4.1"; + } + + identity link-metric-delay-minimum { + base link-metric-type; + description + "Minimum unidirectional Link Delay, measured in units of + microseconds."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions, Section 4.2 + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions, Section 4.2"; + } + + identity link-metric-delay-maximum { + base link-metric-type; + description + "Maximum unidirectional Link Delay, measured in units of + microseconds."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions, Section 4.2 + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions, Section 4.2"; + } + + identity link-metric-residual-bandwidth { + base link-metric-type; + description + "Unidirectional Residual Bandwidth, measured in units of + bytes per second. + + It is defined to be Maximum Bandwidth minus the bandwidth + currently allocated to LSPs."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions, Section 4.5 + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions, Section 4.5"; + } + + identity path-metric-type { + base link-path-metric-type; + base path-metric-optimization-type; + description + "Base identity for the path metric types."; + } + + identity path-metric-te { + base path-metric-type; + description + "Traffic Engineering (TE) Path Metric."; + reference + "RFC 5440: Path Computation Element (PCE) Communication + Protocol (PCEP), Section 7.8"; + } + + identity path-metric-igp { + base path-metric-type; + description + "Interior Gateway Protocol (IGP) Path Metric."; + reference + "RFC 5440: Path Computation Element (PCE) Communication + Protocol (PCEP), section 7.8"; + } + + identity path-metric-hop { + base path-metric-type; + description + "Hop Count Path Metric."; + reference + "RFC 5440: Path Computation Element (PCE) Communication + Protocol (PCEP), Section 7.8"; + } + + identity path-metric-delay-average { + base path-metric-type; + description + "The Path Delay Metric, measured in units of + microseconds."; + reference + "RFC8233: Extensions to the Path Computation Element + Communication Protocol (PCEP) to Compute + Service-Aware Label Switched Paths (LSPs), + Section 3.1.1"; + } + + identity path-metric-delay-minimum { + base path-metric-type; + description + "The Path Min Delay Metric, measured in units of + microseconds."; + reference + "I-D.ietf-pce-sid-algo: Carrying SR-Algorithm information + in PCE-based Networks, + draft-ietf-pce-sid-algo-14, + Sections 3.5.1 and 3.5.2"; + } + + identity path-metric-residual-bandwidth { + base path-metric-type; + description + "The Path Residual Bandwidth, defined as the minimum Link + Residual Bandwidth all the links along the path. + + The Path Residual Bandwidth can be seen as the path + metric associated with the Maximum residual Bandwidth Path + (MBP) objective function."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity path-metric-optimize-includes { + base path-metric-optimization-type; + description + "A metric that optimizes the number of included resources + specified in a set."; + } + + identity path-metric-optimize-excludes { + base path-metric-optimization-type; + description + "A metric that optimizes to a maximum the number of excluded + resources specified in a set."; + } + + identity path-tiebreaker-type { + description + "Base identity for the path tiebreaker type."; + } + + identity path-tiebreaker-minfill { + base path-tiebreaker-type; + description + "Min-Fill LSP path placement: selects the path with the most + available bandwidth (load balance LSPs over more links)."; + } + + identity path-tiebreaker-maxfill { + base path-tiebreaker-type; + description + "Max-Fill LSP path placement: selects the path with the least + available bandwidth (packing more LSPs over few links)."; + } + + identity path-tiebreaker-random { + base path-tiebreaker-type; + description + "Random LSP path placement."; + } + + identity resource-affinities-type { + description + "Base identity for resource class affinities."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 2702: Requirements for Traffic Engineering Over MPLS"; + } + + identity resource-aff-include-all { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel, all of which must be present for a link + to be acceptable."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 2702: Requirements for Traffic Engineering Over MPLS"; + } + + identity resource-aff-include-any { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel, any of which must be present for a link + to be acceptable."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 2702: Requirements for Traffic Engineering Over MPLS"; + } + + identity resource-aff-exclude-any { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel, any of which renders a link unacceptable."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 2702: Requirements for Traffic Engineering Over MPLS"; + } + + identity te-optimization-criterion { + description + "Base identity for the TE optimization criteria."; + reference + "RFC 9522: Overview and Principles of Internet Traffic + Engineering"; + } + + identity not-optimized { + base te-optimization-criterion; + description + "Optimization is not applied."; + } + + identity cost { + base te-optimization-criterion; + description + "Optimized on cost."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity delay { + base te-optimization-criterion; + description + "Optimized on delay."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity path-computation-srlg-type { + description + "Base identity for SRLG path computation."; + } + + identity srlg-ignore { + base path-computation-srlg-type; + description + "Ignores SRLGs in the path computation."; + } + + identity srlg-strict { + base path-computation-srlg-type; + description + "Includes a strict SRLG check in the path computation."; + } + + identity srlg-preferred { + base path-computation-srlg-type; + description + "Includes a preferred SRLG check in the path computation."; + } + + identity srlg-weighted { + base path-computation-srlg-type; + description + "Includes a weighted SRLG check in the path computation."; + } + + identity path-computation-error-reason { + description + "Base identity for path computation error reasons."; + } + + identity path-computation-error-path-not-found { + base path-computation-error-reason; + description + "Path computation has failed because of an unspecified + reason."; + reference + "RFC 5440: Path Computation Element (PCE) Communication + Protocol (PCEP), Section 7.5"; + } + + identity path-computation-error-no-topology { + base path-computation-error-reason; + description + "Path computation has failed because there is no topology + with the provided topology-identifier."; + } + + identity path-computation-error-no-dependent-server { + base path-computation-error-reason; + description + "Path computation has failed because one or more dependent + path computation servers are unavailable. + + The dependent path computation server could be + a Backward-Recursive Path Computation (BRPC) downstream + PCE or a child PCE."; + reference + "RFC 5441: A Backward-Recursive PCE-Based Computation (BRPC) + Procedure to Compute Shortest Constrained + Inter-Domain Traffic Engineering Label Switched + Paths + RFC 8685: Path Computation Element Communication Protocol + (PCEP) Extensions for the Hierarchical Path + Computation Element (H-PCE) Architecture"; + } + + identity path-computation-error-pce-unavailable { + base path-computation-error-reason; + description + "Path computation has failed because PCE is not available. + + It corresponds to bit 31 of the Flags field of the + NO-PATH-VECTOR TLV."; + reference + "RFC 5440: Path Computation Element (PCE) Communication + Protocol (PCEP) + + https://www.iana.org/assignments/pcep + /pcep.xhtml#no-path-vector-tlv"; + } + + identity path-computation-error-no-inclusion-hop { + base path-computation-error-reason; + description + "Path computation has failed because there is no + node or link provided by one or more inclusion hops."; + } + + identity path-computation-error-destination-unknown-in-domain { + base path-computation-error-reason; + description + "Path computation has failed because the destination node is + unknown in indicated destination domain. + + It corresponds to bit 19 of the Flags field of the + NO-PATH-VECTOR TLV."; + reference + "RFC 8685: Path Computation Element Communication Protocol + (PCEP) Extensions for the Hierarchical Path + Computation Element (H-PCE) Architecture + + https://www.iana.org/assignments/pcep + /pcep.xhtml#no-path-vector-tlv"; + } + + identity path-computation-error-no-resource { + base path-computation-error-reason; + description + "Path computation has failed because there is no + available resource in one or more domains. + + It corresponds to bit 20 of the Flags field of the + NO-PATH-VECTOR TLV."; + reference + "RFC 8685: Path Computation Element Communication Protocol + (PCEP) Extensions for the Hierarchical Path + Computation Element (H-PCE) Architecture + + https://www.iana.org/assignments/pcep + /pcep.xhtml#no-path-vector-tlv"; + } + + identity path-computation-error-child-pce-unresponsive { + base path-computation-error-no-dependent-server; + description + "Path computation has failed because child PCE is not + responsive. + + It corresponds to bit 21 of the Flags field of the + NO-PATH-VECTOR TLV."; + reference + "RFC 8685: Path Computation Element Communication Protocol + (PCEP) Extensions for the Hierarchical Path + Computation Element (H-PCE) Architecture + + https://www.iana.org/assignments/pcep + /pcep.xhtml#no-path-vector-tlv"; + } + + identity path-computation-error-destination-domain-unknown { + base path-computation-error-reason; + description + "Path computation has failed because the destination domain + was unknown. + + It corresponds to bit 22 of the Flags field of the + NO-PATH-VECTOR TLV."; + reference + "RFC 8685: Path Computation Element Communication Protocol + (PCEP) Extensions for the Hierarchical Path + Computation Element (H-PCE) Architecture + + https://www.iana.org/assignments/pcep + /pcep.xhtml#no-path-vector-tlv"; + } + + identity path-computation-error-p2mp { + base path-computation-error-reason; + description + "Path computation has failed because of P2MP reachability + problem. + + It corresponds to bit 24 of the Flags field of the + NO-PATH-VECTOR TLV."; + reference + "RFC 8306: Extensions to the Path Computation Element + Communication Protocol (PCEP) for + Point-to-Multipoint Traffic Engineering Label + Switched Paths + + https://www.iana.org/assignments/pcep + /pcep.xhtml#no-path-vector-tlv"; + } + + identity path-computation-error-no-gco-migration { + base path-computation-error-reason; + description + "Path computation has failed because of no Global Concurrent + Optimization (GCO) migration path found. + + It corresponds to bit 26 of the Flags field of the + NO-PATH-VECTOR TLV."; + reference + "RFC 5557: Path Computation Element Communication Protocol + (PCEP) Requirements and Protocol Extensions in + Support of Global Concurrent Optimization + + https://www.iana.org/assignments/pcep + /pcep.xhtml#no-path-vector-tlv"; + } + + identity path-computation-error-no-gco-solution { + base path-computation-error-reason; + description + "Path computation has failed because of no GCO solution + found. + + It corresponds to bit 25 of the Flags field of the + NO-PATH-VECTOR TLV."; + reference + "RFC 5557: Path Computation Element Communication Protocol + (PCEP) Requirements and Protocol Extensions in + Support of Global Concurrent Optimization + + https://www.iana.org/assignments/pcep + /pcep.xhtml#no-path-vector-tlv"; + } + + identity path-computation-error-pks-expansion { + base path-computation-error-reason; + description + "Path computation has failed because of Path-Key Subobject + (PKS) expansion failure. + + It corresponds to bit 27 of the Flags field of the + NO-PATH-VECTOR TLV."; + reference + "RFC 5520: Preserving Topology Confidentiality in + Inter-Domain Path Computation Using a + Path-Key-Based Mechanism + + https://www.iana.org/assignments/pcep + /pcep.xhtml#no-path-vector-tlv"; + } + + identity path-computation-error-brpc-chain-unavailable { + base path-computation-error-no-dependent-server; + description + "Path computation has failed because PCE BRPC chain + unavailable. + + It corresponds to bit 28 of the Flags field of the + NO-PATH-VECTOR TLV."; + reference + "RFC 5441: A Backward-Recursive PCE-Based Computation (BRPC) + Procedure to Compute Shortest Constrained + Inter-Domain Traffic Engineering Label Switched + Paths + + https://www.iana.org/assignments/pcep + /pcep.xhtml#no-path-vector-tlv"; + } + + identity path-computation-error-source-unknown { + base path-computation-error-reason; + description + "Path computation has failed because source node is + unknown. + + It corresponds to bit 29 of the Flags field of the + NO-PATH-VECTOR TLV."; + reference + "RFC 5440: Path Computation Element (PCE) Communication + Protocol (PCEP); + + https://www.iana.org/assignments/pcep + /pcep.xhtml#no-path-vector-tlv"; + } + + identity path-computation-error-destination-unknown { + base path-computation-error-reason; + description + "Path computation has failed because destination node is + unknown. + + It corresponds to bit 30 of the Flags field of the + NO-PATH-VECTOR TLV."; + reference + "RFC 5440: Path Computation Element (PCE) Communication + Protocol (PCEP); + + https://www.iana.org/assignments/pcep + /pcep.xhtml#no-path-vector-tlv"; + } + + identity path-computation-error-no-server { + base path-computation-error-reason; + description + "Path computation has failed because path computation + server is unavailable."; + reference + "RFC 5440: Path Computation Element (PCE) Communication + Protocol (PCEP); + + https://www.iana.org/assignments/pcep + /pcep.xhtml#no-path-vector-tlv"; + } + + identity protocol-origin-type { + description + "Base identity for protocol origin type."; + } + + identity protocol-origin-api { + base protocol-origin-type; + description + "Protocol origin is via Application Programming Interface + (API)."; + } + + identity protocol-origin-pcep { + base protocol-origin-type; + description + "Protocol origin is Path Computation Engine Protocol + (PCEP)."; + reference + "RFC 5440: Path Computation Element (PCE) Communication + Protocol (PCEP)"; + } + + identity protocol-origin-bgp { + base protocol-origin-type; + description + "Protocol origin is Border Gateway Protocol (BGP)."; + reference + "RFC 9012: The BGP Tunnel Encapsulation Attribute"; + } + + identity svec-objective-function-type { + description + "Base identity for SVEC objective function type."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity svec-of-minimize-agg-bandwidth-consumption { + base svec-objective-function-type; + description + "Objective function for minimizing aggregate bandwidth + consumption (MBC)."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity svec-of-minimize-load-most-loaded-link { + base svec-objective-function-type; + description + "Objective function for minimizing the load on the link that + is carrying the highest load (MLL)."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity svec-of-minimize-cost-path-set { + base svec-objective-function-type; + description + "Objective function for minimizing the cost on a path set + (MCC)."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity svec-of-minimize-common-transit-domain { + base svec-objective-function-type; + description + "Objective function for minimizing the number of common + transit domains (MCTD)."; + reference + "RFC 8685: Path Computation Element Communication Protocol + (PCEP) Extensions for the Hierarchical Path + Computation Element (H-PCE) Architecture."; + } + + identity svec-of-minimize-shared-link { + base svec-objective-function-type; + description + "Objective function for minimizing the number of shared + links (MSL)."; + reference + "RFC 8685: Path Computation Element Communication Protocol + (PCEP) Extensions for the Hierarchical Path + Computation Element (H-PCE) Architecture."; + } + + identity svec-of-minimize-shared-srlg { + base svec-objective-function-type; + description + "Objective function for minimizing the number of shared + Shared Risk Link Groups (SRLG) (MSS)."; + reference + "RFC 8685: Path Computation Element Communication Protocol + (PCEP) Extensions for the Hierarchical Path + Computation Element (H-PCE) Architecture."; + } + + identity svec-of-minimize-shared-nodes { + base svec-objective-function-type; + description + "Objective function for minimizing the number of shared + nodes (MSN)."; + reference + "RFC 8685: Path Computation Element Communication Protocol + (PCEP) Extensions for the Hierarchical Path + Computation Element (H-PCE) Architecture."; + } + + identity svec-metric-type { + description + "Base identity for SVEC metric type."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity svec-metric-cumulative-te { + base svec-metric-type; + description + "Cumulative TE cost."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity svec-metric-cumulative-igp { + base svec-metric-type; + description + "Cumulative IGP cost."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity svec-metric-cumulative-hop { + base svec-metric-type; + description + "Cumulative Hop path metric."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity svec-metric-aggregate-bandwidth-consumption { + base svec-metric-type; + description + "Aggregate bandwidth consumption."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + identity svec-metric-load-of-the-most-loaded-link { + base svec-metric-type; + description + "Load of the most loaded link."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol + (PCEP)"; + } + + /** + * TE bandwidth groupings + **/ + + grouping te-bandwidth { + description + "This grouping defines the generic TE bandwidth. + For some known data-plane technologies, specific modeling + structures are specified. The string-encoded 'te-bandwidth' + type is used for unspecified technologies. + The modeling structure can be augmented later for other + technologies."; + container te-bandwidth { + description + "Container that specifies TE bandwidth. The choices + can be augmented for specific data-plane technologies."; + choice technology { + default "generic"; + description + "Data-plane technology type."; + case generic { + leaf generic { + type te-bandwidth; + description + "Bandwidth specified in a generic format."; + } + } + } + } + } + + /** + * TE label groupings + **/ + + grouping te-label { + description + "This grouping defines the generic TE label. + The modeling structure can be augmented for each technology. + For unspecified technologies, 'rt-types:generalized-label' + is used."; + container te-label { + description + "Container that specifies the TE label. The choices can + be augmented for specific data-plane technologies."; + choice technology { + default "generic"; + description + "Data-plane technology type."; + case generic { + leaf generic { + type rt-types:generalized-label; + description + "TE label specified in a generic format."; + } + } + } + leaf direction { + type te-label-direction; + default "forward"; + description + "Label direction."; + } + } + } + + grouping te-topology-identifier { + description + "Augmentation for a TE topology."; + container te-topology-identifier { + description + "TE topology identifier container."; + leaf provider-id { + type te-global-id; + default "0"; + description + "An identifier to uniquely identify a provider. + If omitted, it assumes that the topology provider ID + value = 0 (the default)."; + } + leaf client-id { + type te-global-id; + default "0"; + description + "An identifier to uniquely identify a client. + If omitted, it assumes that the topology client ID + value = 0 (the default)."; + } + leaf topology-id { + type te-topology-id; + default ""; + description + "When the datastore contains several topologies, + 'topology-id' distinguishes between them. If omitted, + the default (empty) string for this leaf is assumed."; + } + } + } + + /** + * TE performance metrics groupings + **/ + + grouping performance-metrics-one-way-delay-loss { + description + "Performance Metrics (PM) information in real time that can + be applicable to links or connections. PM defined in this + grouping are applicable to generic TE PM as well as packet TE + PM."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions"; + leaf one-way-delay { + type uint32 { + range "0..16777215"; + } + description + "One-way delay or latency in microseconds."; + } + leaf one-way-delay-normality { + type te-types:performance-metrics-normality; + description + "One-way delay normality."; + } + } + + grouping performance-metrics-two-way-delay-loss { + description + "PM information in real time that can be applicable to links or + connections. PM defined in this grouping are applicable to + generic TE PM as well as packet TE PM."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions"; + leaf two-way-delay { + type uint32 { + range "0..16777215"; + } + description + "Two-way delay or latency in microseconds."; + } + leaf two-way-delay-normality { + type te-types:performance-metrics-normality; + description + "Two-way delay normality."; + } + } + + grouping performance-metrics-one-way-bandwidth { + description + "PM information in real time that can be applicable to links. + PM defined in this grouping are applicable to generic TE PM + as well as packet TE PM."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions"; + leaf one-way-residual-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Residual bandwidth that subtracts tunnel reservations from + Maximum Bandwidth (or link capacity) (RFC 3630) and + provides an aggregated remainder across QoS classes."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + leaf one-way-residual-bandwidth-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Residual bandwidth normality."; + } + leaf one-way-available-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Available bandwidth that is defined to be residual + bandwidth minus the measured bandwidth used for the + actual forwarding of non-RSVP-TE LSP packets. For a + bundled link, available bandwidth is defined to be the + sum of the component link available bandwidths."; + } + leaf one-way-available-bandwidth-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Available bandwidth normality."; + } + leaf one-way-utilized-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Bandwidth utilization that represents the actual + utilization of the link (i.e., as measured in the router). + For a bundled link, bandwidth utilization is defined to + be the sum of the component link bandwidth utilizations."; + } + leaf one-way-utilized-bandwidth-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Bandwidth utilization normality."; + } + } + + grouping one-way-performance-metrics { + description + "One-way PM throttle grouping."; + leaf one-way-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way delay or latency in microseconds."; + } + leaf one-way-residual-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Residual bandwidth that subtracts tunnel reservations from + Maximum Bandwidth (or link capacity) (RFC 3630) and + provides an aggregated remainder across QoS classes."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + leaf one-way-available-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Available bandwidth that is defined to be residual + bandwidth minus the measured bandwidth used for the + actual forwarding of non-RSVP-TE LSP packets. For a + bundled link, available bandwidth is defined to be the + sum of the component link available bandwidths."; + } + leaf one-way-utilized-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Bandwidth utilization that represents the actual + utilization of the link (i.e., as measured in the router). + For a bundled link, bandwidth utilization is defined to + be the sum of the component link bandwidth utilizations."; + } + } + + grouping two-way-performance-metrics { + description + "Two-way PM throttle grouping."; + leaf two-way-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way delay or latency in microseconds."; + } + } + + grouping performance-metrics-thresholds { + description + "Grouping for configurable thresholds for measured + attributes."; + uses one-way-performance-metrics; + uses two-way-performance-metrics; + } + + grouping performance-metrics-attributes { + description + "Contains PM attributes."; + container performance-metrics-one-way { + description + "One-way link performance information in real time."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions"; + uses performance-metrics-one-way-delay-loss; + uses performance-metrics-one-way-bandwidth; + } + container performance-metrics-two-way { + description + "Two-way link performance information in real time."; + reference + "RFC 6374: Packet Loss and Delay Measurement for MPLS + Networks"; + uses performance-metrics-two-way-delay-loss; + } + } + + grouping performance-metrics-throttle-container { + description + "Controls PM throttling."; + container throttle { + must 'suppression-interval >= measure-interval' { + error-message "'suppression-interval' cannot be less than " + + "'measure-interval'."; + description + "Constraint on 'suppression-interval' and + 'measure-interval'."; + } + description + "Link performance information in real time."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions"; + leaf one-way-delay-offset { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Offset value to be added to the measured delay value."; + } + leaf measure-interval { + type uint32; + default "30"; + description + "Interval, in seconds, to measure the extended metric + values."; + } + leaf advertisement-interval { + type uint32; + default "0"; + description + "Interval, in seconds, to advertise the extended metric + values."; + } + leaf suppression-interval { + type uint32 { + range "1..max"; + } + default "120"; + description + "Interval, in seconds, to suppress advertisement of the + extended metric values."; + reference + "RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions, Section 6"; + } + container threshold-out { + uses performance-metrics-thresholds; + description + "If the measured parameter falls outside an upper bound + for all but the minimum-delay metric (or a lower bound + for the minimum-delay metric only) and the advertised + value is not already outside that bound, an 'anomalous' + announcement (anomalous bit set) will be triggered."; + } + container threshold-in { + uses performance-metrics-thresholds; + description + "If the measured parameter falls inside an upper bound + for all but the minimum-delay metric (or a lower bound + for the minimum-delay metric only) and the advertised + value is not already inside that bound, a 'normal' + announcement (anomalous bit cleared) will be triggered."; + } + container threshold-accelerated-advertisement { + description + "When the difference between the last advertised value and + the current measured value exceeds this threshold, an + 'anomalous' announcement (anomalous bit set) will be + triggered."; + uses performance-metrics-thresholds; + } + } + } + + /** + * TE tunnel generic groupings + **/ + + grouping explicit-route-hop { + description + "The explicit route entry grouping."; + choice type { + description + "The explicit route entry type."; + case numbered-node-hop { + container numbered-node-hop { + must "node-id-uri or node-id" { + description + "At least one node identifier MUST be present."; + } + leaf node-id-uri { + type nw:node-id; + description + "The identifier of a node in the topology."; + } + leaf node-id { + type te-node-id; + description + "The identifier of a node in the TE topology."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + description + "Numbered node route hop."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3, EXPLICIT_ROUTE in RSVP-TE + RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering + (RSVP-TE)"; + } + } + case numbered-link-hop { + container numbered-link-hop { + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "TE Link Termination Point (LTP) identifier."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + leaf direction { + type te-link-direction; + default "outgoing"; + description + "Link route object direction."; + } + description + "Numbered link explicit route hop."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3, EXPLICIT_ROUTE in RSVP-TE + RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering + (RSVP-TE)"; + } + } + case unnumbered-link-hop { + container unnumbered-link-hop { + must "(link-tp-id-uri or link-tp-id) and " + + "(node-id-uri or node-id)" { + description + "At least one node identifier and at least one Link + Termination Point (LTP) identifier MUST be present."; + } + leaf link-tp-id-uri { + type nt:tp-id; + description + "Link Termination Point (LTP) identifier."; + } + leaf link-tp-id { + type te-tp-id; + description + "TE LTP identifier. The combination of the TE link ID + and the TE node ID is used to identify an unnumbered + TE link."; + } + leaf node-id-uri { + type nw:node-id; + description + "The identifier of a node in the topology."; + } + leaf node-id { + type te-node-id; + description + "The identifier of a node in the TE topology."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + leaf direction { + type te-link-direction; + default "outgoing"; + description + "Link route object direction."; + } + description + "Unnumbered link explicit route hop."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3, EXPLICIT_ROUTE in RSVP-TE + RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering + (RSVP-TE)"; + } + } + case as-number { + container as-number-hop { + leaf as-number { + type inet:as-number; + mandatory true; + description + "The Autonomous System (AS) number."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + description + "AS explicit route hop."; + } + } + case label { + container label-hop { + description + "Label hop type."; + uses te-label; + } + description + "The label explicit route hop type."; + } + } + } + + grouping record-route-state { + description + "The Record Route grouping."; + leaf index { + type uint32; + description + "Record Route hop index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + choice type { + description + "The Record Route entry type."; + case numbered-node-hop { + container numbered-node-hop { + must "node-id-uri or node-id" { + description + "At least one node identifier MUST be present."; + } + description + "Numbered node route hop container."; + leaf node-id-uri { + type nw:node-id; + description + "The identifier of a node in the topology."; + } + leaf node-id { + type te-node-id; + description + "The identifier of a node in the TE topology."; + } + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + } + description + "Numbered node route hop."; + } + case numbered-link-hop { + container numbered-link-hop { + description + "Numbered link route hop container."; + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "Numbered TE LTP identifier."; + } + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + } + description + "Numbered link route hop."; + } + case unnumbered-link-hop { + container unnumbered-link-hop { + must "(link-tp-id-uri or link-tp-id) and " + + "(node-id-uri or node-id)" { + description + "At least one node identifier and at least one Link + Termination Point (LTP) identifier MUST be present."; + } + leaf link-tp-id-uri { + type nt:tp-id; + description + "Link Termination Point (LTP) identifier."; + } + leaf link-tp-id { + type te-tp-id; + description + "TE LTP identifier. The combination of the TE link ID + and the TE node ID is used to identify an unnumbered + TE link."; + } + leaf node-id-uri { + type nw:node-id; + description + "The identifier of a node in the topology."; + } + leaf node-id { + type te-node-id; + description + "The identifier of a node in the TE topology."; + } + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + description + "Unnumbered link Record Route hop."; + reference + "RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering + (RSVP-TE)"; + } + description + "Unnumbered link route hop."; + } + case label { + container label-hop { + description + "Label route hop type."; + uses te-label; + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + } + description + "The label Record Route entry types."; + } + } + } + + grouping label-restriction-info { + description + "Label set item information."; + leaf restriction { + type enumeration { + enum inclusive { + description + "The label or label range is inclusive."; + } + enum exclusive { + description + "The label or label range is exclusive."; + } + } + default "inclusive"; + description + "Indicates whether the list item is inclusive or exclusive."; + } + leaf index { + type uint32; + description + "The index of the label restriction list entry."; + } + container label-start { + must "(not(../label-end/te-label/direction) and" + + " not(te-label/direction))" + + " or " + + "(../label-end/te-label/direction = te-label/direction)" + + " or " + + "(not(te-label/direction) and" + + " (../label-end/te-label/direction = 'forward'))" + + " or " + + "(not(../label-end/te-label/direction) and" + + " (te-label/direction = 'forward'))" { + error-message "'label-start' and 'label-end' must have the " + + "same direction."; + } + description + "This is the starting label if a label range is specified. + This is the label value if a single label is specified, + in which case the 'label-end' attribute is not set."; + uses te-label; + } + container label-end { + must "(not(../label-start/te-label/direction) and" + + " not(te-label/direction))" + + " or " + + "(../label-start/te-label/direction = te-label/direction)" + + " or " + + "(not(te-label/direction) and" + + " (../label-start/te-label/direction = 'forward'))" + + " or " + + "(not(../label-start/te-label/direction) and" + + " (te-label/direction = 'forward'))" { + error-message "'label-start' and 'label-end' must have the " + + "same direction."; + } + description + "This is the ending label if a label range is specified. + This attribute is not set if a single label is specified."; + uses te-label; + } + container label-step { + description + "The step increment between labels in the label range. + The label start/end values will have to be consistent + with the sign of label step. For example, + 'label-start' < 'label-end' enforces 'label-step' > 0 + 'label-start' > 'label-end' enforces 'label-step' < 0."; + choice technology { + default "generic"; + description + "Data-plane technology type."; + case generic { + leaf generic { + type int32; + default "1"; + description + "Label range step."; + } + } + } + } + leaf range-bitmap { + type yang:hex-string; + description + "When there are gaps between 'label-start' and 'label-end', + this attribute is used to specify the positions + of the used labels. This is represented in big endian as + 'hex-string'. + + In case the restriction is 'inclusive', the bit-position is + set if the corresponding mapped label is available. + In this case, if the range-bitmap is not present, all the + labels in the range are available. + + In case the restriction is 'exclusive', the bit-position is + set if the corresponding mapped label is not available. + In this case, if the range-bitmap is not present, all the + labels in the range are not available. + + The most significant byte in the hex-string is the farthest + to the left in the byte sequence. Leading zero bytes in the + configured value may be omitted for brevity. + Each bit position in the 'range-bitmap' 'hex-string' maps + to a label in the range derived from 'label-start'. + + For example, assuming that 'label-start' = 16000 and + 'range-bitmap' = 0x01000001, then: + + - bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. + - bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1."; + } + } + + grouping label-set-info { + description + "Grouping for the list of label restrictions specifying what + labels may or may not be used."; + container label-restrictions { + description + "The label restrictions container."; + list label-restriction { + key "index"; + description + "The absence of the label restrictions container implies + that all labels are acceptable; otherwise, only restricted + labels are available."; + reference + "RFC 7579: General Network Element Constraint Encoding + for GMPLS-Controlled Networks"; + uses label-restriction-info; + } + } + } + + grouping optimization-metric-entry { + description + "Optimization metrics configuration grouping."; + leaf metric-type { + type identityref { + base path-metric-optimization-type; + } + description + "Identifies the 'metric-type' that the path computation + process uses for optimization."; + } + leaf weight { + type uint8; + default "1"; + description + "TE path metric normalization weight."; + } + container explicit-route-exclude-objects { + when "../metric-type = " + + "'te-types:path-metric-optimize-excludes'"; + description + "Container for the 'exclude route' object list."; + uses path-route-exclude-objects; + } + container explicit-route-include-objects { + when "../metric-type = " + + "'te-types:path-metric-optimize-includes'"; + description + "Container for the 'include route' object list."; + uses path-route-include-objects; + } + } + + grouping common-constraints { + description + "Common constraints grouping that can be set on + a constraint set or directly on the tunnel."; + uses te-bandwidth { + description + "A requested bandwidth to use for path computation."; + } + leaf link-protection { + type identityref { + base link-protection-type; + } + default "te-types:link-protection-unprotected"; + description + "Link protection type required for the links included + in the computed path."; + reference + "RFC 4202: Routing Extensions in Support of + Generalized Multi-Protocol Label Switching + (GMPLS)"; + } + leaf setup-priority { + type uint8 { + range "0..7"; + } + default "7"; + description + "TE LSP requested setup priority."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + leaf hold-priority { + type uint8 { + range "0..7"; + } + default "7"; + description + "TE LSP requested hold priority."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + leaf signaling-type { + type identityref { + base path-signaling-type; + } + default "te-types:path-setup-rsvp"; + description + "TE tunnel path signaling type."; + } + } + + grouping tunnel-constraints { + description + "Tunnel constraints grouping that can be set on + a constraint set or directly on the tunnel."; + leaf network-id { + type nw:network-id; + description + "The network topology identifier."; + } + uses te-topology-identifier; + uses common-constraints; + } + + grouping path-constraints-route-objects { + description + "List of route entries to be included or excluded when + performing the path computation."; + container explicit-route-objects { + description + "Container for the explicit route object lists."; + list route-object-exclude-always { + key "index"; + ordered-by user; + description + "List of route objects to always exclude from the path + computation."; + leaf index { + type uint32; + description + "Explicit Route Object index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop; + } + list route-object-include-exclude { + key "index"; + ordered-by user; + description + "List of route objects to include or exclude in the path + computation."; + leaf explicit-route-usage { + type identityref { + base route-usage-type; + } + default "te-types:route-include-object"; + description + "Indicates whether to include or exclude the + route object. The default is to include it."; + } + leaf index { + type uint32; + description + "Route object include-exclude index. The index is used + to identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop { + augment "type" { + case srlg { + container srlg { + description + "SRLG container."; + leaf srlg { + type uint32; + description + "SRLG value."; + } + } + description + "An SRLG value to be included or excluded."; + } + description + "Augmentation for a generic explicit route for SRLG + exclusion."; + } + } + } + } + } + + grouping path-route-include-objects { + description + "List of route objects to be included when performing + the path computation."; + list route-object-include-object { + key "index"; + ordered-by user; + description + "List of Explicit Route Objects to be included in the + path computation."; + leaf index { + type uint32; + description + "Route object entry index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop; + } + } + + grouping path-route-exclude-objects { + description + "List of route objects to be excluded when performing + the path computation."; + list route-object-exclude-object { + key "index"; + ordered-by user; + description + "List of Explicit Route Objects to be excluded in the + path computation."; + leaf index { + type uint32; + description + "Route object entry index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop { + augment "type" { + case srlg { + container srlg { + description + "SRLG container."; + leaf srlg { + type uint32; + description + "SRLG value."; + } + } + description + "An SRLG value to be included or excluded."; + } + description + "Augmentation for a generic explicit route for SRLG + exclusion."; + } + } + } + } + + grouping generic-path-metric-bounds { + description + "TE path metric bounds grouping."; + container path-metric-bounds { + description + "Top-level container for the list of path metric bounds."; + list path-metric-bound { + key "metric-type"; + description + "List of path metric bounds, which can apply to link and + path metrics. + + TE paths which have at least one path metric which + exceeds the specified bounds MUST NOT be selected. + + TE paths that traverse TE links which have at least one + link metric which exceeds the specified bounds MUST NOT + be selected."; + leaf metric-type { + type identityref { + base link-path-metric-type; + } + description + "Identifies an entry in the list of 'metric-type' items + bound for the TE path."; + } + leaf upper-bound { + type uint64; + default "0"; + description + "Upper bound on the specified 'metric-type'. + + A zero indicates an unbounded upper limit for the + specificied 'metric-type'. + + The unit of is interpreted in the context of the + 'metric-type' identity."; + } + } + } + } + + grouping generic-path-optimization { + description + "TE generic path optimization grouping."; + container optimizations { + description + "The objective function container that includes + attributes to impose when computing a TE path."; + choice algorithm { + description + "Optimizations algorithm."; + case metric { + if-feature "path-optimization-metric"; + /* Optimize by metric */ + list optimization-metric { + key "metric-type"; + description + "TE path metric type."; + uses optimization-metric-entry; + } + /* Tiebreakers */ + container tiebreakers { + status deprecated; + description + "Container for the list of tiebreakers. + + This container has been deprecated by the tiebreaker + leaf."; + list tiebreaker { + key "tiebreaker-type"; + status deprecated; + description + "The list of tiebreaker criteria to apply on an + equally favored set of paths, in order to pick + the best."; + leaf tiebreaker-type { + type identityref { + base path-metric-type; + } + status deprecated; + description + "Identifies an entry in the list of tiebreakers."; + } + } + } + } + case objective-function { + if-feature "path-optimization-objective-function"; + /* Objective functions */ + container objective-function { + description + "The objective function container that includes + attributes to impose when computing a TE path."; + leaf objective-function-type { + type identityref { + base objective-function-type; + } + default "te-types:of-minimize-cost-path"; + description + "Objective function entry."; + } + } + } + } + } + leaf tiebreaker { + type identityref { + base path-tiebreaker-type; + } + default "te-types:path-tiebreaker-random"; + description + "The tiebreaker criteria to apply on an equally favored set + of paths, in order to pick the best."; + } + } + + grouping generic-path-affinities { + description + "Path affinities grouping."; + container path-affinities-values { + description + "Path affinities represented as values."; + list path-affinities-value { + key "usage"; + description + "List of named affinity constraints."; + leaf usage { + type identityref { + base resource-affinities-type; + } + description + "Identifies an entry in the list of value affinity + constraints."; + } + leaf value { + type admin-groups; + default ""; + description + "The affinity value. The default is empty."; + } + } + } + container path-affinity-names { + description + "Path affinities represented as names."; + list path-affinity-name { + key "usage"; + description + "List of named affinity constraints."; + leaf usage { + type identityref { + base resource-affinities-type; + } + description + "Identifies an entry in the list of named affinity + constraints."; + } + list affinity-name { + key "name"; + leaf name { + type string; + description + "Identifies a named affinity entry."; + } + description + "List of named affinities."; + } + } + } + } + + grouping generic-path-srlgs { + description + "Path SRLG grouping."; + container path-srlgs-lists { + description + "Path SRLG properties container."; + list path-srlgs-list { + key "usage"; + description + "List of SRLG values to be included or excluded."; + leaf usage { + type identityref { + base route-usage-type; + } + description + "Identifies an entry in a list of SRLGs to either + include or exclude."; + } + leaf-list values { + type srlg; + description + "List of SRLG values."; + } + } + } + container path-srlgs-names { + description + "Container for the list of named SRLGs."; + list path-srlgs-name { + key "usage"; + description + "List of named SRLGs to be included or excluded."; + leaf usage { + type identityref { + base route-usage-type; + } + description + "Identifies an entry in a list of named SRLGs to either + include or exclude."; + } + leaf-list names { + type string; + description + "List of named SRLGs."; + } + } + } + } + + grouping generic-path-disjointness { + description + "Path disjointness grouping."; + leaf disjointness { + type te-path-disjointness; + description + "The type of resource disjointness. + When configured for a primary path, the disjointness level + applies to all secondary LSPs. When configured for a + secondary path, the disjointness level overrides the level + configured for the primary path."; + } + } + + grouping common-path-constraints-attributes { + description + "Common path constraints configuration grouping."; + uses common-constraints; + uses generic-path-metric-bounds; + uses generic-path-affinities; + uses generic-path-srlgs; + } + + grouping generic-path-constraints { + description + "Global named path constraints configuration grouping."; + container path-constraints { + description + "TE named path constraints container."; + uses common-path-constraints-attributes; + uses generic-path-disjointness; + } + } + + grouping generic-path-properties { + description + "TE generic path properties grouping."; + container path-properties { + config false; + description + "The TE path properties."; + list path-metric { + key "metric-type"; + description + "TE path metric type."; + leaf metric-type { + type identityref { + base path-metric-type; + } + description + "TE path metric type."; + } + leaf accumulative-value { + type uint64; + description + "TE path metric accumulative value."; + } + } + uses generic-path-affinities; + uses generic-path-srlgs; + container path-route-objects { + description + "Container for the list of route objects either returned by + the computation engine or actually used by an LSP."; + list path-route-object { + key "index"; + ordered-by user; + description + "List of route objects either returned by the computation + engine or actually used by an LSP."; + leaf index { + type uint32; + description + "Route object entry index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key + values."; + } + uses explicit-route-hop; + } + } + } + } + + grouping encoding-and-switching-type { + description + "Common grouping to define the LSP encoding and + switching types"; + leaf encoding { + type identityref { + base te-types:lsp-encoding-types; + } + description + "LSP encoding type."; + reference + "RFC 3945: Generalized Multi-Protocol Label Switching (GMPLS) + Architecture"; + } + leaf switching-type { + type identityref { + base te-types:switching-capabilities; + } + description + "LSP switching type."; + reference + "RFC 3945: Generalized Multi-Protocol Label Switching (GMPLS) + Architecture"; + } + } + + grouping te-generic-node-id { + description + "A reusable grouping for a TE generic node identifier."; + leaf id { + type union { + type te-node-id; + type inet:ip-address; + type nw:node-id; + } + description + "The identifier of the node. + + It can be represented as IP address or dotted quad address + or as an URI. + + The type data node disambiguates the union type."; + } + leaf type { + type enumeration { + enum ip { + description + "IP address representation of the node identifier."; + } + enum te-id { + description + "TE identifier of the node"; + } + enum node-id { + description + "URI representation of the node identifier."; + } + } + description + "Type of node identifier representation."; + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-vpn-common@2021-09-10.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-vpn-common@2021-09-10.yang new file mode 100644 index 000000000..075437d3a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-vpn-common@2021-09-10.yang @@ -0,0 +1,2205 @@ +module ietf-vpn-common { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-vpn-common"; + prefix vpn-common; + + import ietf-netconf-acm { + prefix nacm; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + import ietf-routing-types { + prefix rt-types; + reference + "RFC 8294: Common YANG Data Types for the Routing Area"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types, Section 3"; + } + import ietf-packet-fields { + prefix packet-fields; + reference + "RFC 8519: YANG Data Model for Network Access + Control Lists (ACLs)"; + } + + organization + "IETF OPSAWG (Operations and Management Area Working Group)"; + contact + "WG Web: + WG List: + + Editor: Mohamed Boucadair + + Author: Samier Barguil + + Author: Oscar Gonzalez de Dios + + Author: Qin Wu + "; + description + "This YANG module defines a common module that is meant + to be reused by various VPN-related modules (e.g., + Layer 3 VPN Service Model (L3SM), Layer 2 VPN Service + Model (L2SM), Layer 3 VPN Network Model (L3NM), Layer 2 + VPN Network Model (L2NM)). + + Copyright (c) 2021 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + revision 2021-09-10 { + description + "Initial revision."; + reference + "RFC XXXX: A Layer 2/3 VPN Common YANG Model"; + } + + /******** Collection of VPN-related Features ********/ + /* + * Features related to encapsulation schemes + */ + + feature dot1q { + description + "Indicates the support for the Dot1q encapsulation."; + reference + "IEEE Std 802.1Q: Bridges and Bridged Networks"; + } + + feature qinq { + description + "Indicates the support for the QinQ encapsulation."; + reference + "IEEE Std 802.1ad: Provider Bridges"; + } + + feature vxlan { + description + "Indicates the support for the Virtual eXtensible + Local Area Network (VXLAN) encapsulation."; + reference + "RFC 7348: Virtual eXtensible Local Area Network (VXLAN): + A Framework for Overlaying Virtualized Layer 2 + Networks over Layer 3 Networks"; + } + + feature qinany { + description + "Indicates the support for the QinAny encapsulation. + The outer VLAN tag is set to a specific value but + the inner VLAN tag is set to any."; + } + + feature lag-interface { + description + "Indicates the support for Link Aggregation Group (LAG) + between VPN network accesses."; + reference + "IEEE Std. 802.1AX: Link Aggregation"; + } + + /* + * Features related to multicast + */ + + feature multicast { + description + "Indicates multicast capabilities support in a VPN."; + reference + "RFC 6513: Multicast in MPLS/BGP IP VPNs"; + } + + feature igmp { + description + "Indicates support for Internet Group Management Protocol + (IGMP)."; + reference + "RFC 1112: Host Extensions for IP Multicasting + RFC 2236: Internet Group Management Protocol, Version 2 + RFC 3376: Internet Group Management Protocol, Version 3"; + } + + feature mld { + description + "Indicates support for Multicast Listener Discovery (MLD)."; + reference + "RFC 2710: Multicast Listener Discovery (MLD) for IPv6 + RFC 3810: Multicast Listener Discovery Version 2 (MLDv2) + for IPv6"; + } + + feature pim { + description + "Indicates support for Protocol Independent Multicast (PIM)."; + reference + "RFC 7761: Protocol Independent Multicast - Sparse Mode + (PIM-SM): Protocol Specification (Revised)"; + } + + /* + * Features related to address family types + */ + + feature ipv4 { + description + "Indicates IPv4 support in a VPN. That is, IPv4 traffic + can be carried in the VPN, IPv4 addresses/prefixes can + be assigned to a VPN network access, IPv4 routes can be + installed for the CE/PE link, etc."; + reference + "RFC 791: Internet Protocol"; + } + + feature ipv6 { + description + "Indicates IPv6 support in a VPN. That is, IPv6 traffic + can be carried in the VPN, IPv6 addresses/prefixes can + be assigned to a VPN network access, IPv6 routes can be + installed for the CE/PE link, etc."; + reference + "RFC 8200: Internet Protocol, Version 6 (IPv6)"; + } + + /* + * Features related to routing protocols + */ + + feature rtg-ospf { + description + "Indicates support for the OSPF as the Provider Edge (PE)/ + Customer Edge (CE) routing protocol."; + reference + "RFC 4577: OSPF as the Provider/Customer Edge Protocol + for BGP/MPLS IP Virtual Private Networks (VPNs) + RFC 6565: OSPFv3 as a Provider Edge to Customer Edge + (PE-CE) Routing Protocol"; + } + + feature rtg-ospf-sham-link { + description + "Indicates support for OSPF sham links."; + reference + "RFC 4577: OSPF as the Provider/Customer Edge Protocol + for BGP/MPLS IP Virtual Private Networks (VPNs), + Section 4.2.7 + RFC 6565: OSPFv3 as a Provider Edge to Customer Edge + (PE-CE) Routing Protocol, Section 5"; + } + + feature rtg-bgp { + description + "Indicates support for BGP as the PE/CE routing protocol."; + reference + "RFC 4271: A Border Gateway Protocol 4 (BGP-4)"; + } + feature rtg-rip { + description + "Indicates support for RIP as the PE/CE routing protocol."; + reference + "RFC 2453: RIP Version 2 + RFC 2080: RIPng for IPv6"; + } + + feature rtg-isis { + description + "Indicates support for IS-IS as the PE/CE routing protocol."; + reference + "ISO10589: Intermediate System to Intermediate System intra- + domain routeing information exchange protocol for + use in conjunction with the protocol for providing + the connectionless-mode network service + (ISO 8473)"; + } + + feature rtg-vrrp { + description + "Indicates support for the Virtual Router Redundancy + Protocol (VRRP) in CE/PE link."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) Version 3 + for IPv4 and IPv6"; + } + + feature bfd { + description + "Indicates support for Bidirectional Forwarding Detection (BFD) + between the CE and the PE."; + reference + "RFC 5880: Bidirectional Forwarding Detection (BFD)"; + } + + /* + * Features related to VPN service constraints + */ + + feature bearer-reference { + description + "A bearer refers to properties of the CE-PE attachment that + are below Layer 3. + This feature indicates support for the bearer reference access + constraint. That is, the reuse of a network connection that was + already ordered to the service provider apart from the IP VPN + site."; + } + + feature placement-diversity { + description + "Indicates support for placement diversity constraints in the + customer premises. An example of these constraints may be to + avoid connecting a site network access to the same Provider + Edge as a target site network access."; + } + + /* + * Features related to bandwidth and Quality of Service (QoS) + */ + + feature qos { + description + "Indicates support for Classes of Service (CoSes) in the VPN."; + } + + feature inbound-bw { + description + "Indicates support for the inbound bandwidth in a VPN. That is, + support for specifying the download bandwidth from the service + provider network to the VPN site. Note that the L3SM uses + 'input' to identify the same feature. That terminology should + be deprecated in favor of the one defined in this module."; + } + + feature outbound-bw { + description + "Indicates support for the outbound bandwidth in a VPN. That is, + support for specifying the upload bandwidth from the VPN site + to the service provider network. Note that the L3SM uses + 'output' to identify the same feature. That terminology should + be deprecated in favor of the one defined in this module."; + } + + /* + * Features related to security and resilience + */ + + feature encryption { + description + "Indicates support for encryption in the VPN."; + } + + feature fast-reroute { + description + "Indicates support for Fast Reroute (FRR) capabilities for + a VPN site."; + } + + /* + * Features related to advanced VPN options + */ + + feature external-connectivity { + description + "Indicates support for the VPN to provide external + connectivity (e.g., Internet, private or public cloud)."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks + (VPNs), Section 11"; + } + + feature extranet-vpn { + description + "Indicates support for extranet VPNs. That is, the capability of + a VPN to access a list of other VPNs."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks + (VPNs), Section 1.1"; + } + + feature carriers-carrier { + description + "Indicates support for Carrier-of-Carrier VPNs."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks + (VPNs), Section 9"; + } + + /* + * Address family related identities + */ + + identity address-family { + description + "Defines a type for the address family."; + } + + identity ipv4 { + base address-family; + description + "Identity for IPv4 address family."; + } + identity ipv6 { + base address-family; + description + "Identity for IPv6 address family."; + } + + identity dual-stack { + base address-family; + description + "Identity for IPv4 and IPv6 address family."; + } + + /* + * Identities related to VPN topology + */ + + identity vpn-topology { + description + "Base identity of the VPN topology."; + } + + identity any-to-any { + base vpn-topology; + description + "Identity for any-to-any VPN topology. All VPN sites + can communicate with each other without any restrictions."; + } + + identity hub-spoke { + base vpn-topology; + description + "Identity for Hub-and-Spoke VPN topology. All Spokes can + communicate only with Hubs but not with each other. Hubs + can communicate with each other."; + } + + identity hub-spoke-disjoint { + base vpn-topology; + description + "Identity for Hub-and-Spoke VPN topology where Hubs cannot + communicate with each other."; + } + + identity custom { + base vpn-topology; + description + "Identity for custom VPN topologies where the role of the nodes + is not strictly Hub or Spoke. The VPN topology is controlled by + the import/export policies. The custom topology reflects more + complex VPN nodes such as VPN node that acts as Hub for certain + nodes and Spoke to others."; + } + + /* + * Identities related to network access types + */ + + identity site-network-access-type { + description + "Base identity for site network access type."; + } + + identity point-to-point { + base site-network-access-type; + description + "Point-to-point access type."; + } + + identity multipoint { + base site-network-access-type; + description + "Multipoint access type."; + } + + identity irb { + base site-network-access-type; + description + "Integrated Routing Bridge (IRB). + Identity for pseudowire connections."; + } + + identity loopback { + base site-network-access-type; + description + "Loopback access type."; + } + + /* + * Identities related to operational and administrative status + */ + + identity operational-status { + description + "Base identity for the operational status."; + } + + identity op-up { + base operational-status; + description + "Operational status is Up/Enabled."; + } + + identity op-down { + base operational-status; + description + "Operational status is Down/Disabled."; + } + + identity op-unknown { + base operational-status; + description + "Operational status is Unknown."; + } + + identity administrative-status { + description + "Base identity for administrative status."; + } + + identity admin-up { + base administrative-status; + description + "Administrative status is Up/Enabled."; + } + + identity admin-down { + base administrative-status; + description + "Administrative status is Down/Disabled."; + } + + identity admin-testing { + base administrative-status; + description + "Administrative status is up for testing purposes."; + } + + identity admin-pre-deployment { + base administrative-status; + description + "Administrative status is pre-deployment phase. That is, + prior to the actual deployment of a service."; + } + + /* + * Identities related to site or node role + */ + + identity role { + description + "Base identity of a site or a node role."; + } + + identity any-to-any-role { + base role; + description + "Any-to-any role."; + } + + identity spoke-role { + base role; + description + "A node or a site is acting as a Spoke."; + } + + identity hub-role { + base role; + description + "A node or a site is acting as a Hub."; + } + + identity custom-role { + base role; + description + "VPN node with custom or complex role in the VPN. For some + sources/destinations it can behave as a Hub, but for others it + can act as a Spoke depending on the configured policy."; + } + + /* + * Identities related to VPN service constraints + */ + + identity placement-diversity { + description + "Base identity for access placement constraints."; + } + + identity bearer-diverse { + base placement-diversity; + description + "Bearer diversity. + The bearers should not use common elements."; + } + + identity pe-diverse { + base placement-diversity; + description + "PE diversity."; + } + + identity pop-diverse { + base placement-diversity; + description + "Point Of Presence (POP) diversity."; + } + + identity linecard-diverse { + base placement-diversity; + description + "Linecard diversity."; + } + + identity same-pe { + base placement-diversity; + description + "Having sites connected on the same PE."; + } + + identity same-bearer { + base placement-diversity; + description + "Having sites connected using the same bearer."; + } + + /* + * Identities related to service types + */ + + identity service-type { + description + "Base identity for service type."; + } + + identity l3vpn { + base service-type; + description + "L3VPN service."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)"; + } + + identity vpls { + base service-type; + description + "VPLS service."; + reference + "RFC 4761: Virtual Private LAN Service (VPLS) Using BGP for + Auto-Discovery and Signaling + RFC 4762: Virtual Private LAN Service (VPLS) Using Label + Distribution Protocol (LDP) Signaling"; + } + + identity vpws { + base service-type; + description + "Virtual Private Wire Service (VPWS) service."; + reference + "RFC 4664: Framework for Layer 2 Virtual Private Networks + (L2VPNs), Section 3.1.1"; + } + + identity vpws-evpn { + base service-type; + description + "EVPN used to support VPWS service."; + reference + "RFC 8214: Virtual Private Wire Service Support in Ethernet VPN"; + } + + identity pbb-evpn { + base service-type; + description + "Provider Backbone Bridging (PBB) EVPNs service."; + reference + "RFC 7623: Provider Backbone Bridging Combined with Ethernet VPN + (PBB-EVPN)"; + } + + identity mpls-evpn { + base service-type; + description + "MPLS-based EVPN service."; + reference + "RFC 7432: BGP MPLS-Based Ethernet VPN"; + } + + identity vxlan-evpn { + base service-type; + description + "VXLAN-based EVPN service."; + reference + "RFC 8365: A Network Virtualization Overlay Solution Using + Ethernet VPN (EVPN)"; + } + + /* + * Identities related to VPN signaling type + */ + + identity vpn-signaling-type { + description + "Base identity for VPN signaling types"; + } + + identity bgp-signaling { + base vpn-signaling-type; + description + "Layer 2 VPNs using BGP signaling."; + reference + "RFC 6624: Layer 2 Virtual Private Networks Using BGP for + Auto-Discovery and Signaling + RFC 7432: BGP MPLS-Based Ethernet VPN"; + } + + identity ldp-signaling { + base vpn-signaling-type; + description + "Targeted Label Distribution Protocol (LDP) signaling."; + reference + "RFC 5036: LDP Specification"; + } + + identity l2tp-signaling { + base vpn-signaling-type; + description + "Layer Two Tunneling Protocol (L2TP) signaling."; + reference + "RFC 3931: Layer Two Tunneling Protocol - Version 3 (L2TPv3)"; + } + + /* + * Identities related to routing protocols + */ + + identity routing-protocol-type { + description + "Base identity for routing protocol type."; + } + + identity static-routing { + base routing-protocol-type; + description + "Static routing protocol."; + } + + identity bgp-routing { + if-feature "rtg-bgp"; + base routing-protocol-type; + description + "BGP routing protocol."; + reference + "RFC 4271: A Border Gateway Protocol 4 (BGP-4)"; + } + + identity ospf-routing { + if-feature "rtg-ospf"; + base routing-protocol-type; + description + "OSPF routing protocol."; + reference + "RFC 4577: OSPF as the Provider/Customer Edge Protocol + for BGP/MPLS IP Virtual Private Networks(VPNs) + RFC 6565: OSPFv3 as a Provider Edge to Customer Edge + (PE-CE) Routing Protocol"; + } + + identity rip-routing { + if-feature "rtg-rip"; + base routing-protocol-type; + description + "RIP routing protocol."; + reference + "RFC 2453: RIP Version 2 + RFC 2080: RIPng for IPv6"; + } + + identity isis-routing { + if-feature "rtg-isis"; + base routing-protocol-type; + description + "IS-IS routing protocol."; + reference + "ISO10589: Intermediate System to Intermediate System intra- + domain routeing information exchange protocol for + use in conjunction with the protocol for providing + the connectionless-mode network service + (ISO 8473)"; + } + + identity vrrp-routing { + if-feature "rtg-vrrp"; + base routing-protocol-type; + description + "VRRP protocol. + + This is to be used when LANs are directly connected to PEs."; + reference + "RFC 5798: Virtual Router Redundancy Protocol (VRRP) Version 3 + for IPv4 and IPv6"; + } + + identity direct-routing { + base routing-protocol-type; + description + "Direct routing. + + This is to be used when LANs are directly connected to PEs + and must be advertised in the VPN."; + } + + identity any-routing { + base routing-protocol-type; + description + "Any routing protocol. + + This can be, e.g., used to set policies that apply to any + routing protocol in place."; + } + + identity isis-level { + if-feature "rtg-isis"; + description + "Base identity for the IS-IS level."; + reference + "ISO10589: Intermediate System to Intermediate System intra- + domain routeing information exchange protocol for + use in conjunction with the protocol for providing + the connectionless-mode network service + (ISO 8473)"; + } + + identity level-1 { + base isis-level; + description + "IS-IS level 1."; + } + + identity level-2 { + base isis-level; + description + "IS-IS level 2."; + } + + identity level-1-2 { + base isis-level; + description + "IS-IS levels 1 and 2."; + } + + identity bfd-session-type { + if-feature "bfd"; + description + "Base identity for the BFD session type."; + } + + identity classic-bfd { + base bfd-session-type; + description + "Classic BFD."; + reference + "RFC 5880: Bidirectional Forwarding Detection (BFD)"; + } + + identity s-bfd { + base bfd-session-type; + description + "Seamless BFD."; + reference + "RFC 7880: Seamless Bidirectional Forwarding Detection (S-BFD)"; + } + + /* + * Identities related to Routes Import and Export + */ + + identity ie-type { + description + "Base identity for 'import/export' routing profiles. + These profiles can be reused between VPN nodes."; + } + + identity import { + base ie-type; + description + "'Import' routing profile."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks + (VPNs), Section 4.3.1"; + } + + identity export { + base ie-type; + description + "'Export' routing profile."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks + (VPNs), Section 4.3.1"; + } + + identity import-export { + base ie-type; + description + "'Import/export' routing profile."; + } + + /* + * Identities related to bandwidth and QoS + */ + + identity bw-direction { + description + "Base identity for the bandwidth direction."; + } + + identity inbound-bw { + if-feature "inbound-bw"; + base bw-direction; + description + "Inbound bandwidth."; + } + + identity outbound-bw { + if-feature "outbound-bw"; + base bw-direction; + description + "Outbound bandwidth."; + } + identity bw-type { + description + "Base identity for the bandwidth type."; + } + + identity bw-per-cos { + if-feature "qos"; + base bw-type; + description + "The bandwidth is per-CoS."; + } + + identity bw-per-port { + base bw-type; + description + "The bandwidth is per-site network access."; + } + + identity bw-per-site { + base bw-type; + description + "The bandwidth is per-site. It is applicable to all the site + network accesses within a site."; + } + + identity bw-per-service { + base bw-type; + description + "The bandwidth is per-VPN service."; + } + + identity qos-profile-direction { + if-feature "qos"; + description + "Base identity for the QoS profile direction."; + } + + identity site-to-wan { + base qos-profile-direction; + description + "Customer site to provider's network direction. + This is typically the CE-to-PE direction."; + } + + identity wan-to-site { + base qos-profile-direction; + description + "Provider's network to customer site direction. + This is typically the PE-to-CE direction."; + } + + identity both { + base qos-profile-direction; + description + "Both WAN-to-Site and Site-to-WAN directions."; + } + + /* + * Identities related to underlay transport instances + */ + + identity transport-instance-type { + description + "Base identity for underlay transport instance type."; + } + + identity virtual-network { + base transport-instance-type; + description + "Virtual network."; + reference + "RFC 8453: Framework for Abstraction and Control of TE + Networks (ACTN)"; + } + + identity enhanced-vpn { + base transport-instance-type; + description + "Enhanced VPN (VPN+). VPN+ is an approach that is + based on existing VPN and Traffic Engineering (TE) + technologies but adds characteristics that specific + services require over and above classical VPNs."; + reference + "I-D.ietf-teas-enhanced-vpn: + A Framework for Enhanced Virtual Private Network + (VPN+) Services"; + } + + identity ietf-network-slice { + base transport-instance-type; + description + "IETF network slice. An IETF network slice + is a logical network topology connecting a number of + endpoints using a set of shared or dedicated network + resources that are used to satisfy specific service + objectives."; + reference + "I-D.ietf-teas-ietf-network-slices: + Framework for IETF Network Slices"; + } + + /* + * Identities related to protocol types. These types are typically + * used to identify the underlay transport. + */ + + identity protocol-type { + description + "Base identity for Protocol Type."; + } + + identity ip-in-ip { + base protocol-type; + description + "Transport is based on IP-in-IP."; + reference + "RFC 2003: IP Encapsulation within IP + RFC 2473: Generic Packet Tunneling in IPv6 Specification"; + } + + identity ip-in-ipv4 { + base ip-in-ip; + description + "Transport is based on IP over IPv4."; + reference + "RFC 2003: IP Encapsulation within IP"; + } + + identity ip-in-ipv6 { + base ip-in-ip; + description + "Transport is based on IP over IPv6."; + reference + "RFC 2473: Generic Packet Tunneling in IPv6 Specification"; + } + + identity gre { + base protocol-type; + description + "Transport is based on Generic Routing Encapsulation (GRE)."; + reference + "RFC 1701: Generic Routing Encapsulation (GRE) + RFC 1702: Generic Routing Encapsulation over IPv4 networks + RFC 7676: IPv6 Support for Generic Routing Encapsulation (GRE)"; + } + + identity gre-v4 { + base gre; + description + "Transport is based on GRE over IPv4."; + reference + "RFC 1702: Generic Routing Encapsulation over IPv4 networks"; + } + + identity gre-v6 { + base gre; + description + "Transport is based on GRE over IPv6."; + reference + "RFC 7676: IPv6 Support for Generic Routing Encapsulation (GRE)"; + } + + identity vxlan-trans { + base protocol-type; + description + "Transport is based on VXLAN."; + reference + "RFC 7348: Virtual eXtensible Local Area Network (VXLAN): + A Framework for Overlaying Virtualized Layer 2 + Networks over Layer 3 Networks"; + } + + identity geneve { + base protocol-type; + description + "Transport is based on Generic Network Virtualization + Encapsulation (GENEVE)."; + reference + "RFC 8926: Geneve: Generic Network Virtualization Encapsulation"; + } + + identity ldp { + base protocol-type; + description + "Transport is based on LDP."; + reference + "RFC 5036: LDP Specification"; + } + + identity mpls-in-udp { + base protocol-type; + description + "Transport is MPLS in UDP."; + reference + "RFC 7510: Encapsulating MPLS in UDP"; + } + + identity sr { + base protocol-type; + description + "Transport is based on Segment Routing (SR)."; + reference + "RFC 8660: Segment Routing with the MPLS Data Plane + RFC 8663: MPLS Segment Routing over IP + RFC 8754: IPv6 Segment Routing Header (SRH)"; + } + + identity sr-mpls { + base sr; + description + "Transport is based on SR with MPLS."; + reference + "RFC 8660: Segment Routing with the MPLS Data Plane"; + } + + identity srv6 { + base sr; + description + "Transport is based on SR over IPv6."; + reference + "RFC 8754: IPv6 Segment Routing Header (SRH)"; + } + + identity sr-mpls-over-ip { + base sr; + description + "Transport is based on SR over MPLS over IP."; + reference + "RFC 8663: MPLS Segment Routing over IP"; + } + + identity rsvp-te { + base protocol-type; + description + "Transport setup relies upon RSVP-TE."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity bgp-lu { + base protocol-type; + description + "Transport setup relies upon BGP-LU."; + reference + "RFC 8277: Using BGP to Bind MPLS Labels to Address Prefixes"; + } + + identity unknown { + base protocol-type; + description + "Not known protocol type."; + } + + /* + * Identities related to encapsulations + */ + + identity encapsulation-type { + description + "Base identity for the encapsulation type."; + } + + identity priority-tagged { + base encapsulation-type; + description + "Priority-tagged interface."; + } + + identity dot1q { + if-feature "dot1q"; + base encapsulation-type; + description + "Dot1q encapsulation."; + } + + identity qinq { + if-feature "qinq"; + base encapsulation-type; + description + "QinQ encapsulation."; + } + + identity qinany { + if-feature "qinany"; + base encapsulation-type; + description + "QinAny encapsulation."; + } + identity vxlan { + if-feature "vxlan"; + base encapsulation-type; + description + "VxLAN encapsulation."; + } + + identity ethernet-type { + base encapsulation-type; + description + "Ethernet encapsulation type."; + } + + identity vlan-type { + base encapsulation-type; + description + "VLAN encapsulation type."; + } + + identity untagged-int { + base encapsulation-type; + description + "Untagged interface type."; + } + + identity tagged-int { + base encapsulation-type; + description + "Tagged interface type."; + } + + identity lag-int { + if-feature "lag-interface"; + base encapsulation-type; + description + "LAG interface type."; + } + + /* + * Identities related to VLAN Tag + */ + + identity tag-type { + description + "Base identity for the tag types."; + } + + identity c-vlan { + base tag-type; + description + "Indicates Customer VLAN (C-VLAN) tag, normally using + the 0x8100 Ethertype."; + } + + identity s-vlan { + base tag-type; + description + "Indicates Service VLAN (S-VLAN) tag."; + } + + identity s-c-vlan { + base tag-type; + description + "Uses both an S-VLAN tag and a C-VLAN tag."; + } + + /* + * Identities related to VXLAN + */ + + identity vxlan-peer-mode { + if-feature "vxlan"; + description + "Base identity for the VXLAN peer mode."; + } + + identity static-mode { + base vxlan-peer-mode; + description + "VXLAN access in the static mode."; + } + + identity bgp-mode { + base vxlan-peer-mode; + description + "VXLAN access by BGP EVPN learning."; + } + + /* + * Identities related to multicast + */ + + identity multicast-gp-address-mapping { + if-feature "multicast"; + description + "Base identity for multicast group mapping type."; + } + + identity static-mapping { + base multicast-gp-address-mapping; + description + "Static mapping, i.e., attach the interface to the + multicast group as a static member."; + } + + identity dynamic-mapping { + base multicast-gp-address-mapping; + description + "Dynamic mapping, i.e., an interface is added to the + multicast group as a result of snooping."; + } + + identity multicast-tree-type { + if-feature "multicast"; + description + "Base identity for multicast tree type."; + } + + identity ssm-tree-type { + base multicast-tree-type; + description + "Source-Specific Multicast (SSM) tree type."; + } + + identity asm-tree-type { + base multicast-tree-type; + description + "Any-Source Multicast (ASM) tree type."; + } + + identity bidir-tree-type { + base multicast-tree-type; + description + "Bidirectional tree type."; + } + + identity multicast-rp-discovery-type { + if-feature "multicast"; + description + "Base identity for Rendezvous Point (RP) discovery type."; + } + + identity auto-rp { + base multicast-rp-discovery-type; + description + "Auto-RP discovery type."; + } + + identity static-rp { + base multicast-rp-discovery-type; + description + "Static type."; + } + + identity bsr-rp { + base multicast-rp-discovery-type; + description + "Bootstrap Router (BSR) discovery type."; + } + + identity group-management-protocol { + if-feature "multicast"; + description + "Base identity for multicast group management protocol."; + } + + identity igmp-proto { + base group-management-protocol; + description + "IGMP."; + reference + "RFC 1112: Host Extensions for IP Multicasting + RFC 2236: Internet Group Management Protocol, Version 2 + RFC 3376: Internet Group Management Protocol, Version 3"; + } + + identity mld-proto { + base group-management-protocol; + description + "MLD."; + reference + "RFC 2710: Multicast Listener Discovery (MLD) for IPv6 + RFC 3810: Multicast Listener Discovery Version 2 (MLDv2) + for IPv6"; + } + + identity pim-proto { + if-feature "pim"; + base routing-protocol-type; + description + "PIM."; + reference + "RFC 7761: Protocol Independent Multicast - Sparse Mode + (PIM-SM): Protocol Specification (Revised)"; + } + + identity igmp-version { + if-feature "igmp"; + description + "Base identity for IGMP version."; + } + + identity igmpv1 { + base igmp-version; + description + "IGMPv1."; + reference + "RFC 1112: Host Extensions for IP Multicasting"; + } + + identity igmpv2 { + base igmp-version; + description + "IGMPv2."; + reference + "RFC 2236: Internet Group Management Protocol, Version 2"; + } + + identity igmpv3 { + base igmp-version; + description + "IGMPv3."; + reference + "RFC 3376: Internet Group Management Protocol, Version 3"; + } + + identity mld-version { + if-feature "mld"; + description + "Base identity for MLD version."; + } + + identity mldv1 { + base mld-version; + description + "MLDv1."; + reference + "RFC 2710: Multicast Listener Discovery (MLD) for IPv6"; + } + + identity mldv2 { + base mld-version; + description + "MLDv2."; + reference + "RFC 3810: Multicast Listener Discovery Version 2 (MLDv2) + for IPv6"; + } + + /* + * Identities related to traffic types + */ + + identity tf-type { + description + "Base identity for the traffic type."; + } + + identity multicast-traffic { + base tf-type; + description + "Multicast traffic."; + } + + identity broadcast-traffic { + base tf-type; + description + "Broadcast traffic."; + } + + identity unknown-unicast-traffic { + base tf-type; + description + "Unknown unicast traffic."; + } + + /* + * Identities related to customer applications + */ + + identity customer-application { + description + "Base identity for customer applications."; + } + + identity web { + base customer-application; + description + "Web applications (e.g., HTTP, HTTPS)."; + } + + identity mail { + base customer-application; + description + "Mail application."; + } + + identity file-transfer { + base customer-application; + description + "File transfer application (e.g., FTP, SFTP)."; + } + + identity database { + base customer-application; + description + "Database application."; + } + + identity social { + base customer-application; + description + "Social-network application."; + } + + identity games { + base customer-application; + description + "Gaming application."; + } + + identity p2p { + base customer-application; + description + "Peer-to-peer application."; + } + + identity network-management { + base customer-application; + description + "Management application (e.g., Telnet, syslog, + SNMP)."; + } + + identity voice { + base customer-application; + description + "Voice application."; + } + + identity video { + base customer-application; + description + "Video conference application."; + } + + identity embb { + base customer-application; + description + "Enhanced Mobile Broadband (eMBB) application. + Note that an eMBB application demands network performance with a + wide variety of characteristics, such as data rate, latency, + loss rate, reliability, and many other parameters."; + } + + identity urllc { + base customer-application; + description + "Ultra-Reliable and Low Latency Communications + (URLLC) application. Note that an URLLC application demands + network performance with a wide variety of characteristics, such + as latency, reliability, and many other parameters."; + } + + identity mmtc { + base customer-application; + description + "Massive Machine Type Communications (mMTC) application. + Note that an mMTC application demands network performance with + a wide variety of characteristics, such as data rate, latency, + loss rate, reliability, and many other parameters."; + } + + /* + * Identities related to service bundling + */ + + identity bundling-type { + description + "The base identity for the bundling type. It supports a subset or + all CE-VLANs associated with an L2VPN service."; + } + + identity multi-svc-bundling { + base bundling-type; + description + "Multi-service bundling, i.e., multiple C-VLAN IDs + can be associated with an L2VPN service at a site."; + } + + identity one2one-bundling { + base bundling-type; + description + "One-to-one service bundling, i.e., each L2VPN can + be associated with only one C-VLAN ID at a site."; + } + + identity all2one-bundling { + base bundling-type; + description + "All-to-one bundling, i.e., all C-VLAN IDs are mapped + to one L2VPN service."; + } + + /* + * Identities related to Ethernet Services + */ + + identity control-mode { + description + "Base Identity for the type of control mode on Layer 2 + Control Protocol (L2CP)."; + } + + identity peer { + base control-mode; + description + "'peer' mode, i.e., participate in the protocol towards the CE. + Peering is common for Link Aggregation Control Protocol (LACP) + and the Ethernet Local Management Interface (E-LMI) and, + occasionally, for Link Layer Discovery Protocol (LLDP). + For VPLSs and VPWSs, the subscriber can also request that the + peer service provider enables spanning tree."; + } + + identity tunnel { + base control-mode; + description + "'tunnel' mode, i.e., pass to the egress or destination site. For + Ethernet Private Lines (EPLs), the expectation is that L2CP + frames are tunnelled."; + } + identity discard { + base control-mode; + description + "'Discard' mode, i.e., discard the frame."; + } + + identity neg-mode { + description + "Base identity for the negotiation mode."; + } + + identity full-duplex { + base neg-mode; + description + "Full-duplex negotiation mode."; + } + + identity auto-neg { + base neg-mode; + description + "Auto-negotiation mode."; + } + + /******** Collection of VPN-related Types ********/ + + typedef vpn-id { + type string; + description + "Defines an identifier that is used with a VPN module. + This can be, for example, a service identifier, a node + identifier, etc."; + } + + /******* VPN-related reusable groupings *******/ + + grouping vpn-description { + description + "Provides common VPN information."; + leaf vpn-id { + type vpn-common:vpn-id; + description + "A VPN identifier that uniquely identifies a VPN. + This identifier has a local meaning, e.g., within + a service provider network."; + } + leaf vpn-name { + type string; + description + "Used to associate a name with the service + in order to facilitate the identification of + the service."; + } + leaf vpn-description { + type string; + description + "Textual description of a VPN."; + } + leaf customer-name { + type string; + description + "Name of the customer that actually uses the VPN."; + } + } + + grouping vpn-profile-cfg { + description + "Grouping for VPN Profile configuration."; + container valid-provider-identifiers { + description + "Container for valid provider profile identifiers."; + list external-connectivity-identifier { + if-feature "external-connectivity"; + key "id"; + description + "List for profile identifiers that uniquely identify profiles + governing how external connectivity is provided to a VPN. + A profile indicates the type of external connectivity + (Internet, cloud, etc.), the sites/nodes that are associated + with a connectivity profile, etc. A profile can also indicate + filtering rules and/or address translation rules. Such + features may involve PE, P, or dedicated nodes as a function + of the deployment."; + leaf id { + type string; + description + "Identification of an external connectivity profile. The + profile only has significance within the service provider's + administrative domain."; + } + } + list encryption-profile-identifier { + key "id"; + description + "List for encryption profile identifiers."; + leaf id { + type string; + description + "Identification of the encryption profile to be used. The + profile only has significance within the service provider's + administrative domain."; + } + } + list qos-profile-identifier { + key "id"; + description + "List for QoS Profile Identifiers."; + leaf id { + type string; + description + "Identification of the QoS profile to be used. The + profile only has significance within the service provider's + administrative domain."; + } + } + list bfd-profile-identifier { + key "id"; + description + "List for BFD profile identifiers."; + leaf id { + type string; + description + "Identification of the BFD profile to be used. The + profile only has significance within the service provider's + administrative domain."; + } + } + list forwarding-profile-identifier { + key "id"; + description + "List for forwarding profile identifiers."; + leaf id { + type string; + description + "Identification of the forwarding profile to be used. + The profile only has significance within the service + provider's administrative domain."; + } + } + list routing-profile-identifier { + key "id"; + description + "List for Routing Profile Identifiers."; + leaf id { + type string; + description + "Identification of the routing profile to be used by the + routing protocols within sites, vpn-network-accesses, or + vpn-nodes for refering VRF's import/export policies. + + The profile only has significance within the service + provider's administrative domain."; + } + } + nacm:default-deny-write; + } + } + + grouping oper-status-timestamp { + description + "This grouping defines some operational parameters for the + service."; + leaf status { + type identityref { + base operational-status; + } + config false; + description + "Operations status."; + } + leaf last-change { + type yang:date-and-time; + config false; + description + "Indicates the actual date and time of the service status + change."; + } + } + + grouping service-status { + description + "Service status grouping."; + container status { + description + "Service status."; + container admin-status { + description + "Administrative service status."; + leaf status { + type identityref { + base administrative-status; + } + description + "Administrative service status."; + } + leaf last-change { + type yang:date-and-time; + description + "Indicates the actual date and time of the service status + change."; + } + } + container oper-status { + description + "Operational service status."; + uses oper-status-timestamp; + } + } + } + + grouping underlay-transport { + description + "This grouping defines the type of underlay transport for the + VPN service or how that underlay is set. It can include an + identifier to an abstract transport instance to which the VPN + is grafted or indicate a technical implementation that is + expressed as an ordered list of protocols."; + choice type { + description + "A choice based on the type of underlay transport + constraints."; + case abstract { + description + "Indicates that the transport constraint is an abstract + concept."; + leaf transport-instance-id { + type string; + description + "An optional identifier of the abstract transport instance."; + } + leaf instance-type { + type identityref { + base transport-instance-type; + } + description + "Indicates a transport instance type. For example, it can + be a VPN+, an IETF network slice, a virtual network, etc."; + } + } + case protocol { + description + "Indicates a list of protocols."; + leaf-list protocol { + type identityref { + base protocol-type; + } + ordered-by user; + description + "A client ordered list of transport protocols."; + } + } + } + } + + grouping vpn-route-targets { + description + "A grouping that specifies Route Target (RT) import-export rules + used in a BGP-enabled VPN."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs) + RFC 4664: Framework for Layer 2 Virtual Private Networks + (L2VPNs)"; + list vpn-target { + key "id"; + description + "Route targets. AND/OR operations may be defined + based on the RTs assigment."; + leaf id { + type uint8; + description + "Identifies each VPN Target."; + } + list route-targets { + key "route-target"; + description + "List of RTs."; + leaf route-target { + type rt-types:route-target; + description + "Conveys an RT value."; + } + } + leaf route-target-type { + type rt-types:route-target-type; + mandatory true; + description + "Import/export type of the RT."; + } + } + container vpn-policies { + description + "VPN service policies. It contains references to the + import and export policies to be associated with the + VPN service."; + leaf import-policy { + type string; + description + "Identifies the 'import' policy."; + } + leaf export-policy { + type string; + description + "Identifies the 'export' policy."; + } + } + } + + grouping route-distinguisher { + description + "Grouping for route distinguisher (RD)."; + choice rd-choice { + description + "Route distinguisher choice between several options + on providing the route distinguisher value."; + case directly-assigned { + description + "Explicitly assign an RD value."; + leaf rd { + type rt-types:route-distinguisher; + description + "Indicates an RD value that is explicitly + assigned."; + } + } + case directly-assigned-suffix { + description + "The value of the Assigned Number subfield of the RD. + The Administrator subfield of the RD will be + based on other configuration information such as + router-id or ASN."; + leaf rd-suffix { + type uint16; + description + "Indicates the value of the Assigned Number + subfield that is explicitly assigned."; + } + } + case auto-assigned { + description + "The RD is auto-assigned."; + container rd-auto { + description + "The RD is auto-assigned."; + choice auto-mode { + description + "Indicates the auto-assignment mode. RD can be + automatically assigned with or without + indicating a pool from which the RD should be + taken. + + For both cases, the server will auto-assign an RD + value 'auto-assigned-rd' and use that value + operationally."; + case from-pool { + leaf rd-pool-name { + type string; + description + "The auto-assignment will be made from the pool + identified by the rd-pool-name."; + } + } + case full-auto { + leaf auto { + type empty; + description + "Indicates an RD is fully auto-assigned."; + } + } + } + leaf auto-assigned-rd { + type rt-types:route-distinguisher; + config false; + description + "The value of the auto-assigned RD."; + } + } + } + case auto-assigned-suffix { + description + "The value of the Assigned Number subfield will + be auto-assigned. The Administrator subfield + will be based on other configuration information such as + router-id or ASN."; + container rd-auto-suffix { + description + "The Assigned Number subfield is auto-assigned."; + choice auto-mode { + description + "Indicates the auto-assignment mode of the Assigned Number + subfield. This number can be automatically assigned + with or without indicating a pool from which the value + should be taken. + + For both cases, the server will auto-assign + 'auto-assigned-rd-suffix' and use that value to build + the RD that will be used operationally."; + case from-pool { + leaf rd-pool-name { + type string; + description + "The assignment will be made from the pool identified + by the rd-pool-name."; + } + } + case full-auto { + leaf auto { + type empty; + description + "Indicates that the Assigned Number is fully auto + assigned."; + } + } + } + leaf auto-assigned-rd-suffix { + type uint16; + config false; + description + "Includes the value of the Assigned Number subfield that + is auto-assigned ."; + } + } + } + case no-rd { + description + "Use the empty type to indicate RD has no value and is not to + be auto-assigned."; + leaf no-rd { + type empty; + description + "No RD is assigned."; + } + } + } + } + + grouping vpn-components-group { + description + "Grouping definition to assign group-ids to associate VPN nodes, + sites, or network accesses."; + container groups { + description + "Lists the groups to which a VPN node, a site, or a network + access belongs to."; + list group { + key "group-id"; + description + "List of group-ids."; + leaf group-id { + type string; + description + "Is the group-id to which a VPN node, a site, or a network + access belongs to."; + } + } + } + } + + grouping placement-constraints { + description + "Constraints for placing a network access."; + list constraint { + key "constraint-type"; + description + "List of constraints."; + leaf constraint-type { + type identityref { + base placement-diversity; + } + description + "Diversity constraint type."; + } + container target { + description + "The constraint will apply against this list of groups."; + choice target-flavor { + description + "Choice for the group definition."; + case id { + list group { + key "group-id"; + description + "List of groups."; + leaf group-id { + type string; + description + "The constraint will apply against this particular + group-id."; + } + } + } + case all-accesses { + leaf all-other-accesses { + type empty; + description + "The constraint will apply against all other network + accesses of a site."; + } + } + case all-groups { + leaf all-other-groups { + type empty; + description + "The constraint will apply against all other groups that + the customer is managing."; + } + } + } + } + } + } + + grouping ports { + description + "Choice of specifying a source or destination port numbers."; + choice source-port { + description + "Choice of specifying the source port or referring to a group + of source port numbers."; + container source-port-range-or-operator { + description + "Source port definition."; + uses packet-fields:port-range-or-operator; + } + } + choice destination-port { + description + "Choice of specifying a destination port or referring to a group + of destination port numbers."; + container destination-port-range-or-operator { + description + "Destination port definition."; + uses packet-fields:port-range-or-operator; + } + } + } + + grouping qos-classification-policy { + description + "Configuration of the traffic classification policy."; + list rule { + key "id"; + ordered-by user; + description + "List of marking rules."; + leaf id { + type string; + description + "An identifier of the QoS classification policy rule."; + } + choice match-type { + default "match-flow"; + description + "Choice for classification."; + case match-flow { + choice l3 { + description + "Either IPv4 or IPv6."; + container ipv4 { + description + "Rule set that matches IPv4 header."; + uses packet-fields:acl-ip-header-fields; + uses packet-fields:acl-ipv4-header-fields; + } + container ipv6 { + description + "Rule set that matches IPv6 header."; + uses packet-fields:acl-ip-header-fields; + uses packet-fields:acl-ipv6-header-fields; + } + } + choice l4 { + description + "Includes Layer 4 specific information. + This version focuses on TCP and UDP."; + container tcp { + description + "Rule set that matches TCP header."; + uses packet-fields:acl-tcp-header-fields; + uses ports; + } + container udp { + description + "Rule set that matches UDP header."; + uses packet-fields:acl-udp-header-fields; + uses ports; + } + } + } + case match-application { + leaf match-application { + type identityref { + base customer-application; + } + description + "Defines the application to match."; + } + } + } + leaf target-class-id { + if-feature "qos"; + type string; + description + "Identification of the class of service. This identifier is + internal to the administration."; + } + } + } +} diff --git a/src/nbi/tests/data/slice/post_connection_group_to_network_slice1.json b/src/nbi/tests/data/slice/post_connection_group_to_network_slice1.json new file mode 100644 index 000000000..a0c6e0def --- /dev/null +++ b/src/nbi/tests/data/slice/post_connection_group_to_network_slice1.json @@ -0,0 +1,66 @@ +{ + "connection-group": [ + { + "id": "line2", + "connectivity-type": "point-to-point", + "connectivity-construct": [ + { + "id": 1, + "p2mp-sender-sdp": "1", + "p2mp-receiver-sdp": [ + "3" + ], + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "10" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "5000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + }, + { + "id": 2, + "p2mp-sender-sdp": "3", + "p2mp-receiver-sdp": [ + "1" + ], + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "20" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "1000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/src/nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice1.json b/src/nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice1.json new file mode 100644 index 000000000..8d8c92a81 --- /dev/null +++ b/src/nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice1.json @@ -0,0 +1,40 @@ +{ + "match-criterion": [ + { + "index": 2, + "match-type": [ + { + "type": "ietf-nss ietf-network-slice-service:vlan", + "value": [ + "101" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.222/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + } + ], + "target-connection-group-id": "line2" + } + ] +} \ No newline at end of file diff --git a/src/nbi/tests/data/slice/post_network_slice1.json b/src/nbi/tests/data/slice/post_network_slice1.json new file mode 100644 index 000000000..568387712 --- /dev/null +++ b/src/nbi/tests/data/slice/post_network_slice1.json @@ -0,0 +1,194 @@ +{ + "network-slice-services": { + "slice-service": [ + { + "id": "slice1", + "description": "network slice 1, connect to VM1", + "sdps": { + "sdp": [ + { + "id": "1", + "node-id": "172.16.204.220", + "sdp-ip-address": [ + "172.16.204.220" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "101" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC POP to VM1", + "description": "AC VM1 connected to POP", + "ac-node-id": "172.16.204.220", + "ac-tp-id": "200" + } + ] + } + }, + { + "id": "2", + "node-id": "172.16.104.221", + "sdp-ip-address": [ + "172.16.104.221" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "101" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC POP to VM1", + "description": "AC VM1 connected to POP", + "ac-node-id": "172.16.104.221", + "ac-tp-id": "eth0" + } + ] + } + } + ] + }, + "connection-groups": { + "connection-group": [ + { + "id": "line1", + "connectivity-type": "point-to-point", + "connectivity-construct": [ + { + "id": 1, + "p2mp-sender-sdp": "1", + "p2mp-receiver-sdp": [ + "2" + ], + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "10" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "5000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + }, + { + "id": 2, + "p2mp-sender-sdp": "2", + "p2mp-receiver-sdp": [ + "1" + ], + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "20" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "1000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + } + ] + } + ] + } + } + ] + } +} \ No newline at end of file diff --git a/src/nbi/tests/data/slice/post_sdp_to_network_slice1.json b/src/nbi/tests/data/slice/post_sdp_to_network_slice1.json new file mode 100644 index 000000000..bd3895fc4 --- /dev/null +++ b/src/nbi/tests/data/slice/post_sdp_to_network_slice1.json @@ -0,0 +1,61 @@ +{ + "sdp": [ + { + "id": "3", + "node-id": "172.16.61.11", + "sdp-ip-address": [ + "172.16.61.11" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "21" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.222/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line2" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC ONT", + "description": "AC connected to PC2", + "ac-node-id": "172.16.61.11", + "ac-tp-id": "200" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/nbi/tests/test_slice_2.py b/src/nbi/tests/test_slice_2.py new file mode 100644 index 000000000..d25ba1cf5 --- /dev/null +++ b/src/nbi/tests/test_slice_2.py @@ -0,0 +1,100 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.proto.context_pb2 import SliceList +from context.client.ContextClient import ContextClient +from nbi.service.rest_server.nbi_plugins.ietf_network_slice.ietf_slice_handler import ( + IETFSliceHandler, +) + +context_client = ContextClient() + +with open("nbi/tests/data/slice/post_network_slice1.json", mode="r") as f: + post_slice_request = json.load(f) + +with open("nbi/tests/data/slice/post_sdp_to_network_slice1.json", mode="r") as f: + post_sdp_request = json.load(f) + +with open("nbi/tests/data/slice/post_connection_group_to_network_slice1.json", mode="r") as f: + post_connection_group_request = json.load(f) + +with open("nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice1.json", mode="r") as f: + post_match_criteria_request = json.load(f) + +slice_1 = None + +def select_slice(*args) -> SliceList: + slice_list = SliceList() + slice_list.slices.extend([slice_1]) + return slice_list + + +def test_create_slice(): + global slice_1 + + slice_1 = IETFSliceHandler.create_slice_service(post_slice_request) + ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) + assert ietf_data == post_slice_request + assert slice_1.slice_endpoint_ids[0].device_id.device_uuid.uuid == "172.16.204.220" + assert slice_1.slice_endpoint_ids[1].device_id.device_uuid.uuid == "172.16.104.221" + assert slice_1.slice_id.slice_uuid.uuid == "slice1" + + +def test_create_sdp(monkeypatch): + global slice_1 + + monkeypatch.setattr(context_client, "SelectSlice", select_slice) + + slice_1 = IETFSliceHandler.create_sdp(post_sdp_request, "slice1", context_client) + ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) + slice_services = ietf_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + slice_sdps = slice_service["sdps"]["sdp"] + assert len(slice_sdps) == 3 + + +def test_create_connection_group(monkeypatch): + global slice_1 + + monkeypatch.setattr(context_client, "SelectSlice", select_slice) + + slice_1 = IETFSliceHandler.create_connection_group(post_connection_group_request, "slice1", context_client) + ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) + slice_services = ietf_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + slice_connection_groups = slice_service["connection-groups"]["connection-group"] + + assert slice_connection_groups[0]['id'] == 'line1' + assert slice_connection_groups[1]['id'] == 'line2' + assert len(slice_connection_groups) == 2 + + +def test_create_match_criteria(monkeypatch): + global slice_1 + + monkeypatch.setattr(context_client, "SelectSlice", select_slice) + + slice_1 = IETFSliceHandler.create_match_criteria(post_match_criteria_request, "slice1", "1", context_client) + ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) + slice_services = ietf_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + slice_sdps = slice_service["sdps"]["sdp"] + sdp1_match_criteria = slice_sdps[0]['service-match-criteria']['match-criterion'] + assert len(sdp1_match_criteria) == 2 + assert sdp1_match_criteria[0]['target-connection-group-id'] == 'line1' + assert sdp1_match_criteria[1]['target-connection-group-id'] == 'line2' + assert slice_1.slice_endpoint_ids[0].device_id.device_uuid.uuid == "172.16.61.11" + assert slice_1.slice_endpoint_ids[1].device_id.device_uuid.uuid == "172.16.204.220" -- GitLab From e45fa0e01c39f3446b67544c5af21796cdf51aea Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 10 Dec 2024 12:29:47 +0100 Subject: [PATCH 058/463] enhancement: run_tests_locally-nbi-ietf-slice.sh added. --- scripts/run_tests_locally-nbi-ietf-slice.sh | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 scripts/run_tests_locally-nbi-ietf-slice.sh diff --git a/scripts/run_tests_locally-nbi-ietf-slice.sh b/scripts/run_tests_locally-nbi-ietf-slice.sh new file mode 100755 index 000000000..bf53f18b9 --- /dev/null +++ b/scripts/run_tests_locally-nbi-ietf-slice.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +PROJECTDIR=`pwd` + +cd $PROJECTDIR/src +RCFILE=$PROJECTDIR/coverage/.coveragerc + +# Run unitary tests and analyze coverage of code at same time +# helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0 +coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ + nbi/tests/test_slice_2.py -- GitLab From 5422959db1b94ed5aae8a228764ba76ce872af33 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 10 Dec 2024 17:46:44 +0000 Subject: [PATCH 059/463] Device component: - Updated paramiko dependency version --- src/device/requirements.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device/requirements.in b/src/device/requirements.in index c89303df3..e5ac64a64 100644 --- a/src/device/requirements.in +++ b/src/device/requirements.in @@ -30,7 +30,7 @@ ncclient==0.6.15 numpy<2.0.0 p4runtime==1.3.0 pandas==1.5.* -paramiko==2.9.2 +paramiko==2.11.* pyang==2.6.* git+https://github.com/robshakir/pyangbind.git python-json-logger==2.0.2 -- GitLab From f7ee688caeb5a7f7576031e0f7a617344bce0969 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 10 Dec 2024 17:49:18 +0000 Subject: [PATCH 060/463] WebUI component: - Persist Grafana settings between restarts --- manifests/webuiservice.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/manifests/webuiservice.yaml b/manifests/webuiservice.yaml index 4d3b7780c..5a321c33e 100644 --- a/manifests/webuiservice.yaml +++ b/manifests/webuiservice.yaml @@ -12,6 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: grafana-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -99,6 +110,13 @@ spec: limits: cpu: 500m memory: 1024Mi + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-pv + volumes: + - name: grafana-pv + persistentVolumeClaim: + claimName: grafana-pvc --- apiVersion: v1 kind: Service -- GitLab From 6015801e8a2e67f4873049e7f9a1b6119494071f Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 10 Dec 2024 17:53:01 +0000 Subject: [PATCH 061/463] Common framework: - Extended log messages of retry decorator to showcase method being retried --- src/common/tools/client/RetryDecorator.py | 41 ++++++++++++++++++----- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/src/common/tools/client/RetryDecorator.py b/src/common/tools/client/RetryDecorator.py index fc45d95c8..4750ff73a 100644 --- a/src/common/tools/client/RetryDecorator.py +++ b/src/common/tools/client/RetryDecorator.py @@ -51,24 +51,32 @@ LOGGER = logging.getLogger(__name__) def delay_linear(initial=0, increment=0, maximum=None): def compute(num_try): delay = initial + (num_try - 1) * increment - if maximum is not None: delay = max(delay, maximum) + if maximum is not None: + delay = max(delay, maximum) return delay return compute def delay_exponential(initial=1, increment=1, maximum=None): def compute(num_try): delay = initial * pow(increment, (num_try - 1)) - if maximum is not None: delay = max(delay, maximum) + if maximum is not None: + delay = max(delay, maximum) return delay return compute -def retry(max_retries=0, delay_function=delay_linear(initial=0, increment=0), - prepare_method_name=None, prepare_method_args=[], prepare_method_kwargs={}): +# pylint: disable=dangerous-default-value +def retry( + max_retries=0, delay_function=delay_linear(initial=0, increment=0), + prepare_method_name=None, prepare_method_args=list(), prepare_method_kwargs=dict() +): def _reconnect(func): def wrapper(self, *args, **kwargs): if prepare_method_name is not None: prepare_method = getattr(self, prepare_method_name, None) - if prepare_method is None: raise Exception('Prepare Method ({}) not found'.format(prepare_method_name)) + if prepare_method is None: + MSG = 'Prepare Method ({:s}) not found' + # pylint: disable=broad-exception-raised + raise Exception(MSG.format(prepare_method_name)) num_try, given_up = 0, False while not given_up: try: @@ -78,14 +86,29 @@ def retry(max_retries=0, delay_function=delay_linear(initial=0, increment=0), num_try += 1 given_up = num_try > max_retries - if given_up: raise Exception('Giving up... {:d} tries failed'.format(max_retries)) from e + if given_up: + MSG = '[{:s}:{:s}] Giving up... {:d} tries failed' + msg = MSG.format(func.__module__, func.__name__, max_retries) + # pylint: disable=broad-exception-raised + raise Exception(msg) from e if delay_function is not None: delay = delay_function(num_try) time.sleep(delay) - LOGGER.info('Retry {:d}/{:d} after {:f} seconds...'.format(num_try, max_retries, delay)) + MSG = '[{:s}:{:s}] Retry {:d}/{:d} after {:f} seconds...' + LOGGER.info(MSG.format( + func.__module__, func.__name__, num_try, max_retries, delay + )) else: - LOGGER.info('Retry {:d}/{:d} immediate...'.format(num_try, max_retries)) + MSG = '[{:s}:{:s}] Retry {:d}/{:d} immediate...' + LOGGER.info(MSG.format( + func.__module__, func.__name__, num_try, max_retries + )) - if prepare_method_name is not None: prepare_method(*prepare_method_args, **prepare_method_kwargs) + if prepare_method_name is not None: + MSG = '[{:s}:{:s}] Running prepare method...' + LOGGER.debug(MSG.format( + prepare_method.__module__, prepare_method.__name__ + )) + prepare_method(*prepare_method_args, **prepare_method_kwargs) return wrapper return _reconnect -- GitLab From 6f9c0bd2c998adfbf941bd9196b5a640c89f28c3 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 10 Dec 2024 17:55:39 +0000 Subject: [PATCH 062/463] Common framework: - Extend generic gRPC services to enable gRPC reflection - Add grpc-reflection dependency --- common_requirements.in | 1 + .../tools/service/GenericGrpcService.py | 19 ++++++++++++--- .../tools/service/GenericGrpcServiceAsync.py | 24 ++++++++++++++----- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/common_requirements.in b/common_requirements.in index e1bcad78b..b27726576 100644 --- a/common_requirements.in +++ b/common_requirements.in @@ -15,6 +15,7 @@ coverage==6.3 grpcio==1.47.* grpcio-health-checking==1.47.* +grpcio-reflection==1.47.* grpcio-tools==1.47.* grpclib==0.4.4 prettytable==3.5.0 diff --git a/src/common/tools/service/GenericGrpcService.py b/src/common/tools/service/GenericGrpcService.py index f29582fff..453309127 100644 --- a/src/common/tools/service/GenericGrpcService.py +++ b/src/common/tools/service/GenericGrpcService.py @@ -12,18 +12,21 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Optional, Union import grpc, logging from concurrent import futures +from typing import Any, List, Optional, Union from grpc_health.v1.health import HealthServicer, OVERALL_HEALTH from grpc_health.v1.health_pb2 import HealthCheckResponse from grpc_health.v1.health_pb2_grpc import add_HealthServicer_to_server +from grpc_reflection.v1alpha import reflection from common.Settings import get_grpc_bind_address, get_grpc_grace_period, get_grpc_max_workers class GenericGrpcService: def __init__( - self, bind_port : Union[str, int], bind_address : Optional[str] = None, max_workers : Optional[int] = None, - grace_period : Optional[int] = None, enable_health_servicer : bool = True, cls_name : str = __name__ + self, bind_port : Union[str, int], bind_address : Optional[str] = None, + max_workers : Optional[int] = None, grace_period : Optional[int] = None, + enable_health_servicer : bool = True, enable_reflection : bool = True, + cls_name : str = __name__ ) -> None: self.logger = logging.getLogger(cls_name) self.bind_port = bind_port @@ -31,6 +34,8 @@ class GenericGrpcService: self.max_workers = get_grpc_max_workers() if max_workers is None else max_workers self.grace_period = get_grpc_grace_period() if grace_period is None else grace_period self.enable_health_servicer = enable_health_servicer + self.enable_reflection = enable_reflection + self.reflection_service_names : List[str] = [reflection.SERVICE_NAME] self.endpoint = None self.health_servicer = None self.pool = None @@ -39,6 +44,11 @@ class GenericGrpcService: def install_servicers(self): pass + def add_reflection_service_name(self, service_descriptor : Any, service_name : str): + self.reflection_service_names.append( + service_descriptor.services_by_name[service_name].full_name + ) + def start(self): self.endpoint = '{:s}:{:s}'.format(str(self.bind_address), str(self.bind_port)) self.logger.info('Starting Service (tentative endpoint: {:s}, max_workers: {:s})...'.format( @@ -54,6 +64,9 @@ class GenericGrpcService: experimental_non_blocking=True, experimental_thread_pool=futures.ThreadPoolExecutor(max_workers=1)) add_HealthServicer_to_server(self.health_servicer, self.server) + if self.enable_reflection: + reflection.enable_server_reflection(self.reflection_service_names, self.server) + self.bind_port = self.server.add_insecure_port(self.endpoint) self.endpoint = '{:s}:{:s}'.format(str(self.bind_address), str(self.bind_port)) self.logger.info('Listening on {:s}...'.format(str(self.endpoint))) diff --git a/src/common/tools/service/GenericGrpcServiceAsync.py b/src/common/tools/service/GenericGrpcServiceAsync.py index 1d652deb7..551a3d568 100644 --- a/src/common/tools/service/GenericGrpcServiceAsync.py +++ b/src/common/tools/service/GenericGrpcServiceAsync.py @@ -12,19 +12,21 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Optional, Union -import grpc -import logging +import grpc, logging from concurrent import futures +from typing import Any, List, Optional, Union from grpc_health.v1.health import HealthServicer, OVERALL_HEALTH from grpc_health.v1.health_pb2 import HealthCheckResponse from grpc_health.v1.health_pb2_grpc import add_HealthServicer_to_server +from grpc_reflection.v1alpha import reflection from common.Settings import get_grpc_bind_address, get_grpc_grace_period, get_grpc_max_workers class GenericGrpcServiceAsync: def __init__( - self, bind_port: Union[str, int], bind_address: Optional[str] = None, max_workers: Optional[int] = None, - grace_period: Optional[int] = None, enable_health_servicer: bool = True, cls_name: str = __name__ + self, bind_port : Union[str, int], bind_address : Optional[str] = None, + max_workers : Optional[int] = None, grace_period : Optional[int] = None, + enable_health_servicer : bool = True, enable_reflection : bool = True, + cls_name : str = __name__ ) -> None: self.logger = logging.getLogger(cls_name) self.bind_port = bind_port @@ -32,6 +34,8 @@ class GenericGrpcServiceAsync: self.max_workers = get_grpc_max_workers() if max_workers is None else max_workers self.grace_period = get_grpc_grace_period() if grace_period is None else grace_period self.enable_health_servicer = enable_health_servicer + self.enable_reflection = enable_reflection + self.reflection_service_names : List[str] = [reflection.SERVICE_NAME] self.endpoint = None self.health_servicer = None self.pool = None @@ -40,7 +44,12 @@ class GenericGrpcServiceAsync: async def install_servicers(self): pass - async def start(self): + def add_reflection_service_name(self, service_descriptor : Any, service_name : str): + self.reflection_service_names.append( + service_descriptor.services_by_name[service_name].full_name + ) + + def start(self): self.endpoint = '{:s}:{:s}'.format(str(self.bind_address), str(self.bind_port)) self.logger.info('Starting Service (tentative endpoint: {:s}, max_workers: {:s})...'.format( str(self.endpoint), str(self.max_workers))) @@ -55,6 +64,9 @@ class GenericGrpcServiceAsync: experimental_non_blocking=True, experimental_thread_pool=futures.ThreadPoolExecutor(max_workers=1)) add_HealthServicer_to_server(self.health_servicer, self.server) + if self.enable_reflection: + reflection.enable_server_reflection(self.reflection_service_names, self.server) + self.bind_port = self.server.add_insecure_port(self.endpoint) self.endpoint = '{:s}:{:s}'.format(str(self.bind_address), str(self.bind_port)) self.logger.info('Listening on {:s}...'.format(str(self.endpoint))) -- GitLab From 146e07b031f25cad9c9e2947aba61a67b6274f24 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 10 Dec 2024 17:56:30 +0000 Subject: [PATCH 063/463] Core components: - Enabled gRPC Reflection - Added scripts to inspect core gRPC components --- scripts/grpcurl_inspect_context.sh | 44 +++++++++++++++++++ scripts/grpcurl_inspect_device.sh | 44 +++++++++++++++++++ scripts/grpcurl_inspect_pathcomp_frontend.sh | 44 +++++++++++++++++++ scripts/grpcurl_inspect_service.sh | 44 +++++++++++++++++++ scripts/grpcurl_inspect_slice.sh | 44 +++++++++++++++++++ src/context/service/ContextService.py | 5 +++ src/device/service/DeviceService.py | 6 ++- .../service/E2EOrchestratorService.py | 12 +++-- src/forecaster/service/ForecasterService.py | 3 ++ .../frontend/service/PathCompService.py | 5 ++- src/service/service/ServiceService.py | 3 ++ src/slice/service/SliceService.py | 5 ++- src/vnt_manager/service/VNTManagerService.py | 12 +++-- 13 files changed, 254 insertions(+), 17 deletions(-) create mode 100755 scripts/grpcurl_inspect_context.sh create mode 100755 scripts/grpcurl_inspect_device.sh create mode 100755 scripts/grpcurl_inspect_pathcomp_frontend.sh create mode 100755 scripts/grpcurl_inspect_service.sh create mode 100755 scripts/grpcurl_inspect_slice.sh diff --git a/scripts/grpcurl_inspect_context.sh b/scripts/grpcurl_inspect_context.sh new file mode 100755 index 000000000..dda920a7a --- /dev/null +++ b/scripts/grpcurl_inspect_context.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +# Ref: https://github.com/fullstorydev/grpcurl + +source tfs_runtime_env_vars.sh + +GRPC_ENDPOINT="$CONTEXTSERVICE_SERVICE_HOST:$CONTEXTSERVICE_SERVICE_PORT_GRPC" +GRP_CURL_CMD="docker run fullstorydev/grpcurl --plaintext $GRPC_ENDPOINT" + +GRPC_SERVICES=`$GRP_CURL_CMD list` +echo "gRPC Services found in $GRPC_ENDPOINT:" +printf "\n" + +for GRPC_SERVICE in $GRPC_SERVICES; do + echo "gRPC Service: $GRPC_SERVICE" + $GRP_CURL_CMD describe $GRPC_SERVICE + printf "\n" +done + +echo "Done!" diff --git a/scripts/grpcurl_inspect_device.sh b/scripts/grpcurl_inspect_device.sh new file mode 100755 index 000000000..0e1202fb6 --- /dev/null +++ b/scripts/grpcurl_inspect_device.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +# Ref: https://github.com/fullstorydev/grpcurl + +source tfs_runtime_env_vars.sh + +GRPC_ENDPOINT="$DEVICESERVICE_SERVICE_HOST:$DEVICESERVICE_SERVICE_PORT_GRPC" +GRP_CURL_CMD="docker run fullstorydev/grpcurl --plaintext $GRPC_ENDPOINT" + +GRPC_SERVICES=`$GRP_CURL_CMD list` +echo "gRPC Services found in $GRPC_ENDPOINT:" +printf "\n" + +for GRPC_SERVICE in $GRPC_SERVICES; do + echo "gRPC Service: $GRPC_SERVICE" + $GRP_CURL_CMD describe $GRPC_SERVICE + printf "\n" +done + +echo "Done!" diff --git a/scripts/grpcurl_inspect_pathcomp_frontend.sh b/scripts/grpcurl_inspect_pathcomp_frontend.sh new file mode 100755 index 000000000..686f7ae1e --- /dev/null +++ b/scripts/grpcurl_inspect_pathcomp_frontend.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +# Ref: https://github.com/fullstorydev/grpcurl + +source tfs_runtime_env_vars.sh + +GRPC_ENDPOINT="$PATHCOMPSERVICE_SERVICE_HOST:$PATHCOMPSERVICE_SERVICE_PORT_GRPC" +GRP_CURL_CMD="docker run fullstorydev/grpcurl --plaintext $GRPC_ENDPOINT" + +GRPC_SERVICES=`$GRP_CURL_CMD list` +echo "gRPC Services found in $GRPC_ENDPOINT:" +printf "\n" + +for GRPC_SERVICE in $GRPC_SERVICES; do + echo "gRPC Service: $GRPC_SERVICE" + $GRP_CURL_CMD describe $GRPC_SERVICE + printf "\n" +done + +echo "Done!" diff --git a/scripts/grpcurl_inspect_service.sh b/scripts/grpcurl_inspect_service.sh new file mode 100755 index 000000000..f1b674ee5 --- /dev/null +++ b/scripts/grpcurl_inspect_service.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +# Ref: https://github.com/fullstorydev/grpcurl + +source tfs_runtime_env_vars.sh + +GRPC_ENDPOINT="$SERVICESERVICE_SERVICE_HOST:$SERVICESERVICE_SERVICE_PORT_GRPC" +GRP_CURL_CMD="docker run fullstorydev/grpcurl --plaintext $GRPC_ENDPOINT" + +GRPC_SERVICES=`$GRP_CURL_CMD list` +echo "gRPC Services found in $GRPC_ENDPOINT:" +printf "\n" + +for GRPC_SERVICE in $GRPC_SERVICES; do + echo "gRPC Service: $GRPC_SERVICE" + $GRP_CURL_CMD describe $GRPC_SERVICE + printf "\n" +done + +echo "Done!" diff --git a/scripts/grpcurl_inspect_slice.sh b/scripts/grpcurl_inspect_slice.sh new file mode 100755 index 000000000..170be7bf5 --- /dev/null +++ b/scripts/grpcurl_inspect_slice.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +# Ref: https://github.com/fullstorydev/grpcurl + +source tfs_runtime_env_vars.sh + +GRPC_ENDPOINT="$SLICESERVICE_SERVICE_HOST:$SLICESERVICE_SERVICE_PORT_GRPC" +GRP_CURL_CMD="docker run fullstorydev/grpcurl --plaintext $GRPC_ENDPOINT" + +GRPC_SERVICES=`$GRP_CURL_CMD list` +echo "gRPC Services found in $GRPC_ENDPOINT:" +printf "\n" + +for GRPC_SERVICE in $GRPC_SERVICES; do + echo "gRPC Service: $GRPC_SERVICE" + $GRP_CURL_CMD describe $GRPC_SERVICE + printf "\n" +done + +echo "Done!" diff --git a/src/context/service/ContextService.py b/src/context/service/ContextService.py index a385f4481..d633dea15 100644 --- a/src/context/service/ContextService.py +++ b/src/context/service/ContextService.py @@ -16,7 +16,9 @@ import logging, sqlalchemy from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc from common.message_broker.MessageBroker import MessageBroker +from common.proto.context_pb2 import DESCRIPTOR as CONTEXT_DESCRIPTOR from common.proto.context_pb2_grpc import add_ContextServiceServicer_to_server +from common.proto.context_policy_pb2 import DESCRIPTOR as CONTEXT_POLICY_DESCRIPTOR from common.proto.context_policy_pb2_grpc import add_ContextPolicyServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from .ContextServiceServicerImpl import ContextServiceServicerImpl @@ -36,3 +38,6 @@ class ContextService(GenericGrpcService): def install_servicers(self): add_ContextServiceServicer_to_server(self.context_servicer, self.server) add_ContextPolicyServiceServicer_to_server(self.context_servicer, self.server) + + self.add_reflection_service_name(CONTEXT_DESCRIPTOR, 'ContextService') + self.add_reflection_service_name(CONTEXT_POLICY_DESCRIPTOR, 'ContextPolicyService') diff --git a/src/device/service/DeviceService.py b/src/device/service/DeviceService.py index a94259471..a5a48e1bf 100644 --- a/src/device/service/DeviceService.py +++ b/src/device/service/DeviceService.py @@ -12,10 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc +from common.proto.device_pb2 import DESCRIPTOR as DEVICE_DESCRIPTOR from common.proto.device_pb2_grpc import add_DeviceServiceServicer_to_server +from common.proto.optical_device_pb2 import DESCRIPTOR as OPTICAL_DEVICE_DESCRIPTOR from common.proto.optical_device_pb2_grpc import add_OpenConfigServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from device.Config import LOAD_ALL_DEVICE_DRIVERS @@ -41,8 +42,11 @@ class DeviceService(GenericGrpcService): def install_servicers(self): self.monitoring_loops.start() add_DeviceServiceServicer_to_server(self.device_servicer, self.server) + self.add_reflection_service_name(DEVICE_DESCRIPTOR, 'DeviceService') + if LOAD_ALL_DEVICE_DRIVERS: add_OpenConfigServiceServicer_to_server(self.openconfig_device_servicer,self.server) + self.add_reflection_service_name(OPTICAL_DEVICE_DESCRIPTOR, 'OpenConfigService') def stop(self): super().stop() diff --git a/src/e2e_orchestrator/service/E2EOrchestratorService.py b/src/e2e_orchestrator/service/E2EOrchestratorService.py index 9fa7bf4bd..3abef2777 100644 --- a/src/e2e_orchestrator/service/E2EOrchestratorService.py +++ b/src/e2e_orchestrator/service/E2EOrchestratorService.py @@ -12,19 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging - from common.Constants import ServiceNameEnum -from common.proto.e2eorchestrator_pb2_grpc import add_E2EOrchestratorServiceServicer_to_server from common.Settings import get_service_port_grpc +from common.proto.e2eorchestrator_pb2 import DESCRIPTOR as E2EORCHESTRATOR_DESCRIPTOR +from common.proto.e2eorchestrator_pb2_grpc import add_E2EOrchestratorServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from .E2EOrchestratorServiceServicerImpl import E2EOrchestratorServiceServicerImpl -LOGGER = logging.getLogger(__name__) - - class E2EOrchestratorService(GenericGrpcService): - def __init__(self, cls_name: str = __name__): + def __init__(self, cls_name: str = __name__) -> None: port = get_service_port_grpc(ServiceNameEnum.E2EORCHESTRATOR) super().__init__(port, cls_name=cls_name) self.e2eorchestrator_servicer = E2EOrchestratorServiceServicerImpl() @@ -33,3 +29,5 @@ class E2EOrchestratorService(GenericGrpcService): add_E2EOrchestratorServiceServicer_to_server( self.e2eorchestrator_servicer, self.server ) + + self.add_reflection_service_name(E2EORCHESTRATOR_DESCRIPTOR, 'E2EOrchestratorService') diff --git a/src/forecaster/service/ForecasterService.py b/src/forecaster/service/ForecasterService.py index 5f540cdc5..fedb5242d 100644 --- a/src/forecaster/service/ForecasterService.py +++ b/src/forecaster/service/ForecasterService.py @@ -14,6 +14,7 @@ from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc +from common.proto.forecaster_pb2 import DESCRIPTOR as FORECASTER_DESCRIPTOR from common.proto.forecaster_pb2_grpc import add_ForecasterServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from .ForecasterServiceServicerImpl import ForecasterServiceServicerImpl @@ -26,3 +27,5 @@ class ForecasterService(GenericGrpcService): def install_servicers(self): add_ForecasterServiceServicer_to_server(self.forecaster_servicer, self.server) + + self.add_reflection_service_name(FORECASTER_DESCRIPTOR, 'ForecasterService') diff --git a/src/pathcomp/frontend/service/PathCompService.py b/src/pathcomp/frontend/service/PathCompService.py index c19e59e77..6e413c14e 100644 --- a/src/pathcomp/frontend/service/PathCompService.py +++ b/src/pathcomp/frontend/service/PathCompService.py @@ -14,8 +14,9 @@ from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc -from common.tools.service.GenericGrpcService import GenericGrpcService +from common.proto.pathcomp_pb2 import DESCRIPTOR as PATHCOMP_DESCRIPTOR from common.proto.pathcomp_pb2_grpc import add_PathCompServiceServicer_to_server +from common.tools.service.GenericGrpcService import GenericGrpcService from .PathCompServiceServicerImpl import PathCompServiceServicerImpl class PathCompService(GenericGrpcService): @@ -26,3 +27,5 @@ class PathCompService(GenericGrpcService): def install_servicers(self): add_PathCompServiceServicer_to_server(self.pathcomp_servicer, self.server) + + self.add_reflection_service_name(PATHCOMP_DESCRIPTOR, 'PathCompService') diff --git a/src/service/service/ServiceService.py b/src/service/service/ServiceService.py index b99826e5b..e088a99eb 100644 --- a/src/service/service/ServiceService.py +++ b/src/service/service/ServiceService.py @@ -14,6 +14,7 @@ from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc +from common.proto.service_pb2 import DESCRIPTOR as SERVICE_DESCRIPTOR from common.proto.service_pb2_grpc import add_ServiceServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from .ServiceServiceServicerImpl import ServiceServiceServicerImpl @@ -27,3 +28,5 @@ class ServiceService(GenericGrpcService): def install_servicers(self): add_ServiceServiceServicer_to_server(self.service_servicer, self.server) + + self.add_reflection_service_name(SERVICE_DESCRIPTOR, 'ServiceService') diff --git a/src/slice/service/SliceService.py b/src/slice/service/SliceService.py index dc2584f82..ac4e80976 100644 --- a/src/slice/service/SliceService.py +++ b/src/slice/service/SliceService.py @@ -14,9 +14,10 @@ from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc +from common.proto.slice_pb2 import DESCRIPTOR as SLICE_DESCRIPTOR from common.proto.slice_pb2_grpc import add_SliceServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService -from slice.service.SliceServiceServicerImpl import SliceServiceServicerImpl +from .SliceServiceServicerImpl import SliceServiceServicerImpl class SliceService(GenericGrpcService): def __init__(self, cls_name: str = __name__) -> None: @@ -26,3 +27,5 @@ class SliceService(GenericGrpcService): def install_servicers(self): add_SliceServiceServicer_to_server(self.slice_servicer, self.server) + + self.add_reflection_service_name(SLICE_DESCRIPTOR, 'SliceService') diff --git a/src/vnt_manager/service/VNTManagerService.py b/src/vnt_manager/service/VNTManagerService.py index b95ad089a..3f44c4a51 100644 --- a/src/vnt_manager/service/VNTManagerService.py +++ b/src/vnt_manager/service/VNTManagerService.py @@ -12,19 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging - from common.Constants import ServiceNameEnum -from common.proto.vnt_manager_pb2_grpc import add_VNTManagerServiceServicer_to_server from common.Settings import get_service_port_grpc +from common.proto.vnt_manager_pb2 import DESCRIPTOR as VNT_MANAGER_DESCRIPTOR +from common.proto.vnt_manager_pb2_grpc import add_VNTManagerServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from .VNTManagerServiceServicerImpl import VNTManagerServiceServicerImpl -LOGGER = logging.getLogger(__name__) - - class VNTManagerService(GenericGrpcService): - def __init__(self, cls_name: str = __name__): + def __init__(self, cls_name: str = __name__) -> None: port = get_service_port_grpc(ServiceNameEnum.VNTMANAGER) super().__init__(port, cls_name=cls_name) self.vntmanager_servicer = VNTManagerServiceServicerImpl() @@ -33,3 +29,5 @@ class VNTManagerService(GenericGrpcService): add_VNTManagerServiceServicer_to_server( self.vntmanager_servicer, self.server ) + + self.add_reflection_service_name(VNT_MANAGER_DESCRIPTOR, 'VNTManagerService') -- GitLab From 8dc71c82b980758ba2252ecc27c6949877d1f347 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 10 Dec 2024 18:03:14 +0000 Subject: [PATCH 064/463] Manifests: - Recovered log levels --- manifests/deviceservice.yaml | 2 +- manifests/pathcompservice.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/deviceservice.yaml b/manifests/deviceservice.yaml index ef5195eae..950b98442 100644 --- a/manifests/deviceservice.yaml +++ b/manifests/deviceservice.yaml @@ -39,7 +39,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "DEBUG" + value: "INFO" startupProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:2020"] diff --git a/manifests/pathcompservice.yaml b/manifests/pathcompservice.yaml index b6f969bf4..0cac6cc18 100644 --- a/manifests/pathcompservice.yaml +++ b/manifests/pathcompservice.yaml @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "DEBUG" + value: "INFO" - name: ENABLE_FORECASTER value: "NO" readinessProbe: -- GitLab From 91c08bde8af7b0962949a5e1034a9e1570395a27 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 10 Dec 2024 18:04:08 +0000 Subject: [PATCH 065/463] Re-enabled CI/CD unitary tests --- .gitlab-ci.yml | 66 +++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25dcab336..2fe405733 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,39 +21,39 @@ stages: # include the individual .gitlab-ci.yml of each micro-service and tests include: -# #- local: '/manifests/.gitlab-ci.yml' -# - local: '/src/monitoring/.gitlab-ci.yml' -# - local: '/src/nbi/.gitlab-ci.yml' -# - local: '/src/context/.gitlab-ci.yml' -# - local: '/src/device/.gitlab-ci.yml' -# - local: '/src/service/.gitlab-ci.yml' -# - local: '/src/dbscanserving/.gitlab-ci.yml' -# - local: '/src/opticalattackmitigator/.gitlab-ci.yml' -# - local: '/src/opticalattackdetector/.gitlab-ci.yml' -# - local: '/src/opticalattackmanager/.gitlab-ci.yml' -# - local: '/src/opticalcontroller/.gitlab-ci.yml' -# - local: '/src/ztp/.gitlab-ci.yml' -# - local: '/src/policy/.gitlab-ci.yml' -# - local: '/src/automation/.gitlab-ci.yml' -# - local: '/src/forecaster/.gitlab-ci.yml' -# #- local: '/src/webui/.gitlab-ci.yml' -# #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' -# #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' -# #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' -# - local: '/src/slice/.gitlab-ci.yml' -# #- local: '/src/interdomain/.gitlab-ci.yml' -# - local: '/src/pathcomp/.gitlab-ci.yml' -# #- local: '/src/dlt/.gitlab-ci.yml' -# - local: '/src/load_generator/.gitlab-ci.yml' -# - local: '/src/bgpls_speaker/.gitlab-ci.yml' -# - local: '/src/kpi_manager/.gitlab-ci.yml' -# - local: '/src/kpi_value_api/.gitlab-ci.yml' -# - local: '/src/kpi_value_writer/.gitlab-ci.yml' -# - local: '/src/telemetry/.gitlab-ci.yml' -# - local: '/src/analytics/.gitlab-ci.yml' -# - local: '/src/qos_profile/.gitlab-ci.yml' -# - local: '/src/vnt_manager/.gitlab-ci.yml' -# - local: '/src/e2e_orchestrator/.gitlab-ci.yml' + #- local: '/manifests/.gitlab-ci.yml' + - local: '/src/monitoring/.gitlab-ci.yml' + - local: '/src/nbi/.gitlab-ci.yml' + - local: '/src/context/.gitlab-ci.yml' + - local: '/src/device/.gitlab-ci.yml' + - local: '/src/service/.gitlab-ci.yml' + - local: '/src/dbscanserving/.gitlab-ci.yml' + - local: '/src/opticalattackmitigator/.gitlab-ci.yml' + - local: '/src/opticalattackdetector/.gitlab-ci.yml' + - local: '/src/opticalattackmanager/.gitlab-ci.yml' + - local: '/src/opticalcontroller/.gitlab-ci.yml' + - local: '/src/ztp/.gitlab-ci.yml' + - local: '/src/policy/.gitlab-ci.yml' + - local: '/src/automation/.gitlab-ci.yml' + - local: '/src/forecaster/.gitlab-ci.yml' + #- local: '/src/webui/.gitlab-ci.yml' + #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' + #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' + #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' + - local: '/src/slice/.gitlab-ci.yml' + #- local: '/src/interdomain/.gitlab-ci.yml' + - local: '/src/pathcomp/.gitlab-ci.yml' + #- local: '/src/dlt/.gitlab-ci.yml' + - local: '/src/load_generator/.gitlab-ci.yml' + - local: '/src/bgpls_speaker/.gitlab-ci.yml' + - local: '/src/kpi_manager/.gitlab-ci.yml' + - local: '/src/kpi_value_api/.gitlab-ci.yml' + - local: '/src/kpi_value_writer/.gitlab-ci.yml' + - local: '/src/telemetry/.gitlab-ci.yml' + - local: '/src/analytics/.gitlab-ci.yml' + - local: '/src/qos_profile/.gitlab-ci.yml' + - local: '/src/vnt_manager/.gitlab-ci.yml' + - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' -- GitLab From c8e6fd417df741da034aa973bbdfb2e7ea130664 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 11 Dec 2024 11:44:28 +0000 Subject: [PATCH 066/463] Manifests: - Enabled DEBUG on Device and Service to isolate issue --- manifests/deviceservice.yaml | 2 +- manifests/serviceservice.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/deviceservice.yaml b/manifests/deviceservice.yaml index 950b98442..ef5195eae 100644 --- a/manifests/deviceservice.yaml +++ b/manifests/deviceservice.yaml @@ -39,7 +39,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" + value: "DEBUG" startupProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:2020"] diff --git a/manifests/serviceservice.yaml b/manifests/serviceservice.yaml index aa94e4269..72c3015b3 100644 --- a/manifests/serviceservice.yaml +++ b/manifests/serviceservice.yaml @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" + value: "DEBUG" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:3030"] -- GitLab From 0c0611e73c2e5421019b2ec2004c813982024a2d Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 11 Dec 2024 11:45:56 +0000 Subject: [PATCH 067/463] Disabled working CI/CD tests temporarily for debugging EuCNC24 --- .gitlab-ci.yml | 66 ++++++++++++++++++++-------------------- src/tests/.gitlab-ci.yml | 14 ++++----- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2fe405733..25dcab336 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,39 +21,39 @@ stages: # include the individual .gitlab-ci.yml of each micro-service and tests include: - #- local: '/manifests/.gitlab-ci.yml' - - local: '/src/monitoring/.gitlab-ci.yml' - - local: '/src/nbi/.gitlab-ci.yml' - - local: '/src/context/.gitlab-ci.yml' - - local: '/src/device/.gitlab-ci.yml' - - local: '/src/service/.gitlab-ci.yml' - - local: '/src/dbscanserving/.gitlab-ci.yml' - - local: '/src/opticalattackmitigator/.gitlab-ci.yml' - - local: '/src/opticalattackdetector/.gitlab-ci.yml' - - local: '/src/opticalattackmanager/.gitlab-ci.yml' - - local: '/src/opticalcontroller/.gitlab-ci.yml' - - local: '/src/ztp/.gitlab-ci.yml' - - local: '/src/policy/.gitlab-ci.yml' - - local: '/src/automation/.gitlab-ci.yml' - - local: '/src/forecaster/.gitlab-ci.yml' - #- local: '/src/webui/.gitlab-ci.yml' - #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' - - local: '/src/slice/.gitlab-ci.yml' - #- local: '/src/interdomain/.gitlab-ci.yml' - - local: '/src/pathcomp/.gitlab-ci.yml' - #- local: '/src/dlt/.gitlab-ci.yml' - - local: '/src/load_generator/.gitlab-ci.yml' - - local: '/src/bgpls_speaker/.gitlab-ci.yml' - - local: '/src/kpi_manager/.gitlab-ci.yml' - - local: '/src/kpi_value_api/.gitlab-ci.yml' - - local: '/src/kpi_value_writer/.gitlab-ci.yml' - - local: '/src/telemetry/.gitlab-ci.yml' - - local: '/src/analytics/.gitlab-ci.yml' - - local: '/src/qos_profile/.gitlab-ci.yml' - - local: '/src/vnt_manager/.gitlab-ci.yml' - - local: '/src/e2e_orchestrator/.gitlab-ci.yml' +# #- local: '/manifests/.gitlab-ci.yml' +# - local: '/src/monitoring/.gitlab-ci.yml' +# - local: '/src/nbi/.gitlab-ci.yml' +# - local: '/src/context/.gitlab-ci.yml' +# - local: '/src/device/.gitlab-ci.yml' +# - local: '/src/service/.gitlab-ci.yml' +# - local: '/src/dbscanserving/.gitlab-ci.yml' +# - local: '/src/opticalattackmitigator/.gitlab-ci.yml' +# - local: '/src/opticalattackdetector/.gitlab-ci.yml' +# - local: '/src/opticalattackmanager/.gitlab-ci.yml' +# - local: '/src/opticalcontroller/.gitlab-ci.yml' +# - local: '/src/ztp/.gitlab-ci.yml' +# - local: '/src/policy/.gitlab-ci.yml' +# - local: '/src/automation/.gitlab-ci.yml' +# - local: '/src/forecaster/.gitlab-ci.yml' +# #- local: '/src/webui/.gitlab-ci.yml' +# #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' +# #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' +# #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' +# - local: '/src/slice/.gitlab-ci.yml' +# #- local: '/src/interdomain/.gitlab-ci.yml' +# - local: '/src/pathcomp/.gitlab-ci.yml' +# #- local: '/src/dlt/.gitlab-ci.yml' +# - local: '/src/load_generator/.gitlab-ci.yml' +# - local: '/src/bgpls_speaker/.gitlab-ci.yml' +# - local: '/src/kpi_manager/.gitlab-ci.yml' +# - local: '/src/kpi_value_api/.gitlab-ci.yml' +# - local: '/src/kpi_value_writer/.gitlab-ci.yml' +# - local: '/src/telemetry/.gitlab-ci.yml' +# - local: '/src/analytics/.gitlab-ci.yml' +# - local: '/src/qos_profile/.gitlab-ci.yml' +# - local: '/src/vnt_manager/.gitlab-ci.yml' +# - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index fdc86805b..8d2e51fee 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -14,11 +14,11 @@ # include the individual .gitlab-ci.yml of each end-to-end integration test include: - - local: '/src/tests/ofc22/.gitlab-ci.yml' - #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' - - local: '/src/tests/ecoc22/.gitlab-ci.yml' - #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' - #- local: '/src/tests/ofc23/.gitlab-ci.yml' - - local: '/src/tests/ofc24/.gitlab-ci.yml' +# - local: '/src/tests/ofc22/.gitlab-ci.yml' +# #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' +# - local: '/src/tests/ecoc22/.gitlab-ci.yml' +# #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' +# #- local: '/src/tests/ofc23/.gitlab-ci.yml' +# - local: '/src/tests/ofc24/.gitlab-ci.yml' - local: '/src/tests/eucnc24/.gitlab-ci.yml' - #- local: '/src/tests/ecoc24/.gitlab-ci.yml' +# #- local: '/src/tests/ecoc24/.gitlab-ci.yml' -- GitLab From a268364cf1b176ef7246caac881baf51656c34c6 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 11 Dec 2024 11:47:17 +0000 Subject: [PATCH 068/463] Fixed EuCNC24 test: - Updated Clab IP addresses - Fixed endpoints in IETF L3VPN service - Added correctness test for pings --- src/tests/eucnc24/.gitlab-ci.yml | 46 +++++++++++++++---- src/tests/eucnc24/clab/eucnc24.clab.yml | 4 +- .../eucnc24/data/ietf-l3vpn-service.json | 4 +- 3 files changed, 40 insertions(+), 14 deletions(-) diff --git a/src/tests/eucnc24/.gitlab-ci.yml b/src/tests/eucnc24/.gitlab-ci.yml index 8c5e9f20b..0225203b3 100644 --- a/src/tests/eucnc24/.gitlab-ci.yml +++ b/src/tests/eucnc24/.gitlab-ci.yml @@ -127,11 +127,24 @@ end2end_test eucnc24: $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-tfs-create.sh # Run end-to-end test: test connectivity with ping - - sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10' - - sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1' - - sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1' - - sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10' - - sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10' + - TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10') + - echo $TEST1_10 + - echo $TEST1_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1') + - echo $TEST1_1 + - echo $TEST1_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1') + - echo $TEST2_1 + - echo $TEST2_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10') + - echo $TEST2_10 + - echo $TEST2_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.1') + - echo $TEST3_1 + - echo $TEST3_1 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' + - TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10') + - echo $TEST3_10 + - echo $TEST3_10 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' # Run end-to-end test: deconfigure service TFS - > @@ -148,11 +161,24 @@ end2end_test eucnc24: $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-create.sh # Run end-to-end test: test connectivity with ping - - sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10' - - sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1' - - sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1' - - sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10' - - sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10' + - TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10') + - echo $TEST1_10 + - echo $TEST1_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1') + - echo $TEST1_1 + - echo $TEST1_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1') + - echo $TEST2_1 + - echo $TEST2_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10') + - echo $TEST2_10 + - echo $TEST2_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.1') + - echo $TEST3_1 + - echo $TEST3_1 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' + - TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10') + - echo $TEST3_10 + - echo $TEST3_10 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' # Run end-to-end test: deconfigure service IETF - > diff --git a/src/tests/eucnc24/clab/eucnc24.clab.yml b/src/tests/eucnc24/clab/eucnc24.clab.yml index 807a1847c..c6b6ee070 100644 --- a/src/tests/eucnc24/clab/eucnc24.clab.yml +++ b/src/tests/eucnc24/clab/eucnc24.clab.yml @@ -49,7 +49,7 @@ topology: dc1: kind: linux - mgmt-ipv4: 172.20.20.211 + mgmt-ipv4: 172.20.20.201 exec: - ip link set address 00:c1:ab:00:01:01 dev eth1 - ip address add 192.168.1.10/24 dev eth1 @@ -57,7 +57,7 @@ topology: dc2: kind: linux - mgmt-ipv4: 172.20.20.221 + mgmt-ipv4: 172.20.20.202 exec: - ip link set address 00:c1:ab:00:02:01 dev eth1 - ip address add 192.168.2.10/24 dev eth1 diff --git a/src/tests/eucnc24/data/ietf-l3vpn-service.json b/src/tests/eucnc24/data/ietf-l3vpn-service.json index a6297b28f..9eb70db54 100644 --- a/src/tests/eucnc24/data/ietf-l3vpn-service.json +++ b/src/tests/eucnc24/data/ietf-l3vpn-service.json @@ -11,7 +11,7 @@ "site-network-accesses": { "site-network-access": [ { - "site-network-access-id": "int", + "site-network-access-id": "eth1", "site-network-access-type": "ietf-l3vpn-svc:multipoint", "device-reference": "dc1", "vpn-attachment": {"vpn-id": "ietf-l3vpn-svc", "site-role": "ietf-l3vpn-svc:spoke-role"}, @@ -48,7 +48,7 @@ "site-network-accesses": { "site-network-access": [ { - "site-network-access-id": "int", + "site-network-access-id": "eth1", "site-network-access-type": "ietf-l3vpn-svc:multipoint", "device-reference": "dc2", "vpn-attachment": {"vpn-id": "ietf-l3vpn-svc", "site-role": "ietf-l3vpn-svc:hub-role"}, -- GitLab From 76292e00170c5d7dfcfa9d0e89ad449ca0388920 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 11 Dec 2024 13:44:54 +0000 Subject: [PATCH 069/463] Fixed EuCNC24 test: - Fixed correctness test for pings --- src/tests/eucnc24/.gitlab-ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/tests/eucnc24/.gitlab-ci.yml b/src/tests/eucnc24/.gitlab-ci.yml index 0225203b3..2502fe0fe 100644 --- a/src/tests/eucnc24/.gitlab-ci.yml +++ b/src/tests/eucnc24/.gitlab-ci.yml @@ -127,22 +127,22 @@ end2end_test eucnc24: $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-tfs-create.sh # Run end-to-end test: test connectivity with ping - - TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10') + - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10') - echo $TEST1_10 - echo $TEST1_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1') + - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1') - echo $TEST1_1 - echo $TEST1_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1') + - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1') - echo $TEST2_1 - echo $TEST2_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10') + - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10') - echo $TEST2_10 - echo $TEST2_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.1') + - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.1') - echo $TEST3_1 - echo $TEST3_1 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' - - TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10') + - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10') - echo $TEST3_10 - echo $TEST3_10 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' @@ -161,22 +161,22 @@ end2end_test eucnc24: $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-create.sh # Run end-to-end test: test connectivity with ping - - TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10') + - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10') - echo $TEST1_10 - echo $TEST1_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1') + - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1') - echo $TEST1_1 - echo $TEST1_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1') + - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1') - echo $TEST2_1 - echo $TEST2_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10') + - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10') - echo $TEST2_10 - echo $TEST2_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.1') + - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.1') - echo $TEST3_1 - echo $TEST3_1 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' - - TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10') + - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10') - echo $TEST3_10 - echo $TEST3_10 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' -- GitLab From bfb5bcb7764ad865a9689a8489e1563ad2e8fea2 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 11 Dec 2024 13:46:33 +0000 Subject: [PATCH 070/463] Service component - gNMI OpenConfig Service Handler: - Corrected link composition in StaticRouteGenerator --- .../l3nm_gnmi_openconfig/StaticRouteGenerator.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py index b315c7f4d..cdc58049d 100644 --- a/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py @@ -72,6 +72,15 @@ class StaticRouteGenerator: added_connection_hops.add(connection_hop) connection_hop_list = filtered_connection_hop_list + # In some cases connection_hop_list first and last items might be internal endpoints of + # devices instead of link endpoints. Filter those endpoints not reaching a new device. + if len(connection_hop_list) > 2 and connection_hop_list[0][0] == connection_hop_list[1][0]: + # same device on first 2 endpoints + connection_hop_list = connection_hop_list[1:] + if len(connection_hop_list) > 2 and connection_hop_list[-1][0] == connection_hop_list[-2][0]: + # same device on last 2 endpoints + connection_hop_list = connection_hop_list[:-1] + num_connection_hops = len(connection_hop_list) if num_connection_hops % 2 != 0: raise Exception('Number of connection hops must be even') if num_connection_hops < 4: raise Exception('Number of connection hops must be >= 4') -- GitLab From 43810bea96966a48b0c5df3531e36978c1e01f99 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 11 Dec 2024 15:14:34 +0000 Subject: [PATCH 071/463] Fixed EuCNC24 test: - Fixed correctness test for pings --- src/tests/eucnc24/.gitlab-ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/tests/eucnc24/.gitlab-ci.yml b/src/tests/eucnc24/.gitlab-ci.yml index 2502fe0fe..140a980f6 100644 --- a/src/tests/eucnc24/.gitlab-ci.yml +++ b/src/tests/eucnc24/.gitlab-ci.yml @@ -127,22 +127,22 @@ end2end_test eucnc24: $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-tfs-create.sh # Run end-to-end test: test connectivity with ping - - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10') + - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10' --format json) - echo $TEST1_10 - echo $TEST1_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1') + - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1' --format json) - echo $TEST1_1 - echo $TEST1_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1') + - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1' --format json) - echo $TEST2_1 - echo $TEST2_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10') + - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10' --format json) - echo $TEST2_10 - echo $TEST2_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.1') + - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.1' --format json) - echo $TEST3_1 - echo $TEST3_1 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' - - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10') + - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10' --format json) - echo $TEST3_10 - echo $TEST3_10 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' @@ -161,22 +161,22 @@ end2end_test eucnc24: $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-create.sh # Run end-to-end test: test connectivity with ping - - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10') + - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10' --format json) - echo $TEST1_10 - echo $TEST1_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1') + - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1' --format json) - echo $TEST1_1 - echo $TEST1_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1') + - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1' --format json) - echo $TEST2_1 - echo $TEST2_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10') + - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10' --format json) - echo $TEST2_10 - echo $TEST2_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.1') + - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.1' --format json) - echo $TEST3_1 - echo $TEST3_1 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' - - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10') + - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10' --format json) - echo $TEST3_10 - echo $TEST3_10 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' -- GitLab From ad7f2549ee1fd29cdc637df9503294e3b627dfcd Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 11 Dec 2024 16:38:11 +0000 Subject: [PATCH 072/463] PathComp component - FrontEnd: - Added missing device types in ResourceGroups --- .../frontend/service/algorithms/tools/ResourceGroups.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py b/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py index 42635bf4a..b08830332 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py @@ -22,6 +22,8 @@ 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.EMULATED_CLIENT.value : 90, + DeviceTypeEnum.CLIENT.value : 90, DeviceTypeEnum.TERAFLOWSDN_CONTROLLER.value : 80, DeviceTypeEnum.EMULATED_IP_SDN_CONTROLLER.value : 80, @@ -50,6 +52,8 @@ DEVICE_TYPE_TO_DEEPNESS = { DeviceTypeEnum.OPTICAL_TRANSPONDER.value : 10, DeviceTypeEnum.EMULATED_OPTICAL_ROADM.value : 10, DeviceTypeEnum.OPTICAL_ROADM.value : 10, + DeviceTypeEnum.QKD_NODE.value : 10, + DeviceTypeEnum.OPEN_ROADM.value : 10, DeviceTypeEnum.EMULATED_OPTICAL_SPLITTER.value : 0, DeviceTypeEnum.NETWORK.value : 0, # network out of our control; always delegate -- GitLab From 9369c7b4a94c377d02d0ec433223baed76074dba Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 11 Dec 2024 17:28:59 +0000 Subject: [PATCH 073/463] Fixed EuCNC24 test: - Added dump of router running configs --- src/tests/eucnc24/.gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tests/eucnc24/.gitlab-ci.yml b/src/tests/eucnc24/.gitlab-ci.yml index 140a980f6..7b9bdc8c9 100644 --- a/src/tests/eucnc24/.gitlab-ci.yml +++ b/src/tests/eucnc24/.gitlab-ci.yml @@ -126,6 +126,11 @@ end2end_test eucnc24: --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-tfs-create.sh + # Dump configuration of the routers + - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + # Run end-to-end test: test connectivity with ping - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10' --format json) - echo $TEST1_10 -- GitLab From c9772c18d98dd786f21f8a7852a4ad352f1e2749 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 11 Dec 2024 18:24:03 +0000 Subject: [PATCH 074/463] Fixed EuCNC24 test: - Added static startup configs enabling ip routing by default --- src/tests/eucnc24/clab/eucnc24.clab.yml | 3 ++ src/tests/eucnc24/clab/r1-startup.cfg | 48 +++++++++++++++++++++++++ src/tests/eucnc24/clab/r2-startup.cfg | 48 +++++++++++++++++++++++++ src/tests/eucnc24/clab/r3-startup.cfg | 48 +++++++++++++++++++++++++ 4 files changed, 147 insertions(+) create mode 100644 src/tests/eucnc24/clab/r1-startup.cfg create mode 100644 src/tests/eucnc24/clab/r2-startup.cfg create mode 100644 src/tests/eucnc24/clab/r3-startup.cfg diff --git a/src/tests/eucnc24/clab/eucnc24.clab.yml b/src/tests/eucnc24/clab/eucnc24.clab.yml index c6b6ee070..e68a04639 100644 --- a/src/tests/eucnc24/clab/eucnc24.clab.yml +++ b/src/tests/eucnc24/clab/eucnc24.clab.yml @@ -38,14 +38,17 @@ topology: r1: kind: arista_ceos mgmt-ipv4: 172.20.20.101 + startup-config: r1-startup.cfg r2: kind: arista_ceos mgmt-ipv4: 172.20.20.102 + startup-config: r2-startup.cfg r3: kind: arista_ceos mgmt-ipv4: 172.20.20.103 + startup-config: r3-startup.cfg dc1: kind: linux diff --git a/src/tests/eucnc24/clab/r1-startup.cfg b/src/tests/eucnc24/clab/r1-startup.cfg new file mode 100644 index 000000000..b7feebe06 --- /dev/null +++ b/src/tests/eucnc24/clab/r1-startup.cfg @@ -0,0 +1,48 @@ +! device: r1 (cEOSLab, EOS-4.32.2F-38195967.4322F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$OmfaAwJRg/r44r5U$9Fca1O1G6Bgsd4NKwSyvdRJcHHk71jHAR3apDWAgSTN/t/j1iroEhz5J36HjWjOF/jEVC/R8Wa60VmbX6.cr70 +! +management api http-commands + no shutdown +! +no service interface inactive port-id allocation disabled +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r1 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet2 +! +interface Ethernet10 +! +interface Management0 + ip address 172.20.20.101/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +! +router multicast + ipv4 + software-forwarding kernel + ! + ipv6 + software-forwarding kernel +! +end diff --git a/src/tests/eucnc24/clab/r2-startup.cfg b/src/tests/eucnc24/clab/r2-startup.cfg new file mode 100644 index 000000000..e1ab661a0 --- /dev/null +++ b/src/tests/eucnc24/clab/r2-startup.cfg @@ -0,0 +1,48 @@ +! device: r2 (cEOSLab, EOS-4.32.2F-38195967.4322F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$OmfaAwJRg/r44r5U$9Fca1O1G6Bgsd4NKwSyvdRJcHHk71jHAR3apDWAgSTN/t/j1iroEhz5J36HjWjOF/jEVC/R8Wa60VmbX6.cr70 +! +management api http-commands + no shutdown +! +no service interface inactive port-id allocation disabled +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r2 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet1 +! +interface Ethernet3 +! +interface Management0 + ip address 172.20.20.102/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +! +router multicast + ipv4 + software-forwarding kernel + ! + ipv6 + software-forwarding kernel +! +end diff --git a/src/tests/eucnc24/clab/r3-startup.cfg b/src/tests/eucnc24/clab/r3-startup.cfg new file mode 100644 index 000000000..63c062593 --- /dev/null +++ b/src/tests/eucnc24/clab/r3-startup.cfg @@ -0,0 +1,48 @@ +! device: r3 (cEOSLab, EOS-4.32.2F-38195967.4322F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$OmfaAwJRg/r44r5U$9Fca1O1G6Bgsd4NKwSyvdRJcHHk71jHAR3apDWAgSTN/t/j1iroEhz5J36HjWjOF/jEVC/R8Wa60VmbX6.cr70 +! +management api http-commands + no shutdown +! +no service interface inactive port-id allocation disabled +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r3 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet2 +! +interface Ethernet10 +! +interface Management0 + ip address 172.20.20.103/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +! +router multicast + ipv4 + software-forwarding kernel + ! + ipv6 + software-forwarding kernel +! +end -- GitLab From 7efa1b914fa104729da1ec0dbf196678ac0967f2 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 12 Dec 2024 09:46:02 +0000 Subject: [PATCH 075/463] Fixed EuCNC24 test: - Updated dataplane IP range to 172.16.0.0/16 --- src/tests/eucnc24/.gitlab-ci.yml | 24 ++--- src/tests/eucnc24/README.md | 90 ++++++++----------- src/tests/eucnc24/clab/eucnc24.clab.yml | 8 +- .../eucnc24/data/ietf-l3vpn-service.json | 8 +- src/tests/eucnc24/data/tfs-service.json | 4 +- 5 files changed, 61 insertions(+), 73 deletions(-) diff --git a/src/tests/eucnc24/.gitlab-ci.yml b/src/tests/eucnc24/.gitlab-ci.yml index 7b9bdc8c9..24fa0a90c 100644 --- a/src/tests/eucnc24/.gitlab-ci.yml +++ b/src/tests/eucnc24/.gitlab-ci.yml @@ -132,22 +132,22 @@ end2end_test eucnc24: - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" # Run end-to-end test: test connectivity with ping - - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10' --format json) + - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.10' --format json) - echo $TEST1_10 - echo $TEST1_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1' --format json) + - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.1' --format json) - echo $TEST1_1 - echo $TEST1_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1' --format json) + - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.1' --format json) - echo $TEST2_1 - echo $TEST2_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10' --format json) + - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.10' --format json) - echo $TEST2_10 - echo $TEST2_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.1' --format json) + - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.1' --format json) - echo $TEST3_1 - echo $TEST3_1 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' - - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10' --format json) + - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.10' --format json) - echo $TEST3_10 - echo $TEST3_10 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' @@ -166,22 +166,22 @@ end2end_test eucnc24: $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-create.sh # Run end-to-end test: test connectivity with ping - - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.10' --format json) + - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.10' --format json) - echo $TEST1_10 - echo $TEST1_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.1.1' --format json) + - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.1' --format json) - echo $TEST1_1 - echo $TEST1_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.1' --format json) + - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.1' --format json) - echo $TEST2_1 - echo $TEST2_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.2.10' --format json) + - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.10' --format json) - echo $TEST2_10 - echo $TEST2_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.1' --format json) + - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.1' --format json) - echo $TEST3_1 - echo $TEST3_1 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' - - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 192.168.3.10' --format json) + - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.10' --format json) - echo $TEST3_10 - echo $TEST3_10 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' diff --git a/src/tests/eucnc24/README.md b/src/tests/eucnc24/README.md index f8c2f9d49..3cc797456 100644 --- a/src/tests/eucnc24/README.md +++ b/src/tests/eucnc24/README.md @@ -8,7 +8,7 @@ ## TeraFlowSDN Deployment ```bash cd ~/tfs-ctrl -source dataplane-in-a-box/deploy_specs.sh +source ~/tfs-ctrl/src/tests/eucnc24/deploy_specs.sh ./deploy/all.sh ``` @@ -16,67 +16,55 @@ source dataplane-in-a-box/deploy_specs.sh ## Download and install ContainerLab ```bash -sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.48.6 +sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.59.0 ``` ## Download Arista cEOS image and create Docker image ```bash -cd ~/tfs-ctrl/dataplane-in-a-box -docker import arista/cEOS64-lab-4.31.2F.tar ceos:4.31.2F +cd ~/tfs-ctrl/src/tests/eucnc24/ +docker import arista/cEOS64-lab-4.32.2F.tar ceos:4.32.2F ``` ## Deploy scenario ```bash -cd ~/tfs-ctrl/dataplane-in-a-box -sudo containerlab deploy --topo arista.clab.yml +cd ~/tfs-ctrl/src/tests/eucnc24/ +sudo containerlab deploy --topo eucnc24.clab.yml ``` ## Inspect scenario ```bash -cd ~/tfs-ctrl/dataplane-in-a-box -sudo containerlab inspect --topo arista.clab.yml +cd ~/tfs-ctrl/src/tests/eucnc24/ +sudo containerlab inspect --topo eucnc24.clab.yml ``` ## Destroy scenario ```bash -cd ~/tfs-ctrl/dataplane-in-a-box -sudo containerlab destroy --topo arista.clab.yml -sudo rm -rf clab-arista/ .arista.clab.yml.bak +cd ~/tfs-ctrl/src/tests/eucnc24/ +sudo containerlab destroy --topo eucnc24.clab.yml +sudo rm -rf clab-eucnc24/ .eucnc24.clab.yml.bak ``` -## Access cEOS Bash +## Access cEOS Bash/CLI ```bash -docker exec -it clab-arista-r1 bash -``` - -## Access cEOS CLI -```bash -docker exec -it clab-arista-r1 Cli -docker exec -it clab-arista-r2 Cli +docker exec -it clab-eucnc24-r1 bash +docker exec -it clab-eucnc24-r2 bash +docker exec -it clab-eucnc24-r3 bash +docker exec -it clab-eucnc24-r1 Cli +docker exec -it clab-eucnc24-r2 Cli +docker exec -it clab-eucnc24-r3 Cli ``` ## Configure ContainerLab clients ```bash -docker exec -it clab-arista-client1 bash - ip address add 192.168.1.10/24 dev eth1 - ip route add 192.168.2.0/24 via 192.168.1.1 - ip route add 192.168.3.0/24 via 192.168.1.1 - ping 192.168.2.10 - ping 192.168.3.10 - -docker exec -it clab-arista-client2 bash - ip address add 192.168.2.10/24 dev eth1 - ip route add 192.168.1.0/24 via 192.168.2.1 - ip route add 192.168.3.0/24 via 192.168.2.1 - ping 192.168.1.10 - ping 192.168.3.10 - -docker exec -it clab-arista-client3 bash - ip address add 192.168.3.10/24 dev eth1 - ip route add 192.168.2.0/24 via 192.168.3.1 - ip route add 192.168.3.0/24 via 192.168.3.1 - ping 192.168.2.10 - ping 192.168.3.10 +docker exec -it clab-eucnc24-dc1 bash + ip address add 172.16.1.10/24 dev eth1 + ip route add 172.16.2.0/24 via 172.16.1.1 + ping 172.16.2.10 + +docker exec -it clab-eucnc24-dc2 bash + ip address add 172.16.2.10/24 dev eth1 + ip route add 172.16.1.0/24 via 172.16.2.1 + ping 172.16.1.10 ``` ## Install gNMIc @@ -86,38 +74,38 @@ sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)" ## gNMI Capabilities request ```bash -gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure capabilities +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure capabilities ``` ## gNMI Get request ```bash -gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path / > wan1.json -gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /interfaces/interface > wan1-ifaces.json +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path / > r1.json +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /interfaces/interface > r1-ifaces.json ``` ## gNMI Set request ```bash -#gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --update-path /system/config/hostname --update-value srl11 -#gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /system/config/hostname +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --update-path /system/config/hostname --update-value srl11 +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /system/config/hostname ``` ## Subscribe request ```bash -gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf subscribe --path /interfaces/interface[name=Management0]/state/ +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf subscribe --path /interfaces/interface[name=Management0]/state/ # In another terminal, you can generate traffic opening SSH connection -ssh admin@clab-arista-wan1 +ssh admin@clab-eucnc24-r1 ``` # Check configurations done: ```bash -gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/network-instances' > wan1-nis.json -gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/interfaces' > wan1-ifs.json +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/network-instances' > r1-nis.json +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/interfaces' > r1-ifs.json ``` # Delete elements: ```bash ---address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/network-instances/network-instance[name=b19229e8]' ---address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/1]/subinterfaces/subinterface[index=0]' ---address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/2]/subinterfaces/subinterface[index=0]' +--address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/network-instances/network-instance[name=b19229e8]' +--address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/1]/subinterfaces/subinterface[index=0]' +--address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/2]/subinterfaces/subinterface[index=0]' ``` diff --git a/src/tests/eucnc24/clab/eucnc24.clab.yml b/src/tests/eucnc24/clab/eucnc24.clab.yml index e68a04639..19511c7f2 100644 --- a/src/tests/eucnc24/clab/eucnc24.clab.yml +++ b/src/tests/eucnc24/clab/eucnc24.clab.yml @@ -55,16 +55,16 @@ topology: mgmt-ipv4: 172.20.20.201 exec: - ip link set address 00:c1:ab:00:01:01 dev eth1 - - ip address add 192.168.1.10/24 dev eth1 - - ip route add 192.168.2.0/24 via 192.168.1.1 + - ip address add 172.16.1.10/24 dev eth1 + - ip route add 172.16.2.0/24 via 172.16.1.1 dc2: kind: linux mgmt-ipv4: 172.20.20.202 exec: - ip link set address 00:c1:ab:00:02:01 dev eth1 - - ip address add 192.168.2.10/24 dev eth1 - - ip route add 192.168.1.0/24 via 192.168.2.1 + - ip address add 172.16.2.10/24 dev eth1 + - ip route add 172.16.1.0/24 via 172.16.2.1 links: - endpoints: ["r1:eth2", "r2:eth1"] diff --git a/src/tests/eucnc24/data/ietf-l3vpn-service.json b/src/tests/eucnc24/data/ietf-l3vpn-service.json index 9eb70db54..a0f28ee06 100644 --- a/src/tests/eucnc24/data/ietf-l3vpn-service.json +++ b/src/tests/eucnc24/data/ietf-l3vpn-service.json @@ -19,8 +19,8 @@ "ipv4": { "address-allocation-type": "ietf-l3vpn-svc:static-address", "addresses": { - "provider-address": "192.168.1.1", - "customer-address": "192.168.1.10", + "provider-address": "172.16.1.1", + "customer-address": "172.16.1.10", "prefix-length": 24 } } @@ -56,8 +56,8 @@ "ipv4": { "address-allocation-type": "ietf-l3vpn-svc:static-address", "addresses": { - "provider-address": "192.168.2.1", - "customer-address": "192.168.2.10", + "provider-address": "172.16.2.1", + "customer-address": "172.16.2.10", "prefix-length": 24 } } diff --git a/src/tests/eucnc24/data/tfs-service.json b/src/tests/eucnc24/data/tfs-service.json index 397fc8478..e4bb7c2d2 100644 --- a/src/tests/eucnc24/data/tfs-service.json +++ b/src/tests/eucnc24/data/tfs-service.json @@ -14,11 +14,11 @@ "service_config": {"config_rules": [ {"action": "CONFIGACTION_SET", "custom": { "resource_key": "/device[dc1]/endpoint[eth1]/settings", - "resource_value": {"address_ip": "192.168.1.10", "address_prefix": 24, "index": 0} + "resource_value": {"address_ip": "172.16.1.10", "address_prefix": 24, "index": 0} }}, {"action": "CONFIGACTION_SET", "custom": { "resource_key": "/device[dc2]/endpoint[eth1]/settings", - "resource_value": {"address_ip": "192.168.2.10", "address_prefix": 24, "index": 0} + "resource_value": {"address_ip": "172.16.2.10", "address_prefix": 24, "index": 0} }} ]} } -- GitLab From 9da43ed4def99abf3177d5cd50dce588bebe9e3b Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Fri, 13 Dec 2024 11:21:28 +0000 Subject: [PATCH 076/463] test: P4 fabric-v1model scenario with INT, routing, and ACL rules --- src/tests/p4-int-routing-acl/README.md | 129 + src/tests/p4-int-routing-acl/__init__.py | 14 + .../descriptors/rules-insert-acl.json | 39 + .../descriptors/rules-insert-int-b1.json | 136 + .../descriptors/rules-insert-int-b2.json | 269 + .../descriptors/rules-insert-int-b3.json | 212 + .../rules-insert-routing-corp.json | 197 + .../rules-insert-routing-edge.json | 197 + .../descriptors/rules-remove.json | 965 + .../descriptors/topology.json | 288 + src/tests/p4-int-routing-acl/p4src/README.md | 24 + src/tests/p4-int-routing-acl/p4src/_pp.p4 | 2037 ++ src/tests/p4-int-routing-acl/p4src/bmv2.json | 21728 ++++++++++++++++ src/tests/p4-int-routing-acl/p4src/p4info.txt | 1911 ++ .../run_test_01_bootstrap.sh | 21 + .../run_test_02_rules_provision.sh | 17 + .../run_test_03_rules_deprovision.sh | 17 + .../p4-int-routing-acl/run_test_04_cleanup.sh | 17 + src/tests/p4-int-routing-acl/setup.sh | 22 + src/tests/p4-int-routing-acl/test_common.py | 111 + .../test_functional_bootstrap.py | 70 + .../test_functional_cleanup.py | 41 + .../test_functional_rules_deprovision.py | 93 + .../test_functional_rules_provision.py | 238 + .../p4-int-routing-acl/topology/README.md | 166 + .../topology/p4-switch-conf-common.sh | 27 + .../topology/p4-switch-setup.sh | 121 + .../topology/p4-switch-tear-down.sh | 71 + ...witch-three-port-chassis-config-phy.pb.txt | 49 + .../topology/run-stratum.sh | 33 + 30 files changed, 29260 insertions(+) create mode 100644 src/tests/p4-int-routing-acl/README.md create mode 100644 src/tests/p4-int-routing-acl/__init__.py create mode 100644 src/tests/p4-int-routing-acl/descriptors/rules-insert-acl.json create mode 100644 src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b1.json create mode 100644 src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b2.json create mode 100644 src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b3.json create mode 100644 src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-corp.json create mode 100644 src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-edge.json create mode 100644 src/tests/p4-int-routing-acl/descriptors/rules-remove.json create mode 100644 src/tests/p4-int-routing-acl/descriptors/topology.json create mode 100644 src/tests/p4-int-routing-acl/p4src/README.md create mode 100644 src/tests/p4-int-routing-acl/p4src/_pp.p4 create mode 100644 src/tests/p4-int-routing-acl/p4src/bmv2.json create mode 100644 src/tests/p4-int-routing-acl/p4src/p4info.txt create mode 100755 src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh create mode 100755 src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh create mode 100755 src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh create mode 100755 src/tests/p4-int-routing-acl/run_test_04_cleanup.sh create mode 100755 src/tests/p4-int-routing-acl/setup.sh create mode 100644 src/tests/p4-int-routing-acl/test_common.py create mode 100644 src/tests/p4-int-routing-acl/test_functional_bootstrap.py create mode 100644 src/tests/p4-int-routing-acl/test_functional_cleanup.py create mode 100644 src/tests/p4-int-routing-acl/test_functional_rules_deprovision.py create mode 100644 src/tests/p4-int-routing-acl/test_functional_rules_provision.py create mode 100644 src/tests/p4-int-routing-acl/topology/README.md create mode 100644 src/tests/p4-int-routing-acl/topology/p4-switch-conf-common.sh create mode 100644 src/tests/p4-int-routing-acl/topology/p4-switch-setup.sh create mode 100644 src/tests/p4-int-routing-acl/topology/p4-switch-tear-down.sh create mode 100644 src/tests/p4-int-routing-acl/topology/p4-switch-three-port-chassis-config-phy.pb.txt create mode 100644 src/tests/p4-int-routing-acl/topology/run-stratum.sh diff --git a/src/tests/p4-int-routing-acl/README.md b/src/tests/p4-int-routing-acl/README.md new file mode 100644 index 000000000..fa935e1b2 --- /dev/null +++ b/src/tests/p4-int-routing-acl/README.md @@ -0,0 +1,129 @@ +# Tests for P4 routing, ACL, and In-Band Network Telemetry functions + +This directory contains the necessary scripts and configurations to run tests atop a Stratum-based P4 whitebox that performs a set of network functions, including routing, access control list (ACL), and In-Band Network Telemetry (INT). + +## Prerequisites + +You need Python3, which should already be installed while preparing for a TFS build. +Additionally, `pytest` is also mandatory as it is used by our tests below. +Aliasing python with python3 will also help bridging issues between older and newer python versions. + +```shell +alias python='python3' +pip3 install pytest +pip3 install grpclib protobuf +pip3 install grpcio-tools +``` + +The versions used for this test are: +- `protobuf` 3.20.3 +- `grpclib` 0.4.4 +- `grpcio` 1.47.5 +- `grpcio-tools` 1.47.5 + +After the installation of `grpclib`, protoc-gen-grpclib_python binary is in /home/$USER/.local/bin/ +First we copy it to /usr/local/bin/: + +```shell + sudo cp /home/$USER/.local/bin/protoc-gen-grpclib_python /usr/local/bin/ +``` + +Then, we include this path to the PYTHONPATH: +```shell +export PYTHONPATH="${PYTHONPATH}:/usr/local/bin/protoc-gen-grpclib_python" +``` + + +You need to build and deploy a software-based Stratum switch, before being able to use TFS to control it. +To do so, follow the instructions in the `./topology` folder. + +## Steps to setup and run a TFS program atop Stratum + +To conduct this test, follow the steps below. + +### TFS re-deploy + +```shell +cd ~/tfs-ctrl/ +source my_deploy.sh && source tfs_runtime_env_vars.sh +./deploy/all.sh +``` + +### Path setup + +Ensure that `PATH` variable contains the parent project directory, e.g., "home/$USER/tfs-ctrl". + +Ensure that `PYTHONPATH` variable contains the source code directory of TFS, e.g., "home/$USER/tfs-ctrl/src" + +## Topology setup + +In the `./topology/` directory there are scripts that allow to build Stratum on a target machine (e.g., a VM) and then deploy a P4 switch atop this machine. +This test assumes a Stratum P4 switch with 2 network interfaces used as a data plane (routing traffic from one to another) as well as another network interface used to send telemetry information to an external telemetry collector. + +## P4 artifacts + +In the `./p4src/` directory there are compiled P4 artifacts of the pipeline that will be pushed to the P4 switch, along with the P4-runtime definitions. +The `./setup.sh` script copies from this directory. If you need to change the P4 program, make sure to put the compiled artifacts there. + +## Tests + +The following tests are implemented. +For each of these tests, an auxiliary bash script allows to run it with less typing. + +| Test | Bash Runner | Purpose | +| ------------------------------------ | ---------------------------------- | ---------------------------------- | +| - | setup.sh | Copy P4 artifacts into the SBI pod | +| test_functional_bootstrap.py | run_test_01_bootstrap.sh | Connect TFS to the P4 switch | +| test_functional_rules_provision.py | run_test_02_rules_provision.sh | Install rules on the P4 switch | +| test_functional_rules_deprovision.py | run_test_03_rules_deprovision.sh | Uninstall rules from the P4 switch | +| test_functional_cleanup.py | run_test_04_cleanup.sh | Disconnect TFS from the P4 switch | + +Each of the tests above is described in detail below. + +### Step 1: Copy the necessary P4 artifacts into the TFS SBI service pod + +The setup script copies the necessary artifacts to the SBI service pod. +It should be run just once, after a fresh install of TFS. +If you `deploy/all.sh` again, you need to repeat this step. + +```shell +cd ~/tfs-ctrl/ +source my_deploy.sh && source tfs_runtime_env_vars.sh +bash src/tests/p4-int-routing-acl/setup.sh +``` + +### Step 2: Bootstrap topology + +The bootstrap script registers the context, topology, links, and devices to TFS. + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh +``` + +### Step 3: Provision rules via the SBI API + +Implement routing, ACL, and INT functions by installing P4 rules to the Stratum switch via the TFS SBI API. + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh +``` + +### Step 4: Deprovision rules via the SBI API + +Deprovision the routing, ACL, and INT network functions by removing the previously installed P4 rules (via the TFS SBI API) from the Stratum switch. + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh +``` + +### Step 4: Deprovision topology + +Delete all the objects (context, topology, links, devices) from TFS: + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-int-routing-acl/run_test_04_cleanup.sh +``` diff --git a/src/tests/p4-int-routing-acl/__init__.py b/src/tests/p4-int-routing-acl/__init__.py new file mode 100644 index 000000000..3ee6f7071 --- /dev/null +++ b/src/tests/p4-int-routing-acl/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/p4-int-routing-acl/descriptors/rules-insert-acl.json b/src/tests/p4-int-routing-acl/descriptors/rules-insert-acl.json new file mode 100644 index 000000000..97a548983 --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-insert-acl.json @@ -0,0 +1,39 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.acl.acl[1]", + "resource_value": { + "table-name": "FabricIngress.acl.acl", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "1" + }, + { + "match-field": "l4_dport", + "match-value": "8080" + } + ], + "action-name": "FabricIngress.acl.drop", + "action-params": [], + "priority": 1 + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b1.json b/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b1.json new file mode 100644 index 000000000..3fc9a7173 --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b1.json @@ -0,0 +1,136 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.int_watchlist.watchlist[1]", + "resource_value": { + "table-name": "FabricIngress.int_watchlist.watchlist", + "match-fields": [ + { + "match-field": "ipv4_valid", + "match-value": "1" + } + ], + "action-name": "FabricIngress.int_watchlist.mark_to_report", + "action-params": [], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[1]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "510" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "3" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[1]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "510" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[1]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "510" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "2" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.int_watchlist.watchlist[2]", + "resource_value": { + "table-name": "FabricIngress.int_watchlist.watchlist", + "match-fields": [ + { + "match-field": "ipv4_valid", + "match-value": "1" + }, + { + "match-field": "ipv4_dst", + "match-value": "10.10.10.41&&&0xFFFFFFFF" + } + ], + "action-name": "FabricIngress.int_watchlist.no_report_collector", + "action-params": [], + "priority": 10 + } + } + } + ] + } + } + ] +} diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b2.json b/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b2.json new file mode 100644 index 000000000..e6b5a8ea8 --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b2.json @@ -0,0 +1,269 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[1]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "4" + }, + { + "match-field": "mirror_type", + "match-value": "0" + }, + { + "match-field": "int_report_type", + "match-value": "4" + } + ], + "action-name": "FabricEgress.int_egress.do_drop_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[2]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "4" + } + ], + "action-name": "FabricEgress.int_egress.do_drop_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[3]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "1" + } + ], + "action-name": "FabricEgress.int_egress.do_local_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[4]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "5" + }, + { + "match-field": "mirror_type", + "match-value": "0" + }, + { + "match-field": "int_report_type", + "match-value": "4" + } + ], + "action-name": "FabricEgress.int_egress.do_drop_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[5]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "2" + } + ], + "action-name": "FabricEgress.int_egress.do_local_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[6]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "3" + } + ], + "action-name": "FabricEgress.int_egress.do_local_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + } + ] + } + } + ] +} diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b3.json b/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b3.json new file mode 100644 index 000000000..f8d2c7183 --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b3.json @@ -0,0 +1,212 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[2]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "3" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "1" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[2]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "3" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "0" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[2]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "3" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.bridging[1]", + "resource_value": { + "table-name": "FabricIngress.forwarding.bridging", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eth_dst", + "match-value": "fa:16:3e:fb:cf:96" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_bridging", + "action-params": [ + { + "action-param": "next_id", + "action-value": "3" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[1]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "3" + } + ], + "action-name": "FabricIngress.next.output_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "3" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.routing_v4[1]", + "resource_value": { + "table-name": "FabricIngress.forwarding.routing_v4", + "match-fields": [ + { + "match-field": "ipv4_dst", + "match-value": "10.10.10.41/32" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_routing_v4", + "action-params": [ + { + "action-param": "next_id", + "action-value": "3" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[2]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "3" + } + ], + "action-name": "FabricIngress.next.routing_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "3" + }, + { + "action-param": "smac", + "action-value": "fa:16:3e:93:8c:c0" + }, + { + "action-param": "dmac", + "action-value": "fa:16:3e:fb:cf:96" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/clone_sessions/clone_session[1]", + "resource_value": { + "session-id": 506, + "replicas": [ + { + "egress-port": 510, + "instance": 0 + } + ] + } + } + } + ] + } + } + ] +} diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-corp.json b/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-corp.json new file mode 100644 index 000000000..0fe8b5036 --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-corp.json @@ -0,0 +1,197 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[4]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "2" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "1" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[4]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "2" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "0" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[4]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "2" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.bridging[3]", + "resource_value": { + "table-name": "FabricIngress.forwarding.bridging", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eth_dst", + "match-value": "fa:16:3e:e2:af:28" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_bridging", + "action-params": [ + { + "action-param": "next_id", + "action-value": "2" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[5]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "2" + } + ], + "action-name": "FabricIngress.next.output_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "2" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.routing_v4[3]", + "resource_value": { + "table-name": "FabricIngress.forwarding.routing_v4", + "match-fields": [ + { + "match-field": "ipv4_dst", + "match-value": "172.16.10.9/32" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_routing_v4", + "action-params": [ + { + "action-param": "next_id", + "action-value": "2" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[6]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "2" + } + ], + "action-name": "FabricIngress.next.routing_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "2" + }, + { + "action-param": "smac", + "action-value": "fa:16:3e:9b:cb:a1" + }, + { + "action-param": "dmac", + "action-value": "fa:16:3e:e2:af:28" + } + ] + } + } + } + ] + } + } + ] +} diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-edge.json b/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-edge.json new file mode 100644 index 000000000..c48d9d31e --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-edge.json @@ -0,0 +1,197 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[3]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "1" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "1" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[3]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "1" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "0" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[3]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "1" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.bridging[2]", + "resource_value": { + "table-name": "FabricIngress.forwarding.bridging", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eth_dst", + "match-value": "fa:16:3e:58:92:ba" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_bridging", + "action-params": [ + { + "action-param": "next_id", + "action-value": "1" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[3]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "1" + } + ], + "action-name": "FabricIngress.next.output_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.routing_v4[2]", + "resource_value": { + "table-name": "FabricIngress.forwarding.routing_v4", + "match-fields": [ + { + "match-field": "ipv4_dst", + "match-value": "10.158.72.25/32" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_routing_v4", + "action-params": [ + { + "action-param": "next_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[4]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "1" + } + ], + "action-name": "FabricIngress.next.routing_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "1" + }, + { + "action-param": "smac", + "action-value": "fa:16:3e:e2:af:28" + }, + { + "action-param": "dmac", + "action-value": "fa:16:3e:58:92:ba" + } + ] + } + } + } + ] + } + } + ] +} diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-remove.json b/src/tests/p4-int-routing-acl/descriptors/rules-remove.json new file mode 100644 index 000000000..68132e9e6 --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-remove.json @@ -0,0 +1,965 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.int_watchlist.watchlist[1]", + "resource_value": { + "table-name": "FabricIngress.int_watchlist.watchlist", + "match-fields": [ + { + "match-field": "ipv4_valid", + "match-value": "1" + } + ], + "action-name": "FabricIngress.int_watchlist.mark_to_report", + "action-params": [], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[1]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "510" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "3" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[1]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "510" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[1]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "510" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "2" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[1]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "4" + }, + { + "match-field": "mirror_type", + "match-value": "0" + }, + { + "match-field": "int_report_type", + "match-value": "4" + } + ], + "action-name": "FabricEgress.int_egress.do_drop_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[2]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "4" + } + ], + "action-name": "FabricEgress.int_egress.do_drop_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[3]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "1" + } + ], + "action-name": "FabricEgress.int_egress.do_local_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[4]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "5" + }, + { + "match-field": "mirror_type", + "match-value": "0" + }, + { + "match-field": "int_report_type", + "match-value": "4" + } + ], + "action-name": "FabricEgress.int_egress.do_drop_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[5]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "2" + } + ], + "action-name": "FabricEgress.int_egress.do_local_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[6]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "3" + } + ], + "action-name": "FabricEgress.int_egress.do_local_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.int_watchlist.watchlist[2]", + "resource_value": { + "table-name": "FabricIngress.int_watchlist.watchlist", + "match-fields": [ + { + "match-field": "ipv4_valid", + "match-value": "1" + }, + { + "match-field": "ipv4_dst", + "match-value": "10.10.10.41&&&0xFFFFFFFF" + } + ], + "action-name": "FabricIngress.int_watchlist.no_report_collector", + "action-params": [], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[2]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "3" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "1" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[2]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "3" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "0" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[2]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "3" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.bridging[1]", + "resource_value": { + "table-name": "FabricIngress.forwarding.bridging", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eth_dst", + "match-value": "fa:16:3e:fb:cf:96" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_bridging", + "action-params": [ + { + "action-param": "next_id", + "action-value": "3" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[1]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "3" + } + ], + "action-name": "FabricIngress.next.output_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "3" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.routing_v4[1]", + "resource_value": { + "table-name": "FabricIngress.forwarding.routing_v4", + "match-fields": [ + { + "match-field": "ipv4_dst", + "match-value": "10.10.10.41/32" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_routing_v4", + "action-params": [ + { + "action-param": "next_id", + "action-value": "3" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[2]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "3" + } + ], + "action-name": "FabricIngress.next.routing_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "3" + }, + { + "action-param": "smac", + "action-value": "fa:16:3e:93:8c:c0" + }, + { + "action-param": "dmac", + "action-value": "fa:16:3e:fb:cf:96" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/clone_sessions/clone_session[1]", + "resource_value": { + "session-id": 506, + "replicas": [ + { + "egress-port": 510, + "instance": 0 + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[3]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "1" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "1" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[3]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "1" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "0" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[3]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "1" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.bridging[2]", + "resource_value": { + "table-name": "FabricIngress.forwarding.bridging", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eth_dst", + "match-value": "fa:16:3e:58:92:ba" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_bridging", + "action-params": [ + { + "action-param": "next_id", + "action-value": "1" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[3]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "1" + } + ], + "action-name": "FabricIngress.next.output_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.routing_v4[2]", + "resource_value": { + "table-name": "FabricIngress.forwarding.routing_v4", + "match-fields": [ + { + "match-field": "ipv4_dst", + "match-value": "10.158.72.25/32" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_routing_v4", + "action-params": [ + { + "action-param": "next_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[4]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "1" + } + ], + "action-name": "FabricIngress.next.routing_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "1" + }, + { + "action-param": "smac", + "action-value": "fa:16:3e:e2:af:28" + }, + { + "action-param": "dmac", + "action-value": "fa:16:3e:58:92:ba" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[4]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "2" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "1" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[4]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "2" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "0" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[4]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "2" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.bridging[3]", + "resource_value": { + "table-name": "FabricIngress.forwarding.bridging", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eth_dst", + "match-value": "fa:16:3e:e2:af:28" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_bridging", + "action-params": [ + { + "action-param": "next_id", + "action-value": "2" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[5]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "2" + } + ], + "action-name": "FabricIngress.next.output_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "2" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.routing_v4[3]", + "resource_value": { + "table-name": "FabricIngress.forwarding.routing_v4", + "match-fields": [ + { + "match-field": "ipv4_dst", + "match-value": "172.16.10.9/32" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_routing_v4", + "action-params": [ + { + "action-param": "next_id", + "action-value": "2" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[6]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "2" + } + ], + "action-name": "FabricIngress.next.routing_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "2" + }, + { + "action-param": "smac", + "action-value": "fa:16:3e:9b:cb:a1" + }, + { + "action-param": "dmac", + "action-value": "fa:16:3e:e2:af:28" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.acl.acl[1]", + "resource_value": { + "table-name": "FabricIngress.acl.acl", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "1" + }, + { + "match-field": "l4_dport", + "match-value": "8080" + } + ], + "action-name": "FabricIngress.acl.drop", + "action-params": [], + "priority": 1 + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/tests/p4-int-routing-acl/descriptors/topology.json b/src/tests/p4-int-routing-acl/descriptors/topology.json new file mode 100644 index 000000000..3b1f6e410 --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/topology.json @@ -0,0 +1,288 @@ +{ + "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": "edge-net" + } + }, + "device_type": "network", + "device_drivers": [ + "DEVICEDRIVER_UNDEFINED" + ], + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/port", + "resource_value": "0" + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "uuid": "eth1", + "type": "copper" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "corporate-net" + } + }, + "device_type": "network", + "device_drivers": [ + "DEVICEDRIVER_UNDEFINED" + ], + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/port", + "resource_value": "0" + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "uuid": "eth1", + "type": "copper" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "device_type": "p4-switch", + "device_drivers": [ + "DEVICEDRIVER_P4" + ], + "device_operational_status": "DEVICEOPERATIONALSTATUS_DISABLED", + "name": "p4-sw1", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/address", + "resource_value": "10.10.10.120" + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/port", + "resource_value": "50001" + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "id": 1, + "name": "p4-sw1", + "vendor": "Open Networking Foundation", + "hw_ver": "BMv2 simple_switch", + "sw_ver": "Stratum", + "p4bin": "/root/p4/bmv2.json", + "p4info": "/root/p4/p4info.txt", + "timeout": 60, + "endpoints": [ + { + "uuid": "1", + "type": "port" + }, + { + "uuid": "2", + "type": "port" + } + ] + } + } + } + ] + } + } + ], + "links": [ + { + "link_id": { + "link_uuid": { + "uuid": "p4-sw1/1==edge-net/eth1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "endpoint_uuid": { + "uuid": "1" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "edge-net" + } + }, + "endpoint_uuid": { + "uuid": "eth1" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "edge-net/eth1==p4-sw1/1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "edge-net" + } + }, + "endpoint_uuid": { + "uuid": "eth1" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "endpoint_uuid": { + "uuid": "1" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "p4-sw1/2==corporate-net/eth1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "endpoint_uuid": { + "uuid": "2" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "corporate-net" + } + }, + "endpoint_uuid": { + "uuid": "eth1" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "corporate-net/eth1==p4-sw1/2" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "corporate-net" + } + }, + "endpoint_uuid": { + "uuid": "eth1" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "endpoint_uuid": { + "uuid": "2" + } + } + ] + } + ] +} diff --git a/src/tests/p4-int-routing-acl/p4src/README.md b/src/tests/p4-int-routing-acl/p4src/README.md new file mode 100644 index 000000000..07e34066f --- /dev/null +++ b/src/tests/p4-int-routing-acl/p4src/README.md @@ -0,0 +1,24 @@ +# P4 Sources + +We employ the P4 sources from the [fabric-tna](https://github.com/stratum/fabric-tna/tree/main) project. + +To compile a relevant P4 target binary and P4 info file, do: + +```shell +git clone https://github.com/stratum/fabric-tna.git + +cd ./fabric-tna + +make fabric-int-v1model +``` + +At this point, a relevant `build.sh` script is being run and a P4 program is being compiled. + +After a successful compilation, some artifacts (p4info.txt, bmv2.json) will be generated and placed into `build` sub-folder. + +```shell +ls build/fabric-int/bmv2 +_pp.p4 bmv2.json p4info.txt +``` + +These artefacts are now moved into this repository. diff --git a/src/tests/p4-int-routing-acl/p4src/_pp.p4 b/src/tests/p4-int-routing-acl/p4src/_pp.p4 new file mode 100644 index 000000000..1b2b718a1 --- /dev/null +++ b/src/tests/p4-int-routing-acl/p4src/_pp.p4 @@ -0,0 +1,2037 @@ +error { + PacketRejectedByParser +} +#include +#define V1MODEL_VERSION 20180101 +#include + +typedef bit<9> PortId_t; +typedef bit<16> MulticastGroupId_t; +typedef bit<5> QueueId_t; +typedef bit<10> MirrorId_t; +typedef bit<16> ReplicationId_t; +enum bit<2> MeterColor_t { + GREEN = 0, + YELLOW = 1, + RED = 2 +} + +typedef bit<1> BOOL; +typedef bit<8> FieldListIndex_t; +const PortId_t BMV2_DROP_PORT = 511; +const PortId_t FAKE_V1MODEL_RECIRC_PORT = 510; +const FieldListIndex_t PRESERVE_INT_MD = 241; +const FieldListIndex_t PRESERVE_INGRESS_PORT = 231; +const FieldListIndex_t NO_PRESERVATION = 0; +typedef bit<3> fwd_type_t; +typedef bit<32> next_id_t; +typedef bit<20> mpls_label_t; +typedef bit<48> mac_addr_t; +typedef bit<12> vlan_id_t; +typedef bit<32> ipv4_addr_t; +typedef bit<16> l4_port_t; +typedef bit<32> flow_hash_t; +typedef bit<4> slice_id_t; +typedef bit<2> tc_t; +typedef bit<(4 + 2)> slice_tc_t; +type bit<9> FabricPortId_t; +const bit<8> DEFAULT_APP_ID = 0; +const slice_id_t DEFAULT_SLICE_ID = 0; +const tc_t DEFAULT_TC = 0; +const QueueId_t QUEUE_ID_BEST_EFFORT = 0; +typedef bit<32> teid_t; +typedef bit<12> upf_ctr_idx_t; +typedef bit<8> tun_peer_id_t; +typedef bit<32> ue_session_id_t; +typedef bit<15> session_meter_idx_t; +typedef bit<15> app_meter_idx_t; +const session_meter_idx_t DEFAULT_SESSION_METER_IDX = 0; +const app_meter_idx_t DEFAULT_APP_METER_IDX = 0; +enum bit<2> EncapPresence { + NONE = 0x0, + GTPU_ONLY = 0x1, + GTPU_WITH_PSC = 0x2, + VXLAN = 0x3 +} + +const bit<16> GTPU_UDP_PORT = 2152; +const bit<3> GTP_V1 = 3w1; +const bit<8> GTPU_GPDU = 0xff; +const bit<1> GTP_PROTOCOL_TYPE_GTP = 1w1; +const bit<8> GTPU_NEXT_EXT_NONE = 0x0; +const bit<8> GTPU_NEXT_EXT_PSC = 0x85; +const bit<4> GTPU_EXT_PSC_TYPE_DL = 4w0; +const bit<4> GTPU_EXT_PSC_TYPE_UL = 4w1; +const bit<8> GTPU_EXT_PSC_LEN = 8w1; +enum bit<2> PortType_t { + UNKNOWN = 0x0, + EDGE = 0x1, + INFRA = 0x2, + INTERNAL = 0x3 +} + +const bit<16> ETHERTYPE_QINQ = 0x88a8; +const bit<16> ETHERTYPE_QINQ_NON_STD = 0x9100; +const bit<16> ETHERTYPE_VLAN = 0x8100; +const bit<16> ETHERTYPE_MPLS = 0x8847; +const bit<16> ETHERTYPE_MPLS_MULTICAST = 0x8848; +const bit<16> ETHERTYPE_IPV4 = 0x800; +const bit<16> ETHERTYPE_IPV6 = 0x86dd; +const bit<16> ETHERTYPE_ARP = 0x806; +const bit<16> ETHERTYPE_PPPOED = 0x8863; +const bit<16> ETHERTYPE_PPPOES = 0x8864; +const bit<16> ETHERTYPE_PACKET_OUT = 0xbf01; +const bit<16> ETHERTYPE_CPU_LOOPBACK_INGRESS = 0xbf02; +const bit<16> ETHERTYPE_CPU_LOOPBACK_EGRESS = 0xbf03; +const bit<16> ETHERTYPE_INT_WIP_IPV4 = 0xbf04; +const bit<16> ETHERTYPE_INT_WIP_MPLS = 0xbf05; +const bit<16> PPPOE_PROTOCOL_IP4 = 0x21; +const bit<16> PPPOE_PROTOCOL_IP6 = 0x57; +const bit<16> PPPOE_PROTOCOL_MPLS = 0x281; +const bit<8> PROTO_ICMP = 1; +const bit<8> PROTO_TCP = 6; +const bit<8> PROTO_UDP = 17; +const bit<8> PROTO_ICMPV6 = 58; +const bit<4> IPV4_MIN_IHL = 5; +const fwd_type_t FWD_BRIDGING = 0; +const fwd_type_t FWD_MPLS = 1; +const fwd_type_t FWD_IPV4_UNICAST = 2; +const fwd_type_t FWD_IPV4_MULTICAST = 3; +const fwd_type_t FWD_IPV6_UNICAST = 4; +const fwd_type_t FWD_IPV6_MULTICAST = 5; +const fwd_type_t FWD_UNKNOWN = 7; +const vlan_id_t DEFAULT_VLAN_ID = 12w4094; +const bit<8> DEFAULT_MPLS_TTL = 64; +const bit<8> DEFAULT_IPV4_TTL = 64; +const bit<16> VXLAN_UDP_PORT = 4789; +const bit<7> RECIRC_PORT_NUMBER = 7w68; +action nop() { + NoAction(); +} +enum bit<8> BridgedMdType_t { + INVALID = 0, + INGRESS_TO_EGRESS = 1, + EGRESS_MIRROR = 2, + INGRESS_MIRROR = 3, + INT_INGRESS_DROP = 4, + DEFLECTED = 5 +} + +enum bit<3> FabricMirrorType_t { + INVALID = 0, + INT_REPORT = 1, + PACKET_IN = 2 +} + +const MirrorId_t PACKET_IN_MIRROR_SESSION_ID = 0x1ff; +enum bit<2> CpuLoopbackMode_t { + DISABLED = 0, + DIRECT = 1, + INGRESS = 2 +} + +const bit<4> NPROTO_ETHERNET = 0; +const bit<4> NPROTO_TELEMETRY_DROP_HEADER = 1; +const bit<4> NPROTO_TELEMETRY_SWITCH_LOCAL_HEADER = 2; +const bit<16> REPORT_FIXED_HEADER_BYTES = 12; +const bit<16> DROP_REPORT_HEADER_BYTES = 12; +const bit<16> LOCAL_REPORT_HEADER_BYTES = 16; +const bit<8> INT_MIRROR_SESSION_BASE = 0x80; +const bit<10> V1MODEL_INT_MIRROR_SESSION = 0x1fa; +typedef bit<16> flow_report_filter_index_t; +typedef bit<16> drop_report_filter_index_t; +typedef bit<12> queue_report_filter_index_t; +typedef bit<16> queue_report_quota_t; +typedef bit<3> IntReportType_t; +const IntReportType_t INT_REPORT_TYPE_NO_REPORT = 0; +const IntReportType_t INT_REPORT_TYPE_DROP = 4; +const IntReportType_t INT_REPORT_TYPE_QUEUE = 2; +const IntReportType_t INT_REPORT_TYPE_FLOW = 1; +typedef bit<8> IntWipType_t; +const IntWipType_t INT_IS_NOT_WIP = 0; +const IntWipType_t INT_IS_WIP = 1; +const IntWipType_t INT_IS_WIP_WITH_MPLS = 2; +const bit<16> INT_WIP_ADJUST_IP_BYTES = 14 - 1 ^ 0xffff; +const bit<16> INT_WIP_ADJUST_UDP_BYTES = INT_WIP_ADJUST_IP_BYTES - 20; +const bit<16> INT_WIP_ADJUST_IP_MPLS_BYTES = INT_WIP_ADJUST_IP_BYTES - 4; +const bit<16> INT_WIP_ADJUST_UDP_MPLS_BYTES = INT_WIP_ADJUST_UDP_BYTES - 4; +enum bit<8> IntDropReason_t { + DROP_REASON_UNKNOWN = 0, + DROP_REASON_IP_TTL_ZERO = 26, + DROP_REASON_ROUTING_V4_MISS = 29, + DROP_REASON_ROUTING_V6_MISS = 29, + DROP_REASON_PORT_VLAN_MAPPING_MISS = 55, + DROP_REASON_TRAFFIC_MANAGER = 71, + DROP_REASON_ACL_DENY = 80, + DROP_REASON_BRIDGING_MISS = 89, + DROP_REASON_NEXT_ID_MISS = 128, + DROP_REASON_MPLS_MISS = 129, + DROP_REASON_EGRESS_NEXT_MISS = 130, + DROP_REASON_MPLS_TTL_ZERO = 131, + DROP_REASON_UPF_DL_SESSION_MISS = 132, + DROP_REASON_UPF_DL_SESSION_DROP = 133, + DROP_REASON_UPF_UL_SESSION_MISS = 134, + DROP_REASON_UPF_UL_SESSION_DROP = 135, + DROP_REASON_UPF_DL_SESSION_DROP_BUFF = 136, + DROP_REASON_UPF_DL_TERMINATION_MISS = 137, + DROP_REASON_UPF_DL_TERMINATION_DROP = 138, + DROP_REASON_UPF_UL_TERMINATION_MISS = 139, + DROP_REASON_UPF_UL_TERMINATION_DROP = 140, + DROP_REASON_UPF_UPLINK_RECIRC_DENY = 150, + DROP_REASON_INGRESS_QOS_METER = 160, + DROP_REASON_ROUTING_V4_DROP = 170, + DROP_REASON_ROUTING_V6_DROP = 171 +} + +@controller_header("packet_in") header packet_in_header_t { + FabricPortId_t ingress_port; + bit<7> _pad0; +} + +@controller_header("packet_out") header packet_out_header_t { + @padding + bit<7> pad0; + FabricPortId_t egress_port; + @padding + bit<3> pad1; + QueueId_t queue_id; + @padding + bit<5> pad2; + CpuLoopbackMode_t cpu_loopback_mode; + bit<1> do_forwarding; + @padding + bit<16> pad3; + @padding + bit<48> pad4; + bit<16> ether_type; +} + +header ethernet_t { + mac_addr_t dst_addr; + mac_addr_t src_addr; +} + +header eth_type_t { + bit<16> value; +} + +header vlan_tag_t { + bit<16> eth_type; + bit<3> pri; + bit<1> cfi; + vlan_id_t vlan_id; +} + +header mpls_t { + mpls_label_t label; + bit<3> tc; + bit<1> bos; + bit<8> ttl; +} + +header pppoe_t { + bit<4> version; + bit<4> type_id; + bit<8> code; + bit<16> session_id; + bit<16> length; + bit<16> protocol; +} + +header ipv4_t { + bit<4> version; + bit<4> ihl; + bit<6> dscp; + bit<2> ecn; + bit<16> total_len; + bit<16> identification; + bit<3> flags; + bit<13> frag_offset; + bit<8> ttl; + bit<8> protocol; + bit<16> hdr_checksum; + bit<32> src_addr; + bit<32> dst_addr; +} + +header ipv6_t { + bit<4> version; + bit<8> traffic_class; + bit<20> flow_label; + bit<16> payload_len; + bit<8> next_hdr; + bit<8> hop_limit; + bit<128> src_addr; + bit<128> dst_addr; +} + +header tcp_t { + bit<16> sport; + bit<16> dport; +} + +header udp_t { + bit<16> sport; + bit<16> dport; + bit<16> len; + bit<16> checksum; +} + +header icmp_t { + bit<8> icmp_type; + bit<8> icmp_code; +} + +header vxlan_t { + bit<8> flags; + bit<24> reserved; + bit<24> vni; + bit<8> reserved_2; +} + +header gtpu_t { + bit<3> version; + bit<1> pt; + bit<1> spare; + bit<1> ex_flag; + bit<1> seq_flag; + bit<1> npdu_flag; + bit<8> msgtype; + bit<16> msglen; + teid_t teid; +} + +header gtpu_options_t { + bit<16> seq_num; + bit<8> n_pdu_num; + bit<8> next_ext; +} + +header gtpu_ext_psc_t { + bit<8> len; + bit<4> type; + bit<4> spare0; + bit<1> ppp; + bit<1> rqi; + bit<6> qfi; + bit<8> next_ext; +} + +@flexible struct upf_bridged_metadata_t { + tun_peer_id_t tun_peer_id; + upf_ctr_idx_t upf_ctr_id; + bit<6> qfi; + bool needs_gtpu_encap; + bool skip_upf; + bool skip_egress_upf_ctr; + teid_t teid; + bit<4> _pad; +} + +@pa_no_overlay("egress" , "hdr.report_fixed_header.rsvd") header report_fixed_header_t { + bit<4> ver; + bit<4> nproto; + bit<3> dqf; + bit<15> rsvd; + bit<6> hw_id; + bit<32> seq_no; + bit<32> ig_tstamp; +} + +@pa_container_size("egress" , "hdr.common_report_header.queue_id" , 8) @pa_container_size("egress" , "hdr.common_report_header.ig_port" , 16) @pa_container_size("egress" , "hdr.common_report_header.eg_port" , 16) @pa_no_overlay("egress" , "hdr.common_report_header.queue_id") @pa_no_overlay("egress" , "hdr.common_report_header.eg_port") header common_report_header_t { + bit<32> switch_id; + bit<7> pad1; + bit<9> ig_port; + bit<7> pad2; + bit<9> eg_port; + bit<3> pad3; + bit<5> queue_id; +} + +header drop_report_header_t { + bit<8> drop_reason; + @padding + bit<16> pad; +} + +header local_report_header_t { + bit<5> pad1; + bit<19> queue_occupancy; + bit<32> eg_tstamp; +} + +@pa_no_overlay("egress" , "fabric_md.int_report_md.bmd_type") @pa_no_overlay("egress" , "fabric_md.int_report_md.mirror_type") @pa_no_overlay("egress" , "fabric_md.int_report_md.ig_port") @pa_no_overlay("egress" , "fabric_md.int_report_md.eg_port") @pa_no_overlay("egress" , "fabric_md.int_report_md.queue_id") @pa_no_overlay("egress" , "fabric_md.int_report_md.queue_occupancy") @pa_no_overlay("egress" , "fabric_md.int_report_md.ig_tstamp") @pa_no_overlay("egress" , "fabric_md.int_report_md.eg_tstamp") @pa_no_overlay("egress" , "fabric_md.int_report_md.drop_reason") @pa_no_overlay("egress" , "fabric_md.int_report_md.ip_eth_type") @pa_no_overlay("egress" , "fabric_md.int_report_md.report_type") @pa_no_overlay("egress" , "fabric_md.int_report_md.flow_hash") @pa_no_overlay("egress" , "fabric_md.int_report_md.encap_presence") header int_report_metadata_t { + BridgedMdType_t bmd_type; + @padding + bit<5> _pad0; + FabricMirrorType_t mirror_type; + @padding + bit<7> _pad1; + bit<9> ig_port; + @padding + bit<7> _pad2; + bit<9> eg_port; + @padding + bit<3> _pad3; + bit<5> queue_id; + @padding + bit<5> _pad4; + bit<19> queue_occupancy; + bit<32> ig_tstamp; + bit<32> eg_tstamp; + bit<8> drop_reason; + bit<16> ip_eth_type; + @padding + bit<6> _pad5; + EncapPresence encap_presence; + bit<3> report_type; + @padding + bit<5> _pad6; + flow_hash_t flow_hash; +} + +@flexible struct int_bridged_metadata_t { + bit<3> report_type; + MirrorId_t mirror_session_id; + IntDropReason_t drop_reason; + QueueId_t queue_id; + PortId_t egress_port; + IntWipType_t wip_type; +} + +struct int_metadata_t { + bit<32> hop_latency; + bit<48> timestamp; + bool vlan_stripped; + bool queue_report; +} + +@flexible struct bridged_metadata_base_t { + flow_hash_t inner_hash; + mpls_label_t mpls_label; + PortId_t ig_port; + bool is_multicast; + fwd_type_t fwd_type; + vlan_id_t vlan_id; + EncapPresence encap_presence; + bit<8> mpls_ttl; + bit<48> ig_tstamp; + bit<16> ip_eth_type; + bit<10> stats_flow_id; + slice_tc_t slice_tc; +} + +header bridged_metadata_t { + BridgedMdType_t bmd_type; + bridged_metadata_base_t base; + int_bridged_metadata_t int_bmd; + bit<1> _pad0; + bit<5> _pad2; +} + +struct lookup_metadata_t { + mac_addr_t eth_dst; + mac_addr_t eth_src; + bit<16> eth_type; + vlan_id_t vlan_id; + bool is_ipv4; + bit<32> ipv4_src; + bit<32> ipv4_dst; + bit<8> ip_proto; + l4_port_t l4_sport; + l4_port_t l4_dport; + bit<8> icmp_type; + bit<8> icmp_code; +} + +struct common_mirror_metadata_t { + MirrorId_t mirror_session_id; + BridgedMdType_t bmd_type; +} + +@pa_auto_init_metadata struct fabric_ingress_metadata_t { + bridged_metadata_t bridged; + flow_hash_t ecmp_hash; + lookup_metadata_t lkp; + bit<32> routing_ipv4_dst; + bool skip_forwarding; + bool skip_next; + next_id_t next_id; + bool egress_port_set; + bool punt_to_cpu; + bool ipv4_checksum_err; + bool inner_ipv4_checksum_err; + slice_id_t slice_id; + tc_t tc; + bool tc_unknown; + bool is_upf_hit; + slice_id_t upf_slice_id; + tc_t upf_tc; + MeterColor_t upf_meter_color; + PortType_t ig_port_type; + common_mirror_metadata_t mirror; +} + +header common_egress_metadata_t { + BridgedMdType_t bmd_type; + @padding + bit<5> _pad; + FabricMirrorType_t mirror_type; +} + +header packet_in_mirror_metadata_t { + BridgedMdType_t bmd_type; + @padding + bit<5> _pad0; + FabricMirrorType_t mirror_type; + @padding + bit<7> _pad1; + PortId_t ingress_port; +} + +@pa_auto_init_metadata struct fabric_egress_metadata_t { + bridged_metadata_t bridged; + PortId_t cpu_port; + int_report_metadata_t int_report_md; + int_metadata_t int_md; + bit<16> int_ipv4_len; + bool is_int_recirc; + bit<16> pkt_length; +} + +header fake_ethernet_t { + @padding + bit<48> _pad0; + @padding + bit<48> _pad1; + bit<16> ether_type; +} + +struct ingress_headers_t { + packet_out_header_t packet_out; + packet_in_header_t packet_in; + fake_ethernet_t fake_ethernet; + ethernet_t ethernet; + vlan_tag_t vlan_tag; + eth_type_t eth_type; + mpls_t mpls; + ipv4_t ipv4; + ipv6_t ipv6; + tcp_t tcp; + udp_t udp; + icmp_t icmp; + gtpu_t gtpu; + gtpu_options_t gtpu_options; + gtpu_ext_psc_t gtpu_ext_psc; + vxlan_t vxlan; + ethernet_t inner_ethernet; + eth_type_t inner_eth_type; + ipv4_t inner_ipv4; + tcp_t inner_tcp; + udp_t inner_udp; + icmp_t inner_icmp; +} + +struct egress_headers_t { + packet_in_header_t packet_in; + fake_ethernet_t fake_ethernet; + ethernet_t report_ethernet; + eth_type_t report_eth_type; + mpls_t report_mpls; + ipv4_t report_ipv4; + udp_t report_udp; + report_fixed_header_t report_fixed_header; + common_report_header_t common_report_header; + local_report_header_t local_report_header; + drop_report_header_t drop_report_header; + ethernet_t ethernet; + vlan_tag_t vlan_tag; + eth_type_t eth_type; + mpls_t mpls; + ipv4_t ipv4; + ipv6_t ipv6; + udp_t udp; +} + +struct fabric_v1model_metadata_t { + bool skip_egress; + bool do_upf_uplink_recirc; + bit<1> drop_ctl; + IntReportType_t int_mirror_type; + fabric_ingress_metadata_t ingress; + fabric_egress_metadata_t egress; + @field_list(PRESERVE_INT_MD) + IntReportType_t recirc_preserved_report_type; + @field_list(PRESERVE_INT_MD) + FabricPortId_t recirc_preserved_egress_port; + @field_list(PRESERVE_INT_MD) + IntDropReason_t recirc_preserved_drop_reason; + @field_list(PRESERVE_INGRESS_PORT) + FabricPortId_t recirc_preserved_ingress_port; +} + +struct v1model_header_t { + ingress_headers_t ingress; + egress_headers_t egress; +} + +parser FabricParser(packet_in packet, out v1model_header_t hdr, inout fabric_v1model_metadata_t fabric_md, inout standard_metadata_t standard_md) { + state start { + fabric_md.egress.pkt_length = (bit<16>)standard_md.packet_length; + fabric_md.ingress.bridged.setValid(); + fabric_md.ingress.bridged.bmd_type = BridgedMdType_t.INGRESS_TO_EGRESS; + fabric_md.ingress.bridged.base.ig_port = standard_md.ingress_port; + fabric_md.recirc_preserved_ingress_port = (FabricPortId_t)standard_md.ingress_port; + fabric_md.ingress.bridged.base.ig_tstamp = standard_md.ingress_global_timestamp; + fabric_md.ingress.egress_port_set = false; + fabric_md.ingress.punt_to_cpu = false; + fabric_md.ingress.bridged.base.ip_eth_type = 0; + fabric_md.ingress.bridged.int_bmd.drop_reason = IntDropReason_t.DROP_REASON_UNKNOWN; + fabric_md.ingress.bridged.int_bmd.wip_type = INT_IS_NOT_WIP; + fabric_md.ingress.bridged.base.encap_presence = EncapPresence.NONE; + fabric_md.ingress.upf_meter_color = MeterColor_t.GREEN; + transition check_ethernet; + } + state check_ethernet { + fake_ethernet_t tmp = packet.lookahead(); + transition select(tmp.ether_type) { + ETHERTYPE_CPU_LOOPBACK_INGRESS: parse_fake_ethernet; + ETHERTYPE_CPU_LOOPBACK_EGRESS: parse_fake_ethernet_and_accept; + ETHERTYPE_PACKET_OUT: check_packet_out; + ETHERTYPE_INT_WIP_IPV4: parse_int_wip_ipv4; + ETHERTYPE_INT_WIP_MPLS: parse_int_wip_mpls; + default: parse_ethernet; + } + } + state check_packet_out { + packet_out_header_t tmp = packet.lookahead(); + transition select(tmp.do_forwarding) { + 0: parse_packet_out_and_accept; + default: strip_packet_out; + } + } + state parse_int_wip_ipv4 { + hdr.ingress.ethernet.setValid(); + hdr.ingress.eth_type.setValid(); + hdr.ingress.eth_type.value = ETHERTYPE_IPV4; + fabric_md.ingress.bridged.int_bmd.wip_type = INT_IS_WIP; + fabric_md.ingress.bridged.base.mpls_label = 0; + fabric_md.ingress.bridged.base.mpls_ttl = DEFAULT_MPLS_TTL + 1; + packet.advance(14 * 8); + transition parse_ipv4; + } + state parse_int_wip_mpls { + hdr.ingress.ethernet.setValid(); + hdr.ingress.eth_type.setValid(); + hdr.ingress.eth_type.value = ETHERTYPE_MPLS; + fabric_md.ingress.bridged.int_bmd.wip_type = INT_IS_WIP_WITH_MPLS; + packet.advance(14 * 8); + transition parse_mpls; + } + state parse_packet_out_and_accept { + packet.extract(hdr.ingress.packet_out); + transition accept; + } + state strip_packet_out { + packet.advance(14 * 8); + transition parse_ethernet; + } + state parse_fake_ethernet { + packet.extract(hdr.ingress.fake_ethernet); + fake_ethernet_t tmp = packet.lookahead(); + transition select(tmp.ether_type) { + ETHERTYPE_INT_WIP_IPV4: parse_int_wip_ipv4; + ETHERTYPE_INT_WIP_MPLS: parse_int_wip_mpls; + default: parse_ethernet; + } + } + state parse_fake_ethernet_and_accept { + packet.extract(hdr.ingress.fake_ethernet); + transition accept; + } + state parse_ethernet { + packet.extract(hdr.ingress.ethernet); + transition select(packet.lookahead>()) { + ETHERTYPE_QINQ: parse_vlan_tag; + ETHERTYPE_VLAN &&& 0xefff: parse_vlan_tag; + default: parse_untagged; + } + } + state parse_vlan_tag { + packet.extract(hdr.ingress.vlan_tag); + fabric_md.ingress.bridged.base.vlan_id = hdr.ingress.vlan_tag.vlan_id; + transition select(packet.lookahead>()) { + default: parse_eth_type; + } + } + state parse_untagged { + fabric_md.ingress.bridged.base.vlan_id = DEFAULT_VLAN_ID; + transition parse_eth_type; + } + state parse_eth_type { + packet.extract(hdr.ingress.eth_type); + transition select(hdr.ingress.eth_type.value) { + ETHERTYPE_MPLS: parse_mpls; + ETHERTYPE_IPV4: parse_non_mpls; + ETHERTYPE_IPV6: parse_non_mpls; + default: accept; + } + } + state parse_mpls { + packet.extract(hdr.ingress.mpls); + fabric_md.ingress.bridged.base.mpls_label = hdr.ingress.mpls.label; + fabric_md.ingress.bridged.base.mpls_ttl = hdr.ingress.mpls.ttl; + transition select(packet.lookahead>()) { + 4: parse_ipv4; + 6: parse_ipv6; + default: reject_packet; + } + } + state reject_packet { + verify(false, error.PacketRejectedByParser); + transition accept; + } + state parse_non_mpls { + fabric_md.ingress.bridged.base.mpls_label = 0; + fabric_md.ingress.bridged.base.mpls_ttl = DEFAULT_MPLS_TTL + 1; + transition select(hdr.ingress.eth_type.value) { + ETHERTYPE_IPV4: parse_ipv4; + ETHERTYPE_IPV6: parse_ipv6; + default: accept; + } + } + state parse_ipv4 { + packet.extract(hdr.ingress.ipv4); + fabric_md.ingress.routing_ipv4_dst = hdr.ingress.ipv4.dst_addr; + fabric_md.ingress.bridged.base.ip_eth_type = ETHERTYPE_IPV4; + transition select(hdr.ingress.ipv4.protocol) { + PROTO_TCP: parse_tcp; + PROTO_UDP: parse_udp; + PROTO_ICMP: parse_icmp; + default: accept; + } + } + state parse_ipv6 { + packet.extract(hdr.ingress.ipv6); + fabric_md.ingress.bridged.base.ip_eth_type = ETHERTYPE_IPV6; + transition select(hdr.ingress.ipv6.next_hdr) { + PROTO_TCP: parse_tcp; + PROTO_UDP: parse_udp; + PROTO_ICMPV6: parse_icmp; + default: accept; + } + } + state parse_icmp { + packet.extract(hdr.ingress.icmp); + transition accept; + } + state parse_tcp { + packet.extract(hdr.ingress.tcp); + transition accept; + } + state parse_udp { + packet.extract(hdr.ingress.udp); + gtpu_t gtpu = packet.lookahead(); + transition select(hdr.ingress.udp.dport, gtpu.version, gtpu.msgtype) { + (GTPU_UDP_PORT, GTP_V1, GTPU_GPDU): parse_gtpu; + (VXLAN_UDP_PORT, default, default): parse_vxlan; + default: accept; + } + } + state parse_gtpu { + packet.extract(hdr.ingress.gtpu); + transition select(hdr.ingress.gtpu.ex_flag, hdr.ingress.gtpu.seq_flag, hdr.ingress.gtpu.npdu_flag) { + (0, 0, 0): set_gtpu_only; + default: parse_gtpu_options; + } + } + state set_gtpu_only { + fabric_md.ingress.bridged.base.encap_presence = EncapPresence.GTPU_ONLY; + transition parse_inner_ipv4; + } + state parse_gtpu_options { + packet.extract(hdr.ingress.gtpu_options); + bit<8> gtpu_ext_len = packet.lookahead>(); + transition select(hdr.ingress.gtpu_options.next_ext, gtpu_ext_len) { + (GTPU_NEXT_EXT_PSC, GTPU_EXT_PSC_LEN): parse_gtpu_ext_psc; + default: accept; + } + } + state parse_gtpu_ext_psc { + packet.extract(hdr.ingress.gtpu_ext_psc); + fabric_md.ingress.bridged.base.encap_presence = EncapPresence.GTPU_WITH_PSC; + transition select(hdr.ingress.gtpu_ext_psc.next_ext) { + GTPU_NEXT_EXT_NONE: parse_inner_ipv4; + default: accept; + } + } + state parse_vxlan { + packet.extract(hdr.ingress.vxlan); + fabric_md.ingress.bridged.base.encap_presence = EncapPresence.VXLAN; + transition parse_inner_ethernet; + } + state parse_inner_ethernet { + packet.extract(hdr.ingress.inner_ethernet); + packet.extract(hdr.ingress.inner_eth_type); + transition select(hdr.ingress.inner_eth_type.value) { + ETHERTYPE_IPV4: parse_inner_ipv4; + default: accept; + } + } + state parse_inner_ipv4 { + packet.extract(hdr.ingress.inner_ipv4); + transition select(hdr.ingress.inner_ipv4.protocol) { + PROTO_TCP: parse_inner_tcp; + PROTO_UDP: parse_inner_udp; + PROTO_ICMP: parse_inner_icmp; + default: accept; + } + } + state parse_inner_tcp { + packet.extract(hdr.ingress.inner_tcp); + transition accept; + } + state parse_inner_udp { + packet.extract(hdr.ingress.inner_udp); + transition accept; + } + state parse_inner_icmp { + packet.extract(hdr.ingress.inner_icmp); + transition accept; + } +} + +control FabricDeparser(packet_out packet, in v1model_header_t hdr) { + apply { + packet.emit(hdr.ingress.fake_ethernet); + packet.emit(hdr.ingress.packet_in); + packet.emit(hdr.egress.report_ethernet); + packet.emit(hdr.egress.report_eth_type); + packet.emit(hdr.egress.report_mpls); + packet.emit(hdr.egress.report_ipv4); + packet.emit(hdr.egress.report_udp); + packet.emit(hdr.egress.report_fixed_header); + packet.emit(hdr.egress.common_report_header); + packet.emit(hdr.egress.local_report_header); + packet.emit(hdr.egress.drop_report_header); + packet.emit(hdr.ingress.ethernet); + packet.emit(hdr.ingress.vlan_tag); + packet.emit(hdr.ingress.eth_type); + packet.emit(hdr.ingress.mpls); + packet.emit(hdr.ingress.ipv4); + packet.emit(hdr.ingress.ipv6); + packet.emit(hdr.ingress.tcp); + packet.emit(hdr.ingress.udp); + packet.emit(hdr.ingress.icmp); + packet.emit(hdr.ingress.gtpu); + packet.emit(hdr.ingress.gtpu_options); + packet.emit(hdr.ingress.gtpu_ext_psc); + packet.emit(hdr.ingress.vxlan); + packet.emit(hdr.ingress.inner_ethernet); + packet.emit(hdr.ingress.inner_eth_type); + packet.emit(hdr.ingress.inner_ipv4); + packet.emit(hdr.ingress.inner_tcp); + packet.emit(hdr.ingress.inner_udp); + packet.emit(hdr.ingress.inner_icmp); + } +} + +control Acl(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout FabricPortId_t recirc_preserved_egress_port, inout bit<1> drop_ctl) { + direct_counter(CounterType.packets_and_bytes) acl_counter; + action set_next_id_acl(next_id_t next_id) { + fabric_md.next_id = next_id; + acl_counter.count(); + fabric_md.skip_next = false; + drop_ctl = 0; + } + action copy_to_cpu() { + clone_preserving_field_list(CloneType.I2E, (bit<32>)PACKET_IN_MIRROR_SESSION_ID, PRESERVE_INGRESS_PORT); + acl_counter.count(); + } + action punt_to_cpu() { + copy_to_cpu(); + fabric_md.skip_next = true; + fabric_md.punt_to_cpu = true; + drop_ctl = 1; + } + action drop() { + drop_ctl = 1; + fabric_md.skip_next = true; + fabric_md.bridged.int_bmd.drop_reason = IntDropReason_t.DROP_REASON_ACL_DENY; + acl_counter.count(); + } + action set_output_port(FabricPortId_t port_num) { + standard_md.egress_spec = (PortId_t)port_num; + recirc_preserved_egress_port = port_num; + fabric_md.egress_port_set = true; + fabric_md.skip_next = true; + drop_ctl = 0; + acl_counter.count(); + } + action nop_acl() { + acl_counter.count(); + } + table acl { + key = { + fabric_md.bridged.base.ig_port: ternary @name("ig_port") ; + fabric_md.lkp.eth_dst : ternary @name("eth_dst") ; + fabric_md.lkp.eth_src : ternary @name("eth_src") ; + fabric_md.lkp.vlan_id : ternary @name("vlan_id") ; + fabric_md.lkp.eth_type : ternary @name("eth_type") ; + fabric_md.lkp.ipv4_src : ternary @name("ipv4_src") ; + fabric_md.lkp.ipv4_dst : ternary @name("ipv4_dst") ; + fabric_md.lkp.ip_proto : ternary @name("ip_proto") ; + fabric_md.lkp.icmp_type : ternary @name("icmp_type") ; + fabric_md.lkp.icmp_code : ternary @name("icmp_code") ; + fabric_md.lkp.l4_sport : ternary @name("l4_sport") ; + fabric_md.lkp.l4_dport : ternary @name("l4_dport") ; + fabric_md.ig_port_type : ternary @name("ig_port_type") ; + } + actions = { + set_next_id_acl; + punt_to_cpu; + copy_to_cpu; + drop; + set_output_port; + nop_acl; + } + const default_action = nop_acl(); + size = 1024; + counters = acl_counter; + } + apply { + acl.apply(); + } +} + +control Next(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout FabricPortId_t recirc_preserved_egress_port) { + @hidden action output(FabricPortId_t port_num) { + standard_md.egress_spec = (PortId_t)port_num; + recirc_preserved_egress_port = port_num; + fabric_md.egress_port_set = true; + } + @hidden action rewrite_smac(mac_addr_t smac) { + hdr.ethernet.src_addr = smac; + } + @hidden action rewrite_dmac(mac_addr_t dmac) { + hdr.ethernet.dst_addr = dmac; + } + @hidden action routing(FabricPortId_t port_num, mac_addr_t smac, mac_addr_t dmac) { + rewrite_smac(smac); + rewrite_dmac(dmac); + output(port_num); + } + direct_counter(CounterType.packets_and_bytes) simple_counter; + action output_simple(FabricPortId_t port_num) { + output(port_num); + simple_counter.count(); + } + action routing_simple(FabricPortId_t port_num, mac_addr_t smac, mac_addr_t dmac) { + routing(port_num, smac, dmac); + simple_counter.count(); + } + table simple { + key = { + fabric_md.next_id: exact @name("next_id") ; + } + actions = { + output_simple; + routing_simple; + @defaultonly nop; + } + const default_action = nop(); + counters = simple_counter; + size = 1024; + } + @max_group_size(32w16) action_selector(HashAlgorithm.crc16, 32w16, 32w16) hashed_profile; + direct_counter(CounterType.packets_and_bytes) hashed_counter; + action output_hashed(FabricPortId_t port_num) { + output(port_num); + hashed_counter.count(); + } + action routing_hashed(FabricPortId_t port_num, mac_addr_t smac, mac_addr_t dmac) { + routing(port_num, smac, dmac); + hashed_counter.count(); + } + table hashed { + key = { + fabric_md.next_id : exact @name("next_id") ; + fabric_md.ecmp_hash: selector; + } + actions = { + output_hashed; + routing_hashed; + @defaultonly nop; + } + implementation = hashed_profile; + counters = hashed_counter; + const default_action = nop(); + size = 1024; + } + direct_counter(CounterType.packets_and_bytes) multicast_counter; + action set_mcast_group_id(MulticastGroupId_t group_id) { + standard_md.mcast_grp = group_id; + fabric_md.bridged.base.is_multicast = true; + multicast_counter.count(); + } + action reset_mcast_group_id() { + standard_md.mcast_grp = 0; + fabric_md.bridged.base.is_multicast = false; + } + table multicast { + key = { + fabric_md.next_id: exact @name("next_id") ; + } + actions = { + set_mcast_group_id; + @defaultonly reset_mcast_group_id; + } + counters = multicast_counter; + const default_action = reset_mcast_group_id(); + size = 1024; + } + apply { + simple.apply(); + hashed.apply(); + multicast.apply(); + } +} + +control EgressNextControl(inout ingress_headers_t hdr, inout fabric_egress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout IntDropReason_t recirc_preserved_drop_reason, inout bit<1> drop_ctl) { + @hidden action pop_mpls_if_present() { + hdr.mpls.setInvalid(); + hdr.eth_type.value = fabric_md.bridged.base.ip_eth_type; + } + @hidden action set_mpls() { + hdr.mpls.setValid(); + hdr.mpls.label = fabric_md.bridged.base.mpls_label; + hdr.mpls.tc = 3w0; + hdr.mpls.bos = 1w1; + hdr.mpls.ttl = fabric_md.bridged.base.mpls_ttl; + hdr.eth_type.value = ETHERTYPE_MPLS; + } + @hidden action push_outer_vlan() { + hdr.vlan_tag.setValid(); + hdr.vlan_tag.eth_type = ETHERTYPE_VLAN; + hdr.vlan_tag.vlan_id = fabric_md.bridged.base.vlan_id; + } + direct_counter(CounterType.packets_and_bytes) egress_vlan_counter; + action push_vlan() { + push_outer_vlan(); + egress_vlan_counter.count(); + } + action pop_vlan() { + hdr.vlan_tag.setInvalid(); + egress_vlan_counter.count(); + } + action drop() { + drop_ctl = 1; + egress_vlan_counter.count(); + recirc_preserved_drop_reason = IntDropReason_t.DROP_REASON_EGRESS_NEXT_MISS; + } + table egress_vlan { + key = { + fabric_md.bridged.base.vlan_id: exact @name("vlan_id") ; + standard_md.egress_port : exact @name("eg_port") ; + } + actions = { + push_vlan; + pop_vlan; + @defaultonly drop; + } + const default_action = drop(); + counters = egress_vlan_counter; + size = 1024; + } + apply { + if (fabric_md.bridged.base.is_multicast && fabric_md.bridged.base.ig_port == standard_md.egress_port) { + fabric_md.bridged.int_bmd.report_type = INT_REPORT_TYPE_NO_REPORT; + drop_ctl = 1; + } + if (fabric_md.bridged.base.mpls_label == 0) { + if (hdr.mpls.isValid()) { + pop_mpls_if_present(); + } + } else { + set_mpls(); + } + if (!fabric_md.is_int_recirc) { + egress_vlan.apply(); + } + bool regular_packet = true; + regular_packet = !(fabric_md.bridged.bmd_type == BridgedMdType_t.INT_INGRESS_DROP || fabric_md.bridged.bmd_type == BridgedMdType_t.EGRESS_MIRROR); + if (hdr.mpls.isValid()) { + hdr.mpls.ttl = hdr.mpls.ttl - 1; + if (hdr.mpls.ttl == 0) { + drop_ctl = 1; + recirc_preserved_drop_reason = IntDropReason_t.DROP_REASON_MPLS_TTL_ZERO; + } + } else { + if (hdr.ipv4.isValid() && fabric_md.bridged.base.fwd_type != FWD_BRIDGING) { + if (regular_packet) { + hdr.ipv4.ttl = hdr.ipv4.ttl - 1; + } + if (hdr.ipv4.ttl == 0) { + drop_ctl = 1; + recirc_preserved_drop_reason = IntDropReason_t.DROP_REASON_IP_TTL_ZERO; + } + } else if (hdr.ipv6.isValid() && fabric_md.bridged.base.fwd_type != FWD_BRIDGING) { + if (regular_packet) { + hdr.ipv6.hop_limit = hdr.ipv6.hop_limit - 1; + } + if (hdr.ipv6.hop_limit == 0) { + drop_ctl = 1; + recirc_preserved_drop_reason = IntDropReason_t.DROP_REASON_IP_TTL_ZERO; + } + } + } + } +} + +const bit<10> UNSET_FLOW_ID = 0; +control StatsIngress(in lookup_metadata_t lkp, in PortId_t ig_port, out bit<10> stats_flow_id) { + direct_counter(CounterType.packets_and_bytes) flow_counter; + action count(bit<10> flow_id) { + stats_flow_id = flow_id; + flow_counter.count(); + } + table flows { + key = { + lkp.ipv4_src: ternary @name("ipv4_src") ; + lkp.ipv4_dst: ternary @name("ipv4_dst") ; + lkp.ip_proto: ternary @name("ip_proto") ; + lkp.l4_sport: ternary @name("l4_sport") ; + lkp.l4_dport: ternary @name("l4_dport") ; + ig_port : exact @name("ig_port") ; + } + actions = { + count; + } + const default_action = count(UNSET_FLOW_ID); + const size = 1 << 10; + counters = flow_counter; + } + apply { + flows.apply(); + } +} + +control StatsEgress(in bit<10> stats_flow_id, in PortId_t eg_port, in BridgedMdType_t bmd_type) { + direct_counter(CounterType.packets_and_bytes) flow_counter; + action count() { + flow_counter.count(); + } + table flows { + key = { + stats_flow_id: exact @name("stats_flow_id") ; + eg_port : exact @name("eg_port") ; + } + actions = { + count; + } + const default_action = count; + const size = 1 << 10; + counters = flow_counter; + } + apply { + if (bmd_type == BridgedMdType_t.INGRESS_TO_EGRESS) { + flows.apply(); + } + } +} + +control Hasher(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md) { + flow_hash_t max = 0xffffffff; + flow_hash_t base = 0; + apply { + hash(fabric_md.bridged.base.inner_hash, HashAlgorithm.crc32, base, { fabric_md.lkp.ipv4_src, fabric_md.lkp.ipv4_dst, fabric_md.lkp.ip_proto, fabric_md.lkp.l4_sport, fabric_md.lkp.l4_dport }, max); + if (hdr.gtpu.isValid()) { + hash(fabric_md.ecmp_hash, HashAlgorithm.crc32, base, { hdr.ipv4.src_addr, hdr.ipv4.dst_addr, hdr.gtpu.teid }, max); + } else if (fabric_md.lkp.is_ipv4) { + fabric_md.ecmp_hash = fabric_md.bridged.base.inner_hash; + } else { + fabric_md.bridged.base.inner_hash = 0; + hash(fabric_md.ecmp_hash, HashAlgorithm.crc32, base, { hdr.ethernet.dst_addr, hdr.ethernet.src_addr, hdr.eth_type.value }, max); + } + } +} + +control IngressSliceTcClassifier(inout ingress_headers_t hdr, inout standard_metadata_t standard_md, inout fabric_ingress_metadata_t fabric_md) { + direct_counter(CounterType.packets) classifier_stats; + action set_slice_id_tc(slice_id_t slice_id, tc_t tc) { + fabric_md.slice_id = slice_id; + fabric_md.tc = tc; + fabric_md.tc_unknown = false; + classifier_stats.count(); + } + action no_classification() { + set_slice_id_tc(DEFAULT_SLICE_ID, DEFAULT_TC); + fabric_md.tc_unknown = true; + } + action trust_dscp() { + fabric_md.slice_id = hdr.ipv4.dscp[4 + 2 - 1:2]; + fabric_md.tc = hdr.ipv4.dscp[2 - 1:0]; + fabric_md.tc_unknown = false; + classifier_stats.count(); + } + table classifier { + key = { + fabric_md.bridged.base.ig_port: ternary @name("ig_port") ; + fabric_md.lkp.ipv4_src : ternary @name("ipv4_src") ; + fabric_md.lkp.ipv4_dst : ternary @name("ipv4_dst") ; + fabric_md.lkp.ip_proto : ternary @name("ip_proto") ; + fabric_md.lkp.l4_sport : ternary @name("l4_sport") ; + fabric_md.lkp.l4_dport : ternary @name("l4_dport") ; + } + actions = { + set_slice_id_tc; + trust_dscp; + @defaultonly no_classification; + } + const default_action = no_classification(); + counters = classifier_stats; + size = 512; + } + apply { + classifier.apply(); + } +} + +control IngressQos(inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout bit<1> drop_ctl) { + bit<2> packet_color = 2w0; + @hidden action use_upf() { + fabric_md.bridged.base.slice_tc = fabric_md.upf_slice_id ++ fabric_md.upf_tc; + } + @hidden action use_default() { + fabric_md.bridged.base.slice_tc = fabric_md.slice_id ++ fabric_md.tc; + } + @hidden table set_slice_tc { + key = { + fabric_md.is_upf_hit: exact; + } + actions = { + use_upf; + use_default; + } + const size = 2; + const entries = { + true : use_upf; + false : use_default; + } + } + meter(1 << 4 + 2, MeterType.bytes) slice_tc_meter; + direct_counter(CounterType.packets) queues_stats; + action set_queue(QueueId_t qid) { + queues_stats.count(); + } + action meter_drop() { + drop_ctl = 1; + fabric_md.bridged.int_bmd.drop_reason = IntDropReason_t.DROP_REASON_INGRESS_QOS_METER; + queues_stats.count(); + } + table queues { + key = { + fabric_md.bridged.base.slice_tc: exact @name("slice_tc") ; + packet_color : ternary @name("color") ; + } + actions = { + set_queue; + meter_drop; + } + const default_action = set_queue(QUEUE_ID_BEST_EFFORT); + counters = queues_stats; + size = 1 << 4 + 2 + 1; + } + action set_default_tc(tc_t tc) { + fabric_md.bridged.base.slice_tc = fabric_md.bridged.base.slice_tc[4 + 2 - 1:2] ++ tc; + } + table default_tc { + key = { + fabric_md.bridged.base.slice_tc: ternary @name("slice_tc") ; + fabric_md.tc_unknown : exact @name("tc_unknown") ; + } + actions = { + set_default_tc; + @defaultonly nop; + } + const default_action = nop; + size = 1 << 4; + } + apply { + set_slice_tc.apply(); + default_tc.apply(); + if (fabric_md.upf_meter_color != MeterColor_t.RED) { + slice_tc_meter.execute_meter((bit<32>)fabric_md.bridged.base.slice_tc, packet_color); + } else { + packet_color = MeterColor_t.RED; + } + queues.apply(); + } +} + +control EgressDscpRewriter(inout fabric_egress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout ingress_headers_t hdr) { + bit<6> tmp_dscp = fabric_md.bridged.base.slice_tc; + action rewrite() { + } + action clear() { + tmp_dscp = 0; + } + table rewriter { + key = { + standard_md.egress_port: exact @name("eg_port") ; + } + actions = { + rewrite; + clear; + @defaultonly nop; + } + const default_action = nop; + size = 512; + } + apply { + if (rewriter.apply().hit) { + if (hdr.ipv4.isValid()) { + hdr.ipv4.dscp = tmp_dscp; + } + } + } +} + +control FabricVerifyChecksum(inout v1model_header_t hdr, inout fabric_v1model_metadata_t meta) { + apply { + verify_checksum(hdr.ingress.ipv4.isValid(), { hdr.ingress.ipv4.version, hdr.ingress.ipv4.ihl, hdr.ingress.ipv4.dscp, hdr.ingress.ipv4.ecn, hdr.ingress.ipv4.total_len, hdr.ingress.ipv4.identification, hdr.ingress.ipv4.flags, hdr.ingress.ipv4.frag_offset, hdr.ingress.ipv4.ttl, hdr.ingress.ipv4.protocol, hdr.ingress.ipv4.src_addr, hdr.ingress.ipv4.dst_addr }, hdr.ingress.ipv4.hdr_checksum, HashAlgorithm.csum16); + verify_checksum(hdr.ingress.inner_ipv4.isValid(), { hdr.ingress.inner_ipv4.version, hdr.ingress.inner_ipv4.ihl, hdr.ingress.inner_ipv4.dscp, hdr.ingress.inner_ipv4.ecn, hdr.ingress.inner_ipv4.total_len, hdr.ingress.inner_ipv4.identification, hdr.ingress.inner_ipv4.flags, hdr.ingress.inner_ipv4.frag_offset, hdr.ingress.inner_ipv4.ttl, hdr.ingress.inner_ipv4.protocol, hdr.ingress.inner_ipv4.src_addr, hdr.ingress.inner_ipv4.dst_addr }, hdr.ingress.inner_ipv4.hdr_checksum, HashAlgorithm.csum16); + } +} + +control FabricComputeChecksum(inout v1model_header_t hdr, inout fabric_v1model_metadata_t fabric_md) { + apply { + update_checksum(hdr.ingress.ipv4.isValid(), { hdr.ingress.ipv4.version, hdr.ingress.ipv4.ihl, hdr.ingress.ipv4.dscp, hdr.ingress.ipv4.ecn, hdr.ingress.ipv4.total_len, hdr.ingress.ipv4.identification, hdr.ingress.ipv4.flags, hdr.ingress.ipv4.frag_offset, hdr.ingress.ipv4.ttl, hdr.ingress.ipv4.protocol, hdr.ingress.ipv4.src_addr, hdr.ingress.ipv4.dst_addr }, hdr.ingress.ipv4.hdr_checksum, HashAlgorithm.csum16); + update_checksum(hdr.ingress.inner_ipv4.isValid(), { hdr.ingress.inner_ipv4.version, hdr.ingress.inner_ipv4.ihl, hdr.ingress.inner_ipv4.dscp, hdr.ingress.inner_ipv4.ecn, hdr.ingress.inner_ipv4.total_len, hdr.ingress.inner_ipv4.identification, hdr.ingress.inner_ipv4.flags, hdr.ingress.inner_ipv4.frag_offset, hdr.ingress.inner_ipv4.ttl, hdr.ingress.inner_ipv4.protocol, hdr.ingress.inner_ipv4.src_addr, hdr.ingress.inner_ipv4.dst_addr }, hdr.ingress.inner_ipv4.hdr_checksum, HashAlgorithm.csum16); + update_checksum(hdr.egress.report_ipv4.isValid(), { hdr.egress.report_ipv4.version, hdr.egress.report_ipv4.ihl, hdr.egress.report_ipv4.dscp, hdr.egress.report_ipv4.ecn, hdr.egress.report_ipv4.total_len, hdr.egress.report_ipv4.identification, hdr.egress.report_ipv4.flags, hdr.egress.report_ipv4.frag_offset, hdr.egress.report_ipv4.ttl, hdr.egress.report_ipv4.protocol, hdr.egress.report_ipv4.src_addr, hdr.egress.report_ipv4.dst_addr }, hdr.egress.report_ipv4.hdr_checksum, HashAlgorithm.csum16); + } +} + +control PacketIoIngress(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout bool skip_egress, inout standard_metadata_t standard_md, inout FabricPortId_t recirc_preserved_egress_port) { + @hidden action do_packet_out() { + standard_md.egress_spec = (PortId_t)hdr.packet_out.egress_port; + recirc_preserved_egress_port = hdr.packet_out.egress_port; + fabric_md.egress_port_set = true; + hdr.packet_out.setInvalid(); + skip_egress = true; + fabric_md.bridged.setInvalid(); + exit; + } + apply { + if (hdr.packet_out.isValid()) { + do_packet_out(); + } + } +} + +control PacketIoEgress(inout ingress_headers_t hdr, inout fabric_egress_metadata_t fabric_md, inout standard_metadata_t standard_md, in FabricPortId_t preserved_ig_port) { + action set_switch_info(FabricPortId_t cpu_port) { + fabric_md.cpu_port = (PortId_t)cpu_port; + } + table switch_info { + actions = { + set_switch_info; + @defaultonly nop; + } + default_action = nop; + const size = 1; + } + apply { + switch_info.apply(); + if (standard_md.egress_port == fabric_md.cpu_port) { + hdr.packet_in.setValid(); + hdr.packet_in.ingress_port = preserved_ig_port; + hdr.fake_ethernet.setInvalid(); + exit; + } + if (hdr.fake_ethernet.isValid() && hdr.fake_ethernet.ether_type == ETHERTYPE_CPU_LOOPBACK_EGRESS) { + fabric_md.pkt_length = (bit<16>)standard_md.packet_length - 14; + } + } +} + +control PreNext(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md) { + direct_counter(CounterType.packets_and_bytes) next_mpls_counter; + action set_mpls_label(mpls_label_t label) { + fabric_md.bridged.base.mpls_label = label; + next_mpls_counter.count(); + } + table next_mpls { + key = { + fabric_md.next_id: exact @name("next_id") ; + } + actions = { + set_mpls_label; + @defaultonly nop; + } + const default_action = nop(); + counters = next_mpls_counter; + size = 1024; + } + direct_counter(CounterType.packets_and_bytes) next_vlan_counter; + action set_vlan(vlan_id_t vlan_id) { + fabric_md.bridged.base.vlan_id = vlan_id; + next_vlan_counter.count(); + } + table next_vlan { + key = { + fabric_md.next_id: exact @name("next_id") ; + } + actions = { + set_vlan; + @defaultonly nop; + } + const default_action = nop(); + counters = next_vlan_counter; + size = 1024; + } + apply { + next_mpls.apply(); + next_vlan.apply(); + } +} + +control Filtering(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md) { + direct_counter(CounterType.packets_and_bytes) ingress_port_vlan_counter; + action deny() { + fabric_md.skip_forwarding = true; + fabric_md.skip_next = true; + fabric_md.ig_port_type = PortType_t.UNKNOWN; + fabric_md.bridged.int_bmd.drop_reason = IntDropReason_t.DROP_REASON_PORT_VLAN_MAPPING_MISS; + ingress_port_vlan_counter.count(); + } + action permit(PortType_t port_type) { + fabric_md.ig_port_type = port_type; + ingress_port_vlan_counter.count(); + } + action permit_with_internal_vlan(vlan_id_t vlan_id, PortType_t port_type) { + fabric_md.bridged.base.vlan_id = vlan_id; + permit(port_type); + } + table ingress_port_vlan { + key = { + fabric_md.bridged.base.ig_port: exact @name("ig_port") ; + hdr.vlan_tag.isValid() : exact @name("vlan_is_valid") ; + hdr.vlan_tag.vlan_id : ternary @name("vlan_id") ; + } + actions = { + deny(); + permit(); + permit_with_internal_vlan(); + } + const default_action = deny(); + counters = ingress_port_vlan_counter; + size = 1024; + } + direct_counter(CounterType.packets_and_bytes) fwd_classifier_counter; + action set_forwarding_type(fwd_type_t fwd_type) { + fabric_md.bridged.base.fwd_type = fwd_type; + fwd_classifier_counter.count(); + } + counter(8, CounterType.packets_and_bytes) fwd_type_counter; + table fwd_classifier { + key = { + fabric_md.bridged.base.ig_port : exact @name("ig_port") ; + fabric_md.lkp.eth_dst : ternary @name("eth_dst") ; + fabric_md.lkp.eth_type : ternary @name("eth_type") ; + fabric_md.bridged.base.ip_eth_type: exact @name("ip_eth_type") ; + } + actions = { + set_forwarding_type; + } + const default_action = set_forwarding_type(FWD_BRIDGING); + counters = fwd_classifier_counter; + size = 1024; + } + apply { + ingress_port_vlan.apply(); + fwd_classifier.apply(); + fwd_type_counter.count((bit<32>)fabric_md.bridged.base.fwd_type); + } +} + +control Forwarding(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout bit<1> drop_ctl) { + action set_int_drop_reason(bit<8> drop_reason) { + fabric_md.bridged.int_bmd.drop_reason = (IntDropReason_t)drop_reason; + } + @hidden action set_next_id(next_id_t next_id) { + fabric_md.next_id = next_id; + } + direct_counter(CounterType.packets_and_bytes) bridging_counter; + action set_next_id_bridging(next_id_t next_id) { + set_next_id(next_id); + bridging_counter.count(); + } + table bridging { + key = { + fabric_md.bridged.base.vlan_id: exact @name("vlan_id") ; + hdr.ethernet.dst_addr : ternary @name("eth_dst") ; + } + actions = { + set_next_id_bridging; + @defaultonly set_int_drop_reason; + } + const default_action = set_int_drop_reason(IntDropReason_t.DROP_REASON_BRIDGING_MISS); + counters = bridging_counter; + size = 1024; + } + direct_counter(CounterType.packets_and_bytes) mpls_counter; + action pop_mpls_and_next(next_id_t next_id) { + hdr.mpls.setInvalid(); + hdr.eth_type.value = fabric_md.bridged.base.ip_eth_type; + fabric_md.bridged.base.mpls_label = 0; + set_next_id(next_id); + mpls_counter.count(); + } + table mpls { + key = { + fabric_md.bridged.base.mpls_label: exact @name("mpls_label") ; + } + actions = { + pop_mpls_and_next; + @defaultonly set_int_drop_reason; + } + const default_action = set_int_drop_reason(IntDropReason_t.DROP_REASON_MPLS_MISS); + counters = mpls_counter; + size = 1024; + } + direct_counter(CounterType.packets_and_bytes) routing_v4_counter; + action set_next_id_routing_v4(next_id_t next_id) { + set_next_id(next_id); + routing_v4_counter.count(); + } + action nop_routing_v4() { + routing_v4_counter.count(); + } + action drop_routing_v4() { + fabric_md.skip_next = true; + routing_v4_counter.count(); + drop_ctl = 1; + } + table routing_v4 { + key = { + fabric_md.routing_ipv4_dst: lpm @name("ipv4_dst") ; + } + actions = { + set_next_id_routing_v4; + nop_routing_v4; + drop_routing_v4; + @defaultonly set_int_drop_reason; + } + default_action = set_int_drop_reason(IntDropReason_t.DROP_REASON_ROUTING_V4_MISS); + counters = routing_v4_counter; + size = 1024; + } + direct_counter(CounterType.packets_and_bytes) routing_v6_counter; + action set_next_id_routing_v6(next_id_t next_id) { + set_next_id(next_id); + routing_v6_counter.count(); + } + action drop_routing_v6() { + fabric_md.skip_next = true; + routing_v6_counter.count(); + drop_ctl = 1; + } + table routing_v6 { + key = { + hdr.ipv6.dst_addr: lpm @name("ipv6_dst") ; + } + actions = { + set_next_id_routing_v6; + drop_routing_v6; + @defaultonly set_int_drop_reason; + } + default_action = set_int_drop_reason(IntDropReason_t.DROP_REASON_ROUTING_V6_MISS); + counters = routing_v6_counter; + size = 1024; + } + apply { + if (hdr.ethernet.isValid() && fabric_md.bridged.base.fwd_type == FWD_BRIDGING) { + bridging.apply(); + } else if (hdr.mpls.isValid() && fabric_md.bridged.base.fwd_type == FWD_MPLS) { + mpls.apply(); + } else if (fabric_md.lkp.is_ipv4 && (fabric_md.bridged.base.fwd_type == FWD_IPV4_UNICAST || fabric_md.bridged.base.fwd_type == FWD_IPV4_MULTICAST)) { + routing_v4.apply(); + } else if (hdr.ipv6.isValid() && fabric_md.bridged.base.fwd_type == FWD_IPV6_UNICAST) { + routing_v6.apply(); + } + } +} + +control LookupMdInit(in ingress_headers_t hdr, out lookup_metadata_t lkp_md) { + apply { + lkp_md.eth_dst = hdr.ethernet.dst_addr; + lkp_md.eth_src = hdr.ethernet.src_addr; + lkp_md.eth_type = hdr.eth_type.value; + lkp_md.vlan_id = 0; + if (hdr.vlan_tag.isValid()) { + lkp_md.vlan_id = hdr.vlan_tag.vlan_id; + } + lkp_md.is_ipv4 = false; + lkp_md.ipv4_src = 0; + lkp_md.ipv4_dst = 0; + lkp_md.ip_proto = 0; + lkp_md.l4_sport = 0; + lkp_md.l4_dport = 0; + lkp_md.icmp_type = 0; + lkp_md.icmp_code = 0; + if (hdr.inner_ipv4.isValid()) { + lkp_md.is_ipv4 = true; + lkp_md.ipv4_src = hdr.inner_ipv4.src_addr; + lkp_md.ipv4_dst = hdr.inner_ipv4.dst_addr; + lkp_md.ip_proto = hdr.inner_ipv4.protocol; + if (hdr.inner_tcp.isValid()) { + lkp_md.l4_sport = hdr.inner_tcp.sport; + lkp_md.l4_dport = hdr.inner_tcp.dport; + } else if (hdr.inner_udp.isValid()) { + lkp_md.l4_sport = hdr.inner_udp.sport; + lkp_md.l4_dport = hdr.inner_udp.dport; + } else if (hdr.inner_icmp.isValid()) { + lkp_md.icmp_type = hdr.inner_icmp.icmp_type; + lkp_md.icmp_code = hdr.inner_icmp.icmp_code; + } + } else if (hdr.ipv4.isValid()) { + lkp_md.is_ipv4 = true; + lkp_md.ipv4_src = hdr.ipv4.src_addr; + lkp_md.ipv4_dst = hdr.ipv4.dst_addr; + lkp_md.ip_proto = hdr.ipv4.protocol; + if (hdr.tcp.isValid()) { + lkp_md.l4_sport = hdr.tcp.sport; + lkp_md.l4_dport = hdr.tcp.dport; + } else if (hdr.udp.isValid()) { + lkp_md.l4_sport = hdr.udp.sport; + lkp_md.l4_dport = hdr.udp.dport; + } else if (hdr.icmp.isValid()) { + lkp_md.icmp_type = hdr.icmp.icmp_type; + lkp_md.icmp_code = hdr.icmp.icmp_code; + } + } + } +} + +control IntWatchlist(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout IntReportType_t recirc_preserved_report_type) { + direct_counter(CounterType.packets_and_bytes) watchlist_counter; + action mark_to_report() { + fabric_md.bridged.int_bmd.report_type = INT_REPORT_TYPE_FLOW; + recirc_preserved_report_type = INT_REPORT_TYPE_FLOW; + watchlist_counter.count(); + } + action no_report() { + fabric_md.bridged.int_bmd.report_type = INT_REPORT_TYPE_NO_REPORT; + recirc_preserved_report_type = INT_REPORT_TYPE_NO_REPORT; + } + action no_report_collector() { + fabric_md.bridged.int_bmd.report_type = INT_REPORT_TYPE_NO_REPORT; + } + table watchlist { + key = { + fabric_md.lkp.is_ipv4 : exact @name("ipv4_valid") ; + fabric_md.lkp.ipv4_src: ternary @name("ipv4_src") ; + fabric_md.lkp.ipv4_dst: ternary @name("ipv4_dst") ; + fabric_md.lkp.ip_proto: ternary @name("ip_proto") ; + fabric_md.lkp.l4_sport: range @name("l4_sport") ; + fabric_md.lkp.l4_dport: range @name("l4_dport") ; + } + actions = { + mark_to_report; + no_report_collector; + @defaultonly no_report(); + } + const default_action = no_report(); + const size = 64; + counters = watchlist_counter; + } + apply { + watchlist.apply(); + } +} + +control IntIngress(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout bit<1> drop_ctl) { + direct_counter(CounterType.packets_and_bytes) drop_report_counter; + @hidden action report_drop() { + fabric_md.bridged.bmd_type = BridgedMdType_t.INT_INGRESS_DROP; + fabric_md.bridged.int_bmd.report_type = INT_REPORT_TYPE_DROP; + fabric_md.bridged.base.vlan_id = DEFAULT_VLAN_ID; + fabric_md.bridged.base.mpls_label = 0; + drop_ctl = 0; + standard_md.egress_spec = FAKE_V1MODEL_RECIRC_PORT; + drop_report_counter.count(); + } + @hidden table drop_report { + key = { + fabric_md.bridged.int_bmd.report_type: exact @name("int_report_type") ; + drop_ctl : exact @name("drop_ctl") ; + fabric_md.punt_to_cpu : exact @name("punt_to_cpu") ; + fabric_md.egress_port_set : exact @name("egress_port_set") ; + standard_md.mcast_grp : ternary @name("mcast_group_id") ; + } + actions = { + report_drop; + @defaultonly nop; + } + const entries = { + (INT_REPORT_TYPE_FLOW, 1, false, false, default) : report_drop(); + (INT_REPORT_TYPE_FLOW, 1, false, true, default) : report_drop(); + (INT_REPORT_TYPE_FLOW, 0, false, false, 0) : report_drop(); + } + const default_action = nop(); + counters = drop_report_counter; + } + apply { + fabric_md.bridged.int_bmd.egress_port = standard_md.egress_spec; + fabric_md.bridged.int_bmd.queue_id = 0; + drop_report.apply(); + } +} + +control IntEgress(inout v1model_header_t hdr_v1model, inout fabric_v1model_metadata_t fabric_v1model, inout standard_metadata_t standard_md) { + const bit<48> DEFAULT_TIMESTAMP_MASK = 0xffffc0000000; + const bit<32> DEFAULT_HOP_LATENCY_MASK = 0xffffff00; + egress_headers_t hdr = hdr_v1model.egress; + fabric_egress_metadata_t fabric_md = fabric_v1model.egress; + direct_counter(CounterType.packets_and_bytes) report_counter; + direct_counter(CounterType.packets_and_bytes) int_metadata_counter; + QueueId_t egress_qid = 0; + @hidden register>(1024) seq_number; + @hidden action get_seq_number(in bit<32> seq_number_idx, out bit<32> result) { + bit<32> reg = 0; + seq_number.read(reg, seq_number_idx); + reg = reg + 1; + result = reg; + seq_number.write(seq_number_idx, reg); + } + action check_quota() { + } + action reset_quota() { + } + table queue_latency_thresholds { + key = { + egress_qid : exact @name("egress_qid") ; + fabric_md.int_md.hop_latency[31:16]: range @name("hop_latency_upper") ; + fabric_md.int_md.hop_latency[15:0] : range @name("hop_latency_lower") ; + } + actions = { + check_quota; + reset_quota; + @defaultonly nop; + } + default_action = nop(); + const size = 32 * 4; + } + action set_config(bit<32> hop_latency_mask, bit<48> timestamp_mask) { + fabric_md.int_md.hop_latency = fabric_md.int_md.hop_latency & hop_latency_mask; + fabric_md.int_md.timestamp = fabric_md.int_md.timestamp & timestamp_mask; + } + table config { + actions = { + @defaultonly set_config; + } + default_action = set_config(DEFAULT_HOP_LATENCY_MASK, DEFAULT_TIMESTAMP_MASK); + const size = 1; + } + @hidden action _report_encap_common(ipv4_addr_t src_ip, ipv4_addr_t mon_ip, l4_port_t mon_port, bit<32> switch_id) { + random(hdr.report_ipv4.identification, 0, 0xffff); + hdr.report_ipv4.src_addr = src_ip; + hdr.report_ipv4.dst_addr = mon_ip; + hdr.report_udp.dport = mon_port; + get_seq_number((bit<32>)hdr.report_fixed_header.hw_id, hdr.report_fixed_header.seq_no); + hdr.report_fixed_header.dqf = fabric_md.int_report_md.report_type; + hdr.common_report_header.switch_id = switch_id; + hdr.common_report_header.pad1 = 0; + hdr.common_report_header.pad2 = 0; + hdr.common_report_header.pad3 = 0; + hdr.eth_type.value = fabric_md.int_report_md.ip_eth_type; + fabric_v1model.int_mirror_type = (bit<3>)FabricMirrorType_t.INVALID; + report_counter.count(); + } + action do_local_report_encap(ipv4_addr_t src_ip, ipv4_addr_t mon_ip, l4_port_t mon_port, bit<32> switch_id) { + _report_encap_common(src_ip, mon_ip, mon_port, switch_id); + hdr.report_eth_type.value = ETHERTYPE_INT_WIP_IPV4; + hdr.report_fixed_header.nproto = NPROTO_TELEMETRY_SWITCH_LOCAL_HEADER; + hdr.local_report_header.setValid(); + } + action do_local_report_encap_mpls(ipv4_addr_t src_ip, ipv4_addr_t mon_ip, l4_port_t mon_port, mpls_label_t mon_label, bit<32> switch_id) { + do_local_report_encap(src_ip, mon_ip, mon_port, switch_id); + hdr.report_eth_type.value = ETHERTYPE_INT_WIP_MPLS; + hdr.report_mpls.setValid(); + hdr.report_mpls.tc = 0; + hdr.report_mpls.bos = 0; + hdr.report_mpls.ttl = DEFAULT_MPLS_TTL; + hdr.report_mpls.label = mon_label; + } + action do_drop_report_encap(ipv4_addr_t src_ip, ipv4_addr_t mon_ip, l4_port_t mon_port, bit<32> switch_id) { + _report_encap_common(src_ip, mon_ip, mon_port, switch_id); + hdr.report_eth_type.value = ETHERTYPE_INT_WIP_IPV4; + hdr.report_fixed_header.nproto = NPROTO_TELEMETRY_DROP_HEADER; + hdr.drop_report_header.setValid(); + hdr.local_report_header.setInvalid(); + hdr.drop_report_header.drop_reason = fabric_md.bridged.int_bmd.drop_reason; + } + action do_drop_report_encap_mpls(ipv4_addr_t src_ip, ipv4_addr_t mon_ip, l4_port_t mon_port, mpls_label_t mon_label, bit<32> switch_id) { + do_drop_report_encap(src_ip, mon_ip, mon_port, switch_id); + hdr.report_eth_type.value = ETHERTYPE_INT_WIP_MPLS; + hdr.report_mpls.setValid(); + hdr.report_mpls.tc = 0; + hdr.report_mpls.bos = 0; + hdr.report_mpls.ttl = DEFAULT_MPLS_TTL; + hdr.report_mpls.label = mon_label; + hdr.report_mpls.label = mon_label; + } + table report { + key = { + fabric_md.int_report_md.bmd_type : exact @name("bmd_type") ; + fabric_md.int_report_md.mirror_type: exact @name("mirror_type") ; + fabric_md.int_report_md.report_type: exact @name("int_report_type") ; + } + actions = { + do_local_report_encap; + do_local_report_encap_mpls; + do_drop_report_encap; + do_drop_report_encap_mpls; + @defaultonly nop(); + } + default_action = nop; + const size = 6; + counters = report_counter; + } + @hidden action init_int_metadata(bit<3> report_type) { + fabric_md.bridged.int_bmd.mirror_session_id = V1MODEL_INT_MIRROR_SESSION; + fabric_md.int_report_md.setValid(); + fabric_v1model.int_mirror_type = (bit<3>)FabricMirrorType_t.INT_REPORT; + fabric_md.int_report_md.bmd_type = BridgedMdType_t.EGRESS_MIRROR; + fabric_md.int_report_md.mirror_type = FabricMirrorType_t.INT_REPORT; + fabric_md.int_report_md.report_type = fabric_md.bridged.int_bmd.report_type; + fabric_md.int_report_md.ig_port = fabric_md.bridged.base.ig_port; + fabric_md.int_report_md.eg_port = (PortId_t)standard_md.egress_port; + fabric_md.int_report_md.queue_id = egress_qid; + fabric_md.int_report_md.queue_occupancy = standard_md.deq_qdepth; + fabric_md.int_report_md.ig_tstamp = fabric_md.bridged.base.ig_tstamp[31:0]; + fabric_md.int_report_md.eg_tstamp = standard_md.egress_global_timestamp[31:0]; + fabric_md.int_report_md.ip_eth_type = fabric_md.bridged.base.ip_eth_type; + fabric_md.int_report_md.flow_hash = fabric_md.bridged.base.inner_hash; + fabric_md.int_report_md.report_type = report_type; + int_metadata_counter.count(); + } + @hidden table int_metadata { + key = { + fabric_md.bridged.int_bmd.report_type: exact @name("int_report_type") ; + fabric_v1model.drop_ctl : exact @name("drop_ctl") ; + fabric_md.int_md.queue_report : exact @name("queue_report") ; + } + actions = { + init_int_metadata; + @defaultonly nop(); + } + const default_action = nop(); + const entries = { + (INT_REPORT_TYPE_FLOW, 0, false) : init_int_metadata(INT_REPORT_TYPE_FLOW); + (INT_REPORT_TYPE_FLOW, 1, false) : init_int_metadata(INT_REPORT_TYPE_DROP); + } + counters = int_metadata_counter; + } + @hidden action adjust_ip_udp_len(bit<16> adjust_ip, bit<16> adjust_udp) { + hdr_v1model.ingress.ipv4.total_len = fabric_md.pkt_length + adjust_ip; + hdr_v1model.ingress.udp.len = fabric_md.pkt_length + adjust_udp; + } + @hidden table adjust_int_report_hdr_length { + key = { + fabric_md.bridged.int_bmd.wip_type: exact @name("is_int_wip") ; + } + actions = { + @defaultonly nop(); + adjust_ip_udp_len; + } + const default_action = nop(); + const entries = { + INT_IS_WIP : adjust_ip_udp_len(INT_WIP_ADJUST_IP_BYTES, INT_WIP_ADJUST_UDP_BYTES); + INT_IS_WIP_WITH_MPLS : adjust_ip_udp_len(INT_WIP_ADJUST_IP_MPLS_BYTES, INT_WIP_ADJUST_UDP_MPLS_BYTES); + } + } + apply { + fabric_md.int_md.hop_latency = standard_md.egress_global_timestamp[31:0] - fabric_md.bridged.base.ig_tstamp[31:0]; + fabric_md.int_md.timestamp = standard_md.egress_global_timestamp; + queue_latency_thresholds.apply(); + config.apply(); + hdr.report_fixed_header.hw_id = 4w0 ++ standard_md.egress_spec[8:7]; + if (fabric_md.int_report_md.isValid()) { + report.apply(); + } else { + if (int_metadata.apply().hit) { + clone_preserving_field_list(CloneType.E2E, (bit<32>)fabric_md.bridged.int_bmd.mirror_session_id, PRESERVE_INT_MD); + } + } + adjust_int_report_hdr_length.apply(); + fabric_v1model.egress = fabric_md; + hdr_v1model.egress = hdr; + } +} + +control IntTnaEgressParserEmulator(inout v1model_header_t hdr_v1model, inout fabric_egress_metadata_t fabric_md, inout standard_metadata_t standard_md) { + egress_headers_t hdr = hdr_v1model.egress; + @hidden action set_common_int_headers() { + hdr.report_ethernet.setValid(); + hdr.report_eth_type.setValid(); + hdr.report_ipv4.setValid(); + hdr.report_ipv4.version = 4w4; + hdr.report_ipv4.ihl = 4w5; + hdr.report_ipv4.dscp = 0; + hdr.report_ipv4.ecn = 2w0; + hdr.report_ipv4.flags = 0; + hdr.report_ipv4.frag_offset = 0; + hdr.report_ipv4.ttl = DEFAULT_IPV4_TTL; + hdr.report_ipv4.protocol = PROTO_UDP; + hdr.report_udp.setValid(); + hdr.report_udp.sport = 0; + hdr.report_fixed_header.setValid(); + hdr.report_fixed_header.ver = 0; + hdr.report_fixed_header.nproto = NPROTO_TELEMETRY_SWITCH_LOCAL_HEADER; + hdr.report_fixed_header.rsvd = 0; + hdr.common_report_header.setValid(); + } + @hidden action set_common_int_drop_headers() { + set_common_int_headers(); + fabric_md.int_report_md.setValid(); + fabric_md.int_report_md.ip_eth_type = ETHERTYPE_IPV4; + fabric_md.int_report_md.report_type = INT_REPORT_TYPE_DROP; + fabric_md.int_report_md.mirror_type = FabricMirrorType_t.INVALID; + hdr.drop_report_header.setValid(); + } + @hidden action parse_int_ingress_drop() { + set_common_int_drop_headers(); + fabric_md.int_report_md.bmd_type = BridgedMdType_t.INT_INGRESS_DROP; + fabric_md.int_report_md.encap_presence = fabric_md.bridged.base.encap_presence; + fabric_md.int_report_md.flow_hash = fabric_md.bridged.base.inner_hash; + hdr.drop_report_header.drop_reason = fabric_md.bridged.int_bmd.drop_reason; + hdr.report_fixed_header.ig_tstamp = fabric_md.bridged.base.ig_tstamp[31:0]; + hdr.common_report_header.ig_port = fabric_md.bridged.base.ig_port; + hdr.common_report_header.eg_port = 0; + hdr.common_report_header.queue_id = 0; + } + @hidden action parse_int_report_mirror() { + set_common_int_headers(); + fabric_md.bridged.bmd_type = fabric_md.int_report_md.bmd_type; + fabric_md.bridged.base.vlan_id = DEFAULT_VLAN_ID; + fabric_md.bridged.base.mpls_label = 0; + hdr.report_fixed_header.ig_tstamp = fabric_md.int_report_md.ig_tstamp; + hdr.common_report_header.ig_port = fabric_md.int_report_md.ig_port; + hdr.common_report_header.eg_port = fabric_md.int_report_md.eg_port; + hdr.common_report_header.queue_id = fabric_md.int_report_md.queue_id; + hdr.local_report_header.setValid(); + hdr.local_report_header.queue_occupancy = fabric_md.int_report_md.queue_occupancy; + hdr.local_report_header.eg_tstamp = fabric_md.int_report_md.eg_tstamp; + } + apply { + fabric_md.is_int_recirc = true; + hdr_v1model.ingress.vlan_tag.setInvalid(); + if (hdr_v1model.ingress.gtpu.isValid() || hdr_v1model.ingress.vxlan.isValid()) { + hdr_v1model.ingress.ipv4.setInvalid(); + hdr_v1model.ingress.tcp.setInvalid(); + hdr_v1model.ingress.udp.setInvalid(); + hdr_v1model.ingress.icmp.setInvalid(); + hdr_v1model.ingress.vxlan.setInvalid(); + hdr_v1model.ingress.inner_ethernet.setInvalid(); + hdr_v1model.ingress.inner_eth_type.setInvalid(); + hdr_v1model.ingress.gtpu.setInvalid(); + hdr_v1model.ingress.gtpu_options.setInvalid(); + hdr_v1model.ingress.gtpu_ext_psc.setInvalid(); + } + if ((bit<8>)fabric_md.bridged.int_bmd.report_type == BridgedMdType_t.INT_INGRESS_DROP) { + parse_int_ingress_drop(); + recirculate_preserving_field_list(NO_PRESERVATION); + } else { + parse_int_report_mirror(); + recirculate_preserving_field_list(PRESERVE_INT_MD); + } + hdr_v1model.egress = hdr; + } +} + +control FabricIngress(inout v1model_header_t hdr, inout fabric_v1model_metadata_t fabric_md, inout standard_metadata_t standard_md) { + LookupMdInit() lkp_md_init; + StatsIngress() stats; + PacketIoIngress() pkt_io; + Filtering() filtering; + Forwarding() forwarding; + PreNext() pre_next; + Acl() acl; + Next() next; + Hasher() hasher; + IngressSliceTcClassifier() slice_tc_classifier; + IngressQos() qos; + IntWatchlist() int_watchlist; + IntIngress() int_ingress; + apply { + mark_to_drop(standard_md); + if (standard_md.parser_error == error.PacketRejectedByParser) { + exit; + } + if (standard_md.instance_type == 4) { + fabric_md.ingress.bridged.base.ig_port = FAKE_V1MODEL_RECIRC_PORT; + } + lkp_md_init.apply(hdr.ingress, fabric_md.ingress.lkp); + pkt_io.apply(hdr.ingress, fabric_md.ingress, fabric_md.skip_egress, standard_md, fabric_md.recirc_preserved_egress_port); + int_watchlist.apply(hdr.ingress, fabric_md.ingress, standard_md, fabric_md.recirc_preserved_report_type); + stats.apply(fabric_md.ingress.lkp, fabric_md.ingress.bridged.base.ig_port, fabric_md.ingress.bridged.base.stats_flow_id); + slice_tc_classifier.apply(hdr.ingress, standard_md, fabric_md.ingress); + filtering.apply(hdr.ingress, fabric_md.ingress, standard_md); + if (!fabric_md.ingress.skip_forwarding) { + forwarding.apply(hdr.ingress, fabric_md.ingress, standard_md, fabric_md.drop_ctl); + } + hasher.apply(hdr.ingress, fabric_md.ingress); + if (!fabric_md.ingress.skip_next) { + pre_next.apply(hdr.ingress, fabric_md.ingress); + } + acl.apply(hdr.ingress, fabric_md.ingress, standard_md, fabric_md.recirc_preserved_egress_port, fabric_md.drop_ctl); + if (!fabric_md.ingress.skip_next) { + next.apply(hdr.ingress, fabric_md.ingress, standard_md, fabric_md.recirc_preserved_egress_port); + } + qos.apply(fabric_md.ingress, standard_md, fabric_md.drop_ctl); + int_ingress.apply(hdr.ingress, fabric_md.ingress, standard_md, fabric_md.drop_ctl); + fabric_md.egress.bridged = fabric_md.ingress.bridged; + if (fabric_md.drop_ctl == 1) { + mark_to_drop(standard_md); + } + } +} + +control FabricEgress(inout v1model_header_t hdr, inout fabric_v1model_metadata_t fabric_md, inout standard_metadata_t standard_md) { + StatsEgress() stats; + PacketIoEgress() pkt_io_egress; + EgressNextControl() egress_next; + EgressDscpRewriter() dscp_rewriter; + IntTnaEgressParserEmulator() parser_emulator; + IntEgress() int_egress; + apply { + fabric_md.egress.cpu_port = 0; + if (fabric_md.skip_egress) { + exit; + } + if (standard_md.instance_type == 2) { + fabric_md.egress.bridged.int_bmd.drop_reason = fabric_md.recirc_preserved_drop_reason; + fabric_md.egress.bridged.int_bmd.report_type = fabric_md.recirc_preserved_report_type; + parser_emulator.apply(hdr, fabric_md.egress, standard_md); + } + if ((bit<8>)fabric_md.egress.bridged.int_bmd.report_type == BridgedMdType_t.INT_INGRESS_DROP) { + parser_emulator.apply(hdr, fabric_md.egress, standard_md); + } + pkt_io_egress.apply(hdr.ingress, fabric_md.egress, standard_md, fabric_md.recirc_preserved_ingress_port); + stats.apply(fabric_md.egress.bridged.base.stats_flow_id, standard_md.egress_port, fabric_md.egress.bridged.bmd_type); + egress_next.apply(hdr.ingress, fabric_md.egress, standard_md, fabric_md.recirc_preserved_drop_reason, fabric_md.drop_ctl); + int_egress.apply(hdr, fabric_md, standard_md); + dscp_rewriter.apply(fabric_md.egress, standard_md, hdr.ingress); + if (fabric_md.do_upf_uplink_recirc) { + recirculate_preserving_field_list(NO_PRESERVATION); + } + if (fabric_md.drop_ctl == 1) { + mark_to_drop(standard_md); + } + } +} + +V1Switch(FabricParser(), FabricVerifyChecksum(), FabricIngress(), FabricEgress(), FabricComputeChecksum(), FabricDeparser()) main; + diff --git a/src/tests/p4-int-routing-acl/p4src/bmv2.json b/src/tests/p4-int-routing-acl/p4src/bmv2.json new file mode 100644 index 000000000..80136b953 --- /dev/null +++ b/src/tests/p4-int-routing-acl/p4src/bmv2.json @@ -0,0 +1,21728 @@ +{ + "header_types" : [ + { + "name" : "scalars_0", + "id" : 0, + "fields" : [ + ["tmp_2", 16, false], + ["tmp_4", 1, false], + ["tmp_6", 16, false], + ["tmp_12", 3, false], + ["tmp_13", 8, false], + ["gtpu_ext_len_0", 8, false], + ["tmp_3", 16, false], + ["tmp_5", 16, false], + ["tmp_7", 4, false], + ["tmp_8", 112, false], + ["tmp_9", 112, false], + ["tmp_10", 112, false], + ["tmp_11", 64, false], + ["tmp_14", 32, false], + ["tmp_15", 32, false], + ["tmp_16", 32, false], + ["tmp_17", 32, false], + ["tmp_18", 48, false], + ["tmp_19", 48, false], + ["tmp_20", 16, false], + ["tmp_21", 32, false], + ["tmp_22", 32, false], + ["tmp_23", 8, false], + ["tmp_24", 16, false], + ["tmp_25", 16, false], + ["tmp_26", 32, false], + ["qos_packet_color", 2, false], + ["tmp_27", 32, false], + ["tmp_28", 32, false], + ["tmp_29", 32, false], + ["tmp_30", 32, false], + ["tmp_31", 32, false], + ["tmp_32", 32, false], + ["tmp_33", 32, false], + ["tmp_34", 32, false], + ["tmp_35", 32, false], + ["dscp_rewriter_tmp_dscp", 6, false], + ["int_egress_fabric_md_pkt_length", 16, false], + ["int_egress_egress_qid", 5, false], + ["int_egress_reg", 32, false], + ["key_0", 16, false], + ["key_1", 16, false], + ["userMetadata._skip_egress0", 1, false], + ["userMetadata._do_upf_uplink_recirc1", 1, false], + ["userMetadata._drop_ctl2", 1, false], + ["userMetadata._int_mirror_type3", 3, false], + ["userMetadata._ingress_ecmp_hash5", 32, false], + ["userMetadata._ingress_lkp_eth_dst6", 48, false], + ["userMetadata._ingress_lkp_eth_src7", 48, false], + ["userMetadata._ingress_lkp_eth_type8", 16, false], + ["userMetadata._ingress_lkp_vlan_id9", 12, false], + ["userMetadata._ingress_lkp_is_ipv410", 1, false], + ["userMetadata._ingress_lkp_ipv4_src11", 32, false], + ["userMetadata._ingress_lkp_ipv4_dst12", 32, false], + ["userMetadata._ingress_lkp_ip_proto13", 8, false], + ["userMetadata._ingress_lkp_l4_sport14", 16, false], + ["userMetadata._ingress_lkp_l4_dport15", 16, false], + ["userMetadata._ingress_lkp_icmp_type16", 8, false], + ["userMetadata._ingress_lkp_icmp_code17", 8, false], + ["userMetadata._ingress_routing_ipv4_dst18", 32, false], + ["userMetadata._ingress_skip_forwarding19", 1, false], + ["userMetadata._ingress_skip_next20", 1, false], + ["userMetadata._ingress_next_id21", 32, false], + ["userMetadata._ingress_egress_port_set22", 1, false], + ["userMetadata._ingress_punt_to_cpu23", 1, false], + ["userMetadata._ingress_ipv4_checksum_err24", 1, false], + ["userMetadata._ingress_inner_ipv4_checksum_err25", 1, false], + ["userMetadata._ingress_slice_id26", 4, false], + ["userMetadata._ingress_tc27", 2, false], + ["userMetadata._ingress_tc_unknown28", 1, false], + ["userMetadata._ingress_is_upf_hit29", 1, false], + ["userMetadata._ingress_upf_slice_id30", 4, false], + ["userMetadata._ingress_upf_tc31", 2, false], + ["userMetadata._ingress_upf_meter_color32", 2, false], + ["userMetadata._ingress_ig_port_type33", 2, false], + ["userMetadata._ingress_mirror_mirror_session_id34", 10, false], + ["userMetadata._ingress_mirror_bmd_type35", 8, false], + ["userMetadata._egress_cpu_port37", 9, false], + ["userMetadata._egress_int_md_hop_latency39", 32, false], + ["userMetadata._egress_int_md_timestamp40", 48, false], + ["userMetadata._egress_int_md_vlan_stripped41", 1, false], + ["userMetadata._egress_int_md_queue_report42", 1, false], + ["userMetadata._egress_int_ipv4_len43", 16, false], + ["userMetadata._egress_is_int_recirc44", 1, false], + ["userMetadata._egress_pkt_length45", 16, false], + ["userMetadata._recirc_preserved_report_type46", 3, false], + ["userMetadata._recirc_preserved_egress_port47", 9, false], + ["userMetadata._recirc_preserved_drop_reason48", 8, false], + ["userMetadata._recirc_preserved_ingress_port49", 9, false], + ["_padding_1", 5, false] + ] + }, + { + "name" : "fake_ethernet_t", + "id" : 1, + "fields" : [ + ["_pad0", 48, false], + ["_pad1", 48, false], + ["ether_type", 16, false] + ] + }, + { + "name" : "packet_out_header_t", + "id" : 2, + "fields" : [ + ["pad0", 7, false], + ["egress_port", 9, false], + ["pad1", 3, false], + ["queue_id", 5, false], + ["pad2", 5, false], + ["cpu_loopback_mode", 2, false], + ["do_forwarding", 1, false], + ["pad3", 16, false], + ["pad4", 48, false], + ["ether_type", 16, false] + ] + }, + { + "name" : "gtpu_t", + "id" : 3, + "fields" : [ + ["version", 3, false], + ["pt", 1, false], + ["spare", 1, false], + ["ex_flag", 1, false], + ["seq_flag", 1, false], + ["npdu_flag", 1, false], + ["msgtype", 8, false], + ["msglen", 16, false], + ["teid", 32, false] + ] + }, + { + "name" : "ethernet_t", + "id" : 4, + "fields" : [ + ["dst_addr", 48, false], + ["src_addr", 48, false] + ] + }, + { + "name" : "eth_type_t", + "id" : 5, + "fields" : [ + ["value", 16, false] + ] + }, + { + "name" : "ipv4_t", + "id" : 6, + "fields" : [ + ["version", 4, false], + ["ihl", 4, false], + ["dscp", 6, false], + ["ecn", 2, false], + ["total_len", 16, false], + ["identification", 16, false], + ["flags", 3, false], + ["frag_offset", 13, false], + ["ttl", 8, false], + ["protocol", 8, false], + ["hdr_checksum", 16, false], + ["src_addr", 32, false], + ["dst_addr", 32, false] + ] + }, + { + "name" : "udp_t", + "id" : 7, + "fields" : [ + ["sport", 16, false], + ["dport", 16, false], + ["len", 16, false], + ["checksum", 16, false] + ] + }, + { + "name" : "report_fixed_header_t", + "id" : 8, + "fields" : [ + ["ver", 4, false], + ["nproto", 4, false], + ["dqf", 3, false], + ["rsvd", 15, false], + ["hw_id", 6, false], + ["seq_no", 32, false], + ["ig_tstamp", 32, false] + ] + }, + { + "name" : "common_report_header_t", + "id" : 9, + "fields" : [ + ["switch_id", 32, false], + ["pad1", 7, false], + ["ig_port", 9, false], + ["pad2", 7, false], + ["eg_port", 9, false], + ["pad3", 3, false], + ["queue_id", 5, false] + ] + }, + { + "name" : "local_report_header_t", + "id" : 10, + "fields" : [ + ["pad1", 5, false], + ["queue_occupancy", 19, false], + ["eg_tstamp", 32, false] + ] + }, + { + "name" : "drop_report_header_t", + "id" : 11, + "fields" : [ + ["drop_reason", 8, false], + ["pad", 16, false] + ] + }, + { + "name" : "mpls_t", + "id" : 12, + "fields" : [ + ["label", 20, false], + ["tc", 3, false], + ["bos", 1, false], + ["ttl", 8, false] + ] + }, + { + "name" : "bridged_metadata_t", + "id" : 13, + "fields" : [ + ["_bmd_type0", 8, false], + ["_base_inner_hash1", 32, false], + ["_base_mpls_label2", 20, false], + ["_base_ig_port3", 9, false], + ["_base_is_multicast4", 1, 0], + ["_base_fwd_type5", 3, false], + ["_base_vlan_id6", 12, false], + ["_base_encap_presence7", 2, false], + ["_base_mpls_ttl8", 8, false], + ["_base_ig_tstamp9", 48, false], + ["_base_ip_eth_type10", 16, false], + ["_base_stats_flow_id11", 10, false], + ["_base_slice_tc12", 6, false], + ["_int_bmd_report_type13", 3, false], + ["_int_bmd_mirror_session_id14", 10, false], + ["_int_bmd_drop_reason15", 8, false], + ["_int_bmd_queue_id16", 5, false], + ["_int_bmd_egress_port17", 9, false], + ["_int_bmd_wip_type18", 8, false], + ["__pad019", 1, false], + ["__pad220", 5, false] + ] + }, + { + "name" : "int_report_metadata_t", + "id" : 14, + "fields" : [ + ["bmd_type", 8, false], + ["_pad0", 5, false], + ["mirror_type", 3, false], + ["_pad1", 7, false], + ["ig_port", 9, false], + ["_pad2", 7, false], + ["eg_port", 9, false], + ["_pad3", 3, false], + ["queue_id", 5, false], + ["_pad4", 5, false], + ["queue_occupancy", 19, false], + ["ig_tstamp", 32, false], + ["eg_tstamp", 32, false], + ["drop_reason", 8, false], + ["ip_eth_type", 16, false], + ["_pad5", 6, false], + ["encap_presence", 2, false], + ["report_type", 3, false], + ["_pad6", 5, false], + ["flow_hash", 32, false] + ] + }, + { + "name" : "int_metadata_t", + "id" : 15, + "fields" : [ + ["hop_latency", 32, false], + ["timestamp", 48, false], + ["vlan_stripped", 1, 0], + ["queue_report", 1, 0], + ["_padding", 6, false] + ] + }, + { + "name" : "standard_metadata", + "id" : 16, + "fields" : [ + ["ingress_port", 9, false], + ["egress_spec", 9, false], + ["egress_port", 9, false], + ["instance_type", 32, false], + ["packet_length", 32, false], + ["enq_timestamp", 32, false], + ["enq_qdepth", 19, false], + ["deq_timedelta", 32, false], + ["deq_qdepth", 19, false], + ["ingress_global_timestamp", 48, false], + ["egress_global_timestamp", 48, false], + ["mcast_grp", 16, false], + ["egress_rid", 16, false], + ["checksum_error", 1, false], + ["parser_error", 32, false], + ["priority", 3, false], + ["_padding_0", 3, false] + ] + }, + { + "name" : "packet_in_header_t", + "id" : 17, + "fields" : [ + ["ingress_port", 9, false], + ["_pad0", 7, false] + ] + }, + { + "name" : "vlan_tag_t", + "id" : 18, + "fields" : [ + ["eth_type", 16, false], + ["pri", 3, false], + ["cfi", 1, false], + ["vlan_id", 12, false] + ] + }, + { + "name" : "ipv6_t", + "id" : 19, + "fields" : [ + ["version", 4, false], + ["traffic_class", 8, false], + ["flow_label", 20, false], + ["payload_len", 16, false], + ["next_hdr", 8, false], + ["hop_limit", 8, false], + ["src_addr", 128, false], + ["dst_addr", 128, false] + ] + }, + { + "name" : "tcp_t", + "id" : 20, + "fields" : [ + ["sport", 16, false], + ["dport", 16, false] + ] + }, + { + "name" : "icmp_t", + "id" : 21, + "fields" : [ + ["icmp_type", 8, false], + ["icmp_code", 8, false] + ] + }, + { + "name" : "gtpu_options_t", + "id" : 22, + "fields" : [ + ["seq_num", 16, false], + ["n_pdu_num", 8, false], + ["next_ext", 8, false] + ] + }, + { + "name" : "gtpu_ext_psc_t", + "id" : 23, + "fields" : [ + ["len", 8, false], + ["type", 4, false], + ["spare0", 4, false], + ["ppp", 1, false], + ["rqi", 1, false], + ["qfi", 6, false], + ["next_ext", 8, false] + ] + }, + { + "name" : "vxlan_t", + "id" : 24, + "fields" : [ + ["flags", 8, false], + ["reserved", 24, false], + ["vni", 24, false], + ["reserved_2", 8, false] + ] + } + ], + "headers" : [ + { + "name" : "tmp", + "id" : 0, + "header_type" : "fake_ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "tmp_0", + "id" : 1, + "header_type" : "packet_out_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "tmp_1", + "id" : 2, + "header_type" : "fake_ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_0", + "id" : 3, + "header_type" : "gtpu_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_report_ethernet", + "id" : 4, + "header_type" : "ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_report_eth_type", + "id" : 5, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_report_ipv4", + "id" : 6, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_report_udp", + "id" : 7, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_report_fixed_header", + "id" : 8, + "header_type" : "report_fixed_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_common_report_header", + "id" : 9, + "header_type" : "common_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_local_report_header", + "id" : 10, + "header_type" : "local_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_drop_report_header", + "id" : 11, + "header_type" : "drop_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_report_eth_type", + "id" : 12, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_report_mpls", + "id" : 13, + "header_type" : "mpls_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_report_ipv4", + "id" : 14, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_report_udp", + "id" : 15, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_report_fixed_header", + "id" : 16, + "header_type" : "report_fixed_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_common_report_header", + "id" : 17, + "header_type" : "common_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_local_report_header", + "id" : 18, + "header_type" : "local_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_drop_report_header", + "id" : 19, + "header_type" : "drop_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_eth_type", + "id" : 20, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_fabric_md_bridged", + "id" : 21, + "header_type" : "bridged_metadata_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_fabric_md_int_report_md", + "id" : 22, + "header_type" : "int_report_metadata_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_fabric_md_int_md", + "id" : 23, + "header_type" : "int_metadata_t", + "metadata" : true, + "pi_omit" : true + }, + { + "name" : "scalars", + "id" : 24, + "header_type" : "scalars_0", + "metadata" : true, + "pi_omit" : true + }, + { + "name" : "standard_metadata", + "id" : 25, + "header_type" : "standard_metadata", + "metadata" : true, + "pi_omit" : true + }, + { + "name" : "_ingress_packet_out0", + "id" : 26, + "header_type" : "packet_out_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_packet_in1", + "id" : 27, + "header_type" : "packet_in_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_fake_ethernet2", + "id" : 28, + "header_type" : "fake_ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_ethernet3", + "id" : 29, + "header_type" : "ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_vlan_tag4", + "id" : 30, + "header_type" : "vlan_tag_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_eth_type5", + "id" : 31, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_mpls6", + "id" : 32, + "header_type" : "mpls_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_ipv47", + "id" : 33, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_ipv68", + "id" : 34, + "header_type" : "ipv6_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_tcp9", + "id" : 35, + "header_type" : "tcp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_udp10", + "id" : 36, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_icmp11", + "id" : 37, + "header_type" : "icmp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_gtpu12", + "id" : 38, + "header_type" : "gtpu_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_gtpu_options13", + "id" : 39, + "header_type" : "gtpu_options_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_gtpu_ext_psc14", + "id" : 40, + "header_type" : "gtpu_ext_psc_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_vxlan15", + "id" : 41, + "header_type" : "vxlan_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_inner_ethernet16", + "id" : 42, + "header_type" : "ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_inner_eth_type17", + "id" : 43, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_inner_ipv418", + "id" : 44, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_inner_tcp19", + "id" : 45, + "header_type" : "tcp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_inner_udp20", + "id" : 46, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_inner_icmp21", + "id" : 47, + "header_type" : "icmp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_packet_in22", + "id" : 48, + "header_type" : "packet_in_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_fake_ethernet23", + "id" : 49, + "header_type" : "fake_ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_report_ethernet24", + "id" : 50, + "header_type" : "ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_report_eth_type25", + "id" : 51, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_report_mpls26", + "id" : 52, + "header_type" : "mpls_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_report_ipv427", + "id" : 53, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_report_udp28", + "id" : 54, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_report_fixed_header29", + "id" : 55, + "header_type" : "report_fixed_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_common_report_header30", + "id" : 56, + "header_type" : "common_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_local_report_header31", + "id" : 57, + "header_type" : "local_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_drop_report_header32", + "id" : 58, + "header_type" : "drop_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_ethernet33", + "id" : 59, + "header_type" : "ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_vlan_tag34", + "id" : 60, + "header_type" : "vlan_tag_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_eth_type35", + "id" : 61, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_mpls36", + "id" : 62, + "header_type" : "mpls_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_ipv437", + "id" : 63, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_ipv638", + "id" : 64, + "header_type" : "ipv6_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_udp39", + "id" : 65, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_bridged4", + "id" : 66, + "header_type" : "bridged_metadata_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_bridged36", + "id" : 67, + "header_type" : "bridged_metadata_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_int_report_md38", + "id" : 68, + "header_type" : "int_report_metadata_t", + "metadata" : false, + "pi_omit" : true + } + ], + "header_stacks" : [], + "header_union_types" : [], + "header_unions" : [], + "header_union_stacks" : [], + "field_lists" : [ + { + "id" : 1, + "name" : "field_list241", + "elements" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_report_type46"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_drop_reason48"] + } + ] + }, + { + "id" : 2, + "name" : "field_list231", + "elements" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_ingress_port49"] + } + ] + }, + { + "id" : 3, + "name" : "empty", + "elements" : [] + }, + { + "id" : 4, + "name" : "empty_0", + "elements" : [] + }, + { + "id" : 5, + "name" : "empty_1", + "elements" : [] + } + ], + "errors" : [ + ["NoError", 1], + ["PacketTooShort", 2], + ["NoMatch", 3], + ["StackOutOfBounds", 4], + ["HeaderTooShort", 5], + ["ParserTimeout", 6], + ["ParserInvalidArgument", 7], + ["PacketRejectedByParser", 8] + ], + "enums" : [], + "parsers" : [ + { + "name" : "parser", + "id" : 0, + "init_state" : "start", + "parse_states" : [ + { + "name" : "start", + "id" : 0, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_pkt_length45"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "packet_length"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0000ffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_bridged4" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_bmd_type0"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ig_port3"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_ingress_port49"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ig_tstamp9"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "ingress_global_timestamp"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_punt_to_cpu23"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ip_eth_type10"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_wip_type18"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_encap_presence7"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_upf_meter_color32"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_8"] + }, + { + "type" : "lookahead", + "value" : [0, 112] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "tmp" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp", "_pad0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_8"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x40" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp", "_pad1"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_8"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x10" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp", "ether_type"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_8"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_8"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0xbf02", + "mask" : null, + "next_state" : "parse_fake_ethernet" + }, + { + "type" : "hexstr", + "value" : "0xbf03", + "mask" : null, + "next_state" : "parse_fake_ethernet_and_accept" + }, + { + "type" : "hexstr", + "value" : "0xbf01", + "mask" : null, + "next_state" : "check_packet_out" + }, + { + "type" : "hexstr", + "value" : "0xbf04", + "mask" : null, + "next_state" : "parse_int_wip_ipv4" + }, + { + "type" : "hexstr", + "value" : "0xbf05", + "mask" : null, + "next_state" : "parse_int_wip_mpls" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ethernet" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + } + ] + }, + { + "name" : "check_packet_out", + "id" : 1, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + { + "type" : "lookahead", + "value" : [0, 112] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "tmp_0" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "pad0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x69" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x7f" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "egress_port"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x60" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "pad1"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x5d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "queue_id"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x58" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x1f" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "pad2"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x53" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x1f" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "cpu_loopback_mode"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x51" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "do_forwarding"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x50" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "pad3"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x40" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "pad4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x10" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "ether_type"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x50" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x00", + "mask" : null, + "next_state" : "parse_packet_out_and_accept" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "strip_packet_out" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + } + ] + }, + { + "name" : "parse_int_wip_ipv4", + "id" : 2, + "parser_ops" : [ + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_ethernet3" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_eth_type5" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_wip_type18"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_label2"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_ttl8"] + }, + { + "type" : "hexstr", + "value" : "0x41" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x00000070" + } + ], + "op" : "advance" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ipv4" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_int_wip_mpls", + "id" : 3, + "parser_ops" : [ + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_ethernet3" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_eth_type5" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + }, + { + "type" : "hexstr", + "value" : "0x8847" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_wip_type18"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x00000070" + } + ], + "op" : "advance" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_mpls" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_packet_out_and_accept", + "id" : 4, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_packet_out0" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "strip_packet_out", + "id" : 5, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x00000070" + } + ], + "op" : "advance" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ethernet" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_fake_ethernet", + "id" : 6, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_fake_ethernet2" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_10"] + }, + { + "type" : "lookahead", + "value" : [0, 112] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "tmp_1" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_1", "_pad0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_10"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x40" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_1", "_pad1"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_10"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x10" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_1", "ether_type"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_10"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_10"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0xbf04", + "mask" : null, + "next_state" : "parse_int_wip_ipv4" + }, + { + "type" : "hexstr", + "value" : "0xbf05", + "mask" : null, + "next_state" : "parse_int_wip_mpls" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ethernet" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_6"] + } + ] + }, + { + "name" : "parse_fake_ethernet_and_accept", + "id" : 7, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_fake_ethernet2" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_ethernet", + "id" : 8, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_ethernet3" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_3"] + }, + { + "type" : "lookahead", + "value" : [0, 16] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x88a8", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "hexstr", + "value" : "0x8100", + "mask" : "0xefff", + "next_state" : "parse_vlan_tag" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_untagged" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_3"] + } + ] + }, + { + "name" : "parse_vlan_tag", + "id" : 9, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_vlan_tag4" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_vlan_id6"] + }, + { + "type" : "field", + "value" : ["_ingress_vlan_tag4", "vlan_id"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_5"] + }, + { + "type" : "lookahead", + "value" : [0, 16] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_eth_type" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_5"] + } + ] + }, + { + "name" : "parse_untagged", + "id" : 10, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_vlan_id6"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_eth_type" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_eth_type", + "id" : 11, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_eth_type5" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x8847", + "mask" : null, + "next_state" : "parse_mpls" + }, + { + "type" : "hexstr", + "value" : "0x0800", + "mask" : null, + "next_state" : "parse_non_mpls" + }, + { + "type" : "hexstr", + "value" : "0x86dd", + "mask" : null, + "next_state" : "parse_non_mpls" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + } + ] + }, + { + "name" : "parse_mpls", + "id" : 12, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_mpls6" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_label2"] + }, + { + "type" : "field", + "value" : ["_ingress_mpls6", "label"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_ttl8"] + }, + { + "type" : "field", + "value" : ["_ingress_mpls6", "ttl"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + { + "type" : "lookahead", + "value" : [0, 4] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x04", + "mask" : null, + "next_state" : "parse_ipv4" + }, + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_ipv6" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "reject_packet" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_7"] + } + ] + }, + { + "name" : "reject_packet", + "id" : 13, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "bool", + "value" : false + }, + { + "type" : "hexstr", + "value" : "0x8" + } + ], + "op" : "verify" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_non_mpls", + "id" : 14, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_label2"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_ttl8"] + }, + { + "type" : "hexstr", + "value" : "0x41" + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x0800", + "mask" : null, + "next_state" : "parse_ipv4" + }, + { + "type" : "hexstr", + "value" : "0x86dd", + "mask" : null, + "next_state" : "parse_ipv6" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + } + ] + }, + { + "name" : "parse_ipv4", + "id" : 15, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_ipv47" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_routing_ipv4_dst18"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dst_addr"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ip_eth_type10"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_tcp" + }, + { + "type" : "hexstr", + "value" : "0x11", + "mask" : null, + "next_state" : "parse_udp" + }, + { + "type" : "hexstr", + "value" : "0x01", + "mask" : null, + "next_state" : "parse_icmp" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_ipv47", "protocol"] + } + ] + }, + { + "name" : "parse_ipv6", + "id" : 16, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_ipv68" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ip_eth_type10"] + }, + { + "type" : "hexstr", + "value" : "0x86dd" + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_tcp" + }, + { + "type" : "hexstr", + "value" : "0x11", + "mask" : null, + "next_state" : "parse_udp" + }, + { + "type" : "hexstr", + "value" : "0x3a", + "mask" : null, + "next_state" : "parse_icmp" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_ipv68", "next_hdr"] + } + ] + }, + { + "name" : "parse_icmp", + "id" : 17, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_icmp11" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_tcp", + "id" : 18, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_tcp9" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_udp", + "id" : 19, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_udp10" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + { + "type" : "lookahead", + "value" : [0, 64] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_0" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "version"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "pt"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3c" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "spare"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3b" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "ex_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3a" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "seq_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x39" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "npdu_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x38" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msgtype"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msglen"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x20" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "teid"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_12"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_13"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x086801ff", + "mask" : null, + "next_state" : "parse_gtpu" + }, + { + "type" : "hexstr", + "value" : "0x12b50000", + "mask" : "0xffff0000", + "next_state" : "parse_vxlan" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_udp10", "dport"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_12"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_13"] + } + ] + }, + { + "name" : "parse_gtpu", + "id" : 20, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_gtpu12" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x000000", + "mask" : null, + "next_state" : "set_gtpu_only" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_gtpu_options" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_gtpu12", "ex_flag"] + }, + { + "type" : "field", + "value" : ["_ingress_gtpu12", "seq_flag"] + }, + { + "type" : "field", + "value" : ["_ingress_gtpu12", "npdu_flag"] + } + ] + }, + { + "name" : "set_gtpu_only", + "id" : 21, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_encap_presence7"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_inner_ipv4" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_gtpu_options", + "id" : 22, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_gtpu_options13" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + }, + { + "type" : "lookahead", + "value" : [0, 8] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x8501", + "mask" : null, + "next_state" : "parse_gtpu_ext_psc" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_gtpu_options13", "next_ext"] + }, + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + } + ] + }, + { + "name" : "parse_gtpu_ext_psc", + "id" : 23, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_gtpu_ext_psc14" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_encap_presence7"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x00", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_gtpu_ext_psc14", "next_ext"] + } + ] + }, + { + "name" : "parse_vxlan", + "id" : 24, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_vxlan15" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_encap_presence7"] + }, + { + "type" : "hexstr", + "value" : "0x03" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_inner_ethernet16" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_inner_eth_type17" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x0800", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_inner_eth_type17", "value"] + } + ] + }, + { + "name" : "parse_inner_ipv4", + "id" : 25, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_inner_ipv418" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_inner_tcp" + }, + { + "type" : "hexstr", + "value" : "0x11", + "mask" : null, + "next_state" : "parse_inner_udp" + }, + { + "type" : "hexstr", + "value" : "0x01", + "mask" : null, + "next_state" : "parse_inner_icmp" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "protocol"] + } + ] + }, + { + "name" : "parse_inner_tcp", + "id" : 26, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_inner_tcp19" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_udp", + "id" : 27, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_inner_udp20" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_icmp", + "id" : 28, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_inner_icmp21" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + } + ] + } + ], + "parse_vsets" : [], + "deparsers" : [ + { + "name" : "deparser", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/parser.p4", + "line" : 321, + "column" : 8, + "source_fragment" : "FabricDeparser" + }, + "order" : ["_ingress_fake_ethernet2", "_ingress_packet_in1", "_egress_report_ethernet24", "_egress_report_eth_type25", "_egress_report_mpls26", "_egress_report_ipv427", "_egress_report_udp28", "_egress_report_fixed_header29", "_egress_common_report_header30", "_egress_local_report_header31", "_egress_drop_report_header32", "_ingress_ethernet3", "_ingress_vlan_tag4", "_ingress_eth_type5", "_ingress_mpls6", "_ingress_ipv47", "_ingress_ipv68", "_ingress_tcp9", "_ingress_udp10", "_ingress_icmp11", "_ingress_gtpu12", "_ingress_gtpu_options13", "_ingress_gtpu_ext_psc14", "_ingress_vxlan15", "_ingress_inner_ethernet16", "_ingress_inner_eth_type17", "_ingress_inner_ipv418", "_ingress_inner_tcp19", "_ingress_inner_udp20", "_ingress_inner_icmp21"], + "primitives" : [] + } + ], + "meter_arrays" : [ + { + "name" : "FabricIngress.qos.slice_tc_meter", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 104, + "column" : 41, + "source_fragment" : "slice_tc_meter" + }, + "is_direct" : false, + "size" : 64, + "rate_count" : 2, + "type" : "bytes" + } + ], + "counter_arrays" : [ + { + "name" : "FabricIngress.stats.flow_counter", + "id" : 0, + "is_direct" : true, + "binding" : "FabricIngress.stats.flows", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/stats.p4", + "line" : 14, + "column" : 50, + "source_fragment" : "flow_counter" + } + }, + { + "name" : "FabricIngress.filtering.ingress_port_vlan_counter", + "id" : 1, + "is_direct" : true, + "binding" : "FabricIngress.filtering.ingress_port_vlan", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 17, + "column" : 50, + "source_fragment" : "ingress_port_vlan_counter" + } + }, + { + "name" : "FabricIngress.filtering.fwd_classifier_counter", + "id" : 2, + "is_direct" : true, + "binding" : "FabricIngress.filtering.fwd_classifier", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 71, + "column" : 50, + "source_fragment" : "fwd_classifier_counter" + } + }, + { + "name" : "FabricIngress.filtering.fwd_type_counter", + "id" : 3, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 78, + "column" : 46, + "source_fragment" : "fwd_type_counter" + }, + "size" : 8, + "is_direct" : false + }, + { + "name" : "FabricIngress.forwarding.bridging_counter", + "id" : 4, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.bridging", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 29, + "column" : 50, + "source_fragment" : "bridging_counter" + } + }, + { + "name" : "FabricIngress.forwarding.mpls_counter", + "id" : 5, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.mpls", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 64, + "column" : 50, + "source_fragment" : "mpls_counter" + } + }, + { + "name" : "FabricIngress.forwarding.routing_v4_counter", + "id" : 6, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.routing_v4", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 98, + "column" : 50, + "source_fragment" : "routing_v4_counter" + } + }, + { + "name" : "FabricIngress.forwarding.routing_v6_counter", + "id" : 7, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.routing_v6", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 142, + "column" : 50, + "source_fragment" : "routing_v6_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_mpls_counter", + "id" : 8, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_mpls", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/pre_next.p4", + "line" : 15, + "column" : 50, + "source_fragment" : "next_mpls_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_vlan_counter", + "id" : 9, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_vlan", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/pre_next.p4", + "line" : 39, + "column" : 50, + "source_fragment" : "next_vlan_counter" + } + }, + { + "name" : "FabricIngress.acl.acl_counter", + "id" : 10, + "is_direct" : true, + "binding" : "FabricIngress.acl.acl", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 19, + "column" : 50, + "source_fragment" : "acl_counter" + } + }, + { + "name" : "FabricIngress.next.simple_counter", + "id" : 11, + "is_direct" : true, + "binding" : "FabricIngress.next.simple", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 76, + "column" : 50, + "source_fragment" : "simple_counter" + } + }, + { + "name" : "FabricIngress.next.hashed_counter", + "id" : 12, + "is_direct" : true, + "binding" : "FabricIngress.next.hashed", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 115, + "column" : 50, + "source_fragment" : "hashed_counter" + } + }, + { + "name" : "FabricIngress.next.multicast_counter", + "id" : 13, + "is_direct" : true, + "binding" : "FabricIngress.next.multicast", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 148, + "column" : 50, + "source_fragment" : "multicast_counter" + } + }, + { + "name" : "FabricIngress.slice_tc_classifier.classifier_stats", + "id" : 14, + "is_direct" : true, + "binding" : "FabricIngress.slice_tc_classifier.classifier", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 20, + "column" : 40, + "source_fragment" : "classifier_stats" + } + }, + { + "name" : "FabricIngress.qos.queues_stats", + "id" : 15, + "is_direct" : true, + "binding" : "FabricIngress.qos.queues", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 106, + "column" : 40, + "source_fragment" : "queues_stats" + } + }, + { + "name" : "FabricIngress.int_watchlist.watchlist_counter", + "id" : 16, + "is_direct" : true, + "binding" : "FabricIngress.int_watchlist.watchlist", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 15, + "column" : 50, + "source_fragment" : "watchlist_counter" + } + }, + { + "name" : "FabricIngress.int_ingress.drop_report_counter", + "id" : 17, + "is_direct" : true, + "binding" : "FabricIngress.int_ingress.drop_report", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 64, + "column" : 50, + "source_fragment" : "drop_report_counter" + } + }, + { + "name" : "FabricEgress.stats.flow_counter", + "id" : 18, + "is_direct" : true, + "binding" : "FabricEgress.stats.flows", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/stats.p4", + "line" : 47, + "column" : 50, + "source_fragment" : "flow_counter" + } + }, + { + "name" : "FabricEgress.egress_next.egress_vlan_counter", + "id" : 19, + "is_direct" : true, + "binding" : "FabricEgress.egress_next.egress_vlan", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 241, + "column" : 50, + "source_fragment" : "egress_vlan_counter" + } + }, + { + "name" : "FabricEgress.int_egress.report_counter", + "id" : 20, + "is_direct" : true, + "binding" : "FabricEgress.int_egress.report", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 131, + "column" : 50, + "source_fragment" : "report_counter" + } + }, + { + "name" : "FabricEgress.int_egress.int_metadata_counter", + "id" : 21, + "is_direct" : true, + "binding" : "FabricEgress.int_egress.int_metadata", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 132, + "column" : 50, + "source_fragment" : "int_metadata_counter" + } + } + ], + "register_arrays" : [ + { + "name" : "FabricEgress.int_egress.seq_number", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 138, + "column" : 28, + "source_fragment" : "seq_number" + }, + "size" : 1024, + "bitwidth" : 32 + } + ], + "calculations" : [ + { + "name" : "calc", + "id" : 0, + "algo" : "crc32", + "input" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_15"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_16"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_17"] + } + ] + }, + { + "name" : "calc_0", + "id" : 1, + "algo" : "crc32", + "input" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_18"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_19"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_20"] + } + ] + }, + { + "name" : "calc_1", + "id" : 2, + "algo" : "crc32", + "input" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_21"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_22"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_23"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_24"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_25"] + } + ] + }, + { + "name" : "calc_2", + "id" : 3, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ingress.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["_ingress_ipv47", "version"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "ihl"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dscp"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "ecn"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "total_len"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "identification"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "flags"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "frag_offset"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "ttl"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "protocol"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "src_addr"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dst_addr"] + } + ] + }, + { + "name" : "calc_3", + "id" : 4, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 73, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ingress.inner_ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "version"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "ihl"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "dscp"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "ecn"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "total_len"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "identification"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "flags"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "frag_offset"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "ttl"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "protocol"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "src_addr"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "dst_addr"] + } + ] + }, + { + "name" : "calc_4", + "id" : 5, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 92, + "column" : 8, + "source_fragment" : "update_checksum(hdr.egress.report_ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["_egress_report_ipv427", "version"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "ihl"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "dscp"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "ecn"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "total_len"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "identification"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "flags"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "frag_offset"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "ttl"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "protocol"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "src_addr"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "dst_addr"] + } + ] + }, + { + "name" : "calc_5", + "id" : 6, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 13, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ingress.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["_ingress_ipv47", "version"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "ihl"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dscp"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "ecn"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "total_len"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "identification"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "flags"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "frag_offset"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "ttl"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "protocol"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "src_addr"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dst_addr"] + } + ] + }, + { + "name" : "calc_6", + "id" : 7, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 31, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ingress.inner_ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "version"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "ihl"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "dscp"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "ecn"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "total_len"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "identification"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "flags"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "frag_offset"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "ttl"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "protocol"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "src_addr"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "dst_addr"] + } + ] + } + ], + "learn_lists" : [], + "actions" : [ + { + "name" : "nop", + "id" : 0, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 1, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 2, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 3, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 4, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 5, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "NoAction", + "id" : 6, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.stats.count", + "id" : 7, + "runtime_data" : [ + { + "name" : "flow_id", + "bitwidth" : 10 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_stats_flow_id11"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/stats.p4", + "line" : 17, + "column" : 22, + "source_fragment" : "= flow_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.pkt_io.do_packet_out", + "id" : 8, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_ingress_packet_out0", "egress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 13, + "column" : 8, + "source_fragment" : "standard_md.egress_spec = (PortId_t)hdr.packet_out.egress_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "field", + "value" : ["_ingress_packet_out0", "egress_port"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 14, + "column" : 37, + "source_fragment" : "= hdr.packet_out.egress_port; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 15, + "column" : 34, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_packet_out0" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 16, + "column" : 8, + "source_fragment" : "hdr.packet_out.setInvalid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_egress0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 17, + "column" : 20, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_bridged4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 19, + "column" : 8, + "source_fragment" : "fabric_md.bridged.setInvalid()" + } + }, + { + "op" : "exit", + "parameters" : [], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 20, + "column" : 8, + "source_fragment" : "exit" + } + } + ] + }, + { + "name" : "FabricIngress.filtering.deny", + "id" : 9, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_forwarding19"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 22, + "column" : 34, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 23, + "column" : 28, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ig_port_type33"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 100, + "column" : 14, + "source_fragment" : "0x0, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "hexstr", + "value" : "0x37" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 250, + "column" : 41, + "source_fragment" : "55, ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit", + "id" : 10, + "runtime_data" : [ + { + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ig_port_type33"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 33, + "column" : 31, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit_with_internal_vlan", + "id" : 11, + "runtime_data" : [ + { + "name" : "vlan_id", + "bitwidth" : 12 + }, + { + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_vlan_id6"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.vlan_id = vlan_id" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ig_port_type33"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 33, + "column" : 31, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.set_forwarding_type", + "id" : 12, + "runtime_data" : [ + { + "name" : "fwd_type", + "bitwidth" : 3 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.fwd_type = fwd_type" + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_int_drop_reason", + "id" : 13, + "runtime_data" : [ + { + "name" : "drop_reason", + "bitwidth" : 8 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 17, + "column" : 8, + "source_fragment" : "fabric_md.bridged.int_bmd.drop_reason = (IntDropReason_t)drop_reason" + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_int_drop_reason", + "id" : 14, + "runtime_data" : [ + { + "name" : "drop_reason", + "bitwidth" : 8 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 17, + "column" : 8, + "source_fragment" : "fabric_md.bridged.int_bmd.drop_reason = (IntDropReason_t)drop_reason" + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_int_drop_reason", + "id" : 15, + "runtime_data" : [ + { + "name" : "drop_reason", + "bitwidth" : 8 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 17, + "column" : 8, + "source_fragment" : "fabric_md.bridged.int_bmd.drop_reason = (IntDropReason_t)drop_reason" + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_int_drop_reason", + "id" : 16, + "runtime_data" : [ + { + "name" : "drop_reason", + "bitwidth" : 8 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 17, + "column" : 8, + "source_fragment" : "fabric_md.bridged.int_bmd.drop_reason = (IntDropReason_t)drop_reason" + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_bridging", + "id" : 17, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 23, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.pop_mpls_and_next", + "id" : 18, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_mpls6" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 67, + "column" : 8, + "source_fragment" : "hdr.mpls.setInvalid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + }, + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ip_eth_type10"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 68, + "column" : 8, + "source_fragment" : "hdr.eth_type.value = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_label2"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 69, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.mpls_label = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 23, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_routing_v4", + "id" : 19, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 23, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.nop_routing_v4", + "id" : 20, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.forwarding.drop_routing_v4", + "id" : 21, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 111, + "column" : 28, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 113, + "column" : 17, + "source_fragment" : "= 1; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_routing_v6", + "id" : 22, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 23, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.drop_routing_v6", + "id" : 23, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 150, + "column" : 28, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 152, + "column" : 17, + "source_fragment" : "= 1; ..." + } + } + ] + }, + { + "name" : "FabricIngress.pre_next.set_mpls_label", + "id" : 24, + "runtime_data" : [ + { + "name" : "label", + "bitwidth" : 20 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_label2"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/pre_next.p4", + "line" : 18, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.mpls_label = label" + } + } + ] + }, + { + "name" : "FabricIngress.pre_next.set_vlan", + "id" : 25, + "runtime_data" : [ + { + "name" : "vlan_id", + "bitwidth" : 12 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_vlan_id6"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/pre_next.p4", + "line" : 42, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.vlan_id = vlan_id" + } + } + ] + }, + { + "name" : "FabricIngress.acl.set_next_id_acl", + "id" : 26, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 22, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 26, + "column" : 28, + "source_fragment" : "= false; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 27, + "column" : 17, + "source_fragment" : "= 0; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.copy_to_cpu", + "id" : 27, + "runtime_data" : [], + "primitives" : [ + { + "op" : "clone_ingress_pkt_to_egress", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x000001ff" + }, + { + "type" : "hexstr", + "value" : "0x2" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 31, + "column" : 8, + "source_fragment" : "clone_preserving_field_list(CloneType.I2E, ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.punt_to_cpu", + "id" : 28, + "runtime_data" : [], + "primitives" : [ + { + "op" : "clone_ingress_pkt_to_egress", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x000001ff" + }, + { + "type" : "hexstr", + "value" : "0x2" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 31, + "column" : 8, + "source_fragment" : "clone_preserving_field_list(CloneType.I2E, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 40, + "column" : 28, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_punt_to_cpu23"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 41, + "column" : 30, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 42, + "column" : 17, + "source_fragment" : "= 1; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.drop", + "id" : 29, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 46, + "column" : 17, + "source_fragment" : "= 1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 47, + "column" : 28, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "hexstr", + "value" : "0x50" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 252, + "column" : 27, + "source_fragment" : "80, ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.set_output_port", + "id" : 30, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 62, + "column" : 8, + "source_fragment" : "standard_md.egress_spec = (PortId_t) port_num" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 63, + "column" : 37, + "source_fragment" : "= port_num; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 64, + "column" : 34, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 65, + "column" : 28, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 66, + "column" : 17, + "source_fragment" : "= 0; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.nop_acl", + "id" : 31, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.next.output_simple", + "id" : 32, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 16, + "column" : 8, + "source_fragment" : "standard_md.egress_spec = (PortId_t)port_num" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 17, + "column" : 37, + "source_fragment" : "= port_num; // Needed by INT. ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 18, + "column" : 34, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.routing_simple", + "id" : 33, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + }, + { + "name" : "smac", + "bitwidth" : 48 + }, + { + "name" : "dmac", + "bitwidth" : 48 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ethernet3", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 23, + "column" : 8, + "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ethernet3", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 28, + "column" : 8, + "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 16, + "column" : 8, + "source_fragment" : "standard_md.egress_spec = (PortId_t)port_num" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 17, + "column" : 37, + "source_fragment" : "= port_num; // Needed by INT. ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 18, + "column" : 34, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.output_hashed", + "id" : 34, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 16, + "column" : 8, + "source_fragment" : "standard_md.egress_spec = (PortId_t)port_num" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 17, + "column" : 37, + "source_fragment" : "= port_num; // Needed by INT. ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 18, + "column" : 34, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.routing_hashed", + "id" : 35, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + }, + { + "name" : "smac", + "bitwidth" : 48 + }, + { + "name" : "dmac", + "bitwidth" : 48 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ethernet3", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 23, + "column" : 8, + "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ethernet3", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 28, + "column" : 8, + "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 16, + "column" : 8, + "source_fragment" : "standard_md.egress_spec = (PortId_t)port_num" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 17, + "column" : 37, + "source_fragment" : "= port_num; // Needed by INT. ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 18, + "column" : 34, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.set_mcast_group_id", + "id" : 36, + "runtime_data" : [ + { + "name" : "group_id", + "bitwidth" : 16 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "mcast_grp"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 151, + "column" : 8, + "source_fragment" : "standard_md.mcast_grp = group_id" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_is_multicast4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 152, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.is_multicast = true" + } + } + ] + }, + { + "name" : "FabricIngress.next.reset_mcast_group_id", + "id" : 37, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "mcast_grp"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 157, + "column" : 8, + "source_fragment" : "standard_md.mcast_grp = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_is_multicast4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 158, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.is_multicast = false" + } + } + ] + }, + { + "name" : "FabricIngress.slice_tc_classifier.set_slice_id_tc", + "id" : 38, + "runtime_data" : [ + { + "name" : "slice_id", + "bitwidth" : 4 + }, + { + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_slice_id26"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 23, + "column" : 27, + "source_fragment" : "= slice_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc27"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 24, + "column" : 21, + "source_fragment" : "= tc; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc_unknown28"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 25, + "column" : 29, + "source_fragment" : "= false; ..." + } + } + ] + }, + { + "name" : "FabricIngress.slice_tc_classifier.no_classification", + "id" : 39, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_slice_id26"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 57, + "column" : 36, + "source_fragment" : "0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc27"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 58, + "column" : 24, + "source_fragment" : "0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc_unknown28"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 25, + "column" : 29, + "source_fragment" : "= false; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc_unknown28"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 31, + "column" : 29, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.slice_tc_classifier.trust_dscp", + "id" : 40, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_slice_id26"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["_ingress_ipv47", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x0f" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 38, + "column" : 27, + "source_fragment" : "= hdr.ipv4.dscp[4 +2 -1:2]; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc27"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_ingress_ipv47", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 39, + "column" : 21, + "source_fragment" : "= hdr.ipv4.dscp[2 -1:0]; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc_unknown28"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 40, + "column" : 29, + "source_fragment" : "= false; ..." + } + } + ] + }, + { + "name" : "FabricIngress.qos.use_upf", + "id" : 41, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_slice_tc12"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_upf_slice_id30"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_upf_tc31"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 81, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.slice_tc = fabric_md.upf_slice_id++fabric_md.upf_tc" + } + } + ] + }, + { + "name" : "FabricIngress.qos.use_default", + "id" : 42, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_slice_tc12"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_slice_id26"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc27"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 86, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.slice_tc = fabric_md.slice_id++fabric_md.tc" + } + } + ] + }, + { + "name" : "FabricIngress.qos.set_queue", + "id" : 43, + "runtime_data" : [ + { + "name" : "qid", + "bitwidth" : 5 + } + ], + "primitives" : [] + }, + { + "name" : "FabricIngress.qos.meter_drop", + "id" : 44, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 115, + "column" : 17, + "source_fragment" : "= 1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "hexstr", + "value" : "0xa0" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 269, + "column" : 36, + "source_fragment" : "160, ..." + } + } + ] + }, + { + "name" : "FabricIngress.qos.set_default_tc", + "id" : 45, + "runtime_data" : [ + { + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_slice_tc12"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_slice_tc12"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x0f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 146, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.slice_tc = fabric_md.bridged.base.slice_tc[4 +2 -1:2]++tc" + } + } + ] + }, + { + "name" : "FabricIngress.int_watchlist.mark_to_report", + "id" : 46, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_report_type13"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 223, + "column" : 45, + "source_fragment" : "1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_report_type46"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 223, + "column" : 45, + "source_fragment" : "1; ..." + } + } + ] + }, + { + "name" : "FabricIngress.int_watchlist.no_report", + "id" : 47, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_report_type13"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 219, + "column" : 50, + "source_fragment" : "0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_report_type46"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 219, + "column" : 50, + "source_fragment" : "0; ..." + } + } + ] + }, + { + "name" : "FabricIngress.int_watchlist.no_report_collector", + "id" : 48, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_report_type13"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 219, + "column" : 50, + "source_fragment" : "0; ..." + } + } + ] + }, + { + "name" : "FabricIngress.int_ingress.report_drop", + "id" : 49, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_bmd_type0"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 169, + "column" : 23, + "source_fragment" : "4, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_report_type13"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 221, + "column" : 45, + "source_fragment" : "4; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_vlan_id6"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 147, + "column" : 34, + "source_fragment" : "12w4094; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_label2"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 71, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.mpls_label = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 79, + "column" : 17, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "hexstr", + "value" : "0x01fe" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/define_v1model.p4", + "line" : 36, + "column" : 42, + "source_fragment" : "510; ..." + } + } + ] + }, + { + "name" : "fabric_v1model64", + "id" : 50, + "runtime_data" : [], + "primitives" : [ + { + "op" : "exit", + "parameters" : [], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 64, + "column" : 12, + "source_fragment" : "exit" + } + } + ] + }, + { + "name" : "fabric_v1model61", + "id" : 51, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_md)" + } + } + ] + }, + { + "name" : "fabric_v1model70", + "id" : 52, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ig_port3"] + }, + { + "type" : "hexstr", + "value" : "0x01fe" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/define_v1model.p4", + "line" : 36, + "column" : 42, + "source_fragment" : "510; ..." + } + } + ] + }, + { + "name" : "lookup_md_init21", + "id" : 53, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_vlan_id9"] + }, + { + "type" : "field", + "value" : ["_ingress_vlan_tag4", "vlan_id"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 21, + "column" : 27, + "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." + } + } + ] + }, + { + "name" : "lookup_md_init15", + "id" : 54, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_eth_dst6"] + }, + { + "type" : "field", + "value" : ["_ingress_ethernet3", "dst_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 15, + "column" : 23, + "source_fragment" : "= hdr.ethernet.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_eth_src7"] + }, + { + "type" : "field", + "value" : ["_ingress_ethernet3", "src_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 16, + "column" : 23, + "source_fragment" : "= hdr.ethernet.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_eth_type8"] + }, + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 17, + "column" : 24, + "source_fragment" : "= hdr.eth_type.value; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_vlan_id9"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 19, + "column" : 23, + "source_fragment" : "= 0; ..." + } + } + ] + }, + { + "name" : "lookup_md_init38", + "id" : 55, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_tcp19", "sport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 38, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_tcp19", "dport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 39, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.dport; ..." + } + } + ] + }, + { + "name" : "lookup_md_init41", + "id" : 56, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_udp20", "sport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_udp20", "dport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 42, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.dport; ..." + } + } + ] + }, + { + "name" : "lookup_md_init44", + "id" : 57, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_icmp_type16"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_icmp21", "icmp_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 44, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_icmp_code17"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_icmp21", "icmp_code"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 45, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_code; ..." + } + } + ] + }, + { + "name" : "lookup_md_init33", + "id" : 58, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_is_ipv410"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 33, + "column" : 27, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "src_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 34, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "dst_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 35, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "protocol"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 36, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + } + ] + }, + { + "name" : "lookup_md_init53", + "id" : 59, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"] + }, + { + "type" : "field", + "value" : ["_ingress_tcp9", "sport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 53, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"] + }, + { + "type" : "field", + "value" : ["_ingress_tcp9", "dport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 54, + "column" : 32, + "source_fragment" : "= hdr.tcp.dport; ..." + } + } + ] + }, + { + "name" : "lookup_md_init56", + "id" : 60, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"] + }, + { + "type" : "field", + "value" : ["_ingress_udp10", "sport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 56, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"] + }, + { + "type" : "field", + "value" : ["_ingress_udp10", "dport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 57, + "column" : 32, + "source_fragment" : "= hdr.udp.dport; ..." + } + } + ] + }, + { + "name" : "lookup_md_init59", + "id" : 61, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_icmp_type16"] + }, + { + "type" : "field", + "value" : ["_ingress_icmp11", "icmp_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 59, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_icmp_code17"] + }, + { + "type" : "field", + "value" : ["_ingress_icmp11", "icmp_code"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 60, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_code; ..." + } + } + ] + }, + { + "name" : "lookup_md_init48", + "id" : 62, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_is_ipv410"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 48, + "column" : 27, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "src_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 49, + "column" : 28, + "source_fragment" : "= hdr.ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dst_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 50, + "column" : 28, + "source_fragment" : "= hdr.ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "protocol"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 51, + "column" : 28, + "source_fragment" : "= hdr.ipv4.protocol; ..." + } + } + ] + }, + { + "name" : "lookup_md_init24", + "id" : 63, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_is_ipv410"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 24, + "column" : 23, + "source_fragment" : "= false; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 25, + "column" : 24, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 26, + "column" : 24, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 27, + "column" : 24, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 28, + "column" : 24, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 29, + "column" : 24, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_icmp_type16"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 30, + "column" : 25, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_icmp_code17"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 31, + "column" : 25, + "source_fragment" : "= 0; ..." + } + } + ] + }, + { + "name" : "filtering100", + "id" : 64, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_14"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 100, + "column" : 31, + "source_fragment" : "(bit<32>)fabric_md.bridged.base.fwd_type" + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.filtering.fwd_type_counter" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_14"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 100, + "column" : 8, + "source_fragment" : "fwd_type_counter.count((bit<32>)fabric_md.bridged.base.fwd_type)" + } + } + ] + }, + { + "name" : "hasher39", + "id" : 65, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_15"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "src_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 43, + "column" : 17, + "source_fragment" : "hdr.ipv4.src_addr" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_16"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dst_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 43, + "column" : 36, + "source_fragment" : "hdr.ipv4.dst_addr" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_17"] + }, + { + "type" : "field", + "value" : ["_ingress_gtpu12", "teid"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 43, + "column" : 55, + "source_fragment" : "hdr.gtpu.teid" + } + }, + { + "op" : "modify_field_with_hash_based_offset", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ecmp_hash5"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + }, + { + "type" : "calculation", + "value" : "calc" + }, + { + "type" : "hexstr", + "value" : "0xffffffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 39, + "column" : 12, + "source_fragment" : "hash( ..." + } + } + ] + }, + { + "name" : "hasher50", + "id" : 66, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ecmp_hash5"] + }, + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_inner_hash1"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 50, + "column" : 32, + "source_fragment" : "= fabric_md.bridged.base.inner_hash; ..." + } + } + ] + }, + { + "name" : "hasher66", + "id" : 67, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_inner_hash1"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 66, + "column" : 12, + "source_fragment" : "fabric_md.bridged.base.inner_hash = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_18"] + }, + { + "type" : "field", + "value" : ["_ingress_ethernet3", "dst_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 71, + "column" : 17, + "source_fragment" : "hdr.ethernet.dst_addr" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_19"] + }, + { + "type" : "field", + "value" : ["_ingress_ethernet3", "src_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 71, + "column" : 40, + "source_fragment" : "hdr.ethernet.src_addr" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_20"] + }, + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 71, + "column" : 63, + "source_fragment" : "hdr.eth_type.value" + } + }, + { + "op" : "modify_field_with_hash_based_offset", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ecmp_hash5"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + }, + { + "type" : "calculation", + "value" : "calc_0" + }, + { + "type" : "hexstr", + "value" : "0xffffffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 67, + "column" : 12, + "source_fragment" : "hash( ..." + } + } + ] + }, + { + "name" : "hasher17", + "id" : 68, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 91, + "column" : 34, + "source_fragment" : "fabric_md" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 91, + "column" : 34, + "source_fragment" : "fabric_md" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_23"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 91, + "column" : 34, + "source_fragment" : "fabric_md" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_24"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 91, + "column" : 34, + "source_fragment" : "fabric_md" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_25"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 91, + "column" : 34, + "source_fragment" : "fabric_md" + } + }, + { + "op" : "modify_field_with_hash_based_offset", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_inner_hash1"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + }, + { + "type" : "calculation", + "value" : "calc_1" + }, + { + "type" : "hexstr", + "value" : "0xffffffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 17, + "column" : 8, + "source_fragment" : "hash( ..." + } + } + ] + }, + { + "name" : "slicing174", + "id" : 69, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_26"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_slice_tc12"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 174, + "column" : 41, + "source_fragment" : "(bit<32>) fabric_md.bridged.base.slice_tc" + } + }, + { + "op" : "execute_meter", + "parameters" : [ + { + "type" : "meter_array", + "value" : "FabricIngress.qos.slice_tc_meter" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_26"] + }, + { + "type" : "field", + "value" : ["scalars", "qos_packet_color"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 174, + "column" : 12, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) fabric_md.bridged.base.slice_tc, packet_color)" + } + } + ] + }, + { + "name" : "slicing177", + "id" : 70, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "qos_packet_color"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/define_v1model.p4", + "line" : 25, + "column" : 10, + "source_fragment" : "2 ..." + } + } + ] + }, + { + "name" : "int112", + "id" : 71, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_egress_port17"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 112, + "column" : 8, + "source_fragment" : "fabric_md.bridged.int_bmd.egress_port = standard_md.egress_spec" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_queue_id16"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 113, + "column" : 8, + "source_fragment" : "fabric_md.bridged.int_bmd.queue_id = 0" + } + } + ] + }, + { + "name" : "fabric_v1model110", + "id" : 72, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 110, + "column" : 12, + "source_fragment" : "mark_to_drop(standard_md)" + } + } + ] + }, + { + "name" : "fabric_v1model106", + "id" : 73, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_bridged36" + }, + { + "type" : "header", + "value" : "_ingress_bridged4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 106, + "column" : 8, + "source_fragment" : "fabric_md.egress.bridged = fabric_md" + } + } + ] + }, + { + "name" : "nop", + "id" : 74, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 75, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 76, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 77, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 78, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 79, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.stats.count", + "id" : 80, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.pkt_io_egress.set_switch_info", + "id" : 81, + "runtime_data" : [ + { + "name" : "cpu_port", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_cpu_port37"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 36, + "column" : 27, + "source_fragment" : "= (PortId_t)cpu_port; ..." + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.pop_mpls_if_present", + "id" : 82, + "runtime_data" : [], + "primitives" : [ + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_mpls6" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 198, + "column" : 8, + "source_fragment" : "hdr.mpls.setInvalid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_ip_eth_type10"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 200, + "column" : 8, + "source_fragment" : "hdr.eth_type.value = fabric_md.bridged" + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.set_mpls", + "id" : 83, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_mpls6" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 205, + "column" : 8, + "source_fragment" : "hdr.mpls.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_mpls6", "label"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_mpls_label2"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 206, + "column" : 8, + "source_fragment" : "hdr.mpls.label = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_mpls6", "tc"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 207, + "column" : 8, + "source_fragment" : "hdr.mpls.tc = 3w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_mpls6", "bos"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 208, + "column" : 8, + "source_fragment" : "hdr.mpls.bos = 1w1" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_mpls6", "ttl"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_mpls_ttl8"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 209, + "column" : 8, + "source_fragment" : "hdr.mpls.ttl = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + }, + { + "type" : "hexstr", + "value" : "0x8847" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 112, + "column" : 31, + "source_fragment" : "0x8847; ..." + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.push_vlan", + "id" : 84, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_vlan_tag4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 217, + "column" : 8, + "source_fragment" : "hdr.vlan_tag.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_vlan_tag4", "eth_type"] + }, + { + "type" : "hexstr", + "value" : "0x8100" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 111, + "column" : 31, + "source_fragment" : "0x8100; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_vlan_tag4", "vlan_id"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_vlan_id6"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 221, + "column" : 8, + "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_md.bridged" + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.pop_vlan", + "id" : 85, + "runtime_data" : [], + "primitives" : [ + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_vlan_tag4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 249, + "column" : 8, + "source_fragment" : "hdr.vlan_tag.setInvalid()" + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.drop", + "id" : 86, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 254, + "column" : 17, + "source_fragment" : "= 1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_drop_reason48"] + }, + { + "type" : "hexstr", + "value" : "0x82" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 257, + "column" : 35, + "source_fragment" : "130, ..." + } + } + ] + }, + { + "name" : "FabricEgress.dscp_rewriter.rewrite", + "id" : 87, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.dscp_rewriter.clear", + "id" : 88, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 198, + "column" : 8, + "source_fragment" : "tmp_dscp = 0" + } + } + ] + }, + { + "name" : "FabricEgress.parser_emulator.parse_int_ingress_drop", + "id" : 89, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 20, + "column" : 8, + "source_fragment" : "hdr.report_ethernet.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 25, + "column" : 8, + "source_fragment" : "hdr.report_eth_type.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 37, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "version"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.version = 4w4" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ihl"] + }, + { + "type" : "hexstr", + "value" : "0x05" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 39, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ihl = 4w5" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 40, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dscp = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ecn"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ecn = 2w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "flags"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 44, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.flags = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "frag_offset"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.frag_offset = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 150, + "column" : 32, + "source_fragment" : "64; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "protocol"] + }, + { + "type" : "hexstr", + "value" : "0x11" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 134, + "column" : 25, + "source_fragment" : "17; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 53, + "column" : 8, + "source_fragment" : "hdr.report_udp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_udp", "sport"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.report_udp.sport = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 60, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ver"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ver = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 203, + "column" : 52, + "source_fragment" : "2; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "rsvd"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 66, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.rsvd = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 71, + "column" : 8, + "source_fragment" : "hdr.common_report_header.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_int_report_md38" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 79, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "ip_eth_type"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 114, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "report_type"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 221, + "column" : 45, + "source_fragment" : "4; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "mirror_type"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 178, + "column" : 14, + "source_fragment" : "0, ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 85, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "bmd_type"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 169, + "column" : 23, + "source_fragment" : "4, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "encap_presence"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_encap_presence7"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 93, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.encap_presence = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "flow_hash"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_inner_hash1"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 94, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.flow_hash = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_drop_report_header", "drop_reason"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_drop_reason15"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 97, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.drop_reason = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ig_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_ig_tstamp9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 99, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ig_tstamp = fabric_md.bridged.base.ig_tstamp[31:0]" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "ig_port"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_ig_port3"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 101, + "column" : 8, + "source_fragment" : "hdr.common_report_header.ig_port = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "eg_port"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 102, + "column" : 8, + "source_fragment" : "hdr.common_report_header.eg_port = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "queue_id"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 103, + "column" : 8, + "source_fragment" : "hdr.common_report_header.queue_id = 0" + } + } + ] + }, + { + "name" : "FabricEgress.parser_emulator.parse_int_ingress_drop", + "id" : 90, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 20, + "column" : 8, + "source_fragment" : "hdr.report_ethernet.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 25, + "column" : 8, + "source_fragment" : "hdr.report_eth_type.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 37, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "version"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.version = 4w4" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ihl"] + }, + { + "type" : "hexstr", + "value" : "0x05" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 39, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ihl = 4w5" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 40, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dscp = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ecn"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ecn = 2w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "flags"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 44, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.flags = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "frag_offset"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.frag_offset = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 150, + "column" : 32, + "source_fragment" : "64; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "protocol"] + }, + { + "type" : "hexstr", + "value" : "0x11" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 134, + "column" : 25, + "source_fragment" : "17; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 53, + "column" : 8, + "source_fragment" : "hdr.report_udp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_udp", "sport"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.report_udp.sport = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 60, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ver"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ver = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 203, + "column" : 52, + "source_fragment" : "2; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "rsvd"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 66, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.rsvd = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 71, + "column" : 8, + "source_fragment" : "hdr.common_report_header.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_int_report_md38" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 79, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "ip_eth_type"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 114, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "report_type"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 221, + "column" : 45, + "source_fragment" : "4; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "mirror_type"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 178, + "column" : 14, + "source_fragment" : "0, ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 85, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "bmd_type"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 169, + "column" : 23, + "source_fragment" : "4, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "encap_presence"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_encap_presence7"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 93, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.encap_presence = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "flow_hash"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_inner_hash1"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 94, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.flow_hash = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_drop_report_header", "drop_reason"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_drop_reason15"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 97, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.drop_reason = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ig_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_ig_tstamp9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 99, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ig_tstamp = fabric_md.bridged.base.ig_tstamp[31:0]" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "ig_port"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_ig_port3"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 101, + "column" : 8, + "source_fragment" : "hdr.common_report_header.ig_port = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "eg_port"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 102, + "column" : 8, + "source_fragment" : "hdr.common_report_header.eg_port = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "queue_id"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 103, + "column" : 8, + "source_fragment" : "hdr.common_report_header.queue_id = 0" + } + } + ] + }, + { + "name" : "FabricEgress.parser_emulator.parse_int_report_mirror", + "id" : 91, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 20, + "column" : 8, + "source_fragment" : "hdr.report_ethernet.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 25, + "column" : 8, + "source_fragment" : "hdr.report_eth_type.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 37, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "version"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.version = 4w4" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ihl"] + }, + { + "type" : "hexstr", + "value" : "0x05" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 39, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ihl = 4w5" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 40, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dscp = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ecn"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ecn = 2w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "flags"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 44, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.flags = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "frag_offset"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.frag_offset = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 150, + "column" : 32, + "source_fragment" : "64; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "protocol"] + }, + { + "type" : "hexstr", + "value" : "0x11" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 134, + "column" : 25, + "source_fragment" : "17; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 53, + "column" : 8, + "source_fragment" : "hdr.report_udp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_udp", "sport"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.report_udp.sport = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 60, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ver"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ver = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 203, + "column" : 52, + "source_fragment" : "2; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "rsvd"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 66, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.rsvd = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 71, + "column" : 8, + "source_fragment" : "hdr.common_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "bmd_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 110, + "column" : 8, + "source_fragment" : "fabric_md.bridged.bmd_type = fabric_md.int_report_md.bmd_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_vlan_id6"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 147, + "column" : 34, + "source_fragment" : "12w4094; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_mpls_label2"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 112, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.mpls_label = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ig_tstamp"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "ig_tstamp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 118, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ig_tstamp = fabric_md.int_report_md.ig_tstamp" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "ig_port"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "ig_port"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 121, + "column" : 8, + "source_fragment" : "hdr.common_report_header.ig_port = fabric_md.int_report_md.ig_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "eg_port"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "eg_port"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 122, + "column" : 8, + "source_fragment" : "hdr.common_report_header.eg_port = fabric_md.int_report_md.eg_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "queue_id"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "queue_id"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 123, + "column" : 8, + "source_fragment" : "hdr.common_report_header.queue_id = fabric_md.int_report_md.queue_id" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 126, + "column" : 8, + "source_fragment" : "hdr.local_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_local_report_header", "queue_occupancy"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "queue_occupancy"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 127, + "column" : 8, + "source_fragment" : "hdr.local_report_header.queue_occupancy = fabric_md.int_report_md.queue_occupancy" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_local_report_header", "eg_tstamp"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "eg_tstamp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 128, + "column" : 8, + "source_fragment" : "hdr.local_report_header.eg_tstamp = fabric_md.int_report_md.eg_tstamp" + } + } + ] + }, + { + "name" : "FabricEgress.parser_emulator.parse_int_report_mirror", + "id" : 92, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 20, + "column" : 8, + "source_fragment" : "hdr.report_ethernet.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 25, + "column" : 8, + "source_fragment" : "hdr.report_eth_type.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 37, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "version"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.version = 4w4" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ihl"] + }, + { + "type" : "hexstr", + "value" : "0x05" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 39, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ihl = 4w5" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 40, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dscp = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ecn"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ecn = 2w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "flags"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 44, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.flags = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "frag_offset"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.frag_offset = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 150, + "column" : 32, + "source_fragment" : "64; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "protocol"] + }, + { + "type" : "hexstr", + "value" : "0x11" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 134, + "column" : 25, + "source_fragment" : "17; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 53, + "column" : 8, + "source_fragment" : "hdr.report_udp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_udp", "sport"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.report_udp.sport = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 60, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ver"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ver = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 203, + "column" : 52, + "source_fragment" : "2; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "rsvd"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 66, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.rsvd = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 71, + "column" : 8, + "source_fragment" : "hdr.common_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "bmd_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 110, + "column" : 8, + "source_fragment" : "fabric_md.bridged.bmd_type = fabric_md.int_report_md.bmd_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_vlan_id6"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 147, + "column" : 34, + "source_fragment" : "12w4094; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_mpls_label2"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 112, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.mpls_label = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ig_tstamp"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "ig_tstamp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 118, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ig_tstamp = fabric_md.int_report_md.ig_tstamp" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "ig_port"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "ig_port"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 121, + "column" : 8, + "source_fragment" : "hdr.common_report_header.ig_port = fabric_md.int_report_md.ig_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "eg_port"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "eg_port"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 122, + "column" : 8, + "source_fragment" : "hdr.common_report_header.eg_port = fabric_md.int_report_md.eg_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "queue_id"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "queue_id"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 123, + "column" : 8, + "source_fragment" : "hdr.common_report_header.queue_id = fabric_md.int_report_md.queue_id" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 126, + "column" : 8, + "source_fragment" : "hdr.local_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_local_report_header", "queue_occupancy"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "queue_occupancy"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 127, + "column" : 8, + "source_fragment" : "hdr.local_report_header.queue_occupancy = fabric_md.int_report_md.queue_occupancy" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_local_report_header", "eg_tstamp"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "eg_tstamp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 128, + "column" : 8, + "source_fragment" : "hdr.local_report_header.eg_tstamp = fabric_md.int_report_md.eg_tstamp" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.check_quota", + "id" : 93, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.int_egress.reset_quota", + "id" : 94, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.int_egress.set_config", + "id" : 95, + "runtime_data" : [ + { + "name" : "hop_latency_mask", + "bitwidth" : 32 + }, + { + "name" : "timestamp_mask", + "bitwidth" : 48 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "hop_latency"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "hop_latency"] + }, + "right" : { + "type" : "local", + "value" : 0 + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 179, + "column" : 8, + "source_fragment" : "fabric_md.int_md.hop_latency = fabric_md.int_md.hop_latency & hop_latency_mask" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "timestamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "timestamp"] + }, + "right" : { + "type" : "local", + "value" : 1 + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 180, + "column" : 8, + "source_fragment" : "fabric_md.int_md.timestamp = fabric_md.int_md.timestamp & timestamp_mask" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.do_local_report_encap", + "id" : 96, + "runtime_data" : [ + { + "name" : "src_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_port", + "bitwidth" : 16 + }, + { + "name" : "switch_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "modify_field_rng_uniform", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "identification"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + }, + { + "type" : "hexstr", + "value" : "0xffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 195, + "column" : 8, + "source_fragment" : "random(hdr.report_ipv4.identification, 0, 0xffff)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 197, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.src_addr = src_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 198, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dst_addr = mon_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_udp", "dport"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 199, + "column" : 8, + "source_fragment" : "hdr.report_udp.dport = mon_port; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_27"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_read", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_27"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 143, + "column" : 8, + "source_fragment" : "seq_number.read(reg, seq_number_idx)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00000001" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 144, + "column" : 8, + "source_fragment" : "reg = reg + 1" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_28"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_write", + "parameters" : [ + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_28"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 146, + "column" : 8, + "source_fragment" : "seq_number.write(seq_number_idx, reg)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "seq_no"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ] + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "dqf"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "report_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 201, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.dqf = fabric_md.int_report_md.report_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "switch_id"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 202, + "column" : 8, + "source_fragment" : "hdr.common_report_header.switch_id = switch_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad1"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 203, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad1 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 204, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad2 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 205, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad3 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_eth_type", "value"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ip_eth_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 207, + "column" : 8, + "source_fragment" : "hdr.eth_type.value = fabric_md.int_report_md.ip_eth_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_mirror_type3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 178, + "column" : 14, + "source_fragment" : "0, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0xbf04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 125, + "column" : 39, + "source_fragment" : "0xBF04; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 203, + "column" : 52, + "source_fragment" : "2; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 218, + "column" : 8, + "source_fragment" : "hdr.local_report_header.setValid()" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.do_local_report_encap_mpls", + "id" : 97, + "runtime_data" : [ + { + "name" : "src_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_port", + "bitwidth" : 16 + }, + { + "name" : "mon_label", + "bitwidth" : 20 + }, + { + "name" : "switch_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "modify_field_rng_uniform", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "identification"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + }, + { + "type" : "hexstr", + "value" : "0xffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 195, + "column" : 8, + "source_fragment" : "random(hdr.report_ipv4.identification, 0, 0xffff)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 197, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.src_addr = src_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 198, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dst_addr = mon_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_udp", "dport"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 199, + "column" : 8, + "source_fragment" : "hdr.report_udp.dport = mon_port; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_29"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_read", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_29"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 143, + "column" : 8, + "source_fragment" : "seq_number.read(reg, seq_number_idx)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00000001" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 144, + "column" : 8, + "source_fragment" : "reg = reg + 1" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_30"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_write", + "parameters" : [ + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_30"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 146, + "column" : 8, + "source_fragment" : "seq_number.write(seq_number_idx, reg)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "seq_no"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ] + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "dqf"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "report_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 201, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.dqf = fabric_md.int_report_md.report_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "switch_id"] + }, + { + "type" : "runtime_data", + "value" : 4 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 202, + "column" : 8, + "source_fragment" : "hdr.common_report_header.switch_id = switch_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad1"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 203, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad1 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 204, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad2 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 205, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad3 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_eth_type", "value"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ip_eth_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 207, + "column" : 8, + "source_fragment" : "hdr.eth_type.value = fabric_md.int_report_md.ip_eth_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_mirror_type3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 178, + "column" : 14, + "source_fragment" : "0, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0xbf04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 125, + "column" : 39, + "source_fragment" : "0xBF04; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 203, + "column" : 52, + "source_fragment" : "2; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 218, + "column" : 8, + "source_fragment" : "hdr.local_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0xbf05" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 126, + "column" : 39, + "source_fragment" : "0xBF05; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_mpls" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 226, + "column" : 8, + "source_fragment" : "hdr.report_mpls.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "tc"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 227, + "column" : 8, + "source_fragment" : "hdr.report_mpls.tc = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "bos"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 228, + "column" : 8, + "source_fragment" : "hdr.report_mpls.bos = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 149, + "column" : 32, + "source_fragment" : "64; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "label"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 230, + "column" : 8, + "source_fragment" : "hdr.report_mpls.label = mon_label" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.do_drop_report_encap", + "id" : 98, + "runtime_data" : [ + { + "name" : "src_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_port", + "bitwidth" : 16 + }, + { + "name" : "switch_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "modify_field_rng_uniform", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "identification"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + }, + { + "type" : "hexstr", + "value" : "0xffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 195, + "column" : 8, + "source_fragment" : "random(hdr.report_ipv4.identification, 0, 0xffff)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 197, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.src_addr = src_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 198, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dst_addr = mon_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_udp", "dport"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 199, + "column" : 8, + "source_fragment" : "hdr.report_udp.dport = mon_port; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_31"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_read", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_31"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 143, + "column" : 8, + "source_fragment" : "seq_number.read(reg, seq_number_idx)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00000001" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 144, + "column" : 8, + "source_fragment" : "reg = reg + 1" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_32"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_write", + "parameters" : [ + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_32"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 146, + "column" : 8, + "source_fragment" : "seq_number.write(seq_number_idx, reg)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "seq_no"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ] + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "dqf"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "report_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 201, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.dqf = fabric_md.int_report_md.report_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "switch_id"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 202, + "column" : 8, + "source_fragment" : "hdr.common_report_header.switch_id = switch_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad1"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 203, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad1 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 204, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad2 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 205, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad3 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_eth_type", "value"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ip_eth_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 207, + "column" : 8, + "source_fragment" : "hdr.eth_type.value = fabric_md.int_report_md.ip_eth_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_mirror_type3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 178, + "column" : 14, + "source_fragment" : "0, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0xbf04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 125, + "column" : 39, + "source_fragment" : "0xBF04; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 202, + "column" : 44, + "source_fragment" : "1; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 238, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.setValid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 241, + "column" : 8, + "source_fragment" : "hdr.local_report_header.setInvalid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_drop_report_header", "drop_reason"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_int_bmd_drop_reason15"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 243, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.drop_reason =" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.do_drop_report_encap_mpls", + "id" : 99, + "runtime_data" : [ + { + "name" : "src_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_port", + "bitwidth" : 16 + }, + { + "name" : "mon_label", + "bitwidth" : 20 + }, + { + "name" : "switch_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "modify_field_rng_uniform", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "identification"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + }, + { + "type" : "hexstr", + "value" : "0xffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 195, + "column" : 8, + "source_fragment" : "random(hdr.report_ipv4.identification, 0, 0xffff)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 197, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.src_addr = src_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 198, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dst_addr = mon_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_udp", "dport"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 199, + "column" : 8, + "source_fragment" : "hdr.report_udp.dport = mon_port; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_33"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_read", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_33"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 143, + "column" : 8, + "source_fragment" : "seq_number.read(reg, seq_number_idx)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00000001" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 144, + "column" : 8, + "source_fragment" : "reg = reg + 1" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_34"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_write", + "parameters" : [ + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_34"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 146, + "column" : 8, + "source_fragment" : "seq_number.write(seq_number_idx, reg)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "seq_no"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ] + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "dqf"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "report_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 201, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.dqf = fabric_md.int_report_md.report_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "switch_id"] + }, + { + "type" : "runtime_data", + "value" : 4 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 202, + "column" : 8, + "source_fragment" : "hdr.common_report_header.switch_id = switch_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad1"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 203, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad1 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 204, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad2 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 205, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad3 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_eth_type", "value"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ip_eth_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 207, + "column" : 8, + "source_fragment" : "hdr.eth_type.value = fabric_md.int_report_md.ip_eth_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_mirror_type3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 178, + "column" : 14, + "source_fragment" : "0, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0xbf04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 125, + "column" : 39, + "source_fragment" : "0xBF04; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 202, + "column" : 44, + "source_fragment" : "1; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 238, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.setValid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 241, + "column" : 8, + "source_fragment" : "hdr.local_report_header.setInvalid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_drop_report_header", "drop_reason"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_int_bmd_drop_reason15"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 243, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.drop_reason =" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0xbf05" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 126, + "column" : 39, + "source_fragment" : "0xBF05; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_mpls" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 251, + "column" : 8, + "source_fragment" : "hdr.report_mpls.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "tc"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 252, + "column" : 8, + "source_fragment" : "hdr.report_mpls.tc = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "bos"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 253, + "column" : 8, + "source_fragment" : "hdr.report_mpls.bos = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 149, + "column" : 32, + "source_fragment" : "64; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "label"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 256, + "column" : 8, + "source_fragment" : "hdr.report_mpls.label = mon_label" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.init_int_metadata", + "id" : 100, + "runtime_data" : [ + { + "name" : "report_type", + "bitwidth" : 3 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_int_bmd_mirror_session_id14"] + }, + { + "type" : "hexstr", + "value" : "0x01fa" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 208, + "column" : 43, + "source_fragment" : "0x1FA; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_fabric_md_int_report_md" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 293, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_mirror_type3"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 179, + "column" : 17, + "source_fragment" : "1, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "bmd_type"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 167, + "column" : 20, + "source_fragment" : "2, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "mirror_type"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 179, + "column" : 17, + "source_fragment" : "1, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ig_port"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_ig_port3"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 299, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.ig_port =" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "eg_port"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 300, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.eg_port = (PortId_t)standard_md.egress_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "queue_id"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_egress_qid"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 301, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.queue_id = egress_qid" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "queue_occupancy"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "deq_qdepth"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 302, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.queue_occupancy = standard_md.deq_qdepth" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ig_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_ig_tstamp9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 303, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.ig_tstamp = fabric_md.bridged.base.ig_tstamp[31:0]" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "eg_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_global_timestamp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 304, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.eg_tstamp = standard_md.egress_global_timestamp[31:0]" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ip_eth_type"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_ip_eth_type10"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 305, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.ip_eth_type =" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "flow_hash"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_inner_hash1"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 306, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.flow_hash =" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "report_type"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 309, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.report_type = report_type" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.adjust_ip_udp_len", + "id" : 101, + "runtime_data" : [ + { + "name" : "adjust_ip", + "bitwidth" : 16 + }, + { + "name" : "adjust_udp", + "bitwidth" : 16 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ipv47", "total_len"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "int_egress_fabric_md_pkt_length"] + }, + "right" : { + "type" : "local", + "value" : 0 + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 342, + "column" : 8, + "source_fragment" : "hdr_v1model.ingress.ipv4.total_len = fabric_md.pkt_length + adjust_ip" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_udp10", "len"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "int_egress_fabric_md_pkt_length"] + }, + "right" : { + "type" : "local", + "value" : 1 + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 343, + "column" : 8, + "source_fragment" : "hdr_v1model.ingress.udp.len = fabric_md.pkt_length + adjust_udp" + } + } + ] + }, + { + "name" : "fabric_v1model136", + "id" : 102, + "runtime_data" : [], + "primitives" : [ + { + "op" : "exit", + "parameters" : [], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 136, + "column" : 12, + "source_fragment" : "exit" + } + } + ] + }, + { + "name" : "fabric_v1model133", + "id" : 103, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_cpu_port37"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 133, + "column" : 8, + "source_fragment" : "fabric_md.egress.cpu_port = 0" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator148", + "id" : 104, + "runtime_data" : [], + "primitives" : [ + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_ipv47" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 148, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_tcp9" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 149, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.tcp.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_udp10" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 150, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.udp.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_icmp11" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 151, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.icmp.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_vxlan15" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 153, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.vxlan.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_inner_ethernet16" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 154, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.inner_ethernet.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_inner_eth_type17" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 155, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.inner_eth_type.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_gtpu12" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 157, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_gtpu_options13" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 158, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_gtpu_ext_psc14" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 159, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.gtpu_ext_psc.setInvalid()" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator14", + "id" : 105, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_drop_reason15"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_drop_reason48"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 144, + "column" : 12, + "source_fragment" : "fabric_md.egress.bridged.int_bmd.drop_reason = fabric_md" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_report_type13"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_report_type46"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 145, + "column" : 12, + "source_fragment" : "fabric_md.egress.bridged.int_bmd.report_type = fabric_md" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + }, + { + "type" : "header", + "value" : "_egress_report_ethernet24" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + }, + { + "type" : "header", + "value" : "_egress_report_eth_type25" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + }, + { + "type" : "header", + "value" : "_egress_report_ipv427" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + }, + { + "type" : "header", + "value" : "_egress_report_udp28" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + }, + { + "type" : "header", + "value" : "_egress_report_fixed_header29" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + }, + { + "type" : "header", + "value" : "_egress_common_report_header30" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_local_report_header" + }, + { + "type" : "header", + "value" : "_egress_local_report_header31" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_drop_report_header" + }, + { + "type" : "header", + "value" : "_egress_drop_report_header32" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_is_int_recirc44"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 134, + "column" : 32, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_vlan_tag4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 140, + "column" : 8, + "source_fragment" : "hdr_v1model.ingress.vlan_tag.setInvalid()" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator166", + "id" : 106, + "runtime_data" : [], + "primitives" : [ + { + "op" : "recirculate", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x3" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 166, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(NO_PRESERVATION)" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator169", + "id" : 107, + "runtime_data" : [], + "primitives" : [ + { + "op" : "recirculate", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x1" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 169, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(PRESERVE_INT_MD)" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator173", + "id" : 108, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_ethernet24" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_eth_type25" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_ipv427" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_udp28" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_fixed_header29" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_common_report_header30" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_local_report_header31" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_drop_report_header32" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + } + ] + }, + { + "name" : "int_tna_parser_emulator148_0", + "id" : 109, + "runtime_data" : [], + "primitives" : [ + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_ipv47" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 148, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_tcp9" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 149, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.tcp.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_udp10" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 150, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.udp.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_icmp11" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 151, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.icmp.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_vxlan15" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 153, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.vxlan.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_inner_ethernet16" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 154, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.inner_ethernet.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_inner_eth_type17" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 155, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.inner_eth_type.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_gtpu12" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 157, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_gtpu_options13" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 158, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_gtpu_ext_psc14" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 159, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.gtpu_ext_psc.setInvalid()" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator14_0", + "id" : 110, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + }, + { + "type" : "header", + "value" : "_egress_report_ethernet24" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + }, + { + "type" : "header", + "value" : "_egress_report_eth_type25" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + }, + { + "type" : "header", + "value" : "_egress_report_ipv427" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + }, + { + "type" : "header", + "value" : "_egress_report_udp28" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + }, + { + "type" : "header", + "value" : "_egress_report_fixed_header29" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + }, + { + "type" : "header", + "value" : "_egress_common_report_header30" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_local_report_header" + }, + { + "type" : "header", + "value" : "_egress_local_report_header31" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_drop_report_header" + }, + { + "type" : "header", + "value" : "_egress_drop_report_header32" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_is_int_recirc44"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 134, + "column" : 32, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_vlan_tag4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 140, + "column" : 8, + "source_fragment" : "hdr_v1model.ingress.vlan_tag.setInvalid()" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator166_0", + "id" : 111, + "runtime_data" : [], + "primitives" : [ + { + "op" : "recirculate", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 166, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(NO_PRESERVATION)" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator169_0", + "id" : 112, + "runtime_data" : [], + "primitives" : [ + { + "op" : "recirculate", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x1" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 169, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(PRESERVE_INT_MD)" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator173_0", + "id" : 113, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_ethernet24" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_eth_type25" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_ipv427" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_udp28" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_fixed_header29" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_common_report_header30" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_local_report_header31" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_drop_report_header32" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + } + ] + }, + { + "name" : "packetio51", + "id" : 114, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_packet_in1" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 51, + "column" : 12, + "source_fragment" : "hdr.packet_in.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_packet_in1", "ingress_port"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_ingress_port49"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 52, + "column" : 12, + "source_fragment" : "hdr.packet_in.ingress_port = preserved_ig_port; ..." + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_fake_ethernet2" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 53, + "column" : 12, + "source_fragment" : "hdr.fake_ethernet.setInvalid()" + } + }, + { + "op" : "exit", + "parameters" : [], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 54, + "column" : 12, + "source_fragment" : "exit" + } + } + ] + }, + { + "name" : "packetio60", + "id" : 115, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_pkt_length45"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "packet_length"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0000ffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xfff2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 60, + "column" : 37, + "source_fragment" : "= (bit<16>)standard_md.packet_length - 14; ..." + } + } + ] + }, + { + "name" : "next283", + "id" : 116, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_report_type13"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 219, + "column" : 50, + "source_fragment" : "0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 285, + "column" : 21, + "source_fragment" : "= 1; ..." + } + } + ] + }, + { + "name" : "next325", + "id" : 117, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 325, + "column" : 25, + "source_fragment" : "= 1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_drop_reason48"] + }, + { + "type" : "hexstr", + "value" : "0x83" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 258, + "column" : 32, + "source_fragment" : "131, ..." + } + } + ] + }, + { + "name" : "next323", + "id" : 118, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_mpls6", "ttl"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["_ingress_mpls6", "ttl"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 323, + "column" : 12, + "source_fragment" : "hdr.mpls.ttl = hdr.mpls.ttl - 1" + } + } + ] + }, + { + "name" : "next333", + "id" : 119, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ipv47", "ttl"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["_ingress_ipv47", "ttl"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 333, + "column" : 20, + "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" + } + } + ] + }, + { + "name" : "next336", + "id" : 120, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 336, + "column" : 29, + "source_fragment" : "= 1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_drop_reason48"] + }, + { + "type" : "hexstr", + "value" : "0x1a" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 247, + "column" : 30, + "source_fragment" : "26, ..." + } + } + ] + }, + { + "name" : "next343", + "id" : 121, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ipv68", "hop_limit"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["_ingress_ipv68", "hop_limit"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 343, + "column" : 20, + "source_fragment" : "hdr.ipv6.hop_limit = hdr.ipv6.hop_limit - 1" + } + } + ] + }, + { + "name" : "next346", + "id" : 122, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 346, + "column" : 29, + "source_fragment" : "= 1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_drop_reason48"] + }, + { + "type" : "hexstr", + "value" : "0x1a" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 247, + "column" : 30, + "source_fragment" : "26, ..." + } + } + ] + }, + { + "name" : "int128", + "id" : 123, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_eth_type" + }, + { + "type" : "header", + "value" : "_egress_report_eth_type25" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_mpls" + }, + { + "type" : "header", + "value" : "_egress_report_mpls26" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_ipv4" + }, + { + "type" : "header", + "value" : "_egress_report_ipv427" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_udp" + }, + { + "type" : "header", + "value" : "_egress_report_udp28" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_fixed_header" + }, + { + "type" : "header", + "value" : "_egress_report_fixed_header29" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_common_report_header" + }, + { + "type" : "header", + "value" : "_egress_common_report_header30" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_local_report_header" + }, + { + "type" : "header", + "value" : "_egress_local_report_header31" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_drop_report_header" + }, + { + "type" : "header", + "value" : "_egress_drop_report_header32" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_eth_type" + }, + { + "type" : "header", + "value" : "_egress_eth_type35" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_fabric_md_bridged" + }, + { + "type" : "header", + "value" : "_egress_bridged36" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_fabric_md_int_report_md" + }, + { + "type" : "header", + "value" : "_egress_int_report_md38" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "hop_latency"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_int_md_hop_latency39"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "timestamp"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_int_md_timestamp40"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "vlan_stripped"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_int_md_vlan_stripped41"] + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "queue_report"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_int_md_queue_report42"] + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_fabric_md_pkt_length"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_pkt_length45"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_egress_qid"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 135, + "column" : 4, + "source_fragment" : "QueueId_t egress_qid = 0;" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "hop_latency"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "-", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_global_timestamp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_ig_tstamp9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 365, + "column" : 8, + "source_fragment" : "fabric_md.int_md.hop_latency = standard_md.egress_global_timestamp[31:0] - fabric_md.bridged.base.ig_tstamp[31:0]" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "timestamp"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "egress_global_timestamp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 366, + "column" : 8, + "source_fragment" : "fabric_md.int_md.timestamp = standard_md.egress_global_timestamp" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "key_0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "-", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_global_timestamp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_ig_tstamp9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x10" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 166, + "column" : 12, + "source_fragment" : " fabric_md.int_md.hop_latency[31:16]: range @name(\\\"hop_latency_upper\\\");" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "key_1"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "-", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_global_timestamp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_ig_tstamp9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 167, + "column" : 12, + "source_fragment" : " fabric_md.int_md.hop_latency[15:0]: range @name(\\\"hop_latency_lower\\\");" + } + } + ] + }, + { + "name" : "int383", + "id" : 124, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_35"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_int_bmd_mirror_session_id14"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 384, + "column" : 20, + "source_fragment" : "(bit<32>)fabric_md.bridged.int_bmd.mirror_session_id" + } + }, + { + "op" : "clone_egress_pkt_to_egress", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_35"] + }, + { + "type" : "hexstr", + "value" : "0x1" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 383, + "column" : 16, + "source_fragment" : "clone_preserving_field_list(CloneType.E2E, ..." + } + } + ] + }, + { + "name" : "int373", + "id" : 125, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "hexstr", + "value" : "0x00" + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x7" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 373, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.hw_id = 4w0 ++ standard_md.egress_spec[8:7]" + } + } + ] + }, + { + "name" : "slicing217", + "id" : 126, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ipv47", "dscp"] + }, + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 217, + "column" : 16, + "source_fragment" : "hdr.ipv4.dscp = tmp_dscp" + } + } + ] + }, + { + "name" : "slicing189", + "id" : 127, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_bridged36" + }, + { + "type" : "header", + "value" : "int_egress_fabric_md_bridged" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 391, + "column" : 30, + "source_fragment" : "= fabric_md; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_int_report_md38" + }, + { + "type" : "header", + "value" : "int_egress_fabric_md_int_report_md" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 391, + "column" : 30, + "source_fragment" : "= fabric_md; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_int_md_hop_latency39"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "hop_latency"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 391, + "column" : 30, + "source_fragment" : "= fabric_md; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_int_md_timestamp40"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "timestamp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 391, + "column" : 30, + "source_fragment" : "= fabric_md; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_eth_type25" + }, + { + "type" : "header", + "value" : "int_egress_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_mpls26" + }, + { + "type" : "header", + "value" : "int_egress_hdr_report_mpls" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_ipv427" + }, + { + "type" : "header", + "value" : "int_egress_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_udp28" + }, + { + "type" : "header", + "value" : "int_egress_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_fixed_header29" + }, + { + "type" : "header", + "value" : "int_egress_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_common_report_header30" + }, + { + "type" : "header", + "value" : "int_egress_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_local_report_header31" + }, + { + "type" : "header", + "value" : "int_egress_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_drop_report_header32" + }, + { + "type" : "header", + "value" : "int_egress_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_eth_type35" + }, + { + "type" : "header", + "value" : "int_egress_hdr_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_slice_tc12"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 189, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.bridged.base.slice_tc;" + } + } + ] + }, + { + "name" : "fabric_v1model170", + "id" : 128, + "runtime_data" : [], + "primitives" : [ + { + "op" : "recirculate", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x5" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 170, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(NO_PRESERVATION)" + } + } + ] + }, + { + "name" : "fabric_v1model174", + "id" : 129, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 174, + "column" : 12, + "source_fragment" : "mark_to_drop(standard_md)" + } + } + ] + } + ], + "pipelines" : [ + { + "name" : "ingress", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 35, + "column" : 8, + "source_fragment" : "FabricIngress" + }, + "init_table" : "tbl_fabric_v1model61", + "tables" : [ + { + "name" : "tbl_fabric_v1model61", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_md)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [51], + "actions" : ["fabric_v1model61"], + "base_default_next" : "node_3", + "next_tables" : { + "fabric_v1model61" : "node_3" + }, + "default_entry" : { + "action_id" : 51, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_fabric_v1model64", + "id" : 1, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 64, + "column" : 12, + "source_fragment" : "exit" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [50], + "actions" : ["fabric_v1model64"], + "base_default_next" : "node_5", + "next_tables" : { + "fabric_v1model64" : "node_5" + }, + "default_entry" : { + "action_id" : 50, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_fabric_v1model70", + "id" : 2, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 70, + "column" : 51, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [52], + "actions" : ["fabric_v1model70"], + "base_default_next" : "tbl_lookup_md_init15", + "next_tables" : { + "fabric_v1model70" : "tbl_lookup_md_init15" + }, + "default_entry" : { + "action_id" : 52, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init15", + "id" : 3, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 15, + "column" : 23, + "source_fragment" : "= hdr.ethernet.dst_addr; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [54], + "actions" : ["lookup_md_init15"], + "base_default_next" : "node_8", + "next_tables" : { + "lookup_md_init15" : "node_8" + }, + "default_entry" : { + "action_id" : 54, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init21", + "id" : 4, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 21, + "column" : 27, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [53], + "actions" : ["lookup_md_init21"], + "base_default_next" : "tbl_lookup_md_init24", + "next_tables" : { + "lookup_md_init21" : "tbl_lookup_md_init24" + }, + "default_entry" : { + "action_id" : 53, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init24", + "id" : 5, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 24, + "column" : 23, + "source_fragment" : "= false; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [63], + "actions" : ["lookup_md_init24"], + "base_default_next" : "node_11", + "next_tables" : { + "lookup_md_init24" : "node_11" + }, + "default_entry" : { + "action_id" : 63, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init33", + "id" : 6, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 33, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [58], + "actions" : ["lookup_md_init33"], + "base_default_next" : "node_13", + "next_tables" : { + "lookup_md_init33" : "node_13" + }, + "default_entry" : { + "action_id" : 58, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init38", + "id" : 7, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 38, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [55], + "actions" : ["lookup_md_init38"], + "base_default_next" : "node_27", + "next_tables" : { + "lookup_md_init38" : "node_27" + }, + "default_entry" : { + "action_id" : 55, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init41", + "id" : 8, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [56], + "actions" : ["lookup_md_init41"], + "base_default_next" : "node_27", + "next_tables" : { + "lookup_md_init41" : "node_27" + }, + "default_entry" : { + "action_id" : 56, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init44", + "id" : 9, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 44, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [57], + "actions" : ["lookup_md_init44"], + "base_default_next" : "node_27", + "next_tables" : { + "lookup_md_init44" : "node_27" + }, + "default_entry" : { + "action_id" : 57, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init48", + "id" : 10, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 48, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [62], + "actions" : ["lookup_md_init48"], + "base_default_next" : "node_21", + "next_tables" : { + "lookup_md_init48" : "node_21" + }, + "default_entry" : { + "action_id" : 62, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init53", + "id" : 11, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 53, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [59], + "actions" : ["lookup_md_init53"], + "base_default_next" : "node_27", + "next_tables" : { + "lookup_md_init53" : "node_27" + }, + "default_entry" : { + "action_id" : 59, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init56", + "id" : 12, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 56, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [60], + "actions" : ["lookup_md_init56"], + "base_default_next" : "node_27", + "next_tables" : { + "lookup_md_init56" : "node_27" + }, + "default_entry" : { + "action_id" : 60, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init59", + "id" : 13, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 59, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [61], + "actions" : ["lookup_md_init59"], + "base_default_next" : "node_27", + "next_tables" : { + "lookup_md_init59" : "node_27" + }, + "default_entry" : { + "action_id" : 61, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_pkt_io_do_packet_out", + "id" : 14, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 25, + "column" : 12, + "source_fragment" : "do_packet_out()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [8], + "actions" : ["FabricIngress.pkt_io.do_packet_out"], + "base_default_next" : "FabricIngress.int_watchlist.watchlist", + "next_tables" : { + "FabricIngress.pkt_io.do_packet_out" : "FabricIngress.int_watchlist.watchlist" + }, + "default_entry" : { + "action_id" : 8, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.int_watchlist.watchlist", + "id" : 15, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 34, + "column" : 10, + "source_fragment" : "watchlist" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "ipv4_valid", + "target" : ["scalars", "userMetadata._ingress_lkp_is_ipv410"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"], + "mask" : null + }, + { + "match_type" : "range", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"], + "mask" : null + }, + { + "match_type" : "range", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"], + "mask" : null + } + ], + "match_type" : "range", + "type" : "simple", + "max_size" : 64, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [46, 48, 47], + "actions" : ["FabricIngress.int_watchlist.mark_to_report", "FabricIngress.int_watchlist.no_report_collector", "FabricIngress.int_watchlist.no_report"], + "base_default_next" : "FabricIngress.stats.flows", + "next_tables" : { + "FabricIngress.int_watchlist.mark_to_report" : "FabricIngress.stats.flows", + "FabricIngress.int_watchlist.no_report_collector" : "FabricIngress.stats.flows", + "FabricIngress.int_watchlist.no_report" : "FabricIngress.stats.flows" + }, + "default_entry" : { + "action_id" : 47, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.stats.flows", + "id" : 16, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/stats.p4", + "line" : 21, + "column" : 10, + "source_fragment" : "flows" + }, + "key" : [ + { + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "ig_port", + "target" : ["_ingress_bridged4", "_base_ig_port3"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [7], + "actions" : ["FabricIngress.stats.count"], + "base_default_next" : "FabricIngress.slice_tc_classifier.classifier", + "next_tables" : { + "FabricIngress.stats.count" : "FabricIngress.slice_tc_classifier.classifier" + }, + "default_entry" : { + "action_id" : 7, + "action_const" : true, + "action_data" : ["0x0"], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.slice_tc_classifier.classifier", + "id" : 17, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 44, + "column" : 10, + "source_fragment" : "classifier" + }, + "key" : [ + { + "match_type" : "ternary", + "name" : "ig_port", + "target" : ["_ingress_bridged4", "_base_ig_port3"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 512, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [38, 40, 39], + "actions" : ["FabricIngress.slice_tc_classifier.set_slice_id_tc", "FabricIngress.slice_tc_classifier.trust_dscp", "FabricIngress.slice_tc_classifier.no_classification"], + "base_default_next" : "FabricIngress.filtering.ingress_port_vlan", + "next_tables" : { + "FabricIngress.slice_tc_classifier.set_slice_id_tc" : "FabricIngress.filtering.ingress_port_vlan", + "FabricIngress.slice_tc_classifier.trust_dscp" : "FabricIngress.filtering.ingress_port_vlan", + "FabricIngress.slice_tc_classifier.no_classification" : "FabricIngress.filtering.ingress_port_vlan" + }, + "default_entry" : { + "action_id" : 39, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.filtering.ingress_port_vlan", + "id" : 18, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 42, + "column" : 10, + "source_fragment" : "ingress_port_vlan" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "ig_port", + "target" : ["_ingress_bridged4", "_base_ig_port3"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "vlan_is_valid", + "target" : ["_ingress_vlan_tag4", "$valid$"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "vlan_id", + "target" : ["_ingress_vlan_tag4", "vlan_id"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [9, 10, 11], + "actions" : ["FabricIngress.filtering.deny", "FabricIngress.filtering.permit", "FabricIngress.filtering.permit_with_internal_vlan"], + "base_default_next" : "FabricIngress.filtering.fwd_classifier", + "next_tables" : { + "FabricIngress.filtering.deny" : "FabricIngress.filtering.fwd_classifier", + "FabricIngress.filtering.permit" : "FabricIngress.filtering.fwd_classifier", + "FabricIngress.filtering.permit_with_internal_vlan" : "FabricIngress.filtering.fwd_classifier" + }, + "default_entry" : { + "action_id" : 9, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.filtering.fwd_classifier", + "id" : 19, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 80, + "column" : 10, + "source_fragment" : "fwd_classifier" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "ig_port", + "target" : ["_ingress_bridged4", "_base_ig_port3"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_dst", + "target" : ["_ingress_ethernet3", "dst_addr"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_type", + "target" : ["_ingress_eth_type5", "value"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "ip_eth_type", + "target" : ["_ingress_bridged4", "_base_ip_eth_type10"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [12], + "actions" : ["FabricIngress.filtering.set_forwarding_type"], + "base_default_next" : "tbl_filtering100", + "next_tables" : { + "FabricIngress.filtering.set_forwarding_type" : "tbl_filtering100" + }, + "default_entry" : { + "action_id" : 12, + "action_const" : true, + "action_data" : ["0x0"], + "action_entry_const" : true + } + }, + { + "name" : "tbl_filtering100", + "id" : 20, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 100, + "column" : 8, + "source_fragment" : "fwd_type_counter.count((bit<32>)fabric_md.bridged.base.fwd_type)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [64], + "actions" : ["filtering100"], + "base_default_next" : "node_35", + "next_tables" : { + "filtering100" : "node_35" + }, + "default_entry" : { + "action_id" : 64, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.forwarding.bridging", + "id" : 21, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 39, + "column" : 10, + "source_fragment" : "bridging" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "vlan_id", + "target" : ["_ingress_bridged4", "_base_vlan_id6"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_dst", + "target" : ["_ingress_ethernet3", "dst_addr"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [17, 13], + "actions" : ["FabricIngress.forwarding.set_next_id_bridging", "FabricIngress.forwarding.set_int_drop_reason"], + "base_default_next" : "tbl_hasher17", + "next_tables" : { + "FabricIngress.forwarding.set_next_id_bridging" : "tbl_hasher17", + "FabricIngress.forwarding.set_int_drop_reason" : "tbl_hasher17" + }, + "default_entry" : { + "action_id" : 13, + "action_const" : true, + "action_data" : ["0x59"], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.forwarding.mpls", + "id" : 22, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 74, + "column" : 10, + "source_fragment" : "mpls" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "mpls_label", + "target" : ["_ingress_bridged4", "_base_mpls_label2"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [18, 14], + "actions" : ["FabricIngress.forwarding.pop_mpls_and_next", "FabricIngress.forwarding.set_int_drop_reason"], + "base_default_next" : "tbl_hasher17", + "next_tables" : { + "FabricIngress.forwarding.pop_mpls_and_next" : "tbl_hasher17", + "FabricIngress.forwarding.set_int_drop_reason" : "tbl_hasher17" + }, + "default_entry" : { + "action_id" : 14, + "action_const" : true, + "action_data" : ["0x81"], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.forwarding.routing_v4", + "id" : 23, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 116, + "column" : 10, + "source_fragment" : "routing_v4" + }, + "key" : [ + { + "match_type" : "lpm", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._ingress_routing_ipv4_dst18"], + "mask" : null + } + ], + "match_type" : "lpm", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [19, 20, 21, 15], + "actions" : ["FabricIngress.forwarding.set_next_id_routing_v4", "FabricIngress.forwarding.nop_routing_v4", "FabricIngress.forwarding.drop_routing_v4", "FabricIngress.forwarding.set_int_drop_reason"], + "base_default_next" : "tbl_hasher17", + "next_tables" : { + "FabricIngress.forwarding.set_next_id_routing_v4" : "tbl_hasher17", + "FabricIngress.forwarding.nop_routing_v4" : "tbl_hasher17", + "FabricIngress.forwarding.drop_routing_v4" : "tbl_hasher17", + "FabricIngress.forwarding.set_int_drop_reason" : "tbl_hasher17" + }, + "default_entry" : { + "action_id" : 15, + "action_const" : false, + "action_data" : ["0x1d"], + "action_entry_const" : false + } + }, + { + "name" : "FabricIngress.forwarding.routing_v6", + "id" : 24, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 155, + "column" : 10, + "source_fragment" : "routing_v6" + }, + "key" : [ + { + "match_type" : "lpm", + "name" : "ipv6_dst", + "target" : ["_ingress_ipv68", "dst_addr"], + "mask" : null + } + ], + "match_type" : "lpm", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [22, 23, 16], + "actions" : ["FabricIngress.forwarding.set_next_id_routing_v6", "FabricIngress.forwarding.drop_routing_v6", "FabricIngress.forwarding.set_int_drop_reason"], + "base_default_next" : "tbl_hasher17", + "next_tables" : { + "FabricIngress.forwarding.set_next_id_routing_v6" : "tbl_hasher17", + "FabricIngress.forwarding.drop_routing_v6" : "tbl_hasher17", + "FabricIngress.forwarding.set_int_drop_reason" : "tbl_hasher17" + }, + "default_entry" : { + "action_id" : 16, + "action_const" : false, + "action_data" : ["0x1d"], + "action_entry_const" : false + } + }, + { + "name" : "tbl_hasher17", + "id" : 25, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 17, + "column" : 8, + "source_fragment" : "hash( ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [68], + "actions" : ["hasher17"], + "base_default_next" : "node_45", + "next_tables" : { + "hasher17" : "node_45" + }, + "default_entry" : { + "action_id" : 68, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_hasher39", + "id" : 26, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 39, + "column" : 12, + "source_fragment" : "hash( ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [65], + "actions" : ["hasher39"], + "base_default_next" : "node_50", + "next_tables" : { + "hasher39" : "node_50" + }, + "default_entry" : { + "action_id" : 65, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_hasher50", + "id" : 27, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 50, + "column" : 32, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [66], + "actions" : ["hasher50"], + "base_default_next" : "node_50", + "next_tables" : { + "hasher50" : "node_50" + }, + "default_entry" : { + "action_id" : 66, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_hasher66", + "id" : 28, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 66, + "column" : 46, + "source_fragment" : "= 0; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [67], + "actions" : ["hasher66"], + "base_default_next" : "node_50", + "next_tables" : { + "hasher66" : "node_50" + }, + "default_entry" : { + "action_id" : 67, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.pre_next.next_mpls", + "id" : 29, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/pre_next.p4", + "line" : 22, + "column" : 10, + "source_fragment" : "next_mpls" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._ingress_next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [24, 0], + "actions" : ["FabricIngress.pre_next.set_mpls_label", "nop"], + "base_default_next" : "FabricIngress.pre_next.next_vlan", + "next_tables" : { + "FabricIngress.pre_next.set_mpls_label" : "FabricIngress.pre_next.next_vlan", + "nop" : "FabricIngress.pre_next.next_vlan" + }, + "default_entry" : { + "action_id" : 0, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.pre_next.next_vlan", + "id" : 30, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/pre_next.p4", + "line" : 54, + "column" : 10, + "source_fragment" : "next_vlan" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._ingress_next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [25, 1], + "actions" : ["FabricIngress.pre_next.set_vlan", "nop"], + "base_default_next" : "FabricIngress.acl.acl", + "next_tables" : { + "FabricIngress.pre_next.set_vlan" : "FabricIngress.acl.acl", + "nop" : "FabricIngress.acl.acl" + }, + "default_entry" : { + "action_id" : 1, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.acl.acl", + "id" : 31, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 74, + "column" : 10, + "source_fragment" : "acl" + }, + "key" : [ + { + "match_type" : "ternary", + "name" : "ig_port", + "target" : ["_ingress_bridged4", "_base_ig_port3"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_dst", + "target" : ["_ingress_ethernet3", "dst_addr"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_src", + "target" : ["_ingress_ethernet3", "src_addr"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "vlan_id", + "target" : ["scalars", "userMetadata._ingress_lkp_vlan_id9"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_type", + "target" : ["scalars", "userMetadata._ingress_lkp_eth_type8"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "icmp_type", + "target" : ["scalars", "userMetadata._ingress_lkp_icmp_type16"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "icmp_code", + "target" : ["scalars", "userMetadata._ingress_lkp_icmp_code17"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ig_port_type", + "target" : ["scalars", "userMetadata._ingress_ig_port_type33"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [26, 28, 27, 29, 30, 31], + "actions" : ["FabricIngress.acl.set_next_id_acl", "FabricIngress.acl.punt_to_cpu", "FabricIngress.acl.copy_to_cpu", "FabricIngress.acl.drop", "FabricIngress.acl.set_output_port", "FabricIngress.acl.nop_acl"], + "base_default_next" : "node_54", + "next_tables" : { + "FabricIngress.acl.set_next_id_acl" : "node_54", + "FabricIngress.acl.punt_to_cpu" : "node_54", + "FabricIngress.acl.copy_to_cpu" : "node_54", + "FabricIngress.acl.drop" : "node_54", + "FabricIngress.acl.set_output_port" : "node_54", + "FabricIngress.acl.nop_acl" : "node_54" + }, + "default_entry" : { + "action_id" : 31, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.next.simple", + "id" : 32, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 88, + "column" : 10, + "source_fragment" : "simple" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._ingress_next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [32, 33, 2], + "actions" : ["FabricIngress.next.output_simple", "FabricIngress.next.routing_simple", "nop"], + "base_default_next" : "FabricIngress.next.hashed", + "next_tables" : { + "FabricIngress.next.output_simple" : "FabricIngress.next.hashed", + "FabricIngress.next.routing_simple" : "FabricIngress.next.hashed", + "nop" : "FabricIngress.next.hashed" + }, + "default_entry" : { + "action_id" : 2, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.next.hashed", + "id" : 33, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 127, + "column" : 10, + "source_fragment" : "hashed" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._ingress_next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "indirect_ws", + "action_profile" : "FabricIngress.next.hashed_profile", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [34, 35, 3], + "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "nop"], + "base_default_next" : "FabricIngress.next.multicast", + "next_tables" : { + "FabricIngress.next.output_hashed" : "FabricIngress.next.multicast", + "FabricIngress.next.routing_hashed" : "FabricIngress.next.multicast", + "nop" : "FabricIngress.next.multicast" + } + }, + { + "name" : "FabricIngress.next.multicast", + "id" : 34, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 161, + "column" : 10, + "source_fragment" : "multicast" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._ingress_next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [36, 37], + "actions" : ["FabricIngress.next.set_mcast_group_id", "FabricIngress.next.reset_mcast_group_id"], + "base_default_next" : "FabricIngress.qos.set_slice_tc", + "next_tables" : { + "FabricIngress.next.set_mcast_group_id" : "FabricIngress.qos.set_slice_tc", + "FabricIngress.next.reset_mcast_group_id" : "FabricIngress.qos.set_slice_tc" + }, + "default_entry" : { + "action_id" : 37, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.qos.set_slice_tc", + "id" : 35, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 91, + "column" : 10, + "source_fragment" : "set_slice_tc" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "fabric_md.is_upf_hit", + "target" : ["scalars", "userMetadata._ingress_is_upf_hit29"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 2, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [41, 42, 6], + "actions" : ["FabricIngress.qos.use_upf", "FabricIngress.qos.use_default", "NoAction"], + "base_default_next" : "FabricIngress.qos.default_tc", + "next_tables" : { + "FabricIngress.qos.use_upf" : "FabricIngress.qos.default_tc", + "FabricIngress.qos.use_default" : "FabricIngress.qos.default_tc", + "NoAction" : "FabricIngress.qos.default_tc" + }, + "default_entry" : { + "action_id" : 6, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false + }, + "entries" : [ + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 96, + "column" : 12, + "source_fragment" : "true: use_upf" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + } + ], + "action_entry" : { + "action_id" : 41, + "action_data" : [] + }, + "priority" : 1 + }, + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 97, + "column" : 12, + "source_fragment" : "false: use_default" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x00" + } + ], + "action_entry" : { + "action_id" : 42, + "action_data" : [] + }, + "priority" : 2 + } + ] + }, + { + "name" : "FabricIngress.qos.default_tc", + "id" : 36, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 150, + "column" : 10, + "source_fragment" : "default_tc" + }, + "key" : [ + { + "match_type" : "ternary", + "name" : "slice_tc", + "target" : ["_ingress_bridged4", "_base_slice_tc12"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "tc_unknown", + "target" : ["scalars", "userMetadata._ingress_tc_unknown28"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 16, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [45, 4], + "actions" : ["FabricIngress.qos.set_default_tc", "nop"], + "base_default_next" : "node_60", + "next_tables" : { + "FabricIngress.qos.set_default_tc" : "node_60", + "nop" : "node_60" + }, + "default_entry" : { + "action_id" : 4, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing174", + "id" : 37, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 174, + "column" : 12, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) fabric_md.bridged.base.slice_tc, packet_color)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [69], + "actions" : ["slicing174"], + "base_default_next" : "FabricIngress.qos.queues", + "next_tables" : { + "slicing174" : "FabricIngress.qos.queues" + }, + "default_entry" : { + "action_id" : 69, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing177", + "id" : 38, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 177, + "column" : 25, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [70], + "actions" : ["slicing177"], + "base_default_next" : "FabricIngress.qos.queues", + "next_tables" : { + "slicing177" : "FabricIngress.qos.queues" + }, + "default_entry" : { + "action_id" : 70, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.qos.queues", + "id" : 39, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 122, + "column" : 10, + "source_fragment" : "queues" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "slice_tc", + "target" : ["_ingress_bridged4", "_base_slice_tc12"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "color", + "target" : ["scalars", "qos_packet_color"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 128, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [43, 44], + "actions" : ["FabricIngress.qos.set_queue", "FabricIngress.qos.meter_drop"], + "base_default_next" : "tbl_int112", + "next_tables" : { + "FabricIngress.qos.set_queue" : "tbl_int112", + "FabricIngress.qos.meter_drop" : "tbl_int112" + }, + "default_entry" : { + "action_id" : 43, + "action_const" : true, + "action_data" : ["0x0"], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int112", + "id" : 40, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 112, + "column" : 46, + "source_fragment" : "= standard_md.egress_spec; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [71], + "actions" : ["int112"], + "base_default_next" : "FabricIngress.int_ingress.drop_report", + "next_tables" : { + "int112" : "FabricIngress.int_ingress.drop_report" + }, + "default_entry" : { + "action_id" : 71, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.int_ingress.drop_report", + "id" : 41, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 86, + "column" : 10, + "source_fragment" : "drop_report" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "int_report_type", + "target" : ["_ingress_bridged4", "_int_bmd_report_type13"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "drop_ctl", + "target" : ["scalars", "userMetadata._drop_ctl2"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "punt_to_cpu", + "target" : ["scalars", "userMetadata._ingress_punt_to_cpu23"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "egress_port_set", + "target" : ["scalars", "userMetadata._ingress_egress_port_set22"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "mcast_group_id", + "target" : ["standard_metadata", "mcast_grp"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 3, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [49, 5], + "actions" : ["FabricIngress.int_ingress.report_drop", "nop"], + "base_default_next" : "tbl_fabric_v1model106", + "next_tables" : { + "FabricIngress.int_ingress.report_drop" : "tbl_fabric_v1model106", + "nop" : "tbl_fabric_v1model106" + }, + "default_entry" : { + "action_id" : 5, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + }, + "entries" : [ + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 101, + "column" : 12, + "source_fragment" : "(INT_REPORT_TYPE_FLOW, 1, false, false, _): report_drop()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "ternary", + "key" : "0x0000", + "mask" : "0x0000" + } + ], + "action_entry" : { + "action_id" : 49, + "action_data" : [] + }, + "priority" : 1 + }, + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 102, + "column" : 12, + "source_fragment" : "(INT_REPORT_TYPE_FLOW, 1, false, true, _): report_drop()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "ternary", + "key" : "0x0000", + "mask" : "0x0000" + } + ], + "action_entry" : { + "action_id" : 49, + "action_data" : [] + }, + "priority" : 2 + }, + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 104, + "column" : 12, + "source_fragment" : "(INT_REPORT_TYPE_FLOW, 0, false, false, 0): report_drop()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "ternary", + "key" : "0x0000", + "mask" : "0xffff" + } + ], + "action_entry" : { + "action_id" : 49, + "action_data" : [] + }, + "priority" : 3 + } + ] + }, + { + "name" : "tbl_fabric_v1model106", + "id" : 42, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 106, + "column" : 33, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [73], + "actions" : ["fabric_v1model106"], + "base_default_next" : "node_67", + "next_tables" : { + "fabric_v1model106" : "node_67" + }, + "default_entry" : { + "action_id" : 73, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_fabric_v1model110", + "id" : 43, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 110, + "column" : 12, + "source_fragment" : "mark_to_drop(standard_md)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [72], + "actions" : ["fabric_v1model110"], + "base_default_next" : null, + "next_tables" : { + "fabric_v1model110" : null + }, + "default_entry" : { + "action_id" : 72, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + } + ], + "action_profiles" : [ + { + "name" : "FabricIngress.next.hashed_profile", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 112, + "column" : 15, + "source_fragment" : "hashed_profile" + }, + "max_size" : 16, + "selector" : { + "algo" : "crc16", + "input" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ecmp_hash5"] + } + ] + } + } + ], + "conditionals" : [ + { + "name" : "node_3", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 62, + "column" : 12, + "source_fragment" : "standard_md.parser_error == error.PacketRejectedByParser" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "parser_error"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x8" + } + } + }, + "true_next" : "tbl_fabric_v1model64", + "false_next" : "node_5" + }, + { + "name" : "node_5", + "id" : 1, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 67, + "column" : 13, + "source_fragment" : "standard_md.instance_type == 4" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "instance_type"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00000004" + } + } + }, + "true_next" : "tbl_fabric_v1model70", + "false_next" : "tbl_lookup_md_init15" + }, + { + "name" : "node_8", + "id" : 2, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 20, + "column" : 12, + "source_fragment" : "hdr.vlan_tag.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_vlan_tag4", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init21", + "false_next" : "tbl_lookup_md_init24" + }, + { + "name" : "node_11", + "id" : 3, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 32, + "column" : 12, + "source_fragment" : "hdr.inner_ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init33", + "false_next" : "node_19" + }, + { + "name" : "node_13", + "id" : 4, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 37, + "column" : 16, + "source_fragment" : "hdr.inner_tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_inner_tcp19", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init38", + "false_next" : "node_15" + }, + { + "name" : "node_15", + "id" : 5, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 40, + "column" : 23, + "source_fragment" : "hdr.inner_udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_inner_udp20", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init41", + "false_next" : "node_17" + }, + { + "name" : "node_17", + "id" : 6, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 43, + "column" : 23, + "source_fragment" : "hdr.inner_icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_inner_icmp21", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init44", + "false_next" : "node_27" + }, + { + "name" : "node_19", + "id" : 7, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 47, + "column" : 19, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv47", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init48", + "false_next" : "node_27" + }, + { + "name" : "node_21", + "id" : 8, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 52, + "column" : 16, + "source_fragment" : "hdr.tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_tcp9", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init53", + "false_next" : "node_23" + }, + { + "name" : "node_23", + "id" : 9, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 55, + "column" : 23, + "source_fragment" : "hdr.udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_udp10", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init56", + "false_next" : "node_25" + }, + { + "name" : "node_25", + "id" : 10, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 58, + "column" : 23, + "source_fragment" : "hdr.icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_icmp11", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init59", + "false_next" : "node_27" + }, + { + "name" : "node_27", + "id" : 11, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 24, + "column" : 12, + "source_fragment" : "hdr.packet_out.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_packet_out0", "$valid$"] + } + } + }, + "true_next" : "tbl_pkt_io_do_packet_out", + "false_next" : "FabricIngress.int_watchlist.watchlist" + }, + { + "name" : "node_35", + "id" : 12, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 88, + "column" : 13, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_forwarding19"] + } + } + }, + "false_next" : "node_36", + "true_next" : "tbl_hasher17" + }, + { + "name" : "node_36", + "id" : 13, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 178, + "column" : 12, + "source_fragment" : "hdr.ethernet.isValid() && ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ethernet3", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + }, + "true_next" : "FabricIngress.forwarding.bridging", + "false_next" : "node_38" + }, + { + "name" : "node_38", + "id" : 14, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 181, + "column" : 19, + "source_fragment" : "hdr.mpls.isValid() && ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_mpls6", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + }, + "true_next" : "FabricIngress.forwarding.mpls", + "false_next" : "node_40" + }, + { + "name" : "node_40", + "id" : 15, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 184, + "column" : 19, + "source_fragment" : "fabric_md.lkp.is_ipv4 && ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_is_ipv410"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "or", + "left" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x02" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" + } + } + } + } + } + } + }, + "true_next" : "FabricIngress.forwarding.routing_v4", + "false_next" : "node_42" + }, + { + "name" : "node_42", + "id" : 16, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 188, + "column" : 19, + "source_fragment" : "hdr.ipv6.isValid() && ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv68", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x04" + } + } + } + } + }, + "true_next" : "FabricIngress.forwarding.routing_v6", + "false_next" : "tbl_hasher17" + }, + { + "name" : "node_45", + "id" : 17, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 38, + "column" : 12, + "source_fragment" : "hdr.gtpu.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_gtpu12", "$valid$"] + } + } + }, + "true_next" : "tbl_hasher39", + "false_next" : "node_47" + }, + { + "name" : "node_47", + "id" : 18, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 91, + "column" : 34, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_is_ipv410"] + } + } + }, + "true_next" : "tbl_hasher50", + "false_next" : "tbl_hasher66" + }, + { + "name" : "node_50", + "id" : 19, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 92, + "column" : 13, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + } + } + }, + "false_next" : "FabricIngress.pre_next.next_mpls", + "true_next" : "FabricIngress.acl.acl" + }, + { + "name" : "node_54", + "id" : 20, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 96, + "column" : 13, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + } + } + }, + "false_next" : "FabricIngress.next.simple", + "true_next" : "FabricIngress.qos.set_slice_tc" + }, + { + "name" : "node_60", + "id" : 21, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 173, + "column" : 12, + "source_fragment" : "fabric_md.upf_meter_color != MeterColor_t.RED" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_upf_meter_color32"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x02" + } + } + }, + "true_next" : "tbl_slicing174", + "false_next" : "tbl_slicing177" + }, + { + "name" : "node_67", + "id" : 22, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 109, + "column" : 12, + "source_fragment" : "fabric_md.drop_ctl == 1" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + }, + "false_next" : null, + "true_next" : "tbl_fabric_v1model110" + } + ] + }, + { + "name" : "egress", + "id" : 1, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 115, + "column" : 8, + "source_fragment" : "FabricEgress" + }, + "init_table" : "tbl_fabric_v1model133", + "tables" : [ + { + "name" : "tbl_fabric_v1model133", + "id" : 44, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 133, + "column" : 34, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [103], + "actions" : ["fabric_v1model133"], + "base_default_next" : "node_72", + "next_tables" : { + "fabric_v1model133" : "node_72" + }, + "default_entry" : { + "action_id" : 103, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_fabric_v1model136", + "id" : 45, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 136, + "column" : 12, + "source_fragment" : "exit" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [102], + "actions" : ["fabric_v1model136"], + "base_default_next" : "node_74", + "next_tables" : { + "fabric_v1model136" : "node_74" + }, + "default_entry" : { + "action_id" : 102, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator14", + "id" : 46, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [105], + "actions" : ["int_tna_parser_emulator14"], + "base_default_next" : "node_76", + "next_tables" : { + "int_tna_parser_emulator14" : "node_76" + }, + "default_entry" : { + "action_id" : 105, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator148", + "id" : 47, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 148, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.ipv4.setInvalid(); ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [104], + "actions" : ["int_tna_parser_emulator148"], + "base_default_next" : "node_78", + "next_tables" : { + "int_tna_parser_emulator148" : "node_78" + }, + "default_entry" : { + "action_id" : 104, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_parser_emulator_parse_int_ingress_drop", + "id" : 48, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 165, + "column" : 12, + "source_fragment" : "parse_int_ingress_drop()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [89], + "actions" : ["FabricEgress.parser_emulator.parse_int_ingress_drop"], + "base_default_next" : "tbl_int_tna_parser_emulator166", + "next_tables" : { + "FabricEgress.parser_emulator.parse_int_ingress_drop" : "tbl_int_tna_parser_emulator166" + }, + "default_entry" : { + "action_id" : 89, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator166", + "id" : 49, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 166, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(NO_PRESERVATION)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [106], + "actions" : ["int_tna_parser_emulator166"], + "base_default_next" : "tbl_int_tna_parser_emulator173", + "next_tables" : { + "int_tna_parser_emulator166" : "tbl_int_tna_parser_emulator173" + }, + "default_entry" : { + "action_id" : 106, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_parser_emulator_parse_int_report_mirror", + "id" : 50, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 168, + "column" : 12, + "source_fragment" : "parse_int_report_mirror()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [91], + "actions" : ["FabricEgress.parser_emulator.parse_int_report_mirror"], + "base_default_next" : "tbl_int_tna_parser_emulator169", + "next_tables" : { + "FabricEgress.parser_emulator.parse_int_report_mirror" : "tbl_int_tna_parser_emulator169" + }, + "default_entry" : { + "action_id" : 91, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator169", + "id" : 51, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 169, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(PRESERVE_INT_MD)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [107], + "actions" : ["int_tna_parser_emulator169"], + "base_default_next" : "tbl_int_tna_parser_emulator173", + "next_tables" : { + "int_tna_parser_emulator169" : "tbl_int_tna_parser_emulator173" + }, + "default_entry" : { + "action_id" : 107, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator173", + "id" : 52, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [108], + "actions" : ["int_tna_parser_emulator173"], + "base_default_next" : "node_84", + "next_tables" : { + "int_tna_parser_emulator173" : "node_84" + }, + "default_entry" : { + "action_id" : 108, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator14_0", + "id" : 53, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [110], + "actions" : ["int_tna_parser_emulator14_0"], + "base_default_next" : "node_86", + "next_tables" : { + "int_tna_parser_emulator14_0" : "node_86" + }, + "default_entry" : { + "action_id" : 110, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator148_0", + "id" : 54, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 148, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.ipv4.setInvalid(); ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [109], + "actions" : ["int_tna_parser_emulator148_0"], + "base_default_next" : "node_88", + "next_tables" : { + "int_tna_parser_emulator148_0" : "node_88" + }, + "default_entry" : { + "action_id" : 109, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_parser_emulator_parse_int_ingress_drop_0", + "id" : 55, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 165, + "column" : 12, + "source_fragment" : "parse_int_ingress_drop()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [90], + "actions" : ["FabricEgress.parser_emulator.parse_int_ingress_drop"], + "base_default_next" : "tbl_int_tna_parser_emulator166_0", + "next_tables" : { + "FabricEgress.parser_emulator.parse_int_ingress_drop" : "tbl_int_tna_parser_emulator166_0" + }, + "default_entry" : { + "action_id" : 90, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator166_0", + "id" : 56, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 166, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(NO_PRESERVATION)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [111], + "actions" : ["int_tna_parser_emulator166_0"], + "base_default_next" : "tbl_int_tna_parser_emulator173_0", + "next_tables" : { + "int_tna_parser_emulator166_0" : "tbl_int_tna_parser_emulator173_0" + }, + "default_entry" : { + "action_id" : 111, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_parser_emulator_parse_int_report_mirror_0", + "id" : 57, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 168, + "column" : 12, + "source_fragment" : "parse_int_report_mirror()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [92], + "actions" : ["FabricEgress.parser_emulator.parse_int_report_mirror"], + "base_default_next" : "tbl_int_tna_parser_emulator169_0", + "next_tables" : { + "FabricEgress.parser_emulator.parse_int_report_mirror" : "tbl_int_tna_parser_emulator169_0" + }, + "default_entry" : { + "action_id" : 92, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator169_0", + "id" : 58, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 169, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(PRESERVE_INT_MD)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [112], + "actions" : ["int_tna_parser_emulator169_0"], + "base_default_next" : "tbl_int_tna_parser_emulator173_0", + "next_tables" : { + "int_tna_parser_emulator169_0" : "tbl_int_tna_parser_emulator173_0" + }, + "default_entry" : { + "action_id" : 112, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator173_0", + "id" : 59, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [113], + "actions" : ["int_tna_parser_emulator173_0"], + "base_default_next" : "FabricEgress.pkt_io_egress.switch_info", + "next_tables" : { + "int_tna_parser_emulator173_0" : "FabricEgress.pkt_io_egress.switch_info" + }, + "default_entry" : { + "action_id" : 113, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.pkt_io_egress.switch_info", + "id" : 60, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 39, + "column" : 10, + "source_fragment" : "switch_info" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [81, 74], + "actions" : ["FabricEgress.pkt_io_egress.set_switch_info", "nop"], + "base_default_next" : "node_95", + "next_tables" : { + "FabricEgress.pkt_io_egress.set_switch_info" : "node_95", + "nop" : "node_95" + }, + "default_entry" : { + "action_id" : 74, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false + } + }, + { + "name" : "tbl_packetio51", + "id" : 61, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 51, + "column" : 12, + "source_fragment" : "hdr.packet_in.setValid(); ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [114], + "actions" : ["packetio51"], + "base_default_next" : "node_97", + "next_tables" : { + "packetio51" : "node_97" + }, + "default_entry" : { + "action_id" : 114, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_packetio60", + "id" : 62, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 60, + "column" : 37, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [115], + "actions" : ["packetio60"], + "base_default_next" : "node_99", + "next_tables" : { + "packetio60" : "node_99" + }, + "default_entry" : { + "action_id" : 115, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.stats.flows", + "id" : 63, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/stats.p4", + "line" : 53, + "column" : 10, + "source_fragment" : "flows" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "stats_flow_id", + "target" : ["_egress_bridged36", "_base_stats_flow_id11"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "eg_port", + "target" : ["standard_metadata", "egress_port"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [80], + "actions" : ["FabricEgress.stats.count"], + "base_default_next" : "node_101", + "next_tables" : { + "FabricEgress.stats.count" : "node_101" + }, + "default_entry" : { + "action_id" : 80, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next283", + "id" : 64, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 283, + "column" : 50, + "source_fragment" : "= INT_REPORT_TYPE_NO_REPORT; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [116], + "actions" : ["next283"], + "base_default_next" : "node_103", + "next_tables" : { + "next283" : "node_103" + }, + "default_entry" : { + "action_id" : 116, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_egress_next_pop_mpls_if_present", + "id" : 65, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 289, + "column" : 36, + "source_fragment" : "pop_mpls_if_present()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [82], + "actions" : ["FabricEgress.egress_next.pop_mpls_if_present"], + "base_default_next" : "node_107", + "next_tables" : { + "FabricEgress.egress_next.pop_mpls_if_present" : "node_107" + }, + "default_entry" : { + "action_id" : 82, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_egress_next_set_mpls", + "id" : 66, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 291, + "column" : 12, + "source_fragment" : "set_mpls()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [83], + "actions" : ["FabricEgress.egress_next.set_mpls"], + "base_default_next" : "node_107", + "next_tables" : { + "FabricEgress.egress_next.set_mpls" : "node_107" + }, + "default_entry" : { + "action_id" : 83, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.egress_next.egress_vlan", + "id" : 67, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 264, + "column" : 10, + "source_fragment" : "egress_vlan" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "vlan_id", + "target" : ["_egress_bridged36", "_base_vlan_id6"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "eg_port", + "target" : ["standard_metadata", "egress_port"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [84, 85, 86], + "actions" : ["FabricEgress.egress_next.push_vlan", "FabricEgress.egress_next.pop_vlan", "FabricEgress.egress_next.drop"], + "base_default_next" : "node_109", + "next_tables" : { + "FabricEgress.egress_next.push_vlan" : "node_109", + "FabricEgress.egress_next.pop_vlan" : "node_109", + "FabricEgress.egress_next.drop" : "node_109" + }, + "default_entry" : { + "action_id" : 86, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next323", + "id" : 68, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 323, + "column" : 25, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [118], + "actions" : ["next323"], + "base_default_next" : "node_111", + "next_tables" : { + "next323" : "node_111" + }, + "default_entry" : { + "action_id" : 118, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next325", + "id" : 69, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 325, + "column" : 25, + "source_fragment" : "= 1; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [117], + "actions" : ["next325"], + "base_default_next" : "tbl_int128", + "next_tables" : { + "next325" : "tbl_int128" + }, + "default_entry" : { + "action_id" : 117, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next333", + "id" : 70, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 333, + "column" : 33, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [119], + "actions" : ["next333"], + "base_default_next" : "node_116", + "next_tables" : { + "next333" : "node_116" + }, + "default_entry" : { + "action_id" : 119, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next336", + "id" : 71, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 336, + "column" : 29, + "source_fragment" : "= 1; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [120], + "actions" : ["next336"], + "base_default_next" : "tbl_int128", + "next_tables" : { + "next336" : "tbl_int128" + }, + "default_entry" : { + "action_id" : 120, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next343", + "id" : 72, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 343, + "column" : 39, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [121], + "actions" : ["next343"], + "base_default_next" : "node_121", + "next_tables" : { + "next343" : "node_121" + }, + "default_entry" : { + "action_id" : 121, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next346", + "id" : 73, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 346, + "column" : 29, + "source_fragment" : "= 1; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [122], + "actions" : ["next346"], + "base_default_next" : "tbl_int128", + "next_tables" : { + "next346" : "tbl_int128" + }, + "default_entry" : { + "action_id" : 122, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int128", + "id" : 74, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [123], + "actions" : ["int128"], + "base_default_next" : "FabricEgress.int_egress.queue_latency_thresholds", + "next_tables" : { + "int128" : "FabricEgress.int_egress.queue_latency_thresholds" + }, + "default_entry" : { + "action_id" : 123, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.int_egress.queue_latency_thresholds", + "id" : 75, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 159, + "column" : 10, + "source_fragment" : "queue_latency_thresholds" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "egress_qid", + "target" : ["scalars", "int_egress_egress_qid"], + "mask" : null + }, + { + "match_type" : "range", + "name" : "hop_latency_upper", + "target" : ["scalars", "key_0"], + "mask" : null + }, + { + "match_type" : "range", + "name" : "hop_latency_lower", + "target" : ["scalars", "key_1"], + "mask" : null + } + ], + "match_type" : "range", + "type" : "simple", + "max_size" : 128, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [93, 94, 76], + "actions" : ["FabricEgress.int_egress.check_quota", "FabricEgress.int_egress.reset_quota", "nop"], + "base_default_next" : "FabricEgress.int_egress.config", + "next_tables" : { + "FabricEgress.int_egress.check_quota" : "FabricEgress.int_egress.config", + "FabricEgress.int_egress.reset_quota" : "FabricEgress.int_egress.config", + "nop" : "FabricEgress.int_egress.config" + }, + "default_entry" : { + "action_id" : 76, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false + } + }, + { + "name" : "FabricEgress.int_egress.config", + "id" : 76, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 183, + "column" : 10, + "source_fragment" : "config" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [95], + "actions" : ["FabricEgress.int_egress.set_config"], + "base_default_next" : "tbl_int373", + "next_tables" : { + "FabricEgress.int_egress.set_config" : "tbl_int373" + }, + "default_entry" : { + "action_id" : 95, + "action_const" : false, + "action_data" : ["0xffffff00", "0xffffc0000000"], + "action_entry_const" : false + } + }, + { + "name" : "tbl_int373", + "id" : 77, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 373, + "column" : 38, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [125], + "actions" : ["int373"], + "base_default_next" : "node_127", + "next_tables" : { + "int373" : "node_127" + }, + "default_entry" : { + "action_id" : 125, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.int_egress.report", + "id" : 78, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 260, + "column" : 10, + "source_fragment" : "report" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "bmd_type", + "target" : ["int_egress_fabric_md_int_report_md", "bmd_type"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "mirror_type", + "target" : ["int_egress_fabric_md_int_report_md", "mirror_type"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "int_report_type", + "target" : ["int_egress_fabric_md_int_report_md", "report_type"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 6, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [96, 97, 98, 99, 77], + "actions" : ["FabricEgress.int_egress.do_local_report_encap", "FabricEgress.int_egress.do_local_report_encap_mpls", "FabricEgress.int_egress.do_drop_report_encap", "FabricEgress.int_egress.do_drop_report_encap_mpls", "nop"], + "base_default_next" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "next_tables" : { + "FabricEgress.int_egress.do_local_report_encap" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "FabricEgress.int_egress.do_local_report_encap_mpls" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "FabricEgress.int_egress.do_drop_report_encap" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "FabricEgress.int_egress.do_drop_report_encap_mpls" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "nop" : "FabricEgress.int_egress.adjust_int_report_hdr_length" + }, + "default_entry" : { + "action_id" : 77, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false + } + }, + { + "name" : "FabricEgress.int_egress.int_metadata", + "id" : 79, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 315, + "column" : 10, + "source_fragment" : "int_metadata" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "int_report_type", + "target" : ["_egress_bridged36", "_int_bmd_report_type13"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "drop_ctl", + "target" : ["scalars", "userMetadata._drop_ctl2"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "queue_report", + "target" : ["scalars", "userMetadata._egress_int_md_queue_report42"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 2, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [100, 78], + "actions" : ["FabricEgress.int_egress.init_int_metadata", "nop"], + "base_default_next" : null, + "next_tables" : { + "__HIT__" : "tbl_int383", + "__MISS__" : "FabricEgress.int_egress.adjust_int_report_hdr_length" + }, + "default_entry" : { + "action_id" : 78, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + }, + "entries" : [ + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 327, + "column" : 12, + "source_fragment" : "(INT_REPORT_TYPE_FLOW, 0, false): init_int_metadata(INT_REPORT_TYPE_FLOW)" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + } + ], + "action_entry" : { + "action_id" : 100, + "action_data" : ["0x1"] + }, + "priority" : 1 + }, + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 329, + "column" : 12, + "source_fragment" : "(INT_REPORT_TYPE_FLOW, 1, false): init_int_metadata(INT_REPORT_TYPE_DROP)" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + } + ], + "action_entry" : { + "action_id" : 100, + "action_data" : ["0x4"] + }, + "priority" : 2 + } + ] + }, + { + "name" : "tbl_int383", + "id" : 80, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 383, + "column" : 16, + "source_fragment" : "clone_preserving_field_list(CloneType.E2E, ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [124], + "actions" : ["int383"], + "base_default_next" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "next_tables" : { + "int383" : "FabricEgress.int_egress.adjust_int_report_hdr_length" + }, + "default_entry" : { + "action_id" : 124, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "id" : 81, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 347, + "column" : 10, + "source_fragment" : "adjust_int_report_hdr_length" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "is_int_wip", + "target" : ["int_egress_fabric_md_bridged", "_int_bmd_wip_type18"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 2, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [79, 101], + "actions" : ["nop", "FabricEgress.int_egress.adjust_ip_udp_len"], + "base_default_next" : "tbl_slicing189", + "next_tables" : { + "nop" : "tbl_slicing189", + "FabricEgress.int_egress.adjust_ip_udp_len" : "tbl_slicing189" + }, + "default_entry" : { + "action_id" : 79, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + }, + "entries" : [ + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 358, + "column" : 12, + "source_fragment" : "INT_IS_WIP: adjust_ip_udp_len(INT_WIP_ADJUST_IP_BYTES, INT_WIP_ADJUST_UDP_BYTES)" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + } + ], + "action_entry" : { + "action_id" : 101, + "action_data" : ["0xfff2", "0xffde"] + }, + "priority" : 1 + }, + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 359, + "column" : 12, + "source_fragment" : "INT_IS_WIP_WITH_MPLS: adjust_ip_udp_len(INT_WIP_ADJUST_IP_MPLS_BYTES, INT_WIP_ADJUST_UDP_MPLS_BYTES)" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x02" + } + ], + "action_entry" : { + "action_id" : 101, + "action_data" : ["0xffee", "0xffda"] + }, + "priority" : 2 + } + ] + }, + { + "name" : "tbl_slicing189", + "id" : 82, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 189, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.bridged.base.slice_tc; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [127], + "actions" : ["slicing189"], + "base_default_next" : "FabricEgress.dscp_rewriter.rewriter", + "next_tables" : { + "slicing189" : "FabricEgress.dscp_rewriter.rewriter" + }, + "default_entry" : { + "action_id" : 127, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.dscp_rewriter.rewriter", + "id" : 83, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 201, + "column" : 10, + "source_fragment" : "rewriter" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "eg_port", + "target" : ["standard_metadata", "egress_port"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 512, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [87, 88, 75], + "actions" : ["FabricEgress.dscp_rewriter.rewrite", "FabricEgress.dscp_rewriter.clear", "nop"], + "base_default_next" : null, + "next_tables" : { + "__HIT__" : "node_134", + "__MISS__" : "node_136" + }, + "default_entry" : { + "action_id" : 75, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing217", + "id" : 84, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 217, + "column" : 30, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [126], + "actions" : ["slicing217"], + "base_default_next" : "node_136", + "next_tables" : { + "slicing217" : "node_136" + }, + "default_entry" : { + "action_id" : 126, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_fabric_v1model170", + "id" : 85, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 170, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(NO_PRESERVATION)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [128], + "actions" : ["fabric_v1model170"], + "base_default_next" : "node_138", + "next_tables" : { + "fabric_v1model170" : "node_138" + }, + "default_entry" : { + "action_id" : 128, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_fabric_v1model174", + "id" : 86, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 174, + "column" : 12, + "source_fragment" : "mark_to_drop(standard_md)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [129], + "actions" : ["fabric_v1model174"], + "base_default_next" : null, + "next_tables" : { + "fabric_v1model174" : null + }, + "default_entry" : { + "action_id" : 129, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + } + ], + "action_profiles" : [], + "conditionals" : [ + { + "name" : "node_72", + "id" : 23, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 135, + "column" : 12, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_egress0"] + } + } + }, + "true_next" : "tbl_fabric_v1model136", + "false_next" : "node_74" + }, + { + "name" : "node_74", + "id" : 24, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 140, + "column" : 13, + "source_fragment" : "standard_md.instance_type == 2" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "instance_type"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00000002" + } + } + }, + "true_next" : "tbl_int_tna_parser_emulator14", + "false_next" : "node_84" + }, + { + "name" : "node_76", + "id" : 25, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 145, + "column" : 11, + "source_fragment" : "hdr_v1model.ingress.gtpu.isValid() || hdr_v1model.ingress.vxlan.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "or", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_gtpu12", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_vxlan15", "$valid$"] + } + } + } + } + }, + "true_next" : "tbl_int_tna_parser_emulator148", + "false_next" : "node_78" + }, + { + "name" : "node_78", + "id" : 26, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 164, + "column" : 12, + "source_fragment" : "(bit<8>)fabric_md.bridged.int_bmd.report_type == BridgedMdType_t.INT_INGRESS_DROP" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_report_type46"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x04" + } + } + }, + "true_next" : "tbl_parser_emulator_parse_int_ingress_drop", + "false_next" : "tbl_parser_emulator_parse_int_report_mirror" + }, + { + "name" : "node_84", + "id" : 27, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 150, + "column" : 11, + "source_fragment" : "(bit<8>)fabric_md.egress.bridged.int_bmd.report_type == BridgedMdType_t.INT_INGRESS_DROP" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_report_type13"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x04" + } + } + }, + "true_next" : "tbl_int_tna_parser_emulator14_0", + "false_next" : "FabricEgress.pkt_io_egress.switch_info" + }, + { + "name" : "node_86", + "id" : 28, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 145, + "column" : 11, + "source_fragment" : "hdr_v1model.ingress.gtpu.isValid() || hdr_v1model.ingress.vxlan.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "or", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_gtpu12", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_vxlan15", "$valid$"] + } + } + } + } + }, + "true_next" : "tbl_int_tna_parser_emulator148_0", + "false_next" : "node_88" + }, + { + "name" : "node_88", + "id" : 29, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 164, + "column" : 12, + "source_fragment" : "(bit<8>)fabric_md.bridged.int_bmd.report_type == BridgedMdType_t.INT_INGRESS_DROP" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_report_type13"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x04" + } + } + }, + "true_next" : "tbl_parser_emulator_parse_int_ingress_drop_0", + "false_next" : "tbl_parser_emulator_parse_int_report_mirror_0" + }, + { + "name" : "node_95", + "id" : 30, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 50, + "column" : 12, + "source_fragment" : "standard_md.egress_port == fabric_md.cpu_port" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + }, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_cpu_port37"] + } + } + }, + "true_next" : "tbl_packetio51", + "false_next" : "node_97" + }, + { + "name" : "node_97", + "id" : 31, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 58, + "column" : 12, + "source_fragment" : "hdr.fake_ethernet.isValid() && ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_fake_ethernet2", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_fake_ethernet2", "ether_type"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xbf03" + } + } + } + } + }, + "true_next" : "tbl_packetio60", + "false_next" : "node_99" + }, + { + "name" : "node_99", + "id" : 32, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/stats.p4", + "line" : 67, + "column" : 12, + "source_fragment" : "bmd_type == BridgedMdType_t.INGRESS_TO_EGRESS" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + }, + "true_next" : "FabricEgress.stats.flows", + "false_next" : "node_101" + }, + { + "name" : "node_101", + "id" : 33, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 280, + "column" : 12, + "source_fragment" : "fabric_md.bridged.base.is_multicast ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_is_multicast4"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_ig_port3"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + } + } + } + } + }, + "true_next" : "tbl_next283", + "false_next" : "node_103" + }, + { + "name" : "node_103", + "id" : 34, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 288, + "column" : 12, + "source_fragment" : "fabric_md.bridged.base.mpls_label == 0" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_mpls_label2"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x000000" + } + } + }, + "true_next" : "node_104", + "false_next" : "tbl_egress_next_set_mpls" + }, + { + "name" : "node_104", + "id" : 35, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 289, + "column" : 16, + "source_fragment" : "hdr.mpls.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_mpls6", "$valid$"] + } + } + }, + "true_next" : "tbl_egress_next_pop_mpls_if_present", + "false_next" : "node_107" + }, + { + "name" : "node_107", + "id" : 36, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 159, + "column" : 39, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_is_int_recirc44"] + } + } + }, + "false_next" : "FabricEgress.egress_next.egress_vlan", + "true_next" : "node_109" + }, + { + "name" : "node_109", + "id" : 37, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 322, + "column" : 12, + "source_fragment" : "hdr.mpls.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_mpls6", "$valid$"] + } + } + }, + "true_next" : "tbl_next323", + "false_next" : "node_113" + }, + { + "name" : "node_111", + "id" : 38, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 324, + "column" : 16, + "source_fragment" : "hdr.mpls.ttl == 0" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_mpls6", "ttl"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + }, + "true_next" : "tbl_next325", + "false_next" : "tbl_int128" + }, + { + "name" : "node_113", + "id" : 39, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 331, + "column" : 16, + "source_fragment" : "hdr.ipv4.isValid() && fabric_md.bridged.base.fwd_type != FWD_BRIDGING" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv47", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + }, + "true_next" : "node_114", + "false_next" : "node_118" + }, + { + "name" : "node_114", + "id" : 40, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 319, + "column" : 28, + "source_fragment" : "(fabric_md.bridged.bmd_type == BridgedMdType_t.INT_INGRESS_DROP) || ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "or", + "left" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x04" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x02" + } + } + } + } + }, + "false_next" : "tbl_next333", + "true_next" : "node_116" + }, + { + "name" : "node_116", + "id" : 41, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 335, + "column" : 20, + "source_fragment" : "hdr.ipv4.ttl == 0" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_ipv47", "ttl"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + }, + "true_next" : "tbl_next336", + "false_next" : "tbl_int128" + }, + { + "name" : "node_118", + "id" : 42, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 341, + "column" : 23, + "source_fragment" : "hdr.ipv6.isValid() && fabric_md.bridged.base.fwd_type != FWD_BRIDGING" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv68", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + }, + "true_next" : "node_119", + "false_next" : "tbl_int128" + }, + { + "name" : "node_119", + "id" : 43, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 319, + "column" : 28, + "source_fragment" : "(fabric_md.bridged.bmd_type == BridgedMdType_t.INT_INGRESS_DROP) || ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "or", + "left" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x04" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x02" + } + } + } + } + }, + "false_next" : "tbl_next343", + "true_next" : "node_121" + }, + { + "name" : "node_121", + "id" : 44, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 345, + "column" : 20, + "source_fragment" : "hdr.ipv6.hop_limit == 0" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_ipv68", "hop_limit"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + }, + "true_next" : "tbl_next346", + "false_next" : "tbl_int128" + }, + { + "name" : "node_127", + "id" : 45, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 375, + "column" : 12, + "source_fragment" : "fabric_md.int_report_md.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "$valid$"] + } + } + }, + "true_next" : "FabricEgress.int_egress.report", + "false_next" : "FabricEgress.int_egress.int_metadata" + }, + { + "name" : "node_134", + "id" : 46, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 216, + "column" : 16, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv47", "$valid$"] + } + } + }, + "true_next" : "tbl_slicing217", + "false_next" : "node_136" + }, + { + "name" : "node_136", + "id" : 47, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 168, + "column" : 12, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._do_upf_uplink_recirc1"] + } + } + }, + "true_next" : "tbl_fabric_v1model170", + "false_next" : "node_138" + }, + { + "name" : "node_138", + "id" : 48, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 173, + "column" : 12, + "source_fragment" : "fabric_md.drop_ctl == 1" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + }, + "false_next" : null, + "true_next" : "tbl_fabric_v1model174" + } + ] + } + ], + "checksums" : [ + { + "name" : "cksum", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ingress.ipv4.isValid(), ..." + }, + "target" : ["_ingress_ipv47", "hdr_checksum"], + "type" : "generic", + "calculation" : "calc_2", + "verify" : false, + "update" : true, + "if_cond" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv47", "$valid$"] + } + } + } + }, + { + "name" : "cksum_0", + "id" : 1, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 73, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ingress.inner_ipv4.isValid(), ..." + }, + "target" : ["_ingress_inner_ipv418", "hdr_checksum"], + "type" : "generic", + "calculation" : "calc_3", + "verify" : false, + "update" : true, + "if_cond" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "$valid$"] + } + } + } + }, + { + "name" : "cksum_1", + "id" : 2, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 92, + "column" : 8, + "source_fragment" : "update_checksum(hdr.egress.report_ipv4.isValid(), ..." + }, + "target" : ["_egress_report_ipv427", "hdr_checksum"], + "type" : "generic", + "calculation" : "calc_4", + "verify" : false, + "update" : true, + "if_cond" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_egress_report_ipv427", "$valid$"] + } + } + } + }, + { + "name" : "cksum_2", + "id" : 3, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 13, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ingress.ipv4.isValid(), ..." + }, + "target" : ["_ingress_ipv47", "hdr_checksum"], + "type" : "generic", + "calculation" : "calc_5", + "verify" : true, + "update" : false, + "if_cond" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv47", "$valid$"] + } + } + } + }, + { + "name" : "cksum_3", + "id" : 4, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 31, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ingress.inner_ipv4.isValid(), ..." + }, + "target" : ["_ingress_inner_ipv418", "hdr_checksum"], + "type" : "generic", + "calculation" : "calc_6", + "verify" : true, + "update" : false, + "if_cond" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "$valid$"] + } + } + } + } + ], + "force_arith" : [], + "extern_instances" : [], + "field_aliases" : [ + [ + "queueing_metadata.enq_timestamp", + ["standard_metadata", "enq_timestamp"] + ], + [ + "queueing_metadata.enq_qdepth", + ["standard_metadata", "enq_qdepth"] + ], + [ + "queueing_metadata.deq_timedelta", + ["standard_metadata", "deq_timedelta"] + ], + [ + "queueing_metadata.deq_qdepth", + ["standard_metadata", "deq_qdepth"] + ], + [ + "intrinsic_metadata.ingress_global_timestamp", + ["standard_metadata", "ingress_global_timestamp"] + ], + [ + "intrinsic_metadata.egress_global_timestamp", + ["standard_metadata", "egress_global_timestamp"] + ], + [ + "intrinsic_metadata.mcast_grp", + ["standard_metadata", "mcast_grp"] + ], + [ + "intrinsic_metadata.egress_rid", + ["standard_metadata", "egress_rid"] + ], + [ + "intrinsic_metadata.priority", + ["standard_metadata", "priority"] + ] + ], + "program" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "__meta__" : { + "version" : [2, 23], + "compiler" : "https://github.com/p4lang/p4c" + } +} \ No newline at end of file diff --git a/src/tests/p4-int-routing-acl/p4src/p4info.txt b/src/tests/p4-int-routing-acl/p4src/p4info.txt new file mode 100644 index 000000000..4e54f2861 --- /dev/null +++ b/src/tests/p4-int-routing-acl/p4src/p4info.txt @@ -0,0 +1,1911 @@ +pkg_info { + arch: "v1model" +} +tables { + preamble { + id: 41243186 + name: "FabricIngress.stats.flows" + alias: "FabricIngress.stats.flows" + } + match_fields { + id: 1 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 2 + name: "ipv4_dst" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 3 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 4 + name: "l4_sport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 5 + name: "l4_dport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 6 + name: "ig_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 21929788 + } + const_default_action_id: 21929788 + direct_resource_ids: 333776332 + size: 1024 +} +tables { + preamble { + id: 43310977 + name: "FabricIngress.filtering.ingress_port_vlan" + alias: "ingress_port_vlan" + } + match_fields { + id: 1 + name: "ig_port" + bitwidth: 9 + match_type: EXACT + } + match_fields { + id: 2 + name: "vlan_is_valid" + bitwidth: 1 + match_type: EXACT + } + match_fields { + id: 3 + name: "vlan_id" + bitwidth: 12 + match_type: TERNARY + } + action_refs { + id: 17164167 + } + action_refs { + id: 24158268 + } + action_refs { + id: 24266015 + } + const_default_action_id: 17164167 + direct_resource_ids: 326221069 + size: 1024 +} +tables { + preamble { + id: 49718154 + name: "FabricIngress.filtering.fwd_classifier" + alias: "fwd_classifier" + } + match_fields { + id: 1 + name: "ig_port" + bitwidth: 9 + match_type: EXACT + } + match_fields { + id: 2 + name: "eth_dst" + bitwidth: 48 + match_type: TERNARY + } + match_fields { + id: 3 + name: "eth_type" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 4 + name: "ip_eth_type" + bitwidth: 16 + match_type: EXACT + } + action_refs { + id: 25032921 + } + const_default_action_id: 25032921 + direct_resource_ids: 335473470 + size: 1024 +} +tables { + preamble { + id: 43623757 + name: "FabricIngress.forwarding.bridging" + alias: "bridging" + } + match_fields { + id: 1 + name: "vlan_id" + bitwidth: 12 + match_type: EXACT + } + match_fields { + id: 2 + name: "eth_dst" + bitwidth: 48 + match_type: TERNARY + } + action_refs { + id: 21791748 + } + action_refs { + id: 29734112 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 29734112 + direct_resource_ids: 330959985 + size: 1024 +} +tables { + preamble { + id: 37768578 + name: "FabricIngress.forwarding.mpls" + alias: "mpls" + } + match_fields { + id: 1 + name: "mpls_label" + bitwidth: 20 + match_type: EXACT + } + action_refs { + id: 30066030 + } + action_refs { + id: 29734112 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 29734112 + direct_resource_ids: 318961579 + size: 1024 +} +tables { + preamble { + id: 41754650 + name: "FabricIngress.forwarding.routing_v4" + alias: "routing_v4" + } + match_fields { + id: 1 + name: "ipv4_dst" + bitwidth: 32 + match_type: LPM + } + action_refs { + id: 19792090 + } + action_refs { + id: 29124955 + } + action_refs { + id: 17639597 + } + action_refs { + id: 29734112 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + direct_resource_ids: 333425635 + size: 1024 +} +tables { + preamble { + id: 49342721 + name: "FabricIngress.forwarding.routing_v6" + alias: "routing_v6" + } + match_fields { + id: 1 + name: "ipv6_dst" + bitwidth: 128 + match_type: LPM + } + action_refs { + id: 21856023 + } + action_refs { + id: 24646532 + } + action_refs { + id: 29734112 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + direct_resource_ids: 324042090 + size: 1024 +} +tables { + preamble { + id: 36626242 + name: "FabricIngress.pre_next.next_mpls" + alias: "next_mpls" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 22765924 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 330020245 + size: 1024 +} +tables { + preamble { + id: 48011802 + name: "FabricIngress.pre_next.next_vlan" + alias: "next_vlan" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 33475378 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 333692067 + size: 1024 +} +tables { + preamble { + id: 44104738 + name: "FabricIngress.acl.acl" + alias: "acl" + } + match_fields { + id: 1 + name: "ig_port" + bitwidth: 9 + match_type: TERNARY + } + match_fields { + id: 2 + name: "eth_dst" + bitwidth: 48 + match_type: TERNARY + } + match_fields { + id: 3 + name: "eth_src" + bitwidth: 48 + match_type: TERNARY + } + match_fields { + id: 4 + name: "vlan_id" + bitwidth: 12 + match_type: TERNARY + } + match_fields { + id: 5 + name: "eth_type" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 6 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 7 + name: "ipv4_dst" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 8 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 9 + name: "icmp_type" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 10 + name: "icmp_code" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 11 + name: "l4_sport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 12 + name: "l4_dport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 13 + name: "ig_port_type" + bitwidth: 2 + match_type: TERNARY + } + action_refs { + id: 23623126 + } + action_refs { + id: 23579892 + } + action_refs { + id: 21161133 + } + action_refs { + id: 23570973 + } + action_refs { + id: 24507494 + } + action_refs { + id: 29607214 + } + const_default_action_id: 29607214 + direct_resource_ids: 319194241 + size: 1024 +} +tables { + preamble { + id: 39142283 + name: "FabricIngress.next.simple" + alias: "simple" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 19358572 + } + action_refs { + id: 31887425 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 326633416 + size: 1024 +} +tables { + preamble { + id: 47960972 + name: "FabricIngress.next.hashed" + alias: "hashed" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 27301117 + } + action_refs { + id: 20985706 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + implementation_id: 289544276 + direct_resource_ids: 322798228 + size: 1024 +} +tables { + preamble { + id: 40619180 + name: "FabricIngress.next.multicast" + alias: "multicast" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 21629581 + } + action_refs { + id: 23637707 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 23637707 + direct_resource_ids: 319194968 + size: 1024 +} +tables { + preamble { + id: 34606298 + name: "FabricIngress.slice_tc_classifier.classifier" + alias: "classifier" + } + match_fields { + id: 1 + name: "ig_port" + bitwidth: 9 + match_type: TERNARY + } + match_fields { + id: 2 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 3 + name: "ipv4_dst" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 4 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 5 + name: "l4_sport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 6 + name: "l4_dport" + bitwidth: 16 + match_type: TERNARY + } + action_refs { + id: 23786376 + } + action_refs { + id: 25983516 + } + action_refs { + id: 30111108 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 30111108 + direct_resource_ids: 334706097 + size: 512 +} +tables { + preamble { + id: 36435258 + name: "FabricIngress.qos.queues" + alias: "queues" + } + match_fields { + id: 1 + name: "slice_tc" + bitwidth: 6 + match_type: EXACT + } + match_fields { + id: 2 + name: "color" + bitwidth: 2 + match_type: TERNARY + } + action_refs { + id: 32116918 + } + action_refs { + id: 28214351 + } + const_default_action_id: 32116918 + direct_resource_ids: 327743278 + size: 128 +} +tables { + preamble { + id: 43965782 + name: "FabricIngress.qos.default_tc" + alias: "default_tc" + } + match_fields { + id: 1 + name: "slice_tc" + bitwidth: 6 + match_type: TERNARY + } + match_fields { + id: 2 + name: "tc_unknown" + bitwidth: 1 + match_type: EXACT + } + action_refs { + id: 23587909 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + size: 16 +} +tables { + preamble { + id: 40748488 + name: "FabricIngress.int_watchlist.watchlist" + alias: "watchlist" + } + match_fields { + id: 1 + name: "ipv4_valid" + bitwidth: 1 + match_type: EXACT + } + match_fields { + id: 2 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 3 + name: "ipv4_dst" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 4 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 5 + name: "l4_sport" + bitwidth: 16 + match_type: RANGE + } + match_fields { + id: 6 + name: "l4_dport" + bitwidth: 16 + match_type: RANGE + } + action_refs { + id: 25078550 + } + action_refs { + id: 20118842 + } + action_refs { + id: 28396787 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28396787 + direct_resource_ids: 328581521 + size: 64 +} +tables { + preamble { + id: 43851059 + name: "FabricEgress.stats.flows" + alias: "FabricEgress.stats.flows" + } + match_fields { + id: 1 + name: "stats_flow_id" + bitwidth: 10 + match_type: EXACT + } + match_fields { + id: 2 + name: "eg_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 26838724 + } + const_default_action_id: 26838724 + direct_resource_ids: 334508337 + size: 1024 +} +tables { + preamble { + id: 35217901 + name: "FabricEgress.pkt_io_egress.switch_info" + alias: "switch_info" + } + action_refs { + id: 32804382 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + size: 1 +} +tables { + preamble { + id: 49262446 + name: "FabricEgress.egress_next.egress_vlan" + alias: "egress_vlan" + } + match_fields { + id: 1 + name: "vlan_id" + bitwidth: 12 + match_type: EXACT + } + match_fields { + id: 2 + name: "eg_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 30307755 + } + action_refs { + id: 17183246 + } + action_refs { + id: 30812542 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 30812542 + direct_resource_ids: 318892680 + size: 1024 +} +tables { + preamble { + id: 49970092 + name: "FabricEgress.dscp_rewriter.rewriter" + alias: "rewriter" + } + match_fields { + id: 1 + name: "eg_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 27951287 + } + action_refs { + id: 24120545 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + size: 512 +} +tables { + preamble { + id: 36860953 + name: "FabricEgress.int_egress.queue_latency_thresholds" + alias: "queue_latency_thresholds" + } + match_fields { + id: 1 + name: "egress_qid" + bitwidth: 5 + match_type: EXACT + } + match_fields { + id: 2 + name: "hop_latency_upper" + bitwidth: 16 + match_type: RANGE + } + match_fields { + id: 3 + name: "hop_latency_lower" + bitwidth: 16 + match_type: RANGE + } + action_refs { + id: 22415037 + } + action_refs { + id: 19702294 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + size: 128 +} +tables { + preamble { + id: 40475827 + name: "FabricEgress.int_egress.config" + alias: "config" + } + action_refs { + id: 22425991 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + size: 1 +} +tables { + preamble { + id: 46071383 + name: "FabricEgress.int_egress.report" + alias: "report" + } + match_fields { + id: 1 + name: "bmd_type" + bitwidth: 8 + match_type: EXACT + } + match_fields { + id: 2 + name: "mirror_type" + bitwidth: 3 + match_type: EXACT + } + match_fields { + id: 3 + name: "int_report_type" + bitwidth: 3 + match_type: EXACT + } + action_refs { + id: 30783845 + } + action_refs { + id: 22769901 + } + action_refs { + id: 32486459 + } + action_refs { + id: 25343592 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + direct_resource_ids: 325056546 + size: 6 +} +actions { + preamble { + id: 28485346 + name: "nop" + alias: "nop" + } +} +actions { + preamble { + id: 21257015 + name: "NoAction" + alias: "NoAction" + annotations: "@noWarn(\"unused\")" + } +} +actions { + preamble { + id: 21929788 + name: "FabricIngress.stats.count" + alias: "FabricIngress.stats.count" + } + params { + id: 1 + name: "flow_id" + bitwidth: 10 + } +} +actions { + preamble { + id: 17164167 + name: "FabricIngress.filtering.deny" + alias: "deny" + } +} +actions { + preamble { + id: 24158268 + name: "FabricIngress.filtering.permit" + alias: "permit" + } + params { + id: 1 + name: "port_type" + bitwidth: 2 + } +} +actions { + preamble { + id: 24266015 + name: "FabricIngress.filtering.permit_with_internal_vlan" + alias: "permit_with_internal_vlan" + } + params { + id: 1 + name: "vlan_id" + bitwidth: 12 + } + params { + id: 2 + name: "port_type" + bitwidth: 2 + } +} +actions { + preamble { + id: 25032921 + name: "FabricIngress.filtering.set_forwarding_type" + alias: "set_forwarding_type" + } + params { + id: 1 + name: "fwd_type" + bitwidth: 3 + } +} +actions { + preamble { + id: 29734112 + name: "FabricIngress.forwarding.set_int_drop_reason" + alias: "set_int_drop_reason" + } + params { + id: 1 + name: "drop_reason" + bitwidth: 8 + } +} +actions { + preamble { + id: 21791748 + name: "FabricIngress.forwarding.set_next_id_bridging" + alias: "set_next_id_bridging" + } + params { + id: 1 + name: "next_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 30066030 + name: "FabricIngress.forwarding.pop_mpls_and_next" + alias: "pop_mpls_and_next" + } + params { + id: 1 + name: "next_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 19792090 + name: "FabricIngress.forwarding.set_next_id_routing_v4" + alias: "set_next_id_routing_v4" + } + params { + id: 1 + name: "next_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 29124955 + name: "FabricIngress.forwarding.nop_routing_v4" + alias: "nop_routing_v4" + } +} +actions { + preamble { + id: 17639597 + name: "FabricIngress.forwarding.drop_routing_v4" + alias: "drop_routing_v4" + } +} +actions { + preamble { + id: 21856023 + name: "FabricIngress.forwarding.set_next_id_routing_v6" + alias: "set_next_id_routing_v6" + } + params { + id: 1 + name: "next_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 24646532 + name: "FabricIngress.forwarding.drop_routing_v6" + alias: "drop_routing_v6" + } +} +actions { + preamble { + id: 22765924 + name: "FabricIngress.pre_next.set_mpls_label" + alias: "set_mpls_label" + } + params { + id: 1 + name: "label" + bitwidth: 20 + } +} +actions { + preamble { + id: 33475378 + name: "FabricIngress.pre_next.set_vlan" + alias: "set_vlan" + } + params { + id: 1 + name: "vlan_id" + bitwidth: 12 + } +} +actions { + preamble { + id: 23623126 + name: "FabricIngress.acl.set_next_id_acl" + alias: "set_next_id_acl" + } + params { + id: 1 + name: "next_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 21161133 + name: "FabricIngress.acl.copy_to_cpu" + alias: "copy_to_cpu" + } +} +actions { + preamble { + id: 23579892 + name: "FabricIngress.acl.punt_to_cpu" + alias: "punt_to_cpu" + } +} +actions { + preamble { + id: 23570973 + name: "FabricIngress.acl.drop" + alias: "acl.drop" + } +} +actions { + preamble { + id: 24507494 + name: "FabricIngress.acl.set_output_port" + alias: "set_output_port" + } + params { + id: 1 + name: "port_num" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } +} +actions { + preamble { + id: 29607214 + name: "FabricIngress.acl.nop_acl" + alias: "nop_acl" + } +} +actions { + preamble { + id: 19358572 + name: "FabricIngress.next.output_simple" + alias: "output_simple" + } + params { + id: 1 + name: "port_num" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } +} +actions { + preamble { + id: 31887425 + name: "FabricIngress.next.routing_simple" + alias: "routing_simple" + } + params { + id: 1 + name: "port_num" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } + params { + id: 2 + name: "smac" + bitwidth: 48 + } + params { + id: 3 + name: "dmac" + bitwidth: 48 + } +} +actions { + preamble { + id: 27301117 + name: "FabricIngress.next.output_hashed" + alias: "output_hashed" + } + params { + id: 1 + name: "port_num" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } +} +actions { + preamble { + id: 20985706 + name: "FabricIngress.next.routing_hashed" + alias: "routing_hashed" + } + params { + id: 1 + name: "port_num" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } + params { + id: 2 + name: "smac" + bitwidth: 48 + } + params { + id: 3 + name: "dmac" + bitwidth: 48 + } +} +actions { + preamble { + id: 21629581 + name: "FabricIngress.next.set_mcast_group_id" + alias: "set_mcast_group_id" + } + params { + id: 1 + name: "group_id" + bitwidth: 16 + } +} +actions { + preamble { + id: 23637707 + name: "FabricIngress.next.reset_mcast_group_id" + alias: "reset_mcast_group_id" + } +} +actions { + preamble { + id: 23786376 + name: "FabricIngress.slice_tc_classifier.set_slice_id_tc" + alias: "set_slice_id_tc" + } + params { + id: 1 + name: "slice_id" + bitwidth: 4 + } + params { + id: 2 + name: "tc" + bitwidth: 2 + } +} +actions { + preamble { + id: 30111108 + name: "FabricIngress.slice_tc_classifier.no_classification" + alias: "no_classification" + } +} +actions { + preamble { + id: 25983516 + name: "FabricIngress.slice_tc_classifier.trust_dscp" + alias: "trust_dscp" + } +} +actions { + preamble { + id: 32116918 + name: "FabricIngress.qos.set_queue" + alias: "set_queue" + } + params { + id: 1 + name: "qid" + bitwidth: 5 + } +} +actions { + preamble { + id: 28214351 + name: "FabricIngress.qos.meter_drop" + alias: "meter_drop" + } +} +actions { + preamble { + id: 23587909 + name: "FabricIngress.qos.set_default_tc" + alias: "set_default_tc" + } + params { + id: 1 + name: "tc" + bitwidth: 2 + } +} +actions { + preamble { + id: 25078550 + name: "FabricIngress.int_watchlist.mark_to_report" + alias: "mark_to_report" + } +} +actions { + preamble { + id: 28396787 + name: "FabricIngress.int_watchlist.no_report" + alias: "no_report" + } +} +actions { + preamble { + id: 20118842 + name: "FabricIngress.int_watchlist.no_report_collector" + alias: "no_report_collector" + } +} +actions { + preamble { + id: 26838724 + name: "FabricEgress.stats.count" + alias: "FabricEgress.stats.count" + } +} +actions { + preamble { + id: 32804382 + name: "FabricEgress.pkt_io_egress.set_switch_info" + alias: "set_switch_info" + } + params { + id: 1 + name: "cpu_port" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } +} +actions { + preamble { + id: 30307755 + name: "FabricEgress.egress_next.push_vlan" + alias: "push_vlan" + } +} +actions { + preamble { + id: 17183246 + name: "FabricEgress.egress_next.pop_vlan" + alias: "pop_vlan" + } +} +actions { + preamble { + id: 30812542 + name: "FabricEgress.egress_next.drop" + alias: "egress_next.drop" + } +} +actions { + preamble { + id: 27951287 + name: "FabricEgress.dscp_rewriter.rewrite" + alias: "rewrite" + } +} +actions { + preamble { + id: 24120545 + name: "FabricEgress.dscp_rewriter.clear" + alias: "clear" + } +} +actions { + preamble { + id: 22415037 + name: "FabricEgress.int_egress.check_quota" + alias: "check_quota" + } +} +actions { + preamble { + id: 19702294 + name: "FabricEgress.int_egress.reset_quota" + alias: "reset_quota" + } +} +actions { + preamble { + id: 22425991 + name: "FabricEgress.int_egress.set_config" + alias: "set_config" + } + params { + id: 1 + name: "hop_latency_mask" + bitwidth: 32 + } + params { + id: 2 + name: "timestamp_mask" + bitwidth: 48 + } +} +actions { + preamble { + id: 30783845 + name: "FabricEgress.int_egress.do_local_report_encap" + alias: "do_local_report_encap" + } + params { + id: 1 + name: "src_ip" + bitwidth: 32 + } + params { + id: 2 + name: "mon_ip" + bitwidth: 32 + } + params { + id: 3 + name: "mon_port" + bitwidth: 16 + } + params { + id: 4 + name: "switch_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 22769901 + name: "FabricEgress.int_egress.do_local_report_encap_mpls" + alias: "do_local_report_encap_mpls" + } + params { + id: 1 + name: "src_ip" + bitwidth: 32 + } + params { + id: 2 + name: "mon_ip" + bitwidth: 32 + } + params { + id: 3 + name: "mon_port" + bitwidth: 16 + } + params { + id: 4 + name: "mon_label" + bitwidth: 20 + } + params { + id: 5 + name: "switch_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 32486459 + name: "FabricEgress.int_egress.do_drop_report_encap" + alias: "do_drop_report_encap" + } + params { + id: 1 + name: "src_ip" + bitwidth: 32 + } + params { + id: 2 + name: "mon_ip" + bitwidth: 32 + } + params { + id: 3 + name: "mon_port" + bitwidth: 16 + } + params { + id: 4 + name: "switch_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 25343592 + name: "FabricEgress.int_egress.do_drop_report_encap_mpls" + alias: "do_drop_report_encap_mpls" + } + params { + id: 1 + name: "src_ip" + bitwidth: 32 + } + params { + id: 2 + name: "mon_ip" + bitwidth: 32 + } + params { + id: 3 + name: "mon_port" + bitwidth: 16 + } + params { + id: 4 + name: "mon_label" + bitwidth: 20 + } + params { + id: 5 + name: "switch_id" + bitwidth: 32 + } +} +action_profiles { + preamble { + id: 289544276 + name: "FabricIngress.next.hashed_profile" + alias: "hashed_profile" + } + table_ids: 47960972 + with_selector: true + size: 16 + max_group_size: 16 +} +counters { + preamble { + id: 309010261 + name: "FabricIngress.filtering.fwd_type_counter" + alias: "fwd_type_counter" + } + spec { + unit: BOTH + } + size: 8 +} +direct_counters { + preamble { + id: 333776332 + name: "FabricIngress.stats.flow_counter" + alias: "FabricIngress.stats.flow_counter" + } + spec { + unit: BOTH + } + direct_table_id: 41243186 +} +direct_counters { + preamble { + id: 326221069 + name: "FabricIngress.filtering.ingress_port_vlan_counter" + alias: "ingress_port_vlan_counter" + } + spec { + unit: BOTH + } + direct_table_id: 43310977 +} +direct_counters { + preamble { + id: 335473470 + name: "FabricIngress.filtering.fwd_classifier_counter" + alias: "fwd_classifier_counter" + } + spec { + unit: BOTH + } + direct_table_id: 49718154 +} +direct_counters { + preamble { + id: 330959985 + name: "FabricIngress.forwarding.bridging_counter" + alias: "bridging_counter" + } + spec { + unit: BOTH + } + direct_table_id: 43623757 +} +direct_counters { + preamble { + id: 318961579 + name: "FabricIngress.forwarding.mpls_counter" + alias: "mpls_counter" + } + spec { + unit: BOTH + } + direct_table_id: 37768578 +} +direct_counters { + preamble { + id: 333425635 + name: "FabricIngress.forwarding.routing_v4_counter" + alias: "routing_v4_counter" + } + spec { + unit: BOTH + } + direct_table_id: 41754650 +} +direct_counters { + preamble { + id: 324042090 + name: "FabricIngress.forwarding.routing_v6_counter" + alias: "routing_v6_counter" + } + spec { + unit: BOTH + } + direct_table_id: 49342721 +} +direct_counters { + preamble { + id: 330020245 + name: "FabricIngress.pre_next.next_mpls_counter" + alias: "next_mpls_counter" + } + spec { + unit: BOTH + } + direct_table_id: 36626242 +} +direct_counters { + preamble { + id: 333692067 + name: "FabricIngress.pre_next.next_vlan_counter" + alias: "next_vlan_counter" + } + spec { + unit: BOTH + } + direct_table_id: 48011802 +} +direct_counters { + preamble { + id: 319194241 + name: "FabricIngress.acl.acl_counter" + alias: "acl_counter" + } + spec { + unit: BOTH + } + direct_table_id: 44104738 +} +direct_counters { + preamble { + id: 326633416 + name: "FabricIngress.next.simple_counter" + alias: "simple_counter" + } + spec { + unit: BOTH + } + direct_table_id: 39142283 +} +direct_counters { + preamble { + id: 322798228 + name: "FabricIngress.next.hashed_counter" + alias: "hashed_counter" + } + spec { + unit: BOTH + } + direct_table_id: 47960972 +} +direct_counters { + preamble { + id: 319194968 + name: "FabricIngress.next.multicast_counter" + alias: "multicast_counter" + } + spec { + unit: BOTH + } + direct_table_id: 40619180 +} +direct_counters { + preamble { + id: 334706097 + name: "FabricIngress.slice_tc_classifier.classifier_stats" + alias: "classifier_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 34606298 +} +direct_counters { + preamble { + id: 327743278 + name: "FabricIngress.qos.queues_stats" + alias: "queues_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 36435258 +} +direct_counters { + preamble { + id: 328581521 + name: "FabricIngress.int_watchlist.watchlist_counter" + alias: "watchlist_counter" + } + spec { + unit: BOTH + } + direct_table_id: 40748488 +} +direct_counters { + preamble { + id: 334508337 + name: "FabricEgress.stats.flow_counter" + alias: "FabricEgress.stats.flow_counter" + } + spec { + unit: BOTH + } + direct_table_id: 43851059 +} +direct_counters { + preamble { + id: 318892680 + name: "FabricEgress.egress_next.egress_vlan_counter" + alias: "egress_vlan_counter" + } + spec { + unit: BOTH + } + direct_table_id: 49262446 +} +direct_counters { + preamble { + id: 325056546 + name: "FabricEgress.int_egress.report_counter" + alias: "report_counter" + } + spec { + unit: BOTH + } + direct_table_id: 46071383 +} +meters { + preamble { + id: 348573637 + name: "FabricIngress.qos.slice_tc_meter" + alias: "slice_tc_meter" + } + spec { + unit: BYTES + } + size: 64 +} +controller_packet_metadata { + preamble { + id: 81826293 + name: "packet_in" + alias: "packet_in" + annotations: "@controller_header(\"packet_in\")" + } + metadata { + id: 1 + name: "ingress_port" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } + metadata { + id: 2 + name: "_pad0" + bitwidth: 7 + } +} +controller_packet_metadata { + preamble { + id: 76689799 + name: "packet_out" + alias: "packet_out" + annotations: "@controller_header(\"packet_out\")" + } + metadata { + id: 1 + name: "pad0" + annotations: "@padding" + bitwidth: 7 + } + metadata { + id: 2 + name: "egress_port" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } + metadata { + id: 3 + name: "pad1" + annotations: "@padding" + bitwidth: 3 + } + metadata { + id: 4 + name: "queue_id" + bitwidth: 5 + } + metadata { + id: 5 + name: "pad2" + annotations: "@padding" + bitwidth: 5 + } + metadata { + id: 6 + name: "cpu_loopback_mode" + bitwidth: 2 + } + metadata { + id: 7 + name: "do_forwarding" + bitwidth: 1 + } + metadata { + id: 8 + name: "pad3" + annotations: "@padding" + bitwidth: 16 + } + metadata { + id: 9 + name: "pad4" + annotations: "@padding" + bitwidth: 48 + } + metadata { + id: 10 + name: "ether_type" + bitwidth: 16 + } +} +registers { + preamble { + id: 376533241 + name: "FabricEgress.int_egress.seq_number" + alias: "seq_number" + annotations: "@hidden" + } + type_spec { + bitstring { + bit { + bitwidth: 32 + } + } + } + size: 1024 +} +type_info { + serializable_enums { + key: "BridgedMdType_t" + value { + underlying_type { + bitwidth: 8 + } + members { + name: "INVALID" + value: "\000" + } + members { + name: "INGRESS_TO_EGRESS" + value: "\001" + } + members { + name: "EGRESS_MIRROR" + value: "\002" + } + members { + name: "INGRESS_MIRROR" + value: "\003" + } + members { + name: "INT_INGRESS_DROP" + value: "\004" + } + members { + name: "DEFLECTED" + value: "\005" + } + } + } + serializable_enums { + key: "CpuLoopbackMode_t" + value { + underlying_type { + bitwidth: 2 + } + members { + name: "DISABLED" + value: "\000" + } + members { + name: "DIRECT" + value: "\001" + } + members { + name: "INGRESS" + value: "\002" + } + } + } + serializable_enums { + key: "FabricMirrorType_t" + value { + underlying_type { + bitwidth: 3 + } + members { + name: "INVALID" + value: "\000" + } + members { + name: "INT_REPORT" + value: "\001" + } + members { + name: "PACKET_IN" + value: "\002" + } + } + } + serializable_enums { + key: "PortType_t" + value { + underlying_type { + bitwidth: 2 + } + members { + name: "UNKNOWN" + value: "\000" + } + members { + name: "EDGE" + value: "\001" + } + members { + name: "INFRA" + value: "\002" + } + members { + name: "INTERNAL" + value: "\003" + } + } + } + new_types { + key: "FabricPortId_t" + value { + original_type { + bitstring { + bit { + bitwidth: 9 + } + } + } + } + } +} diff --git a/src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh b/src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh new file mode 100755 index 000000000..cf37ab542 --- /dev/null +++ b/src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# make sure to source the following scripts: +# - my_deploy.sh +# - tfs_runtime_env_vars.sh + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_bootstrap.py diff --git a/src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh b/src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh new file mode 100755 index 000000000..55f88bca9 --- /dev/null +++ b/src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_rules_provision.py diff --git a/src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh b/src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh new file mode 100755 index 000000000..bff1369a7 --- /dev/null +++ b/src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_rules_deprovision.py diff --git a/src/tests/p4-int-routing-acl/run_test_04_cleanup.sh b/src/tests/p4-int-routing-acl/run_test_04_cleanup.sh new file mode 100755 index 000000000..4f5410b98 --- /dev/null +++ b/src/tests/p4-int-routing-acl/run_test_04_cleanup.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_cleanup.py diff --git a/src/tests/p4-int-routing-acl/setup.sh b/src/tests/p4-int-routing-acl/setup.sh new file mode 100755 index 000000000..31b370a41 --- /dev/null +++ b/src/tests/p4-int-routing-acl/setup.sh @@ -0,0 +1,22 @@ +#! /bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +export POD_NAME=$(kubectl get pods -n=tfs | grep device | awk '{print $1}') + +kubectl exec ${POD_NAME} -n=tfs -c=server -- mkdir -p /root/p4 + +kubectl cp src/tests/p4-int-routing-acl/p4src/p4info.txt tfs/${POD_NAME}:/root/p4 -c=server +kubectl cp src/tests/p4-int-routing-acl/p4src/bmv2.json tfs/${POD_NAME}:/root/p4 -c=server diff --git a/src/tests/p4-int-routing-acl/test_common.py b/src/tests/p4-int-routing-acl/test_common.py new file mode 100644 index 000000000..f2b2d81e2 --- /dev/null +++ b/src/tests/p4-int-routing-acl/test_common.py @@ -0,0 +1,111 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum +from common.tools.object_factory.Context import json_context_id + +# Context info +CONTEXT_NAME_P4 = DEFAULT_CONTEXT_NAME +ADMIN_CONTEXT_ID = ContextId(**json_context_id(CONTEXT_NAME_P4)) + +# Device and rule cardinality variables +DEV_NB = 3 +CONNECTION_RULES = 3 +ENDPOINT_RULES = 2 +DATAPLANE_RULES_NB_INT_B1 = 5 +DATAPLANE_RULES_NB_INT_B2 = 6 +DATAPLANE_RULES_NB_INT_B3 = 8 +DATAPLANE_RULES_NB_RT_EDGE = 7 +DATAPLANE_RULES_NB_RT_CORP = 7 +DATAPLANE_RULES_NB_ACL = 1 +DATAPLANE_RULES_NB_TOT = \ + DATAPLANE_RULES_NB_INT_B1 +\ + DATAPLANE_RULES_NB_INT_B2 +\ + DATAPLANE_RULES_NB_INT_B3 +\ + DATAPLANE_RULES_NB_RT_EDGE +\ + DATAPLANE_RULES_NB_RT_CORP +\ + DATAPLANE_RULES_NB_ACL + +# Topology descriptor +DESC_TOPO = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'topology.json' +) + +# Rule insertion descriptors +# The switch cannot digest all rules at once, hence we insert in batches +DESC_FILE_RULES_INSERT_INT_B1 = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-insert-int-b1.json' +) +DESC_FILE_RULES_INSERT_INT_B2 = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-insert-int-b2.json' +) +DESC_FILE_RULES_INSERT_INT_B3 = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-insert-int-b3.json' +) +DESC_FILE_RULES_INSERT_ROUTING_EDGE = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-insert-routing-edge.json' +) +DESC_FILE_RULES_INSERT_ROUTING_CORP = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-insert-routing-corp.json' +) +DESC_FILE_RULES_INSERT_ACL = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-insert-acl.json' +) + +# Rule deletion descriptor +DESC_FILE_RULES_DELETE_ALL = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-remove.json' +) + +def verify_number_of_rules(devices, desired_rules_nb): + # Iterate all devices + for device in devices: + # Skip non-P4 devices + if device.device_type != "p4-switch": continue + + # We want the device to be active + assert \ + device.device_operational_status == DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + # Get the configuration rules of this device + config_rules = device.device_config.config_rules + + # Expected rule cardinality + assert len(config_rules) == desired_rules_nb diff --git a/src/tests/p4-int-routing-acl/test_functional_bootstrap.py b/src/tests/p4-int-routing-acl/test_functional_bootstrap.py new file mode 100644 index 000000000..36c343c1c --- /dev/null +++ b/src/tests/p4-int-routing-acl/test_functional_bootstrap.py @@ -0,0 +1,70 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, time +from common.proto.context_pb2 import DeviceOperationalStatusEnum, Empty +from common.tools.descriptor.Loader import DescriptorLoader, \ + check_descriptor_load_results, validate_empty_scenario +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import +from test_common import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_scenario_bootstrap( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + """ + This test assumes that the environment is in a clean state (empty) + before bootstrapping the P4 topology. + It loads the topology descriptor and verifies that no other services + or slices are created. + """ + validate_empty_scenario(context_client) + + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_TOPO, context_client=context_client, device_client=device_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + +def test_scenario_devices_enabled( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + """ + This test validates that the devices are enabled. + """ + DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + num_devices = -1 + num_devices_enabled, num_retry = 0, 0 + while (num_devices != num_devices_enabled) and (num_retry < 10): + time.sleep(1.0) + response = context_client.ListDevices(Empty()) + num_devices = len(response.devices) + num_devices_enabled = 0 + for device in response.devices: + if device.device_operational_status != DEVICE_OP_STATUS_ENABLED: continue + num_devices_enabled += 1 + LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) + num_retry += 1 + assert num_devices_enabled == num_devices diff --git a/src/tests/p4-int-routing-acl/test_functional_cleanup.py b/src/tests/p4-int-routing-acl/test_functional_cleanup.py new file mode 100644 index 000000000..b00d1e070 --- /dev/null +++ b/src/tests/p4-int-routing-acl/test_functional_cleanup.py @@ -0,0 +1,41 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import DescriptorLoader, validate_empty_scenario +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import +from test_common import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_scenario_cleanup( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + # Unload topology and validate empty scenario + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_TOPO, context_client=context_client, device_client=device_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/tests/p4-int-routing-acl/test_functional_rules_deprovision.py b/src/tests/p4-int-routing-acl/test_functional_rules_deprovision.py new file mode 100644 index 000000000..2d54ae908 --- /dev/null +++ b/src/tests/p4-int-routing-acl/test_functional_rules_deprovision.py @@ -0,0 +1,93 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import +from test_common import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_initial_context( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # Verify the scenario has 0 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 0 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 0 + + # Check there are 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + +def test_rules_before_removal( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + \ + DATAPLANE_RULES_NB_INT_B2 + \ + DATAPLANE_RULES_NB_INT_B3 + \ + DATAPLANE_RULES_NB_RT_EDGE + \ + DATAPLANE_RULES_NB_RT_CORP + \ + DATAPLANE_RULES_NB_ACL + assert desired_rules_nb == CONNECTION_RULES + ENDPOINT_RULES + DATAPLANE_RULES_NB_TOT + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_removal( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load dataplane rules for removal + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_DELETE_ALL, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_removal( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** removing all dataplane rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Only connection and endpoint rules must be in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + verify_number_of_rules(response.devices, desired_rules_nb) diff --git a/src/tests/p4-int-routing-acl/test_functional_rules_provision.py b/src/tests/p4-int-routing-acl/test_functional_rules_provision.py new file mode 100644 index 000000000..46134f1ba --- /dev/null +++ b/src/tests/p4-int-routing-acl/test_functional_rules_provision.py @@ -0,0 +1,238 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import +from test_common import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_initial_context( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # Verify the scenario has 0 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 0 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 0 + + # Check there are 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + +def test_rules_before_insertion( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_insertion_int_batch_1( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load INT batch 1 rules for insertion + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_INSERT_INT_B1, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_insertion_int_batch_1( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** inserting batch 1 of INT rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_insertion_int_batch_2( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load INT batch 2 rules for insertion + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_INSERT_INT_B2, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_insertion_int_batch_2( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** inserting batch 2 of INT rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + \ + DATAPLANE_RULES_NB_INT_B2 + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_insertion_int_batch_3( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load INT batch 3 rules for insertion + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_INSERT_INT_B3, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_insertion_int_batch_3( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** inserting batch 3 of INT rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + \ + DATAPLANE_RULES_NB_INT_B2 + \ + DATAPLANE_RULES_NB_INT_B3 + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_insertion_routing_edge_batch_4( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load routing edge batch 4 rules for insertion + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_INSERT_ROUTING_EDGE, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_insertion_routing_edge_batch_4( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** inserting batch 4 of routing edge rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + \ + DATAPLANE_RULES_NB_INT_B2 + \ + DATAPLANE_RULES_NB_INT_B3 + \ + DATAPLANE_RULES_NB_RT_EDGE + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_insertion_routing_corp_batch_5( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load routing corp batch 5 rules for insertion + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_INSERT_ROUTING_CORP, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_insertion_routing_corp_batch_5( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** inserting batch 5 of routing corp rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + \ + DATAPLANE_RULES_NB_INT_B2 + \ + DATAPLANE_RULES_NB_INT_B3 + \ + DATAPLANE_RULES_NB_RT_EDGE + \ + DATAPLANE_RULES_NB_RT_CORP + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_insertion_acl_batch_6( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load ACL batch 6 rules for insertion + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_INSERT_ACL, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_insertion_acl_batch_6( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** inserting batch 6 of ACL rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + \ + DATAPLANE_RULES_NB_INT_B2 + \ + DATAPLANE_RULES_NB_INT_B3 + \ + DATAPLANE_RULES_NB_RT_EDGE + \ + DATAPLANE_RULES_NB_RT_CORP + \ + DATAPLANE_RULES_NB_ACL + assert desired_rules_nb == CONNECTION_RULES + ENDPOINT_RULES + DATAPLANE_RULES_NB_TOT + verify_number_of_rules(response.devices, desired_rules_nb) diff --git a/src/tests/p4-int-routing-acl/topology/README.md b/src/tests/p4-int-routing-acl/topology/README.md new file mode 100644 index 000000000..30d4d84bc --- /dev/null +++ b/src/tests/p4-int-routing-acl/topology/README.md @@ -0,0 +1,166 @@ +# P4 Topology + +This directory contains scripts for deploying a single software-based Stratum switch on a VM or bare metal machine. + +## Prerequisites + +The machine on which Stratum will be deployed must have at least 3 network interfaces as follows: + +- a management interface for the switch to communicate with the control plane (i.e., TFS controller and INT collector) +- a west data plane interface towards a certain subnet (we call it edge subnet in this example) +- an est data plane interface towards another subnet (we call it corporate subnet in this example) + +Also, due to Stratum's restrictions, the desired OS of the machine shall be `Ubuntu server 20.04 LTS`. + +To build Stratum on this machine, follow the steps [here](https://github.com/stratum/stratum/blob/main/stratum/hal/bin/bmv2/README.md). +It is preferred to run Stratum as a binary. + +## Steps to setup the environment and deploy the Stratum switch + +We create a Linux namespace for Stratum to live in an isolated space from the rest of the system. +The two data plane interfaces of the VM need to be enclosed into this namespace, while for this namespace to interact with the outside world (i.e., root namespace and outside the VM), a dedicated virtual interface pair is created. + +Follow the steps below to create the environment, deploy Stratum, and restore the VM to its previous state (cleanup). +Prior to this take a look at the environment configuration file, where one can change the names of the interfaces, according to your network setup. + +```shell +nano p4-switch-conf-common.sh + +HOST_IFACE_EXT="ens3" # Interface towards TFS (management) +SW_IFACE_DATA_EDGE="ens4" # Interface towards the edge subnet (data plane) +SW_IFACE_DATA_CORP="ens5" # Interface towards the corporate subnet (data plane) + +... +``` + +### Step 1: Setup environment + +Edit the `setup` script to modify the subnets' information according to your network setup: + +```shell +nano p4-switch-setup.sh + +# Subnets managed by the switch +DOMAIN_EDGE_IP="10.158.72.0/24" # Left-hand side subnet +DOMAIN_CORP_IP="172.16.10.0/24" # Right-hand side subnet +``` + +Once your network setup is applied, run the `setup` script as follows: + +```shell +sudo bash p4-switch-setup.sh +``` + +To verify that the switch namespace is in place, issue the following command: + +```shell +sudo ip netns exec ns-switch ip a +``` + +The output should show 4 network interfaces, i.e., a `loopback` interface, 2 data planes interfaces (e.g., `ens4`, `ens5` in this example), and a virtual interface for sending telemetry data out of the switch (i.e., `veth-int-sw` in this example). +From this latter interface you can ping towards the other end of the virtual interface pair (i.e., `veth-int-host`): + +```shell +sudo ip netns exec ns-switch ping 10.0.0.254 +``` + +This ensures that telemetry data leaves the switch and ends up on the host VM. +To dispatch this telemetry data towards TFS, the `p4-switch-setup.sh` implements packet mirroring from `veth-int-host` to the VM's management interface (i.e., `ens3` in this example). +We assume that TFS is deployed on a machine that is accessible via the management interface (i.e., `ens3`) of this VM. + +### Step 2: Deploy Stratum in the namespace + +Now the namespace is ready to host the Stratum switch. + +First you need to configure the chassis configuration file with the correct network interfaces names. +To do so, modify the `name` field changing `ens4`, `ens5`, and `ens3` to your desired interfaces. +These interface names must agree with the ones you added in `p4-switch-conf-common.sh`. + +```shell +cat p4-switch-three-port-chassis-config-phy.pb.txt + +# Copyright 2018-present Open Networking Foundation +# SPDX-License-Identifier: Apache-2.0 + +description: "Chassis configuration for a single Stratum bmv2 switch with 3 ports" +chassis { + platform: PLT_P4_SOFT_SWITCH + name: "bmv2-switch" +} +nodes { + id: 1 + slot: 1 + index: 1 +} +singleton_ports { + id: 1 + name: "ens4" + slot: 1 + port: 1 + channel: 1 + speed_bps: 100000000000 + config_params { + admin_state: ADMIN_STATE_ENABLED + } + node: 1 +} +singleton_ports { + id: 2 + name: "ens5" + slot: 1 + port: 2 + channel: 1 + speed_bps: 100000000000 + config_params { + admin_state: ADMIN_STATE_ENABLED + } + node: 1 +} +singleton_ports { + id: 3 + name: "veth-int-sw" + slot: 1 + port: 3 + channel: 1 + speed_bps: 100000000000 + config_params { + admin_state: ADMIN_STATE_ENABLED + } + node: 1 +} +``` + +To deploy Stratum, do: + +```shell +sudo bash run-stratum.sh +``` + +To run Stratum will verbose logging, open the `run-stratum.sh` and change: + +```shell +LOG_LEVEL="debug" +``` + +Then, re-deploy Stratum as shown above. + +To verify that Stratum has been correctly deployed, you should see the following output: + +``` + config_monitoring_service.cc:94] Pushing the saved chassis config read from p4-switch-three-port-chassis-config-phy.pb.txt... + bmv2_chassis_manager.cc:519] Registered port status callbacks successfully for node 1. + bmv2_chassis_manager.cc:453] State of port 1 in node 1: UP. + bmv2_chassis_manager.cc:453] State of port 2 in node 1: UP. + bmv2_chassis_manager.cc:453] State of port 3 in node 1: UP. + bmv2_switch.cc:74] P4-based forwarding pipeline config pushed successfully to node with ID 1. + hal.cc:220] Stratum external facing services are listening to 0.0.0.0:50000, 0.0.0.0:50001, 0.0.0.0:50101... +``` + +### Step 3: Restore to the original setup + +When your tests with Stratum and TFS are over, you may want to restore your setup. +To do so, execute the following script: + +```shell +sudo bash p4-switch-tear-down.sh +``` diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-conf-common.sh b/src/tests/p4-int-routing-acl/topology/p4-switch-conf-common.sh new file mode 100644 index 000000000..ef81cbd4b --- /dev/null +++ b/src/tests/p4-int-routing-acl/topology/p4-switch-conf-common.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Switch lives in a namespace +SWITCH_NS="ns-switch" + +# Physical interfaces +HOST_IFACE_EXT="ens3" # Interface towards TFS (management) +SW_IFACE_DATA_EDGE="ens4" # Interface towards the edge subnet (data plane) +SW_IFACE_DATA_CORP="ens5" # Interface towards the corporate subnet (data plane) + +# Virtual interfaces for INT +SW_IFACE_INT="veth-int-sw" +HOST_IFACE_INT="veth-int-host" + +# IP subnet for INT +TOPO_INT_NET="10.0.0.0/24" +TOPO_INT_NET_IP="10.0.0.0" +TOPO_INT_NET_MASK="255.255.255.0" + +# Transport port where the P4Runtime gRPC server is deployed on the switch +SW_P4RT_GRPC_PORT="50001" + +# Transport port where the P4Runtime gNMI server is deployed on the switch +SW_P4RT_GNMI_PORT="50000" + +# Transport port where Stratum listens to local calls +SW_P4RT_LOCAL_PORT="50101" diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-setup.sh b/src/tests/p4-int-routing-acl/topology/p4-switch-setup.sh new file mode 100644 index 000000000..4d958988a --- /dev/null +++ b/src/tests/p4-int-routing-acl/topology/p4-switch-setup.sh @@ -0,0 +1,121 @@ +#!bin/bash + +# You must run this script as root +if [ "$EUID" -ne 0 ]; then + echo "Please run as root" + exit 1 +fi + +source "p4-switch-conf-common.sh" + +# MAC addresses of the virtual INT interfaces +SW_INT_MAC="00:11:22:33:44:11" +HOST_INT_MAC="00:11:22:33:44:22" + +# IP addresses of the virtual INT interfaces +SWITCH_INT_IP="10.0.0.1" +HOST_INT_IP="10.0.0.254" + +SWITCH_INT_IP_NET=${SWITCH_INT_IP}"/24" +HOST_INT_IP_NET=${HOST_INT_IP}"/24" + +# Subnets managed by the switch +DOMAIN_EDGE_IP="10.158.72.22/24" # Edge domain side IP address +DOMAIN_CORP_IP="172.16.10.4/24" # Corporate domain side IP address + +# INT subnet MTU +MTU_LEN=9000 + +kill_stratum() { + pkill stratum +} + +create_namespaces() { + ip netns add ${SWITCH_NS} +} + +create_virtual_interfaces() { + ip link add ${HOST_IFACE_INT} type veth peer name ${SW_IFACE_INT} +} + +assign_virtual_interfaces() { + ip link set ${SW_IFACE_DATA_EDGE} netns ${SWITCH_NS} + ip link set ${SW_IFACE_DATA_CORP} netns ${SWITCH_NS} + ip link set ${SW_IFACE_INT} netns ${SWITCH_NS} +} + +set_mac_addresses() { + ip netns exec ${SWITCH_NS} ifconfig ${SW_IFACE_INT} hw ether ${SW_INT_MAC} + ifconfig ${HOST_IFACE_INT} hw ether ${HOST_INT_MAC} +} + +set_mtu() { + ip netns exec ${SWITCH_NS} ip link set dev ${SW_IFACE_INT} mtu ${MTU_LEN} + ip link set dev ${HOST_IFACE_INT} mtu ${MTU_LEN} +} + +set_ip_addresses() { + ip -n ${SWITCH_NS} addr add ${DOMAIN_EDGE_IP} dev ${SW_IFACE_DATA_EDGE} + ip -n ${SWITCH_NS} addr add ${DOMAIN_CORP_IP} dev ${SW_IFACE_DATA_CORP} + ip -n ${SWITCH_NS} addr add ${SWITCH_INT_IP_NET} dev ${SW_IFACE_INT} + ifconfig ${HOST_IFACE_INT} ${HOST_INT_IP_NET} +} + +bring_interfaces_up() { + ip -n ${SWITCH_NS} link set ${SW_IFACE_DATA_EDGE} up + ip -n ${SWITCH_NS} link set ${SW_IFACE_DATA_CORP} up + ip -n ${SWITCH_NS} link set ${SW_IFACE_INT} up + ifconfig ${HOST_IFACE_INT} up +} + +disable_csum_offloading() { + ip netns exec ${SWITCH_NS} ethtool -K ${SW_IFACE_DATA_EDGE} rx off tx off + ip netns exec ${SWITCH_NS} ethtool -K ${SW_IFACE_DATA_CORP} rx off tx off +} + +switch_default_gw() { + ip netns exec ${SWITCH_NS} ip route add default via ${HOST_INT_IP} +} + +enable_ip_fwd() { + sysctl net.ipv4.ip_forward=1 + sysctl net.ipv4.conf.${HOST_IFACE_EXT}.forwarding=1 + sysctl net.ipv4.conf.${HOST_IFACE_INT}.forwarding=1 +} + +switch_access_to_internet() { + iptables -P FORWARD DROP + iptables -t nat -A POSTROUTING -s ${TOPO_INT_NET_IP}/${TOPO_INT_NET_MASK} -o ${HOST_IFACE_EXT} -j MASQUERADE + iptables -A FORWARD -i ${HOST_IFACE_EXT} -o ${HOST_IFACE_INT} -j ACCEPT + iptables -A FORWARD -o ${HOST_IFACE_EXT} -i ${HOST_IFACE_INT} -j ACCEPT +} + +grpc_port_forwarding() { + iptables -t nat -A PREROUTING -p tcp -i ${HOST_IFACE_EXT} --dport ${SW_P4RT_GRPC_PORT} -j DNAT --to-destination ${SWITCH_INT_IP}:${SW_P4RT_GRPC_PORT} + iptables -A FORWARD -p tcp -d ${SWITCH_INT_IP} --dport ${SW_P4RT_GRPC_PORT} -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT +} + +int_packet_mirroring() { + sudo tc qdisc add dev ${HOST_IFACE_INT} ingress + sudo tc filter add dev ${HOST_IFACE_INT} parent ffff: \ + protocol all prio 2 u32 \ + match u32 0 0 flowid 1:1 \ + action mirred egress mirror dev ${HOST_IFACE_EXT} +} + +kill_stratum +create_namespaces +create_virtual_interfaces +assign_virtual_interfaces +set_mac_addresses +set_mtu +set_ip_addresses +bring_interfaces_up +disable_csum_offloading +switch_default_gw +enable_ip_fwd +switch_access_to_internet +grpc_port_forwarding +int_packet_mirroring + +exit 0 diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-tear-down.sh b/src/tests/p4-int-routing-acl/topology/p4-switch-tear-down.sh new file mode 100644 index 000000000..782b21fd3 --- /dev/null +++ b/src/tests/p4-int-routing-acl/topology/p4-switch-tear-down.sh @@ -0,0 +1,71 @@ +#!bin/bash + +# You must run this script as root +if [ "$EUID" -ne 0 ]; then + echo "Please run as root" + exit 1 +fi + +source "p4-switch-conf-common.sh" + +kill_stratum() { + pkill stratum +} + +delete_virtual_interfaces() { + ip netns exec ${SWITCH_NS} ip link delete ${SW_IFACE_INT} +} + +delete_namespaces() { + ip netns del ${SWITCH_NS} +} + +bring_interfaces_up() { + ifconfig ${SW_IFACE_DATA_EDGE} up + ifconfig ${SW_IFACE_DATA_CORP} up +} + +cleanup_iptables() { + # gRPC entries + entry_no=$(iptables --line-numbers -nvL | grep ${HOST_IFACE_INT} | cut -d " " -f 1 | head -1) + iptables -D FORWARD ${entry_no} + entry_no=$(iptables --line-numbers -nvL | grep ${HOST_IFACE_INT} | cut -d " " -f 1) + iptables -D FORWARD ${entry_no} + entry_no=$(iptables --line-numbers -nvL | grep ${SW_P4RT_GRPC_PORT} | cut -d " " -f 1) + iptables -D FORWARD ${entry_no} + + entry_no=$(iptables -t nat --line-numbers -nvL | grep ${SW_P4RT_GRPC_PORT} | cut -d " " -f 1) + iptables -t nat -D PREROUTING ${entry_no} + + entry_no=$(iptables -t nat --line-numbers -nvL | grep ${TOPO_INT_NET} | cut -d " " -f 1) + iptables -t nat -D POSTROUTING ${entry_no} + + # Check new state + echo "Forwarding tables" + iptables --line-numbers -nvL + echo -e "" + echo "NAT tables" + iptables -t nat --line-numbers -nvL +} + +cleanup_tc() { + sudo tc filter del dev ${HOST_IFACE_INT} parent ffff: \ + protocol all prio 2 u32 \ + match u32 0 0 flowid 1:1 \ + action mirred egress mirror dev ${HOST_IFACE_EXT} + sudo tc qdisc del dev ${HOST_IFACE_INT} ingress + + # Check new state + echo -e "" + echo -e "Linux tc status" + tc qdisc show +} + +kill_stratum +delete_virtual_interfaces +delete_namespaces +# bring_interfaces_up +cleanup_iptables +cleanup_tc + +exit 0 diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-three-port-chassis-config-phy.pb.txt b/src/tests/p4-int-routing-acl/topology/p4-switch-three-port-chassis-config-phy.pb.txt new file mode 100644 index 000000000..ff1d3e338 --- /dev/null +++ b/src/tests/p4-int-routing-acl/topology/p4-switch-three-port-chassis-config-phy.pb.txt @@ -0,0 +1,49 @@ +# Copyright 2018-present Open Networking Foundation +# SPDX-License-Identifier: Apache-2.0 + +description: "Chassis configuration for a single Stratum bmv2 switch with 3 ports" +chassis { + platform: PLT_P4_SOFT_SWITCH + name: "bmv2-switch" +} +nodes { + id: 1 + slot: 1 + index: 1 +} +singleton_ports { + id: 1 + name: "ens4" + slot: 1 + port: 1 + channel: 1 + speed_bps: 100000000000 + config_params { + admin_state: ADMIN_STATE_ENABLED + } + node: 1 +} +singleton_ports { + id: 2 + name: "ens5" + slot: 1 + port: 2 + channel: 1 + speed_bps: 100000000000 + config_params { + admin_state: ADMIN_STATE_ENABLED + } + node: 1 +} +singleton_ports { + id: 3 + name: "veth-int-sw" + slot: 1 + port: 3 + channel: 1 + speed_bps: 100000000000 + config_params { + admin_state: ADMIN_STATE_ENABLED + } + node: 1 +} diff --git a/src/tests/p4-int-routing-acl/topology/run-stratum.sh b/src/tests/p4-int-routing-acl/topology/run-stratum.sh new file mode 100644 index 000000000..89a09e6f0 --- /dev/null +++ b/src/tests/p4-int-routing-acl/topology/run-stratum.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# You must run this script as root +if [ "$EUID" -ne 0 ]; then + echo "Please run as root" + exit 1 +fi + +source "p4-switch-conf-common.sh" + +LOG_FILE_DIR="/var/log/stratum/" + +sudo mkdir -p "${LOG_FILE_DIR}" + +LOG_LEVEL="info" +READ_LOGS_FILE_PATH=${LOG_FILE_DIR}"p4_reads.pb.txt" +WRITE_LOGS_FILE_PATH=${LOG_FILE_DIR}"p4_writes.pb.txt" +CHASSIS_CONFIG="p4-switch-three-port-chassis-config-phy.pb.txt" + +[ -f ${CHASSIS_CONFIG} ] || { echo "$CHASSIS_CONFIG not found!" ; exit 1 ;} + +touch "${READ_LOGS_FILE_PATH}" +touch "${WRITE_LOGS_FILE_PATH}" + +ip netns exec ns-switch stratum_bmv2 \ + -chassis_config_file=${CHASSIS_CONFIG} \ + -read_req_log_file=${READ_LOGS_FILE_PATH} \ + -write_req_log_file=${WRITE_LOGS_FILE_PATH} \ + -external_stratum_urls="0.0.0.0:"${SW_P4RT_GNMI_PORT}",0.0.0.0:"${SW_P4RT_GRPC_PORT} \ + -local_stratum_url="0.0.0.0:"${SW_P4RT_LOCAL_PORT} \ + -bmv2_log_level=${LOG_LEVEL} + +exit 0 -- GitLab From 82fe306fa961145119989bf3c6967f5a47bb3333 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sun, 15 Dec 2024 14:48:52 +0100 Subject: [PATCH 077/463] feat: ietf slice delete nbi endpoints added - tests updated --- .../NSS_Service_Match_Criterion.py | 52 ++++++++++ .../NSS_Services_Connection_Group.py | 48 ++++++++++ .../ietf_network_slice/NSS_Services_SDP.py | 45 +++++++++ .../ietf_network_slice/__init__.py | 53 +++++++--- .../ietf_network_slice/ietf_slice_handler.py | 96 +++++++++++++++++++ src/nbi/tests/test_slice_2.py | 72 ++++++++++++-- 6 files changed, 346 insertions(+), 20 deletions(-) create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criterion.py create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py create mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDP.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criterion.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criterion.py new file mode 100644 index 000000000..017ad5d36 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criterion.py @@ -0,0 +1,52 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Dict + +from flask import request +from flask.json import jsonify +from flask_restful import Resource +from werkzeug.exceptions import UnsupportedMediaType + +from context.client.ContextClient import ContextClient +from slice.client.SliceClient import SliceClient + +from ..tools.Authentication import HTTP_AUTH +from ..tools.HttpStatusCodes import ( + HTTP_CREATED, +) +from .ietf_slice_handler import IETFSliceHandler + +LOGGER = logging.getLogger(__name__) + + +class NSS_Service_Match_Criterion(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 delete(self, slice_id: str, sdp_id: str, match_criterion_id: str): + context_client = ContextClient() + slice_request = IETFSliceHandler.delete_match_criteria( + slice_id, sdp_id, int(match_criterion_id), context_client + ) + slice_client = SliceClient() + slice_client.UpdateSlice(slice_request) + + response = jsonify({}) + response.status_code = HTTP_CREATED + return response diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py new file mode 100644 index 000000000..0356af68b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py @@ -0,0 +1,48 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Dict + +from flask import request +from flask.json import jsonify +from flask_restful import Resource +from werkzeug.exceptions import UnsupportedMediaType + +from context.client.ContextClient import ContextClient + +from ..tools.Authentication import HTTP_AUTH +from ..tools.HttpStatusCodes import HTTP_CREATED +from .ietf_slice_handler import IETFSliceHandler + +LOGGER = logging.getLogger(__name__) + + +class NSS_Service_Connection_Groups(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 delete(self, slice_id: str, connection_group_id: str): + context_client = ContextClient() + slice_request = IETFSliceHandler.delete_connection_group( + slice_id, connection_group_id, context_client + ) + _ = context_client.SetSlice(slice_request) + + response = jsonify({}) + response.status_code = HTTP_CREATED + return response diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDP.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDP.py new file mode 100644 index 000000000..f1d04a858 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDP.py @@ -0,0 +1,45 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Dict + +from flask import request +from flask.json import jsonify +from flask_restful import Resource +from werkzeug.exceptions import UnsupportedMediaType + +from context.client.ContextClient import ContextClient + +from ..tools.HttpStatusCodes import HTTP_OK +from .ietf_slice_handler import IETFSliceHandler + +LOGGER = logging.getLogger(__name__) + + +class NSS_Service_SDP(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 delete(self, slice_id: str, sdp_id: str): + context_client = ContextClient() + slice_request = IETFSliceHandler.delete_sdp(slice_id, sdp_id, context_client) + _ = context_client.SetSlice(slice_request) + + response = jsonify({}) + response.status_code = HTTP_OK + return response diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py index 9442ac6e9..c8aca7e1e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py @@ -16,23 +16,54 @@ # Ref: https://datatracker.ietf.org/doc/draft-ietf-teas-ietf-network-slice-nbi-yang/ from flask_restful import Resource + from nbi.service.rest_server.RestServer import RestServer -from .NSS_Services import NSS_Services + from .NSS_Service import NSS_Service -from .NSS_Services_SDPs import NSS_Service_SDPs -from .NSS_Services_Connection_Groups import NSS_Service_Connection_Groups from .NSS_Service_Match_Criteria import NSS_Service_Match_Criteria +from .NSS_Service_Match_Criterion import NSS_Service_Match_Criterion +from .NSS_Services import NSS_Services +from .NSS_Services_Connection_Groups import NSS_Service_Connection_Groups +from .NSS_Services_SDP import NSS_Service_SDP +from .NSS_Services_SDPs import NSS_Service_SDPs + +URL_PREFIX = "/restconf/data/ietf-network-slice-service:ietf-nss" -URL_PREFIX = '/restconf/data/ietf-network-slice-service:ietf-nss' -def _add_resource(rest_server : RestServer, resource : Resource, *urls, **kwargs): +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=') - _add_resource(rest_server, NSS_Service_SDPs, '/network-slice-services/slice-service=/sdps') - _add_resource(rest_server, NSS_Service_Connection_Groups, '/network-slice-services/slice-service=/connection-groups') - _add_resource(rest_server, NSS_Service_Match_Criteria, '/network-slice-services/slice-service=/sdps/sdp=/service-match-criteria') +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=", + ) + _add_resource( + rest_server, + NSS_Service_SDPs, + "/network-slice-services/slice-service=/sdps", + ) + _add_resource( + rest_server, + NSS_Service_SDP, + "/network-slice-services/slice-service=/sdps/sdp=", + ) + _add_resource( + rest_server, + NSS_Service_Connection_Groups, + "/network-slice-services/slice-service=/connection-groups", + ) + _add_resource( + rest_server, + NSS_Service_Match_Criteria, + "/network-slice-services/slice-service=/sdps/sdp=/service-match-criteria", + ) + _add_resource( + rest_server, + NSS_Service_Match_Criterion, + "/network-slice-services/slice-service=/sdps/sdp=/service-match-criteria/match-criterion=", + ) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py index 269bfc432..3317a3b2f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py @@ -119,6 +119,33 @@ class IETFSliceHandler: ) return slice_request + @staticmethod + def delete_sdp( + slice_uuid: str, sdp_id: str, context_client: ContextClient + ) -> Slice: + slice_request = get_slice_by_uuid(context_client, slice_uuid) + for cr in slice_request.slice_config.config_rules: + if cr.WhichOneof("config_rule") != "custom": + continue + if cr.custom.resource_key == RESOURCE_KEY: + ietf_data = json.loads(cr.custom.resource_value) + break + else: + raise Exception("ietf data not found") + slice_services = ietf_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + slice_sdps = slice_service["sdps"]["sdp"] + sdp_idx = list((slice_sdp["id"] == sdp_id for slice_sdp in slice_sdps)).index( + True + ) + slice_sdps.pop(sdp_idx) + raise_if_differs = False + fields = {name: (value, raise_if_differs) for name, value in ietf_data.items()} + update_config_rule_custom( + slice_request.slice_config.config_rules, RESOURCE_KEY, fields + ) + return slice_request + @staticmethod def create_connection_group( request_data: dict, slice_id: str, context_client: ContextClient @@ -145,6 +172,36 @@ class IETFSliceHandler: update_config_rule_custom(slice.slice_config.config_rules, RESOURCE_KEY, fields) return slice + @staticmethod + def delete_connection_group( + slice_uuid: str, connection_group_id: str, context_client: ContextClient + ) -> Slice: + slice_request = get_slice_by_uuid(context_client, slice_uuid) + for cr in slice_request.slice_config.config_rules: + if cr.WhichOneof("config_rule") != "custom": + continue + if cr.custom.resource_key == RESOURCE_KEY: + ietf_data = json.loads(cr.custom.resource_value) + break + else: + raise Exception("ietf data not found") + slice_services = ietf_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + slice_connection_groups = slice_service["connection-groups"]["connection-group"] + sdp_idx = list( + ( + slice_cr["id"] == connection_group_id + for slice_cr in slice_connection_groups + ) + ).index(True) + slice_connection_groups.pop(sdp_idx) + raise_if_differs = False + fields = {name: (value, raise_if_differs) for name, value in ietf_data.items()} + update_config_rule_custom( + slice_request.slice_config.config_rules, RESOURCE_KEY, fields + ) + return slice_request + @staticmethod def create_match_criteria( request_data: dict, slice_id: str, sdp_id: str, context_client: ContextClient @@ -237,3 +294,42 @@ class IETFSliceHandler: slice_request.slice_config.config_rules, RESOURCE_KEY, fields ) return slice_request + + @staticmethod + def delete_match_criteria( + slice_uuid: str, + sdp_id: str, + match_criterion_id: int, + context_client: ContextClient, + ) -> Slice: + slice_request = get_slice_by_uuid(context_client, slice_uuid) + slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED + for cr in slice_request.slice_config.config_rules: + if cr.WhichOneof("config_rule") != "custom": + continue + if cr.custom.resource_key == RESOURCE_KEY: + ietf_data = json.loads(cr.custom.resource_value) + break + else: + raise Exception("ietf data not found") + slice_services = ietf_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + for sdp in sdps: + if sdp["id"] == sdp_id: + match_criteria = sdp["service-match-criteria"]["match-criterion"] + match_criterion_idx = [ + match_criterion["index"] == match_criterion_id + for match_criterion in match_criteria + ].index(True) + del match_criteria[match_criterion_idx] + break + else: + raise Exception("Second SDP not found") + + raise_if_differs = False + fields = {name: (value, raise_if_differs) for name, value in ietf_data.items()} + update_config_rule_custom( + slice_request.slice_config.config_rules, RESOURCE_KEY, fields + ) + return slice_request diff --git a/src/nbi/tests/test_slice_2.py b/src/nbi/tests/test_slice_2.py index d25ba1cf5..6466512e7 100644 --- a/src/nbi/tests/test_slice_2.py +++ b/src/nbi/tests/test_slice_2.py @@ -28,14 +28,19 @@ with open("nbi/tests/data/slice/post_network_slice1.json", mode="r") as f: with open("nbi/tests/data/slice/post_sdp_to_network_slice1.json", mode="r") as f: post_sdp_request = json.load(f) -with open("nbi/tests/data/slice/post_connection_group_to_network_slice1.json", mode="r") as f: +with open( + "nbi/tests/data/slice/post_connection_group_to_network_slice1.json", mode="r" +) as f: post_connection_group_request = json.load(f) -with open("nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice1.json", mode="r") as f: +with open( + "nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice1.json", mode="r" +) as f: post_match_criteria_request = json.load(f) slice_1 = None + def select_slice(*args) -> SliceList: slice_list = SliceList() slice_list.slices.extend([slice_1]) @@ -71,14 +76,16 @@ def test_create_connection_group(monkeypatch): monkeypatch.setattr(context_client, "SelectSlice", select_slice) - slice_1 = IETFSliceHandler.create_connection_group(post_connection_group_request, "slice1", context_client) + slice_1 = IETFSliceHandler.create_connection_group( + post_connection_group_request, "slice1", context_client + ) ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) slice_services = ietf_data["network-slice-services"]["slice-service"] slice_service = slice_services[0] slice_connection_groups = slice_service["connection-groups"]["connection-group"] - assert slice_connection_groups[0]['id'] == 'line1' - assert slice_connection_groups[1]['id'] == 'line2' + assert slice_connection_groups[0]["id"] == "line1" + assert slice_connection_groups[1]["id"] == "line2" assert len(slice_connection_groups) == 2 @@ -87,14 +94,61 @@ def test_create_match_criteria(monkeypatch): monkeypatch.setattr(context_client, "SelectSlice", select_slice) - slice_1 = IETFSliceHandler.create_match_criteria(post_match_criteria_request, "slice1", "1", context_client) + slice_1 = IETFSliceHandler.create_match_criteria( + post_match_criteria_request, "slice1", "1", context_client + ) ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) slice_services = ietf_data["network-slice-services"]["slice-service"] slice_service = slice_services[0] slice_sdps = slice_service["sdps"]["sdp"] - sdp1_match_criteria = slice_sdps[0]['service-match-criteria']['match-criterion'] + sdp1_match_criteria = slice_sdps[0]["service-match-criteria"]["match-criterion"] assert len(sdp1_match_criteria) == 2 - assert sdp1_match_criteria[0]['target-connection-group-id'] == 'line1' - assert sdp1_match_criteria[1]['target-connection-group-id'] == 'line2' + assert sdp1_match_criteria[0]["target-connection-group-id"] == "line1" + assert sdp1_match_criteria[1]["target-connection-group-id"] == "line2" assert slice_1.slice_endpoint_ids[0].device_id.device_uuid.uuid == "172.16.61.11" assert slice_1.slice_endpoint_ids[1].device_id.device_uuid.uuid == "172.16.204.220" + + +def test_delete_sdp(monkeypatch): + global slice_1 + + monkeypatch.setattr(context_client, "SelectSlice", select_slice) + + slice_1 = IETFSliceHandler.delete_sdp("slice1", "3", context_client) + ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) + slice_services = ietf_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + slice_sdps = slice_service["sdps"]["sdp"] + assert len(slice_sdps) == 2 + assert "3" not in (sdp["id"] for sdp in slice_sdps) + + +def test_delete_connection_group(monkeypatch): + global slice_1 + + monkeypatch.setattr(context_client, "SelectSlice", select_slice) + + slice_1 = IETFSliceHandler.delete_connection_group( + "slice1", "line2", context_client + ) + ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) + slice_services = ietf_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + slice_connection_groups = slice_service["connection-groups"]["connection-group"] + assert len(slice_connection_groups) == 1 + assert slice_connection_groups[0]["id"] == "line1" + + +def test_delete_match_criteria(monkeypatch): + global slice_1 + + monkeypatch.setattr(context_client, "SelectSlice", select_slice) + + slice_1 = IETFSliceHandler.delete_match_criteria("slice1", "1", 2, context_client) + ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) + slice_services = ietf_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + slice_sdps = slice_service["sdps"]["sdp"] + sdp1_match_criteria = slice_sdps[0]["service-match-criteria"]["match-criterion"] + assert len(sdp1_match_criteria) == 1 + assert sdp1_match_criteria[0]["target-connection-group-id"] == "line1" -- GitLab From 3aea4dc02e1c68ad17f051f279788e20dcf2b29f Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 16 Dec 2024 19:36:34 +0100 Subject: [PATCH 078/463] feat: IETF_SLICE and NCE types added to context proto and python Enum types. - l3nm_emulated ConfigRules.py changed to match string vlan values. --- proto/context.proto | 3 +++ src/common/DeviceTypes.py | 3 +++ src/common/tools/descriptor/Tools.py | 2 ++ .../database/models/enums/DeviceDriver.py | 3 +++ src/device/service/drivers/__init__.py | 18 ++++++++++++++++++ .../service/algorithms/tools/ResourceGroups.py | 3 +++ .../service/algorithms/tools/ServiceTypes.py | 1 + .../service_handler_api/FilterFields.py | 3 +++ .../service/service_handlers/__init__.py | 14 ++++++++++++++ .../l3nm_emulated/ConfigRules.py | 8 ++++---- 10 files changed, 54 insertions(+), 4 deletions(-) diff --git a/proto/context.proto b/proto/context.proto index 9f06d32ee..c275621a4 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -223,6 +223,9 @@ enum DeviceDriverEnum { DEVICEDRIVER_IETF_ACTN = 10; DEVICEDRIVER_OC = 11; DEVICEDRIVER_QKD = 12; + DEVICEDRIVER_IETF_L3VPN = 13; + DEVICEDRIVER_IETF_SLICE = 14; + DEVICEDRIVER_NCE = 15; } enum DeviceOperationalStatusEnum { diff --git a/src/common/DeviceTypes.py b/src/common/DeviceTypes.py index eb315352b..30bbd0b15 100644 --- a/src/common/DeviceTypes.py +++ b/src/common/DeviceTypes.py @@ -52,3 +52,6 @@ class DeviceTypeEnum(Enum): # ETSI TeraFlowSDN controller TERAFLOWSDN_CONTROLLER = 'teraflowsdn' + IETF_SLICE = 'ietf-slice' + + NCE = 'nce' \ No newline at end of file diff --git a/src/common/tools/descriptor/Tools.py b/src/common/tools/descriptor/Tools.py index c8807cef0..2ecd38ae1 100644 --- a/src/common/tools/descriptor/Tools.py +++ b/src/common/tools/descriptor/Tools.py @@ -115,6 +115,8 @@ CONTROLLER_DEVICE_TYPES = { DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM.value, DeviceTypeEnum.OPEN_LINE_SYSTEM.value, DeviceTypeEnum.TERAFLOWSDN_CONTROLLER.value, + DeviceTypeEnum.IETF_SLICE.value, + DeviceTypeEnum.NCE.value, } def split_controllers_and_network_devices(devices : List[Dict]) -> Tuple[List[Dict], List[Dict]]: diff --git a/src/context/service/database/models/enums/DeviceDriver.py b/src/context/service/database/models/enums/DeviceDriver.py index 5342f788a..fe0d83fb1 100644 --- a/src/context/service/database/models/enums/DeviceDriver.py +++ b/src/context/service/database/models/enums/DeviceDriver.py @@ -33,6 +33,9 @@ class ORM_DeviceDriverEnum(enum.Enum): GNMI_OPENCONFIG = DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG OPTICAL_TFS = DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS IETF_ACTN = DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN + IETF_L3VPN = DeviceDriverEnum.DEVICEDRIVER_IETF_L3VPN + NCE = DeviceDriverEnum.DEVICEDRIVER_NCE + IETF_SLICE = DeviceDriverEnum.DEVICEDRIVER_IETF_SLICE OC = DeviceDriverEnum.DEVICEDRIVER_OC QKD = DeviceDriverEnum.DEVICEDRIVER_QKD diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index b99ee50ca..bfadaafdd 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -90,6 +90,24 @@ DRIVERS.append( } ])) +from .ietf_slice.driver import IetfSliceDriver # pylint: disable=wrong-import-position +DRIVERS.append( + (IetfSliceDriver, [ + { + FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.IETF_SLICE, + FilterFieldEnum.DRIVER: DeviceDriverEnum.DEVICEDRIVER_IETF_SLICE, + } + ])) + +from .nce.driver import NCEDriver # pylint: disable=wrong-import-position +DRIVERS.append( + (NCEDriver, [ + { + FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.NCE, + FilterFieldEnum.DRIVER: DeviceDriverEnum.DEVICEDRIVER_NCE, + } + ])) + if LOAD_ALL_DEVICE_DRIVERS: from .openconfig.OpenConfigDriver import OpenConfigDriver # pylint: disable=wrong-import-position DRIVERS.append( diff --git a/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py b/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py index 42635bf4a..eebdfc25e 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py @@ -26,6 +26,9 @@ DEVICE_TYPE_TO_DEEPNESS = { DeviceTypeEnum.TERAFLOWSDN_CONTROLLER.value : 80, DeviceTypeEnum.EMULATED_IP_SDN_CONTROLLER.value : 80, DeviceTypeEnum.IP_SDN_CONTROLLER.value : 80, + DeviceTypeEnum.IETF_SLICE.value : 80, + DeviceTypeEnum.NCE.value : 80, + DeviceTypeEnum.EMULATED_PACKET_ROUTER.value : 70, DeviceTypeEnum.PACKET_ROUTER.value : 70, diff --git a/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py b/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py index 8230092c2..ae567d9d6 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py @@ -22,6 +22,7 @@ NETWORK_DEVICE_TYPES = { PACKET_DEVICE_TYPES = { DeviceTypeEnum.TERAFLOWSDN_CONTROLLER, + DeviceTypeEnum.IETF_SLICE, DeviceTypeEnum.NCE, DeviceTypeEnum.IP_SDN_CONTROLLER, DeviceTypeEnum.EMULATED_IP_SDN_CONTROLLER, DeviceTypeEnum.PACKET_ROUTER, DeviceTypeEnum.EMULATED_PACKET_ROUTER, DeviceTypeEnum.PACKET_SWITCH, DeviceTypeEnum.EMULATED_PACKET_SWITCH, diff --git a/src/service/service/service_handler_api/FilterFields.py b/src/service/service/service_handler_api/FilterFields.py index 78f084605..585bad6b0 100644 --- a/src/service/service/service_handler_api/FilterFields.py +++ b/src/service/service/service_handler_api/FilterFields.py @@ -42,6 +42,9 @@ DEVICE_DRIVER_VALUES = { DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG, DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS, DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN, + DeviceDriverEnum.DEVICEDRIVER_NCE, + DeviceDriverEnum.DEVICEDRIVER_IETF_SLICE, + DeviceDriverEnum.DEVICEDRIVER_IETF_L3VPN, DeviceDriverEnum.DEVICEDRIVER_OC, DeviceDriverEnum.DEVICEDRIVER_QKD, } diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index f93cf011f..3d1ae9041 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -21,6 +21,8 @@ from .l3nm_emulated.L3NMEmulatedServiceHandler import L3NMEmulatedServiceHandler from .l3nm_openconfig.L3NMOpenConfigServiceHandler import L3NMOpenConfigServiceHandler from .l3nm_gnmi_openconfig.L3NMGnmiOpenConfigServiceHandler import L3NMGnmiOpenConfigServiceHandler from .l3nm_ietf_actn.L3NMIetfActnServiceHandler import L3NMIetfActnServiceHandler +from .l3nm_nce.L3NMNCEServiceHandler import L3NMNCEServiceHandler +from .l3slice_ietfslice.L3SliceIETFSliceServiceHandler import L3NMSliceIETFSliceServiceHandler from .microwave.MicrowaveServiceHandler import MicrowaveServiceHandler from .p4.p4_service_handler import P4ServiceHandler from .tapi_tapi.TapiServiceHandler import TapiServiceHandler @@ -66,6 +68,18 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN, } ]), + (L3NMNCEServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L3NM, + FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_NCE, + } + ]), + (L3NMSliceIETFSliceServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L3NM, + FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_IETF_SLICE, + } + ]), (TapiServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, diff --git a/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py b/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py index 1d6764619..f1b02eab5 100644 --- a/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py @@ -43,7 +43,7 @@ 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 - if_subif_name = '{:s}.{:d}'.format(endpoint_name, vlan_id) + if_subif_name = '{:s}.{:s}'.format(endpoint_name, str(vlan_id)) json_config_rules = [ json_config_rule_set( @@ -57,7 +57,7 @@ def setup_config_rules( 'name': endpoint_name, 'description': network_interface_desc, 'mtu': mtu, }), json_config_rule_set( - '/interface[{:s}]/subinterface[{:d}]'.format(endpoint_name, sub_interface_index), { + '/interface[{:s}]/subinterface[{:s}]'.format(endpoint_name, str(sub_interface_index)), { 'name': endpoint_name, 'index': sub_interface_index, 'description': network_subinterface_desc, 'vlan_id': vlan_id, 'address_ip': address_ip, 'address_prefix': address_prefix, @@ -163,7 +163,7 @@ def teardown_config_rules( #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 - if_subif_name = '{:s}.{:d}'.format(endpoint_name, vlan_id) + if_subif_name = '{:s}.{:s}'.format(endpoint_name, str(vlan_id)) service_short_uuid = service_uuid.split('-')[-1] network_instance_name = '{:s}-NetInst'.format(service_short_uuid) #network_interface_desc = '{:s}-NetIf'.format(service_uuid) @@ -175,7 +175,7 @@ def teardown_config_rules( 'name': network_instance_name, 'id': if_subif_name, }), json_config_rule_delete( - '/interface[{:s}]/subinterface[{:d}]'.format(endpoint_name, sub_interface_index), { + '/interface[{:s}]/subinterface[{:s}]'.format(endpoint_name, str(sub_interface_index)), { 'name': endpoint_name, 'index': sub_interface_index, }), json_config_rule_delete( -- GitLab From 9fb0201c449e68a672d01def2460274144c7191c Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Mon, 16 Dec 2024 21:24:26 +0000 Subject: [PATCH 079/463] fix: deprecated python headers --- src/tests/p4-int-routing-acl/__init__.py | 3 +-- src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh | 2 +- src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh | 2 +- src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh | 2 +- src/tests/p4-int-routing-acl/run_test_04_cleanup.sh | 2 +- src/tests/p4-int-routing-acl/setup.sh | 4 ++-- src/tests/p4-int-routing-acl/test_common.py | 2 +- src/tests/p4-int-routing-acl/test_functional_bootstrap.py | 2 +- src/tests/p4-int-routing-acl/test_functional_cleanup.py | 2 +- .../p4-int-routing-acl/test_functional_rules_provision.py | 2 +- 10 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/tests/p4-int-routing-acl/__init__.py b/src/tests/p4-int-routing-acl/__init__.py index 3ee6f7071..023830645 100644 --- a/src/tests/p4-int-routing-acl/__init__.py +++ b/src/tests/p4-int-routing-acl/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,4 +11,3 @@ # WITHOUT 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/p4-int-routing-acl/run_test_01_bootstrap.sh b/src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh index cf37ab542..76469ca55 100755 --- a/src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh +++ b/src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh b/src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh index 55f88bca9..6709d66c6 100755 --- a/src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh +++ b/src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh b/src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh index bff1369a7..3a67fad8a 100755 --- a/src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh +++ b/src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4-int-routing-acl/run_test_04_cleanup.sh b/src/tests/p4-int-routing-acl/run_test_04_cleanup.sh index 4f5410b98..917a2af2d 100755 --- a/src/tests/p4-int-routing-acl/run_test_04_cleanup.sh +++ b/src/tests/p4-int-routing-acl/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4-int-routing-acl/setup.sh b/src/tests/p4-int-routing-acl/setup.sh index 31b370a41..c77164276 100755 --- a/src/tests/p4-int-routing-acl/setup.sh +++ b/src/tests/p4-int-routing-acl/setup.sh @@ -1,11 +1,11 @@ #! /bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/tests/p4-int-routing-acl/test_common.py b/src/tests/p4-int-routing-acl/test_common.py index f2b2d81e2..8254eddc5 100644 --- a/src/tests/p4-int-routing-acl/test_common.py +++ b/src/tests/p4-int-routing-acl/test_common.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4-int-routing-acl/test_functional_bootstrap.py b/src/tests/p4-int-routing-acl/test_functional_bootstrap.py index 36c343c1c..b5b72cc33 100644 --- a/src/tests/p4-int-routing-acl/test_functional_bootstrap.py +++ b/src/tests/p4-int-routing-acl/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4-int-routing-acl/test_functional_cleanup.py b/src/tests/p4-int-routing-acl/test_functional_cleanup.py index b00d1e070..60c8684b0 100644 --- a/src/tests/p4-int-routing-acl/test_functional_cleanup.py +++ b/src/tests/p4-int-routing-acl/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4-int-routing-acl/test_functional_rules_provision.py b/src/tests/p4-int-routing-acl/test_functional_rules_provision.py index 46134f1ba..86a82d212 100644 --- a/src/tests/p4-int-routing-acl/test_functional_rules_provision.py +++ b/src/tests/p4-int-routing-acl/test_functional_rules_provision.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -- GitLab From 7f00bc975c5a657ee83c4370713cee461d3df387 Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 17 Dec 2024 12:01:26 +0100 Subject: [PATCH 080/463] debug and enhance: - post_nework_slice1.json changed to match the CAMARA demo topology - address ip and prefix added to slice configrules --- .../ietf_network_slice/ietf_slice_handler.py | 51 ++++++++++++------- .../tests/data/slice/post_network_slice1.json | 2 +- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py index 3317a3b2f..1614a7724 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py @@ -15,6 +15,8 @@ LOGGER = logging.getLogger(__name__) RESOURCE_KEY = "ietf_data" +ADDRESS_PREFIX = 24 +RAISE_IF_DIFFERS = False class IETFSliceHandler: @@ -36,6 +38,7 @@ class IETFSliceHandler: slice_request.slice_id.slice_uuid.uuid = slice_id slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED list_endpoints = [] + endpoint_config_rules = [] connection_group_ids = set() for sdp in sdps: attachment_circuits = sdp["attachment-circuits"]["attachment-circuit"] @@ -43,14 +46,26 @@ class IETFSliceHandler: raise Exception("All SDPs should have 1 attachment-circuit") 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 = attachment_circuits[0]["ac-tp-id"] + device_uuid = sdp["node-id"] + endpoint.device_id.device_uuid.uuid = device_uuid + endpoint_uuid = attachment_circuits[0]["ac-tp-id"] + endpoint.endpoint_uuid.uuid = endpoint_uuid list_endpoints.append(endpoint) connection_group_ids.add( sdp["service-match-criteria"]["match-criterion"][0][ "target-connection-group-id" ] ) + endpoint_config_rule_fields = { + "address_ip": (endpoint_uuid, RAISE_IF_DIFFERS), + "address_prefix": (ADDRESS_PREFIX, RAISE_IF_DIFFERS), + } + endpoint_config_rules.append( + ( + f"/device[{device_uuid}]/endpoint[{endpoint_uuid}]/settings", + endpoint_config_rule_fields, + ) + ) slice_request.slice_endpoint_ids.extend(list_endpoints) if len(connection_group_ids) != 1: raise Exception("SDPs target-connection-group-id do not match") @@ -82,13 +97,18 @@ class IETFSliceHandler: slice_request.slice_owner.owner_uuid.uuid = str( uuid.uuid5(uuid.NAMESPACE_DNS, owner) ) - raise_if_differs = False - fields = { - name: (value, raise_if_differs) for name, value in request_data.items() + ietf_slice_fields = { + name: (value, RAISE_IF_DIFFERS) for name, value in request_data.items() } update_config_rule_custom( - slice_request.slice_config.config_rules, RESOURCE_KEY, fields + slice_request.slice_config.config_rules, RESOURCE_KEY, ietf_slice_fields ) + + for ep_cr_key, ep_cr_fields in endpoint_config_rules: + update_config_rule_custom( + slice_request.slice_config.config_rules, ep_cr_key, ep_cr_fields + ) + return slice_request @staticmethod @@ -112,8 +132,7 @@ class IETFSliceHandler: slice_service = slice_services[0] slice_sdps = slice_service["sdps"]["sdp"] slice_sdps.append(new_sdp) - raise_if_differs = False - fields = {name: (value, raise_if_differs) for name, value in ietf_data.items()} + fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} update_config_rule_custom( slice_request.slice_config.config_rules, RESOURCE_KEY, fields ) @@ -139,8 +158,7 @@ class IETFSliceHandler: True ) slice_sdps.pop(sdp_idx) - raise_if_differs = False - fields = {name: (value, raise_if_differs) for name, value in ietf_data.items()} + fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} update_config_rule_custom( slice_request.slice_config.config_rules, RESOURCE_KEY, fields ) @@ -167,8 +185,7 @@ class IETFSliceHandler: slice_service = slice_services[0] slice_connection_groups = slice_service["connection-groups"]["connection-group"] slice_connection_groups.append(new_connection_group) - raise_if_differs = False - fields = {name: (value, raise_if_differs) for name, value in ietf_data.items()} + fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} update_config_rule_custom(slice.slice_config.config_rules, RESOURCE_KEY, fields) return slice @@ -195,8 +212,7 @@ class IETFSliceHandler: ) ).index(True) slice_connection_groups.pop(sdp_idx) - raise_if_differs = False - fields = {name: (value, raise_if_differs) for name, value in ietf_data.items()} + fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} update_config_rule_custom( slice_request.slice_config.config_rules, RESOURCE_KEY, fields ) @@ -288,8 +304,7 @@ class IETFSliceHandler: del slice_request.slice_constraints[:] slice_request.slice_constraints.extend(list_constraints) LOGGER.debug(grpc_message_to_json(slice_request)) # TODO remove - raise_if_differs = False - fields = {name: (value, raise_if_differs) for name, value in ietf_data.items()} + fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} update_config_rule_custom( slice_request.slice_config.config_rules, RESOURCE_KEY, fields ) @@ -326,9 +341,7 @@ class IETFSliceHandler: break else: raise Exception("Second SDP not found") - - raise_if_differs = False - fields = {name: (value, raise_if_differs) for name, value in ietf_data.items()} + fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} update_config_rule_custom( slice_request.slice_config.config_rules, RESOURCE_KEY, fields ) diff --git a/src/nbi/tests/data/slice/post_network_slice1.json b/src/nbi/tests/data/slice/post_network_slice1.json index 568387712..67907649e 100644 --- a/src/nbi/tests/data/slice/post_network_slice1.json +++ b/src/nbi/tests/data/slice/post_network_slice1.json @@ -58,7 +58,7 @@ "id": "AC POP to VM1", "description": "AC VM1 connected to POP", "ac-node-id": "172.16.204.220", - "ac-tp-id": "200" + "ac-tp-id": "500" } ] } -- GitLab From c084e0b3f9109889a11fe5cfab27029c7538ca68 Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Tue, 17 Dec 2024 14:30:06 +0000 Subject: [PATCH 081/463] fix: additional missing headers --- .../topology/p4-switch-conf-common.sh | 13 +++++++++++++ .../p4-int-routing-acl/topology/p4-switch-setup.sh | 13 +++++++++++++ .../topology/p4-switch-tear-down.sh | 13 +++++++++++++ .../p4-switch-three-port-chassis-config-phy.pb.txt | 14 ++++++++++++++ .../p4-int-routing-acl/topology/run-stratum.sh | 13 +++++++++++++ 5 files changed, 66 insertions(+) diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-conf-common.sh b/src/tests/p4-int-routing-acl/topology/p4-switch-conf-common.sh index ef81cbd4b..3ba84651e 100644 --- a/src/tests/p4-int-routing-acl/topology/p4-switch-conf-common.sh +++ b/src/tests/p4-int-routing-acl/topology/p4-switch-conf-common.sh @@ -1,4 +1,17 @@ #!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Switch lives in a namespace SWITCH_NS="ns-switch" diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-setup.sh b/src/tests/p4-int-routing-acl/topology/p4-switch-setup.sh index 4d958988a..1a5f37b2f 100644 --- a/src/tests/p4-int-routing-acl/topology/p4-switch-setup.sh +++ b/src/tests/p4-int-routing-acl/topology/p4-switch-setup.sh @@ -1,4 +1,17 @@ #!bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # You must run this script as root if [ "$EUID" -ne 0 ]; then diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-tear-down.sh b/src/tests/p4-int-routing-acl/topology/p4-switch-tear-down.sh index 782b21fd3..9d79343a3 100644 --- a/src/tests/p4-int-routing-acl/topology/p4-switch-tear-down.sh +++ b/src/tests/p4-int-routing-acl/topology/p4-switch-tear-down.sh @@ -1,4 +1,17 @@ #!bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # You must run this script as root if [ "$EUID" -ne 0 ]; then diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-three-port-chassis-config-phy.pb.txt b/src/tests/p4-int-routing-acl/topology/p4-switch-three-port-chassis-config-phy.pb.txt index ff1d3e338..038d36269 100644 --- a/src/tests/p4-int-routing-acl/topology/p4-switch-three-port-chassis-config-phy.pb.txt +++ b/src/tests/p4-int-routing-acl/topology/p4-switch-three-port-chassis-config-phy.pb.txt @@ -1,6 +1,20 @@ # Copyright 2018-present Open Networking Foundation # SPDX-License-Identifier: Apache-2.0 +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + description: "Chassis configuration for a single Stratum bmv2 switch with 3 ports" chassis { platform: PLT_P4_SOFT_SWITCH diff --git a/src/tests/p4-int-routing-acl/topology/run-stratum.sh b/src/tests/p4-int-routing-acl/topology/run-stratum.sh index 89a09e6f0..29e464779 100644 --- a/src/tests/p4-int-routing-acl/topology/run-stratum.sh +++ b/src/tests/p4-int-routing-acl/topology/run-stratum.sh @@ -1,4 +1,17 @@ #!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # You must run this script as root if [ "$EUID" -ne 0 ]; then -- GitLab From 25ae34d26a17c95ee4438449187f0ec17c35ef3b Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 18 Dec 2024 15:25:04 +0000 Subject: [PATCH 082/463] Fixed EuCNC24 test: - Added dump of router running configs --- src/tests/eucnc24/.gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tests/eucnc24/.gitlab-ci.yml b/src/tests/eucnc24/.gitlab-ci.yml index 24fa0a90c..a724010e4 100644 --- a/src/tests/eucnc24/.gitlab-ci.yml +++ b/src/tests/eucnc24/.gitlab-ci.yml @@ -158,6 +158,11 @@ end2end_test eucnc24: --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-tfs-remove.sh + # Dump configuration of the routers + - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + # Run end-to-end test: configure service IETF - > docker run -t --rm --name ${TEST_NAME} --network=host @@ -192,6 +197,11 @@ end2end_test eucnc24: --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-remove.sh + # Dump configuration of the routers + - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + # Run end-to-end test: cleanup scenario - > docker run -t --rm --name ${TEST_NAME} --network=host -- GitLab From 11b4748c60ca1dd0526ab31857ac6d4b05e9d0d6 Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Thu, 19 Dec 2024 11:57:22 +0100 Subject: [PATCH 083/463] Second Draft --- proto/ztp_server.proto | 24 +++++++++++++-- src/ztp_server/client/ZtpClient.py | 4 +-- src/ztp_server/service/ZtpServerService.py | 2 +- .../service/ZtpServerServiceServicerImpl.py | 29 ++++++++++++++----- src/ztp_server/service/__main__.py | 1 + 5 files changed, 46 insertions(+), 14 deletions(-) diff --git a/proto/ztp_server.proto b/proto/ztp_server.proto index 37ccc71d3..6c575df11 100755 --- a/proto/ztp_server.proto +++ b/proto/ztp_server.proto @@ -15,9 +15,27 @@ syntax = "proto3"; package ztpServer; -import "context.proto"; +//import "context.proto"; service ZtpServerService { - rpc GetProvisioningScript (context.ProvisioningScriptName ) returns (context.ProvisioningScript ) {} - rpc GetZtpProvisioning (context.ZtpFileName ) returns (context.ZtpFile ) {} + rpc GetProvisioningScript (ProvisioningScriptName ) returns (ProvisioningScript ) {} + rpc GetZtpProvisioning (ZtpFileName ) returns (ZtpFile ) {} +} + + +// Define the request message for both methods +message ProvisioningScriptName { + string input = 1; +} + +message ZtpFileName { + string input = 1; +} + +message ProvisioningScript { + string script = 1; +} + +message ZtpFile { + string json = 1; } diff --git a/src/ztp_server/client/ZtpClient.py b/src/ztp_server/client/ZtpClient.py index a790b76e2..5e5737857 100755 --- a/src/ztp_server/client/ZtpClient.py +++ b/src/ztp_server/client/ZtpClient.py @@ -15,7 +15,7 @@ import grpc, logging from common.Constants import ServiceNameEnum from common.Settings import get_service_host, get_service_port_grpc -from common.proto.ztpServer_pb2_grpc import ztpServerServiceStub #TODO +from common.proto.ztp_server_pb2_grpc import ztpServerServiceStub from common.proto.context_pb2 import ( ZtpFileName, ZtpFile, ProvisioningScriptName, ProvisioningScript) from common.tools.client.RetryDecorator import retry, delay_exponential @@ -39,7 +39,7 @@ class ZtpClient: def connect(self): self.channel = grpc.insecure_channel(self.endpoint) - self.stub = ztpServerServiceStub(self.channel) #TODO + self.stub = ztpServerServiceStub(self.channel) def close(self): if self.channel is not None: self.channel.close() diff --git a/src/ztp_server/service/ZtpServerService.py b/src/ztp_server/service/ZtpServerService.py index 2b4da4f93..aba4aee94 100755 --- a/src/ztp_server/service/ZtpServerService.py +++ b/src/ztp_server/service/ZtpServerService.py @@ -14,7 +14,7 @@ from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc -from common.proto.ztpServer_pb2_grpc import add_Ztp_ServerServiceServicer_to_server +from common.proto.ztp_server_pb2_grpc import add_Ztp_ServerServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from ztp_server.service.ZtpServerServiceServicerImpl import ZtpServerServiceServicerImpl diff --git a/src/ztp_server/service/ZtpServerServiceServicerImpl.py b/src/ztp_server/service/ZtpServerServiceServicerImpl.py index 009cda922..015f958f4 100755 --- a/src/ztp_server/service/ZtpServerServiceServicerImpl.py +++ b/src/ztp_server/service/ZtpServerServiceServicerImpl.py @@ -12,11 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import grpc, logging +import grpc, logging, json from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.proto.context_pb2 import ( ZtpFileName, ZtpFile, ProvisioningScriptName, ProvisioningScript) -from common.proto.ztpServer_pb2_grpc import ztpServerServiceServicer +from common.proto.ztp_server_pb2_grpc import ztpServerServiceServicer LOGGER = logging.getLogger(__name__) @@ -29,12 +29,25 @@ class ZtpServerServiceServicerImpl(ztpServerServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetZtpProvisioning(self, request : ProvisioningScriptName, context : grpc.ServicerContext) -> ProvisioningScript: - LOGGER.warning('NOT IMPLEMENTED') - return ProvisioningScript() + try: + filePath = '../data/' + ProvisioningScriptName + with open(filePath, 'r') as provisioning_file: + provisioning_content = provisioning_file.read() + return ztpServerServiceServicer.ProvisioningScript(script=provisioning_content) + except FileNotFoundError: + context.set_code(grpc.StatusCode.NOT_FOUND) + context.set_details('File not found') + return ztpServerServiceServicer.ProvisioningScript() + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetZtpProvisioning(self, request : ZtpFileName, context : grpc.ServicerContext) -> ZtpFile: - LOGGER.warning('NOT IMPLEMENTED') - return ZtpFile() - - + try: + filePath = '../data/' + ZtpFileName + with open(filePath, 'r') as json_file: + json_content = json_file.read() + return ztpServerServiceServicer.ZtpFile(json=json_content) + except FileNotFoundError: + context.set_code(grpc.StatusCode.NOT_FOUND) + context.set_details('File not found') + return ztpServerServiceServicer.ZtpFile(json=json_content) \ No newline at end of file diff --git a/src/ztp_server/service/__main__.py b/src/ztp_server/service/__main__.py index 25e8605d3..55bd5f187 100755 --- a/src/ztp_server/service/__main__.py +++ b/src/ztp_server/service/__main__.py @@ -21,6 +21,7 @@ from common.Settings import ( ) from .ZtpServerService import ZtpServerService from .rest_server.RestServer import RestServer +from .rest_server.ztpServer_plugins.tfs_api import register_tfs_api from .context_subscription import register_context_subscription -- GitLab From b465479a4deb3bf61ec60b7d2c180b5c3db58226 Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 20 Dec 2024 13:35:43 +0100 Subject: [PATCH 084/463] ietf slice data test changed to match the ofc25 demo --- .../tests/data/slice/post_network_slice1.json | 36 +++++++++---------- src/nbi/tests/test_slice_2.py | 2 +- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/nbi/tests/data/slice/post_network_slice1.json b/src/nbi/tests/data/slice/post_network_slice1.json index 67907649e..68ab28385 100644 --- a/src/nbi/tests/data/slice/post_network_slice1.json +++ b/src/nbi/tests/data/slice/post_network_slice1.json @@ -58,16 +58,16 @@ "id": "AC POP to VM1", "description": "AC VM1 connected to POP", "ac-node-id": "172.16.204.220", - "ac-tp-id": "500" + "ac-tp-id": "200" } ] } }, { "id": "2", - "node-id": "172.16.104.221", + "node-id": "172.16.61.10", "sdp-ip-address": [ - "172.16.104.221" + "172.16.61.10" ], "service-match-criteria": { "match-criterion": [ @@ -77,29 +77,29 @@ { "type": "ietf-network-slice-service:vlan", "value": [ - "101" + "21" ] }, { - "type": "ietf-network-slice-service:destination-ip-prefix", + "type": "ietf-network-slice-service:source-ip-prefix", "value": [ "172.16.104.221/24" ] }, { - "type": "ietf-network-slice-service:destination-tcp-port", + "type": "ietf-network-slice-service:source-tcp-port", "value": [ "10500" ] }, { - "type": "ietf-network-slice-service:source-ip-prefix", + "type": "ietf-network-slice-service:destination-ip-prefix", "value": [ "172.1.101.22/24" ] }, { - "type": "ietf-network-slice-service:source-tcp-port", + "type": "ietf-network-slice-service:destination-tcp-port", "value": [ "10200" ] @@ -112,10 +112,10 @@ "attachment-circuits": { "attachment-circuit": [ { - "id": "AC POP to VM1", - "description": "AC VM1 connected to POP", - "ac-node-id": "172.16.104.221", - "ac-tp-id": "eth0" + "id": "AC ONT", + "description": "AC connected to PC1", + "ac-node-id": "172.16.61.10", + "ac-tp-id": "200" } ] } @@ -130,10 +130,8 @@ "connectivity-construct": [ { "id": 1, - "p2mp-sender-sdp": "1", - "p2mp-receiver-sdp": [ - "2" - ], + "p2p-sender-sdp": "1", + "p2p-receiver-sdp": "2", "service-slo-sle-policy": { "slo-policy": { "metric-bound": [ @@ -158,10 +156,8 @@ }, { "id": 2, - "p2mp-sender-sdp": "2", - "p2mp-receiver-sdp": [ - "1" - ], + "p2p-sender-sdp": "2", + "p2p-receiver-sdp": "1", "service-slo-sle-policy": { "slo-policy": { "metric-bound": [ diff --git a/src/nbi/tests/test_slice_2.py b/src/nbi/tests/test_slice_2.py index 6466512e7..cfd98852f 100644 --- a/src/nbi/tests/test_slice_2.py +++ b/src/nbi/tests/test_slice_2.py @@ -54,7 +54,7 @@ def test_create_slice(): ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) assert ietf_data == post_slice_request assert slice_1.slice_endpoint_ids[0].device_id.device_uuid.uuid == "172.16.204.220" - assert slice_1.slice_endpoint_ids[1].device_id.device_uuid.uuid == "172.16.104.221" + assert slice_1.slice_endpoint_ids[1].device_id.device_uuid.uuid == "172.16.61.10" assert slice_1.slice_id.slice_uuid.uuid == "slice1" -- GitLab From 3cd5d40a51a5cca81599ee21d374bdb04b415608 Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 20 Dec 2024 13:39:50 +0100 Subject: [PATCH 085/463] feat: - IETF data added to l3nm default config rules in the frontend pathcomp - controller device type added to the devices that are managed by a controller in get_devices_from_connection function --- .../service/algorithms/tools/ComposeConfigRules.py | 2 ++ src/service/service/task_scheduler/TaskExecutor.py | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py b/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py index f0775371d..ca0b5b480 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py @@ -22,6 +22,7 @@ LOGGER = logging.getLogger(__name__) SETTINGS_RULE_NAME = '/settings' STATIC_ROUTING_RULE_NAME = '/static_routing' +IETF_DATA = 'ietf_data' RE_UUID = re.compile(r'([0-9a-fA-F]{8})\-([0-9a-fA-F]{4})\-([0-9a-fA-F]{4})\-([0-9a-fA-F]{4})\-([0-9a-fA-F]{12})') @@ -93,6 +94,7 @@ def compose_l3nm_config_rules(main_service_config_rules : List, subservice_confi CONFIG_RULES = [ (SETTINGS_RULE_NAME, L3NM_SETTINGS_FIELD_DEFAULTS), (STATIC_ROUTING_RULE_NAME, {}), + (IETF_DATA, {}), ] for rule_name, defaults in CONFIG_RULES: compose_config_rules(main_service_config_rules, subservice_config_rules, rule_name, defaults) diff --git a/src/service/service/task_scheduler/TaskExecutor.py b/src/service/service/task_scheduler/TaskExecutor.py index 6fb1eca34..51fc42a5a 100644 --- a/src/service/service/task_scheduler/TaskExecutor.py +++ b/src/service/service/task_scheduler/TaskExecutor.py @@ -287,8 +287,12 @@ class TaskExecutor: devices.setdefault(device_type, dict())[device_uuid] = device else: if not exclude_managed_by_controller: - device_type = DeviceTypeEnum._value2member_map_[device.device_type] - devices.setdefault(device_type, dict())[device_uuid] = device + controller_device_type_enum = DeviceTypeEnum._value2member_map_[controller.device_type] + if controller_device_type_enum == DeviceTypeEnum.IETF_SLICE: + devices.setdefault(controller_device_type_enum, dict())[device_uuid] = device + else: + device_type = DeviceTypeEnum._value2member_map_[device.device_type] + devices.setdefault(device_type, dict())[device_uuid] = device device_type = DeviceTypeEnum._value2member_map_[controller.device_type] devices.setdefault(device_type, dict())[controller.device_id.device_uuid.uuid] = controller return devices @@ -321,7 +325,7 @@ class TaskExecutor: self, connection : Connection, service : Service, **service_handler_settings ) -> Dict[DeviceTypeEnum, Tuple['_ServiceHandler', Dict[str, Device]]]: connection_device_types : Dict[DeviceTypeEnum, Dict[str, Device]] = self.get_devices_from_connection( - connection, exclude_managed_by_controller=True + connection, exclude_managed_by_controller=False ) service_handlers : Dict[DeviceTypeEnum, Tuple['_ServiceHandler', Dict[str, Device]]] = dict() for device_type, connection_devices in connection_device_types.items(): -- GitLab From 3c9e9f229bfebfa84b3effae8304e45477d5a294 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 23 Dec 2024 17:02:28 +0000 Subject: [PATCH 086/463] Fixed EuCNC24 test: - Added additional dumps of router running configs --- src/tests/eucnc24/.gitlab-ci.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/tests/eucnc24/.gitlab-ci.yml b/src/tests/eucnc24/.gitlab-ci.yml index a724010e4..02c4cced3 100644 --- a/src/tests/eucnc24/.gitlab-ci.yml +++ b/src/tests/eucnc24/.gitlab-ci.yml @@ -70,6 +70,11 @@ end2end_test eucnc24: - sleep 3 - docker ps -a + # Dump configuration of the routers (before any configuration) + - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + # Configure TeraFlowSDN deployment # Uncomment if DEBUG log level is needed for the components #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml @@ -126,7 +131,7 @@ end2end_test eucnc24: --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-tfs-create.sh - # Dump configuration of the routers + # Dump configuration of the routers (after configure TFS service) - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" @@ -158,7 +163,7 @@ end2end_test eucnc24: --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-tfs-remove.sh - # Dump configuration of the routers + # Dump configuration of the routers (after deconfigure TFS service) - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" @@ -170,6 +175,11 @@ end2end_test eucnc24: --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-create.sh + # Dump configuration of the routers (after configure IETF service) + - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + # Run end-to-end test: test connectivity with ping - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.10' --format json) - echo $TEST1_10 @@ -197,7 +207,7 @@ end2end_test eucnc24: --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-remove.sh - # Dump configuration of the routers + # Dump configuration of the routers (after deconfigure IETF service) - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" @@ -210,6 +220,11 @@ end2end_test eucnc24: $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-cleanup.sh after_script: + # Dump configuration of the routers (on after_script) + - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + # Dump TeraFlowSDN component logs - source src/tests/${TEST_NAME}/deploy_specs.sh - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server -- GitLab From caaa929e14907917e294d074a7b7dfffea1d47fb Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 23 Dec 2024 17:40:42 +0000 Subject: [PATCH 087/463] Manifests: - Disabled DEBUG on Device component --- manifests/deviceservice.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/deviceservice.yaml b/manifests/deviceservice.yaml index ef5195eae..950b98442 100644 --- a/manifests/deviceservice.yaml +++ b/manifests/deviceservice.yaml @@ -39,7 +39,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "DEBUG" + value: "INFO" startupProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:2020"] -- GitLab From 49eafdbd4c04b9ba29c9aed43f864404953304d3 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 23 Dec 2024 17:44:52 +0000 Subject: [PATCH 088/463] Fixed EuCNC24 test: - Updated version of Arista cEOS to 4.31.5M --- src/tests/eucnc24/clab/eucnc24.clab.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/tests/eucnc24/clab/eucnc24.clab.yml b/src/tests/eucnc24/clab/eucnc24.clab.yml index 19511c7f2..83a2812b5 100644 --- a/src/tests/eucnc24/clab/eucnc24.clab.yml +++ b/src/tests/eucnc24/clab/eucnc24.clab.yml @@ -26,10 +26,17 @@ topology: kind: arista_ceos #image: ceos:4.30.4M #image: ceos:4.31.2F - #image: ceos:4.31.5M + image: ceos:4.31.5M #image: ceos:4.32.0F - image: ceos:4.32.2F + + # Not working; after deleting TFS service, create IETF service reports + # "failed to apply: one and only one primary IPv4 address can be specified" + # However, there is no previous IP address in the interface, so it makes + # no sense. Issue with Arista cEOS. + #image: ceos:4.32.2F + #image: ceos:4.32.2.1F + #image: ceos:4.33.1F linux: kind: linux image: ghcr.io/hellt/network-multitool:latest -- GitLab From 26e530515415b0135fb8165b3dd5cc97eafef889 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 23 Dec 2024 18:19:14 +0000 Subject: [PATCH 089/463] Device - gNMI OpenConfig Driver: - Added logic to free libyang objects on Interface handler --- .../gnmi_openconfig/handlers/Interface.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index a52c84691..6b91b1b06 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json, libyang, logging +import json, libyang, logging, queue from typing import Any, Dict, List, Tuple from ._Handler import _Handler from .Tools import get_bool, get_int, get_str @@ -43,30 +43,40 @@ class InterfaceHandler(_Handler): address_prefix = get_int (resource_value, 'address_prefix') # 24 mtu = get_int (resource_value, 'mtu' ) # 1500 + objects_to_free = queue.LifoQueue[libyang.DContainer]() + yang_ifs : libyang.DContainer = yang_handler.get_data_path('/openconfig-interfaces:interfaces') + objects_to_free.put_nowait(yang_ifs) yang_if_path = 'interface[name="{:s}"]'.format(if_name) yang_if : libyang.DContainer = yang_ifs.create_path(yang_if_path) + objects_to_free.put_nowait(yang_if) yang_if.create_path('config/name', if_name ) if enabled is not None: yang_if.create_path('config/enabled', enabled) if mtu is not None: yang_if.create_path('config/mtu', mtu) yang_sifs : libyang.DContainer = yang_if.create_path('subinterfaces') + objects_to_free.put_nowait(yang_sifs) yang_sif_path = 'subinterface[index="{:d}"]'.format(sif_index) yang_sif : libyang.DContainer = yang_sifs.create_path(yang_sif_path) + objects_to_free.put_nowait(yang_sif) yang_sif.create_path('config/index', sif_index) if enabled is not None: yang_sif.create_path('config/enabled', enabled) if vlan_id is not None: yang_subif_vlan : libyang.DContainer = yang_sif.create_path('openconfig-vlan:vlan') + objects_to_free.put_nowait(yang_subif_vlan) yang_subif_vlan.create_path('match/single-tagged/config/vlan-id', vlan_id) yang_ipv4 : libyang.DContainer = yang_sif.create_path('openconfig-if-ip:ipv4') + objects_to_free.put_nowait(yang_ipv4) if enabled is not None: yang_ipv4.create_path('config/enabled', enabled) if address_ip is not None and address_prefix is not None: yang_ipv4_addrs : libyang.DContainer = yang_ipv4.create_path('addresses') + objects_to_free.put_nowait(yang_ipv4_addrs) yang_ipv4_addr_path = 'address[ip="{:s}"]'.format(address_ip) yang_ipv4_addr : libyang.DContainer = yang_ipv4_addrs.create_path(yang_ipv4_addr_path) + objects_to_free.put_nowait(yang_ipv4_addr) yang_ipv4_addr.create_path('config/ip', address_ip) yang_ipv4_addr.create_path('config/prefix-length', address_prefix) @@ -75,6 +85,10 @@ class InterfaceHandler(_Handler): json_data = json.loads(str_data) json_data = json_data['openconfig-interfaces:interface'][0] str_data = json.dumps(json_data) + + while not objects_to_free.empty(): + obj = objects_to_free.get() + obj.free() return str_path, str_data def parse( -- GitLab From 1dbc6bdb7437cb4dd4e4c2bbe0d28aaf76b69fa5 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 07:28:58 +0000 Subject: [PATCH 090/463] Device - gNMI OpenConfig Driver: - Added debug log messages --- .../service/drivers/gnmi_openconfig/handlers/Interface.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index 6b91b1b06..d663e1a84 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -86,9 +86,15 @@ class InterfaceHandler(_Handler): json_data = json_data['openconfig-interfaces:interface'][0] str_data = json.dumps(json_data) + LOGGER.warning('Releasing...') while not objects_to_free.empty(): + LOGGER.warning('Getting...') obj = objects_to_free.get() + LOGGER.warning('Releasing: {:s} => {:s}'.format( + str(obj.path()), str(obj.print_mem('json')) + )) obj.free() + LOGGER.warning('Release done') return str_path, str_data def parse( -- GitLab From 60f204e4c5c2d161d584a6674fc993b0eaca0c96 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 07:37:24 +0000 Subject: [PATCH 091/463] Device - gNMI OpenConfig Driver: - Refining code --- .../drivers/gnmi_openconfig/handlers/Interface.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index d663e1a84..c545acb0d 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -89,11 +89,15 @@ class InterfaceHandler(_Handler): LOGGER.warning('Releasing...') while not objects_to_free.empty(): LOGGER.warning('Getting...') - obj = objects_to_free.get() - LOGGER.warning('Releasing: {:s} => {:s}'.format( - str(obj.path()), str(obj.print_mem('json')) - )) - obj.free() + try: + obj = objects_to_free.get_nowait() + LOGGER.warning('Releasing: {:s} => {:s}'.format( + str(obj.path()), str(obj.print_mem('json')) + )) + obj.free() + except queue.Empty: + LOGGER.warning('No more objects...') + continue LOGGER.warning('Release done') return str_path, str_data -- GitLab From 750786259be524086aaaf092a4876cfbfd4dc068 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 07:46:02 +0000 Subject: [PATCH 092/463] Device - gNMI OpenConfig Driver: - Refining code --- .../drivers/gnmi_openconfig/handlers/Interface.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index c545acb0d..cb913d907 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -86,19 +86,30 @@ class InterfaceHandler(_Handler): json_data = json_data['openconfig-interfaces:interface'][0] str_data = json.dumps(json_data) + is_error = False LOGGER.warning('Releasing...') while not objects_to_free.empty(): LOGGER.warning('Getting...') try: obj = objects_to_free.get_nowait() + LOGGER.warning('Releasing: {:s}'.format(str(obj))) + if obj is None: continue LOGGER.warning('Releasing: {:s} => {:s}'.format( str(obj.path()), str(obj.print_mem('json')) )) - obj.free() + try: + LOGGER.warning('Freeing...') + obj.free() + LOGGER.warning('Free done') + except: + LOGGER.exception('Something went wrong...') + is_error = True + break except queue.Empty: LOGGER.warning('No more objects...') continue - LOGGER.warning('Release done') + if not is_error: + LOGGER.warning('Release done') return str_path, str_data def parse( -- GitLab From 56449dc03795002b588feb7f0a99ba5e42f1ad09 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 08:53:44 +0000 Subject: [PATCH 093/463] Device - gNMI OpenConfig Driver: - Refining code --- .../gnmi_openconfig/handlers/Interface.py | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index cb913d907..c471faf2e 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -92,12 +92,34 @@ class InterfaceHandler(_Handler): LOGGER.warning('Getting...') try: obj = objects_to_free.get_nowait() - LOGGER.warning('Releasing: {:s}'.format(str(obj))) - if obj is None: continue - LOGGER.warning('Releasing: {:s} => {:s}'.format( - str(obj.path()), str(obj.print_mem('json')) - )) + if obj is None: + LOGGER.warning('Item is None') + continue + + try: + type_obj = type(obj) + LOGGER.warning('Releasing[type]: {:s}'.format(str(type_obj))) + except: + LOGGER.exception('Releasing[type]: ') + + try: + str_obj = str(obj) + if str_obj is not None: + LOGGER.warning('Releasing[str]: {:s}'.format(str_obj)) + except: + LOGGER.exception('Releasing[str]: ') + + try: + repr_obj = repr(obj) + if repr_obj is not None: + LOGGER.warning('Releasing[repr]: {:s}'.format(str(repr_obj))) + except: + LOGGER.exception('Releasing[repr]: ') + try: + LOGGER.warning('Releasing: {:s} => {:s}'.format( + str(obj.path()), str(obj.print_mem('json')) + )) LOGGER.warning('Freeing...') obj.free() LOGGER.warning('Free done') -- GitLab From 87e715aaf35b2f9ab82826985998e5e26cb94950 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 10:01:48 +0000 Subject: [PATCH 094/463] Device - gNMI OpenConfig Driver: - Refining code --- .../gnmi_openconfig/GnmiSessionHandler.py | 1 - .../gnmi_openconfig/handlers/Interface.py | 56 +++++++------------ 2 files changed, 21 insertions(+), 36 deletions(-) diff --git a/src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py b/src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py index 00409dfbd..03a55f472 100644 --- a/src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py +++ b/src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py @@ -40,7 +40,6 @@ class GnmiSessionHandler: self._use_tls = settings.get('use_tls', False) self._channel : Optional[grpc.Channel] = None self._stub : Optional[gNMIStub] = None - self._yang_handler = None self._monit_thread = None self._yang_handler = YangHandler() self._subscriptions = Subscriptions() diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index c471faf2e..8521098a3 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -80,14 +80,19 @@ class InterfaceHandler(_Handler): yang_ipv4_addr.create_path('config/ip', address_ip) yang_ipv4_addr.create_path('config/prefix-length', address_prefix) + LOGGER.info('YangHandler Data:') + for path, dnode in yang_handler.get_data_paths().items(): + LOGGER.debug('|-> {:s}: {:s}'.format(str(path), json.dumps(dnode.print_dict()))) + str_path = '/interfaces/interface[name={:s}]'.format(if_name) str_data = yang_if.print_mem('json') json_data = json.loads(str_data) json_data = json_data['openconfig-interfaces:interface'][0] str_data = json.dumps(json_data) - is_error = False - LOGGER.warning('Releasing...') + # List elements to release: + LOGGER.warning('Objects to release:') + #LOGGER.warning('Releasing...') while not objects_to_free.empty(): LOGGER.warning('Getting...') try: @@ -96,42 +101,23 @@ class InterfaceHandler(_Handler): LOGGER.warning('Item is None') continue - try: - type_obj = type(obj) - LOGGER.warning('Releasing[type]: {:s}'.format(str(type_obj))) - except: - LOGGER.exception('Releasing[type]: ') - - try: - str_obj = str(obj) - if str_obj is not None: - LOGGER.warning('Releasing[str]: {:s}'.format(str_obj)) - except: - LOGGER.exception('Releasing[str]: ') - - try: - repr_obj = repr(obj) - if repr_obj is not None: - LOGGER.warning('Releasing[repr]: {:s}'.format(str(repr_obj))) - except: - LOGGER.exception('Releasing[repr]: ') - - try: - LOGGER.warning('Releasing: {:s} => {:s}'.format( - str(obj.path()), str(obj.print_mem('json')) - )) - LOGGER.warning('Freeing...') - obj.free() - LOGGER.warning('Free done') - except: - LOGGER.exception('Something went wrong...') - is_error = True - break + LOGGER.warning('Releasing[type]: {:s}'.format(str(type(obj)))) + LOGGER.warning('Releasing: {:s} => {:s}'.format( + str(obj.path()), str(obj.print_mem('json')) + )) + + #try: + # LOGGER.warning('Freeing...') + # obj.free() + # LOGGER.warning('Free done') + #except: + # LOGGER.exception('Something went wrong...') + # is_error = True + # break except queue.Empty: LOGGER.warning('No more objects...') continue - if not is_error: - LOGGER.warning('Release done') + #LOGGER.warning('Release done') return str_path, str_data def parse( -- GitLab From eda84a163c9e5a51f3dba4f3e8d83c107defed18 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 12:39:00 +0000 Subject: [PATCH 095/463] Device - gNMI OpenConfig Driver: - Corrected cleanup of interfaces in internal libyang yang validator data model - Add libyang examples - Updated libyang python bindings to 2.8.4 --- src/device/requirements.in | 2 +- .../examples/libyang_examples.py | 162 ++++++++++++++++++ .../gnmi_openconfig/handlers/Interface.py | 58 ++----- 3 files changed, 181 insertions(+), 41 deletions(-) create mode 100644 src/device/service/drivers/gnmi_openconfig/examples/libyang_examples.py diff --git a/src/device/requirements.in b/src/device/requirements.in index e5ac64a64..ca2cdea47 100644 --- a/src/device/requirements.in +++ b/src/device/requirements.in @@ -24,7 +24,7 @@ Flask-HTTPAuth==4.5.0 Flask-RESTful==0.3.9 ipaddress Jinja2==3.0.3 -libyang==2.8.0 +libyang==2.8.4 macaddress ncclient==0.6.15 numpy<2.0.0 diff --git a/src/device/service/drivers/gnmi_openconfig/examples/libyang_examples.py b/src/device/service/drivers/gnmi_openconfig/examples/libyang_examples.py new file mode 100644 index 000000000..f16be652b --- /dev/null +++ b/src/device/service/drivers/gnmi_openconfig/examples/libyang_examples.py @@ -0,0 +1,162 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, libyang, logging, os +from typing import Dict + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) + +YANG_BASE_PATH = '/home/tfs/tfs-ctrl/src/device/service/drivers/gnmi_openconfig/git/openconfig/public' +YANG_SEARCH_PATHS = ':'.join([ + os.path.join(YANG_BASE_PATH, 'release'), + os.path.join(YANG_BASE_PATH, 'third_party'), +]) + +YANG_MODULES = [ + 'iana-if-type', + 'openconfig-bgp-types', + 'openconfig-vlan-types', + + 'openconfig-interfaces', + 'openconfig-if-8021x', + 'openconfig-if-aggregate', + 'openconfig-if-ethernet-ext', + 'openconfig-if-ethernet', + 'openconfig-if-ip-ext', + 'openconfig-if-ip', + 'openconfig-if-poe', + 'openconfig-if-sdn-ext', + 'openconfig-if-tunnel', + + 'openconfig-vlan', + + 'openconfig-types', + 'openconfig-policy-types', + 'openconfig-mpls-types', + 'openconfig-network-instance-types', + 'openconfig-network-instance', + + 'openconfig-platform', + 'openconfig-platform-controller-card', + 'openconfig-platform-cpu', + 'openconfig-platform-ext', + 'openconfig-platform-fabric', + 'openconfig-platform-fan', + 'openconfig-platform-integrated-circuit', + 'openconfig-platform-linecard', + 'openconfig-platform-pipeline-counters', + 'openconfig-platform-port', + 'openconfig-platform-psu', + 'openconfig-platform-software', + 'openconfig-platform-transceiver', + 'openconfig-platform-types', +] + +class YangHandler: + def __init__(self) -> None: + self._yang_context = libyang.Context(YANG_SEARCH_PATHS) + self._loaded_modules = set() + for yang_module_name in YANG_MODULES: + LOGGER.info('Loading module: {:s}'.format(str(yang_module_name))) + self._yang_context.load_module(yang_module_name).feature_enable_all() + self._loaded_modules.add(yang_module_name) + self._data_path_instances = dict() + + def get_data_paths(self) -> Dict[str, libyang.DNode]: + return self._data_path_instances + + def get_data_path(self, path : str) -> libyang.DNode: + data_path_instance = self._data_path_instances.get(path) + if data_path_instance is None: + data_path_instance = self._yang_context.create_data_path(path) + self._data_path_instances[path] = data_path_instance + return data_path_instance + + def destroy(self) -> None: + self._yang_context.destroy() + +def main(): + yang_handler = YangHandler() + + LOGGER.info('YangHandler Data (before):') + for path, dnode in yang_handler.get_data_paths().items(): + LOGGER.info('|-> {:s}: {:s}'.format(str(path), json.dumps(dnode.print_dict()))) + + if_name = 'eth1' + sif_index = 0 + enabled = True + address_ip = '172.16.0.1' + address_ip2 = '192.168.0.1' + address_prefix = 24 + mtu = 1500 + + yang_ifs : libyang.DContainer = yang_handler.get_data_path('/openconfig-interfaces:interfaces') + yang_if_path = 'interface[name="{:s}"]'.format(if_name) + yang_if : libyang.DContainer = yang_ifs.create_path(yang_if_path) + yang_if.create_path('config/name', if_name) + yang_if.create_path('config/enabled', enabled) + yang_if.create_path('config/mtu', mtu ) + + yang_sifs : libyang.DContainer = yang_if.create_path('subinterfaces') + yang_sif_path = 'subinterface[index="{:d}"]'.format(sif_index) + yang_sif : libyang.DContainer = yang_sifs.create_path(yang_sif_path) + yang_sif.create_path('config/index', sif_index) + yang_sif.create_path('config/enabled', enabled ) + + yang_ipv4 : libyang.DContainer = yang_sif.create_path('openconfig-if-ip:ipv4') + yang_ipv4.create_path('config/enabled', enabled) + + yang_ipv4_addrs : libyang.DContainer = yang_ipv4.create_path('addresses') + yang_ipv4_addr_path = 'address[ip="{:s}"]'.format(address_ip) + yang_ipv4_addr : libyang.DContainer = yang_ipv4_addrs.create_path(yang_ipv4_addr_path) + yang_ipv4_addr.create_path('config/ip', address_ip ) + yang_ipv4_addr.create_path('config/prefix-length', address_prefix) + + yang_ipv4_addr_path2 = 'address[ip="{:s}"]'.format(address_ip2) + yang_ipv4_addr2 : libyang.DContainer = yang_ipv4_addrs.create_path(yang_ipv4_addr_path2) + yang_ipv4_addr2.create_path('config/ip', address_ip2 ) + yang_ipv4_addr2.create_path('config/prefix-length', address_prefix) + + str_data = yang_if.print_mem('json') + json_data = json.loads(str_data) + json_data = json_data['openconfig-interfaces:interface'][0] + str_data = json.dumps(json_data, indent=4) + LOGGER.info('Resulting Request (before unlink): {:s}'.format(str_data)) + + yang_ipv4_addr2.unlink() + + root_node : libyang.DContainer = yang_handler.get_data_path('/openconfig-interfaces:interfaces') + LOGGER.info('root_node={:s}'.format(str(root_node.print_mem('json')))) + + for s in root_node.siblings(): + LOGGER.info('sibling: {:s}'.format(str(s))) + + PATH_TMPL = '/openconfig-interfaces:interfaces/interface[name="{:s}"]/subinterfaces/subinterface[index="{:d}"]' + yang_sif = root_node.find_path(PATH_TMPL.format(if_name, sif_index)) + if yang_sif is not None: + LOGGER.info('yang_sif={:s}'.format(str(yang_sif.print_mem('json')))) + yang_sif.unlink() + yang_sif.free() + + str_data = yang_if.print_mem('json') + json_data = json.loads(str_data) + json_data = json_data['openconfig-interfaces:interface'][0] + str_data = json.dumps(json_data, indent=4) + LOGGER.info('Resulting Request (after unlink): {:s}'.format(str_data)) + + yang_handler.destroy() + +if __name__ == '__main__': + main() diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index 8521098a3..42ef07f3c 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json, libyang, logging, queue +import json, libyang, logging from typing import Any, Dict, List, Tuple from ._Handler import _Handler from .Tools import get_bool, get_int, get_str @@ -34,6 +34,22 @@ class InterfaceHandler(_Handler): PATH_TMPL = '/interfaces/interface[name={:s}]/subinterfaces/subinterface[index={:d}]' str_path = PATH_TMPL.format(if_name, sif_index) str_data = json.dumps({}) + + root_node : libyang.DContainer = yang_handler.get_data_path( + '/openconfig-interfaces:interfaces' + ) + yang_sif = root_node.find_path('/'.join([ + '', # add slash at the beginning + 'openconfig-interfaces:interfaces', + 'interface[name="{:s}"]'.format(if_name), + 'subinterfaces', + 'subinterface[index="{:d}"]'.format(sif_index), + ])) + if yang_sif is not None: + LOGGER.info('Deleting: {:s}'.format(str(yang_sif.print_mem('json')))) + yang_sif.unlink() + yang_sif.free() + return str_path, str_data enabled = get_bool(resource_value, 'enabled', True) # True/False @@ -43,81 +59,43 @@ class InterfaceHandler(_Handler): address_prefix = get_int (resource_value, 'address_prefix') # 24 mtu = get_int (resource_value, 'mtu' ) # 1500 - objects_to_free = queue.LifoQueue[libyang.DContainer]() yang_ifs : libyang.DContainer = yang_handler.get_data_path('/openconfig-interfaces:interfaces') - objects_to_free.put_nowait(yang_ifs) yang_if_path = 'interface[name="{:s}"]'.format(if_name) yang_if : libyang.DContainer = yang_ifs.create_path(yang_if_path) - objects_to_free.put_nowait(yang_if) yang_if.create_path('config/name', if_name ) if enabled is not None: yang_if.create_path('config/enabled', enabled) if mtu is not None: yang_if.create_path('config/mtu', mtu) yang_sifs : libyang.DContainer = yang_if.create_path('subinterfaces') - objects_to_free.put_nowait(yang_sifs) yang_sif_path = 'subinterface[index="{:d}"]'.format(sif_index) yang_sif : libyang.DContainer = yang_sifs.create_path(yang_sif_path) - objects_to_free.put_nowait(yang_sif) yang_sif.create_path('config/index', sif_index) if enabled is not None: yang_sif.create_path('config/enabled', enabled) if vlan_id is not None: yang_subif_vlan : libyang.DContainer = yang_sif.create_path('openconfig-vlan:vlan') - objects_to_free.put_nowait(yang_subif_vlan) yang_subif_vlan.create_path('match/single-tagged/config/vlan-id', vlan_id) yang_ipv4 : libyang.DContainer = yang_sif.create_path('openconfig-if-ip:ipv4') - objects_to_free.put_nowait(yang_ipv4) if enabled is not None: yang_ipv4.create_path('config/enabled', enabled) if address_ip is not None and address_prefix is not None: yang_ipv4_addrs : libyang.DContainer = yang_ipv4.create_path('addresses') - objects_to_free.put_nowait(yang_ipv4_addrs) yang_ipv4_addr_path = 'address[ip="{:s}"]'.format(address_ip) yang_ipv4_addr : libyang.DContainer = yang_ipv4_addrs.create_path(yang_ipv4_addr_path) - objects_to_free.put_nowait(yang_ipv4_addr) yang_ipv4_addr.create_path('config/ip', address_ip) yang_ipv4_addr.create_path('config/prefix-length', address_prefix) LOGGER.info('YangHandler Data:') for path, dnode in yang_handler.get_data_paths().items(): - LOGGER.debug('|-> {:s}: {:s}'.format(str(path), json.dumps(dnode.print_dict()))) + LOGGER.info('|-> {:s}: {:s}'.format(str(path), json.dumps(dnode.print_dict()))) str_path = '/interfaces/interface[name={:s}]'.format(if_name) str_data = yang_if.print_mem('json') json_data = json.loads(str_data) json_data = json_data['openconfig-interfaces:interface'][0] str_data = json.dumps(json_data) - - # List elements to release: - LOGGER.warning('Objects to release:') - #LOGGER.warning('Releasing...') - while not objects_to_free.empty(): - LOGGER.warning('Getting...') - try: - obj = objects_to_free.get_nowait() - if obj is None: - LOGGER.warning('Item is None') - continue - - LOGGER.warning('Releasing[type]: {:s}'.format(str(type(obj)))) - LOGGER.warning('Releasing: {:s} => {:s}'.format( - str(obj.path()), str(obj.print_mem('json')) - )) - - #try: - # LOGGER.warning('Freeing...') - # obj.free() - # LOGGER.warning('Free done') - #except: - # LOGGER.exception('Something went wrong...') - # is_error = True - # break - except queue.Empty: - LOGGER.warning('No more objects...') - continue - #LOGGER.warning('Release done') return str_path, str_data def parse( -- GitLab From 6d067a4fbef4809615536b328f732fd5cfe85753 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 12:39:17 +0000 Subject: [PATCH 096/463] NBI component: - Updated libyang python bindings to 2.8.4 --- src/nbi/README.md | 2 +- src/nbi/requirements.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nbi/README.md b/src/nbi/README.md index 32902a0b3..f997ce21c 100644 --- a/src/nbi/README.md +++ b/src/nbi/README.md @@ -31,5 +31,5 @@ sudo ldconfig ### Install Python bindings ```bash -pip install libyang==2.8.0 +pip install libyang==2.8.4 ``` diff --git a/src/nbi/requirements.in b/src/nbi/requirements.in index 0d7804836..d56ee821b 100644 --- a/src/nbi/requirements.in +++ b/src/nbi/requirements.in @@ -18,7 +18,7 @@ Flask==2.1.3 Flask-HTTPAuth==4.5.0 Flask-RESTful==0.3.9 jsonschema==4.4.0 -libyang==2.8.0 +libyang==2.8.4 netaddr==0.9.0 pyang==2.6.0 git+https://github.com/robshakir/pyangbind.git -- GitLab From 7112ec28ef8071c9a4e3d228677488b1cdd5c6cc Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 12:58:44 +0000 Subject: [PATCH 097/463] Manifests: - Disabled DEBUG on Service component --- manifests/serviceservice.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/serviceservice.yaml b/manifests/serviceservice.yaml index 72c3015b3..aa94e4269 100644 --- a/manifests/serviceservice.yaml +++ b/manifests/serviceservice.yaml @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "DEBUG" + value: "INFO" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:3030"] -- GitLab From 491db31169a5b73cf15b4997c72aa681e3738549 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 12:59:41 +0000 Subject: [PATCH 098/463] Device component - gNMI OpenConfig Driver: - Code cleanup --- .../service/drivers/gnmi_openconfig/handlers/Interface.py | 5 ----- .../gnmi_openconfig/handlers/NetworkInstanceInterface.py | 8 +++----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index 42ef07f3c..638f19345 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -59,7 +59,6 @@ class InterfaceHandler(_Handler): address_prefix = get_int (resource_value, 'address_prefix') # 24 mtu = get_int (resource_value, 'mtu' ) # 1500 - yang_ifs : libyang.DContainer = yang_handler.get_data_path('/openconfig-interfaces:interfaces') yang_if_path = 'interface[name="{:s}"]'.format(if_name) yang_if : libyang.DContainer = yang_ifs.create_path(yang_if_path) @@ -87,10 +86,6 @@ class InterfaceHandler(_Handler): yang_ipv4_addr.create_path('config/ip', address_ip) yang_ipv4_addr.create_path('config/prefix-length', address_prefix) - LOGGER.info('YangHandler Data:') - for path, dnode in yang_handler.get_data_paths().items(): - LOGGER.info('|-> {:s}: {:s}'.format(str(path), json.dumps(dnode.print_dict()))) - str_path = '/interfaces/interface[name={:s}]'.format(if_name) str_data = yang_if.print_mem('json') json_data = json.loads(str_data) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py index 2a4c19baa..f6f61a324 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py @@ -36,15 +36,13 @@ class NetworkInstanceInterfaceHandler(_Handler): if IS_CEOS: ni_if_id = if_name + PATH_TMPL = '/network-instances/network-instance[name={:s}]/interfaces/interface[id={:s}]' + str_path = PATH_TMPL.format(ni_name, ni_if_id) + if delete: - PATH_TMPL = '/network-instances/network-instance[name={:s}]/interfaces/interface[id={:s}]' - str_path = PATH_TMPL.format(ni_name, ni_if_id) str_data = json.dumps({}) return str_path, str_data - str_path = '/network-instances/network-instance[name={:s}]/interfaces/interface[id={:s}]'.format( - ni_name, ni_if_id - ) #str_data = json.dumps({ # 'id': if_id, # 'config': {'id': if_id, 'interface': if_name, 'subinterface': sif_index}, -- GitLab From 07686c1646644977e4b150945c1a8e0ed003a8ce Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 13:01:54 +0000 Subject: [PATCH 099/463] EuCNC24 test: - Updated version of Arista cEOS to 4.32.2F --- src/tests/eucnc24/clab/eucnc24.clab.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/tests/eucnc24/clab/eucnc24.clab.yml b/src/tests/eucnc24/clab/eucnc24.clab.yml index 83a2812b5..9013ffad8 100644 --- a/src/tests/eucnc24/clab/eucnc24.clab.yml +++ b/src/tests/eucnc24/clab/eucnc24.clab.yml @@ -26,15 +26,9 @@ topology: kind: arista_ceos #image: ceos:4.30.4M #image: ceos:4.31.2F - image: ceos:4.31.5M + #image: ceos:4.31.5M # tested, works #image: ceos:4.32.0F - - # Not working; after deleting TFS service, create IETF service reports - # "failed to apply: one and only one primary IPv4 address can be specified" - # However, there is no previous IP address in the interface, so it makes - # no sense. Issue with Arista cEOS. - #image: ceos:4.32.2F - + image: ceos:4.32.2F #image: ceos:4.32.2.1F #image: ceos:4.33.1F linux: -- GitLab From d7f537b27387a080c247b49f14d7d441f097b257 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 13:21:46 +0000 Subject: [PATCH 100/463] EuCNC24 test: - Updated version of Arista cEOS to 4.33.1F --- src/tests/eucnc24/clab/eucnc24.clab.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/eucnc24/clab/eucnc24.clab.yml b/src/tests/eucnc24/clab/eucnc24.clab.yml index 9013ffad8..a0fa05b53 100644 --- a/src/tests/eucnc24/clab/eucnc24.clab.yml +++ b/src/tests/eucnc24/clab/eucnc24.clab.yml @@ -28,9 +28,9 @@ topology: #image: ceos:4.31.2F #image: ceos:4.31.5M # tested, works #image: ceos:4.32.0F - image: ceos:4.32.2F + #image: ceos:4.32.2F # tested, works #image: ceos:4.32.2.1F - #image: ceos:4.33.1F + image: ceos:4.33.1F linux: kind: linux image: ghcr.io/hellt/network-multitool:latest -- GitLab From de7bd0af8b98cfde802b882064f980ea44bb312a Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 13:22:26 +0000 Subject: [PATCH 101/463] Device component - gNMI OpenConfig Driver: - Removing unneeded log message --- src/device/service/drivers/gnmi_openconfig/handlers/Interface.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index 638f19345..ed833b647 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -46,7 +46,6 @@ class InterfaceHandler(_Handler): 'subinterface[index="{:d}"]'.format(sif_index), ])) if yang_sif is not None: - LOGGER.info('Deleting: {:s}'.format(str(yang_sif.print_mem('json')))) yang_sif.unlink() yang_sif.free() -- GitLab From 5b4b7d1e73cbde11b862985bc3a2dfcd8d7eba9b Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 13:28:02 +0000 Subject: [PATCH 102/463] EuCNC24 test: - Reverting to Arista cEOS 4.32.2F --- src/tests/eucnc24/clab/eucnc24.clab.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/eucnc24/clab/eucnc24.clab.yml b/src/tests/eucnc24/clab/eucnc24.clab.yml index a0fa05b53..aaf971e36 100644 --- a/src/tests/eucnc24/clab/eucnc24.clab.yml +++ b/src/tests/eucnc24/clab/eucnc24.clab.yml @@ -28,9 +28,9 @@ topology: #image: ceos:4.31.2F #image: ceos:4.31.5M # tested, works #image: ceos:4.32.0F - #image: ceos:4.32.2F # tested, works + image: ceos:4.32.2F # tested, works #image: ceos:4.32.2.1F - image: ceos:4.33.1F + #image: ceos:4.33.1F # does not work, libyang.util.LibyangError: failed to parse data tree: No module named "openconfig-platform-healthz" in the context. linux: kind: linux image: ghcr.io/hellt/network-multitool:latest -- GitLab From 35c12a8c887ace97fb173b8553fc1c96d3597e90 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 13:28:28 +0000 Subject: [PATCH 103/463] Recover all unitary and integration tests --- .gitlab-ci.yml | 66 ++++++++++++++++++++-------------------- src/tests/.gitlab-ci.yml | 14 ++++----- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25dcab336..2fe405733 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,39 +21,39 @@ stages: # include the individual .gitlab-ci.yml of each micro-service and tests include: -# #- local: '/manifests/.gitlab-ci.yml' -# - local: '/src/monitoring/.gitlab-ci.yml' -# - local: '/src/nbi/.gitlab-ci.yml' -# - local: '/src/context/.gitlab-ci.yml' -# - local: '/src/device/.gitlab-ci.yml' -# - local: '/src/service/.gitlab-ci.yml' -# - local: '/src/dbscanserving/.gitlab-ci.yml' -# - local: '/src/opticalattackmitigator/.gitlab-ci.yml' -# - local: '/src/opticalattackdetector/.gitlab-ci.yml' -# - local: '/src/opticalattackmanager/.gitlab-ci.yml' -# - local: '/src/opticalcontroller/.gitlab-ci.yml' -# - local: '/src/ztp/.gitlab-ci.yml' -# - local: '/src/policy/.gitlab-ci.yml' -# - local: '/src/automation/.gitlab-ci.yml' -# - local: '/src/forecaster/.gitlab-ci.yml' -# #- local: '/src/webui/.gitlab-ci.yml' -# #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' -# #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' -# #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' -# - local: '/src/slice/.gitlab-ci.yml' -# #- local: '/src/interdomain/.gitlab-ci.yml' -# - local: '/src/pathcomp/.gitlab-ci.yml' -# #- local: '/src/dlt/.gitlab-ci.yml' -# - local: '/src/load_generator/.gitlab-ci.yml' -# - local: '/src/bgpls_speaker/.gitlab-ci.yml' -# - local: '/src/kpi_manager/.gitlab-ci.yml' -# - local: '/src/kpi_value_api/.gitlab-ci.yml' -# - local: '/src/kpi_value_writer/.gitlab-ci.yml' -# - local: '/src/telemetry/.gitlab-ci.yml' -# - local: '/src/analytics/.gitlab-ci.yml' -# - local: '/src/qos_profile/.gitlab-ci.yml' -# - local: '/src/vnt_manager/.gitlab-ci.yml' -# - local: '/src/e2e_orchestrator/.gitlab-ci.yml' + #- local: '/manifests/.gitlab-ci.yml' + - local: '/src/monitoring/.gitlab-ci.yml' + - local: '/src/nbi/.gitlab-ci.yml' + - local: '/src/context/.gitlab-ci.yml' + - local: '/src/device/.gitlab-ci.yml' + - local: '/src/service/.gitlab-ci.yml' + - local: '/src/dbscanserving/.gitlab-ci.yml' + - local: '/src/opticalattackmitigator/.gitlab-ci.yml' + - local: '/src/opticalattackdetector/.gitlab-ci.yml' + - local: '/src/opticalattackmanager/.gitlab-ci.yml' + - local: '/src/opticalcontroller/.gitlab-ci.yml' + - local: '/src/ztp/.gitlab-ci.yml' + - local: '/src/policy/.gitlab-ci.yml' + - local: '/src/automation/.gitlab-ci.yml' + - local: '/src/forecaster/.gitlab-ci.yml' + #- local: '/src/webui/.gitlab-ci.yml' + #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' + #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' + #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' + - local: '/src/slice/.gitlab-ci.yml' + #- local: '/src/interdomain/.gitlab-ci.yml' + - local: '/src/pathcomp/.gitlab-ci.yml' + #- local: '/src/dlt/.gitlab-ci.yml' + - local: '/src/load_generator/.gitlab-ci.yml' + - local: '/src/bgpls_speaker/.gitlab-ci.yml' + - local: '/src/kpi_manager/.gitlab-ci.yml' + - local: '/src/kpi_value_api/.gitlab-ci.yml' + - local: '/src/kpi_value_writer/.gitlab-ci.yml' + - local: '/src/telemetry/.gitlab-ci.yml' + - local: '/src/analytics/.gitlab-ci.yml' + - local: '/src/qos_profile/.gitlab-ci.yml' + - local: '/src/vnt_manager/.gitlab-ci.yml' + - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index 8d2e51fee..fdc86805b 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -14,11 +14,11 @@ # include the individual .gitlab-ci.yml of each end-to-end integration test include: -# - local: '/src/tests/ofc22/.gitlab-ci.yml' -# #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' -# - local: '/src/tests/ecoc22/.gitlab-ci.yml' -# #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' -# #- local: '/src/tests/ofc23/.gitlab-ci.yml' -# - local: '/src/tests/ofc24/.gitlab-ci.yml' + - local: '/src/tests/ofc22/.gitlab-ci.yml' + #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' + - local: '/src/tests/ecoc22/.gitlab-ci.yml' + #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' + #- local: '/src/tests/ofc23/.gitlab-ci.yml' + - local: '/src/tests/ofc24/.gitlab-ci.yml' - local: '/src/tests/eucnc24/.gitlab-ci.yml' -# #- local: '/src/tests/ecoc24/.gitlab-ci.yml' + #- local: '/src/tests/ecoc24/.gitlab-ci.yml' -- GitLab From e9f0f054e1e275d95d86262e2d5f2efac14be4eb Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 16:26:47 +0000 Subject: [PATCH 104/463] Temporarily disable CI/CD pipeline --- .gitlab-ci.yml | 66 ++++++++++++++++++++-------------------- src/tests/.gitlab-ci.yml | 16 +++++----- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2fe405733..25dcab336 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,39 +21,39 @@ stages: # include the individual .gitlab-ci.yml of each micro-service and tests include: - #- local: '/manifests/.gitlab-ci.yml' - - local: '/src/monitoring/.gitlab-ci.yml' - - local: '/src/nbi/.gitlab-ci.yml' - - local: '/src/context/.gitlab-ci.yml' - - local: '/src/device/.gitlab-ci.yml' - - local: '/src/service/.gitlab-ci.yml' - - local: '/src/dbscanserving/.gitlab-ci.yml' - - local: '/src/opticalattackmitigator/.gitlab-ci.yml' - - local: '/src/opticalattackdetector/.gitlab-ci.yml' - - local: '/src/opticalattackmanager/.gitlab-ci.yml' - - local: '/src/opticalcontroller/.gitlab-ci.yml' - - local: '/src/ztp/.gitlab-ci.yml' - - local: '/src/policy/.gitlab-ci.yml' - - local: '/src/automation/.gitlab-ci.yml' - - local: '/src/forecaster/.gitlab-ci.yml' - #- local: '/src/webui/.gitlab-ci.yml' - #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' - - local: '/src/slice/.gitlab-ci.yml' - #- local: '/src/interdomain/.gitlab-ci.yml' - - local: '/src/pathcomp/.gitlab-ci.yml' - #- local: '/src/dlt/.gitlab-ci.yml' - - local: '/src/load_generator/.gitlab-ci.yml' - - local: '/src/bgpls_speaker/.gitlab-ci.yml' - - local: '/src/kpi_manager/.gitlab-ci.yml' - - local: '/src/kpi_value_api/.gitlab-ci.yml' - - local: '/src/kpi_value_writer/.gitlab-ci.yml' - - local: '/src/telemetry/.gitlab-ci.yml' - - local: '/src/analytics/.gitlab-ci.yml' - - local: '/src/qos_profile/.gitlab-ci.yml' - - local: '/src/vnt_manager/.gitlab-ci.yml' - - local: '/src/e2e_orchestrator/.gitlab-ci.yml' +# #- local: '/manifests/.gitlab-ci.yml' +# - local: '/src/monitoring/.gitlab-ci.yml' +# - local: '/src/nbi/.gitlab-ci.yml' +# - local: '/src/context/.gitlab-ci.yml' +# - local: '/src/device/.gitlab-ci.yml' +# - local: '/src/service/.gitlab-ci.yml' +# - local: '/src/dbscanserving/.gitlab-ci.yml' +# - local: '/src/opticalattackmitigator/.gitlab-ci.yml' +# - local: '/src/opticalattackdetector/.gitlab-ci.yml' +# - local: '/src/opticalattackmanager/.gitlab-ci.yml' +# - local: '/src/opticalcontroller/.gitlab-ci.yml' +# - local: '/src/ztp/.gitlab-ci.yml' +# - local: '/src/policy/.gitlab-ci.yml' +# - local: '/src/automation/.gitlab-ci.yml' +# - local: '/src/forecaster/.gitlab-ci.yml' +# #- local: '/src/webui/.gitlab-ci.yml' +# #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' +# #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' +# #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' +# - local: '/src/slice/.gitlab-ci.yml' +# #- local: '/src/interdomain/.gitlab-ci.yml' +# - local: '/src/pathcomp/.gitlab-ci.yml' +# #- local: '/src/dlt/.gitlab-ci.yml' +# - local: '/src/load_generator/.gitlab-ci.yml' +# - local: '/src/bgpls_speaker/.gitlab-ci.yml' +# - local: '/src/kpi_manager/.gitlab-ci.yml' +# - local: '/src/kpi_value_api/.gitlab-ci.yml' +# - local: '/src/kpi_value_writer/.gitlab-ci.yml' +# - local: '/src/telemetry/.gitlab-ci.yml' +# - local: '/src/analytics/.gitlab-ci.yml' +# - local: '/src/qos_profile/.gitlab-ci.yml' +# - local: '/src/vnt_manager/.gitlab-ci.yml' +# - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index fdc86805b..2e5d3728d 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -14,11 +14,11 @@ # include the individual .gitlab-ci.yml of each end-to-end integration test include: - - local: '/src/tests/ofc22/.gitlab-ci.yml' - #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' - - local: '/src/tests/ecoc22/.gitlab-ci.yml' - #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' - #- local: '/src/tests/ofc23/.gitlab-ci.yml' - - local: '/src/tests/ofc24/.gitlab-ci.yml' - - local: '/src/tests/eucnc24/.gitlab-ci.yml' - #- local: '/src/tests/ecoc24/.gitlab-ci.yml' +# - local: '/src/tests/ofc22/.gitlab-ci.yml' +# #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' +# - local: '/src/tests/ecoc22/.gitlab-ci.yml' +# #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' +# #- local: '/src/tests/ofc23/.gitlab-ci.yml' +# - local: '/src/tests/ofc24/.gitlab-ci.yml' +# - local: '/src/tests/eucnc24/.gitlab-ci.yml' +# #- local: '/src/tests/ecoc24/.gitlab-ci.yml' -- GitLab From d58af1579e2380804bfd187609a849f8019d287a Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 16:27:36 +0000 Subject: [PATCH 105/463] Temporarily disable CI/CD pipeline --- .gitlab-ci.yml | 66 ++++++++++++++++++++-------------------- src/tests/.gitlab-ci.yml | 16 +++++----- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d55be942..ce9084631 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,39 +21,39 @@ stages: # include the individual .gitlab-ci.yml of each micro-service and tests include: - #- local: '/manifests/.gitlab-ci.yml' - # - local: '/src/monitoring/.gitlab-ci.yml' - - local: '/src/nbi/.gitlab-ci.yml' - - local: '/src/context/.gitlab-ci.yml' - - local: '/src/device/.gitlab-ci.yml' - - local: '/src/service/.gitlab-ci.yml' - # - local: '/src/dbscanserving/.gitlab-ci.yml' - # - local: '/src/opticalattackmitigator/.gitlab-ci.yml' - # - local: '/src/opticalattackdetector/.gitlab-ci.yml' - # - local: '/src/opticalattackmanager/.gitlab-ci.yml' - # - local: '/src/opticalcontroller/.gitlab-ci.yml' - # - local: '/src/ztp/.gitlab-ci.yml' - # - local: '/src/policy/.gitlab-ci.yml' - #- local: '/src/automation/.gitlab-ci.yml' - # - local: '/src/forecaster/.gitlab-ci.yml' - #- local: '/src/webui/.gitlab-ci.yml' - #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' - # - local: '/src/slice/.gitlab-ci.yml' - #- local: '/src/interdomain/.gitlab-ci.yml' - # - local: '/src/pathcomp/.gitlab-ci.yml' - #- local: '/src/dlt/.gitlab-ci.yml' - # - local: '/src/load_generator/.gitlab-ci.yml' - # - local: '/src/bgpls_speaker/.gitlab-ci.yml' - # - local: '/src/kpi_manager/.gitlab-ci.yml' - # - local: '/src/kpi_value_api/.gitlab-ci.yml' - # - local: '/src/kpi_value_writer/.gitlab-ci.yml' - # - local: '/src/telemetry/.gitlab-ci.yml' - # - local: '/src/analytics/.gitlab-ci.yml' - # - local: '/src/qos_profile/.gitlab-ci.yml' - - local: '/src/vnt_manager/.gitlab-ci.yml' - - local: '/src/e2e_orchestrator/.gitlab-ci.yml' +# #- local: '/manifests/.gitlab-ci.yml' +# - local: '/src/monitoring/.gitlab-ci.yml' +# - local: '/src/nbi/.gitlab-ci.yml' +# - local: '/src/context/.gitlab-ci.yml' +# - local: '/src/device/.gitlab-ci.yml' +# - local: '/src/service/.gitlab-ci.yml' +# - local: '/src/dbscanserving/.gitlab-ci.yml' +# - local: '/src/opticalattackmitigator/.gitlab-ci.yml' +# - local: '/src/opticalattackdetector/.gitlab-ci.yml' +# - local: '/src/opticalattackmanager/.gitlab-ci.yml' +# - local: '/src/opticalcontroller/.gitlab-ci.yml' +# - local: '/src/ztp/.gitlab-ci.yml' +# - local: '/src/policy/.gitlab-ci.yml' +# #- local: '/src/automation/.gitlab-ci.yml' +# - local: '/src/forecaster/.gitlab-ci.yml' +# #- local: '/src/webui/.gitlab-ci.yml' +# #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' +# #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' +# #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' +# - local: '/src/slice/.gitlab-ci.yml' +# #- local: '/src/interdomain/.gitlab-ci.yml' +# - local: '/src/pathcomp/.gitlab-ci.yml' +# #- local: '/src/dlt/.gitlab-ci.yml' +# - local: '/src/load_generator/.gitlab-ci.yml' +# - local: '/src/bgpls_speaker/.gitlab-ci.yml' +# - local: '/src/kpi_manager/.gitlab-ci.yml' +# - local: '/src/kpi_value_api/.gitlab-ci.yml' +# - local: '/src/kpi_value_writer/.gitlab-ci.yml' +# - local: '/src/telemetry/.gitlab-ci.yml' +# - local: '/src/analytics/.gitlab-ci.yml' +# - local: '/src/qos_profile/.gitlab-ci.yml' +# - local: '/src/vnt_manager/.gitlab-ci.yml' +# - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index 744d539eb..ec8ab77d9 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -14,11 +14,11 @@ # include the individual .gitlab-ci.yml of each end-to-end integration test include: - # - local: '/src/tests/ofc22/.gitlab-ci.yml' - #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' - # - local: '/src/tests/ecoc22/.gitlab-ci.yml' - #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' - #- local: '/src/tests/ofc23/.gitlab-ci.yml' - # - local: '/src/tests/ofc24/.gitlab-ci.yml' - # - local: '/src/tests/eucnc24/.gitlab-ci.yml' - - local: '/src/tests/ecoc24/.gitlab-ci.yml' +# - local: '/src/tests/ofc22/.gitlab-ci.yml' +# #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' +# - local: '/src/tests/ecoc22/.gitlab-ci.yml' +# #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' +# #- local: '/src/tests/ofc23/.gitlab-ci.yml' +# - local: '/src/tests/ofc24/.gitlab-ci.yml' +# - local: '/src/tests/eucnc24/.gitlab-ci.yml' +# - local: '/src/tests/ecoc24/.gitlab-ci.yml' -- GitLab From 9ebc0ca737216902ca8ed20b78ca71a37ecb061a Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 16:28:24 +0000 Subject: [PATCH 106/463] ECOC24 test: - Code styling - Cleanup --- src/tests/ecoc24/.gitlab-ci.yml | 2 +- src/tests/ecoc24/Dockerfile | 42 +++++++------------ src/tests/ecoc24/deploy_specs_e2e.sh | 8 +--- src/tests/ecoc24/deploy_specs_ip.sh | 7 +--- src/tests/ecoc24/deploy_specs_opt.sh | 17 ++++---- src/tests/ecoc24/tests/__init__.py | 2 +- .../tests/test_functional_bootstrap_e2e.py | 2 +- .../tests/test_functional_bootstrap_ip.py | 2 +- .../tests/test_functional_bootstrap_opt.py | 2 +- 9 files changed, 32 insertions(+), 52 deletions(-) diff --git a/src/tests/ecoc24/.gitlab-ci.yml b/src/tests/ecoc24/.gitlab-ci.yml index e1b56eaec..8e3f7e71a 100644 --- a/src/tests/ecoc24/.gitlab-ci.yml +++ b/src/tests/ecoc24/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/ecoc24/Dockerfile b/src/tests/ecoc24/Dockerfile index 4a2d4e043..8fca59f57 100644 --- a/src/tests/ecoc24/Dockerfile +++ b/src/tests/ecoc24/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,11 +22,6 @@ RUN apt-get --yes --quiet --quiet update && \ # Set Python to show logs as they occur ENV PYTHONUNBUFFERED=0 -# Download the gRPC health probe -RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ - wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ - chmod +x /bin/grpc_health_probe - # Get generic Python packages RUN python3 -m pip install --upgrade pip RUN python3 -m pip install --upgrade setuptools wheel @@ -85,23 +80,18 @@ COPY src/tests/ecoc24/descriptors/descriptor_opt.json ./tests/ecoc24/descriptors COPY src/tests/ecoc24/descriptors/descriptor_e2e.json ./tests/ecoc24/descriptors/descriptor_e2e.json COPY src/tests/ecoc24/tests/. ./tests/ecoc24/tests/ -# RUN tee ./run_tests.sh < Date: Tue, 24 Dec 2024 16:28:42 +0000 Subject: [PATCH 107/463] VNT Manager component: - Code cleanup --- .../service/VNTManagerServiceServicerImpl.py | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/vnt_manager/service/VNTManagerServiceServicerImpl.py b/src/vnt_manager/service/VNTManagerServiceServicerImpl.py index 79ff1b752..46a012560 100644 --- a/src/vnt_manager/service/VNTManagerServiceServicerImpl.py +++ b/src/vnt_manager/service/VNTManagerServiceServicerImpl.py @@ -59,12 +59,11 @@ class VNTMEventDispatcher(threading.Thread): def stop(self): self._terminate.set() - def send_msg(self, msg): try: self.websocket.send(msg) except Exception as e: - LOGGER.info(e) + LOGGER.exception('Unable to send message') def recv_msg(self): message = self.websocket.recv() @@ -72,27 +71,27 @@ class VNTMEventDispatcher(threading.Thread): def run(self) -> None: events_collector = EventsCollector( - context_client, log_events_received=True, + context_client, + log_events_received = True, activate_context_collector = True, activate_topology_collector = True, activate_device_collector = True, activate_link_collector = True, activate_service_collector = False, activate_slice_collector = False, - activate_connection_collector = False,) + activate_connection_collector = False, + ) events_collector.start() - - url = "ws://" + str(self.host) + ":" + str(self.port) - LOGGER.debug('Connecting to {}'.format(url)) - try: - LOGGER.info("Connecting to events server...: {}".format(url)) + url = "ws://" + str(self.host) + ":" + str(self.port) + LOGGER.info("Connecting to events server...: {:s}".format(url)) self.websocket = connect(url) except Exception as ex: - LOGGER.error(f'Error connecting to {url}\n\t{ex}') + MSG = 'Error connecting to {:s}' + LOGGER.exception(MSG.format(str(url))) else: - LOGGER.info('Connected to {}'.format(url)) + LOGGER.info('Connected to {:s}'.format(url)) context_id = json_context_id(DEFAULT_CONTEXT_NAME) topology_id = json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id) @@ -155,7 +154,8 @@ class VNTManagerServiceServicerImpl(VNTManagerServiceServicer): link = Link(**message_json) context_client.SetLink(link) except Exception as e: - LOGGER.error(f'Exception setting virtual link={request.link_id.link_uuid.uuid}\n\t{e}') + MSG = 'Exception setting virtual link={:s}') + LOGGER.exception(MSG.format(str(request.link_id.link_uuid.uuid))) return request.link_id @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) @@ -171,8 +171,8 @@ class VNTManagerServiceServicerImpl(VNTManagerServiceServicer): LOGGER.info('Removed') except Exception as e: - msg_error = 'Exception removing virtual link={}\n\t{}'.format(request.link_uuid.uuid, e) - LOGGER.error(msg_error) + MSG = 'Exception removing virtual link={:s}' + LOGGER.exception(MSG.format(str(request.link_uuid.uuid))) return msg_error else: context_client.RemoveLink(request) -- GitLab From c2c41b801e0de63917979d00d6749ea0548e8ce5 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 16:53:43 +0000 Subject: [PATCH 108/463] Proto: - Corrected Link.link_type field --- proto/context.proto | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/proto/context.proto b/proto/context.proto index 9f06d32ee..4d61572df 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -258,6 +258,14 @@ message LinkId { Uuid link_uuid = 1; } +enum LinkTypeEnum { + LINKTYPE_UNKNOWN = 0; + LINKTYPE_COPPER = 1; + LINKTYPE_FIBER = 2; + LINKTYPE_RADIO = 3; + LINKTYPE_VIRTUAL = 4; +} + message LinkAttributes { float total_capacity_gbps = 1; float used_capacity_gbps = 2; @@ -266,9 +274,9 @@ message LinkAttributes { message Link { LinkId link_id = 1; string name = 2; - repeated EndPointId link_endpoint_ids = 3; - LinkAttributes attributes = 4; - LinkTypeEnum link_type = 5; + LinkTypeEnum link_type = 3; + repeated EndPointId link_endpoint_ids = 4; + LinkAttributes attributes = 5; } message LinkIdList { @@ -284,14 +292,6 @@ message LinkEvent { LinkId link_id = 2; } -enum LinkTypeEnum { - LINKTYPE_UNKNOWN = 0; - LINKTYPE_COPPER = 1; - LINKTYPE_VIRTUAL_COPPER = 2; - LINKTYPE_OPTICAL = 3; - LINKTYPE_VIRTUAL_OPTICAL = 4; -} - // ----- Service ------------------------------------------------------------------------------------------------------- message ServiceId { ContextId context_id = 1; -- GitLab From faeea4729ea333098c1c4c155b15ebf6437aa6e8 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 16:53:48 +0000 Subject: [PATCH 109/463] Context component: - Added LinkTypeEnum --- .../service/database/models/enums/LinkType.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/context/service/database/models/enums/LinkType.py diff --git a/src/context/service/database/models/enums/LinkType.py b/src/context/service/database/models/enums/LinkType.py new file mode 100644 index 000000000..68624af84 --- /dev/null +++ b/src/context/service/database/models/enums/LinkType.py @@ -0,0 +1,33 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 enum, functools +from common.proto.context_pb2 import LinkTypeEnum +from ._GrpcToEnum import grpc_to_enum + +# IMPORTANT: Entries of enum class ORM_LinkTypeEnum should be named as in +# the proto files removing the prefixes. For example, proto item +# LinkTypeEnum.DEVICEDRIVER_COPPER should be included as COPPER. +# If item name does not match, automatic mapping of proto enums +# to database enums will fail. +class ORM_LinkTypeEnum(enum.Enum): + UNKNOWN = LinkTypeEnum.LINKTYPE_UNKNOWN + COPPER = LinkTypeEnum.LINKTYPE_COPPER + FIBER = LinkTypeEnum.LINKTYPE_FIBER + RADIO = LinkTypeEnum.LINKTYPE_RADIO + VIRTUAL = LinkTypeEnum.LINKTYPE_VIRTUAL + +grpc_to_enum__link_type_enum = functools.partial( + grpc_to_enum, LinkTypeEnum, ORM_LinkTypeEnum +) -- GitLab From c16d84f3985b2680b564307b0e01492b1c26a64b Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 16:54:18 +0000 Subject: [PATCH 110/463] NBI component - TFS API: - Corrected POST/DELETE methods --- .../rest_server/nbi_plugins/tfs_api/Resources.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py index eaa213525..07d389122 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py @@ -301,16 +301,20 @@ class Link(_Resource): def put(self, link_uuid : str): link_json = request.get_json() link = grpc_link(link_json) - virtual_types = {LinkTypeEnum.LINKTYPE_VIRTUAL_COPPER, LinkTypeEnum.LINKTYPE_VIRTUAL_OPTICAL} if link_uuid != link.link_id.link_uuid.uuid: raise BadRequest('Mismatching link_uuid') - elif link.link_type in virtual_types: - link = grpc_link(link_json) - return format_grpc_to_json(self.vntmanager_client.SetVirtualLink(link)) - return format_grpc_to_json(self.context_client.SetLink(grpc_link(link))) + if link.link_type == LinkTypeEnum.LINKTYPE_VIRTUAL: + return format_grpc_to_json(self.vntmanager_client.SetVirtualLink(link)) + else: + return format_grpc_to_json(self.context_client.SetLink(link)) def delete(self, link_uuid : str): - return format_grpc_to_json(self.context_client.RemoveLink(grpc_link_id(link_uuid))) + link_id = grpc_link_id(link_uuid) + link = self.context_client.GetLink(link_id) + if link.link_type == LinkTypeEnum.LINKTYPE_VIRTUAL: + return format_grpc_to_json(self.vntmanager_client.RemoveVirtualLink(link_id)) + else: + return format_grpc_to_json(self.context_client.RemoveLink(link_id)) class ConnectionIds(_Resource): def get(self, context_uuid : str, service_uuid : str): -- GitLab From 8029e324c49c19f303dce34749a806c934da6406 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 16:58:03 +0000 Subject: [PATCH 111/463] NBI component - TFS API: - Added methods to retrieve TopologyDetails --- .../nbi_plugins/tfs_api/Resources.py | 5 ++ .../nbi_plugins/tfs_api/__init__.py | 53 ++++++++++--------- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py index eaa213525..f93462469 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py @@ -177,6 +177,11 @@ class Topology(_Resource): def delete(self, context_uuid : str, topology_uuid : str): return format_grpc_to_json(self.context_client.RemoveTopology(grpc_topology_id(context_uuid, topology_uuid))) +class TopologyDetails(_Resource): + def get(self, context_uuid : str, topology_uuid : str): + topology_id = grpc_topology_id(context_uuid, topology_uuid) + return format_grpc_to_json(self.context_client.GetTopologyDetails(topology_id)) + class ServiceIds(_Resource): def get(self, context_uuid : str): return format_grpc_to_json(self.context_client.ListServiceIds(grpc_context_id(context_uuid))) diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py index 304a32648..6605557ca 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py @@ -22,7 +22,7 @@ from .Resources import ( PolicyRule, PolicyRuleIds, PolicyRules, Service, ServiceIds, Services, Slice, SliceIds, Slices, - Topologies, Topology, TopologyIds + Topologies, Topology, TopologyDetails, TopologyIds ) URL_PREFIX = '/tfs-api' @@ -30,38 +30,39 @@ URL_PREFIX = '/tfs-api' # Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. RESOURCES = [ # (endpoint_name, resource_class, resource_url) - ('api.context_ids', ContextIds, '/context_ids'), - ('api.contexts', Contexts, '/contexts'), - ('api.dummy_contexts', DummyContexts, '/dummy_contexts'), - ('api.context', Context, '/context/'), + ('api.context_ids', ContextIds, '/context_ids'), + ('api.contexts', Contexts, '/contexts'), + ('api.dummy_contexts', DummyContexts, '/dummy_contexts'), + ('api.context', Context, '/context/'), - ('api.topology_ids', TopologyIds, '/context//topology_ids'), - ('api.topologies', Topologies, '/context//topologies'), - ('api.topology', Topology, '/context//topology/'), + ('api.topology_ids', TopologyIds, '/context//topology_ids'), + ('api.topologies', Topologies, '/context//topologies'), + ('api.topology', Topology, '/context//topology/'), + ('api.topology_details', TopologyDetails, '/context//topology_details/'), - ('api.service_ids', ServiceIds, '/context//service_ids'), - ('api.services', Services, '/context//services'), - ('api.service', Service, '/context//service/'), + ('api.service_ids', ServiceIds, '/context//service_ids'), + ('api.services', Services, '/context//services'), + ('api.service', Service, '/context//service/'), - ('api.slice_ids', SliceIds, '/context//slice_ids'), - ('api.slices', Slices, '/context//slices'), - ('api.slice', Slice, '/context//slice/'), + ('api.slice_ids', SliceIds, '/context//slice_ids'), + ('api.slices', Slices, '/context//slices'), + ('api.slice', Slice, '/context//slice/'), - ('api.device_ids', DeviceIds, '/device_ids'), - ('api.devices', Devices, '/devices'), - ('api.device', Device, '/device/'), + ('api.device_ids', DeviceIds, '/device_ids'), + ('api.devices', Devices, '/devices'), + ('api.device', Device, '/device/'), - ('api.link_ids', LinkIds, '/link_ids'), - ('api.links', Links, '/links'), - ('api.link', Link, '/link/'), + ('api.link_ids', LinkIds, '/link_ids'), + ('api.links', Links, '/links'), + ('api.link', Link, '/link/'), - ('api.connection_ids', ConnectionIds, '/context//service//connection_ids'), - ('api.connections', Connections, '/context//service//connections'), - ('api.connection', Connection, '/connection/'), + ('api.connection_ids', ConnectionIds, '/context//service//connection_ids'), + ('api.connections', Connections, '/context//service//connections'), + ('api.connection', Connection, '/connection/'), - ('api.policyrule_ids', PolicyRuleIds, '/policyrule_ids'), - ('api.policyrules', PolicyRules, '/policyrules'), - ('api.policyrule', PolicyRule, '/policyrule/'), + ('api.policyrule_ids', PolicyRuleIds, '/policyrule_ids'), + ('api.policyrules', PolicyRules, '/policyrules'), + ('api.policyrule', PolicyRule, '/policyrule/'), ] def register_tfs_api(rest_server : RestServer): -- GitLab From f2f4cbc34b06808762c56c5cc9ce4552a3f65626 Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 24 Dec 2024 18:01:08 +0100 Subject: [PATCH 112/463] enhancement: - /restconf/data endpoint added as a dummpy endpoint to TFS NBI - connection group endpoint added to TFS NBI - ietf_slice_handler enhanced to support TFS NBI - slice json test files added --- .../rest_server/nbi_plugins/__init__.py | 24 + .../ietf_network_slice/NSS_Service.py | 62 +- .../NSS_Service_Match_Criteria.py | 4 + .../NSS_Service_Match_Criterion.py | 8 +- .../ietf_network_slice/NSS_Services.py | 6 +- .../NSS_Services_Connection_Group.py | 8 +- .../ietf_network_slice/__init__.py | 6 + .../ietf_network_slice/ietf_slice_handler.py | 273 ++- src/nbi/tests/data/camara-e2e-topology.json | 1662 +++++++++++++++++ ...st_connection_group_to_network_slice1.json | 12 +- ...post_match_criteria_to_sdp1_in_slice1.json | 2 +- .../tests/data/slice/post_network_slice1.json | 340 ++-- src/nbi/tests/test_slice_2.py | 87 +- 13 files changed, 2221 insertions(+), 273 deletions(-) create mode 100644 src/nbi/tests/data/camara-e2e-topology.json diff --git a/src/nbi/service/rest_server/nbi_plugins/__init__.py b/src/nbi/service/rest_server/nbi_plugins/__init__.py index 53d5157f7..e7d5584cd 100644 --- a/src/nbi/service/rest_server/nbi_plugins/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/__init__.py @@ -12,3 +12,27 @@ # See the License for the specific language governing permissions and # limitations under the License. +from flask.json import jsonify +from flask_restful import Resource + +from nbi.service.rest_server.RestServer import RestServer + +from .tools.HttpStatusCodes import HTTP_CREATED + +URL_PREFIX = "/restconf/data" + + +class BaseServer(Resource): + def post(self): + response = jsonify({}) + response.status_code = HTTP_CREATED + return response + + +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, BaseServer, "") diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py index 0add8fdf0..8f6dc8660 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py @@ -13,47 +13,61 @@ # 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_by_uuid 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 +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))) + def get(self, slice_id: str): + LOGGER.debug("GET Slice ID: {:s}".format(str(slice_id))) try: context_client = ContextClient() target = get_slice_by_uuid(context_client, slice_id, rw_copy=True) if target is None: - raise Exception('Slice({:s}) not found in database'.format(str(slice_id))) + 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') + 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 + 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 + 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)}) + 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))) + def delete(self, slice_id: str): + LOGGER.debug("DELETE Slice ID: {:s}".format(str(slice_id))) try: context_client = ContextClient() target = get_slice_by_uuid(context_client, slice_id) @@ -62,17 +76,25 @@ class NSS_Service(Resource): response.status_code = HTTP_OK if target is None: - LOGGER.warning('Slice({:s}) not found in database. Nothing done.'.format(str(slice_id))) + 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') + if target.slice_id.slice_uuid.uuid != slice_id and target.name != 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)}) + 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 + return response diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criteria.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criteria.py index 1ec8c0636..3e1c9f73f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criteria.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criteria.py @@ -49,6 +49,10 @@ class NSS_Service_Match_Criteria(Resource): ) slice_client = SliceClient() slice_client.UpdateSlice(slice_request) + slice_request = IETFSliceHandler.copy_candidate_ietf_slice_data_to_running( + slice_id, context_client + ) + _ = context_client.SetSlice(slice_request) response = jsonify({}) response.status_code = HTTP_CREATED diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criterion.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criterion.py index 017ad5d36..8fb8adfd9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criterion.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criterion.py @@ -12,15 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. import logging -from typing import Dict -from flask import request from flask.json import jsonify from flask_restful import Resource -from werkzeug.exceptions import UnsupportedMediaType from context.client.ContextClient import ContextClient -from slice.client.SliceClient import SliceClient from ..tools.Authentication import HTTP_AUTH from ..tools.HttpStatusCodes import ( @@ -44,8 +40,8 @@ class NSS_Service_Match_Criterion(Resource): slice_request = IETFSliceHandler.delete_match_criteria( slice_id, sdp_id, int(match_criterion_id), context_client ) - slice_client = SliceClient() - slice_client.UpdateSlice(slice_request) + context_client = ContextClient() + _ = context_client.SetSlice(slice_request) response = jsonify({}) response.status_code = HTTP_CREATED diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py index 7a392eafd..0b4f83fa8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py @@ -19,6 +19,7 @@ from flask.json import jsonify from flask_restful import Resource from werkzeug.exceptions import UnsupportedMediaType +from context.client.ContextClient import ContextClient from slice.client.SliceClient import SliceClient from ..tools.HttpStatusCodes import HTTP_CREATED @@ -39,7 +40,10 @@ class NSS_Services(Resource): if not request.is_json: raise UnsupportedMediaType("JSON payload is required") request_data: Dict = request.json - slice_request = IETFSliceHandler.create_slice_service(request_data) + context_client = ContextClient() + slice_request = IETFSliceHandler.create_slice_service( + request_data, context_client + ) slice_client = SliceClient() slice_client.CreateSlice(slice_request) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py index 0356af68b..c74e46f82 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py @@ -20,6 +20,7 @@ from flask_restful import Resource from werkzeug.exceptions import UnsupportedMediaType from context.client.ContextClient import ContextClient +from slice.client.SliceClient import SliceClient from ..tools.Authentication import HTTP_AUTH from ..tools.HttpStatusCodes import HTTP_CREATED @@ -28,7 +29,7 @@ from .ietf_slice_handler import IETFSliceHandler LOGGER = logging.getLogger(__name__) -class NSS_Service_Connection_Groups(Resource): +class NSS_Service_Connection_Group(Resource): # @HTTP_AUTH.login_required def get(self): response = jsonify({"message": "All went well!"}) @@ -41,6 +42,11 @@ class NSS_Service_Connection_Groups(Resource): slice_request = IETFSliceHandler.delete_connection_group( slice_id, connection_group_id, context_client ) + slice_client = SliceClient() + slice_client.UpdateSlice(slice_request) + slice_request = IETFSliceHandler.copy_candidate_ietf_slice_data_to_running( + slice_id, context_client + ) _ = context_client.SetSlice(slice_request) response = jsonify({}) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py index c8aca7e1e..6dcd6c9e9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py @@ -23,6 +23,7 @@ from .NSS_Service import NSS_Service from .NSS_Service_Match_Criteria import NSS_Service_Match_Criteria from .NSS_Service_Match_Criterion import NSS_Service_Match_Criterion from .NSS_Services import NSS_Services +from .NSS_Services_Connection_Group import NSS_Service_Connection_Group from .NSS_Services_Connection_Groups import NSS_Service_Connection_Groups from .NSS_Services_SDP import NSS_Service_SDP from .NSS_Services_SDPs import NSS_Service_SDPs @@ -57,6 +58,11 @@ def register_ietf_nss(rest_server: RestServer): NSS_Service_Connection_Groups, "/network-slice-services/slice-service=/connection-groups", ) + _add_resource( + rest_server, + NSS_Service_Connection_Group, + "/network-slice-services/slice-service=/connection-groups/connection-group=", + ) _add_resource( rest_server, NSS_Service_Match_Criteria, diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py index 1614a7724..afbbff343 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py @@ -1,10 +1,20 @@ import json import logging import uuid +from typing import Optional from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import Constraint, EndPointId, Slice, SliceStatusEnum -from common.tools.context_queries.Slice import get_slice_by_uuid +from common.proto.context_pb2 import ( + ConfigRule, + Constraint, + DeviceId, + Empty, + EndPointId, + ServiceConfig, + Slice, + SliceStatusEnum, +) +from common.tools.context_queries.Slice import get_slice_by_defualt_name from common.tools.grpc.ConfigRules import update_config_rule_custom from common.tools.grpc.Tools import grpc_message_to_json from context.client import ContextClient @@ -14,18 +24,91 @@ from .YangValidator import YangValidator LOGGER = logging.getLogger(__name__) -RESOURCE_KEY = "ietf_data" +RUNNING_RESOURCE_KEY = "running_ietf_slice" +CANDIDATE_RESOURCE_KEY = "candidate_ietf_slice" ADDRESS_PREFIX = 24 RAISE_IF_DIFFERS = False +def get_custom_config_rule( + service_config: ServiceConfig, resource_key: str +) -> Optional[ConfigRule]: + for cr in service_config.config_rules: + if ( + cr.WhichOneof("config_rule") == "custom" + and cr.custom.resource_key == resource_key + ): + return cr + + +def sort_endpoints(endpoinst_list: list, sdps: list, connection_group: dict) -> list: + src_sdp_id = connection_group["connectivity-construct"][0]["p2p-sender-sdp"] + sdp_id_name_mapping = {sdp["id"]: sdp["node-id"] for sdp in sdps} + if endpoinst_list[0].device_id.device_uuid.uuid == sdp_id_name_mapping[src_sdp_id]: + return endpoinst_list + return endpoinst_list[::-1] + + +def replace_ont_endpoint_with_emu_dc( + endpoint_list: list, context_client: ContextClient +) -> list: + link_list = context_client.ListLinks(Empty()) + links = list(link_list.links) + devices_list = context_client.ListDevices(Empty()) + devices = devices_list.devices + uuid_name_map = {d.device_id.device_uuid.uuid: d.name for d in devices} + uuid_device_map = {d.device_id.device_uuid.uuid: d for d in devices} + name_device_map = {d.name: d for d in devices} + endpoint_id_1 = endpoint_list[0] + device_uuid_1 = endpoint_id_1.device_id.device_uuid.uuid + device_1 = name_device_map[device_uuid_1] + endpoint_id_2 = endpoint_list[1] + device_uuid_2 = endpoint_id_2.device_id.device_uuid.uuid + device_2 = name_device_map[device_uuid_2] + if device_1.controller_id != DeviceId(): + for link in links: + link_endpoints = list(link.link_endpoint_ids) + link_ep_1 = link_endpoints[0] + link_ep_2 = link_endpoints[1] + if ( + device_uuid_1 == uuid_name_map[link_ep_1.device_id.device_uuid.uuid] + and uuid_device_map[link_ep_2.device_id.device_uuid.uuid].device_type + == "emu-datacenter" + ): + endpoint_list[0] = link_ep_2 + break + elif device_2.controller_id != DeviceId(): + for link in links: + link_endpoints = list(link.link_endpoint_ids) + link_ep_1 = link_endpoints[0] + link_ep_2 = link_endpoints[1] + if ( + device_uuid_2 == uuid_name_map[link_ep_1.device_id.device_uuid.uuid] + and uuid_device_map[link_ep_2.device_id.device_uuid.uuid].device_type + == "emu-datacenter" + ): + endpoint_list[1] = link_ep_2 + break + else: + raise Exception( + "one of the sdps should be managed by a controller and the other one should not be controlled" + ) + return endpoint_list + + +def validate_ietf_slice_data(request_data: dict) -> None: + yang_validator = YangValidator("ietf-network-slice-service") + _ = yang_validator.parse_to_dict(request_data) + yang_validator.destroy() + + class IETFSliceHandler: @staticmethod - def create_slice_service(request_data: dict) -> Slice: - yang_validator = YangValidator("ietf-network-slice-service") - _ = yang_validator.parse_to_dict(request_data) - yang_validator.destroy() - + def create_slice_service( + request_data: dict, context_client: ContextClient + ) -> Slice: + request_data = {"network-slice-services": request_data} + validate_ietf_slice_data(request_data) slice_services = request_data["network-slice-services"]["slice-service"] slice_service = slice_services[0] slice_id = slice_service["id"] @@ -66,10 +149,8 @@ class IETFSliceHandler: endpoint_config_rule_fields, ) ) - slice_request.slice_endpoint_ids.extend(list_endpoints) if len(connection_group_ids) != 1: raise Exception("SDPs target-connection-group-id do not match") - LOGGER.debug(f"Connection groups detected: {len(connection_groups)}") list_constraints = [] for cg in connection_groups: if cg["id"] != list(connection_group_ids)[0]: @@ -89,8 +170,14 @@ class IETFSliceHandler: ) list_constraints.append(constraint) break + else: + raise Exception("connection group not found") + list_endpoints = sort_endpoints(list_endpoints, sdps, cg) + list_endpoints = replace_ont_endpoint_with_emu_dc( + list_endpoints, context_client + ) + slice_request.slice_endpoint_ids.extend(list_endpoints) 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 = slice_id slice_request.slice_owner.owner_string = owner @@ -101,7 +188,14 @@ class IETFSliceHandler: name: (value, RAISE_IF_DIFFERS) for name, value in request_data.items() } update_config_rule_custom( - slice_request.slice_config.config_rules, RESOURCE_KEY, ietf_slice_fields + slice_request.slice_config.config_rules, + RUNNING_RESOURCE_KEY, + ietf_slice_fields, + ) + update_config_rule_custom( + slice_request.slice_config.config_rules, + CANDIDATE_RESOURCE_KEY, + ietf_slice_fields, ) for ep_cr_key, ep_cr_fields in endpoint_config_rules: @@ -119,11 +213,14 @@ class IETFSliceHandler: if len(sdps) != 1: raise Exception("Number of SDPs should be 1") new_sdp = sdps[0] - slice_request = get_slice_by_uuid(context_client, slice_uuid) + # slice_request = get_slice_by_uuid(context_client, slice_uuid) + slice_request = get_slice_by_defualt_name( + context_client, slice_uuid, rw_copy=False + ) for cr in slice_request.slice_config.config_rules: if cr.WhichOneof("config_rule") != "custom": continue - if cr.custom.resource_key == RESOURCE_KEY: + if cr.custom.resource_key == CANDIDATE_RESOURCE_KEY: ietf_data = json.loads(cr.custom.resource_value) break else: @@ -134,7 +231,7 @@ class IETFSliceHandler: slice_sdps.append(new_sdp) fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} update_config_rule_custom( - slice_request.slice_config.config_rules, RESOURCE_KEY, fields + slice_request.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields ) return slice_request @@ -142,11 +239,14 @@ class IETFSliceHandler: def delete_sdp( slice_uuid: str, sdp_id: str, context_client: ContextClient ) -> Slice: - slice_request = get_slice_by_uuid(context_client, slice_uuid) + # slice_request = get_slice_by_uuid(context_client, slice_uuid) + slice_request = get_slice_by_defualt_name( + context_client, slice_uuid, rw_copy=False + ) for cr in slice_request.slice_config.config_rules: if cr.WhichOneof("config_rule") != "custom": continue - if cr.custom.resource_key == RESOURCE_KEY: + if cr.custom.resource_key == CANDIDATE_RESOURCE_KEY: ietf_data = json.loads(cr.custom.resource_value) break else: @@ -160,7 +260,7 @@ class IETFSliceHandler: slice_sdps.pop(sdp_idx) fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} update_config_rule_custom( - slice_request.slice_config.config_rules, RESOURCE_KEY, fields + slice_request.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields ) return slice_request @@ -172,11 +272,12 @@ class IETFSliceHandler: if len(connection_groups) != 1: raise Exception("Number of connection groups should be 1") new_connection_group = connection_groups[0] - slice = get_slice_by_uuid(context_client, slice_id) + # slice = get_slice_by_uuid(context_client, slice_id) + slice = get_slice_by_defualt_name(context_client, slice_id, rw_copy=False) for cr in slice.slice_config.config_rules: if cr.WhichOneof("config_rule") != "custom": continue - if cr.custom.resource_key == RESOURCE_KEY: + if cr.custom.resource_key == CANDIDATE_RESOURCE_KEY: ietf_data = json.loads(cr.custom.resource_value) break else: @@ -186,23 +287,24 @@ class IETFSliceHandler: slice_connection_groups = slice_service["connection-groups"]["connection-group"] slice_connection_groups.append(new_connection_group) fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} - update_config_rule_custom(slice.slice_config.config_rules, RESOURCE_KEY, fields) + update_config_rule_custom( + slice.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields + ) + validate_ietf_slice_data(ietf_data) return slice @staticmethod def delete_connection_group( slice_uuid: str, connection_group_id: str, context_client: ContextClient ) -> Slice: - slice_request = get_slice_by_uuid(context_client, slice_uuid) - for cr in slice_request.slice_config.config_rules: - if cr.WhichOneof("config_rule") != "custom": - continue - if cr.custom.resource_key == RESOURCE_KEY: - ietf_data = json.loads(cr.custom.resource_value) - break - else: - raise Exception("ietf data not found") - slice_services = ietf_data["network-slice-services"]["slice-service"] + # slice_request = get_slice_by_uuid(context_client, slice_uuid) + slice_request = get_slice_by_defualt_name( + context_client, slice_uuid, rw_copy=False + ) + slice_config = slice_request.slice_config + cr = get_custom_config_rule(slice_config, CANDIDATE_RESOURCE_KEY) + candidate_ietf_data = json.loads(cr.custom.resource_value) + slice_services = candidate_ietf_data["network-slice-services"]["slice-service"] slice_service = slice_services[0] slice_connection_groups = slice_service["connection-groups"]["connection-group"] sdp_idx = list( @@ -211,27 +313,74 @@ class IETFSliceHandler: for slice_cr in slice_connection_groups ) ).index(True) - slice_connection_groups.pop(sdp_idx) - fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} + removed_connection_group = slice_connection_groups.pop(sdp_idx) + fields = { + name: (value, RAISE_IF_DIFFERS) + for name, value in candidate_ietf_data.items() + } update_config_rule_custom( - slice_request.slice_config.config_rules, RESOURCE_KEY, fields + slice_request.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields ) + # src_sdp_id = removed_connection_group["connectivity-construct"][0][ + # "p2p-sender-sdp" + # ] + # dst_sdp_id = removed_connection_group["connectivity-construct"][0][ + # "p2p-receiver-sdp" + # ] + # cr = get_custom_config_rule(slice_config, RUNNING_RESOURCE_KEY) + # running_ietf_data = json.loads(cr.custom.resource_value) + # slice_services = running_ietf_data["network-slice-services"]["slice-service"] + # slice_service = slice_services[0] + # sdps = slice_service["sdps"]["sdp"] + slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED + # list_endpoints = [] + # for sdp in sdps: + # if sdp["id"] == src_sdp_id: + # attachment_circuits = sdp["attachment-circuits"]["attachment-circuit"] + # if len(attachment_circuits) != 1: + # raise Exception("All SDPs should have 1 attachment-circuit") + # 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 = attachment_circuits[0]["ac-tp-id"] + # list_endpoints.append(endpoint) + # break + # else: + # raise Exception("Second SDP not found") + # for sdp in sdps: + # if sdp["id"] == dst_sdp_id: + # attachment_circuits = sdp["attachment-circuits"]["attachment-circuit"] + # if len(attachment_circuits) != 1: + # raise Exception("All SDPs should have 1 attachment-circuit") + # 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 = attachment_circuits[0]["ac-tp-id"] + # list_endpoints.append(endpoint) + # break + # else: + # raise Exception("SDP not found") + # del slice_request.slice_endpoint_ids[:] + # slice_request.slice_endpoint_ids.extend(list_endpoints) return slice_request @staticmethod def create_match_criteria( - request_data: dict, slice_id: str, sdp_id: str, context_client: ContextClient + request_data: dict, slice_name: str, sdp_id: str, context_client: ContextClient ) -> Slice: match_criteria = request_data["match-criterion"] if len(match_criteria) != 1: raise Exception("Number of SDPs should be 1") new_match_criterion = match_criteria[0] target_connection_group_id = new_match_criterion["target-connection-group-id"] - slice_request = get_slice_by_uuid(context_client, slice_id) + # slice_request = get_slice_by_uuid(context_client, slice_id) + slice_request = get_slice_by_defualt_name( + context_client, slice_name, rw_copy=False + ) for cr in slice_request.slice_config.config_rules: if cr.WhichOneof("config_rule") != "custom": continue - if cr.custom.resource_key == RESOURCE_KEY: + if cr.custom.resource_key == CANDIDATE_RESOURCE_KEY: ietf_data = json.loads(cr.custom.resource_value) break else: @@ -277,9 +426,6 @@ class IETFSliceHandler: break else: raise Exception("SDP not found") - del slice_request.slice_endpoint_ids[:] - slice_request.slice_endpoint_ids.extend(list_endpoints) - LOGGER.debug(f"Connection groups detected: {len(connection_groups)}") list_constraints = [] for cg in connection_groups: if cg["id"] != target_connection_group_id: @@ -300,13 +446,18 @@ class IETFSliceHandler: list_constraints.append(constraint) break else: - raise Exception("Connection group not found") + raise Exception("connection group not found") del slice_request.slice_constraints[:] + # del slice_request.slice_endpoint_ids[:] + # list_endpoints = sort_endpoints(list_endpoints, sdps, cg) + # list_endpoints = replace_ont_endpoint_with_emu_dc( + # list_endpoints, context_client + # ) + # slice_request.slice_endpoint_ids.extend(list_endpoints) slice_request.slice_constraints.extend(list_constraints) - LOGGER.debug(grpc_message_to_json(slice_request)) # TODO remove fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} update_config_rule_custom( - slice_request.slice_config.config_rules, RESOURCE_KEY, fields + slice_request.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields ) return slice_request @@ -317,12 +468,14 @@ class IETFSliceHandler: match_criterion_id: int, context_client: ContextClient, ) -> Slice: - slice_request = get_slice_by_uuid(context_client, slice_uuid) - slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED + # slice_request = get_slice_by_uuid(context_client, slice_uuid) + slice_request = get_slice_by_defualt_name( + context_client, slice_uuid, rw_copy=False + ) for cr in slice_request.slice_config.config_rules: if cr.WhichOneof("config_rule") != "custom": continue - if cr.custom.resource_key == RESOURCE_KEY: + if cr.custom.resource_key == CANDIDATE_RESOURCE_KEY: ietf_data = json.loads(cr.custom.resource_value) break else: @@ -343,6 +496,32 @@ class IETFSliceHandler: raise Exception("Second SDP not found") fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} update_config_rule_custom( - slice_request.slice_config.config_rules, RESOURCE_KEY, fields + slice_request.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields + ) + return slice_request + + @staticmethod + def copy_candidate_ietf_slice_data_to_running( + slice_uuid: str, context_client: ContextClient + ) -> Slice: + # slice_request = get_slice_by_uuid(context_client, slice_uuid) + slice_request = get_slice_by_defualt_name( + context_client, slice_uuid, rw_copy=False + ) + for cr in slice_request.slice_config.config_rules: + if ( + cr.WhichOneof("config_rule") == "custom" + and cr.custom.resource_key == CANDIDATE_RESOURCE_KEY + ): + candidate_resource_value_dict = json.loads(cr.custom.resource_value) + fields = { + name: (value, RAISE_IF_DIFFERS) + for name, value in candidate_resource_value_dict.items() + } + break + else: + raise Exception("candidate ietf slice data not found") + update_config_rule_custom( + slice_request.slice_config.config_rules, RUNNING_RESOURCE_KEY, fields ) return slice_request diff --git a/src/nbi/tests/data/camara-e2e-topology.json b/src/nbi/tests/data/camara-e2e-topology.json new file mode 100644 index 000000000..632cb99a2 --- /dev/null +++ b/src/nbi/tests/data/camara-e2e-topology.json @@ -0,0 +1,1662 @@ +{ + "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": "agg-net-controller" + } + }, + "name": "agg-net-controller", + "device_type": "ietf-slice", + "device_operational_status": 1, + "device_drivers": [ + 14 + ], + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "10.1.7.194" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "80" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + } + ], + "scheme": "http", + "username": "admin", + "password": "admin", + "base_url": "/restconf/v2/data", + "timeout": 120, + "verify": false + } + } + } + ] + }, + "device_endpoints": [] + }, + { + "device_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "name": "nce-controller", + "device_type": "nce", + "device_operational_status": 1, + "device_drivers": [ + 15 + ], + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "10.1.7.194" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "80" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + } + ], + "scheme": "http", + "username": "admin", + "password": "admin", + "base_url": "/restconf/v2/data", + "timeout": 120, + "verify": false + } + } + } + ] + }, + "device_endpoints": [] + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "name": "172.16.182.25", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 14 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "ce-ip": "128.32.33.2", + "address_ip": "128.32.33.254", + "address_prefix": "24", + "site_location": "access", + "mtu": "1500", + "ipv4_lan_prefixes": [ + { + "lan": "128.32.10.0/24", + "lan_tag": "10" + }, + { + "lan": "128.32.20.0/24", + "lan_tag": "20" + } + ] + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "name": "172.16.185.31", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 14 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "name": "172.16.185.33", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 14 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "name": "172.16.185.32", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 14 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "ce-ip": "172.10.33.2", + "address_ip": "172.10.33.254", + "address_prefix": "24", + "site_location": "cloud", + "mtu": "1500", + "ipv4_lan_prefixes": [ + { + "lan": "172.1.101.0/24", + "lan_tag": "101" + } + ] + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "name": "172.16.58.10", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 15 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "address_ip": "0.0.0.0", + "address_prefix": "24" + }, + { + "uuid": "201", + "name": "201", + "type": "optical", + "address_ip": "0.0.0.0", + "address_prefix": "24" + }, + { + "uuid": "500", + "name": "500", + "type": "optical", + "address_ip": "128.32.33.2", + "address_prefix": "24" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "name": "172.16.61.10", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 15 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "address_ip": "0.0.0.0", + "address_prefix": "24" + }, + { + "uuid": "500", + "name": "500", + "type": "optical", + "address_ip": "128.32.33.2", + "address_prefix": "24" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "name": "172.16.61.11", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 15 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "address_ip": "0.0.0.0", + "address_prefix": "24" + }, + { + "uuid": "500", + "name": "500", + "type": "optical", + "address_ip": "128.32.33.2", + "address_prefix": "24" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.221" + } + }, + "device_type": "emu-datacenter", + "device_drivers": [ + 0 + ], + "device_endpoints": [], + "device_operational_status": 1, + "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", + "uuid": "eth0" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.222" + } + }, + "device_type": "emu-datacenter", + "device_drivers": [ + 0 + ], + "device_endpoints": [], + "device_operational_status": 1, + "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", + "uuid": "eth0" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "device_type": "emu-datacenter", + "device_drivers": [ + 0 + ], + "device_endpoints": [], + "device_operational_status": 1, + "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", + "uuid": "500" + }, + { + "sample_types": [], + "type": "optical", + "uuid": "200" + }, + { + "sample_types": [], + "type": "optical", + "uuid": "201" + } + ] + } + } + } + ] + } + } + ], + "links": [ + { + "link_id": { + "link_uuid": { + "uuid": "nce-controller/mgmt==172.16.61.11/mgmt" + } + }, + "name": "nce-controller/mgmt==172.16.61.11/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "nce-controller/mgmt==172.16.61.10/mgmt" + } + }, + "name": "nce-controller/mgmt==172.16.61.10/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "nce-controller/mgmt==172.16.58.10/mgmt" + } + }, + "name": "nce-controller/mgmt==172.16.58.10/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==172.16.185.33/mgmt" + } + }, + "name": "agg-net-controller/mgmt==172.16.185.33/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==172.16.185.31/mgmt" + } + }, + "name": "agg-net-controller/mgmt==172.16.185.31/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==172.16.182.25/mgmt" + } + }, + "name": "agg-net-controller/mgmt==172.16.182.25/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==172.16.182.25/mgmt" + } + }, + "name": "agg-net-controller/mgmt==172.16.182.25/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-500" + } + }, + "name": "172.16.182.25-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.33-500" + } + }, + "name": "172.16.185.33-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-501" + } + }, + "name": "172.16.182.25-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.31-501" + } + }, + "name": "172.16.185.31-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.31-500" + } + }, + "name": "172.16.185.31-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-500" + } + }, + "name": "172.16.185.32-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.33-501" + } + }, + "name": "172.16.185.33-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-501" + } + }, + "name": "172.16.185.32-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-200" + } + }, + "name": "172.16.185.32-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.204.220-500" + } + }, + "name": "172.16.204.220-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-200" + } + }, + "name": "172.16.182.25-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.58.10-500" + } + }, + "name": "172.16.58.10-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.58.10-200" + } + }, + "name": "172.16.58.10-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.61.10-500" + } + }, + "name": "172.16.61.10-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.58.10-201" + } + }, + "name": "172.16.58.10-201", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "201" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.61.11-500" + } + }, + "name": "172.16.61.11-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "201" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.61.10-200" + } + }, + "name": "172.16.61.10-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.221" + } + }, + "endpoint_uuid": { + "uuid": "eth0" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.104.221-eth0" + } + }, + "name": "172.16.104.221-eth0", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.221" + } + }, + "endpoint_uuid": { + "uuid": "eth0" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.61.11-200" + } + }, + "name": "172.16.61.11-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.222" + } + }, + "endpoint_uuid": { + "uuid": "eth0" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.104.222-eth0" + } + }, + "name": "172.16.104.222-eth0", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.222" + } + }, + "endpoint_uuid": { + "uuid": "eth0" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/src/nbi/tests/data/slice/post_connection_group_to_network_slice1.json b/src/nbi/tests/data/slice/post_connection_group_to_network_slice1.json index a0c6e0def..d39a837bd 100644 --- a/src/nbi/tests/data/slice/post_connection_group_to_network_slice1.json +++ b/src/nbi/tests/data/slice/post_connection_group_to_network_slice1.json @@ -6,10 +6,8 @@ "connectivity-construct": [ { "id": 1, - "p2mp-sender-sdp": "1", - "p2mp-receiver-sdp": [ - "3" - ], + "p2p-sender-sdp": "1", + "p2p-receiver-sdp": "3", "service-slo-sle-policy": { "slo-policy": { "metric-bound": [ @@ -34,10 +32,8 @@ }, { "id": 2, - "p2mp-sender-sdp": "3", - "p2mp-receiver-sdp": [ - "1" - ], + "p2p-sender-sdp": "3", + "p2p-receiver-sdp": "1", "service-slo-sle-policy": { "slo-policy": { "metric-bound": [ diff --git a/src/nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice1.json b/src/nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice1.json index 8d8c92a81..16a36d45b 100644 --- a/src/nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice1.json +++ b/src/nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice1.json @@ -4,7 +4,7 @@ "index": 2, "match-type": [ { - "type": "ietf-nss ietf-network-slice-service:vlan", + "type": "ietf-network-slice-service:vlan", "value": [ "101" ] diff --git a/src/nbi/tests/data/slice/post_network_slice1.json b/src/nbi/tests/data/slice/post_network_slice1.json index 68ab28385..e6e0ee90a 100644 --- a/src/nbi/tests/data/slice/post_network_slice1.json +++ b/src/nbi/tests/data/slice/post_network_slice1.json @@ -1,190 +1,188 @@ { - "network-slice-services": { - "slice-service": [ - { - "id": "slice1", - "description": "network slice 1, connect to VM1", - "sdps": { - "sdp": [ - { - "id": "1", - "node-id": "172.16.204.220", - "sdp-ip-address": [ - "172.16.204.220" - ], - "service-match-criteria": { - "match-criterion": [ - { - "index": 1, - "match-type": [ - { - "type": "ietf-network-slice-service:vlan", - "value": [ - "101" - ] - }, - { - "type": "ietf-network-slice-service:destination-ip-prefix", - "value": [ - "172.16.104.221/24" - ] - }, + "slice-service": [ + { + "id": "slice1", + "description": "network slice 1, connect to VM1", + "sdps": { + "sdp": [ + { + "id": "1", + "node-id": "172.16.204.220", + "sdp-ip-address": [ + "172.16.204.220" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "101" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC POP to VM1", + "description": "AC VM1 connected to POP", + "ac-node-id": "172.16.204.220", + "ac-tp-id": "200" + } + ] + } + }, + { + "id": "2", + "node-id": "172.16.61.10", + "sdp-ip-address": [ + "172.16.61.10" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "21" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC ONT", + "description": "AC connected to PC1", + "ac-node-id": "172.16.61.10", + "ac-tp-id": "200" + } + ] + } + } + ] + }, + "connection-groups": { + "connection-group": [ + { + "id": "line1", + "connectivity-type": "point-to-point", + "connectivity-construct": [ + { + "id": 1, + "p2p-sender-sdp": "1", + "p2p-receiver-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ { - "type": "ietf-network-slice-service:destination-tcp-port", - "value": [ - "10500" - ] + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "10" }, { - "type": "ietf-network-slice-service:source-ip-prefix", - "value": [ - "172.1.101.22/24" - ] + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "5000" }, { - "type": "ietf-network-slice-service:source-tcp-port", - "value": [ - "10200" - ] + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" } - ], - "target-connection-group-id": "line1" + ] } - ] + } }, - "attachment-circuits": { - "attachment-circuit": [ - { - "id": "AC POP to VM1", - "description": "AC VM1 connected to POP", - "ac-node-id": "172.16.204.220", - "ac-tp-id": "200" - } - ] - } - }, - { - "id": "2", - "node-id": "172.16.61.10", - "sdp-ip-address": [ - "172.16.61.10" - ], - "service-match-criteria": { - "match-criterion": [ - { - "index": 1, - "match-type": [ - { - "type": "ietf-network-slice-service:vlan", - "value": [ - "21" - ] - }, + { + "id": 2, + "p2p-sender-sdp": "2", + "p2p-receiver-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ { - "type": "ietf-network-slice-service:source-ip-prefix", - "value": [ - "172.16.104.221/24" - ] + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "20" }, { - "type": "ietf-network-slice-service:source-tcp-port", - "value": [ - "10500" - ] + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "1000" }, { - "type": "ietf-network-slice-service:destination-ip-prefix", - "value": [ - "172.1.101.22/24" - ] - }, - { - "type": "ietf-network-slice-service:destination-tcp-port", - "value": [ - "10200" - ] + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" } - ], - "target-connection-group-id": "line1" - } - ] - }, - "attachment-circuits": { - "attachment-circuit": [ - { - "id": "AC ONT", - "description": "AC connected to PC1", - "ac-node-id": "172.16.61.10", - "ac-tp-id": "200" - } - ] - } - } - ] - }, - "connection-groups": { - "connection-group": [ - { - "id": "line1", - "connectivity-type": "point-to-point", - "connectivity-construct": [ - { - "id": 1, - "p2p-sender-sdp": "1", - "p2p-receiver-sdp": "2", - "service-slo-sle-policy": { - "slo-policy": { - "metric-bound": [ - { - "metric-type": "ietf-network-slice-service:one-way-delay-maximum", - "metric-unit": "milliseconds", - "bound": "10" - }, - { - "metric-type": "ietf-network-slice-service:one-way-bandwidth", - "metric-unit": "Mbps", - "bound": "5000" - }, - { - "metric-type": "ietf-network-slice-service:two-way-packet-loss", - "metric-unit": "percentage", - "percentile-value": "0.001" - } - ] - } - } - }, - { - "id": 2, - "p2p-sender-sdp": "2", - "p2p-receiver-sdp": "1", - "service-slo-sle-policy": { - "slo-policy": { - "metric-bound": [ - { - "metric-type": "ietf-network-slice-service:one-way-delay-maximum", - "metric-unit": "milliseconds", - "bound": "20" - }, - { - "metric-type": "ietf-network-slice-service:one-way-bandwidth", - "metric-unit": "Mbps", - "bound": "1000" - }, - { - "metric-type": "ietf-network-slice-service:two-way-packet-loss", - "metric-unit": "percentage", - "percentile-value": "0.001" - } - ] - } + ] } } - ] - } - ] - } + } + ] + } + ] } - ] - } + } + ] } \ No newline at end of file diff --git a/src/nbi/tests/test_slice_2.py b/src/nbi/tests/test_slice_2.py index cfd98852f..5722e3d92 100644 --- a/src/nbi/tests/test_slice_2.py +++ b/src/nbi/tests/test_slice_2.py @@ -13,13 +13,29 @@ # limitations under the License. import json +from typing import Optional -from common.proto.context_pb2 import SliceList +from common.proto.context_pb2 import ConfigRule, ServiceConfig, SliceList from context.client.ContextClient import ContextClient from nbi.service.rest_server.nbi_plugins.ietf_network_slice.ietf_slice_handler import ( IETFSliceHandler, ) + +def get_custom_config_rule( + service_config: ServiceConfig, resource_key: str +) -> Optional[ConfigRule]: + for cr in service_config.config_rules: + if ( + cr.WhichOneof("config_rule") == "custom" + and cr.custom.resource_key == resource_key + ): + return cr + + +RUNNING_RESOURCE_KEY = "running_ietf_slice" +CANDIDATE_RESOURCE_KEY = "candidate_ietf_slice" + context_client = ContextClient() with open("nbi/tests/data/slice/post_network_slice1.json", mode="r") as f: @@ -51,8 +67,12 @@ def test_create_slice(): global slice_1 slice_1 = IETFSliceHandler.create_slice_service(post_slice_request) - ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) - assert ietf_data == post_slice_request + candidate_ietf_data = json.loads( + get_custom_config_rule( + slice_1.slice_config, CANDIDATE_RESOURCE_KEY + ).custom.resource_value + ) + assert candidate_ietf_data["network-slice-services"] == post_slice_request assert slice_1.slice_endpoint_ids[0].device_id.device_uuid.uuid == "172.16.204.220" assert slice_1.slice_endpoint_ids[1].device_id.device_uuid.uuid == "172.16.61.10" assert slice_1.slice_id.slice_uuid.uuid == "slice1" @@ -64,8 +84,12 @@ def test_create_sdp(monkeypatch): monkeypatch.setattr(context_client, "SelectSlice", select_slice) slice_1 = IETFSliceHandler.create_sdp(post_sdp_request, "slice1", context_client) - ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) - slice_services = ietf_data["network-slice-services"]["slice-service"] + candidate_ietf_data = json.loads( + get_custom_config_rule( + slice_1.slice_config, CANDIDATE_RESOURCE_KEY + ).custom.resource_value + ) + slice_services = candidate_ietf_data["network-slice-services"]["slice-service"] slice_service = slice_services[0] slice_sdps = slice_service["sdps"]["sdp"] assert len(slice_sdps) == 3 @@ -79,8 +103,12 @@ def test_create_connection_group(monkeypatch): slice_1 = IETFSliceHandler.create_connection_group( post_connection_group_request, "slice1", context_client ) - ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) - slice_services = ietf_data["network-slice-services"]["slice-service"] + candidate_ietf_data = json.loads( + get_custom_config_rule( + slice_1.slice_config, CANDIDATE_RESOURCE_KEY + ).custom.resource_value + ) + slice_services = candidate_ietf_data["network-slice-services"]["slice-service"] slice_service = slice_services[0] slice_connection_groups = slice_service["connection-groups"]["connection-group"] @@ -97,16 +125,22 @@ def test_create_match_criteria(monkeypatch): slice_1 = IETFSliceHandler.create_match_criteria( post_match_criteria_request, "slice1", "1", context_client ) - ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) - slice_services = ietf_data["network-slice-services"]["slice-service"] + candidate_ietf_data = json.loads( + get_custom_config_rule( + slice_1.slice_config, CANDIDATE_RESOURCE_KEY + ).custom.resource_value + ) + slice_services = candidate_ietf_data["network-slice-services"]["slice-service"] slice_service = slice_services[0] slice_sdps = slice_service["sdps"]["sdp"] sdp1_match_criteria = slice_sdps[0]["service-match-criteria"]["match-criterion"] + + slice_1 = IETFSliceHandler.copy_candidate_ietf_slice_data_to_running("slice1", context_client) assert len(sdp1_match_criteria) == 2 assert sdp1_match_criteria[0]["target-connection-group-id"] == "line1" assert sdp1_match_criteria[1]["target-connection-group-id"] == "line2" - assert slice_1.slice_endpoint_ids[0].device_id.device_uuid.uuid == "172.16.61.11" - assert slice_1.slice_endpoint_ids[1].device_id.device_uuid.uuid == "172.16.204.220" + assert slice_1.slice_endpoint_ids[0].device_id.device_uuid.uuid == "172.16.204.220" + assert slice_1.slice_endpoint_ids[1].device_id.device_uuid.uuid == "172.16.61.11" def test_delete_sdp(monkeypatch): @@ -115,8 +149,12 @@ def test_delete_sdp(monkeypatch): monkeypatch.setattr(context_client, "SelectSlice", select_slice) slice_1 = IETFSliceHandler.delete_sdp("slice1", "3", context_client) - ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) - slice_services = ietf_data["network-slice-services"]["slice-service"] + candidate_ietf_data = json.loads( + get_custom_config_rule( + slice_1.slice_config, CANDIDATE_RESOURCE_KEY + ).custom.resource_value + ) + slice_services = candidate_ietf_data["network-slice-services"]["slice-service"] slice_service = slice_services[0] slice_sdps = slice_service["sdps"]["sdp"] assert len(slice_sdps) == 2 @@ -127,12 +165,21 @@ def test_delete_connection_group(monkeypatch): global slice_1 monkeypatch.setattr(context_client, "SelectSlice", select_slice) - + running_ietf_data = json.loads( + get_custom_config_rule( + slice_1.slice_config, RUNNING_RESOURCE_KEY + ).custom.resource_value + ) slice_1 = IETFSliceHandler.delete_connection_group( "slice1", "line2", context_client ) - ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) - slice_services = ietf_data["network-slice-services"]["slice-service"] + + candidate_ietf_data = json.loads( + get_custom_config_rule( + slice_1.slice_config, CANDIDATE_RESOURCE_KEY + ).custom.resource_value + ) + slice_services = candidate_ietf_data["network-slice-services"]["slice-service"] slice_service = slice_services[0] slice_connection_groups = slice_service["connection-groups"]["connection-group"] assert len(slice_connection_groups) == 1 @@ -145,8 +192,12 @@ def test_delete_match_criteria(monkeypatch): monkeypatch.setattr(context_client, "SelectSlice", select_slice) slice_1 = IETFSliceHandler.delete_match_criteria("slice1", "1", 2, context_client) - ietf_data = json.loads(slice_1.slice_config.config_rules[0].custom.resource_value) - slice_services = ietf_data["network-slice-services"]["slice-service"] + candidate_ietf_data = json.loads( + get_custom_config_rule( + slice_1.slice_config, CANDIDATE_RESOURCE_KEY + ).custom.resource_value + ) + slice_services = candidate_ietf_data["network-slice-services"]["slice-service"] slice_service = slice_services[0] slice_sdps = slice_service["sdps"]["sdp"] sdp1_match_criteria = slice_sdps[0]["service-match-criteria"]["match-criterion"] -- GitLab From c96fa8bcb1f290308c356168b879d54334d5dfc4 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 17:01:42 +0000 Subject: [PATCH 113/463] Moving features outside this issue --- .../service/database/models/enums/LinkType.py | 32 ----------- .../nbi_plugins/tfs_api/Resources.py | 21 ++------ .../nbi_plugins/tfs_api/__init__.py | 53 +++++++++---------- 3 files changed, 29 insertions(+), 77 deletions(-) delete mode 100644 src/context/service/database/models/enums/LinkType.py diff --git a/src/context/service/database/models/enums/LinkType.py b/src/context/service/database/models/enums/LinkType.py deleted file mode 100644 index 1ac1a547f..000000000 --- a/src/context/service/database/models/enums/LinkType.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 enum, functools -from common.proto.context_pb2 import LinkTypeEnum -from ._GrpcToEnum import grpc_to_enum - -# IMPORTANT: Entries of enum class ORM_DeviceDriverEnum should be named as in -# the proto files removing the prefixes. For example, proto item -# DeviceDriverEnum.DEVICEDRIVER_OPENCONFIG should be included as -# OPENCONFIG. If item name does not match, automatic mapping of -# proto enums to database enums will fail. -class ORM_LinkTypeEnum(enum.Enum): - UNKNOWN = LinkTypeEnum.LINKTYPE_UNKNOWN - COPPER = LinkTypeEnum.LINKTYPE_COPPER - VIRTUAL_COPPER = LinkTypeEnum.LINKTYPE_VIRTUAL_COPPER - OPTICAL = LinkTypeEnum.LINKTYPE_OPTICAL - VIRTUAL_OPTICAL = LinkTypeEnum.LINKTYPE_VIRTUAL_OPTICAL - -grpc_to_enum__link_type_enum = functools.partial( - grpc_to_enum, LinkTypeEnum, ORM_LinkTypeEnum) diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py index 0b99fba50..eaa213525 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py @@ -177,11 +177,6 @@ class Topology(_Resource): def delete(self, context_uuid : str, topology_uuid : str): return format_grpc_to_json(self.context_client.RemoveTopology(grpc_topology_id(context_uuid, topology_uuid))) -class TopologyDetails(_Resource): - def get(self, context_uuid : str, topology_uuid : str): - return format_grpc_to_json(self.context_client.GetTopologyDetails(grpc_topology_id( - context_uuid, topology_uuid))) - class ServiceIds(_Resource): def get(self, context_uuid : str): return format_grpc_to_json(self.context_client.ListServiceIds(grpc_context_id(context_uuid))) @@ -300,31 +295,21 @@ class Links(_Resource): ] class Link(_Resource): - @staticmethod - def _virtual_link(link): - virtual_types = {LinkTypeEnum.LINKTYPE_VIRTUAL_COPPER, LinkTypeEnum.LINKTYPE_VIRTUAL_OPTICAL} - if link.link_type in virtual_types: - return True - return False - - def get(self, link_uuid : str): return format_grpc_to_json(self.context_client.GetLink(grpc_link_id(link_uuid))) def put(self, link_uuid : str): link_json = request.get_json() link = grpc_link(link_json) + virtual_types = {LinkTypeEnum.LINKTYPE_VIRTUAL_COPPER, LinkTypeEnum.LINKTYPE_VIRTUAL_OPTICAL} if link_uuid != link.link_id.link_uuid.uuid: raise BadRequest('Mismatching link_uuid') - elif self._virtual_link(link): + elif link.link_type in virtual_types: link = grpc_link(link_json) return format_grpc_to_json(self.vntmanager_client.SetVirtualLink(link)) - return format_grpc_to_json(self.context_client.SetLink(link)) + return format_grpc_to_json(self.context_client.SetLink(grpc_link(link))) def delete(self, link_uuid : str): - link = self.context_client.GetLink(grpc_link_id(link_uuid)) - if self._virtual_link(link): - format_grpc_to_json(self.vntmanager_client.RemoveVirtualLink(grpc_link_id(link_uuid))) return format_grpc_to_json(self.context_client.RemoveLink(grpc_link_id(link_uuid))) class ConnectionIds(_Resource): diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py index 944644d57..304a32648 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py @@ -22,7 +22,7 @@ from .Resources import ( PolicyRule, PolicyRuleIds, PolicyRules, Service, ServiceIds, Services, Slice, SliceIds, Slices, - Topologies, Topology, TopologyIds, TopologyDetails + Topologies, Topology, TopologyIds ) URL_PREFIX = '/tfs-api' @@ -30,39 +30,38 @@ URL_PREFIX = '/tfs-api' # Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. RESOURCES = [ # (endpoint_name, resource_class, resource_url) - ('api.context_ids', ContextIds, '/context_ids'), - ('api.contexts', Contexts, '/contexts'), - ('api.dummy_contexts', DummyContexts, '/dummy_contexts'), - ('api.context', Context, '/context/'), + ('api.context_ids', ContextIds, '/context_ids'), + ('api.contexts', Contexts, '/contexts'), + ('api.dummy_contexts', DummyContexts, '/dummy_contexts'), + ('api.context', Context, '/context/'), - ('api.topology_ids', TopologyIds, '/context//topology_ids'), - ('api.topologies', Topologies, '/context//topologies'), - ('api.topology', Topology, '/context//topology/'), - ('api.topology_details', TopologyDetails, '/context//topology_details/'), + ('api.topology_ids', TopologyIds, '/context//topology_ids'), + ('api.topologies', Topologies, '/context//topologies'), + ('api.topology', Topology, '/context//topology/'), - ('api.service_ids', ServiceIds, '/context//service_ids'), - ('api.services', Services, '/context//services'), - ('api.service', Service, '/context//service/'), + ('api.service_ids', ServiceIds, '/context//service_ids'), + ('api.services', Services, '/context//services'), + ('api.service', Service, '/context//service/'), - ('api.slice_ids', SliceIds, '/context//slice_ids'), - ('api.slices', Slices, '/context//slices'), - ('api.slice', Slice, '/context//slice/'), + ('api.slice_ids', SliceIds, '/context//slice_ids'), + ('api.slices', Slices, '/context//slices'), + ('api.slice', Slice, '/context//slice/'), - ('api.device_ids', DeviceIds, '/device_ids'), - ('api.devices', Devices, '/devices'), - ('api.device', Device, '/device/'), + ('api.device_ids', DeviceIds, '/device_ids'), + ('api.devices', Devices, '/devices'), + ('api.device', Device, '/device/'), - ('api.link_ids', LinkIds, '/link_ids'), - ('api.links', Links, '/links'), - ('api.link', Link, '/link/'), + ('api.link_ids', LinkIds, '/link_ids'), + ('api.links', Links, '/links'), + ('api.link', Link, '/link/'), - ('api.connection_ids', ConnectionIds, '/context//service//connection_ids'), - ('api.connections', Connections, '/context//service//connections'), - ('api.connection', Connection, '/connection/'), + ('api.connection_ids', ConnectionIds, '/context//service//connection_ids'), + ('api.connections', Connections, '/context//service//connections'), + ('api.connection', Connection, '/connection/'), - ('api.policyrule_ids', PolicyRuleIds, '/policyrule_ids'), - ('api.policyrules', PolicyRules, '/policyrules'), - ('api.policyrule', PolicyRule, '/policyrule/'), + ('api.policyrule_ids', PolicyRuleIds, '/policyrule_ids'), + ('api.policyrules', PolicyRules, '/policyrules'), + ('api.policyrule', PolicyRule, '/policyrule/'), ] def register_tfs_api(rest_server : RestServer): -- GitLab From 8b314e43e07f804a99903e818347ab7f6641203a Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 17:07:34 +0000 Subject: [PATCH 114/463] ECOC24 test: - Add deployment of optical controller component in optical SDN controller --- src/tests/ecoc24/deploy_specs_opt.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tests/ecoc24/deploy_specs_opt.sh b/src/tests/ecoc24/deploy_specs_opt.sh index ca650bb65..5c2467831 100755 --- a/src/tests/ecoc24/deploy_specs_opt.sh +++ b/src/tests/ecoc24/deploy_specs_opt.sh @@ -38,11 +38,11 @@ export TFS_COMPONENTS="context device pathcomp service nbi webui" # To manage optical connections, "service" requires "opticalcontroller" to be deployed # before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the # "opticalcontroller" only if "service" is already in TFS_COMPONENTS, and re-export it. -#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then -# BEFORE="${TFS_COMPONENTS% service*}" -# AFTER="${TFS_COMPONENTS#* service}" -# export TFS_COMPONENTS="${BEFORE} opticalcontroller service ${AFTER}" -#fi +if [[ "$TFS_COMPONENTS" == *"service"* ]]; then + BEFORE="${TFS_COMPONENTS% service*}" + AFTER="${TFS_COMPONENTS#* service}" + export TFS_COMPONENTS="${BEFORE} opticalcontroller service ${AFTER}" +fi # Uncomment to activate ZTP #export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" -- GitLab From b2f534b6345ccea187c80a6ebc11eb4aefe2b7c1 Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 24 Dec 2024 18:12:20 +0100 Subject: [PATCH 115/463] enhancement: - slice retrieval helper functions added - copy_config_rules function changed to support raise_if_differs in arguments - deepdiff added to to service component requirements - slice retrieval by slice name added in create_update function of slice service --- src/common/tools/context_queries/Slice.py | 107 +++++++++++++++++- src/common/tools/grpc/ConfigRules.py | 3 +- .../algorithms/tools/ComposeConfigRules.py | 6 +- src/service/requirements.in | 1 + src/slice/service/SliceServiceServicerImpl.py | 12 +- 5 files changed, 117 insertions(+), 12 deletions(-) diff --git a/src/common/tools/context_queries/Slice.py b/src/common/tools/context_queries/Slice.py index c826c59ce..41bfb686b 100644 --- a/src/common/tools/context_queries/Slice.py +++ b/src/common/tools/context_queries/Slice.py @@ -12,12 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -import grpc, logging -from typing import Optional +import logging +from typing import Optional, Tuple, Union +from uuid import UUID, uuid5 + +import grpc + from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import Slice, SliceFilter, SliceId +from common.method_wrappers.ServiceExceptions import InvalidArgumentsException +from common.proto.context_pb2 import ContextId, Slice, SliceFilter, SliceId from context.client.ContextClient import ContextClient + +NAMESPACE_TFS = UUID("200e3a1f-2223-534f-a100-758e29c37f40") + LOGGER = logging.getLogger(__name__) def get_slice_by_id( @@ -59,3 +67,96 @@ def get_slice_by_uuid( context_client, slice_id, rw_copy=rw_copy, include_endpoint_ids=include_endpoint_ids, include_constraints=include_constraints, include_service_ids=include_service_ids, include_subslice_ids=include_subslice_ids, include_config_rules=include_config_rules) + + +def get_uuid_from_string( + str_uuid_or_name: Union[str, UUID], prefix_for_name: Optional[str] = None +) -> str: + # if UUID given, assume it is already a valid UUID + if isinstance(str_uuid_or_name, UUID): + return str_uuid_or_name + if not isinstance(str_uuid_or_name, str): + MSG = "Parameter({:s}) cannot be used to produce a UUID" + raise Exception(MSG.format(str(repr(str_uuid_or_name)))) + try: + # try to parse as UUID + return str(UUID(str_uuid_or_name)) + except: # pylint: disable=bare-except + # produce a UUID within TFS namespace from parameter + if prefix_for_name is not None: + str_uuid_or_name = "{:s}/{:s}".format(prefix_for_name, str_uuid_or_name) + return str(uuid5(NAMESPACE_TFS, str_uuid_or_name)) + + +def context_get_uuid( + context_id: ContextId, + context_name: str = "", + allow_random: bool = False, + allow_default: bool = False, +) -> str: + context_uuid = context_id.context_uuid.uuid + + if len(context_uuid) > 0: + return get_uuid_from_string(context_uuid) + if len(context_name) > 0: + return get_uuid_from_string(context_name) + if allow_default: + return get_uuid_from_string(DEFAULT_CONTEXT_NAME) + + raise InvalidArgumentsException( + [ + ("context_id.context_uuid.uuid", context_uuid), + ("name", context_name), + ], + extra_details=["At least one is required to produce a Context UUID"], + ) + + +def slice_get_uuid(slice_id: SliceId) -> Tuple[str, str]: + context_uuid = context_get_uuid(slice_id.context_id, allow_random=False) + raw_slice_uuid = slice_id.slice_uuid.uuid + + if len(raw_slice_uuid) > 0: + return context_uuid, get_uuid_from_string( + raw_slice_uuid, prefix_for_name=context_uuid + ) + + raise InvalidArgumentsException( + [ + ("slice_id.slice_uuid.uuid", raw_slice_uuid), + ], + extra_details=["At least one is required to produce a Slice UUID"], + ) + +def get_slice_by_defualt_id( + context_client : ContextClient, default_slice_id : SliceId, context_uuid : str = DEFAULT_CONTEXT_NAME, + rw_copy : bool = False, include_endpoint_ids : bool = True, include_constraints : bool = True, + include_service_ids : bool = True, include_subslice_ids : bool = True, include_config_rules : bool = True +) -> Optional[Slice]: + context_uuid, slice_uuid = slice_get_uuid(default_slice_id) + LOGGER.debug(f'P60: {context_uuid} {slice_uuid}') + slice_id = SliceId() + slice_id.context_id.context_uuid.uuid = context_uuid # pylint: disable=no-member + slice_id.slice_uuid.uuid = slice_uuid # pylint: disable=no-member + return get_slice_by_id( + context_client, slice_id, rw_copy=rw_copy, include_endpoint_ids=include_endpoint_ids, + include_constraints=include_constraints, include_service_ids=include_service_ids, + include_subslice_ids=include_subslice_ids, include_config_rules=include_config_rules) + + +def get_slice_by_defualt_name( + context_client : ContextClient, slice_name : str, context_uuid : str = DEFAULT_CONTEXT_NAME, + rw_copy : bool = False, include_endpoint_ids : bool = True, include_constraints : bool = True, + include_service_ids : bool = True, include_subslice_ids : bool = True, include_config_rules : bool = True +) -> Optional[Slice]: + default_slice_id = SliceId() + default_slice_id.context_id.context_uuid.uuid = context_uuid # pylint: disable=no-member + default_slice_id.slice_uuid.uuid = slice_name # pylint: disable=no-member + context_uuid, slice_uuid = slice_get_uuid(default_slice_id) + slice_id = SliceId() + slice_id.context_id.context_uuid.uuid = context_uuid # pylint: disable=no-member + slice_id.slice_uuid.uuid = slice_uuid # pylint: disable=no-member + return get_slice_by_id( + context_client, slice_id, rw_copy=rw_copy, include_endpoint_ids=include_endpoint_ids, + include_constraints=include_constraints, include_service_ids=include_service_ids, + include_subslice_ids=include_subslice_ids, include_config_rules=include_config_rules) \ No newline at end of file diff --git a/src/common/tools/grpc/ConfigRules.py b/src/common/tools/grpc/ConfigRules.py index c8919273e..0cf5165e9 100644 --- a/src/common/tools/grpc/ConfigRules.py +++ b/src/common/tools/grpc/ConfigRules.py @@ -54,14 +54,13 @@ def update_config_rule_custom( config_rule.custom.resource_value = json.dumps(json_resource_value, sort_keys=True) -def copy_config_rules(source_config_rules, target_config_rules): +def copy_config_rules(source_config_rules, target_config_rules, raise_if_differs = True): for source_config_rule in source_config_rules: config_rule_kind = source_config_rule.WhichOneof('config_rule') if config_rule_kind == 'custom': custom = source_config_rule.custom resource_key = custom.resource_key resource_value = json.loads(custom.resource_value) - raise_if_differs = True fields = {name:(value, raise_if_differs) for name,value in resource_value.items()} update_config_rule_custom(target_config_rules, resource_key, fields) diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py b/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py index ca0b5b480..9eac4d353 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py @@ -22,7 +22,8 @@ LOGGER = logging.getLogger(__name__) SETTINGS_RULE_NAME = '/settings' STATIC_ROUTING_RULE_NAME = '/static_routing' -IETF_DATA = 'ietf_data' +RUNNING_RESOURCE_KEY = "running_ietf_slice" +CANDIDATE_RESOURCE_KEY = "candidate_ietf_slice" RE_UUID = re.compile(r'([0-9a-fA-F]{8})\-([0-9a-fA-F]{4})\-([0-9a-fA-F]{4})\-([0-9a-fA-F]{4})\-([0-9a-fA-F]{12})') @@ -94,7 +95,8 @@ def compose_l3nm_config_rules(main_service_config_rules : List, subservice_confi CONFIG_RULES = [ (SETTINGS_RULE_NAME, L3NM_SETTINGS_FIELD_DEFAULTS), (STATIC_ROUTING_RULE_NAME, {}), - (IETF_DATA, {}), + (RUNNING_RESOURCE_KEY, {}), + (CANDIDATE_RESOURCE_KEY, {}), ] for rule_name, defaults in CONFIG_RULES: compose_config_rules(main_service_config_rules, subservice_config_rules, rule_name, defaults) diff --git a/src/service/requirements.in b/src/service/requirements.in index 3f8d2a354..d0dd6dcfe 100644 --- a/src/service/requirements.in +++ b/src/service/requirements.in @@ -13,6 +13,7 @@ # limitations under the License. +deepdiff==6.7.* anytree==2.8.0 geopy==2.3.0 netaddr==0.9.0 diff --git a/src/slice/service/SliceServiceServicerImpl.py b/src/slice/service/SliceServiceServicerImpl.py index 007d012ed..68bd0aef1 100644 --- a/src/slice/service/SliceServiceServicerImpl.py +++ b/src/slice/service/SliceServiceServicerImpl.py @@ -19,7 +19,7 @@ from common.proto.context_pb2 import ( from common.proto.slice_pb2_grpc import SliceServiceServicer from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.tools.context_queries.InterDomain import is_inter_domain #, is_multi_domain -from common.tools.context_queries.Slice import get_slice_by_id +from common.tools.context_queries.Slice import get_slice_by_defualt_id, get_slice_by_id from common.tools.grpc.ConfigRules import copy_config_rules from common.tools.grpc.Constraints import copy_constraints from common.tools.grpc.EndPointIds import copy_endpoint_ids @@ -45,6 +45,8 @@ class SliceServiceServicerImpl(SliceServiceServicer): # being modified. context_client = ContextClient() slice_ro : Optional[Slice] = get_slice_by_id(context_client, request.slice_id, rw_copy=False) + if not slice_ro: + slice_ro : Optional[Slice] = get_slice_by_defualt_id(context_client, request.slice_id, rw_copy=False) slice_rw = Slice() slice_rw.CopyFrom(request if slice_ro is None else slice_ro) @@ -52,9 +54,9 @@ class SliceServiceServicerImpl(SliceServiceServicer): slice_rw.slice_owner.CopyFrom(request.slice_owner) # pylint: disable=no-member slice_rw.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED # pylint: disable=no-member - copy_endpoint_ids(request.slice_endpoint_ids, slice_rw.slice_endpoint_ids ) # pylint: disable=no-member - copy_constraints (request.slice_constraints, slice_rw.slice_constraints ) # pylint: disable=no-member - copy_config_rules(request.slice_config.config_rules, slice_rw.slice_config.config_rules) # pylint: disable=no-member + copy_endpoint_ids(request.slice_endpoint_ids, slice_rw.slice_endpoint_ids ) # pylint: disable=no-member + copy_constraints (request.slice_constraints, slice_rw.slice_constraints ) # pylint: disable=no-member + copy_config_rules(request.slice_config.config_rules, slice_rw.slice_config.config_rules, False) # pylint: disable=no-member slice_id_with_uuids = context_client.SetSlice(slice_rw) @@ -112,7 +114,7 @@ class SliceServiceServicerImpl(SliceServiceServicer): # pylint: disable=no-member copy_endpoint_ids(request.slice_endpoint_ids, service_request.service_endpoint_ids) copy_constraints(request.slice_constraints, service_request.service_constraints) - copy_config_rules(request.slice_config.config_rules, service_request.service_config.config_rules) + copy_config_rules(request.slice_config.config_rules, service_request.service_config.config_rules, False) service_request.service_type = ServiceTypeEnum.SERVICETYPE_UNKNOWN for config_rule in request.slice_config.config_rules: -- GitLab From 7edb1e3bbc1c53ef97ec4f528e80017ac02247b0 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 17:17:15 +0000 Subject: [PATCH 116/463] Context component: - Added logic to manage link type - Corrected deprecated method datetime.utcnow() --- src/context/service/database/Connection.py | 2 +- src/context/service/database/Context.py | 3 ++- src/context/service/database/Device.py | 2 +- src/context/service/database/Link.py | 9 +++++++-- src/context/service/database/OpticalLink.py | 2 +- src/context/service/database/PolicyRule.py | 2 +- src/context/service/database/Service.py | 5 +++-- src/context/service/database/Slice.py | 5 +++-- src/context/service/database/Topology.py | 3 ++- src/context/service/database/models/LinkModel.py | 10 +++++++++- 10 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/context/service/database/Connection.py b/src/context/service/database/Connection.py index de45151a5..529c02d6e 100644 --- a/src/context/service/database/Connection.py +++ b/src/context/service/database/Connection.py @@ -74,7 +74,7 @@ def connection_set(db_engine : Engine, messagebroker : MessageBroker, request : _,service_uuid = service_get_uuid(request.service_id, allow_random=False) settings = grpc_message_to_json_string(request.settings), - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) connection_data = [{ 'connection_uuid': connection_uuid, diff --git a/src/context/service/database/Context.py b/src/context/service/database/Context.py index f0cd36f83..f3ef214c3 100644 --- a/src/context/service/database/Context.py +++ b/src/context/service/database/Context.py @@ -82,7 +82,8 @@ def context_set(db_engine : Engine, messagebroker : MessageBroker, request : Con if len(request.slice_ids) > 0: # pragma: no cover LOGGER.warning('Items in field "slice_ids" ignored. This field is used for retrieval purposes only.') - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) + context_data = [{ 'context_uuid': context_uuid, 'context_name': context_name, diff --git a/src/context/service/database/Device.py b/src/context/service/database/Device.py index 930b5299f..7515f8d68 100644 --- a/src/context/service/database/Device.py +++ b/src/context/service/database/Device.py @@ -92,7 +92,7 @@ def device_set(db_engine : Engine, messagebroker : MessageBroker, request : Devi oper_status = grpc_to_enum__device_operational_status(request.device_operational_status) device_drivers = [grpc_to_enum__device_driver(d) for d in request.device_drivers] - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) topology_uuids : Set[str] = set() related_topologies : List[Dict] = list() diff --git a/src/context/service/database/Link.py b/src/context/service/database/Link.py index deef3769c..6244a8517 100644 --- a/src/context/service/database/Link.py +++ b/src/context/service/database/Link.py @@ -22,11 +22,12 @@ from common.proto.context_pb2 import Empty, EventTypeEnum, Link, LinkId, LinkIdL from common.message_broker.MessageBroker import MessageBroker from common.method_wrappers.ServiceExceptions import NotFoundException from common.tools.object_factory.Link import json_link_id -from context.service.database.uuids.Topology import topology_get_uuid +from .models.enums.LinkType import grpc_to_enum__link_type_enum from .models.LinkModel import LinkModel, LinkEndPointModel from .models.TopologyModel import TopologyLinkModel, TopologyModel from .uuids.EndPoint import endpoint_get_uuid from .uuids.Link import link_get_uuid +from .uuids.Topology import topology_get_uuid from .Events import notify_event_context, notify_event_link, notify_event_topology LOGGER = logging.getLogger(__name__) @@ -68,7 +69,9 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) link_name = raw_link_uuid if len(raw_link_name) == 0 else raw_link_name link_uuid = link_get_uuid(request.link_id, link_name=link_name, allow_random=True) - now = datetime.datetime.utcnow() + link_type = grpc_to_enum__link_type_enum(request.link_type) + + now = datetime.datetime.now(datetime.timezone.utc) topology_uuids : Set[str] = set() related_topologies : List[Dict] = list() @@ -117,6 +120,7 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) link_data = [{ 'link_uuid' : link_uuid, 'link_name' : link_name, + 'link_type' : link_type, 'total_capacity_gbps' : total_capacity_gbps, 'used_capacity_gbps' : used_capacity_gbps, 'created_at' : now, @@ -129,6 +133,7 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) index_elements=[LinkModel.link_uuid], set_=dict( link_name = stmt.excluded.link_name, + link_type = stmt.excluded.link_type, total_capacity_gbps = stmt.excluded.total_capacity_gbps, used_capacity_gbps = stmt.excluded.used_capacity_gbps, updated_at = stmt.excluded.updated_at, diff --git a/src/context/service/database/OpticalLink.py b/src/context/service/database/OpticalLink.py index 53fd7bdb5..1f45daf43 100644 --- a/src/context/service/database/OpticalLink.py +++ b/src/context/service/database/OpticalLink.py @@ -64,7 +64,7 @@ def optical_link_set(db_engine : Engine, messagebroker : MessageBroker, request link_name = raw_link_uuid if len(raw_link_name) == 0 else raw_link_name link_uuid = link_get_uuid(request.link_id, link_name=link_name, allow_random=True) - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) # By default, always add link to default Context/Topology topology_uuids : Set[str] = set() diff --git a/src/context/service/database/PolicyRule.py b/src/context/service/database/PolicyRule.py index 3d59c59b3..ad38838fc 100644 --- a/src/context/service/database/PolicyRule.py +++ b/src/context/service/database/PolicyRule.py @@ -84,7 +84,7 @@ def policyrule_set(db_engine : Engine, messagebroker : MessageBroker, request : 'actionList': json_policyrule_basic.get('actionList', []), }, sort_keys=True) - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) policyrule_data = [{ 'policyrule_uuid' : policyrule_uuid, diff --git a/src/context/service/database/Service.py b/src/context/service/database/Service.py index c789b291b..62f07e4fb 100644 --- a/src/context/service/database/Service.py +++ b/src/context/service/database/Service.py @@ -91,7 +91,7 @@ def service_set(db_engine : Engine, messagebroker : MessageBroker, request : Ser service_status = grpc_to_enum__service_status(request.service_status.service_status) - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) service_endpoints_data : List[Dict] = list() for i,endpoint_id in enumerate(request.service_endpoint_ids): @@ -180,7 +180,8 @@ def service_unset(db_engine : Engine, messagebroker : MessageBroker, request : S ['should be == request.service_id.context_id.context_uuid.uuid({:s})'.format(raw_context_uuid)]) service_endpoint_uuids.add(endpoint_get_uuid(endpoint_id, allow_random=False)[2]) - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) + constraints = compose_constraints_data(request.service_constraints, now, service_uuid=service_uuid) config_rules = compose_config_rules_data(request.service_config.config_rules, now, service_uuid=service_uuid) diff --git a/src/context/service/database/Slice.py b/src/context/service/database/Slice.py index 18620e6fc..84e210e02 100644 --- a/src/context/service/database/Slice.py +++ b/src/context/service/database/Slice.py @@ -89,7 +89,7 @@ def slice_set(db_engine : Engine, messagebroker : MessageBroker, request : Slice slice_status = grpc_to_enum__slice_status(request.slice_status.slice_status) - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) slice_endpoints_data : List[Dict] = list() for i,endpoint_id in enumerate(request.slice_endpoint_ids): @@ -222,7 +222,8 @@ def slice_unset(db_engine : Engine, messagebroker : MessageBroker, request : Sli for subslice_id in request.slice_subslice_ids } - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) + constraints = compose_constraints_data(request.slice_constraints, now, slice_uuid=slice_uuid) config_rules = compose_config_rules_data(request.slice_config.config_rules, now, slice_uuid=slice_uuid) diff --git a/src/context/service/database/Topology.py b/src/context/service/database/Topology.py index ba2649c69..1ee5d1642 100644 --- a/src/context/service/database/Topology.py +++ b/src/context/service/database/Topology.py @@ -134,7 +134,8 @@ def topology_set(db_engine : Engine, messagebroker : MessageBroker, request : To MSG += 'Items in field "link_ids" ignored. This field is used for retrieval purposes only.' LOGGER.warning(MSG) - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) + topology_data = [{ 'context_uuid' : context_uuid, 'topology_uuid': topology_uuid, diff --git a/src/context/service/database/models/LinkModel.py b/src/context/service/database/models/LinkModel.py index 423e39832..1bfa532d8 100644 --- a/src/context/service/database/models/LinkModel.py +++ b/src/context/service/database/models/LinkModel.py @@ -13,17 +13,22 @@ # limitations under the License. import operator -from sqlalchemy import CheckConstraint, Column, DateTime, Float, ForeignKey, Integer, String +from sqlalchemy import ( + CheckConstraint, Column, DateTime, Enum, Float, ForeignKey, Integer, String +) from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.orm import relationship from typing import Dict +from common.proto.context_pb2 import LinkTypeEnum from ._Base import _Base +from .enums.LinkType import ORM_LinkTypeEnum class LinkModel(_Base): __tablename__ = 'link' link_uuid = Column(UUID(as_uuid=False), primary_key=True) link_name = Column(String, nullable=False) + link_type = Column(Enum(ORM_LinkTypeEnum), nullable=False) total_capacity_gbps = Column(Float, nullable=True) used_capacity_gbps = Column(Float, nullable=True) created_at = Column(DateTime, nullable=False) @@ -44,11 +49,14 @@ class LinkModel(_Base): result = { 'link_id' : self.dump_id(), 'name' : self.link_name, + 'link_type' : self.link_type.value, 'link_endpoint_ids': [ link_endpoint.endpoint.dump_id() for link_endpoint in sorted(self.link_endpoints, key=operator.attrgetter('position')) ], } + if self.link_type is None: + self.link_type = LinkTypeEnum.LINKTYPE_UNKNOWN if self.total_capacity_gbps is not None: attributes : Dict = result.setdefault('attributes', dict()) attributes.setdefault('total_capacity_gbps', self.total_capacity_gbps) -- GitLab From de8c91504fdcebe6c095d4a4dc63987788a122eb Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 17:18:42 +0000 Subject: [PATCH 117/463] Activated CI/CD pipeline for Context component --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25dcab336..fb6bb7141 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ include: # #- local: '/manifests/.gitlab-ci.yml' # - local: '/src/monitoring/.gitlab-ci.yml' # - local: '/src/nbi/.gitlab-ci.yml' -# - local: '/src/context/.gitlab-ci.yml' + - local: '/src/context/.gitlab-ci.yml' # - local: '/src/device/.gitlab-ci.yml' # - local: '/src/service/.gitlab-ci.yml' # - local: '/src/dbscanserving/.gitlab-ci.yml' -- GitLab From 38f382ae2ff5636c354f8502b2cc52f8e3bd6890 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 17:28:49 +0000 Subject: [PATCH 118/463] WebUI component: - Add logic to show link type - Minor code formatting --- src/webui/service/device/routes.py | 8 +- src/webui/service/link/routes.py | 16 +- src/webui/service/templates/link/detail.html | 1 + src/webui/service/templates/link/home.html | 160 ++++++++++--------- 4 files changed, 100 insertions(+), 85 deletions(-) diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py index f3896bdd8..16b86c769 100644 --- a/src/webui/service/device/routes.py +++ b/src/webui/service/device/routes.py @@ -13,10 +13,14 @@ # limitations under the License. import json -from flask import current_app, render_template, Blueprint, flash, session, redirect, url_for +from flask import ( + current_app, render_template, Blueprint, flash, session, redirect, url_for +) from common.DeviceTypes import DeviceTypeEnum from common.proto.context_pb2 import ( - ConfigActionEnum, Device, DeviceDriverEnum, DeviceId, DeviceList, DeviceOperationalStatusEnum, Empty) + ConfigActionEnum, Device, DeviceDriverEnum, DeviceId, DeviceList, + DeviceOperationalStatusEnum, Empty +) from common.tools.context_queries.Device import get_device from common.tools.context_queries.Topology import get_topology from context.client.ContextClient import ContextClient diff --git a/src/webui/service/link/routes.py b/src/webui/service/link/routes.py index dacf77534..42f5984a3 100644 --- a/src/webui/service/link/routes.py +++ b/src/webui/service/link/routes.py @@ -13,8 +13,10 @@ # limitations under the License. -from flask import current_app, render_template, Blueprint, flash, session, redirect, url_for -from common.proto.context_pb2 import Empty, Link, LinkId, LinkList +from flask import ( + current_app, render_template, Blueprint, flash, session, redirect, url_for +) +from common.proto.context_pb2 import Empty, Link, LinkId, LinkList, LinkTypeEnum from common.tools.context_queries.EndPoint import get_endpoint_names from common.tools.context_queries.Link import get_link from common.tools.context_queries.Topology import get_topology @@ -50,7 +52,10 @@ def home(): device_names, endpoints_data = get_endpoint_names(context_client, endpoint_ids) context_client.close() - return render_template('link/home.html', links=links, device_names=device_names, endpoints_data=endpoints_data) + return render_template( + 'link/home.html', links=links, device_names=device_names, + endpoints_data=endpoints_data, lte=LinkTypeEnum + ) @link.route('detail/', methods=('GET', 'POST')) @@ -64,7 +69,10 @@ def detail(link_uuid: str): else: device_names, endpoints_data = get_endpoint_names(context_client, link_obj.link_endpoint_ids) context_client.close() - return render_template('link/detail.html',link=link_obj, device_names=device_names, endpoints_data=endpoints_data) + return render_template( + 'link/detail.html', link=link_obj, device_names=device_names, + endpoints_data=endpoints_data, lte=LinkTypeEnum + ) @link.get('/delete') def delete(link_uuid): diff --git a/src/webui/service/templates/link/detail.html b/src/webui/service/templates/link/detail.html index 7c5f732e3..775e5392d 100644 --- a/src/webui/service/templates/link/detail.html +++ b/src/webui/service/templates/link/detail.html @@ -39,6 +39,7 @@
UUID: {{ link.link_id.link_uuid.uuid }}
Name: {{ link.name }}
+ Type: {{ lte.Name(link.link_type).replace('LINKTYPE_', '') }}
diff --git a/src/webui/service/templates/link/home.html b/src/webui/service/templates/link/home.html index d96da7814..663289879 100644 --- a/src/webui/service/templates/link/home.html +++ b/src/webui/service/templates/link/home.html @@ -12,87 +12,89 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - --> - - {% extends 'base.html' %} - - {% block content %} -

Links

- -
-
- -
-
- {{ links | length }} links found in context {{ session['context_uuid'] }} -
- -
- -
- - - - - - - - - - {% if links %} - {% for link in links %} - - + + {% endfor %} + {% else %} + + + + {% endif %} + +
UUIDNameEndpoints
+--> + +{% extends 'base.html' %} + +{% block content %} +

Links

+ +
+
+ +
+
+ {{ links | length }} links found in context {{ session['context_uuid'] }} +
+ +
+ + + + + + + + + + + + + {% if links %} + {% for link in links %} + + - + - - + + - - - {% endfor %} - {% else %} - - - - {% endif %} - -
UUIDNameTypeEndpoints
{{ link.link_id.link_uuid.uuid }} - + {{ link.name }} - - + {{ lte.Name(link.link_type).replace('LINKTYPE_', '') }} + + + + - - - - - -
No links found
- - {% endblock %} \ No newline at end of file + + + + + +
No links found
+{% endblock %} -- GitLab From 444e35132b68ebc910153ca78723a119f683d6a8 Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 24 Dec 2024 18:29:08 +0100 Subject: [PATCH 119/463] feat: initial version of service handler added --- .../l3slice_ietfslice/ConfigRules.py | 229 +++++++ .../L3SliceIETFSliceServiceHandler.py | 630 ++++++++++++++++++ .../l3slice_ietfslice/__init__.py | 14 + 3 files changed, 873 insertions(+) create mode 100644 src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py create mode 100644 src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py create mode 100644 src/service/service/service_handlers/l3slice_ietfslice/__init__.py diff --git a/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py b/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py new file mode 100644 index 000000000..23f3e8159 --- /dev/null +++ b/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py @@ -0,0 +1,229 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, List, Tuple + +from common.proto.context_pb2 import Link +from common.tools.object_factory.ConfigRule import ( + json_config_rule_delete, + json_config_rule_set, +) +from context.client.ContextClient import ContextClient +from service.service.service_handler_api.AnyTreeTools import TreeNode + + +def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: + operation_type: str = json_settings["operation_type"] + src_node_id: str = json_settings["src_node_id"] + src_mgmt_ip_address: str = json_settings["src_mgmt_ip_address"] + src_ac_node_id: str = json_settings["src_ac_node_id"] + src_ac_ep_id: str = json_settings["src_ac_ep_id"] + src_vlan: str = json_settings["src_vlan"] + dst_node_id: str = json_settings["dst_node_id"] + dst_mgmt_ip_address: str = json_settings["dst_mgmt_ip_address"] + dst_ac_node_id: str = json_settings["dst_ac_node_id"] + dst_ac_ep_id: str = json_settings["dst_ac_ep_id"] + dst_vlan: str = json_settings["dst_vlan"] + slice_id: str = json_settings["slice_id"] + delay: str = json_settings["delay"] + bandwidth: str = json_settings["bandwidth"] + packet_loss: str = json_settings["packet_loss"] + + sdps = [ + { + "id": "1", + "node-id": src_node_id, + "sdp-ip-address": [src_mgmt_ip_address], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [src_vlan], + }, + ], + "target-connection-group-id": "line1", + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "0", + "description": "dsc", + "ac-node-id": src_ac_node_id, + "ac-tp-id": src_ac_ep_id, + } + ] + }, + }, + { + "id": "2", + "node-id": dst_node_id, + "sdp-ip-address": [dst_mgmt_ip_address], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [dst_vlan], + }, + ], + "target-connection-group-id": "line1", + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "0", + "description": "dsc", + "ac-node-id": dst_ac_node_id, + "ac-tp-id": dst_ac_ep_id, + } + ] + }, + }, + ] + + connection_groups = [ + { + "id": "line1", + "connectivity-type": "point-to-point", + "connectivity-construct": [ + { + "id": 1, + "p2mp-sender-sdp": "1", + "p2mp-receiver-sdp": ["2"], + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": delay, + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": bandwidth, + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": packet_loss, + }, + ] + } + }, + }, + { + "id": 2, + "p2mp-sender-sdp": "2", + "p2mp-receiver-sdp": ["1"], + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": delay, + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": bandwidth, + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": packet_loss, + }, + ] + } + }, + }, + ], + } + ] + slice_service = { + "id": slice_id, + "description": "dsc", + "sdps": {"sdp": sdps}, + "connection-groups": {"connection-group": connection_groups}, + } + slice_data_model = {"network-slice-services": {"slice-service": [slice_service]}} + json_config_rules = [ + json_config_rule_set( + "/service[{:s}]/IETFSlice".format(service_uuid), + slice_data_model, + ), + json_config_rule_set( + "/service[{:s}]/IETFSlice/operation".format(service_uuid), + {"type": operation_type}, + ), + ] + return json_config_rules + + +def teardown_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: + json_config_rules = [ + json_config_rule_delete( + "/service[{:s}]/IETFSlice".format(service_uuid), + {}, + ), + json_config_rule_delete( + "/service[{:s}]/IETFSlice/operation".format(service_uuid), + {}, + ), + ] + return json_config_rules + + +def get_link_ep_device_names( + link: Link, context_client: ContextClient +) -> Tuple[str, str, str, str]: + ep_ids = link.link_endpoint_ids + ep_device_id_1 = ep_ids[0].device_id + ep_uuid_1 = ep_ids[0].endpoint_uuid.uuid + device_obj_1 = context_client.GetDevice(ep_device_id_1) + for d_ep in device_obj_1.device_endpoints: + if d_ep.endpoint_id.endpoint_uuid.uuid == ep_uuid_1: + ep_name_1 = d_ep.name + break + else: + raise Exception("endpoint not found") + device_obj_name_1 = device_obj_1.name + ep_device_id_2 = ep_ids[1].device_id + ep_uuid_2 = ep_ids[1].endpoint_uuid.uuid + device_obj_2 = context_client.GetDevice(ep_device_id_2) + for d_ep in device_obj_2.device_endpoints: + if d_ep.endpoint_id.endpoint_uuid.uuid == ep_uuid_2: + ep_name_2 = d_ep.name + break + else: + raise Exception("endpoint not found") + device_obj_name_2 = device_obj_2.name + return ( + device_obj_name_1, + ep_name_1, + device_obj_1, + device_obj_name_2, + ep_name_2, + device_obj_2, + ) diff --git a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py new file mode 100644 index 000000000..e584283a4 --- /dev/null +++ b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py @@ -0,0 +1,630 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 re +from typing import Any, List, Optional, Tuple, Union + +from deepdiff import DeepDiff + +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.proto.context_pb2 import ConfigRule, DeviceId, Empty, Service, ServiceConfig +from common.tools.object_factory.Device import json_device_id +from common.type_checkers.Checkers import chk_type +from context.client.ContextClient import ContextClient +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.service_handler_api.Tools import ( + get_device_endpoint_uuids, +) +from service.service.task_scheduler.TaskExecutor import TaskExecutor + +from .ConfigRules import ( + get_link_ep_device_names, + setup_config_rules, + teardown_config_rules, +) + +RUNNING_RESOURCE_KEY = "running_ietf_slice" +CANDIDATE_RESOURCE_KEY = "candidate_ietf_slice" + +SDP_DIFF_RE = re.compile( + r"^root\[\'network-slice-services\'\]\[\'slice-service\'\]\[0\]\[\'sdps\'\]\[\'sdp\'\]\[(\d)\]$" +) +CONNECTION_GROUP_DIFF_RE = re.compile( + r"^root\[\'network-slice-services\'\]\[\'slice-service\'\]\[0\]\[\'connection-groups\'\]\[\'connection-group\'\]\[(\d)\]$" +) +MATCH_CRITERION_DIFF_RE = re.compile( + r"^root\[\'network-slice-services\'\]\[\'slice-service\'\]\[0\]\[\'sdps\'\]\[\'sdp\'\]\[(\d)\]\[\'service-match-criteria\'\]\[\'match-criterion\'\]\[(\d)\]$" +) + +RE_GET_ENDPOINT_FROM_INTERFACE = re.compile(r"^\/interface\[([^\]]+)\].*") + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool( + "Service", "Handler", labels={"handler": "l3slice_ietfslice"} +) + + +RAISE_IF_DIFFERS = True + + +def get_custom_config_rule( + service_config: ServiceConfig, resource_key: str +) -> Optional[ConfigRule]: + for cr in service_config.config_rules: + if ( + cr.WhichOneof("config_rule") == "custom" + and cr.custom.resource_key == resource_key + ): + return cr + + +def get_running_candidate_ietf_slice_data_diff(service_config: ServiceConfig) -> dict: + running_ietf_slice_cr = get_custom_config_rule(service_config, RUNNING_RESOURCE_KEY) + running_resource_value_dict = json.loads( + running_ietf_slice_cr.custom.resource_value + ) + candidate_ietf_slice_cr = get_custom_config_rule( + service_config, CANDIDATE_RESOURCE_KEY + ) + candidate_resource_value_dict = json.loads( + candidate_ietf_slice_cr.custom.resource_value + ) + return ( + DeepDiff( + running_resource_value_dict, + candidate_resource_value_dict, + ), + DeepDiff( + running_resource_value_dict, + candidate_resource_value_dict, + ignore_order=True, + ), + ) + + +class L3NMSliceIETFSliceServiceHandler(_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) == 0: + return [] + service_uuid = self.__service.service_id.service_uuid.uuid + service_config = self.__service.service_config + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) + src_device_obj = self.__task_executor.get_device( + DeviceId(**json_device_id(src_device_uuid)) + ) + src_device_name = src_device_obj.name + src_controller = self.__task_executor.get_device_controller(src_device_obj) + dst_device_uuid, dst_endpoint_uuid = get_device_endpoint_uuids(endpoints[-1]) + dst_device_obj = self.__task_executor.get_device( + DeviceId(**json_device_id(dst_device_uuid)) + ) + dst_device_name = dst_device_obj.name + dst_controller = self.__task_executor.get_device_controller(dst_device_obj) + 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 + context_client = ContextClient() + edge_device_names = [src_device_name, dst_device_name] + link_list = context_client.ListLinks(Empty()) + links = link_list.links + max_delay = 1e9 + packet_loss = 1.0 + bandwidth = 0.0 + device_ep_pairs = [] + sdp_ids = [] + running_candidate_diff, running_candidate_diff_no_order = ( + get_running_candidate_ietf_slice_data_diff(service_config) + ) + candidate_ietf_slice_cr = get_custom_config_rule( + service_config, CANDIDATE_RESOURCE_KEY + ) + candidate_resource_value_dict = json.loads( + candidate_ietf_slice_cr.custom.resource_value + ) + running_ietf_slice_cr = get_custom_config_rule( + service_config, RUNNING_RESOURCE_KEY + ) + running_resource_value_dict = json.loads( + running_ietf_slice_cr.custom.resource_value + ) + LOGGER.debug(f"P46: {candidate_resource_value_dict}") + LOGGER.debug(f"P47: {running_resource_value_dict}") + LOGGER.debug(f"P41: {running_candidate_diff}") + LOGGER.debug(f"P45: {running_candidate_diff_no_order}") + if not running_candidate_diff: # Slice Creation + slice_services = candidate_resource_value_dict["network-slice-services"][ + "slice-service" + ] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + operation_type = "create" + sdp_ids = [sdp["node-id"] for sdp in sdps] + for sdp in sdps: + node_id = sdp["node-id"] + for link in links: + ( + device_obj_name_1, + ep_name_1, + device_obj_1, + device_obj_name_2, + ep_name_2, + device_obj_2, + ) = get_link_ep_device_names(link, context_client) + if ( + device_obj_name_1 == node_id + and device_obj_name_2 in edge_device_names + ): + device_ep_pairs.append( + (node_id, ep_name_1, device_obj_name_2, ep_name_2) + ) + del edge_device_names[ + edge_device_names.index(device_obj_name_2) + ] + match_criteria = sdp["service-match-criteria"][ + "match-criterion" + ] + vlan_id = set() + for match in match_criteria: + for type_value in match["match-type"]: + if ( + type_value["type"] + == "ietf-network-slice-service:vlan" + ): + vlan_id.add(type_value["value"][0]) + if len(vlan_id) != 1: + raise Exception("one vlan id found in SDP match criteria") + src_vlan = list(vlan_id)[0] + del sdp_ids[sdp_ids.index(node_id)] + break + for link in links: + ( + device_obj_name_1, + ep_name_1, + device_obj_1, + device_obj_name_2, + ep_name_2, + device_obj_2, + ) = get_link_ep_device_names(link, context_client) + if ( + device_obj_name_1 == edge_device_names[0] + and device_obj_2.controller_id != device_obj_1.controller_id + ): + device_ep_pairs.append( + (device_obj_name_2, ep_name_2, device_obj_name_1, ep_name_1) + ) + for sdp in sdps: + if sdp["node-id"] != sdp_ids[0]: + continue + match_criteria = sdp["service-match-criteria"][ + "match-criterion" + ] + vlan_id = set() + for match in match_criteria: + for type_value in match["match-type"]: + if ( + type_value["type"] + == "ietf-network-slice-service:vlan" + ): + vlan_id.add(type_value["value"][0]) + if len(vlan_id) != 1: + raise Exception("one vlan id found in SDP match criteria") + dst_vlan = list(vlan_id)[0] + break + else: + raise Exception("sdp between the domains not found") + elif "iterable_item_added" in running_candidate_diff: # new SDP added + slice_services = candidate_resource_value_dict["network-slice-services"][ + "slice-service" + ] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + operation_type = "update" + added_items = { + "sdp": {"sdp_idx": None, "value": {}}, + "connection_group": {"connection_group_idx": None, "value": {}}, + "match_criterion": { + "sdp_idx": None, + "match_criterion_idx": None, + "value": {}, + }, + } + for added_key, added_value in running_candidate_diff[ + "iterable_item_added" + ].items(): + sdp_match = SDP_DIFF_RE.match(added_key) + connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) + match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) + if sdp_match: + added_items["sdp"] = { + "sdp_idx": int(sdp_match.groups()[0]), + "value": added_value, + } + elif connection_group_match: + added_items["connection_group"] = { + "connection_group_idx": int(connection_group_match.groups()[0]), + "value": added_value, + } + elif match_criterion_match: + added_items["match_criterion"] = { + "sdp_idx": int(match_criterion_match.groups()[0]), + "match_criterion_idx": int(match_criterion_match.groups()[1]), + "value": added_value, + } + new_sdp = sdps[added_items["sdp"]["sdp_idx"]] + src_sdp_name = new_sdp["node-id"] + dst_sdp_idx = sdps[added_items["match_criterion"]["sdp_idx"]]["id"] + dst_sdp_name = sdps[added_items["match_criterion"]["sdp_idx"]]["node-id"] + for link in links: + ( + device_obj_name_1, + ep_name_1, + device_obj_1, + device_obj_name_2, + ep_name_2, + device_obj_2, + ) = get_link_ep_device_names(link, context_client) + if ( + device_obj_name_1 == src_sdp_name + and device_obj_2.controller_id != device_obj_1.controller_id + ): + device_ep_pairs.append( + (device_obj_name_2, ep_name_2, device_obj_name_1, ep_name_1) + ) + for sdp in sdps: + if sdp["node-id"] != src_sdp_name: + continue + match_criteria = sdp["service-match-criteria"][ + "match-criterion" + ] + vlan_id = set() + for match in match_criteria: + for type_value in match["match-type"]: + if ( + type_value["type"] + == "ietf-network-slice-service:vlan" + ): + vlan_id.add(type_value["value"][0]) + if len(vlan_id) != 1: + raise Exception("one vlan id found in SDP match criteria") + src_vlan = list(vlan_id)[0] + break + else: + raise Exception("sdp between the domains not found") + for link in links: + ( + device_obj_name_1, + ep_name_1, + device_obj_1, + device_obj_name_2, + ep_name_2, + device_obj_2, + ) = get_link_ep_device_names(link, context_client) + if ( + device_obj_name_1 == dst_sdp_name + and device_obj_2.controller_id != device_obj_1.controller_id + ): + device_ep_pairs.append( + (device_obj_name_2, ep_name_2, device_obj_name_1, ep_name_1) + ) + for sdp in sdps: + if sdp["node-id"] != dst_sdp_name: + continue + match_criteria = sdp["service-match-criteria"][ + "match-criterion" + ] + vlan_id = set() + for match in match_criteria: + for type_value in match["match-type"]: + if ( + type_value["type"] + == "ietf-network-slice-service:vlan" + ): + vlan_id.add(type_value["value"][0]) + if len(vlan_id) != 1: + raise Exception("one vlan id found in SDP match criteria") + dst_vlan = list(vlan_id)[0] + break + else: + raise Exception("sdp between the domains not found") + elif "iterable_item_removed" in running_candidate_diff: # an SDP removed + slice_services = running_resource_value_dict["network-slice-services"][ + "slice-service" + ] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + operation_type = "update" + added_items = { + "sdp": {"sdp_idx": None, "value": {}}, + "connection_group": {"connection_group_idx": None, "value": {}}, + "match_criterion": { + "sdp_idx": None, + "match_criterion_idx": None, + "value": {}, + }, + } + for added_key, added_value in running_candidate_diff[ + "iterable_item_removed" + ].items(): + sdp_match = SDP_DIFF_RE.match(added_key) + connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) + match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) + LOGGER.debug( + f"P40: {sdp_match} *{connection_group_match}* {match_criterion_match}" + ) + if sdp_match: + added_items["sdp"] = { + "sdp_idx": int(sdp_match.groups()[0]), + "value": added_value, + } + elif connection_group_match: + added_items["connection_group"] = { + "connection_group_idx": int(connection_group_match.groups()[0]), + "value": added_value, + } + elif match_criterion_match: + added_items["match_criterion"] = { + "sdp_idx": int(match_criterion_match.groups()[0]), + "match_criterion_idx": int(match_criterion_match.groups()[1]), + "value": added_value, + } + new_sdp = sdps[added_items["sdp"]["sdp_idx"]] + src_sdp_name = new_sdp["node-id"] + dst_sdp_idx = sdps[added_items["match_criterion"]["sdp_idx"]]["id"] + dst_sdp_name = sdps[added_items["match_criterion"]["sdp_idx"]]["node-id"] + for link in links: + ( + device_obj_name_1, + ep_name_1, + device_obj_1, + device_obj_name_2, + ep_name_2, + device_obj_2, + ) = get_link_ep_device_names(link, context_client) + if ( + device_obj_name_1 == src_sdp_name + and device_obj_2.controller_id != device_obj_1.controller_id + ): + device_ep_pairs.append( + (device_obj_name_2, ep_name_2, device_obj_name_1, ep_name_1) + ) + for sdp in sdps: + if sdp["node-id"] != src_sdp_name: + continue + match_criteria = sdp["service-match-criteria"][ + "match-criterion" + ] + vlan_id = set() + LOGGER.debug(f"P81: {match_criteria}") + for match in match_criteria: + for type_value in match["match-type"]: + if ( + type_value["type"] + == "ietf-network-slice-service:vlan" + ): + vlan_id.add(type_value["value"][0]) + LOGGER.debug(f"P82: {vlan_id}") + if len(vlan_id) != 1: + raise Exception("one vlan id found in SDP match criteria") + src_vlan = list(vlan_id)[0] + break + else: + raise Exception("sdp between the domains not found") + for link in links: + ( + device_obj_name_1, + ep_name_1, + device_obj_1, + device_obj_name_2, + ep_name_2, + device_obj_2, + ) = get_link_ep_device_names(link, context_client) + if ( + device_obj_name_1 == dst_sdp_name + and device_obj_2.controller_id != device_obj_1.controller_id + ): + device_ep_pairs.append( + (device_obj_name_2, ep_name_2, device_obj_name_1, ep_name_1) + ) + for sdp in sdps: + if sdp["node-id"] != dst_sdp_name: + continue + match_criteria = sdp["service-match-criteria"][ + "match-criterion" + ] + LOGGER.debug(f"P83: {match_criteria}") + vlan_id = set() + for match in match_criteria: + for type_value in match["match-type"]: + if ( + type_value["type"] + == "ietf-network-slice-service:vlan" + ): + vlan_id.add(type_value["value"][0]) + + LOGGER.debug(f"P84: {vlan_id}") + if len(vlan_id) != 1: + raise Exception("one vlan id found in SDP match criteria") + dst_vlan = list(vlan_id)[0] + break + else: + raise Exception("sdp between the domains not found") + connection_groups = slice_service["connection-groups"]["connection-group"] + for cg in connection_groups: + for cc in cg["connectivity-construct"]: + for metric_bound in cc["service-slo-sle-policy"]["slo-policy"][ + "metric-bound" + ]: + if ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-delay-maximum" + and metric_bound["metric-unit"] == "milliseconds" + ): + metric_value = int(metric_bound["bound"]) + if metric_value < max_delay: + max_delay = metric_value + elif ( + metric_bound["metric-type"] + == "ietf-network-slice-service:two-way-packet-loss" + and metric_bound["metric-unit"] == "percentage" + ): + metric_value = float(metric_bound["percentile-value"]) + if metric_value < packet_loss: + packet_loss = metric_value + elif ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-bandwidth" + and metric_bound["metric-unit"] == "Mbps" + ): + metric_value = float(metric_bound["bound"]) + bandwidth += metric_value + results = [] + resource_value_dict = { + "uuid": service_uuid, + "operation_type": operation_type, + "src_node_id": device_ep_pairs[0][2], + "src_mgmt_ip_address": device_ep_pairs[0][2], + "src_ac_node_id": device_ep_pairs[0][2], + "src_ac_ep_id": device_ep_pairs[0][3], + "src_vlan": src_vlan, + "dst_node_id": device_ep_pairs[1][2], + "dst_mgmt_ip_address": device_ep_pairs[1][2], + "dst_ac_node_id": device_ep_pairs[1][2], + "dst_ac_ep_id": device_ep_pairs[1][3], + "dst_vlan": dst_vlan, + "slice_id": service_uuid, + "delay": max_delay, + "bandwidth": bandwidth, + "packet_loss": packet_loss, + } + + json_config_rules = setup_config_rules(service_uuid, resource_value_dict) + del controller.device_config.config_rules[:] + for jcr in json_config_rules: + controller.device_config.config_rules.append(ConfigRule(**jcr)) + self.__task_executor.configure_device(controller) + # except Exception as e: # pylint: disable=broad-except + # 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) == 0: + return [] + service_uuid = self.__service.service_id.service_uuid.uuid + results = [] + try: + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) + src_device_obj = self.__task_executor.get_device( + DeviceId(**json_device_id(src_device_uuid)) + ) + controller = self.__task_executor.get_device_controller(src_device_obj) + json_config_rules = teardown_config_rules(service_uuid, {}) + if len(json_config_rules) > 0: + del controller.device_config.config_rules[:] + for json_config_rule in json_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 + 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/l3slice_ietfslice/__init__.py b/src/service/service/service_handlers/l3slice_ietfslice/__init__.py new file mode 100644 index 000000000..53d5157f7 --- /dev/null +++ b/src/service/service/service_handlers/l3slice_ietfslice/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + -- GitLab From 7c8d37e93f81f53a2016948fc5398a33d076ac3b Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 24 Dec 2024 18:31:07 +0100 Subject: [PATCH 120/463] feat: initial version of L3NM NCE service handler added --- .../service_handlers/l3nm_nce/ConfigRules.py | 121 +++++ .../l3nm_nce/L3NMNCEServiceHandler.py | 446 ++++++++++++++++++ .../service_handlers/l3nm_nce/__init__.py | 14 + 3 files changed, 581 insertions(+) create mode 100644 src/service/service/service_handlers/l3nm_nce/ConfigRules.py create mode 100644 src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py create mode 100644 src/service/service/service_handlers/l3nm_nce/__init__.py diff --git a/src/service/service/service_handlers/l3nm_nce/ConfigRules.py b/src/service/service/service_handlers/l3nm_nce/ConfigRules.py new file mode 100644 index 000000000..471757bda --- /dev/null +++ b/src/service/service/service_handlers/l3nm_nce/ConfigRules.py @@ -0,0 +1,121 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, List + +from common.tools.object_factory.ConfigRule import ( + json_config_rule_delete, + json_config_rule_set, +) +from service.service.service_handler_api.AnyTreeTools import TreeNode + + +def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: + operation_type: str = json_settings["operation_type"] + app_flow_id: str = json_settings["app_flow_id"] + app_flow_user_id: str = json_settings["app_flow_user_id"] + max_latency: int = json_settings["max_latency"] + max_jitter: int = json_settings["max_jitter"] + max_loss: float = json_settings["max_loss"] + upstream_assure_bw: str = json_settings["upstream_assure_bw"] + upstream_max_bw: str = json_settings["upstream_max_bw"] + downstream_assure_bw: str = json_settings["downstream_assure_bw"] + downstream_max_bw: str = json_settings["downstream_max_bw"] + src_ip: str = json_settings["src_ip"] + src_port: str = json_settings["src_port"] + dst_ip: str = json_settings["dst_ip"] + dst_port: str = json_settings["dst_port"] + + app_flow_app_name: str = f"App_Flow_{app_flow_id}" + app_flow_service_profile: str = f"service_{app_flow_id}" + app_id: str = f"app_{app_flow_id}" + app_feature_id: str = f"feature_{app_flow_id}" + app_flow_name: str = json_settings.get("app_flow_name", "App_Flow_Example") + app_flow_max_online_users: int = json_settings.get("app_flow_max_online_users", 1) + app_flow_stas: str = json_settings.get("stas", "00:3D:E1:18:82:9E") + qos_profile_name: str = json_settings.get("app_flow_qos_profile", "AR_VR_Gaming") + app_flow_duration: int = json_settings.get("app_flow_duration", 9999) + protocol: str = json_settings.get("protocol", "tcp") + + app_flow = { + "name": app_flow_name, + "user-id": app_flow_user_id, + "app-name": app_flow_app_name, + "max-online-users": app_flow_max_online_users, + "stas": app_flow_stas, + "qos-profile": qos_profile_name, + "service-profile": app_flow_service_profile, + "duration": app_flow_duration, + } + qos_profile = { + "name": qos_profile_name, + "max-latency": max_latency, + "max-jitter": max_jitter, + "max-loss": max_loss, + "upstream": { + "assure-bandwidth": upstream_assure_bw, + "max-bandwidth": upstream_max_bw, + }, + "downstream": { + "assure-bandwidth": downstream_assure_bw, + "max-bandwidth": downstream_max_bw, + }, + } + application = { + "name": app_flow_name, + "app-id": app_id, + "app-features": { + "app-feature": [ + { + "id": app_feature_id, + "dest-ip": dst_ip, + "dest-port": dst_port, + "src-ip": src_ip, + "src-port": src_port, + "protocol": protocol, + } + ] + }, + } + app_flow_datamodel = { + "huawei-nce-app-flow:app-flows": { + "app-flow": [app_flow], + "qos-profiles": {"qos-profile": [qos_profile]}, + "applications": {"application": [application]}, + } + } + json_config_rules = [ + json_config_rule_set( + "/service[{:s}]/AppFlow".format(service_uuid), app_flow_datamodel + ), + json_config_rule_set( + "/service[{:s}]/AppFlow/operation".format(service_uuid), + {"type": operation_type}, + ), + ] + return json_config_rules + + +def teardown_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: + json_config_rules = [ + json_config_rule_delete( + "/service[{:s}]/AppFlow".format(service_uuid), + {}, + ), + json_config_rule_delete( + "/service[{:s}]/AppFlow/operation".format(service_uuid), + {}, + ), + ] + return json_config_rules diff --git a/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py b/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py new file mode 100644 index 000000000..1ca908a40 --- /dev/null +++ b/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py @@ -0,0 +1,446 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 re +from typing import Any, List, Optional, Tuple, Union +from uuid import uuid4 + +from deepdiff import DeepDiff + +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.proto.context_pb2 import ConfigRule, DeviceId, Empty, Service, ServiceConfig +from common.tools.object_factory.Device import json_device_id +from common.type_checkers.Checkers import chk_type +from context.client.ContextClient import ContextClient +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.service_handler_api.Tools import ( + get_device_endpoint_uuids, + get_endpoint_matching, +) +from service.service.task_scheduler.TaskExecutor import TaskExecutor + +from .ConfigRules import setup_config_rules, teardown_config_rules + +RUNNING_RESOURCE_KEY = "running_ietf_slice" +CANDIDATE_RESOURCE_KEY = "candidate_ietf_slice" + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool("Service", "Handler", labels={"handler": "l3nm_nce"}) +SDP_DIFF_RE = re.compile( + r"^root\[\'network-slice-services\'\]\[\'slice-service\'\]\[0\]\[\'sdps\'\]\[\'sdp\'\]\[(\d)\]$" +) +CONNECTION_GROUP_DIFF_RE = re.compile( + r"^root\[\'network-slice-services\'\]\[\'slice-service\'\]\[0\]\[\'connection-groups\'\]\[\'connection-group\'\]\[(\d)\]$" +) +MATCH_CRITERION_DIFF_RE = re.compile( + r"^root\[\'network-slice-services\'\]\[\'slice-service\'\]\[0\]\[\'sdps\'\]\[\'sdp\'\]\[(\d)\]\[\'service-match-criteria\'\]\[\'match-criterion\'\]\[(\d)\]$" +) + + +def get_custom_config_rule( + service_config: ServiceConfig, resource_key: str +) -> Optional[ConfigRule]: + for cr in service_config.config_rules: + if ( + cr.WhichOneof("config_rule") == "custom" + and cr.custom.resource_key == resource_key + ): + return cr + + +def get_running_candidate_ietf_slice_data_diff(service_config: ServiceConfig) -> dict: + running_ietf_slice_cr = get_custom_config_rule(service_config, RUNNING_RESOURCE_KEY) + running_resource_value_dict = json.loads( + running_ietf_slice_cr.custom.resource_value + ) + candidate_ietf_slice_cr = get_custom_config_rule( + service_config, CANDIDATE_RESOURCE_KEY + ) + candidate_resource_value_dict = json.loads( + candidate_ietf_slice_cr.custom.resource_value + ) + return ( + DeepDiff( + running_resource_value_dict, + candidate_resource_value_dict, + ), + DeepDiff( + running_resource_value_dict, + candidate_resource_value_dict, + ignore_order=True, + ), + ) + + +class L3NMNCEServiceHandler(_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) == 0: + return [] + context_client = ContextClient() + service_uuid = self.__service.service_id.service_uuid.uuid + service_name = self.__service.name + service_config = self.__service.service_config + settings = self.__settings_handler.get("/settings") + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) + src_device_obj = self.__task_executor.get_device( + DeviceId(**json_device_id(src_device_uuid)) + ) + controller = self.__task_executor.get_device_controller(src_device_obj) + list_devices = context_client.ListDevices(Empty()) + devices = list_devices.devices + device_name_device = {d.name: d for d in devices} + device_uuid_device = {d.device_id.device_uuid.uuid: d for d in devices} + running_candidate_diff, running_candidate_diff_no_order = ( + get_running_candidate_ietf_slice_data_diff(service_config) + ) + candidate_ietf_slice_cr = get_custom_config_rule( + service_config, CANDIDATE_RESOURCE_KEY + ) + candidate_resource_value_dict = json.loads( + candidate_ietf_slice_cr.custom.resource_value + ) + running_ietf_slice_cr = get_custom_config_rule( + service_config, RUNNING_RESOURCE_KEY + ) + running_resource_value_dict = json.loads( + running_ietf_slice_cr.custom.resource_value + ) + LOGGER.debug(f"P70: {running_candidate_diff}") + if not running_candidate_diff: # Slice Creation + operation_type = "create" + slice_services = candidate_resource_value_dict["network-slice-services"][ + "slice-service" + ] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + connection_groups = slice_service["connection-groups"]["connection-group"] + sdp_ids = [sdp["id"] for sdp in sdps] + for sdp in sdps: + node_id = sdp["node-id"] + device_obj = device_name_device[node_id] + device_controller = self.__task_executor.get_device_controller( + device_obj + ) + LOGGER.debug(f"P71: {controller}") + LOGGER.debug(f"P72: {device_controller}") + if device_controller is None or controller.name != device_controller.name: + continue + src_sdp_idx = sdp_ids.pop(sdp_ids.index(sdp["id"])) + dst_sdp_idx = sdp_ids[0] + match_criteria = sdp["service-match-criteria"]["match-criterion"] + match_criterion = match_criteria[0] + connection_grp_id = match_criterion["target-connection-group-id"] + break + else: + raise Exception("connection group id not found") + elif "iterable_item_added" in running_candidate_diff: # new SDP added + slice_services = candidate_resource_value_dict["network-slice-services"][ + "slice-service" + ] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + connection_groups = slice_service["connection-groups"]["connection-group"] + operation_type = "create" + added_items = { + "sdp": {"sdp_idx": None, "value": {}}, + "connection_group": {"connection_group_idx": None, "value": {}}, + "match_criterion": { + "sdp_idx": None, + "match_criterion_idx": None, + "value": {}, + }, + } + for added_key, added_value in running_candidate_diff[ + "iterable_item_added" + ].items(): + sdp_match = SDP_DIFF_RE.match(added_key) + connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) + match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) + if sdp_match: + added_items["sdp"] = { + "sdp_idx": int(sdp_match.groups()[0]), + "value": added_value, + } + elif connection_group_match: + added_items["connection_group"] = { + "connection_group_idx": int(connection_group_match.groups()[0]), + "value": added_value, + } + elif match_criterion_match: + added_items["match_criterion"] = { + "sdp_idx": int(match_criterion_match.groups()[0]), + "match_criterion_idx": int(match_criterion_match.groups()[1]), + "value": added_value, + } + new_sdp = sdps[added_items["sdp"]["sdp_idx"]] + src_sdp_idx = new_sdp["id"] + dst_sdp_idx = sdps[added_items["match_criterion"]["sdp_idx"]]["id"] + connection_grp_id = connection_groups[ + added_items["connection_group"]["connection_group_idx"] + ]["id"] + if ( + connection_grp_id + != added_items["match_criterion"]["value"]["target-connection-group-id"] + ): + raise Exception( + "connection group missmatch in destination sdp and added connection group" + ) + match_criteria = new_sdp["service-match-criteria"]["match-criterion"] + match_criterion = match_criteria[0] + elif "iterable_item_removed" in running_candidate_diff: # new SDP added + slice_services = running_resource_value_dict["network-slice-services"][ + "slice-service" + ] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + connection_groups = slice_service["connection-groups"]["connection-group"] + operation_type = "delete" + added_items = { + "sdp": {"sdp_idx": None, "value": {}}, + "connection_group": {"connection_group_idx": None, "value": {}}, + "match_criterion": { + "sdp_idx": None, + "match_criterion_idx": None, + "value": {}, + }, + } + for added_key, added_value in running_candidate_diff[ + "iterable_item_removed" + ].items(): + sdp_match = SDP_DIFF_RE.match(added_key) + connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) + match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) + if sdp_match: + added_items["sdp"] = { + "sdp_idx": int(sdp_match.groups()[0]), + "value": added_value, + } + elif connection_group_match: + added_items["connection_group"] = { + "connection_group_idx": int(connection_group_match.groups()[0]), + "value": added_value, + } + elif match_criterion_match: + added_items["match_criterion"] = { + "sdp_idx": int(match_criterion_match.groups()[0]), + "match_criterion_idx": int(match_criterion_match.groups()[1]), + "value": added_value, + } + new_sdp = sdps[added_items["sdp"]["sdp_idx"]] + src_sdp_idx = new_sdp["id"] + dst_sdp_idx = sdps[added_items["match_criterion"]["sdp_idx"]]["id"] + connection_grp_id = connection_groups[ + added_items["connection_group"]["connection_group_idx"] + ]["id"] + if ( + connection_grp_id + != added_items["match_criterion"]["value"][ + "target-connection-group-id" + ] + ): + raise Exception( + "connection group missmatch in destination sdp and added connection group" + ) + match_criteria = new_sdp["service-match-criteria"]["match-criterion"] + match_criterion = match_criteria[0] + for type_value in match_criterion["match-type"]: + if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": + src_ip = type_value["value"][0].split("/")[0] + elif ( + type_value["type"] == "ietf-network-slice-service:destination-ip-prefix" + ): + dst_ip = type_value["value"][0].split("/")[0] + elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": + src_port = type_value["value"][0] + elif ( + type_value["type"] == "ietf-network-slice-service:destination-tcp-port" + ): + dst_port = type_value["value"][0] + qos_info = { + "upstream": {"max_delay": "0", "bw": "0", "packet_loss": "0"}, + "downstream": {"max_delay": "0", "bw": "0", "packet_loss": "0"}, + } + for cg in connection_groups: + if cg["id"] != connection_grp_id: + continue + for cc in cg["connectivity-construct"]: + if ( + cc["p2p-sender-sdp"] == src_sdp_idx + and cc["p2p-receiver-sdp"] == dst_sdp_idx + ): + direction = "upstream" + elif ( + cc["p2p-sender-sdp"] == dst_sdp_idx + and cc["p2p-receiver-sdp"] == src_sdp_idx + ): + direction = "downstream" + else: + raise Exception("invalid sender and receiver sdp ids") + for metric_bound in cc["service-slo-sle-policy"]["slo-policy"][ + "metric-bound" + ]: + if ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-delay-maximum" + and metric_bound["metric-unit"] == "milliseconds" + ): + qos_info[direction]["max_delay"] = metric_bound["bound"] + elif ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-bandwidth" + and metric_bound["metric-unit"] == "Mbps" + ): + qos_info[direction]["bw"] = metric_bound["bound"] + elif ( + metric_bound["metric-type"] + == "ietf-network-slice-service:two-way-packet-loss" + and metric_bound["metric-unit"] == "percentage" + ): + qos_info[direction]["packet_loss"] = metric_bound[ + "percentile-value" + ] + break + results = [] + resource_value_dict = { + "uuid": service_uuid, + "operation_type": operation_type, + "app_flow_id": f"{src_sdp_idx}_{dst_sdp_idx}_{service_name}", + "app_flow_user_id": str(uuid4()), + "max_latency": int(qos_info["upstream"]["max_delay"]), + "max_jitter": 10, + "max_loss": float(qos_info["upstream"]["packet_loss"]), + "upstream_assure_bw": int(qos_info["upstream"]["bw"]) * 1e6, + "upstream_max_bw": 2 * int(qos_info["upstream"]["bw"]) * 1e6, + "downstream_assure_bw": int(qos_info["downstream"]["bw"]) * 1e6, + "downstream_max_bw": 2 * int(qos_info["downstream"]["bw"]) * 1e6, + "src_ip": src_ip, + "src_port": src_port, + "dst_ip": dst_ip, + "dst_port": dst_port, + } + json_config_rules = setup_config_rules(service_uuid, resource_value_dict) + del controller.device_config.config_rules[:] + for jcr in json_config_rules: + controller.device_config.config_rules.append(ConfigRule(**jcr)) + self.__task_executor.configure_device(controller) + 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) == 0: + return [] + service_uuid = self.__service.service_id.service_uuid.uuid + results = [] + try: + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) + src_device_obj = self.__task_executor.get_device( + DeviceId(**json_device_id(src_device_uuid)) + ) + controller = self.__task_executor.get_device_controller(src_device_obj) + json_config_rules = teardown_config_rules(service_uuid, {}) + if len(json_config_rules) > 0: + del controller.device_config.config_rules[:] + for json_config_rule in json_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 + 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/l3nm_nce/__init__.py b/src/service/service/service_handlers/l3nm_nce/__init__.py new file mode 100644 index 000000000..53d5157f7 --- /dev/null +++ b/src/service/service/service_handlers/l3nm_nce/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + -- GitLab From 310c62faf053be94f9c5477c24af38d2697302a1 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 17:31:16 +0000 Subject: [PATCH 121/463] Moving features outside this issue --- src/context/service/database/Link.py | 5 +---- src/context/service/database/models/LinkModel.py | 6 ------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/context/service/database/Link.py b/src/context/service/database/Link.py index 673947f03..c8c178d50 100644 --- a/src/context/service/database/Link.py +++ b/src/context/service/database/Link.py @@ -28,7 +28,6 @@ from .models.TopologyModel import TopologyLinkModel, TopologyModel from .uuids.EndPoint import endpoint_get_uuid from .uuids.Link import link_get_uuid from .Events import notify_event_context, notify_event_link, notify_event_topology -from .models.enums.LinkType import grpc_to_enum__link_type_enum LOGGER = logging.getLogger(__name__) @@ -68,7 +67,7 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) raw_link_name = request.name link_name = raw_link_uuid if len(raw_link_name) == 0 else raw_link_name link_uuid = link_get_uuid(request.link_id, link_name=link_name, allow_random=True) - link_type = grpc_to_enum__link_type_enum(request.link_type) + now = datetime.datetime.now(datetime.timezone.utc) topology_uuids : Set[str] = set() @@ -118,7 +117,6 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) link_data = [{ 'link_uuid' : link_uuid, 'link_name' : link_name, - 'link_type' : link_type, 'total_capacity_gbps' : total_capacity_gbps, 'used_capacity_gbps' : used_capacity_gbps, 'created_at' : now, @@ -131,7 +129,6 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) index_elements=[LinkModel.link_uuid], set_=dict( link_name = stmt.excluded.link_name, - link_type = stmt.excluded.link_type, total_capacity_gbps = stmt.excluded.total_capacity_gbps, used_capacity_gbps = stmt.excluded.used_capacity_gbps, updated_at = stmt.excluded.updated_at, diff --git a/src/context/service/database/models/LinkModel.py b/src/context/service/database/models/LinkModel.py index 2de279a6e..bf90ea253 100644 --- a/src/context/service/database/models/LinkModel.py +++ b/src/context/service/database/models/LinkModel.py @@ -18,15 +18,12 @@ from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.orm import relationship from typing import Dict from ._Base import _Base -from common.proto.context_pb2 import LinkTypeEnum -from .enums.LinkType import ORM_LinkTypeEnum class LinkModel(_Base): __tablename__ = 'link' link_uuid = Column(UUID(as_uuid=False), primary_key=True) link_name = Column(String, nullable=False) - link_type = Column(Enum(ORM_LinkTypeEnum), nullable=False) total_capacity_gbps = Column(Float, nullable=True) used_capacity_gbps = Column(Float, nullable=True) created_at = Column(DateTime, nullable=False) @@ -47,14 +44,11 @@ class LinkModel(_Base): result = { 'link_id' : self.dump_id(), 'name' : self.link_name, - 'link_type' : self.link_type.value, 'link_endpoint_ids': [ link_endpoint.endpoint.dump_id() for link_endpoint in sorted(self.link_endpoints, key=operator.attrgetter('position')) ], } - if self.link_type is None: - self.link_type = LinkTypeEnum.LINKTYPE_UNKNOWN if self.total_capacity_gbps is not None: attributes : Dict = result.setdefault('attributes', dict()) attributes.setdefault('total_capacity_gbps', self.total_capacity_gbps) -- GitLab From d8db890434acc4def493a6d11b94a65a8874ee63 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 17:39:00 +0000 Subject: [PATCH 122/463] Re-activated all CI/CD pipeline tests --- .gitlab-ci.yml | 64 ++++++++++++++++++++-------------------- src/tests/.gitlab-ci.yml | 16 +++++----- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb6bb7141..2fe405733 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,39 +21,39 @@ stages: # include the individual .gitlab-ci.yml of each micro-service and tests include: -# #- local: '/manifests/.gitlab-ci.yml' -# - local: '/src/monitoring/.gitlab-ci.yml' -# - local: '/src/nbi/.gitlab-ci.yml' + #- local: '/manifests/.gitlab-ci.yml' + - local: '/src/monitoring/.gitlab-ci.yml' + - local: '/src/nbi/.gitlab-ci.yml' - local: '/src/context/.gitlab-ci.yml' -# - local: '/src/device/.gitlab-ci.yml' -# - local: '/src/service/.gitlab-ci.yml' -# - local: '/src/dbscanserving/.gitlab-ci.yml' -# - local: '/src/opticalattackmitigator/.gitlab-ci.yml' -# - local: '/src/opticalattackdetector/.gitlab-ci.yml' -# - local: '/src/opticalattackmanager/.gitlab-ci.yml' -# - local: '/src/opticalcontroller/.gitlab-ci.yml' -# - local: '/src/ztp/.gitlab-ci.yml' -# - local: '/src/policy/.gitlab-ci.yml' -# - local: '/src/automation/.gitlab-ci.yml' -# - local: '/src/forecaster/.gitlab-ci.yml' -# #- local: '/src/webui/.gitlab-ci.yml' -# #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' -# #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' -# #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' -# - local: '/src/slice/.gitlab-ci.yml' -# #- local: '/src/interdomain/.gitlab-ci.yml' -# - local: '/src/pathcomp/.gitlab-ci.yml' -# #- local: '/src/dlt/.gitlab-ci.yml' -# - local: '/src/load_generator/.gitlab-ci.yml' -# - local: '/src/bgpls_speaker/.gitlab-ci.yml' -# - local: '/src/kpi_manager/.gitlab-ci.yml' -# - local: '/src/kpi_value_api/.gitlab-ci.yml' -# - local: '/src/kpi_value_writer/.gitlab-ci.yml' -# - local: '/src/telemetry/.gitlab-ci.yml' -# - local: '/src/analytics/.gitlab-ci.yml' -# - local: '/src/qos_profile/.gitlab-ci.yml' -# - local: '/src/vnt_manager/.gitlab-ci.yml' -# - local: '/src/e2e_orchestrator/.gitlab-ci.yml' + - local: '/src/device/.gitlab-ci.yml' + - local: '/src/service/.gitlab-ci.yml' + - local: '/src/dbscanserving/.gitlab-ci.yml' + - local: '/src/opticalattackmitigator/.gitlab-ci.yml' + - local: '/src/opticalattackdetector/.gitlab-ci.yml' + - local: '/src/opticalattackmanager/.gitlab-ci.yml' + - local: '/src/opticalcontroller/.gitlab-ci.yml' + - local: '/src/ztp/.gitlab-ci.yml' + - local: '/src/policy/.gitlab-ci.yml' + - local: '/src/automation/.gitlab-ci.yml' + - local: '/src/forecaster/.gitlab-ci.yml' + #- local: '/src/webui/.gitlab-ci.yml' + #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' + #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' + #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' + - local: '/src/slice/.gitlab-ci.yml' + #- local: '/src/interdomain/.gitlab-ci.yml' + - local: '/src/pathcomp/.gitlab-ci.yml' + #- local: '/src/dlt/.gitlab-ci.yml' + - local: '/src/load_generator/.gitlab-ci.yml' + - local: '/src/bgpls_speaker/.gitlab-ci.yml' + - local: '/src/kpi_manager/.gitlab-ci.yml' + - local: '/src/kpi_value_api/.gitlab-ci.yml' + - local: '/src/kpi_value_writer/.gitlab-ci.yml' + - local: '/src/telemetry/.gitlab-ci.yml' + - local: '/src/analytics/.gitlab-ci.yml' + - local: '/src/qos_profile/.gitlab-ci.yml' + - local: '/src/vnt_manager/.gitlab-ci.yml' + - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index 2e5d3728d..fdc86805b 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -14,11 +14,11 @@ # include the individual .gitlab-ci.yml of each end-to-end integration test include: -# - local: '/src/tests/ofc22/.gitlab-ci.yml' -# #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' -# - local: '/src/tests/ecoc22/.gitlab-ci.yml' -# #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' -# #- local: '/src/tests/ofc23/.gitlab-ci.yml' -# - local: '/src/tests/ofc24/.gitlab-ci.yml' -# - local: '/src/tests/eucnc24/.gitlab-ci.yml' -# #- local: '/src/tests/ecoc24/.gitlab-ci.yml' + - local: '/src/tests/ofc22/.gitlab-ci.yml' + #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' + - local: '/src/tests/ecoc22/.gitlab-ci.yml' + #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' + #- local: '/src/tests/ofc23/.gitlab-ci.yml' + - local: '/src/tests/ofc24/.gitlab-ci.yml' + - local: '/src/tests/eucnc24/.gitlab-ci.yml' + #- local: '/src/tests/ecoc24/.gitlab-ci.yml' -- GitLab From 846ddd215f190eb4edae8c88482ffa724b88197a Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 24 Dec 2024 17:44:08 +0000 Subject: [PATCH 123/463] Pre-merge code cleanup --- src/tests/ecoc24/tests/create_service.py | 14 ++++++++++++++ src/tests/ecoc24/tests/delete_service.py | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/tests/ecoc24/tests/create_service.py b/src/tests/ecoc24/tests/create_service.py index bc24bccd8..5cc349405 100644 --- a/src/tests/ecoc24/tests/create_service.py +++ b/src/tests/ecoc24/tests/create_service.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 requests url = "http://localhost:8002/tfs-api/link/CSGW1_xe5-CSGW2_xe5" diff --git a/src/tests/ecoc24/tests/delete_service.py b/src/tests/ecoc24/tests/delete_service.py index 0281fb2b3..31644342c 100644 --- a/src/tests/ecoc24/tests/delete_service.py +++ b/src/tests/ecoc24/tests/delete_service.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 requests url = "http://localhost:8002/tfs-api/link/CSGW1_xe5-CSGW2_xe5" -- GitLab From 363195f400980c8b468fc594acebdd3c3c5abd3d Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 24 Dec 2024 19:42:58 +0100 Subject: [PATCH 124/463] feat: initial version of NCE driver added. --- src/device/service/drivers/nce/Constants.py | 25 ++ .../service/drivers/nce/TfsApiClient.py | 172 +++++++++++ src/device/service/drivers/nce/Tools.py | 221 ++++++++++++++ src/device/service/drivers/nce/__init__.py | 13 + src/device/service/drivers/nce/driver.py | 285 ++++++++++++++++++ 5 files changed, 716 insertions(+) create mode 100644 src/device/service/drivers/nce/Constants.py create mode 100644 src/device/service/drivers/nce/TfsApiClient.py create mode 100644 src/device/service/drivers/nce/Tools.py create mode 100644 src/device/service/drivers/nce/__init__.py create mode 100644 src/device/service/drivers/nce/driver.py diff --git a/src/device/service/drivers/nce/Constants.py b/src/device/service/drivers/nce/Constants.py new file mode 100644 index 000000000..df66eb16b --- /dev/null +++ b/src/device/service/drivers/nce/Constants.py @@ -0,0 +1,25 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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, +) + +SPECIAL_RESOURCE_MAPPINGS = { + RESOURCE_ENDPOINTS: "/endpoints", + RESOURCE_INTERFACES: "/interfaces", + RESOURCE_NETWORK_INSTANCES: "/net-instances", +} diff --git a/src/device/service/drivers/nce/TfsApiClient.py b/src/device/service/drivers/nce/TfsApiClient.py new file mode 100644 index 000000000..f635f1a75 --- /dev/null +++ b/src/device/service/drivers/nce/TfsApiClient.py @@ -0,0 +1,172 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Dict, List, Optional + +import requests +from requests.auth import HTTPBasicAuth + +from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum + +GET_DEVICES_URL = "{:s}://{:s}:{:d}/tfs-api/devices" +GET_LINKS_URL = "{:s}://{:s}:{:d}/tfs-api/links" +L3VPN_URL = "{:s}://{:s}:{:d}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" +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_532": 5, + "DEVICEDRIVER_XR": 6, + "DEVICEDRIVER_IETF_L2VPN": 7, + "DEVICEDRIVER_GNMI_OPENCONFIG": 8, + "DEVICEDRIVER_OPTICAL_TFS": 9, + "DEVICEDRIVER_IETF_ACTN": 10, + "DEVICEDRIVER_OC": 11, +} + +MSG_ERROR = "Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}" + +LOGGER = logging.getLogger(__name__) + + +class TfsApiClient: + def __init__( + self, + address: str, + port: int, + scheme: str = "http", + username: Optional[str] = None, + password: Optional[str] = None, + ) -> None: + self._devices_url = GET_DEVICES_URL.format(scheme, address, port) + self._links_url = GET_LINKS_URL.format(scheme, address, port) + self._l3vpn_url = L3VPN_URL.format(scheme, address, port) + self._auth = None + # ( + # HTTPBasicAuth(username, password) + # if username is not None and password is not None + # else None + # ) + + def get_devices_endpoints( + self, import_topology: ImportTopologyEnum = ImportTopologyEnum.DEVICES + ) -> List[Dict]: + LOGGER.debug("[get_devices_endpoints] begin") + LOGGER.debug( + "[get_devices_endpoints] import_topology={:s}".format(str(import_topology)) + ) + + reply = requests.get(self._devices_url, timeout=TIMEOUT, auth=self._auth) + if reply.status_code not in HTTP_OK_CODES: + msg = MSG_ERROR.format( + str(self._devices_url), str(reply.status_code), str(reply) + ) + LOGGER.error(msg) + raise Exception(msg) + + if import_topology == ImportTopologyEnum.DISABLED: + raise Exception( + "Unsupported import_topology mode: {:s}".format(str(import_topology)) + ) + + 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"] + 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)) + + if import_topology == ImportTopologyEnum.DEVICES: + LOGGER.debug("[get_devices_endpoints] devices only; returning") + return result + + reply = requests.get(self._links_url, timeout=TIMEOUT, auth=self._auth) + if reply.status_code not in HTTP_OK_CODES: + msg = MSG_ERROR.format( + str(self._links_url), str(reply.status_code), str(reply) + ) + LOGGER.error(msg) + raise Exception(msg) + + for json_link in reply.json()["links"]: + link_uuid: str = json_link["link_id"]["link_uuid"]["uuid"] + link_url = "/links/link[{:s}]".format(link_uuid) + link_endpoint_ids = [ + ( + json_endpoint_id["device_id"]["device_uuid"]["uuid"], + json_endpoint_id["endpoint_uuid"]["uuid"], + ) + for json_endpoint_id in json_link["link_endpoint_ids"] + ] + link_data = { + "uuid": json_link["link_id"]["link_uuid"]["uuid"], + "name": json_link["name"], + "endpoints": link_endpoint_ids, + } + result.append((link_url, link_data)) + + LOGGER.debug("[get_devices_endpoints] topology; returning") + return result + + def create_connectivity_service(self, l3vpn_data: dict) -> None: + try: + requests.post(self._l3vpn_url, json=l3vpn_data) + except requests.exceptions.ConnectionError: + raise Exception("faild to send post request to TFS L3VPN NBI") + + def delete_connectivity_service(self, service_uuid: str) -> None: + url = self._l3vpn_url + f"/vpn-service={service_uuid}" + try: + requests.delete(url, auth=self._auth) + except requests.exceptions.ConnectionError: + raise Exception("faild to send delete request to TFS L3VPN NBI") diff --git a/src/device/service/drivers/nce/Tools.py b/src/device/service/drivers/nce/Tools.py new file mode 100644 index 000000000..872380bf8 --- /dev/null +++ b/src/device/service/drivers/nce/Tools.py @@ -0,0 +1,221 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Any, Dict, Optional, Tuple + +from common.proto.kpi_sample_types_pb2 import KpiSampleType +from common.type_checkers.Checkers import chk_attribute, chk_string, chk_type +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS + +from .Constants import SPECIAL_RESOURCE_MAPPINGS + +LOGGER = logging.getLogger(__name__) + + +def create_app_flow(resource_value: dict) -> dict: + app_flow_id: str = resource_value["app_flow_id"] + app_flow_user_id: str = resource_value["app_flow_user_id"] + max_latency: int = resource_value["max_latency"] + max_jitter: int = resource_value["max_jitter"] + max_loss: float = resource_value["max_loss"] + upstream_assure_bw: str = resource_value["upstream_assure_bw"] + upstream_max_bw: str = resource_value["upstream_max_bw"] + downstream_assure_bw: str = resource_value["downstream_assure_bw"] + downstream_max_bw: str = resource_value["downstream_max_bw"] + src_ip: str = resource_value["src_ip"] + src_port: str = resource_value["src_port"] + dst_ip: str = resource_value["dst_ip"] + dst_port: str = resource_value["dst_port"] + + app_flow_app_name: str = f"App_Flow_{app_flow_id}" + app_flow_service_profile: str = f"service_{app_flow_id}" + app_id: str = f"app_{app_flow_id}" + app_feature_id: str = f"feature_{app_flow_id}" + app_flow_name: str = resource_value.get("app_flow_name", "App_Flow_Example") + app_flow_max_online_users: int = resource_value.get("app_flow_max_online_users", 1) + app_flow_stas: str = resource_value.get("stas", "00:3D:E1:18:82:9E") + qos_profile_name: str = resource_value.get("app_flow_qos_profile", "AR_VR_Gaming") + app_flow_duration: int = resource_value.get("app_flow_duration", 9999) + protocol: str = resource_value.get("protocol", "tcp") + + app_flow = { + "name": app_flow_name, + "user-id": app_flow_user_id, + "app-name": app_flow_app_name, + "max-online-users": app_flow_max_online_users, + "stas": app_flow_stas, + "qos-profile": qos_profile_name, + "service-profile": app_flow_service_profile, + "duration": app_flow_duration, + } + qos_profile = { + "name": qos_profile_name, + "max-latency": max_latency, + "max-jitter": max_jitter, + "max-loss": max_loss, + "upstream": { + "assure-bandwidth": upstream_assure_bw, + "max-bandwidth": upstream_max_bw, + }, + "downstream": { + "assure-bandwidth": downstream_assure_bw, + "max-bandwidth": downstream_max_bw, + }, + } + application = { + "name": app_flow_name, + "app-id": app_id, + "app-features": { + "app-feature": [ + { + "id": app_feature_id, + "dest-ip": dst_ip, + "dest-port": dst_port, + "src-ip": src_ip, + "src-port": src_port, + "protocol": protocol, + } + ] + }, + } + app_flow_datamodel = { + "huawei-nce-app-flow:app-flows": { + "app-flow": [app_flow], + "qos-profiles": {"qos-profile": [qos_profile]}, + "applications": {"application": [application]}, + } + } + return app_flow_datamodel + + +def process_optional_string_field( + endpoint_data: Dict[str, Any], + field_name: str, + endpoint_resource_value: Dict[str, Any], +) -> None: + field_value = chk_attribute( + field_name, endpoint_data, "endpoint_data", default=None + ) + if field_value is None: + return + chk_string("endpoint_data.{:s}".format(field_name), field_value) + if len(field_value) > 0: + endpoint_resource_value[field_name] = field_value + + +def compose_resource_endpoint( + endpoint_data: Dict[str, Any], +) -> Optional[Tuple[str, Dict]]: + try: + # Check type of endpoint_data + chk_type("endpoint_data", endpoint_data, dict) + + # Check endpoint UUID (mandatory) + endpoint_uuid = chk_attribute("uuid", endpoint_data, "endpoint_data") + chk_string("endpoint_data.uuid", endpoint_uuid, min_length=1) + endpoint_resource_path = SPECIAL_RESOURCE_MAPPINGS.get(RESOURCE_ENDPOINTS) + endpoint_resource_key = "{:s}/endpoint[{:s}]".format( + endpoint_resource_path, endpoint_uuid + ) + endpoint_resource_value = {"uuid": endpoint_uuid} + + # Check endpoint optional string fields + process_optional_string_field(endpoint_data, "name", endpoint_resource_value) + process_optional_string_field( + endpoint_data, "site_location", endpoint_resource_value + ) + process_optional_string_field(endpoint_data, "ce-ip", endpoint_resource_value) + process_optional_string_field( + endpoint_data, "address_ip", endpoint_resource_value + ) + process_optional_string_field( + endpoint_data, "address_prefix", endpoint_resource_value + ) + process_optional_string_field(endpoint_data, "mtu", endpoint_resource_value) + process_optional_string_field( + endpoint_data, "ipv4_lan_prefixes", endpoint_resource_value + ) + process_optional_string_field(endpoint_data, "type", endpoint_resource_value) + process_optional_string_field( + endpoint_data, "context_uuid", endpoint_resource_value + ) + process_optional_string_field( + endpoint_data, "topology_uuid", endpoint_resource_value + ) + + # Check endpoint sample types (optional) + endpoint_sample_types = chk_attribute( + "sample_types", endpoint_data, "endpoint_data", default=[] + ) + chk_type("endpoint_data.sample_types", endpoint_sample_types, list) + sample_types = {} + sample_type_errors = [] + for i, endpoint_sample_type in enumerate(endpoint_sample_types): + field_name = "endpoint_data.sample_types[{:d}]".format(i) + try: + chk_type(field_name, endpoint_sample_type, (int, str)) + if isinstance(endpoint_sample_type, int): + metric_name = KpiSampleType.Name(endpoint_sample_type) + metric_id = endpoint_sample_type + elif isinstance(endpoint_sample_type, str): + metric_id = KpiSampleType.Value(endpoint_sample_type) + metric_name = endpoint_sample_type + else: + str_type = str(type(endpoint_sample_type)) + raise Exception("Bad format: {:s}".format(str_type)) # pylint: disable=broad-exception-raised + except Exception as e: # pylint: disable=broad-exception-caught + MSG = "Unsupported {:s}({:s}) : {:s}" + sample_type_errors.append( + MSG.format(field_name, str(endpoint_sample_type), str(e)) + ) + + metric_name = metric_name.lower().replace("kpisampletype_", "") + monitoring_resource_key = "{:s}/state/{:s}".format( + endpoint_resource_key, metric_name + ) + sample_types[metric_id] = monitoring_resource_key + + if len(sample_type_errors) > 0: + # pylint: disable=broad-exception-raised + raise Exception( + "Malformed Sample Types:\n{:s}".format("\n".join(sample_type_errors)) + ) + + if len(sample_types) > 0: + endpoint_resource_value["sample_types"] = sample_types + + if "site_location" in endpoint_data: + endpoint_resource_value["site_location"] = endpoint_data["site_location"] + + if "ce-ip" in endpoint_data: + endpoint_resource_value["ce-ip"] = endpoint_data["ce-ip"] + + if "address_ip" in endpoint_data: + endpoint_resource_value["address_ip"] = endpoint_data["address_ip"] + + if "address_prefix" in endpoint_data: + endpoint_resource_value["address_prefix"] = endpoint_data["address_prefix"] + + if "mtu" in endpoint_data: + endpoint_resource_value["mtu"] = endpoint_data["mtu"] + + if "ipv4_lan_prefixes" in endpoint_data: + endpoint_resource_value["ipv4_lan_prefixes"] = endpoint_data[ + "ipv4_lan_prefixes" + ] + + return endpoint_resource_key, endpoint_resource_value + except: # pylint: disable=bare-except + LOGGER.exception("Problem composing endpoint({:s})".format(str(endpoint_data))) + return None diff --git a/src/device/service/drivers/nce/__init__.py b/src/device/service/drivers/nce/__init__.py new file mode 100644 index 000000000..bbfc943b6 --- /dev/null +++ b/src/device/service/drivers/nce/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/nce/driver.py b/src/device/service/drivers/nce/driver.py new file mode 100644 index 000000000..3fb3ad553 --- /dev/null +++ b/src/device/service/drivers/nce/driver.py @@ -0,0 +1,285 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 re +import threading +from typing import Any, Iterator, List, Optional, Tuple, Union + +import anytree +import requests +from requests.auth import HTTPBasicAuth + +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.type_checkers.Checkers import chk_length, chk_string, chk_type +from device.service.driver_api._Driver import _Driver +from device.service.driver_api.AnyTreeTools import ( + TreeNode, + dump_subtree, + get_subnode, + set_subnode_value, +) +from device.service.driver_api.ImportTopologyEnum import ( + ImportTopologyEnum, + get_import_topology, +) + +from .Constants import SPECIAL_RESOURCE_MAPPINGS +from .TfsApiClient import TfsApiClient +from .Tools import compose_resource_endpoint + +LOGGER = logging.getLogger(__name__) + + +RE_NCE_APP_FLOW_DATA = re.compile(r"^\/service\[[^\]]+\]\/AppFlow$") +RE_NCE_APP_FLOW_OPERATION = re.compile(r"^\/service\[[^\]]+\]\/AppFlow\/operation$") + +DRIVER_NAME = "nce" +METRICS_POOL = MetricsPool("Device", "Driver", labels={"driver": DRIVER_NAME}) + + +class NCEDriver(_Driver): + def __init__(self, address: str, port: str, **settings) -> None: + super().__init__(DRIVER_NAME, address, int(port), **settings) + self.__lock = threading.Lock() + self.__started = threading.Event() + self.__terminate = threading.Event() + self.__running = TreeNode(".") + scheme = self.settings.get("scheme", "http") + username = self.settings.get("username") + password = self.settings.get("password") + self.tac = TfsApiClient( + self.address, + self.port, + scheme=scheme, + username=username, + password=password, + ) + self.__auth = None + # ( + # HTTPBasicAuth(username, password) + # if username is not None and password is not None + # else None + # ) + self.__tfs_nbi_root = "{:s}://{:s}:{:d}".format( + scheme, self.address, int(self.port) + ) + self.__timeout = int(self.settings.get("timeout", 120)) + self.__import_topology = get_import_topology( + self.settings, default=ImportTopologyEnum.DEVICES + ) + endpoints = self.settings.get("endpoints", []) + endpoint_resources = [] + for endpoint in endpoints: + endpoint_resource = compose_resource_endpoint(endpoint) + if endpoint_resource is None: + continue + endpoint_resources.append(endpoint_resource) + self._set_initial_config(endpoint_resources) + + def _set_initial_config( + self, resources: List[Tuple[str, Any]] + ) -> List[Union[bool, Exception]]: + chk_type("resources", resources, list) + if len(resources) == 0: + return [] + results = [] + resolver = anytree.Resolver(pathattr="name") + with self.__lock: + for i, resource in enumerate(resources): + str_resource_name = "resources[#{:d}]".format(i) + try: + chk_type(str_resource_name, resource, (list, tuple)) + chk_length(str_resource_name, resource, min_length=2, max_length=2) + resource_key, resource_value = resource + chk_string(str_resource_name, resource_key, allow_empty=False) + resource_path = resource_key.split("/") + except Exception as e: # pylint: disable=broad-except + LOGGER.exception( + "Exception validating {:s}: {:s}".format( + str_resource_name, str(resource_key) + ) + ) + results.append(e) # if validation fails, store the exception + continue + + try: + resource_value = json.loads(resource_value) + except: # pylint: disable=bare-except + pass + + set_subnode_value( + resolver, self.__running, resource_path, resource_value + ) + + results.append(True) + return results + + def Connect(self) -> bool: + url = ( + self.__tfs_nbi_root + "/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" + ) + with self.__lock: + if self.__started.is_set(): + return True + try: + # requests.get(url, timeout=self.__timeout, auth=self.__auth) + ... + except requests.exceptions.Timeout: + LOGGER.exception("Timeout connecting {:s}".format(url)) + return False + except Exception: # pylint: disable=broad-except + LOGGER.exception("Exception connecting {:s}".format(url)) + 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) + with self.__lock: + if len(resource_keys) == 0: + return dump_subtree(self.__running) + results = [] + resolver = anytree.Resolver(pathattr="name") + 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) + resource_key = SPECIAL_RESOURCE_MAPPINGS.get( + resource_key, resource_key + ) + resource_path = resource_key.split("/") + except Exception as e: # pylint: disable=broad-except + LOGGER.exception( + "Exception validating {:s}: {:s}".format( + str_resource_name, str(resource_key) + ) + ) + results.append( + (resource_key, e) + ) # if validation fails, store the exception + continue + + resource_node = get_subnode( + resolver, self.__running, resource_path, default=None + ) + # if not found, resource_node is None + if resource_node is None: + continue + results.extend(dump_subtree(resource_node)) + return results + 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: + for resource in resources: + resource_key, resource_value = resource + if RE_NCE_APP_FLOW_OPERATION.match(resource_key): + operation_type = json.loads(resource_value)['type'] + results.append((resource_key, True)) + break + else: + raise Exception("operation type not found in resources") + for resource in resources: + LOGGER.info("resource = {:s}".format(str(resource))) + resource_key, resource_value = resource + if not RE_NCE_APP_FLOW_DATA.match(resource_key): + continue + try: + resource_value = json.loads(resource_value) + if operation_type == "create": + # create the underlying app flow + # self.tac.create_app_flow(resource_value) + ... + elif operation_type == 'delete': + # delete the underlying app flow + # self.tac.delete_app_flow(resource_value) + ... + LOGGER.debug(f"app_flow_datamodel {resource_value}") + 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: + 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.__tfs_nbi_root, self.__auth, service_uuid): + # self.tac.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 L3VPN 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 L3VPN 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 L3VPN does not support monitoring by now + return [] -- GitLab From 00e3650a15a52aa627cd273dd7cf9e98b8343f20 Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 24 Dec 2024 19:45:56 +0100 Subject: [PATCH 125/463] feat: initial version of ietf slice driver added. --- .../service/drivers/ietf_slice/Constants.py | 25 ++ .../drivers/ietf_slice/TfsApiClient.py | 172 +++++++++ .../service/drivers/ietf_slice/Tools.py | 340 ++++++++++++++++++ .../service/drivers/ietf_slice/__init__.py | 13 + .../service/drivers/ietf_slice/driver.py | 307 ++++++++++++++++ 5 files changed, 857 insertions(+) create mode 100644 src/device/service/drivers/ietf_slice/Constants.py create mode 100644 src/device/service/drivers/ietf_slice/TfsApiClient.py create mode 100644 src/device/service/drivers/ietf_slice/Tools.py create mode 100644 src/device/service/drivers/ietf_slice/__init__.py create mode 100644 src/device/service/drivers/ietf_slice/driver.py diff --git a/src/device/service/drivers/ietf_slice/Constants.py b/src/device/service/drivers/ietf_slice/Constants.py new file mode 100644 index 000000000..df66eb16b --- /dev/null +++ b/src/device/service/drivers/ietf_slice/Constants.py @@ -0,0 +1,25 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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, +) + +SPECIAL_RESOURCE_MAPPINGS = { + RESOURCE_ENDPOINTS: "/endpoints", + RESOURCE_INTERFACES: "/interfaces", + RESOURCE_NETWORK_INSTANCES: "/net-instances", +} diff --git a/src/device/service/drivers/ietf_slice/TfsApiClient.py b/src/device/service/drivers/ietf_slice/TfsApiClient.py new file mode 100644 index 000000000..487390f95 --- /dev/null +++ b/src/device/service/drivers/ietf_slice/TfsApiClient.py @@ -0,0 +1,172 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Dict, List, Optional + +import requests +from requests.auth import HTTPBasicAuth + +from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum + +GET_DEVICES_URL = "{:s}://{:s}:{:d}/tfs-api/devices" +GET_LINKS_URL = "{:s}://{:s}:{:d}/tfs-api/links" +IETF_SLICE_URL = "{:s}://{:s}:{:d}/restconf/data/ietf-network-slice-service:ietf-nss" +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_532": 5, + "DEVICEDRIVER_XR": 6, + "DEVICEDRIVER_IETF_L2VPN": 7, + "DEVICEDRIVER_GNMI_OPENCONFIG": 8, + "DEVICEDRIVER_OPTICAL_TFS": 9, + "DEVICEDRIVER_IETF_ACTN": 10, + "DEVICEDRIVER_OC": 11, +} + +MSG_ERROR = "Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}" + +LOGGER = logging.getLogger(__name__) + + +class TfsApiClient: + def __init__( + self, + address: str, + port: int, + scheme: str = "http", + username: Optional[str] = None, + password: Optional[str] = None, + ) -> None: + self._devices_url = GET_DEVICES_URL.format(scheme, address, port) + self._links_url = GET_LINKS_URL.format(scheme, address, port) + self._slice_url = IETF_SLICE_URL.format(scheme, address, port) + self._auth = None + # ( + # HTTPBasicAuth(username, password) + # if username is not None and password is not None + # else None + # ) + + # def get_devices_endpoints( + # self, import_topology: ImportTopologyEnum = ImportTopologyEnum.DEVICES + # ) -> List[Dict]: + # LOGGER.debug("[get_devices_endpoints] begin") + # LOGGER.debug( + # "[get_devices_endpoints] import_topology={:s}".format(str(import_topology)) + # ) + + # reply = requests.get(self._devices_url, timeout=TIMEOUT, auth=self._auth) + # if reply.status_code not in HTTP_OK_CODES: + # msg = MSG_ERROR.format( + # str(self._devices_url), str(reply.status_code), str(reply) + # ) + # LOGGER.error(msg) + # raise Exception(msg) + + # if import_topology == ImportTopologyEnum.DISABLED: + # raise Exception( + # "Unsupported import_topology mode: {:s}".format(str(import_topology)) + # ) + + # 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"] + # 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)) + + # if import_topology == ImportTopologyEnum.DEVICES: + # LOGGER.debug("[get_devices_endpoints] devices only; returning") + # return result + + # reply = requests.get(self._links_url, timeout=TIMEOUT, auth=self._auth) + # if reply.status_code not in HTTP_OK_CODES: + # msg = MSG_ERROR.format( + # str(self._links_url), str(reply.status_code), str(reply) + # ) + # LOGGER.error(msg) + # raise Exception(msg) + + # for json_link in reply.json()["links"]: + # link_uuid: str = json_link["link_id"]["link_uuid"]["uuid"] + # link_url = "/links/link[{:s}]".format(link_uuid) + # link_endpoint_ids = [ + # ( + # json_endpoint_id["device_id"]["device_uuid"]["uuid"], + # json_endpoint_id["endpoint_uuid"]["uuid"], + # ) + # for json_endpoint_id in json_link["link_endpoint_ids"] + # ] + # link_data = { + # "uuid": json_link["link_id"]["link_uuid"]["uuid"], + # "name": json_link["name"], + # "endpoints": link_endpoint_ids, + # } + # result.append((link_url, link_data)) + + # LOGGER.debug("[get_devices_endpoints] topology; returning") + # # return resu + + def create_slice(self, slice_data: dict) -> None: + try: + requests.post(self._slice_url, json=slice_data) + except requests.exceptions.ConnectionError: + raise Exception("faild to send post request to TFS L3VPN NBI") + + def delete_slice(self, slice_uuid: str) -> None: + url = self.__url + f"/vpn-service={slice_uuid}" + try: + requests.delete(url, auth=self._auth) + except requests.exceptions.ConnectionError: + raise Exception("faild to send delete request to TFS L3VPN NBI") diff --git a/src/device/service/drivers/ietf_slice/Tools.py b/src/device/service/drivers/ietf_slice/Tools.py new file mode 100644 index 000000000..3ef08ddf7 --- /dev/null +++ b/src/device/service/drivers/ietf_slice/Tools.py @@ -0,0 +1,340 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Any, Dict, Optional, Tuple, TypedDict + +import requests + +from common.proto.kpi_sample_types_pb2 import KpiSampleType +from common.type_checkers.Checkers import chk_attribute, chk_string, chk_type +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS + +from .Constants import SPECIAL_RESOURCE_MAPPINGS + +LOGGER = logging.getLogger(__name__) + + +def service_exists(wim_url: str, auth, service_uuid: str) -> bool: + try: + get_connectivity_service(wim_url, auth, service_uuid) + return True + except: # pylint: disable=bare-except + return False + + +def get_all_active_connectivity_services(wim_url: str, auth): + try: + LOGGER.info("Sending get all connectivity services") + servicepoint = f"{wim_url}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" + response = requests.get(servicepoint, auth=auth) + + if response.status_code != requests.codes.ok: + raise Exception( + "Unable to get all connectivity services", + http_code=response.status_code, + ) + + return response + except requests.exceptions.ConnectionError: + raise Exception("Request Timeout", http_code=408) + + +def get_connectivity_service(wim_url, auth, service_uuid): + try: + LOGGER.info("Sending get connectivity service") + servicepoint = f"{wim_url}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={service_uuid}" + + response = requests.get(servicepoint) + + if response.status_code != requests.codes.ok: + raise Exception( + "Unable to get connectivity service{:s}".format(str(service_uuid)), + http_code=response.status_code, + ) + + return response + except requests.exceptions.ConnectionError: + raise Exception("Request Timeout", http_code=408) + + +def create_slice_datamodel(resource_value: dict) -> dict: + src_node_id: str = resource_value["src_node_id"] + src_mgmt_ip_address: str = resource_value["src_mgmt_ip_address"] + src_ac_node_id: str = resource_value["src_ac_node_id"] + src_ac_ep_id: str = resource_value["src_ac_ep_id"] + src_vlan: str = resource_value["src_vlan"] + + dst_node_id: str = resource_value["dst_node_id"] + dst_mgmt_ip_address: str = resource_value["dst_mgmt_ip_address"] + dst_ac_node_id: str = resource_value["dst_ac_node_id"] + dst_ac_ep_id: str = resource_value["dst_ac_ep_id"] + dst_vlan: str = resource_value["dst_vlan"] + + slice_id: str = resource_value["slice_id"] + delay: str = resource_value["delay"] + bandwidth: str = resource_value["bandwidth"] + packet_loss: str = resource_value["packet_loss"] + + sdps = [ + { + "id": "1", + "node-id": src_node_id, + "sdp-ip-address": [src_mgmt_ip_address], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [src_vlan], + }, + ], + "target-connection-group-id": "line1", + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "0", + "description": "dsc", + "ac-node-id": src_ac_node_id, + "ac-tp-id": src_ac_ep_id, + } + ] + }, + }, + { + "id": "2", + "node-id": dst_node_id, + "sdp-ip-address": [dst_mgmt_ip_address], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [dst_vlan], + }, + ], + "target-connection-group-id": "line1", + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "0", + "description": "dsc", + "ac-node-id": dst_ac_node_id, + "ac-tp-id": dst_ac_ep_id, + } + ] + }, + }, + ] + + connection_groups = [ + { + "id": "line1", + "connectivity-type": "point-to-point", + "connectivity-construct": [ + { + "id": 1, + "p2mp-sender-sdp": "1", + "p2mp-receiver-sdp": ["2"], + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": delay, + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": bandwidth, + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": packet_loss, + }, + ] + } + }, + }, + { + "id": 2, + "p2mp-sender-sdp": "2", + "p2mp-receiver-sdp": ["1"], + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": delay, + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": bandwidth, + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": packet_loss, + }, + ] + } + }, + }, + ], + } + ] + + slice_service = { + "id": slice_id, + "description": "dsc", + "sdps": {"sdp": sdps}, + "connection-groups": {"connection-group": connection_groups}, + } + slice_data_model = {"network-slice-services": {"slice-service": [slice_service]}} + return slice_data_model + + +def process_optional_string_field( + endpoint_data: Dict[str, Any], + field_name: str, + endpoint_resource_value: Dict[str, Any], +) -> None: + field_value = chk_attribute( + field_name, endpoint_data, "endpoint_data", default=None + ) + if field_value is None: + return + chk_string("endpoint_data.{:s}".format(field_name), field_value) + if len(field_value) > 0: + endpoint_resource_value[field_name] = field_value + + +def compose_resource_endpoint( + endpoint_data: Dict[str, Any], +) -> Optional[Tuple[str, Dict]]: + try: + # Check type of endpoint_data + chk_type("endpoint_data", endpoint_data, dict) + + # Check endpoint UUID (mandatory) + endpoint_uuid = chk_attribute("uuid", endpoint_data, "endpoint_data") + chk_string("endpoint_data.uuid", endpoint_uuid, min_length=1) + endpoint_resource_path = SPECIAL_RESOURCE_MAPPINGS.get(RESOURCE_ENDPOINTS) + endpoint_resource_key = "{:s}/endpoint[{:s}]".format( + endpoint_resource_path, endpoint_uuid + ) + endpoint_resource_value = {"uuid": endpoint_uuid} + + # Check endpoint optional string fields + process_optional_string_field(endpoint_data, "name", endpoint_resource_value) + process_optional_string_field( + endpoint_data, "site_location", endpoint_resource_value + ) + process_optional_string_field(endpoint_data, "ce-ip", endpoint_resource_value) + process_optional_string_field( + endpoint_data, "address_ip", endpoint_resource_value + ) + process_optional_string_field( + endpoint_data, "address_prefix", endpoint_resource_value + ) + process_optional_string_field(endpoint_data, "mtu", endpoint_resource_value) + process_optional_string_field( + endpoint_data, "ipv4_lan_prefixes", endpoint_resource_value + ) + process_optional_string_field(endpoint_data, "type", endpoint_resource_value) + process_optional_string_field( + endpoint_data, "context_uuid", endpoint_resource_value + ) + process_optional_string_field( + endpoint_data, "topology_uuid", endpoint_resource_value + ) + + # Check endpoint sample types (optional) + endpoint_sample_types = chk_attribute( + "sample_types", endpoint_data, "endpoint_data", default=[] + ) + chk_type("endpoint_data.sample_types", endpoint_sample_types, list) + sample_types = {} + sample_type_errors = [] + for i, endpoint_sample_type in enumerate(endpoint_sample_types): + field_name = "endpoint_data.sample_types[{:d}]".format(i) + try: + chk_type(field_name, endpoint_sample_type, (int, str)) + if isinstance(endpoint_sample_type, int): + metric_name = KpiSampleType.Name(endpoint_sample_type) + metric_id = endpoint_sample_type + elif isinstance(endpoint_sample_type, str): + metric_id = KpiSampleType.Value(endpoint_sample_type) + metric_name = endpoint_sample_type + else: + str_type = str(type(endpoint_sample_type)) + raise Exception("Bad format: {:s}".format(str_type)) # pylint: disable=broad-exception-raised + except Exception as e: # pylint: disable=broad-exception-caught + MSG = "Unsupported {:s}({:s}) : {:s}" + sample_type_errors.append( + MSG.format(field_name, str(endpoint_sample_type), str(e)) + ) + + metric_name = metric_name.lower().replace("kpisampletype_", "") + monitoring_resource_key = "{:s}/state/{:s}".format( + endpoint_resource_key, metric_name + ) + sample_types[metric_id] = monitoring_resource_key + + if len(sample_type_errors) > 0: + # pylint: disable=broad-exception-raised + raise Exception( + "Malformed Sample Types:\n{:s}".format("\n".join(sample_type_errors)) + ) + + if len(sample_types) > 0: + endpoint_resource_value["sample_types"] = sample_types + + if "site_location" in endpoint_data: + endpoint_resource_value["site_location"] = endpoint_data["site_location"] + + if "ce-ip" in endpoint_data: + endpoint_resource_value["ce-ip"] = endpoint_data["ce-ip"] + + if "address_ip" in endpoint_data: + endpoint_resource_value["address_ip"] = endpoint_data["address_ip"] + + if "address_prefix" in endpoint_data: + endpoint_resource_value["address_prefix"] = endpoint_data["address_prefix"] + + if "mtu" in endpoint_data: + endpoint_resource_value["mtu"] = endpoint_data["mtu"] + + if "ipv4_lan_prefixes" in endpoint_data: + endpoint_resource_value["ipv4_lan_prefixes"] = endpoint_data[ + "ipv4_lan_prefixes" + ] + + return endpoint_resource_key, endpoint_resource_value + except: # pylint: disable=bare-except + LOGGER.exception("Problem composing endpoint({:s})".format(str(endpoint_data))) + return None diff --git a/src/device/service/drivers/ietf_slice/__init__.py b/src/device/service/drivers/ietf_slice/__init__.py new file mode 100644 index 000000000..bbfc943b6 --- /dev/null +++ b/src/device/service/drivers/ietf_slice/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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_slice/driver.py b/src/device/service/drivers/ietf_slice/driver.py new file mode 100644 index 000000000..970833232 --- /dev/null +++ b/src/device/service/drivers/ietf_slice/driver.py @@ -0,0 +1,307 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 re +import threading +from typing import Any, Iterator, List, Optional, Tuple, Union + +import anytree +import requests +from requests.auth import HTTPBasicAuth + +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.type_checkers.Checkers import chk_length, chk_string, chk_type +from device.service.driver_api._Driver import ( + RESOURCE_ENDPOINTS, + RESOURCE_SERVICES, + _Driver, +) +from device.service.driver_api.AnyTreeTools import ( + TreeNode, + dump_subtree, + get_subnode, + set_subnode_value, +) +from device.service.driver_api.ImportTopologyEnum import ( + ImportTopologyEnum, + get_import_topology, +) + +from .Constants import SPECIAL_RESOURCE_MAPPINGS +from .TfsApiClient import TfsApiClient +from .Tools import ( + compose_resource_endpoint, + service_exists, +) + +LOGGER = logging.getLogger(__name__) + + +ALL_RESOURCE_KEYS = [ + RESOURCE_ENDPOINTS, + RESOURCE_SERVICES, +] + +RE_IETF_SLICE_DATA = re.compile(r"^\/service\[[^\]]+\]\/IETFSlice$") +RE_IETF_SLICE_OPERATION = re.compile(r"^\/service\[[^\]]+\]\/IETFSlice\/operation$") + +DRIVER_NAME = "ietf_slice" +METRICS_POOL = MetricsPool("Device", "Driver", labels={"driver": DRIVER_NAME}) + + +class IetfSliceDriver(_Driver): + def __init__(self, address: str, port: str, **settings) -> None: + super().__init__(DRIVER_NAME, address, int(port), **settings) + self.__lock = threading.Lock() + self.__started = threading.Event() + self.__terminate = threading.Event() + self.__running = TreeNode(".") + scheme = self.settings.get("scheme", "http") + username = self.settings.get("username") + password = self.settings.get("password") + self.tac = TfsApiClient( + self.address, + self.port, + scheme=scheme, + username=username, + password=password, + ) + self.__auth = None + # ( + # HTTPBasicAuth(username, password) + # if username is not None and password is not None + # else None + # ) + self.__tfs_nbi_root = "{:s}://{:s}:{:d}".format( + scheme, self.address, int(self.port) + ) + self.__timeout = int(self.settings.get("timeout", 120)) + self.__import_topology = get_import_topology( + self.settings, default=ImportTopologyEnum.DEVICES + ) + endpoints = self.settings.get("endpoints", []) + endpoint_resources = [] + for endpoint in endpoints: + endpoint_resource = compose_resource_endpoint(endpoint) + if endpoint_resource is None: + continue + endpoint_resources.append(endpoint_resource) + self._set_initial_config(endpoint_resources) + + def _set_initial_config( + self, resources: List[Tuple[str, Any]] + ) -> List[Union[bool, Exception]]: + chk_type("resources", resources, list) + if len(resources) == 0: + return [] + results = [] + resolver = anytree.Resolver(pathattr="name") + with self.__lock: + for i, resource in enumerate(resources): + str_resource_name = "resources[#{:d}]".format(i) + try: + chk_type(str_resource_name, resource, (list, tuple)) + chk_length(str_resource_name, resource, min_length=2, max_length=2) + resource_key, resource_value = resource + chk_string(str_resource_name, resource_key, allow_empty=False) + resource_path = resource_key.split("/") + except Exception as e: # pylint: disable=broad-except + LOGGER.exception( + "Exception validating {:s}: {:s}".format( + str_resource_name, str(resource_key) + ) + ) + results.append(e) # if validation fails, store the exception + continue + + try: + resource_value = json.loads(resource_value) + except: # pylint: disable=bare-except + pass + + set_subnode_value( + resolver, self.__running, resource_path, resource_value + ) + + results.append(True) + return results + + def Connect(self) -> bool: + url = self.__tfs_nbi_root + "/restconf/data/ietf-network-slice-service:ietf-nss" + with self.__lock: + if self.__started.is_set(): + return True + try: + # requests.get(url, timeout=self.__timeout, auth=self.__auth) + ... + except requests.exceptions.Timeout: + LOGGER.exception("Timeout connecting {:s}".format(url)) + return False + except Exception: # pylint: disable=broad-except + LOGGER.exception("Exception connecting {:s}".format(url)) + 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) + with self.__lock: + if len(resource_keys) == 0: + return dump_subtree(self.__running) + results = [] + resolver = anytree.Resolver(pathattr="name") + 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) + resource_key = SPECIAL_RESOURCE_MAPPINGS.get( + resource_key, resource_key + ) + resource_path = resource_key.split("/") + except Exception as e: # pylint: disable=broad-except + LOGGER.exception( + "Exception validating {:s}: {:s}".format( + str_resource_name, str(resource_key) + ) + ) + results.append( + (resource_key, e) + ) # if validation fails, store the exception + continue + + resource_node = get_subnode( + resolver, self.__running, resource_path, default=None + ) + # if not found, resource_node is None + if resource_node is None: + continue + results.extend(dump_subtree(resource_node)) + return results + 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: + for resource in resources: + resource_key, resource_value = resource + if RE_IETF_SLICE_OPERATION.match(resource_key): + operation_type = json.loads(resource_value)["type"] + results.append((resource_key, True)) + break + else: + raise Exception("operation type not found in resources") + for resource in resources: + LOGGER.info("resource = {:s}".format(str(resource))) + resource_key, resource_value = resource + if not RE_IETF_SLICE_DATA.match(resource_key): + continue + try: + resource_value = json.loads(resource_value) + + if operation_type == "create": + # create the underlying service + # self.tac.create_slice(resource_value) + ... + elif ( + len( + resource_value["network-slice-services"]["slice-service"][ + 0 + ]["connection-groups"]["connection-group"] + ) + == 0 + and operation_type == "update" + ): + # Remove the IP transport service + # self.tac.remove_slice(service_uuid) + ... + elif operation_type == "update": + # update the underlying service bandwidth + # self.tac.update_slice(resource_value) + ... + 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: + 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.__tfs_nbi_root, self.__auth, service_uuid): + # self.tac.delete_slice(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 Slice 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 Slice 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 Slice does not support monitoring by now + return [] -- GitLab From e9da562a35a2be1ac27ad74961503e52ee7fa513 Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 24 Dec 2024 20:38:08 +0100 Subject: [PATCH 126/463] feat: update IETF Slice connection group operations added to TFS NBI --- .../NSS_Services_Connection_Group.py | 21 +++++ .../ietf_network_slice/ietf_slice_handler.py | 76 +++++++++---------- 2 files changed, 57 insertions(+), 40 deletions(-) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py index c74e46f82..208fd7a0f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py @@ -36,6 +36,27 @@ class NSS_Service_Connection_Group(Resource): # TODO Return list of current network-slice-services return response + # @HTTP_AUTH.login_required + def update(self, slice_id: str, connection_group_id: str): + if not request.is_json: + raise UnsupportedMediaType("JSON payload is required") + request_data: Dict = request.json + + context_client = ContextClient() + slice_request = IETFSliceHandler.update_connection_group( + slice_id, request_data, context_client + ) + slice_client = SliceClient() + slice_client.UpdateSlice(slice_request) + slice_request = IETFSliceHandler.copy_candidate_ietf_slice_data_to_running( + slice_id, context_client + ) + _ = context_client.SetSlice(slice_request) + + response = jsonify({}) + response.status_code = HTTP_CREATED + return response + # @HTTP_AUTH.login_required def delete(self, slice_id: str, connection_group_id: str): context_client = ContextClient() diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py index afbbff343..b6801611d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py @@ -293,6 +293,42 @@ class IETFSliceHandler: validate_ietf_slice_data(ietf_data) return slice + @staticmethod + def update_connection_group( + self, + slice_name: str, + updated_connection_group: dict, + context_client: ContextClient, + ): + slice_request = get_slice_by_defualt_name( + context_client, slice_name, rw_copy=False + ) + slice_config = slice_request.slice_config + cr = get_custom_config_rule(slice_config, CANDIDATE_RESOURCE_KEY) + candidate_ietf_data = json.loads(cr.custom.resource_value) + slice_services = candidate_ietf_data["network-slice-services"]["slice-service"] + slice_service = slice_services[0] + slice_connection_groups = slice_service["connection-groups"]["connection-group"] + connection_group_id = updated_connection_group["connection-group"][0]["id"] + cg_idx = list( + ( + slice_cg["id"] == connection_group_id + for slice_cg in slice_connection_groups + ) + ).index(True) + slice_connection_groups[cg_idx] = updated_connection_group["connection-group"][ + 0 + ] + fields = { + name: (value, RAISE_IF_DIFFERS) + for name, value in candidate_ietf_data.items() + } + update_config_rule_custom( + slice_request.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields + ) + slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED + return slice_request + @staticmethod def delete_connection_group( slice_uuid: str, connection_group_id: str, context_client: ContextClient @@ -321,47 +357,7 @@ class IETFSliceHandler: update_config_rule_custom( slice_request.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields ) - # src_sdp_id = removed_connection_group["connectivity-construct"][0][ - # "p2p-sender-sdp" - # ] - # dst_sdp_id = removed_connection_group["connectivity-construct"][0][ - # "p2p-receiver-sdp" - # ] - # cr = get_custom_config_rule(slice_config, RUNNING_RESOURCE_KEY) - # running_ietf_data = json.loads(cr.custom.resource_value) - # slice_services = running_ietf_data["network-slice-services"]["slice-service"] - # slice_service = slice_services[0] - # sdps = slice_service["sdps"]["sdp"] slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED - # list_endpoints = [] - # for sdp in sdps: - # if sdp["id"] == src_sdp_id: - # attachment_circuits = sdp["attachment-circuits"]["attachment-circuit"] - # if len(attachment_circuits) != 1: - # raise Exception("All SDPs should have 1 attachment-circuit") - # 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 = attachment_circuits[0]["ac-tp-id"] - # list_endpoints.append(endpoint) - # break - # else: - # raise Exception("Second SDP not found") - # for sdp in sdps: - # if sdp["id"] == dst_sdp_id: - # attachment_circuits = sdp["attachment-circuits"]["attachment-circuit"] - # if len(attachment_circuits) != 1: - # raise Exception("All SDPs should have 1 attachment-circuit") - # 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 = attachment_circuits[0]["ac-tp-id"] - # list_endpoints.append(endpoint) - # break - # else: - # raise Exception("SDP not found") - # del slice_request.slice_endpoint_ids[:] - # slice_request.slice_endpoint_ids.extend(list_endpoints) return slice_request @staticmethod -- GitLab From f8d229006f82480e9b3725fa571c4ad78c6afec2 Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 27 Dec 2024 21:36:38 +0100 Subject: [PATCH 127/463] feat: - ietf slice driver connected to tfs slice nbi client - unnecessary functions removed from ietf_slice/Tools.py - TfsApiClient.py renamed to tfs_slice_nbi_client.py --- .../drivers/ietf_slice/TfsApiClient.py | 172 --------------- .../service/drivers/ietf_slice/Tools.py | 195 +----------------- .../service/drivers/ietf_slice/driver.py | 45 ++-- .../ietf_slice/tfs_slice_nbi_client.py | 71 +++++++ 4 files changed, 90 insertions(+), 393 deletions(-) delete mode 100644 src/device/service/drivers/ietf_slice/TfsApiClient.py create mode 100644 src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py diff --git a/src/device/service/drivers/ietf_slice/TfsApiClient.py b/src/device/service/drivers/ietf_slice/TfsApiClient.py deleted file mode 100644 index 487390f95..000000000 --- a/src/device/service/drivers/ietf_slice/TfsApiClient.py +++ /dev/null @@ -1,172 +0,0 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 typing import Dict, List, Optional - -import requests -from requests.auth import HTTPBasicAuth - -from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum - -GET_DEVICES_URL = "{:s}://{:s}:{:d}/tfs-api/devices" -GET_LINKS_URL = "{:s}://{:s}:{:d}/tfs-api/links" -IETF_SLICE_URL = "{:s}://{:s}:{:d}/restconf/data/ietf-network-slice-service:ietf-nss" -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_532": 5, - "DEVICEDRIVER_XR": 6, - "DEVICEDRIVER_IETF_L2VPN": 7, - "DEVICEDRIVER_GNMI_OPENCONFIG": 8, - "DEVICEDRIVER_OPTICAL_TFS": 9, - "DEVICEDRIVER_IETF_ACTN": 10, - "DEVICEDRIVER_OC": 11, -} - -MSG_ERROR = "Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}" - -LOGGER = logging.getLogger(__name__) - - -class TfsApiClient: - def __init__( - self, - address: str, - port: int, - scheme: str = "http", - username: Optional[str] = None, - password: Optional[str] = None, - ) -> None: - self._devices_url = GET_DEVICES_URL.format(scheme, address, port) - self._links_url = GET_LINKS_URL.format(scheme, address, port) - self._slice_url = IETF_SLICE_URL.format(scheme, address, port) - self._auth = None - # ( - # HTTPBasicAuth(username, password) - # if username is not None and password is not None - # else None - # ) - - # def get_devices_endpoints( - # self, import_topology: ImportTopologyEnum = ImportTopologyEnum.DEVICES - # ) -> List[Dict]: - # LOGGER.debug("[get_devices_endpoints] begin") - # LOGGER.debug( - # "[get_devices_endpoints] import_topology={:s}".format(str(import_topology)) - # ) - - # reply = requests.get(self._devices_url, timeout=TIMEOUT, auth=self._auth) - # if reply.status_code not in HTTP_OK_CODES: - # msg = MSG_ERROR.format( - # str(self._devices_url), str(reply.status_code), str(reply) - # ) - # LOGGER.error(msg) - # raise Exception(msg) - - # if import_topology == ImportTopologyEnum.DISABLED: - # raise Exception( - # "Unsupported import_topology mode: {:s}".format(str(import_topology)) - # ) - - # 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"] - # 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)) - - # if import_topology == ImportTopologyEnum.DEVICES: - # LOGGER.debug("[get_devices_endpoints] devices only; returning") - # return result - - # reply = requests.get(self._links_url, timeout=TIMEOUT, auth=self._auth) - # if reply.status_code not in HTTP_OK_CODES: - # msg = MSG_ERROR.format( - # str(self._links_url), str(reply.status_code), str(reply) - # ) - # LOGGER.error(msg) - # raise Exception(msg) - - # for json_link in reply.json()["links"]: - # link_uuid: str = json_link["link_id"]["link_uuid"]["uuid"] - # link_url = "/links/link[{:s}]".format(link_uuid) - # link_endpoint_ids = [ - # ( - # json_endpoint_id["device_id"]["device_uuid"]["uuid"], - # json_endpoint_id["endpoint_uuid"]["uuid"], - # ) - # for json_endpoint_id in json_link["link_endpoint_ids"] - # ] - # link_data = { - # "uuid": json_link["link_id"]["link_uuid"]["uuid"], - # "name": json_link["name"], - # "endpoints": link_endpoint_ids, - # } - # result.append((link_url, link_data)) - - # LOGGER.debug("[get_devices_endpoints] topology; returning") - # # return resu - - def create_slice(self, slice_data: dict) -> None: - try: - requests.post(self._slice_url, json=slice_data) - except requests.exceptions.ConnectionError: - raise Exception("faild to send post request to TFS L3VPN NBI") - - def delete_slice(self, slice_uuid: str) -> None: - url = self.__url + f"/vpn-service={slice_uuid}" - try: - requests.delete(url, auth=self._auth) - except requests.exceptions.ConnectionError: - raise Exception("faild to send delete request to TFS L3VPN NBI") diff --git a/src/device/service/drivers/ietf_slice/Tools.py b/src/device/service/drivers/ietf_slice/Tools.py index 3ef08ddf7..fddfd8940 100644 --- a/src/device/service/drivers/ietf_slice/Tools.py +++ b/src/device/service/drivers/ietf_slice/Tools.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import logging -from typing import Any, Dict, Optional, Tuple, TypedDict +from typing import Any, Dict, Optional, Tuple import requests @@ -25,199 +25,6 @@ from .Constants import SPECIAL_RESOURCE_MAPPINGS LOGGER = logging.getLogger(__name__) -def service_exists(wim_url: str, auth, service_uuid: str) -> bool: - try: - get_connectivity_service(wim_url, auth, service_uuid) - return True - except: # pylint: disable=bare-except - return False - - -def get_all_active_connectivity_services(wim_url: str, auth): - try: - LOGGER.info("Sending get all connectivity services") - servicepoint = f"{wim_url}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" - response = requests.get(servicepoint, auth=auth) - - if response.status_code != requests.codes.ok: - raise Exception( - "Unable to get all connectivity services", - http_code=response.status_code, - ) - - return response - except requests.exceptions.ConnectionError: - raise Exception("Request Timeout", http_code=408) - - -def get_connectivity_service(wim_url, auth, service_uuid): - try: - LOGGER.info("Sending get connectivity service") - servicepoint = f"{wim_url}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={service_uuid}" - - response = requests.get(servicepoint) - - if response.status_code != requests.codes.ok: - raise Exception( - "Unable to get connectivity service{:s}".format(str(service_uuid)), - http_code=response.status_code, - ) - - return response - except requests.exceptions.ConnectionError: - raise Exception("Request Timeout", http_code=408) - - -def create_slice_datamodel(resource_value: dict) -> dict: - src_node_id: str = resource_value["src_node_id"] - src_mgmt_ip_address: str = resource_value["src_mgmt_ip_address"] - src_ac_node_id: str = resource_value["src_ac_node_id"] - src_ac_ep_id: str = resource_value["src_ac_ep_id"] - src_vlan: str = resource_value["src_vlan"] - - dst_node_id: str = resource_value["dst_node_id"] - dst_mgmt_ip_address: str = resource_value["dst_mgmt_ip_address"] - dst_ac_node_id: str = resource_value["dst_ac_node_id"] - dst_ac_ep_id: str = resource_value["dst_ac_ep_id"] - dst_vlan: str = resource_value["dst_vlan"] - - slice_id: str = resource_value["slice_id"] - delay: str = resource_value["delay"] - bandwidth: str = resource_value["bandwidth"] - packet_loss: str = resource_value["packet_loss"] - - sdps = [ - { - "id": "1", - "node-id": src_node_id, - "sdp-ip-address": [src_mgmt_ip_address], - "service-match-criteria": { - "match-criterion": [ - { - "index": 1, - "match-type": [ - { - "type": "ietf-network-slice-service:vlan", - "value": [src_vlan], - }, - ], - "target-connection-group-id": "line1", - } - ] - }, - "attachment-circuits": { - "attachment-circuit": [ - { - "id": "0", - "description": "dsc", - "ac-node-id": src_ac_node_id, - "ac-tp-id": src_ac_ep_id, - } - ] - }, - }, - { - "id": "2", - "node-id": dst_node_id, - "sdp-ip-address": [dst_mgmt_ip_address], - "service-match-criteria": { - "match-criterion": [ - { - "index": 1, - "match-type": [ - { - "type": "ietf-network-slice-service:vlan", - "value": [dst_vlan], - }, - ], - "target-connection-group-id": "line1", - } - ] - }, - "attachment-circuits": { - "attachment-circuit": [ - { - "id": "0", - "description": "dsc", - "ac-node-id": dst_ac_node_id, - "ac-tp-id": dst_ac_ep_id, - } - ] - }, - }, - ] - - connection_groups = [ - { - "id": "line1", - "connectivity-type": "point-to-point", - "connectivity-construct": [ - { - "id": 1, - "p2mp-sender-sdp": "1", - "p2mp-receiver-sdp": ["2"], - "service-slo-sle-policy": { - "slo-policy": { - "metric-bound": [ - { - "metric-type": "ietf-network-slice-service:one-way-delay-maximum", - "metric-unit": "milliseconds", - "bound": delay, - }, - { - "metric-type": "ietf-network-slice-service:one-way-bandwidth", - "metric-unit": "Mbps", - "bound": bandwidth, - }, - { - "metric-type": "ietf-network-slice-service:two-way-packet-loss", - "metric-unit": "percentage", - "percentile-value": packet_loss, - }, - ] - } - }, - }, - { - "id": 2, - "p2mp-sender-sdp": "2", - "p2mp-receiver-sdp": ["1"], - "service-slo-sle-policy": { - "slo-policy": { - "metric-bound": [ - { - "metric-type": "ietf-network-slice-service:one-way-delay-maximum", - "metric-unit": "milliseconds", - "bound": delay, - }, - { - "metric-type": "ietf-network-slice-service:one-way-bandwidth", - "metric-unit": "Mbps", - "bound": bandwidth, - }, - { - "metric-type": "ietf-network-slice-service:two-way-packet-loss", - "metric-unit": "percentage", - "percentile-value": packet_loss, - }, - ] - } - }, - }, - ], - } - ] - - slice_service = { - "id": slice_id, - "description": "dsc", - "sdps": {"sdp": sdps}, - "connection-groups": {"connection-group": connection_groups}, - } - slice_data_model = {"network-slice-services": {"slice-service": [slice_service]}} - return slice_data_model - - def process_optional_string_field( endpoint_data: Dict[str, Any], field_name: str, diff --git a/src/device/service/drivers/ietf_slice/driver.py b/src/device/service/drivers/ietf_slice/driver.py index 970833232..e02542d37 100644 --- a/src/device/service/drivers/ietf_slice/driver.py +++ b/src/device/service/drivers/ietf_slice/driver.py @@ -41,11 +41,8 @@ from device.service.driver_api.ImportTopologyEnum import ( ) from .Constants import SPECIAL_RESOURCE_MAPPINGS -from .TfsApiClient import TfsApiClient -from .Tools import ( - compose_resource_endpoint, - service_exists, -) +from .tfs_slice_nbi_client import TfsApiClient +from .Tools import compose_resource_endpoint LOGGER = logging.getLogger(__name__) @@ -145,8 +142,7 @@ class IetfSliceDriver(_Driver): if self.__started.is_set(): return True try: - # requests.get(url, timeout=self.__timeout, auth=self.__auth) - ... + requests.get(url, timeout=self.__timeout) except requests.exceptions.Timeout: LOGGER.exception("Timeout connecting {:s}".format(url)) return False @@ -195,7 +191,6 @@ class IetfSliceDriver(_Driver): (resource_key, e) ) # if validation fails, store the exception continue - resource_node = get_subnode( resolver, self.__running, resource_path, default=None ) @@ -229,27 +224,23 @@ class IetfSliceDriver(_Driver): continue try: resource_value = json.loads(resource_value) - + slice_name = resource_value["network-slice-services"][ + "slice-service" + ][0]["connection-groups"]["connection-group"] if operation_type == "create": - # create the underlying service - # self.tac.create_slice(resource_value) - ... - elif ( - len( - resource_value["network-slice-services"]["slice-service"][ - 0 - ]["connection-groups"]["connection-group"] - ) - == 0 - and operation_type == "update" - ): - # Remove the IP transport service - # self.tac.remove_slice(service_uuid) - ... + self.tac.create_slice(resource_value) elif operation_type == "update": - # update the underlying service bandwidth - # self.tac.update_slice(resource_value) - ... + connection_groups = resource_value["network-slice-services"][ + "slice-service" + ][0]["connection-groups"]["connection-group"] + if len(connection_groups) != 1: + raise Exception("only one connection group is supported") + connection_group = connection_groups[0] + self.tac.update_slice( + slice_name, connection_group["id"], connection_group + ) + elif operation_type == "delete": + self.tac.delete_slice(slice_name) results.append((resource_key, True)) except Exception as e: # pylint: disable=broad-except LOGGER.exception( diff --git a/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py b/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py new file mode 100644 index 000000000..5443484d7 --- /dev/null +++ b/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py @@ -0,0 +1,71 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Optional + +import requests +from requests.auth import HTTPBasicAuth + +IETF_SLICE_URL = "{:s}://{:s}:{:d}/restconf/data/ietf-network-slice-service:ietf-nss" +TIMEOUT = 30 + +LOGGER = logging.getLogger(__name__) + + +class TfsApiClient: + def __init__( + self, + address: str, + port: int, + scheme: str = "http", + username: Optional[str] = None, + password: Optional[str] = None, + ) -> None: + self._slice_url = IETF_SLICE_URL.format(scheme, address, port) + self._auth = None + # ( + # HTTPBasicAuth(username, password) + # if username is not None and password is not None + # else None + # ) + + def create_slice(self, slice_data: dict) -> None: + url = self._slice_url + "/network-slice-services" + try: + requests.post(url, json=slice_data) + except requests.exceptions.ConnectionError: + raise Exception("faild to send post request to TFS IETF Slice NBI") + + def update_slice( + self, + slice_name: str, + connection_group_id: str, + updated_connection_group_data: dict, + ) -> None: + url = ( + self._slice_url + + f"/network-slice-services/slice-service={slice_name}/connection-groups/connection-group={connection_group_id}" + ) + try: + requests.put(url, json=updated_connection_group_data) + except requests.exceptions.ConnectionError: + raise Exception("faild to send update request to TFS IETF Slice NBI") + + def delete_slice(self, slice_name: str) -> None: + url = self._slice_url + f"/network-slice-services/slice-service={slice_name}" + try: + requests.delete(url) + except requests.exceptions.ConnectionError: + raise Exception("faild to send delete request to TFS IETF Slice NBI") -- GitLab From 91b779d7abcd8f54d804b513945a42cc3164a055 Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 27 Dec 2024 21:42:58 +0100 Subject: [PATCH 128/463] feat: - app-flow create/delete operations and urls added to driver - TfsApiClient.py renamed to nce_fan_client.py - create_app_flow function removed from drivers/nce/Tools.py --- .../service/drivers/nce/TfsApiClient.py | 172 ------------------ src/device/service/drivers/nce/Tools.py | 76 -------- src/device/service/drivers/nce/driver.py | 21 +-- .../service/drivers/nce/nce_fan_client.py | 84 +++++++++ 4 files changed, 94 insertions(+), 259 deletions(-) delete mode 100644 src/device/service/drivers/nce/TfsApiClient.py create mode 100644 src/device/service/drivers/nce/nce_fan_client.py diff --git a/src/device/service/drivers/nce/TfsApiClient.py b/src/device/service/drivers/nce/TfsApiClient.py deleted file mode 100644 index f635f1a75..000000000 --- a/src/device/service/drivers/nce/TfsApiClient.py +++ /dev/null @@ -1,172 +0,0 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 typing import Dict, List, Optional - -import requests -from requests.auth import HTTPBasicAuth - -from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum - -GET_DEVICES_URL = "{:s}://{:s}:{:d}/tfs-api/devices" -GET_LINKS_URL = "{:s}://{:s}:{:d}/tfs-api/links" -L3VPN_URL = "{:s}://{:s}:{:d}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" -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_532": 5, - "DEVICEDRIVER_XR": 6, - "DEVICEDRIVER_IETF_L2VPN": 7, - "DEVICEDRIVER_GNMI_OPENCONFIG": 8, - "DEVICEDRIVER_OPTICAL_TFS": 9, - "DEVICEDRIVER_IETF_ACTN": 10, - "DEVICEDRIVER_OC": 11, -} - -MSG_ERROR = "Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}" - -LOGGER = logging.getLogger(__name__) - - -class TfsApiClient: - def __init__( - self, - address: str, - port: int, - scheme: str = "http", - username: Optional[str] = None, - password: Optional[str] = None, - ) -> None: - self._devices_url = GET_DEVICES_URL.format(scheme, address, port) - self._links_url = GET_LINKS_URL.format(scheme, address, port) - self._l3vpn_url = L3VPN_URL.format(scheme, address, port) - self._auth = None - # ( - # HTTPBasicAuth(username, password) - # if username is not None and password is not None - # else None - # ) - - def get_devices_endpoints( - self, import_topology: ImportTopologyEnum = ImportTopologyEnum.DEVICES - ) -> List[Dict]: - LOGGER.debug("[get_devices_endpoints] begin") - LOGGER.debug( - "[get_devices_endpoints] import_topology={:s}".format(str(import_topology)) - ) - - reply = requests.get(self._devices_url, timeout=TIMEOUT, auth=self._auth) - if reply.status_code not in HTTP_OK_CODES: - msg = MSG_ERROR.format( - str(self._devices_url), str(reply.status_code), str(reply) - ) - LOGGER.error(msg) - raise Exception(msg) - - if import_topology == ImportTopologyEnum.DISABLED: - raise Exception( - "Unsupported import_topology mode: {:s}".format(str(import_topology)) - ) - - 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"] - 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)) - - if import_topology == ImportTopologyEnum.DEVICES: - LOGGER.debug("[get_devices_endpoints] devices only; returning") - return result - - reply = requests.get(self._links_url, timeout=TIMEOUT, auth=self._auth) - if reply.status_code not in HTTP_OK_CODES: - msg = MSG_ERROR.format( - str(self._links_url), str(reply.status_code), str(reply) - ) - LOGGER.error(msg) - raise Exception(msg) - - for json_link in reply.json()["links"]: - link_uuid: str = json_link["link_id"]["link_uuid"]["uuid"] - link_url = "/links/link[{:s}]".format(link_uuid) - link_endpoint_ids = [ - ( - json_endpoint_id["device_id"]["device_uuid"]["uuid"], - json_endpoint_id["endpoint_uuid"]["uuid"], - ) - for json_endpoint_id in json_link["link_endpoint_ids"] - ] - link_data = { - "uuid": json_link["link_id"]["link_uuid"]["uuid"], - "name": json_link["name"], - "endpoints": link_endpoint_ids, - } - result.append((link_url, link_data)) - - LOGGER.debug("[get_devices_endpoints] topology; returning") - return result - - def create_connectivity_service(self, l3vpn_data: dict) -> None: - try: - requests.post(self._l3vpn_url, json=l3vpn_data) - except requests.exceptions.ConnectionError: - raise Exception("faild to send post request to TFS L3VPN NBI") - - def delete_connectivity_service(self, service_uuid: str) -> None: - url = self._l3vpn_url + f"/vpn-service={service_uuid}" - try: - requests.delete(url, auth=self._auth) - except requests.exceptions.ConnectionError: - raise Exception("faild to send delete request to TFS L3VPN NBI") diff --git a/src/device/service/drivers/nce/Tools.py b/src/device/service/drivers/nce/Tools.py index 872380bf8..ba54beb36 100644 --- a/src/device/service/drivers/nce/Tools.py +++ b/src/device/service/drivers/nce/Tools.py @@ -23,82 +23,6 @@ from .Constants import SPECIAL_RESOURCE_MAPPINGS LOGGER = logging.getLogger(__name__) -def create_app_flow(resource_value: dict) -> dict: - app_flow_id: str = resource_value["app_flow_id"] - app_flow_user_id: str = resource_value["app_flow_user_id"] - max_latency: int = resource_value["max_latency"] - max_jitter: int = resource_value["max_jitter"] - max_loss: float = resource_value["max_loss"] - upstream_assure_bw: str = resource_value["upstream_assure_bw"] - upstream_max_bw: str = resource_value["upstream_max_bw"] - downstream_assure_bw: str = resource_value["downstream_assure_bw"] - downstream_max_bw: str = resource_value["downstream_max_bw"] - src_ip: str = resource_value["src_ip"] - src_port: str = resource_value["src_port"] - dst_ip: str = resource_value["dst_ip"] - dst_port: str = resource_value["dst_port"] - - app_flow_app_name: str = f"App_Flow_{app_flow_id}" - app_flow_service_profile: str = f"service_{app_flow_id}" - app_id: str = f"app_{app_flow_id}" - app_feature_id: str = f"feature_{app_flow_id}" - app_flow_name: str = resource_value.get("app_flow_name", "App_Flow_Example") - app_flow_max_online_users: int = resource_value.get("app_flow_max_online_users", 1) - app_flow_stas: str = resource_value.get("stas", "00:3D:E1:18:82:9E") - qos_profile_name: str = resource_value.get("app_flow_qos_profile", "AR_VR_Gaming") - app_flow_duration: int = resource_value.get("app_flow_duration", 9999) - protocol: str = resource_value.get("protocol", "tcp") - - app_flow = { - "name": app_flow_name, - "user-id": app_flow_user_id, - "app-name": app_flow_app_name, - "max-online-users": app_flow_max_online_users, - "stas": app_flow_stas, - "qos-profile": qos_profile_name, - "service-profile": app_flow_service_profile, - "duration": app_flow_duration, - } - qos_profile = { - "name": qos_profile_name, - "max-latency": max_latency, - "max-jitter": max_jitter, - "max-loss": max_loss, - "upstream": { - "assure-bandwidth": upstream_assure_bw, - "max-bandwidth": upstream_max_bw, - }, - "downstream": { - "assure-bandwidth": downstream_assure_bw, - "max-bandwidth": downstream_max_bw, - }, - } - application = { - "name": app_flow_name, - "app-id": app_id, - "app-features": { - "app-feature": [ - { - "id": app_feature_id, - "dest-ip": dst_ip, - "dest-port": dst_port, - "src-ip": src_ip, - "src-port": src_port, - "protocol": protocol, - } - ] - }, - } - app_flow_datamodel = { - "huawei-nce-app-flow:app-flows": { - "app-flow": [app_flow], - "qos-profiles": {"qos-profile": [qos_profile]}, - "applications": {"application": [application]}, - } - } - return app_flow_datamodel - - def process_optional_string_field( endpoint_data: Dict[str, Any], field_name: str, diff --git a/src/device/service/drivers/nce/driver.py b/src/device/service/drivers/nce/driver.py index 3fb3ad553..1a79b70db 100644 --- a/src/device/service/drivers/nce/driver.py +++ b/src/device/service/drivers/nce/driver.py @@ -37,7 +37,7 @@ from device.service.driver_api.ImportTopologyEnum import ( ) from .Constants import SPECIAL_RESOURCE_MAPPINGS -from .TfsApiClient import TfsApiClient +from .nce_fan_client import NCEClient from .Tools import compose_resource_endpoint LOGGER = logging.getLogger(__name__) @@ -60,7 +60,7 @@ class NCEDriver(_Driver): scheme = self.settings.get("scheme", "http") username = self.settings.get("username") password = self.settings.get("password") - self.tac = TfsApiClient( + self.nce = NCEClient( self.address, self.port, scheme=scheme, @@ -135,7 +135,7 @@ class NCEDriver(_Driver): if self.__started.is_set(): return True try: - # requests.get(url, timeout=self.__timeout, auth=self.__auth) + # requests.get(url, timeout=self.__timeout) ... except requests.exceptions.Timeout: LOGGER.exception("Timeout connecting {:s}".format(url)) @@ -207,7 +207,7 @@ class NCEDriver(_Driver): for resource in resources: resource_key, resource_value = resource if RE_NCE_APP_FLOW_OPERATION.match(resource_key): - operation_type = json.loads(resource_value)['type'] + operation_type = json.loads(resource_value)["type"] results.append((resource_key, True)) break else: @@ -220,13 +220,12 @@ class NCEDriver(_Driver): try: resource_value = json.loads(resource_value) if operation_type == "create": - # create the underlying app flow - # self.tac.create_app_flow(resource_value) - ... - elif operation_type == 'delete': - # delete the underlying app flow - # self.tac.delete_app_flow(resource_value) - ... + self.nce.create_app_flow(resource_value) + elif operation_type == "delete": + app_flow_name = resource_value["huawei-nce-app-flow:app-flows"][ + "app-flow" + ][0]["name"] + self.nce.delete_app_flow(app_flow_name) LOGGER.debug(f"app_flow_datamodel {resource_value}") results.append((resource_key, True)) except Exception as e: # pylint: disable=broad-except diff --git a/src/device/service/drivers/nce/nce_fan_client.py b/src/device/service/drivers/nce/nce_fan_client.py new file mode 100644 index 000000000..e193918b7 --- /dev/null +++ b/src/device/service/drivers/nce/nce_fan_client.py @@ -0,0 +1,84 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Optional + +import requests +from requests.auth import HTTPBasicAuth + +NCE_FAN_URL = "{:s}://{:s}:{:d}/restconf/v1/data" +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_532": 5, + "DEVICEDRIVER_XR": 6, + "DEVICEDRIVER_IETF_L2VPN": 7, + "DEVICEDRIVER_GNMI_OPENCONFIG": 8, + "DEVICEDRIVER_OPTICAL_TFS": 9, + "DEVICEDRIVER_IETF_ACTN": 10, + "DEVICEDRIVER_OC": 11, +} + + +class NCEClient: + def __init__( + self, + address: str, + port: int, + scheme: str = "http", + username: Optional[str] = None, + password: Optional[str] = None, + ) -> None: + self._nce_fan_url = NCE_FAN_URL.format(scheme, address, port) + self._auth = None + + def create_app_flow(self, app_flow_data: dict) -> None: + try: + app_data = app_flow_data["huawei-nce-app-flow:app-flows"]["applications"] + app_url = self._nce_fan_url + "/app-flows/apps" + requests.post(app_url, json=app_data) + app_flow_data = { + "app-flow": app_flow_data["huawei-nce-app-flow:app-flows"]["app-flow"] + } + app_flow_url = self._nce_fan_url + "/app-flows" + requests.post(app_flow_url, json=app_flow_data) + except requests.exceptions.ConnectionError: + raise Exception("faild to send post requests to NCE FAN") + + def delete_app_flow(self, app_flow_name: str) -> None: + try: + app_url = self._nce_fan_url + f"/app-flows/apps/application={app_flow_name}" + requests.delete(app_url) + app_flow_url = self._nce_fan_url + f"/app-flows/app-flow={app_flow_name}" + requests.delete(app_flow_url) + except requests.exceptions.ConnectionError: + raise Exception("faild to send delete request to NCE FAN") -- GitLab From 10ba696b4ac6e801b2446367967cc5ff6d34fed5 Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 27 Dec 2024 21:48:04 +0100 Subject: [PATCH 129/463] debug: - update changed to put in connection group endpoints - "network-slice-services" field as the root of IETF Slice NBI made optional --- .../ietf_network_slice/NSS_Services_Connection_Group.py | 2 +- .../nbi_plugins/ietf_network_slice/ietf_slice_handler.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py index 208fd7a0f..0309c6ac4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py @@ -37,7 +37,7 @@ class NSS_Service_Connection_Group(Resource): return response # @HTTP_AUTH.login_required - def update(self, slice_id: str, connection_group_id: str): + def put(self, slice_id: str, connection_group_id: str): if not request.is_json: raise UnsupportedMediaType("JSON payload is required") request_data: Dict = request.json diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py index b6801611d..6b57cb853 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py @@ -107,7 +107,8 @@ class IETFSliceHandler: def create_slice_service( request_data: dict, context_client: ContextClient ) -> Slice: - request_data = {"network-slice-services": request_data} + if "network-slice-services" not in request_data: + request_data = {"network-slice-services": request_data} validate_ietf_slice_data(request_data) slice_services = request_data["network-slice-services"]["slice-service"] slice_service = slice_services[0] -- GitLab From bcf185c320dcf7c2afe77f8369c254dd29796169 Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 27 Dec 2024 21:50:57 +0100 Subject: [PATCH 130/463] enhancement: L3NM IETF L3VPN service handler changed to match IETF Slice data model received in the NBI --- .../L3NM_IETFL3VPN_ServiceHandler.py | 295 ++++++++++++++---- 1 file changed, 232 insertions(+), 63 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py index 5f18e4657..4b4e9add5 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py @@ -14,14 +14,20 @@ import json import logging -from typing import Any, List, Optional, Tuple, Union +from typing import Any, List, Optional, Tuple, TypedDict, Union +from deepdiff import DeepDiff + +from common.DeviceTypes import DeviceTypeEnum 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.proto.context_pb2 import ( + ConfigRule, + Device, + DeviceId, + Service, + ServiceConfig, ) +from common.tools.object_factory.ConfigRule import json_config_rule_delete from common.tools.object_factory.Device import json_device_id from common.type_checkers.Checkers import chk_type from service.service.service_handler_api._ServiceHandler import _ServiceHandler @@ -32,11 +38,81 @@ from service.service.service_handler_api.Tools import ( ) from service.service.task_scheduler.TaskExecutor import TaskExecutor +from .ConfigRules import setup_config_rules + +RUNNING_RESOURCE_KEY = "running_ietf_slice" +CANDIDATE_RESOURCE_KEY = "candidate_ietf_slice" +MTU = 1500 + LOGGER = logging.getLogger(__name__) METRICS_POOL = MetricsPool("Service", "Handler", labels={"handler": "l3nm_ietf_l3vpn"}) +class LANPrefixesDict(TypedDict): + lan: str + lan_tag: str + + +class Ipv4Info(TypedDict): + src_ip: str + dst_ip: str + src_port: str + dst_port: str + vlan: str + + +def get_custom_config_rule( + service_config: ServiceConfig, resource_key: str +) -> Optional[ConfigRule]: + for cr in service_config.config_rules: + if ( + cr.WhichOneof("config_rule") == "custom" + and cr.custom.resource_key == resource_key + ): + return cr + + +def get_running_candidate_ietf_slice_data_diff(service_config: ServiceConfig) -> dict: + running_ietf_slice_cr = get_custom_config_rule(service_config, RUNNING_RESOURCE_KEY) + running_resource_value_dict = json.loads( + running_ietf_slice_cr.custom.resource_value + ) + candidate_ietf_slice_cr = get_custom_config_rule( + service_config, CANDIDATE_RESOURCE_KEY + ) + candidate_resource_value_dict = json.loads( + candidate_ietf_slice_cr.custom.resource_value + ) + return DeepDiff( + running_resource_value_dict, + candidate_resource_value_dict, + ) + + +def extract_match_criterion_ipv4_info( + match_criterion: dict, +) -> Ipv4Info: + for type_value in match_criterion["match-type"]: + if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": + src_ip = type_value["value"][0].split("/")[0] + elif type_value["type"] == "ietf-network-slice-service:destination-ip-prefix": + dst_ip = type_value["value"][0].split("/")[0] + elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": + src_port = type_value["value"][0] + elif type_value["type"] == "ietf-network-slice-service:destination-tcp-port": + dst_port = type_value["value"][0] + elif type_value["type"] == "ietf-network-slice-service:vlan": + vlan = type_value["value"][0] + return Ipv4Info( + src_ip=src_ip, + dst_ip=dst_ip, + src_port=src_port, + dst_port=dst_port, + vlan=vlan, + ) + + class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): def __init__( # pylint: disable=super-init-not-called self, service: Service, task_executor: TaskExecutor, **settings @@ -45,6 +121,43 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): self.__task_executor = task_executor self.__settings_handler = SettingsHandler(service.service_config, **settings) + def __find_IP_transport_edge_endpoints( + self, endpoints + ) -> Tuple[str, str, str, str, Device]: + for ep in endpoints: + device_uuid, endpoint_uuid = get_device_endpoint_uuids(ep) + device_obj = self.__task_executor.get_device( + DeviceId(**json_device_id(device_uuid)) + ) + device_controller = self.__task_executor.get_device_controller(device_obj) + if device_controller.device_type == DeviceTypeEnum.IP_SDN_CONTROLLER: + src_device_uuid, src_endpoint_uuid = device_uuid, endpoint_uuid + src_device_controller = device_controller + break + else: + raise Exception("No IP transport edge endpoints found") + for ep in endpoints[::-1]: + device_uuid, endpoint_uuid = get_device_endpoint_uuids(ep) + device_obj = self.__task_executor.get_device( + DeviceId(**json_device_id(device_uuid)) + ) + device_controller = self.__task_executor.get_device_controller(device_obj) + if device_controller.device_type == DeviceTypeEnum.IP_SDN_CONTROLLER: + dst_device_uuid, dst_endpoint_uuid = device_uuid, endpoint_uuid + dst_device_controller = device_controller + break + else: + raise Exception("No IP transport edge endpoints found") + if src_device_controller != dst_device_controller: + raise Exception("Different Src-Dst devices not supported by now") + return ( + src_device_uuid, + src_endpoint_uuid, + dst_device_uuid, + dst_endpoint_uuid, + src_device_controller, + ) + @metered_subclass_method(METRICS_POOL) def SetEndpoint( self, @@ -54,79 +167,136 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): chk_type("endpoints", endpoints, list) if len(endpoints) < 2: return [] - - service_uuid = self.__service.service_id.service_uuid.uuid - results = [] + service_uuid = self.__service.service_id.service_uuid.uuid + service_config = self.__service.service_config try: - src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) - + ( + src_device_uuid, + src_endpoint_uuid, + dst_device_uuid, + dst_endpoint_uuid, + controller, + ) = self.__find_IP_transport_edge_endpoints(endpoints) + service_uuid = self.__service.service_id.service_uuid.uuid + service_config = self.__service.service_config src_device_obj = self.__task_executor.get_device( DeviceId(**json_device_id(src_device_uuid)) ) src_endpoint_obj = get_endpoint_matching(src_device_obj, src_endpoint_uuid) - for cr in src_device_obj.device_config.config_rules: - if cr.WhichOneof('config_rule') == 'custom' and cr.custom.resource_key == f'/endpoints/endpoint[{src_endpoint_obj.name}]': - src_endpoint_settings = json.loads(cr.custom.resource_value) - break - # src_endpoint_settings = self.__settings_handler.get_endpoint_settings( - # src_device_obj, src_endpoint_obj - # ).value - - src_controller = self.__task_executor.get_device_controller(src_device_obj) - if src_controller is None: src_controller = src_device_obj - - dst_device_uuid, dst_endpoint_uuid = get_device_endpoint_uuids( - endpoints[-1] - ) + src_device_name = src_device_obj.name dst_device_obj = self.__task_executor.get_device( DeviceId(**json_device_id(dst_device_uuid)) ) dst_endpoint_obj = get_endpoint_matching(dst_device_obj, dst_endpoint_uuid) - + dst_device_name = dst_device_obj.name + for cr in src_device_obj.device_config.config_rules: + if ( + cr.WhichOneof("config_rule") == "custom" + and cr.custom.resource_key + == f"/endpoints/endpoint[{src_endpoint_obj.name}]" + ): + src_endpoint_settings = json.loads(cr.custom.resource_value) + break + else: + raise Exception("Endpoint settings not found") for cr in dst_device_obj.device_config.config_rules: - if cr.WhichOneof('config_rule') == 'custom' and cr.custom.resource_key == f'/endpoints/endpoint[{dst_endpoint_obj.name}]': + if ( + cr.WhichOneof("config_rule") == "custom" + and cr.custom.resource_key + == f"/endpoints/endpoint[{dst_endpoint_obj.name}]" + ): dst_endpoint_settings = json.loads(cr.custom.resource_value) break - # dst_endpoint_settings = self.__settings_handler.get_endpoint_settings( - # dst_device_obj, dst_endpoint_obj - # ).value - dst_controller = self.__task_executor.get_device_controller(dst_device_obj) - if dst_controller is None: dst_controller = dst_device_obj - - 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_obj.name, - "src_endpoint_name": src_endpoint_obj.name, - "src_site_location": src_endpoint_settings["site_location"], - "src_ipv4_lan_prefixes": src_endpoint_settings["ipv4_lan_prefixes"], - "src_ce_address": src_endpoint_settings["ce-ip"], - "src_pe_address": src_endpoint_settings["address_ip"], - "src_ce_pe_network_prefix": src_endpoint_settings["address_prefix"], - "src_mtu": src_endpoint_settings["mtu"], - "dst_device_name": dst_device_obj.name, - "dst_endpoint_name": dst_endpoint_obj.name, - "dst_site_location": dst_endpoint_settings["site_location"], - "dst_ipv4_lan_prefixes": dst_endpoint_settings["ipv4_lan_prefixes"], - "dst_ce_address": dst_endpoint_settings["ce-ip"], - "dst_pe_address": dst_endpoint_settings["address_ip"], - "dst_ce_pe_network_prefix": dst_endpoint_settings["address_prefix"], - "dst_mtu": dst_endpoint_settings["mtu"], - }, + else: + raise Exception("Endpoint settings not found") + ietf_slice_running_cr = get_custom_config_rule( + service_config, RUNNING_RESOURCE_KEY ) - del controller.device_config.config_rules[:] - controller.device_config.config_rules.append( - ConfigRule(**json_config_rule) + ietf_slice_candidate_cr = get_custom_config_rule( + service_config, CANDIDATE_RESOURCE_KEY ) + if ( + ietf_slice_running_cr and ietf_slice_candidate_cr + ): # The request comes from the IETF Slice NBI + running_resource_value_dict = json.loads( + ietf_slice_running_cr.custom.resource_value + ) + candidate_resource_value_dict = json.loads( + ietf_slice_candidate_cr.custom.resource_value + ) + running_candidate_diff = get_running_candidate_ietf_slice_data_diff( + service_config + ) + slice_services = candidate_resource_value_dict[ + "network-slice-services" + ]["slice-service"] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + connection_groups = slice_service["connection-groups"][ + "connection-group" + ] + connection_group = connection_groups[0] + connecitivity_constructs = connection_group["connectivity-construct"] + connecitivity_construct = connecitivity_constructs[0] + src_sdp_idx = connecitivity_construct["p2p-sender-sdp"] + dst_sdp_idx = connecitivity_construct["p2p-receiver-sdp"] + src_sdp = next(sdp for sdp in sdps if sdp["id"] == src_sdp_idx) + dst_sdp = next(sdp for sdp in sdps if sdp["id"] == dst_sdp_idx) + src_match_criterion = src_sdp["service-match-criteria"][ + "match-criterion" + ][0] + dst_match_criterion = dst_sdp["service-match-criteria"][ + "match-criterion" + ][0] + src_match_criterion_ipv4_info = extract_match_criterion_ipv4_info( + src_match_criterion + ) + dst_match_criterion_ipv4_info = extract_match_criterion_ipv4_info( + dst_match_criterion + ) + src_ipv4_lan_prefixes = [ + LANPrefixesDict( + lan=src_match_criterion_ipv4_info["dst_ip"], + lan_tag=src_match_criterion_ipv4_info["vlan"], + ) + ] + dst_ipv4_lan_prefixes = [ + LANPrefixesDict( + lan=dst_match_criterion_ipv4_info["dst_ip"], + lan_tag=dst_match_criterion_ipv4_info["vlan"], + ) + ] + src_ce_address = src_endpoint_settings["address_ip"] + src_pe_address = src_ce_address + src_ce_address_prefix = src_endpoint_settings["address_prefix"] + dst_ce_address = dst_endpoint_settings["address_ip"] + dst_pe_address = dst_ce_address + dst_ce_address_prefix = dst_endpoint_settings["address_prefix"] + resource_value_dict = { + "uuid": service_uuid, + "src_device_name": src_device_name, + "src_endpoint_name": src_endpoint_obj.name, + "src_site_location": src_endpoint_settings["site_location"], + "src_ipv4_lan_prefixes": src_ipv4_lan_prefixes, + "src_ce_address": src_ce_address, + "src_pe_address": src_pe_address, + "src_ce_pe_network_prefix": src_ce_address_prefix, + "src_mtu": MTU, + "dst_device_name": dst_device_name, + "dst_endpoint_name": dst_endpoint_obj.name, + "dst_site_location": dst_endpoint_settings["site_location"], + "dst_ipv4_lan_prefixes": dst_ipv4_lan_prefixes, + "dst_ce_address": dst_ce_address, + "dst_pe_address": dst_pe_address, + "dst_ce_pe_network_prefix": dst_ce_address_prefix, + "dst_mtu": MTU, + } + json_config_rules = setup_config_rules(service_uuid, resource_value_dict) + del controller.device_config.config_rules[:] + for jcr in json_config_rules: + controller.device_config.config_rules.append(ConfigRule(**jcr)) 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)) @@ -160,7 +330,6 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): 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 -- GitLab From 5700d6928769435944a7fc51ee5cf90c188b8e08 Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 27 Dec 2024 22:02:32 +0100 Subject: [PATCH 131/463] refactoring --- .../service_handlers/l3nm_nce/ConfigRules.py | 1 - .../l3nm_nce/L3NMNCEServiceHandler.py | 495 +++++++++--------- 2 files changed, 257 insertions(+), 239 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_nce/ConfigRules.py b/src/service/service/service_handlers/l3nm_nce/ConfigRules.py index 471757bda..e74fb6630 100644 --- a/src/service/service/service_handlers/l3nm_nce/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_nce/ConfigRules.py @@ -18,7 +18,6 @@ from common.tools.object_factory.ConfigRule import ( json_config_rule_delete, json_config_rule_set, ) -from service.service.service_handler_api.AnyTreeTools import TreeNode def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: diff --git a/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py b/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py index 1ca908a40..a93764ce7 100644 --- a/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py @@ -29,7 +29,6 @@ from service.service.service_handler_api._ServiceHandler import _ServiceHandler from service.service.service_handler_api.SettingsHandler import SettingsHandler from service.service.service_handler_api.Tools import ( get_device_endpoint_uuids, - get_endpoint_matching, ) from service.service.task_scheduler.TaskExecutor import TaskExecutor @@ -104,253 +103,273 @@ class L3NMNCEServiceHandler(_ServiceHandler): chk_type("endpoints", endpoints, list) if len(endpoints) == 0: return [] - context_client = ContextClient() - service_uuid = self.__service.service_id.service_uuid.uuid - service_name = self.__service.name - service_config = self.__service.service_config - settings = self.__settings_handler.get("/settings") - src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) - src_device_obj = self.__task_executor.get_device( - DeviceId(**json_device_id(src_device_uuid)) - ) - controller = self.__task_executor.get_device_controller(src_device_obj) - list_devices = context_client.ListDevices(Empty()) - devices = list_devices.devices - device_name_device = {d.name: d for d in devices} - device_uuid_device = {d.device_id.device_uuid.uuid: d for d in devices} - running_candidate_diff, running_candidate_diff_no_order = ( - get_running_candidate_ietf_slice_data_diff(service_config) - ) - candidate_ietf_slice_cr = get_custom_config_rule( - service_config, CANDIDATE_RESOURCE_KEY - ) - candidate_resource_value_dict = json.loads( - candidate_ietf_slice_cr.custom.resource_value - ) - running_ietf_slice_cr = get_custom_config_rule( - service_config, RUNNING_RESOURCE_KEY - ) - running_resource_value_dict = json.loads( - running_ietf_slice_cr.custom.resource_value - ) - LOGGER.debug(f"P70: {running_candidate_diff}") - if not running_candidate_diff: # Slice Creation - operation_type = "create" - slice_services = candidate_resource_value_dict["network-slice-services"][ - "slice-service" - ] - slice_service = slice_services[0] - sdps = slice_service["sdps"]["sdp"] - connection_groups = slice_service["connection-groups"]["connection-group"] - sdp_ids = [sdp["id"] for sdp in sdps] - for sdp in sdps: - node_id = sdp["node-id"] - device_obj = device_name_device[node_id] - device_controller = self.__task_executor.get_device_controller( - device_obj - ) - LOGGER.debug(f"P71: {controller}") - LOGGER.debug(f"P72: {device_controller}") - if device_controller is None or controller.name != device_controller.name: - continue - src_sdp_idx = sdp_ids.pop(sdp_ids.index(sdp["id"])) - dst_sdp_idx = sdp_ids[0] - match_criteria = sdp["service-match-criteria"]["match-criterion"] + results = [] + try: + context_client = ContextClient() + service_name = self.__service.name + service_config = self.__service.service_config + settings = self.__settings_handler.get("/settings") + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) + src_device_obj = self.__task_executor.get_device( + DeviceId(**json_device_id(src_device_uuid)) + ) + controller = self.__task_executor.get_device_controller(src_device_obj) + list_devices = context_client.ListDevices(Empty()) + devices = list_devices.devices + device_name_device = {d.name: d for d in devices} + device_uuid_device = {d.device_id.device_uuid.uuid: d for d in devices} + running_candidate_diff, running_candidate_diff_no_order = ( + get_running_candidate_ietf_slice_data_diff(service_config) + ) + candidate_ietf_slice_cr = get_custom_config_rule( + service_config, CANDIDATE_RESOURCE_KEY + ) + candidate_resource_value_dict = json.loads( + candidate_ietf_slice_cr.custom.resource_value + ) + running_ietf_slice_cr = get_custom_config_rule( + service_config, RUNNING_RESOURCE_KEY + ) + running_resource_value_dict = json.loads( + running_ietf_slice_cr.custom.resource_value + ) + if not running_candidate_diff: # Slice Creation + operation_type = "create" + slice_services = candidate_resource_value_dict[ + "network-slice-services" + ]["slice-service"] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + connection_groups = slice_service["connection-groups"][ + "connection-group" + ] + sdp_ids = [sdp["id"] for sdp in sdps] + for sdp in sdps: + node_id = sdp["node-id"] + device_obj = device_name_device[node_id] + device_controller = self.__task_executor.get_device_controller( + device_obj + ) + if ( + device_controller is None + or controller.name != device_controller.name + ): + continue + src_sdp_idx = sdp_ids.pop(sdp_ids.index(sdp["id"])) + dst_sdp_idx = sdp_ids[0] + match_criteria = sdp["service-match-criteria"]["match-criterion"] + match_criterion = match_criteria[0] + connection_grp_id = match_criterion["target-connection-group-id"] + break + else: + raise Exception("connection group id not found") + elif "iterable_item_added" in running_candidate_diff: # new SDP added + slice_services = candidate_resource_value_dict[ + "network-slice-services" + ]["slice-service"] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + connection_groups = slice_service["connection-groups"][ + "connection-group" + ] + operation_type = "create" + added_items = { + "sdp": {"sdp_idx": None, "value": {}}, + "connection_group": {"connection_group_idx": None, "value": {}}, + "match_criterion": { + "sdp_idx": None, + "match_criterion_idx": None, + "value": {}, + }, + } + for added_key, added_value in running_candidate_diff[ + "iterable_item_added" + ].items(): + sdp_match = SDP_DIFF_RE.match(added_key) + connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) + match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) + if sdp_match: + added_items["sdp"] = { + "sdp_idx": int(sdp_match.groups()[0]), + "value": added_value, + } + elif connection_group_match: + added_items["connection_group"] = { + "connection_group_idx": int( + connection_group_match.groups()[0] + ), + "value": added_value, + } + elif match_criterion_match: + added_items["match_criterion"] = { + "sdp_idx": int(match_criterion_match.groups()[0]), + "match_criterion_idx": int( + match_criterion_match.groups()[1] + ), + "value": added_value, + } + new_sdp = sdps[added_items["sdp"]["sdp_idx"]] + src_sdp_idx = new_sdp["id"] + dst_sdp_idx = sdps[added_items["match_criterion"]["sdp_idx"]]["id"] + connection_grp_id = connection_groups[ + added_items["connection_group"]["connection_group_idx"] + ]["id"] + if ( + connection_grp_id + != added_items["match_criterion"]["value"][ + "target-connection-group-id" + ] + ): + raise Exception( + "connection group missmatch in destination sdp and added connection group" + ) + match_criteria = new_sdp["service-match-criteria"]["match-criterion"] match_criterion = match_criteria[0] - connection_grp_id = match_criterion["target-connection-group-id"] - break - else: - raise Exception("connection group id not found") - elif "iterable_item_added" in running_candidate_diff: # new SDP added - slice_services = candidate_resource_value_dict["network-slice-services"][ - "slice-service" - ] - slice_service = slice_services[0] - sdps = slice_service["sdps"]["sdp"] - connection_groups = slice_service["connection-groups"]["connection-group"] - operation_type = "create" - added_items = { - "sdp": {"sdp_idx": None, "value": {}}, - "connection_group": {"connection_group_idx": None, "value": {}}, - "match_criterion": { - "sdp_idx": None, - "match_criterion_idx": None, - "value": {}, - }, - } - for added_key, added_value in running_candidate_diff[ - "iterable_item_added" - ].items(): - sdp_match = SDP_DIFF_RE.match(added_key) - connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) - match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) - if sdp_match: - added_items["sdp"] = { - "sdp_idx": int(sdp_match.groups()[0]), - "value": added_value, - } - elif connection_group_match: - added_items["connection_group"] = { - "connection_group_idx": int(connection_group_match.groups()[0]), - "value": added_value, - } - elif match_criterion_match: - added_items["match_criterion"] = { - "sdp_idx": int(match_criterion_match.groups()[0]), - "match_criterion_idx": int(match_criterion_match.groups()[1]), - "value": added_value, - } - new_sdp = sdps[added_items["sdp"]["sdp_idx"]] - src_sdp_idx = new_sdp["id"] - dst_sdp_idx = sdps[added_items["match_criterion"]["sdp_idx"]]["id"] - connection_grp_id = connection_groups[ - added_items["connection_group"]["connection_group_idx"] - ]["id"] - if ( - connection_grp_id - != added_items["match_criterion"]["value"]["target-connection-group-id"] - ): - raise Exception( - "connection group missmatch in destination sdp and added connection group" - ) - match_criteria = new_sdp["service-match-criteria"]["match-criterion"] - match_criterion = match_criteria[0] - elif "iterable_item_removed" in running_candidate_diff: # new SDP added - slice_services = running_resource_value_dict["network-slice-services"][ - "slice-service" - ] - slice_service = slice_services[0] - sdps = slice_service["sdps"]["sdp"] - connection_groups = slice_service["connection-groups"]["connection-group"] - operation_type = "delete" - added_items = { - "sdp": {"sdp_idx": None, "value": {}}, - "connection_group": {"connection_group_idx": None, "value": {}}, - "match_criterion": { - "sdp_idx": None, - "match_criterion_idx": None, - "value": {}, - }, - } - for added_key, added_value in running_candidate_diff[ - "iterable_item_removed" - ].items(): - sdp_match = SDP_DIFF_RE.match(added_key) - connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) - match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) - if sdp_match: - added_items["sdp"] = { - "sdp_idx": int(sdp_match.groups()[0]), - "value": added_value, - } - elif connection_group_match: - added_items["connection_group"] = { - "connection_group_idx": int(connection_group_match.groups()[0]), - "value": added_value, - } - elif match_criterion_match: - added_items["match_criterion"] = { - "sdp_idx": int(match_criterion_match.groups()[0]), - "match_criterion_idx": int(match_criterion_match.groups()[1]), - "value": added_value, - } - new_sdp = sdps[added_items["sdp"]["sdp_idx"]] - src_sdp_idx = new_sdp["id"] - dst_sdp_idx = sdps[added_items["match_criterion"]["sdp_idx"]]["id"] - connection_grp_id = connection_groups[ - added_items["connection_group"]["connection_group_idx"] - ]["id"] - if ( - connection_grp_id - != added_items["match_criterion"]["value"][ - "target-connection-group-id" + elif "iterable_item_removed" in running_candidate_diff: # new SDP added + slice_services = running_resource_value_dict["network-slice-services"][ + "slice-service" ] - ): - raise Exception( - "connection group missmatch in destination sdp and added connection group" - ) - match_criteria = new_sdp["service-match-criteria"]["match-criterion"] - match_criterion = match_criteria[0] - for type_value in match_criterion["match-type"]: - if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": - src_ip = type_value["value"][0].split("/")[0] - elif ( - type_value["type"] == "ietf-network-slice-service:destination-ip-prefix" - ): - dst_ip = type_value["value"][0].split("/")[0] - elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": - src_port = type_value["value"][0] - elif ( - type_value["type"] == "ietf-network-slice-service:destination-tcp-port" - ): - dst_port = type_value["value"][0] - qos_info = { - "upstream": {"max_delay": "0", "bw": "0", "packet_loss": "0"}, - "downstream": {"max_delay": "0", "bw": "0", "packet_loss": "0"}, - } - for cg in connection_groups: - if cg["id"] != connection_grp_id: - continue - for cc in cg["connectivity-construct"]: + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + connection_groups = slice_service["connection-groups"][ + "connection-group" + ] + operation_type = "delete" + added_items = { + "sdp": {"sdp_idx": None, "value": {}}, + "connection_group": {"connection_group_idx": None, "value": {}}, + "match_criterion": { + "sdp_idx": None, + "match_criterion_idx": None, + "value": {}, + }, + } + for added_key, added_value in running_candidate_diff[ + "iterable_item_removed" + ].items(): + sdp_match = SDP_DIFF_RE.match(added_key) + connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) + match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) + if sdp_match: + added_items["sdp"] = { + "sdp_idx": int(sdp_match.groups()[0]), + "value": added_value, + } + elif connection_group_match: + added_items["connection_group"] = { + "connection_group_idx": int( + connection_group_match.groups()[0] + ), + "value": added_value, + } + elif match_criterion_match: + added_items["match_criterion"] = { + "sdp_idx": int(match_criterion_match.groups()[0]), + "match_criterion_idx": int( + match_criterion_match.groups()[1] + ), + "value": added_value, + } + new_sdp = sdps[added_items["sdp"]["sdp_idx"]] + src_sdp_idx = new_sdp["id"] + dst_sdp_idx = sdps[added_items["match_criterion"]["sdp_idx"]]["id"] + connection_grp_id = connection_groups[ + added_items["connection_group"]["connection_group_idx"] + ]["id"] if ( - cc["p2p-sender-sdp"] == src_sdp_idx - and cc["p2p-receiver-sdp"] == dst_sdp_idx + connection_grp_id + != added_items["match_criterion"]["value"][ + "target-connection-group-id" + ] ): - direction = "upstream" + raise Exception( + "connection group missmatch in destination sdp and added connection group" + ) + match_criteria = new_sdp["service-match-criteria"]["match-criterion"] + match_criterion = match_criteria[0] + for type_value in match_criterion["match-type"]: + if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": + src_ip = type_value["value"][0].split("/")[0] elif ( - cc["p2p-sender-sdp"] == dst_sdp_idx - and cc["p2p-receiver-sdp"] == src_sdp_idx + type_value["type"] + == "ietf-network-slice-service:destination-ip-prefix" ): - direction = "downstream" - else: - raise Exception("invalid sender and receiver sdp ids") - for metric_bound in cc["service-slo-sle-policy"]["slo-policy"][ - "metric-bound" - ]: + dst_ip = type_value["value"][0].split("/")[0] + elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": + src_port = type_value["value"][0] + elif ( + type_value["type"] + == "ietf-network-slice-service:destination-tcp-port" + ): + dst_port = type_value["value"][0] + qos_info = { + "upstream": {"max_delay": "0", "bw": "0", "packet_loss": "0"}, + "downstream": {"max_delay": "0", "bw": "0", "packet_loss": "0"}, + } + for cg in connection_groups: + if cg["id"] != connection_grp_id: + continue + for cc in cg["connectivity-construct"]: if ( - metric_bound["metric-type"] - == "ietf-network-slice-service:one-way-delay-maximum" - and metric_bound["metric-unit"] == "milliseconds" - ): - qos_info[direction]["max_delay"] = metric_bound["bound"] - elif ( - metric_bound["metric-type"] - == "ietf-network-slice-service:one-way-bandwidth" - and metric_bound["metric-unit"] == "Mbps" + cc["p2p-sender-sdp"] == src_sdp_idx + and cc["p2p-receiver-sdp"] == dst_sdp_idx ): - qos_info[direction]["bw"] = metric_bound["bound"] + direction = "upstream" elif ( - metric_bound["metric-type"] - == "ietf-network-slice-service:two-way-packet-loss" - and metric_bound["metric-unit"] == "percentage" + cc["p2p-sender-sdp"] == dst_sdp_idx + and cc["p2p-receiver-sdp"] == src_sdp_idx ): - qos_info[direction]["packet_loss"] = metric_bound[ - "percentile-value" - ] - break - results = [] - resource_value_dict = { - "uuid": service_uuid, - "operation_type": operation_type, - "app_flow_id": f"{src_sdp_idx}_{dst_sdp_idx}_{service_name}", - "app_flow_user_id": str(uuid4()), - "max_latency": int(qos_info["upstream"]["max_delay"]), - "max_jitter": 10, - "max_loss": float(qos_info["upstream"]["packet_loss"]), - "upstream_assure_bw": int(qos_info["upstream"]["bw"]) * 1e6, - "upstream_max_bw": 2 * int(qos_info["upstream"]["bw"]) * 1e6, - "downstream_assure_bw": int(qos_info["downstream"]["bw"]) * 1e6, - "downstream_max_bw": 2 * int(qos_info["downstream"]["bw"]) * 1e6, - "src_ip": src_ip, - "src_port": src_port, - "dst_ip": dst_ip, - "dst_port": dst_port, - } - json_config_rules = setup_config_rules(service_uuid, resource_value_dict) - del controller.device_config.config_rules[:] - for jcr in json_config_rules: - controller.device_config.config_rules.append(ConfigRule(**jcr)) - self.__task_executor.configure_device(controller) + direction = "downstream" + else: + raise Exception("invalid sender and receiver sdp ids") + for metric_bound in cc["service-slo-sle-policy"]["slo-policy"][ + "metric-bound" + ]: + if ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-delay-maximum" + and metric_bound["metric-unit"] == "milliseconds" + ): + qos_info[direction]["max_delay"] = metric_bound["bound"] + elif ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-bandwidth" + and metric_bound["metric-unit"] == "Mbps" + ): + qos_info[direction]["bw"] = metric_bound["bound"] + elif ( + metric_bound["metric-type"] + == "ietf-network-slice-service:two-way-packet-loss" + and metric_bound["metric-unit"] == "percentage" + ): + qos_info[direction]["packet_loss"] = metric_bound[ + "percentile-value" + ] + break + resource_value_dict = { + "uuid": service_name, + "operation_type": operation_type, + "app_flow_id": f"{src_sdp_idx}_{dst_sdp_idx}_{service_name}", + "app_flow_user_id": str(uuid4()), + "max_latency": int(qos_info["upstream"]["max_delay"]), + "max_jitter": 10, + "max_loss": float(qos_info["upstream"]["packet_loss"]), + "upstream_assure_bw": int(qos_info["upstream"]["bw"]) * 1e6, + "upstream_max_bw": 2 * int(qos_info["upstream"]["bw"]) * 1e6, + "downstream_assure_bw": int(qos_info["downstream"]["bw"]) * 1e6, + "downstream_max_bw": 2 * int(qos_info["downstream"]["bw"]) * 1e6, + "src_ip": src_ip, + "src_port": src_port, + "dst_ip": dst_ip, + "dst_port": dst_port, + } + json_config_rules = setup_config_rules(service_name, resource_value_dict) + del controller.device_config.config_rules[:] + for jcr in json_config_rules: + controller.device_config.config_rules.append(ConfigRule(**jcr)) + self.__task_executor.configure_device(controller) + except Exception as e: # pylint: disable=broad-except + results.append(e) return results @metered_subclass_method(METRICS_POOL) -- GitLab From c271546860af1fe04a49b91f8c60e1720ee97b2e Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 27 Dec 2024 22:04:46 +0100 Subject: [PATCH 132/463] integration: several integrations to match the requirements of L3VPN service handler --- .../l3slice_ietfslice/ConfigRules.py | 49 +- .../L3SliceIETFSliceServiceHandler.py | 984 ++++++++++-------- 2 files changed, 611 insertions(+), 422 deletions(-) diff --git a/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py b/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py index 23f3e8159..cd6072e85 100644 --- a/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py +++ b/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py @@ -20,7 +20,6 @@ from common.tools.object_factory.ConfigRule import ( json_config_rule_set, ) from context.client.ContextClient import ContextClient -from service.service.service_handler_api.AnyTreeTools import TreeNode def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: @@ -30,11 +29,19 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: src_ac_node_id: str = json_settings["src_ac_node_id"] src_ac_ep_id: str = json_settings["src_ac_ep_id"] src_vlan: str = json_settings["src_vlan"] + src_source_ip_prefix: str = json_settings["src_source_ip_prefix"] + src_source_tcp_port: str = json_settings["src_source_tcp_port"] + src_destination_ip_prefix: str = json_settings["src_destination_ip_prefix"] + src_destination_tcp_port: str = json_settings["src_destination_tcp_port"] dst_node_id: str = json_settings["dst_node_id"] dst_mgmt_ip_address: str = json_settings["dst_mgmt_ip_address"] dst_ac_node_id: str = json_settings["dst_ac_node_id"] dst_ac_ep_id: str = json_settings["dst_ac_ep_id"] dst_vlan: str = json_settings["dst_vlan"] + dst_source_ip_prefix: str = json_settings["dst_source_ip_prefix"] + dst_source_tcp_port: str = json_settings["dst_source_tcp_port"] + dst_destination_ip_prefix: str = json_settings["dst_destination_ip_prefix"] + dst_destination_tcp_port: str = json_settings["dst_destination_tcp_port"] slice_id: str = json_settings["slice_id"] delay: str = json_settings["delay"] bandwidth: str = json_settings["bandwidth"] @@ -54,6 +61,22 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: "type": "ietf-network-slice-service:vlan", "value": [src_vlan], }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [src_source_ip_prefix], + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [src_source_tcp_port], + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [src_destination_ip_prefix], + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [src_destination_tcp_port], + }, ], "target-connection-group-id": "line1", } @@ -83,6 +106,22 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: "type": "ietf-network-slice-service:vlan", "value": [dst_vlan], }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [dst_source_ip_prefix], + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [dst_source_tcp_port], + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [dst_destination_ip_prefix], + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [dst_destination_tcp_port], + }, ], "target-connection-group-id": "line1", } @@ -108,8 +147,8 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: "connectivity-construct": [ { "id": 1, - "p2mp-sender-sdp": "1", - "p2mp-receiver-sdp": ["2"], + "p2p-sender-sdp": "1", + "p2p-receiver-sdp": "2", "service-slo-sle-policy": { "slo-policy": { "metric-bound": [ @@ -134,8 +173,8 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: }, { "id": 2, - "p2mp-sender-sdp": "2", - "p2mp-receiver-sdp": ["1"], + "p2p-sender-sdp": "2", + "p2p-receiver-sdp": "1", "service-slo-sle-policy": { "slo-policy": { "metric-bound": [ diff --git a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py index e584283a4..fa4ebd35d 100644 --- a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py +++ b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py @@ -15,7 +15,7 @@ import json import logging import re -from typing import Any, List, Optional, Tuple, Union +from typing import Any, Dict, List, Optional, Tuple, TypedDict, Union from deepdiff import DeepDiff @@ -37,6 +37,21 @@ from .ConfigRules import ( teardown_config_rules, ) + +class Ipv4Info(TypedDict): + src_ip: str + dst_ip: str + src_port: str + dst_port: str + vlan: str + + +class DeviceEpInfo(TypedDict): + ipv4_info: Ipv4Info + node_name: str + endpoint_name: str + + RUNNING_RESOURCE_KEY = "running_ietf_slice" CANDIDATE_RESOURCE_KEY = "candidate_ietf_slice" @@ -62,6 +77,53 @@ METRICS_POOL = MetricsPool( RAISE_IF_DIFFERS = True +def extract_source_destination_device_endpoint_info( + device_ep_pairs: list, connection_group: Dict +) -> Tuple[DeviceEpInfo, DeviceEpInfo]: + connectivity_construct = connection_group["connectivity-construct"][0] + sender_sdp = connectivity_construct["p2p-sender-sdp"] + if sender_sdp == device_ep_pairs[0][4]: + ... + elif sender_sdp == device_ep_pairs[1][4]: + device_ep_pairs = device_ep_pairs[::-1] + else: + raise Exception("Sender SDP not found in device_ep_pairs") + source_device_ep_info = DeviceEpInfo( + ipv4_info=device_ep_pairs[0][5], + node_name=device_ep_pairs[0][2], + endpoint_name=device_ep_pairs[0][3], + ) + destination_device_ep_info = DeviceEpInfo( + ipv4_info=device_ep_pairs[1][5], + node_name=device_ep_pairs[1][2], + endpoint_name=device_ep_pairs[1][3], + ) + return source_device_ep_info, destination_device_ep_info + + +def extract_match_criterion_ipv4_info( + match_criterion: Dict, +) -> Ipv4Info: + for type_value in match_criterion["match-type"]: + if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": + src_ip = type_value["value"][0].split("/")[0] + elif type_value["type"] == "ietf-network-slice-service:destination-ip-prefix": + dst_ip = type_value["value"][0].split("/")[0] + elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": + src_port = type_value["value"][0] + elif type_value["type"] == "ietf-network-slice-service:destination-tcp-port": + dst_port = type_value["value"][0] + elif type_value["type"] == "ietf-network-slice-service:vlan": + vlan = type_value["value"][0] + return Ipv4Info( + src_ip=src_ip, + dst_ip=dst_ip, + src_port=src_port, + dst_port=dst_port, + vlan=vlan, + ) + + def get_custom_config_rule( service_config: ServiceConfig, resource_key: str ) -> Optional[ConfigRule]: @@ -73,7 +135,7 @@ def get_custom_config_rule( return cr -def get_running_candidate_ietf_slice_data_diff(service_config: ServiceConfig) -> dict: +def get_running_candidate_ietf_slice_data_diff(service_config: ServiceConfig) -> Dict: running_ietf_slice_cr = get_custom_config_rule(service_config, RUNNING_RESOURCE_KEY) running_resource_value_dict = json.loads( running_ietf_slice_cr.custom.resource_value @@ -84,16 +146,9 @@ def get_running_candidate_ietf_slice_data_diff(service_config: ServiceConfig) -> candidate_resource_value_dict = json.loads( candidate_ietf_slice_cr.custom.resource_value ) - return ( - DeepDiff( - running_resource_value_dict, - candidate_resource_value_dict, - ), - DeepDiff( - running_resource_value_dict, - candidate_resource_value_dict, - ignore_order=True, - ), + return DeepDiff( + running_resource_value_dict, + candidate_resource_value_dict, ) @@ -114,64 +169,107 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): chk_type("endpoints", endpoints, list) if len(endpoints) == 0: return [] - service_uuid = self.__service.service_id.service_uuid.uuid - service_config = self.__service.service_config - src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) - src_device_obj = self.__task_executor.get_device( - DeviceId(**json_device_id(src_device_uuid)) - ) - src_device_name = src_device_obj.name - src_controller = self.__task_executor.get_device_controller(src_device_obj) - dst_device_uuid, dst_endpoint_uuid = get_device_endpoint_uuids(endpoints[-1]) - dst_device_obj = self.__task_executor.get_device( - DeviceId(**json_device_id(dst_device_uuid)) - ) - dst_device_name = dst_device_obj.name - dst_controller = self.__task_executor.get_device_controller(dst_device_obj) - 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 - context_client = ContextClient() - edge_device_names = [src_device_name, dst_device_name] - link_list = context_client.ListLinks(Empty()) - links = link_list.links - max_delay = 1e9 - packet_loss = 1.0 - bandwidth = 0.0 - device_ep_pairs = [] - sdp_ids = [] - running_candidate_diff, running_candidate_diff_no_order = ( - get_running_candidate_ietf_slice_data_diff(service_config) - ) - candidate_ietf_slice_cr = get_custom_config_rule( - service_config, CANDIDATE_RESOURCE_KEY - ) - candidate_resource_value_dict = json.loads( - candidate_ietf_slice_cr.custom.resource_value - ) - running_ietf_slice_cr = get_custom_config_rule( - service_config, RUNNING_RESOURCE_KEY - ) - running_resource_value_dict = json.loads( - running_ietf_slice_cr.custom.resource_value - ) - LOGGER.debug(f"P46: {candidate_resource_value_dict}") - LOGGER.debug(f"P47: {running_resource_value_dict}") - LOGGER.debug(f"P41: {running_candidate_diff}") - LOGGER.debug(f"P45: {running_candidate_diff_no_order}") - if not running_candidate_diff: # Slice Creation - slice_services = candidate_resource_value_dict["network-slice-services"][ - "slice-service" - ] - slice_service = slice_services[0] - sdps = slice_service["sdps"]["sdp"] - operation_type = "create" - sdp_ids = [sdp["node-id"] for sdp in sdps] - for sdp in sdps: - node_id = sdp["node-id"] + + results = [] + try: + service_config = self.__service.service_config + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) + src_device_obj = self.__task_executor.get_device( + DeviceId(**json_device_id(src_device_uuid)) + ) + src_device_name = src_device_obj.name + src_controller = self.__task_executor.get_device_controller(src_device_obj) + dst_device_uuid, dst_endpoint_uuid = get_device_endpoint_uuids( + endpoints[-1] + ) + dst_device_obj = self.__task_executor.get_device( + DeviceId(**json_device_id(dst_device_uuid)) + ) + dst_device_name = dst_device_obj.name + dst_controller = self.__task_executor.get_device_controller(dst_device_obj) + 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 + context_client = ContextClient() + edge_device_names = [src_device_name, dst_device_name] + link_list = context_client.ListLinks(Empty()) + links = link_list.links + max_delay = 1e9 + packet_loss = 1.0 + bandwidth = 0.0 + device_ep_pairs = [] + sdp_ids = [] + running_candidate_diff = get_running_candidate_ietf_slice_data_diff( + service_config + ) + candidate_ietf_slice_cr = get_custom_config_rule( + service_config, CANDIDATE_RESOURCE_KEY + ) + candidate_resource_value_dict = json.loads( + candidate_ietf_slice_cr.custom.resource_value + ) + running_ietf_slice_cr = get_custom_config_rule( + service_config, RUNNING_RESOURCE_KEY + ) + running_resource_value_dict = json.loads( + running_ietf_slice_cr.custom.resource_value + ) + slice_name = running_resource_value_dict["network-slice-services"]['slice-service'][0]['id'] + if not running_candidate_diff: # Slice Creation + slice_services = candidate_resource_value_dict[ + "network-slice-services" + ]["slice-service"] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + operation_type = "create" + sdp_ids = [sdp["node-id"] for sdp in sdps] + for sdp in sdps: + node_id = sdp["node-id"] + for link in links: + ( + device_obj_name_1, + ep_name_1, + device_obj_1, + device_obj_name_2, + ep_name_2, + device_obj_2, + ) = get_link_ep_device_names(link, context_client) + if ( + device_obj_name_1 == node_id + and device_obj_name_2 in edge_device_names + ): + del edge_device_names[ + edge_device_names.index(device_obj_name_2) + ] + match_criteria = sdp["service-match-criteria"][ + "match-criterion" + ] + if len(match_criteria) != 1: + raise Exception( + "Only one match criteria allowed for initial slice creation" + ) + match_criterion = match_criteria[0] + ipv4_info = extract_match_criterion_ipv4_info( + match_criterion + ) + device_ep_pairs.append( + ( + node_id, + ep_name_1, + device_obj_name_2, + ep_name_2, + sdp["id"], + ipv4_info, + ) + ) + target_connection_group_id = match_criterion[ + "target-connection-group-id" + ] + del sdp_ids[sdp_ids.index(node_id)] + break for link in links: ( device_obj_name_1, @@ -182,359 +280,411 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): device_obj_2, ) = get_link_ep_device_names(link, context_client) if ( - device_obj_name_1 == node_id - and device_obj_name_2 in edge_device_names + device_obj_name_1 == edge_device_names[0] + and device_obj_2.controller_id != device_obj_1.controller_id ): - device_ep_pairs.append( - (node_id, ep_name_1, device_obj_name_2, ep_name_2) - ) - del edge_device_names[ - edge_device_names.index(device_obj_name_2) - ] - match_criteria = sdp["service-match-criteria"][ - "match-criterion" - ] - vlan_id = set() - for match in match_criteria: - for type_value in match["match-type"]: - if ( - type_value["type"] - == "ietf-network-slice-service:vlan" - ): - vlan_id.add(type_value["value"][0]) - if len(vlan_id) != 1: - raise Exception("one vlan id found in SDP match criteria") - src_vlan = list(vlan_id)[0] - del sdp_ids[sdp_ids.index(node_id)] + for sdp in sdps: + if sdp["node-id"] != sdp_ids[0]: + continue + match_criteria = sdp["service-match-criteria"][ + "match-criterion" + ] + if len(match_criteria) != 1: + raise Exception( + "Only one match criteria allowed for initial slice creation" + ) + match_criterion = match_criteria[0] + ipv4_info = extract_match_criterion_ipv4_info( + match_criterion + ) + device_ep_pairs.append( + ( + device_obj_name_2, + ep_name_2, + device_obj_name_1, + ep_name_1, + sdp["id"], + ipv4_info, + ) + ) break - for link in links: - ( - device_obj_name_1, - ep_name_1, - device_obj_1, - device_obj_name_2, - ep_name_2, - device_obj_2, - ) = get_link_ep_device_names(link, context_client) - if ( - device_obj_name_1 == edge_device_names[0] - and device_obj_2.controller_id != device_obj_1.controller_id - ): - device_ep_pairs.append( - (device_obj_name_2, ep_name_2, device_obj_name_1, ep_name_1) - ) - for sdp in sdps: - if sdp["node-id"] != sdp_ids[0]: - continue - match_criteria = sdp["service-match-criteria"][ - "match-criterion" - ] - vlan_id = set() - for match in match_criteria: - for type_value in match["match-type"]: - if ( - type_value["type"] - == "ietf-network-slice-service:vlan" - ): - vlan_id.add(type_value["value"][0]) - if len(vlan_id) != 1: - raise Exception("one vlan id found in SDP match criteria") - dst_vlan = list(vlan_id)[0] - break - else: - raise Exception("sdp between the domains not found") - elif "iterable_item_added" in running_candidate_diff: # new SDP added - slice_services = candidate_resource_value_dict["network-slice-services"][ - "slice-service" - ] - slice_service = slice_services[0] - sdps = slice_service["sdps"]["sdp"] - operation_type = "update" - added_items = { - "sdp": {"sdp_idx": None, "value": {}}, - "connection_group": {"connection_group_idx": None, "value": {}}, - "match_criterion": { - "sdp_idx": None, - "match_criterion_idx": None, - "value": {}, - }, - } - for added_key, added_value in running_candidate_diff[ - "iterable_item_added" - ].items(): - sdp_match = SDP_DIFF_RE.match(added_key) - connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) - match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) - if sdp_match: - added_items["sdp"] = { - "sdp_idx": int(sdp_match.groups()[0]), - "value": added_value, - } - elif connection_group_match: - added_items["connection_group"] = { - "connection_group_idx": int(connection_group_match.groups()[0]), - "value": added_value, - } - elif match_criterion_match: - added_items["match_criterion"] = { - "sdp_idx": int(match_criterion_match.groups()[0]), - "match_criterion_idx": int(match_criterion_match.groups()[1]), - "value": added_value, - } - new_sdp = sdps[added_items["sdp"]["sdp_idx"]] - src_sdp_name = new_sdp["node-id"] - dst_sdp_idx = sdps[added_items["match_criterion"]["sdp_idx"]]["id"] - dst_sdp_name = sdps[added_items["match_criterion"]["sdp_idx"]]["node-id"] - for link in links: - ( - device_obj_name_1, - ep_name_1, - device_obj_1, - device_obj_name_2, - ep_name_2, - device_obj_2, - ) = get_link_ep_device_names(link, context_client) - if ( - device_obj_name_1 == src_sdp_name - and device_obj_2.controller_id != device_obj_1.controller_id - ): - device_ep_pairs.append( - (device_obj_name_2, ep_name_2, device_obj_name_1, ep_name_1) - ) - for sdp in sdps: - if sdp["node-id"] != src_sdp_name: - continue - match_criteria = sdp["service-match-criteria"][ - "match-criterion" - ] - vlan_id = set() - for match in match_criteria: - for type_value in match["match-type"]: - if ( - type_value["type"] - == "ietf-network-slice-service:vlan" - ): - vlan_id.add(type_value["value"][0]) - if len(vlan_id) != 1: - raise Exception("one vlan id found in SDP match criteria") - src_vlan = list(vlan_id)[0] - break - else: - raise Exception("sdp between the domains not found") - for link in links: - ( - device_obj_name_1, - ep_name_1, - device_obj_1, - device_obj_name_2, - ep_name_2, - device_obj_2, - ) = get_link_ep_device_names(link, context_client) - if ( - device_obj_name_1 == dst_sdp_name - and device_obj_2.controller_id != device_obj_1.controller_id - ): - device_ep_pairs.append( - (device_obj_name_2, ep_name_2, device_obj_name_1, ep_name_1) - ) - for sdp in sdps: - if sdp["node-id"] != dst_sdp_name: - continue - match_criteria = sdp["service-match-criteria"][ - "match-criterion" - ] - vlan_id = set() - for match in match_criteria: - for type_value in match["match-type"]: - if ( - type_value["type"] - == "ietf-network-slice-service:vlan" - ): - vlan_id.add(type_value["value"][0]) - if len(vlan_id) != 1: - raise Exception("one vlan id found in SDP match criteria") - dst_vlan = list(vlan_id)[0] - break - else: - raise Exception("sdp between the domains not found") - elif "iterable_item_removed" in running_candidate_diff: # an SDP removed - slice_services = running_resource_value_dict["network-slice-services"][ - "slice-service" - ] - slice_service = slice_services[0] - sdps = slice_service["sdps"]["sdp"] - operation_type = "update" - added_items = { - "sdp": {"sdp_idx": None, "value": {}}, - "connection_group": {"connection_group_idx": None, "value": {}}, - "match_criterion": { - "sdp_idx": None, - "match_criterion_idx": None, - "value": {}, - }, - } - for added_key, added_value in running_candidate_diff[ - "iterable_item_removed" - ].items(): - sdp_match = SDP_DIFF_RE.match(added_key) - connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) - match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) - LOGGER.debug( - f"P40: {sdp_match} *{connection_group_match}* {match_criterion_match}" - ) - if sdp_match: - added_items["sdp"] = { - "sdp_idx": int(sdp_match.groups()[0]), - "value": added_value, - } - elif connection_group_match: - added_items["connection_group"] = { - "connection_group_idx": int(connection_group_match.groups()[0]), - "value": added_value, - } - elif match_criterion_match: - added_items["match_criterion"] = { - "sdp_idx": int(match_criterion_match.groups()[0]), - "match_criterion_idx": int(match_criterion_match.groups()[1]), - "value": added_value, - } - new_sdp = sdps[added_items["sdp"]["sdp_idx"]] - src_sdp_name = new_sdp["node-id"] - dst_sdp_idx = sdps[added_items["match_criterion"]["sdp_idx"]]["id"] - dst_sdp_name = sdps[added_items["match_criterion"]["sdp_idx"]]["node-id"] - for link in links: - ( - device_obj_name_1, - ep_name_1, - device_obj_1, - device_obj_name_2, - ep_name_2, - device_obj_2, - ) = get_link_ep_device_names(link, context_client) - if ( - device_obj_name_1 == src_sdp_name - and device_obj_2.controller_id != device_obj_1.controller_id - ): - device_ep_pairs.append( - (device_obj_name_2, ep_name_2, device_obj_name_1, ep_name_1) - ) - for sdp in sdps: - if sdp["node-id"] != src_sdp_name: - continue - match_criteria = sdp["service-match-criteria"][ - "match-criterion" - ] - vlan_id = set() - LOGGER.debug(f"P81: {match_criteria}") - for match in match_criteria: - for type_value in match["match-type"]: - if ( - type_value["type"] - == "ietf-network-slice-service:vlan" - ): - vlan_id.add(type_value["value"][0]) - LOGGER.debug(f"P82: {vlan_id}") - if len(vlan_id) != 1: - raise Exception("one vlan id found in SDP match criteria") - src_vlan = list(vlan_id)[0] - break - else: - raise Exception("sdp between the domains not found") - for link in links: - ( - device_obj_name_1, - ep_name_1, - device_obj_1, - device_obj_name_2, - ep_name_2, - device_obj_2, - ) = get_link_ep_device_names(link, context_client) - if ( - device_obj_name_1 == dst_sdp_name - and device_obj_2.controller_id != device_obj_1.controller_id - ): - device_ep_pairs.append( - (device_obj_name_2, ep_name_2, device_obj_name_1, ep_name_1) - ) - for sdp in sdps: - if sdp["node-id"] != dst_sdp_name: - continue - match_criteria = sdp["service-match-criteria"][ - "match-criterion" - ] - LOGGER.debug(f"P83: {match_criteria}") - vlan_id = set() - for match in match_criteria: - for type_value in match["match-type"]: - if ( - type_value["type"] - == "ietf-network-slice-service:vlan" - ): - vlan_id.add(type_value["value"][0]) - - LOGGER.debug(f"P84: {vlan_id}") - if len(vlan_id) != 1: - raise Exception("one vlan id found in SDP match criteria") - dst_vlan = list(vlan_id)[0] - break - else: - raise Exception("sdp between the domains not found") - connection_groups = slice_service["connection-groups"]["connection-group"] - for cg in connection_groups: - for cc in cg["connectivity-construct"]: - for metric_bound in cc["service-slo-sle-policy"]["slo-policy"][ - "metric-bound" - ]: + else: + raise Exception("sdp between the domains not found") + elif "iterable_item_added" in running_candidate_diff: # new SDP added + slice_services = candidate_resource_value_dict[ + "network-slice-services" + ]["slice-service"] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + operation_type = "update" + added_items = { + "sdp": {"sdp_idx": None, "value": {}}, + "connection_group": {"connection_group_idx": None, "value": {}}, + "match_criterion": { + "sdp_idx": None, + "match_criterion_idx": None, + "value": {}, + }, + } + for added_key, added_value in running_candidate_diff[ + "iterable_item_added" + ].items(): + sdp_match = SDP_DIFF_RE.match(added_key) + connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) + match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) + if sdp_match: + added_items["sdp"] = { + "sdp_idx": int(sdp_match.groups()[0]), + "value": added_value, + } + elif connection_group_match: + added_items["connection_group"] = { + "connection_group_idx": int( + connection_group_match.groups()[0] + ), + "value": added_value, + } + elif match_criterion_match: + added_items["match_criterion"] = { + "sdp_idx": int(match_criterion_match.groups()[0]), + "match_criterion_idx": int( + match_criterion_match.groups()[1] + ), + "value": added_value, + } + new_sdp = sdps[added_items["sdp"]["sdp_idx"]] + src_sdp_name = new_sdp["node-id"] + dst_sdp_idx = sdps[added_items["match_criterion"]["sdp_idx"]]["id"] + dst_sdp_name = sdps[added_items["match_criterion"]["sdp_idx"]][ + "node-id" + ] + for link in links: + ( + device_obj_name_1, + ep_name_1, + device_obj_1, + device_obj_name_2, + ep_name_2, + device_obj_2, + ) = get_link_ep_device_names(link, context_client) if ( - metric_bound["metric-type"] - == "ietf-network-slice-service:one-way-delay-maximum" - and metric_bound["metric-unit"] == "milliseconds" + device_obj_name_1 == src_sdp_name + and device_obj_2.controller_id != device_obj_1.controller_id ): - metric_value = int(metric_bound["bound"]) - if metric_value < max_delay: - max_delay = metric_value - elif ( - metric_bound["metric-type"] - == "ietf-network-slice-service:two-way-packet-loss" - and metric_bound["metric-unit"] == "percentage" + for sdp in sdps: + if sdp["node-id"] != src_sdp_name: + continue + match_criteria = sdp["service-match-criteria"][ + "match-criterion" + ] + if len(match_criteria) != 1: + raise Exception( + "Only one match criteria allowed for initial slice creation" + ) + match_criterion = match_criteria[0] + ipv4_info = extract_match_criterion_ipv4_info( + match_criterion + ) + device_ep_pairs.append( + ( + device_obj_name_2, + ep_name_2, + device_obj_name_1, + ep_name_1, + sdp["id"], + ipv4_info, + ) + ) + target_connection_group_id = match_criterion[ + "target-connection-group-id" + ] + break + else: + raise Exception("sdp between the domains not found") + for link in links: + ( + device_obj_name_1, + ep_name_1, + device_obj_1, + device_obj_name_2, + ep_name_2, + device_obj_2, + ) = get_link_ep_device_names(link, context_client) + if ( + device_obj_name_1 == dst_sdp_name + and device_obj_2.controller_id != device_obj_1.controller_id ): - metric_value = float(metric_bound["percentile-value"]) - if metric_value < packet_loss: - packet_loss = metric_value - elif ( - metric_bound["metric-type"] - == "ietf-network-slice-service:one-way-bandwidth" - and metric_bound["metric-unit"] == "Mbps" + for sdp in sdps: + if sdp["node-id"] != dst_sdp_name: + continue + match_criteria = sdp["service-match-criteria"][ + "match-criterion" + ] + vlan_id = set() + for match in match_criteria: + for type_value in match["match-type"]: + if ( + type_value["type"] + == "ietf-network-slice-service:vlan" + ): + vlan_id.add(type_value["value"][0]) + if len(vlan_id) != 1: + raise Exception( + "one vlan id found in SDP match criteria" + ) + match_criterion = match_criteria[ + added_items["match_criterion"]["match_criterion_idx"] + ] + ipv4_info = extract_match_criterion_ipv4_info( + match_criterion + ) + device_ep_pairs.append( + ( + device_obj_name_2, + ep_name_2, + device_obj_name_1, + ep_name_1, + sdp["id"], + ipv4_info, + ) + ) + break + else: + raise Exception("sdp between the domains not found") + elif "iterable_item_removed" in running_candidate_diff: # an SDP removed + slice_services = running_resource_value_dict["network-slice-services"][ + "slice-service" + ] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + operation_type = "update" + removed_items = { + "sdp": {"sdp_idx": None, "value": {}}, + "connection_group": {"connection_group_idx": None, "value": {}}, + "match_criterion": { + "sdp_idx": None, + "match_criterion_idx": None, + "value": {}, + }, + } + for added_key, added_value in running_candidate_diff[ + "iterable_item_removed" + ].items(): + sdp_match = SDP_DIFF_RE.match(added_key) + connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) + match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) + if sdp_match: + removed_items["sdp"] = { + "sdp_idx": int(sdp_match.groups()[0]), + "value": added_value, + } + elif connection_group_match: + removed_items["connection_group"] = { + "connection_group_idx": int( + connection_group_match.groups()[0] + ), + "value": added_value, + } + elif match_criterion_match: + removed_items["match_criterion"] = { + "sdp_idx": int(match_criterion_match.groups()[0]), + "match_criterion_idx": int( + match_criterion_match.groups()[1] + ), + "value": added_value, + } + new_sdp = sdps[removed_items["sdp"]["sdp_idx"]] + src_sdp_name = new_sdp["node-id"] + dst_sdp_idx = sdps[removed_items["match_criterion"]["sdp_idx"]]["id"] + dst_sdp_name = sdps[removed_items["match_criterion"]["sdp_idx"]][ + "node-id" + ] + for link in links: + ( + device_obj_name_1, + ep_name_1, + device_obj_1, + device_obj_name_2, + ep_name_2, + device_obj_2, + ) = get_link_ep_device_names(link, context_client) + if ( + device_obj_name_1 == src_sdp_name + and device_obj_2.controller_id != device_obj_1.controller_id ): - metric_value = float(metric_bound["bound"]) - bandwidth += metric_value - results = [] - resource_value_dict = { - "uuid": service_uuid, - "operation_type": operation_type, - "src_node_id": device_ep_pairs[0][2], - "src_mgmt_ip_address": device_ep_pairs[0][2], - "src_ac_node_id": device_ep_pairs[0][2], - "src_ac_ep_id": device_ep_pairs[0][3], - "src_vlan": src_vlan, - "dst_node_id": device_ep_pairs[1][2], - "dst_mgmt_ip_address": device_ep_pairs[1][2], - "dst_ac_node_id": device_ep_pairs[1][2], - "dst_ac_ep_id": device_ep_pairs[1][3], - "dst_vlan": dst_vlan, - "slice_id": service_uuid, - "delay": max_delay, - "bandwidth": bandwidth, - "packet_loss": packet_loss, - } - - json_config_rules = setup_config_rules(service_uuid, resource_value_dict) - del controller.device_config.config_rules[:] - for jcr in json_config_rules: - controller.device_config.config_rules.append(ConfigRule(**jcr)) - self.__task_executor.configure_device(controller) - # except Exception as e: # pylint: disable=broad-except - # results.append(e) + for sdp in sdps: + if sdp["node-id"] != src_sdp_name: + continue + match_criteria = sdp["service-match-criteria"][ + "match-criterion" + ] + if len(match_criteria) != 1: + raise Exception( + "Only one match criteria allowed for new SDP addition" + ) + match_criterion = match_criteria[0] + ipv4_info = extract_match_criterion_ipv4_info( + match_criterion + ) + device_ep_pairs.append( + ( + device_obj_name_2, + ep_name_2, + device_obj_name_1, + ep_name_1, + sdp["id"], + ipv4_info, + ) + ) + target_connection_group_id = match_criterion[ + "target-connection-group-id" + ] + break + else: + raise Exception("sdp between the domains not found") + for link in links: + ( + device_obj_name_1, + ep_name_1, + device_obj_1, + device_obj_name_2, + ep_name_2, + device_obj_2, + ) = get_link_ep_device_names(link, context_client) + if ( + device_obj_name_1 == dst_sdp_name + and device_obj_2.controller_id != device_obj_1.controller_id + ): + for sdp in sdps: + if sdp["node-id"] != dst_sdp_name: + continue + match_criteria = sdp["service-match-criteria"][ + "match-criterion" + ] + vlan_id = set() + for match in match_criteria: + for type_value in match["match-type"]: + if ( + type_value["type"] + == "ietf-network-slice-service:vlan" + ): + vlan_id.add(type_value["value"][0]) + if len(vlan_id) != 1: + raise Exception( + "one vlan id found in SDP match criteria" + ) + match_criterion = match_criteria[ + removed_items["match_criterion"]["match_criterion_idx"] + ] + ipv4_info = extract_match_criterion_ipv4_info( + match_criterion + ) + device_ep_pairs.append( + ( + device_obj_name_2, + ep_name_2, + device_obj_name_1, + ep_name_1, + sdp["id"], + ipv4_info, + ) + ) + break + else: + raise Exception("sdp between the domains not found") + connection_groups = slice_service["connection-groups"]["connection-group"] + for cg in connection_groups: + for cc in cg["connectivity-construct"]: + for metric_bound in cc["service-slo-sle-policy"]["slo-policy"][ + "metric-bound" + ]: + if ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-delay-maximum" + and metric_bound["metric-unit"] == "milliseconds" + ): + metric_value = int(metric_bound["bound"]) + if metric_value < max_delay: + max_delay = metric_value + elif ( + metric_bound["metric-type"] + == "ietf-network-slice-service:two-way-packet-loss" + and metric_bound["metric-unit"] == "percentage" + ): + metric_value = float(metric_bound["percentile-value"]) + if metric_value < packet_loss: + packet_loss = metric_value + elif ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-bandwidth" + and metric_bound["metric-unit"] == "Mbps" + ): + metric_value = float(metric_bound["bound"]) + bandwidth += metric_value + if ( + len( + candidate_resource_value_dict["network-slice-services"][ + "slice-service" + ][0]["connection-groups"]["connection-group"] + ) + == 0 + ): + operation_type = "delete" + target_connection_group = next( + cg for cg in connection_groups if cg["id"] == target_connection_group_id + ) + source_device_ep_info, destination_device_ep_info = ( + extract_source_destination_device_endpoint_info( + device_ep_pairs, target_connection_group + ) + ) + resource_value_dict = { + "uuid": slice_name, + "operation_type": operation_type, + "src_node_id": source_device_ep_info["node_name"], + "src_mgmt_ip_address": source_device_ep_info["node_name"], + "src_ac_node_id": source_device_ep_info["node_name"], + "src_ac_ep_id": source_device_ep_info["endpoint_name"], + "src_vlan": source_device_ep_info["ipv4_info"]["vlan"], + "src_source_ip_prefix": source_device_ep_info["ipv4_info"]["src_ip"], + "src_source_tcp_port": source_device_ep_info["ipv4_info"]["src_port"], + "src_destination_ip_prefix": source_device_ep_info["ipv4_info"][ + "dst_ip" + ], + "src_destination_tcp_port": source_device_ep_info["ipv4_info"][ + "dst_port" + ], + "dst_node_id": destination_device_ep_info["node_name"], + "dst_mgmt_ip_address": destination_device_ep_info["node_name"], + "dst_ac_node_id": destination_device_ep_info["node_name"], + "dst_ac_ep_id": destination_device_ep_info["endpoint_name"], + "dst_vlan": destination_device_ep_info["ipv4_info"]["vlan"], + "dst_source_ip_prefix": destination_device_ep_info["ipv4_info"][ + "src_ip" + ], + "dst_source_tcp_port": destination_device_ep_info["ipv4_info"][ + "src_port" + ], + "dst_destination_ip_prefix": destination_device_ep_info["ipv4_info"][ + "dst_ip" + ], + "dst_destination_tcp_port": destination_device_ep_info["ipv4_info"][ + "dst_port" + ], + "slice_id": slice_name, + "delay": max_delay, + "bandwidth": bandwidth, + "packet_loss": packet_loss, + } + + json_config_rules = setup_config_rules(slice_name, resource_value_dict) + del controller.device_config.config_rules[:] + for jcr in json_config_rules: + controller.device_config.config_rules.append(ConfigRule(**jcr)) + self.__task_executor.configure_device(controller) + except Exception as e: # pylint: disable=broad-except + raise e + results.append(e) return results @metered_subclass_method(METRICS_POOL) -- GitLab From 55a4a20098b140662bc298fa57fc60c8ec964b55 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 28 Dec 2024 16:05:33 +0100 Subject: [PATCH 133/463] integration: IETF Slice api adaptation - dummy post /restconf/data endpoint added - `ietf-nss` removed from ietf slice NBI path --- src/nbi/service/__main__.py | 2 ++ .../rest_server/nbi_plugins/__init__.py | 2 +- .../nbi_plugins/ietf_network_slice/__init__.py | 18 +++++++++--------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/nbi/service/__main__.py b/src/nbi/service/__main__.py index 71df0517a..1d470f4ea 100644 --- a/src/nbi/service/__main__.py +++ b/src/nbi/service/__main__.py @@ -31,6 +31,7 @@ from .rest_server.nbi_plugins.ietf_network_slice import register_ietf_nss from .rest_server.nbi_plugins.ietf_acl import register_ietf_acl from .rest_server.nbi_plugins.qkd_app import register_qkd_app from .rest_server.nbi_plugins.tfs_api import register_tfs_api +from .rest_server.nbi_plugins import register_restconf from .context_subscription import register_context_subscription terminate = threading.Event() @@ -79,6 +80,7 @@ def main(): register_ietf_acl(rest_server) register_qkd_app(rest_server) register_tfs_api(rest_server) + register_restconf(rest_server) rest_server.start() register_context_subscription() diff --git a/src/nbi/service/rest_server/nbi_plugins/__init__.py b/src/nbi/service/rest_server/nbi_plugins/__init__.py index e7d5584cd..9b5d7920d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/__init__.py @@ -34,5 +34,5 @@ def _add_resource(rest_server: RestServer, resource: Resource, *urls, **kwargs): rest_server.add_resource(resource, *urls, **kwargs) -def register_ietf_nss(rest_server: RestServer): +def register_restconf(rest_server: RestServer): _add_resource(rest_server, BaseServer, "") diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py index 6dcd6c9e9..db76b3b91 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py @@ -28,7 +28,7 @@ from .NSS_Services_Connection_Groups import NSS_Service_Connection_Groups from .NSS_Services_SDP import NSS_Service_SDP from .NSS_Services_SDPs import NSS_Service_SDPs -URL_PREFIX = "/restconf/data/ietf-network-slice-service:ietf-nss" +URL_PREFIX = "/restconf/data/ietf-network-slice-service" def _add_resource(rest_server: RestServer, resource: Resource, *urls, **kwargs): @@ -37,39 +37,39 @@ def _add_resource(rest_server: RestServer, 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_Services, ":network-slice-services") _add_resource( rest_server, NSS_Service, - "/network-slice-services/slice-service=", + ":network-slice-services/slice-service=", ) _add_resource( rest_server, NSS_Service_SDPs, - "/network-slice-services/slice-service=/sdps", + ":network-slice-services/slice-service=/sdps", ) _add_resource( rest_server, NSS_Service_SDP, - "/network-slice-services/slice-service=/sdps/sdp=", + ":network-slice-services/slice-service=/sdps/sdp=", ) _add_resource( rest_server, NSS_Service_Connection_Groups, - "/network-slice-services/slice-service=/connection-groups", + ":network-slice-services/slice-service=/connection-groups", ) _add_resource( rest_server, NSS_Service_Connection_Group, - "/network-slice-services/slice-service=/connection-groups/connection-group=", + ":network-slice-services/slice-service=/connection-groups/connection-group=", ) _add_resource( rest_server, NSS_Service_Match_Criteria, - "/network-slice-services/slice-service=/sdps/sdp=/service-match-criteria", + ":network-slice-services/slice-service=/sdps/sdp=/service-match-criteria", ) _add_resource( rest_server, NSS_Service_Match_Criterion, - "/network-slice-services/slice-service=/sdps/sdp=/service-match-criteria/match-criterion=", + ":network-slice-services/slice-service=/sdps/sdp=/service-match-criteria/match-criterion=", ) -- GitLab From 522a2767464ab089dbf73fb510d2083f9d4677d3 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 28 Dec 2024 17:48:31 +0100 Subject: [PATCH 134/463] feat: - slice2 datamodels added to IETF Slice NBI tests --- ...st_connection_group_to_network_slice2.json | 62 ++++++ ...post_match_criteria_to_sdp1_in_slice2.json | 40 ++++ .../tests/data/slice/post_network_slice2.json | 189 ++++++++++++++++++ .../slice/post_sdp_to_network_slice2.json | 62 ++++++ 4 files changed, 353 insertions(+) create mode 100644 src/nbi/tests/data/slice/post_connection_group_to_network_slice2.json create mode 100644 src/nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice2.json create mode 100644 src/nbi/tests/data/slice/post_network_slice2.json create mode 100644 src/nbi/tests/data/slice/post_sdp_to_network_slice2.json diff --git a/src/nbi/tests/data/slice/post_connection_group_to_network_slice2.json b/src/nbi/tests/data/slice/post_connection_group_to_network_slice2.json new file mode 100644 index 000000000..d39a837bd --- /dev/null +++ b/src/nbi/tests/data/slice/post_connection_group_to_network_slice2.json @@ -0,0 +1,62 @@ +{ + "connection-group": [ + { + "id": "line2", + "connectivity-type": "point-to-point", + "connectivity-construct": [ + { + "id": 1, + "p2p-sender-sdp": "1", + "p2p-receiver-sdp": "3", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "10" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "5000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + }, + { + "id": 2, + "p2p-sender-sdp": "3", + "p2p-receiver-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "20" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "1000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/src/nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice2.json b/src/nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice2.json new file mode 100644 index 000000000..8ceefdc2f --- /dev/null +++ b/src/nbi/tests/data/slice/post_match_criteria_to_sdp1_in_slice2.json @@ -0,0 +1,40 @@ +{ + "match-criterion": [ + { + "index": 2, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "201" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.222/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + } + ], + "target-connection-group-id": "line2" + } + ] +} \ No newline at end of file diff --git a/src/nbi/tests/data/slice/post_network_slice2.json b/src/nbi/tests/data/slice/post_network_slice2.json new file mode 100644 index 000000000..1445846cc --- /dev/null +++ b/src/nbi/tests/data/slice/post_network_slice2.json @@ -0,0 +1,189 @@ +{ + "slice-service": [ + { + "id": "slice2", + "description": "network slice 2, connect to VM2", + "sdps": { + "sdp": [ + { + "id": "1", + "node-id": "172.16.204.220", + "sdp-ip-address": [ + "172.16.204.220" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "201" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC POP to VM2", + "description": "AC VM2 connected to POP", + "ac-node-id": "172.16.204.220", + "ac-tp-id": "201" + } + ] + } + }, + { + "id": "2", + "node-id": "172.16.61.10", + "sdp-ip-address": [ + "172.16.61.10" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "31" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC ONT", + "description": "AC connected to PC", + "ac-node-id": "172.16.61.10", + "ac-tp-id": "200", + "ac-ipv4-address": "172.16.61.10" + } + ] + } + } + ] + }, + "connection-groups": { + "connection-group": [ + { + "id": "line1", + "connectivity-type": "point-to-point", + "connectivity-construct": [ + { + "id": 1, + "p2p-sender-sdp": "1", + "p2p-receiver-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "10" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "5000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + }, + { + "id": 2, + "p2mp-sender-sdp": "2", + "p2mp-receiver-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "20" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "1000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + } + ] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/nbi/tests/data/slice/post_sdp_to_network_slice2.json b/src/nbi/tests/data/slice/post_sdp_to_network_slice2.json new file mode 100644 index 000000000..0b147125b --- /dev/null +++ b/src/nbi/tests/data/slice/post_sdp_to_network_slice2.json @@ -0,0 +1,62 @@ +{ + "sdp": [ + { + "id": "3", + "node-id": "172.16.61.11", + "sdp-ip-address": [ + "172.16.61.11" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "31" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.222/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line2" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC ONT", + "description": "AC connected to PC2", + "ac-node-id": "172.16.61.11", + "ac-tp-id": "200", + "ac-ipv4-address": "172.16.61.11" + } + ] + } + } + ] +} \ No newline at end of file -- GitLab From fc4c353c3aeb3b2e90fad426113eca725a760253 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 28 Dec 2024 19:39:58 +0100 Subject: [PATCH 135/463] feat: IETF Slices retrieval added - get_all_ietf_slices method added to IETFSliceHandler - get method of NSS_Services adapted to retrieve all IETF Slices. --- .../ietf_network_slice/NSS_Services.py | 8 +++--- .../ietf_network_slice/ietf_slice_handler.py | 26 ++++++++++++++----- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py index 0b4f83fa8..8398917a2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py @@ -22,7 +22,7 @@ from werkzeug.exceptions import UnsupportedMediaType from context.client.ContextClient import ContextClient from slice.client.SliceClient import SliceClient -from ..tools.HttpStatusCodes import HTTP_CREATED +from ..tools.HttpStatusCodes import HTTP_CREATED, HTTP_OK from .ietf_slice_handler import IETFSliceHandler LOGGER = logging.getLogger(__name__) @@ -31,8 +31,10 @@ 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 + context_client = ContextClient() + ietf_slices = IETFSliceHandler.get_all_ietf_slices(context_client) + response = jsonify(ietf_slices) + response.status_code = HTTP_OK return response # @HTTP_AUTH.login_required diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py index 6b57cb853..ee1f215f0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py @@ -1,7 +1,7 @@ import json import logging import uuid -from typing import Optional +from typing import Dict, List, Optional from common.Constants import DEFAULT_CONTEXT_NAME from common.proto.context_pb2 import ( @@ -16,7 +16,6 @@ from common.proto.context_pb2 import ( ) from common.tools.context_queries.Slice import get_slice_by_defualt_name from common.tools.grpc.ConfigRules import update_config_rule_custom -from common.tools.grpc.Tools import grpc_message_to_json from context.client import ContextClient from .YangValidator import YangValidator @@ -41,7 +40,7 @@ def get_custom_config_rule( return cr -def sort_endpoints(endpoinst_list: list, sdps: list, connection_group: dict) -> list: +def sort_endpoints(endpoinst_list: List, sdps: List, connection_group: Dict) -> List: src_sdp_id = connection_group["connectivity-construct"][0]["p2p-sender-sdp"] sdp_id_name_mapping = {sdp["id"]: sdp["node-id"] for sdp in sdps} if endpoinst_list[0].device_id.device_uuid.uuid == sdp_id_name_mapping[src_sdp_id]: @@ -50,8 +49,8 @@ def sort_endpoints(endpoinst_list: list, sdps: list, connection_group: dict) -> def replace_ont_endpoint_with_emu_dc( - endpoint_list: list, context_client: ContextClient -) -> list: + endpoint_list: List, context_client: ContextClient +) -> List: link_list = context_client.ListLinks(Empty()) links = list(link_list.links) devices_list = context_client.ListDevices(Empty()) @@ -96,13 +95,28 @@ def replace_ont_endpoint_with_emu_dc( return endpoint_list -def validate_ietf_slice_data(request_data: dict) -> None: +def validate_ietf_slice_data(request_data: Dict) -> None: yang_validator = YangValidator("ietf-network-slice-service") _ = yang_validator.parse_to_dict(request_data) yang_validator.destroy() class IETFSliceHandler: + @staticmethod + def get_all_ietf_slices(context_client: ContextClient) -> Dict: + slices_list = context_client.ListSlices(Empty()) + slices = slices_list.slices + ietf_slices = {"network-slice-services": {"slice-service": []}} + for slice in slices: + candidate_cr = get_custom_config_rule( + slice.slice_config, CANDIDATE_RESOURCE_KEY + ) + candidate_ietf_data = json.loads(candidate_cr.custom.resource_value) + ietf_slices["network-slice-services"]["slice-service"].append( + candidate_ietf_data["network-slice-services"]["slice-service"][0] + ) + return ietf_slices + @staticmethod def create_slice_service( request_data: dict, context_client: ContextClient -- GitLab From 98062a1a45088ddc8c83f6a2c49bd43437794a81 Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 31 Dec 2024 13:08:20 +0100 Subject: [PATCH 136/463] feat & debug: - redundant L3VPN entry removed from DeviceDriver enum - l3vpn ConfigRules.py added to service handler --- .../database/models/enums/DeviceDriver.py | 1 - .../l3nm_ietfl3vpn/ConfigRules.py | 291 ++++++++++++++++++ 2 files changed, 291 insertions(+), 1 deletion(-) create mode 100644 src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py diff --git a/src/context/service/database/models/enums/DeviceDriver.py b/src/context/service/database/models/enums/DeviceDriver.py index 5f40bdbf3..5342f788a 100644 --- a/src/context/service/database/models/enums/DeviceDriver.py +++ b/src/context/service/database/models/enums/DeviceDriver.py @@ -35,7 +35,6 @@ class ORM_DeviceDriverEnum(enum.Enum): IETF_ACTN = DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN OC = DeviceDriverEnum.DEVICEDRIVER_OC QKD = DeviceDriverEnum.DEVICEDRIVER_QKD - IETF_L3VPN = DeviceDriverEnum.DEVICEDRIVER_IETF_L3VPN grpc_to_enum__device_driver = functools.partial( grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum) diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py new file mode 100644 index 000000000..73fe9c269 --- /dev/null +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py @@ -0,0 +1,291 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, List, Tuple, TypedDict + +from common.proto.context_pb2 import Link +from common.tools.object_factory.ConfigRule import json_config_rule_delete +from context.client.ContextClient import ContextClient + + +class LANPrefixesDict(TypedDict): + lan: str + lan_tag: str + + +SITE_NETWORK_ACCESS_TYPE = "ietf-l3vpn-svc:multipoint" + + +def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: + src_device_uuid: str = json_settings["src_device_name"] + src_endpoint_uuid: str = json_settings["src_endpoint_name"] + src_site_location: str = json_settings["src_site_location"] + src_ipv4_lan_prefixes: list[LANPrefixesDict] = json_settings.get( + "src_ipv4_lan_prefixes" + ) + src_site_id: str = json_settings.get("src_site_id", f"site_{src_site_location}") + src_management_type: str = json_settings.get( + "src_management_type", "ietf-l3vpn-svc:provider-managed" + ) + if src_management_type != "ietf-l3vpn-svc:provider-managed": + raise Exception("management type %s not supported", src_management_type) + src_role: str = "ietf-l3vpn-svc:hub-role" + src_ce_address: str = json_settings["src_ce_address"] + src_pe_address: str = json_settings["src_pe_address"] + src_ce_pe_network_prefix: int = json_settings["src_ce_pe_network_prefix"] + src_mtu: int = json_settings["src_mtu"] + src_input_bw: int = json_settings.get("src_input_bw", 1000000000) + src_output_bw: int = json_settings.get("src_input_bw", 1000000000) + src_qos_profile_id = "qos-realtime" + src_qos_profile_direction = "ietf-l3vpn-svc:both" + src_qos_profile_latency: int = json_settings.get("src_qos_profile_latency", 10) + src_qos_profile_bw_guarantee: int = json_settings.get( + "src_qos_profile_bw_guarantee", 100 + ) + + dst_device_uuid = json_settings["dst_device_name"] + dst_endpoint_uuid = json_settings["dst_endpoint_name"] + dst_site_location: str = json_settings["dst_site_location"] + dst_ipv4_lan_prefixes: list[LANPrefixesDict] = json_settings[ + "dst_ipv4_lan_prefixes" + ] + dst_site_id: str = json_settings.get("dst_site_id", f"site_{dst_site_location}") + dst_management_type: str = json_settings.get( + "dst_management_type", "ietf-l3vpn-svc:provider-managed" + ) + if dst_management_type != "ietf-l3vpn-svc:provider-managed": + raise Exception("management type %s not supported", dst_management_type) + dst_role: str = "ietf-l3vpn-svc:spoke-role" + dst_ce_address: str = json_settings["dst_ce_address"] + dst_pe_address: str = json_settings["dst_pe_address"] + dst_ce_pe_network_prefix: int = json_settings["dst_ce_pe_network_prefix"] + dst_mtu: int = json_settings["dst_mtu"] + dst_input_bw: int = json_settings.get("dst_input_bw", 1000000000) + dst_output_bw: int = json_settings.get("dst_output_bw", 1000000000) + dst_qos_profile_id = "qos-realtime" + dst_qos_profile_direction = "ietf-l3vpn-svc:both" + dst_qos_profile_latency: int = json_settings.get("dst_qos_profile_latency", 10) + dst_qos_profile_bw_guarantee: int = json_settings.get( + "dst_qos_profile_bw_guarantee", 100 + ) + + # Create source site information + src_management = {"type": src_management_type} + src_locations = {"location": [{"location-id": src_site_location}]} + src_devices = { + "device": [{"device-id": src_device_uuid, "location": src_site_location}] + } + src_site_lan_prefixes = [ + {"lan": lp["lan"], "lan-tag": lp["lan_tag"], "next-hop": src_ce_address} + for lp in src_ipv4_lan_prefixes + ] + src_site_routing_protocols = { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": src_site_lan_prefixes + } + }, + } + ] + } + src_site_network_accesses = { + "site-network-access": [ + { + "site-network-access-id": src_endpoint_uuid, + "site-network-access-type": SITE_NETWORK_ACCESS_TYPE, + "device-reference": src_device_uuid, + "vpn-attachment": {"vpn-id": service_uuid, "site-role": src_role}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": src_pe_address, + "customer-address": src_ce_address, + "prefix-length": src_ce_pe_network_prefix, + }, + } + }, + "service": { + "svc-mtu": src_mtu, + "svc-input-bandwidth": src_input_bw, + "svc-output-bandwidth": src_output_bw, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": src_qos_profile_id, + "direction": src_qos_profile_direction, + "latency": { + "latency-boundary": src_qos_profile_latency + }, + "bandwidth": { + "guaranteed-bw-percent": src_qos_profile_bw_guarantee + }, + } + ] + } + } + }, + }, + } + ] + } + + # Create destination site information + dst_management = {"type": src_management_type} + dst_locations = {"location": [{"location-id": dst_site_location}]} + dst_devices = { + "device": [{"device-id": dst_device_uuid, "location": dst_site_location}] + } + dst_site_lan_prefixes = [ + {"lan": lp["lan"], "lan-tag": lp["lan_tag"], "next-hop": dst_ce_address} + for lp in dst_ipv4_lan_prefixes + ] + dst_site_routing_protocols = { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": dst_site_lan_prefixes + } + }, + } + ] + } + dst_site_network_accesses = { + "site-network-access": [ + { + "site-network-access-id": dst_endpoint_uuid, + "site-network-access-type": SITE_NETWORK_ACCESS_TYPE, + "device-reference": dst_device_uuid, + "vpn-attachment": {"vpn-id": service_uuid, "site-role": dst_role}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": dst_pe_address, + "customer-address": dst_ce_address, + "prefix-length": dst_ce_pe_network_prefix, + }, + } + }, + "service": { + "svc-mtu": dst_mtu, + "svc-input-bandwidth": dst_input_bw, + "svc-output-bandwidth": dst_output_bw, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": dst_qos_profile_id, + "direction": dst_qos_profile_direction, + "latency": { + "latency-boundary": dst_qos_profile_latency + }, + "bandwidth": { + "guaranteed-bw-percent": dst_qos_profile_bw_guarantee + }, + } + ] + } + } + }, + }, + } + ] + } + + sites = { + "site": [ + { + "site-id": src_site_id, + "management": src_management, + "locations": src_locations, + "devices": src_devices, + "routing-protocols": src_site_routing_protocols, + "site-network-accesses": src_site_network_accesses, + }, + { + "site-id": dst_site_id, + "management": dst_management, + "locations": dst_locations, + "devices": dst_devices, + "routing-protocols": dst_site_routing_protocols, + "site-network-accesses": dst_site_network_accesses, + }, + ] + } + + l3_vpn_data_model = { + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": {"vpn-service": [{"vpn-id": service_uuid}]}, + "sites": sites, + } + } + + return l3_vpn_data_model + + +def teardown_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: + json_config_rules = [ + json_config_rule_delete( + "/service[{:s}]/IETFSlice".format(service_uuid), + {}, + ), + json_config_rule_delete( + "/service[{:s}]/IETFSlice/operation".format(service_uuid), + {}, + ), + ] + return json_config_rules + + +def get_link_ep_device_names( + link: Link, context_client: ContextClient +) -> Tuple[str, str, str, str]: + ep_ids = link.link_endpoint_ids + ep_device_id_1 = ep_ids[0].device_id + ep_uuid_1 = ep_ids[0].endpoint_uuid.uuid + device_obj_1 = context_client.GetDevice(ep_device_id_1) + for d_ep in device_obj_1.device_endpoints: + if d_ep.endpoint_id.endpoint_uuid.uuid == ep_uuid_1: + ep_name_1 = d_ep.name + break + else: + raise Exception("endpoint not found") + device_obj_name_1 = device_obj_1.name + ep_device_id_2 = ep_ids[1].device_id + ep_uuid_2 = ep_ids[1].endpoint_uuid.uuid + device_obj_2 = context_client.GetDevice(ep_device_id_2) + for d_ep in device_obj_2.device_endpoints: + if d_ep.endpoint_id.endpoint_uuid.uuid == ep_uuid_2: + ep_name_2 = d_ep.name + break + else: + raise Exception("endpoint not found") + device_obj_name_2 = device_obj_2.name + return ( + device_obj_name_1, + ep_name_1, + device_obj_1, + device_obj_name_2, + ep_name_2, + device_obj_2, + ) -- GitLab From 319ea841e16345f3a33f7de9b3b967c467f9d1bb Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 31 Dec 2024 22:51:10 +0100 Subject: [PATCH 137/463] feat & debug: - updaet_connectivity_service method added to ietf_l3vpn's TfsApiClient.py - config rule check added to ietf_l3vpn's driver - config rule creation added to setup_config_rules function of ietf_l3vpn service handler - debuggin in the L3NM_IETFL3VPN_ServiceHandler.py --- .../drivers/ietf_l3vpn/TfsApiClient.py | 17 ++- .../service/drivers/ietf_l3vpn/driver.py | 54 +++++--- .../l3nm_ietfl3vpn/ConfigRules.py | 28 +++- .../L3NM_IETFL3VPN_ServiceHandler.py | 124 +++++++++--------- 4 files changed, 137 insertions(+), 86 deletions(-) diff --git a/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py index f635f1a75..b05278fa0 100644 --- a/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py +++ b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py @@ -160,13 +160,26 @@ class TfsApiClient: def create_connectivity_service(self, l3vpn_data: dict) -> None: try: - requests.post(self._l3vpn_url, json=l3vpn_data) + # requests.post(self._l3vpn_url, json=l3vpn_data) + LOGGER.debug( + "[create_connectivity_service] l3vpn_data={:s}".format(str(l3vpn_data)) + ) + except requests.exceptions.ConnectionError: + raise Exception("faild to send post request to TFS L3VPN NBI") + + def update_connectivity_service(self, l3vpn_data: dict) -> None: + try: + # requests.post(self._l3vpn_url, json=l3vpn_data) + LOGGER.debug( + "[update_connectivity_service] l3vpn_data={:s}".format(str(l3vpn_data)) + ) except requests.exceptions.ConnectionError: raise Exception("faild to send post request to TFS L3VPN NBI") def delete_connectivity_service(self, service_uuid: str) -> None: url = self._l3vpn_url + f"/vpn-service={service_uuid}" try: - requests.delete(url, auth=self._auth) + # requests.delete(url, auth=self._auth) + LOGGER.debug("[delete_connectivity_service] url={:s}".format(str(url))) except requests.exceptions.ConnectionError: raise Exception("faild to send delete request to TFS L3VPN NBI") diff --git a/src/device/service/drivers/ietf_l3vpn/driver.py b/src/device/service/drivers/ietf_l3vpn/driver.py index 25d8f9319..45542527a 100644 --- a/src/device/service/drivers/ietf_l3vpn/driver.py +++ b/src/device/service/drivers/ietf_l3vpn/driver.py @@ -58,6 +58,9 @@ ALL_RESOURCE_KEYS = [ RE_GET_ENDPOINT_FROM_INTERFACE = re.compile(r"^\/interface\[([^\]]+)\].*") +RE_IETF_L3VPN_DATA = re.compile(r"^\/service\[[^\]]+\]\/IETFL3VPN$") +RE_IETF_L3VPN_OPERATION = re.compile(r"^\/service\[[^\]]+\]\/IETFL3VPN\/operation$") + DRIVER_NAME = "ietf_l3vpn" METRICS_POOL = MetricsPool("Device", "Driver", labels={"driver": DRIVER_NAME}) @@ -147,7 +150,8 @@ class IetfL3VpnDriver(_Driver): if self.__started.is_set(): return True try: - requests.get(url, timeout=self.__timeout, auth=self.__auth) + # requests.get(url, timeout=self.__timeout, auth=self.__auth) + ... except requests.exceptions.Timeout: LOGGER.exception("Timeout connecting {:s}".format(url)) return False @@ -215,25 +219,43 @@ class IetfL3VpnDriver(_Driver): if len(resources) == 0: return results with self.__lock: + for resource in resources: + resource_key, resource_value = resource + if RE_IETF_L3VPN_OPERATION.match(resource_key): + operation_type = json.loads(resource_value)["type"] + results.append((resource_key, True)) + break + else: + raise Exception("operation type not found in resources") for resource in resources: LOGGER.info("resource = {:s}".format(str(resource))) resource_key, resource_value = resource + if not RE_IETF_L3VPN_DATA.match(resource_key): + continue try: resource_value = json.loads(resource_value) - service_uuid = resource_value["uuid"] - - if service_exists(self.__tfs_nbi_root, self.__auth, service_uuid): - exc = NotImplementedError( - "IETF L3VPN Service Update is still not supported" - ) - results.append((resource[0], exc)) - continue - l3vpn_datamodel = create_l3vpn_datamodel( - service_uuid, resource_value + # if service_exists(self.__tfs_nbi_root, self.__auth, service_uuid): + # exc = NotImplementedError( + # "IETF L3VPN Service Update is still not supported" + # ) + # results.append((resource[0], exc)) + # continue + if operation_type == "create": + service_id = resource_value["network-slice-services"]["slice-service"][0]["id"] + l3vpn_datamodel = create_l3vpn_datamodel( + service_id, resource_value, operation_type ) - self.tac.create_connectivity_service(l3vpn_datamodel) + self.tac.create_connectivity_service(l3vpn_datamodel) + elif operation_type == "update": + service_id = resource_value["network-slice-services"]["slice-service"][0]["id"] + l3vpn_datamodel = create_l3vpn_datamodel( + service_id, resource_value, operation_type + ) + self.tac.update_connectivity_service(l3vpn_datamodel) + else: + raise Exception("operation type not supported") results.append((resource_key, True)) except Exception as e: # pylint: disable=broad-except LOGGER.exception( @@ -255,12 +277,14 @@ class IetfL3VpnDriver(_Driver): for resource in resources: LOGGER.info("resource = {:s}".format(str(resource))) resource_key, resource_value = resource + if not RE_IETF_L3VPN_DATA.match(resource_key): + continue try: resource_value = json.loads(resource_value) - service_uuid = resource_value["uuid"] + service_id = resource_value["id"] - if service_exists(self.__tfs_nbi_root, self.__auth, service_uuid): - self.tac.delete_connectivity_service(service_uuid) + # if service_exists(self.__tfs_nbi_root, self.__auth, service_uuid): + self.tac.delete_connectivity_service(service_id) results.append((resource_key, True)) except Exception as e: # pylint: disable=broad-except LOGGER.exception( diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py index 73fe9c269..72f0dfd31 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py @@ -15,7 +15,10 @@ from typing import Dict, List, Tuple, TypedDict from common.proto.context_pb2 import Link -from common.tools.object_factory.ConfigRule import json_config_rule_delete +from common.tools.object_factory.ConfigRule import ( + json_config_rule_delete, + json_config_rule_set, +) from context.client.ContextClient import ContextClient @@ -27,7 +30,9 @@ class LANPrefixesDict(TypedDict): SITE_NETWORK_ACCESS_TYPE = "ietf-l3vpn-svc:multipoint" -def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: +def setup_config_rules( + service_uuid: str, json_settings: Dict, operation_type: str +) -> List[Dict]: src_device_uuid: str = json_settings["src_device_name"] src_endpoint_uuid: str = json_settings["src_endpoint_name"] src_site_location: str = json_settings["src_site_location"] @@ -239,18 +244,27 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: "sites": sites, } } - - return l3_vpn_data_model + json_config_rules = [ + json_config_rule_set( + "/service[{:s}]/IETFL3VPN".format(service_uuid), + l3_vpn_data_model, + ), + json_config_rule_set( + "/service[{:s}]/IETFL3VPN/operation".format(service_uuid), + {"type": operation_type}, + ), + ] + return json_config_rules def teardown_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: json_config_rules = [ json_config_rule_delete( - "/service[{:s}]/IETFSlice".format(service_uuid), - {}, + "/service[{:s}]/IETFL3VPN".format(service_uuid), + {"id": service_uuid}, ), json_config_rule_delete( - "/service[{:s}]/IETFSlice/operation".format(service_uuid), + "/service[{:s}]/IETFL3VPN/operation".format(service_uuid), {}, ), ] diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py index 4b4e9add5..e1d8b5c50 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py @@ -104,13 +104,13 @@ def extract_match_criterion_ipv4_info( dst_port = type_value["value"][0] elif type_value["type"] == "ietf-network-slice-service:vlan": vlan = type_value["value"][0] - return Ipv4Info( - src_ip=src_ip, - dst_ip=dst_ip, - src_port=src_port, - dst_port=dst_port, - vlan=vlan, - ) + return Ipv4Info( + src_ip=src_ip, + dst_ip=dst_ip, + src_port=src_port, + dst_port=dst_port, + vlan=vlan, + ) class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): @@ -130,7 +130,7 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): DeviceId(**json_device_id(device_uuid)) ) device_controller = self.__task_executor.get_device_controller(device_obj) - if device_controller.device_type == DeviceTypeEnum.IP_SDN_CONTROLLER: + if device_controller.device_type == DeviceTypeEnum.IP_SDN_CONTROLLER.value: src_device_uuid, src_endpoint_uuid = device_uuid, endpoint_uuid src_device_controller = device_controller break @@ -142,7 +142,7 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): DeviceId(**json_device_id(device_uuid)) ) device_controller = self.__task_executor.get_device_controller(device_obj) - if device_controller.device_type == DeviceTypeEnum.IP_SDN_CONTROLLER: + if device_controller.device_type == DeviceTypeEnum.IP_SDN_CONTROLLER.value: dst_device_uuid, dst_endpoint_uuid = device_uuid, endpoint_uuid dst_device_controller = device_controller break @@ -216,63 +216,63 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): ietf_slice_candidate_cr = get_custom_config_rule( service_config, CANDIDATE_RESOURCE_KEY ) - if ( + if not ( ietf_slice_running_cr and ietf_slice_candidate_cr ): # The request comes from the IETF Slice NBI - running_resource_value_dict = json.loads( - ietf_slice_running_cr.custom.resource_value - ) - candidate_resource_value_dict = json.loads( - ietf_slice_candidate_cr.custom.resource_value - ) - running_candidate_diff = get_running_candidate_ietf_slice_data_diff( - service_config - ) - slice_services = candidate_resource_value_dict[ - "network-slice-services" - ]["slice-service"] - slice_service = slice_services[0] - sdps = slice_service["sdps"]["sdp"] - connection_groups = slice_service["connection-groups"][ - "connection-group" - ] - connection_group = connection_groups[0] - connecitivity_constructs = connection_group["connectivity-construct"] - connecitivity_construct = connecitivity_constructs[0] - src_sdp_idx = connecitivity_construct["p2p-sender-sdp"] - dst_sdp_idx = connecitivity_construct["p2p-receiver-sdp"] - src_sdp = next(sdp for sdp in sdps if sdp["id"] == src_sdp_idx) - dst_sdp = next(sdp for sdp in sdps if sdp["id"] == dst_sdp_idx) - src_match_criterion = src_sdp["service-match-criteria"][ - "match-criterion" - ][0] - dst_match_criterion = dst_sdp["service-match-criteria"][ - "match-criterion" - ][0] - src_match_criterion_ipv4_info = extract_match_criterion_ipv4_info( - src_match_criterion + raise Exception("IETF Slice data not found") + running_resource_value_dict = json.loads( + ietf_slice_running_cr.custom.resource_value + ) + candidate_resource_value_dict = json.loads( + ietf_slice_candidate_cr.custom.resource_value + ) + running_candidate_diff = get_running_candidate_ietf_slice_data_diff( + service_config + ) + LOGGER.debug("running_candidate_diff: %s", running_candidate_diff) + slice_services = candidate_resource_value_dict["network-slice-services"][ + "slice-service" + ] + slice_service = slice_services[0] + sdps = slice_service["sdps"]["sdp"] + connection_groups = slice_service["connection-groups"]["connection-group"] + connection_group = connection_groups[0] + connecitivity_constructs = connection_group["connectivity-construct"] + connecitivity_construct = connecitivity_constructs[0] + src_sdp_idx = connecitivity_construct["p2p-sender-sdp"] + dst_sdp_idx = connecitivity_construct["p2p-receiver-sdp"] + src_sdp = next(sdp for sdp in sdps if sdp["id"] == src_sdp_idx) + dst_sdp = next(sdp for sdp in sdps if sdp["id"] == dst_sdp_idx) + src_match_criterion = src_sdp["service-match-criteria"]["match-criterion"][ + 0 + ] + dst_match_criterion = dst_sdp["service-match-criteria"]["match-criterion"][ + 0 + ] + src_match_criterion_ipv4_info = extract_match_criterion_ipv4_info( + src_match_criterion + ) + dst_match_criterion_ipv4_info = extract_match_criterion_ipv4_info( + dst_match_criterion + ) + src_ipv4_lan_prefixes = [ + LANPrefixesDict( + lan=src_match_criterion_ipv4_info["dst_ip"], + lan_tag=src_match_criterion_ipv4_info["vlan"], ) - dst_match_criterion_ipv4_info = extract_match_criterion_ipv4_info( - dst_match_criterion + ] + dst_ipv4_lan_prefixes = [ + LANPrefixesDict( + lan=dst_match_criterion_ipv4_info["dst_ip"], + lan_tag=dst_match_criterion_ipv4_info["vlan"], ) - src_ipv4_lan_prefixes = [ - LANPrefixesDict( - lan=src_match_criterion_ipv4_info["dst_ip"], - lan_tag=src_match_criterion_ipv4_info["vlan"], - ) - ] - dst_ipv4_lan_prefixes = [ - LANPrefixesDict( - lan=dst_match_criterion_ipv4_info["dst_ip"], - lan_tag=dst_match_criterion_ipv4_info["vlan"], - ) - ] - src_ce_address = src_endpoint_settings["address_ip"] - src_pe_address = src_ce_address - src_ce_address_prefix = src_endpoint_settings["address_prefix"] - dst_ce_address = dst_endpoint_settings["address_ip"] - dst_pe_address = dst_ce_address - dst_ce_address_prefix = dst_endpoint_settings["address_prefix"] + ] + src_ce_address = src_endpoint_settings["address_ip"] + src_pe_address = src_ce_address + src_ce_address_prefix = src_endpoint_settings["address_prefix"] + dst_ce_address = dst_endpoint_settings["address_ip"] + dst_pe_address = dst_ce_address + dst_ce_address_prefix = dst_endpoint_settings["address_prefix"] resource_value_dict = { "uuid": service_uuid, "src_device_name": src_device_name, -- GitLab From 3874e8970be63f77c3011ab433e2499adf367538 Mon Sep 17 00:00:00 2001 From: hajipour Date: Wed, 1 Jan 2025 14:57:39 +0100 Subject: [PATCH 138/463] operation_type selection added to config rule creation --- .../l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py index e1d8b5c50..a1bbe7557 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py @@ -229,6 +229,10 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): running_candidate_diff = get_running_candidate_ietf_slice_data_diff( service_config ) + if not running_candidate_diff: + operation_type = "create" + elif "values_changed" in running_candidate_diff: + operation_type = "update" LOGGER.debug("running_candidate_diff: %s", running_candidate_diff) slice_services = candidate_resource_value_dict["network-slice-services"][ "slice-service" @@ -292,7 +296,7 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): "dst_ce_pe_network_prefix": dst_ce_address_prefix, "dst_mtu": MTU, } - json_config_rules = setup_config_rules(service_uuid, resource_value_dict) + json_config_rules = setup_config_rules(service_uuid, resource_value_dict, operation_type) del controller.device_config.config_rules[:] for jcr in json_config_rules: controller.device_config.config_rules.append(ConfigRule(**jcr)) -- GitLab From d7c5d0d0bd6d2c653367becdd82c2e2b2215d293 Mon Sep 17 00:00:00 2001 From: hajipour Date: Wed, 1 Jan 2025 15:08:10 +0100 Subject: [PATCH 139/463] feat & debug: - app flow ids changed to match the expectations - proper sdp removal parsing added to nce service handler --- .../service_handlers/l3nm_nce/ConfigRules.py | 4 +- .../l3nm_nce/L3NMNCEServiceHandler.py | 131 ++++++++++++------ 2 files changed, 91 insertions(+), 44 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_nce/ConfigRules.py b/src/service/service/service_handlers/l3nm_nce/ConfigRules.py index e74fb6630..d6bcadb45 100644 --- a/src/service/service/service_handlers/l3nm_nce/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_nce/ConfigRules.py @@ -40,7 +40,7 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: app_flow_service_profile: str = f"service_{app_flow_id}" app_id: str = f"app_{app_flow_id}" app_feature_id: str = f"feature_{app_flow_id}" - app_flow_name: str = json_settings.get("app_flow_name", "App_Flow_Example") + app_flow_name: str = f"App_Flow_{app_flow_id}" app_flow_max_online_users: int = json_settings.get("app_flow_max_online_users", 1) app_flow_stas: str = json_settings.get("stas", "00:3D:E1:18:82:9E") qos_profile_name: str = json_settings.get("app_flow_qos_profile", "AR_VR_Gaming") @@ -72,7 +72,7 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: }, } application = { - "name": app_flow_name, + "name": app_flow_app_name, "app-id": app_id, "app-features": { "app-feature": [ diff --git a/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py b/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py index a93764ce7..3e9380bae 100644 --- a/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py @@ -51,6 +51,77 @@ MATCH_CRITERION_DIFF_RE = re.compile( ) +def get_removed_items( + candidate_ietf_slice_dict: dict, running_ietf_slice_dict: dict +) -> dict: + removed_items = { + "sdp": {"sdp_idx": None, "value": {}}, + "connection_group": {"connection_group_idx": None, "value": {}}, + "match_criterion": { + "sdp_idx": None, + "match_criterion_idx": None, + "value": {}, + }, + } + running_slice_services = running_ietf_slice_dict["network-slice-services"][ + "slice-service" + ][0] + running_slice_sdps = [sdp["id"] for sdp in running_slice_services["sdps"]["sdp"]] + candidate_slice_services = candidate_ietf_slice_dict["network-slice-services"][ + "slice-service" + ][0] + candidiate_slice_sdps = [ + sdp["id"] for sdp in candidate_slice_services["sdps"]["sdp"] + ] + removed_sdps = set(running_slice_sdps) - set(candidiate_slice_sdps) + if len(removed_sdps) > 1: + raise Exception("Multiple SDPs removed") + removed_sdp_id = list(removed_sdps)[0] + removed_items["sdp"]["sdp_idx"] = running_slice_sdps.index(removed_sdp_id) + removed_items["sdp"]["value"] = next( + sdp + for sdp in running_slice_services["sdps"]["sdp"] + if sdp["id"] == removed_sdp_id + ) + + match_criteria = removed_items["sdp"]["value"]["service-match-criteria"][ + "match-criterion" + ] + if len(match_criteria) > 1: + raise Exception("Multiple match criteria found") + match_criterion = match_criteria[0] + connection_grp_id = match_criterion["target-connection-group-id"] + connection_groups = running_slice_services["connection-groups"]["connection-group"] + connection_group = next( + (idx, cg) + for idx, cg in enumerate(connection_groups) + if cg["id"] == connection_grp_id + ) + removed_items["connection_group"]["connection_group_idx"] = connection_group[0] + removed_items["connection_group"]["value"] = connection_group[1] + for sdp in running_slice_services["sdps"]["sdp"]: + if sdp["id"] == removed_sdp_id: + continue + for mc in sdp["service-match-criteria"]["match-criterion"]: + if mc["target-connection-group-id"] == connection_grp_id: + removed_items["match_criterion"]["sdp_idx"] = running_slice_sdps.index( + sdp["id"] + ) + removed_items["match_criterion"]["match_criterion_idx"] = sdp[ + "service-match-criteria" + ]["match-criterion"].index(mc) + removed_items["match_criterion"]["value"] = mc + break + + if ( + removed_items["match_criterion"]["sdp_idx"] is None + or removed_items["sdp"]["sdp_idx"] is None + or removed_items["connection_group"]["connection_group_idx"] is None + ): + raise Exception("sdp, connection group or match criterion not found") + return removed_items + + def get_custom_config_rule( service_config: ServiceConfig, resource_key: str ) -> Optional[ConfigRule]: @@ -100,13 +171,13 @@ class L3NMNCEServiceHandler(_ServiceHandler): endpoints: List[Tuple[str, str, Optional[str]]], connection_uuid: Optional[str] = None, ) -> List[Union[bool, Exception]]: + LOGGER.debug(f"P3: {len(endpoints)} {endpoints}") chk_type("endpoints", endpoints, list) if len(endpoints) == 0: return [] results = [] try: context_client = ContextClient() - service_name = self.__service.name service_config = self.__service.service_config settings = self.__settings_handler.get("/settings") src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) @@ -133,6 +204,10 @@ class L3NMNCEServiceHandler(_ServiceHandler): running_resource_value_dict = json.loads( running_ietf_slice_cr.custom.resource_value ) + service_name = running_resource_value_dict["network-slice-services"][ + "slice-service" + ][0]["id"] + LOGGER.debug(f"P1: {service_name}") if not running_candidate_diff: # Slice Creation operation_type = "create" slice_services = candidate_resource_value_dict[ @@ -235,57 +310,25 @@ class L3NMNCEServiceHandler(_ServiceHandler): "connection-group" ] operation_type = "delete" - added_items = { - "sdp": {"sdp_idx": None, "value": {}}, - "connection_group": {"connection_group_idx": None, "value": {}}, - "match_criterion": { - "sdp_idx": None, - "match_criterion_idx": None, - "value": {}, - }, - } - for added_key, added_value in running_candidate_diff[ - "iterable_item_removed" - ].items(): - sdp_match = SDP_DIFF_RE.match(added_key) - connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) - match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) - if sdp_match: - added_items["sdp"] = { - "sdp_idx": int(sdp_match.groups()[0]), - "value": added_value, - } - elif connection_group_match: - added_items["connection_group"] = { - "connection_group_idx": int( - connection_group_match.groups()[0] - ), - "value": added_value, - } - elif match_criterion_match: - added_items["match_criterion"] = { - "sdp_idx": int(match_criterion_match.groups()[0]), - "match_criterion_idx": int( - match_criterion_match.groups()[1] - ), - "value": added_value, - } - new_sdp = sdps[added_items["sdp"]["sdp_idx"]] - src_sdp_idx = new_sdp["id"] - dst_sdp_idx = sdps[added_items["match_criterion"]["sdp_idx"]]["id"] + removed_items = get_removed_items( + candidate_resource_value_dict, running_resource_value_dict + ) + removed_sdp = sdps[removed_items["sdp"]["sdp_idx"]] + src_sdp_idx = removed_sdp["id"] + dst_sdp_idx = sdps[removed_items["match_criterion"]["sdp_idx"]]["id"] connection_grp_id = connection_groups[ - added_items["connection_group"]["connection_group_idx"] + removed_items["connection_group"]["connection_group_idx"] ]["id"] if ( connection_grp_id - != added_items["match_criterion"]["value"][ + != removed_items["match_criterion"]["value"][ "target-connection-group-id" ] ): raise Exception( "connection group missmatch in destination sdp and added connection group" ) - match_criteria = new_sdp["service-match-criteria"]["match-criterion"] + match_criteria = removed_sdp["service-match-criteria"]["match-criterion"] match_criterion = match_criteria[0] for type_value in match_criterion["match-type"]: if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": @@ -364,11 +407,15 @@ class L3NMNCEServiceHandler(_ServiceHandler): "dst_port": dst_port, } json_config_rules = setup_config_rules(service_name, resource_value_dict) + LOGGER.debug(f"Config Rules: {json_config_rules}") del controller.device_config.config_rules[:] for jcr in json_config_rules: controller.device_config.config_rules.append(ConfigRule(**jcr)) self.__task_executor.configure_device(controller) + LOGGER.debug('Configured device "{:s}"'.format(controller.name)) except Exception as e: # pylint: disable=broad-except + LOGGER.exception(f'P4: {e}') + raise e results.append(e) return results -- GitLab From 281f093e53c60f8fe631d12779fedd76097e04ae Mon Sep 17 00:00:00 2001 From: hajipour Date: Wed, 1 Jan 2025 15:46:11 +0100 Subject: [PATCH 140/463] debug: - delay and bandwidth passed as integer instead of str in IETF Slice model - packet_loss passed as float instead of str in IETF Slice model - ip and prefix passed to the SBI IETF Slice model instead of only ip --- .../service_handlers/l3slice_ietfslice/ConfigRules.py | 6 +++--- .../l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py b/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py index cd6072e85..e720f33bb 100644 --- a/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py +++ b/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py @@ -43,9 +43,9 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: dst_destination_ip_prefix: str = json_settings["dst_destination_ip_prefix"] dst_destination_tcp_port: str = json_settings["dst_destination_tcp_port"] slice_id: str = json_settings["slice_id"] - delay: str = json_settings["delay"] - bandwidth: str = json_settings["bandwidth"] - packet_loss: str = json_settings["packet_loss"] + delay: str = int(json_settings["delay"]) + bandwidth: str = int(json_settings["bandwidth"]) + packet_loss: str = float(json_settings["packet_loss"]) sdps = [ { diff --git a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py index fa4ebd35d..6a63201bb 100644 --- a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py +++ b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py @@ -106,9 +106,9 @@ def extract_match_criterion_ipv4_info( ) -> Ipv4Info: for type_value in match_criterion["match-type"]: if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": - src_ip = type_value["value"][0].split("/")[0] + src_ip = type_value["value"][0] elif type_value["type"] == "ietf-network-slice-service:destination-ip-prefix": - dst_ip = type_value["value"][0].split("/")[0] + dst_ip = type_value["value"][0] elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": src_port = type_value["value"][0] elif type_value["type"] == "ietf-network-slice-service:destination-tcp-port": @@ -217,7 +217,9 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): running_resource_value_dict = json.loads( running_ietf_slice_cr.custom.resource_value ) - slice_name = running_resource_value_dict["network-slice-services"]['slice-service'][0]['id'] + slice_name = running_resource_value_dict["network-slice-services"][ + "slice-service" + ][0]["id"] if not running_candidate_diff: # Slice Creation slice_services = candidate_resource_value_dict[ "network-slice-services" -- GitLab From d13629dd7bb6b390da1c4dc716d7460c5d6864d3 Mon Sep 17 00:00:00 2001 From: hajipour Date: Wed, 1 Jan 2025 15:53:52 +0100 Subject: [PATCH 141/463] debug: - p2mp changed to p2p in post_network_slice2.json - changes in ietf_slice_handler.py --- .../nbi_plugins/ietf_network_slice/ietf_slice_handler.py | 6 +++++- src/nbi/tests/data/camara-e2e-topology.json | 6 +++--- src/nbi/tests/data/slice/post_network_slice2.json | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py index ee1f215f0..030ae8aa0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py @@ -104,7 +104,11 @@ def validate_ietf_slice_data(request_data: Dict) -> None: class IETFSliceHandler: @staticmethod def get_all_ietf_slices(context_client: ContextClient) -> Dict: - slices_list = context_client.ListSlices(Empty()) + existing_context_ids = context_client.ListContextIds(Empty()) + context_ids = list(existing_context_ids.context_ids) + if len(context_ids) != 1: + raise Exception("Number of contexts should be 1") + slices_list = context_client.ListSlices(context_ids[0]) slices = slices_list.slices ietf_slices = {"network-slice-services": {"slice-service": []}} for slice in slices: diff --git a/src/nbi/tests/data/camara-e2e-topology.json b/src/nbi/tests/data/camara-e2e-topology.json index 632cb99a2..b8fcf338a 100644 --- a/src/nbi/tests/data/camara-e2e-topology.json +++ b/src/nbi/tests/data/camara-e2e-topology.json @@ -41,14 +41,14 @@ "action": 1, "custom": { "resource_key": "_connect/address", - "resource_value": "10.1.7.194" + "resource_value": "10.1.6.201" } }, { "action": 1, "custom": { "resource_key": "_connect/port", - "resource_value": "80" + "resource_value": "9091" } }, { @@ -1659,4 +1659,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/src/nbi/tests/data/slice/post_network_slice2.json b/src/nbi/tests/data/slice/post_network_slice2.json index 1445846cc..97e6ade27 100644 --- a/src/nbi/tests/data/slice/post_network_slice2.json +++ b/src/nbi/tests/data/slice/post_network_slice2.json @@ -156,8 +156,8 @@ }, { "id": 2, - "p2mp-sender-sdp": "2", - "p2mp-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "p2p-receiver-sdp": "1", "service-slo-sle-policy": { "slo-policy": { "metric-bound": [ @@ -186,4 +186,4 @@ } } ] -} \ No newline at end of file +} -- GitLab From 5a15c97e1284b14791993d5a4476a59675180d9c Mon Sep 17 00:00:00 2001 From: hajipour Date: Wed, 1 Jan 2025 16:07:40 +0100 Subject: [PATCH 142/463] debug: - app_flow_name retrieval from config rule fixed --- src/device/service/drivers/nce/driver.py | 9 ++------- src/device/service/drivers/nce/nce_fan_client.py | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/device/service/drivers/nce/driver.py b/src/device/service/drivers/nce/driver.py index 1a79b70db..003a0fabf 100644 --- a/src/device/service/drivers/nce/driver.py +++ b/src/device/service/drivers/nce/driver.py @@ -128,20 +128,14 @@ class NCEDriver(_Driver): return results def Connect(self) -> bool: - url = ( - self.__tfs_nbi_root + "/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" - ) with self.__lock: if self.__started.is_set(): return True try: - # requests.get(url, timeout=self.__timeout) ... except requests.exceptions.Timeout: - LOGGER.exception("Timeout connecting {:s}".format(url)) return False except Exception: # pylint: disable=broad-except - LOGGER.exception("Exception connecting {:s}".format(url)) return False else: self.__started.set() @@ -206,6 +200,7 @@ class NCEDriver(_Driver): with self.__lock: for resource in resources: resource_key, resource_value = resource + LOGGER.debug("resource = {:s}".format(str(resource))) if RE_NCE_APP_FLOW_OPERATION.match(resource_key): operation_type = json.loads(resource_value)["type"] results.append((resource_key, True)) @@ -224,7 +219,7 @@ class NCEDriver(_Driver): elif operation_type == "delete": app_flow_name = resource_value["huawei-nce-app-flow:app-flows"][ "app-flow" - ][0]["name"] + ][0]["app-name"] self.nce.delete_app_flow(app_flow_name) LOGGER.debug(f"app_flow_datamodel {resource_value}") results.append((resource_key, True)) diff --git a/src/device/service/drivers/nce/nce_fan_client.py b/src/device/service/drivers/nce/nce_fan_client.py index e193918b7..022ae15a5 100644 --- a/src/device/service/drivers/nce/nce_fan_client.py +++ b/src/device/service/drivers/nce/nce_fan_client.py @@ -12,11 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +import logging from typing import Optional import requests from requests.auth import HTTPBasicAuth +LOGGER = logging.getLogger(__name__) + NCE_FAN_URL = "{:s}://{:s}:{:d}/restconf/v1/data" TIMEOUT = 30 @@ -48,6 +51,7 @@ MAPPING_DRIVER = { "DEVICEDRIVER_OC": 11, } +HEADERS = {'Content-Type': 'application/json'} class NCEClient: def __init__( @@ -65,20 +69,24 @@ class NCEClient: try: app_data = app_flow_data["huawei-nce-app-flow:app-flows"]["applications"] app_url = self._nce_fan_url + "/app-flows/apps" - requests.post(app_url, json=app_data) + LOGGER.info(f'Creating app: {app_data} URL: {app_url}') + # requests.post(app_url, json=app_data, headers=HEADERS) app_flow_data = { "app-flow": app_flow_data["huawei-nce-app-flow:app-flows"]["app-flow"] } app_flow_url = self._nce_fan_url + "/app-flows" - requests.post(app_flow_url, json=app_flow_data) + LOGGER.info(f'Creating app flow: {app_flow_data} URL: {app_flow_url}') + # requests.post(app_flow_url, json=app_flow_data, headers=HEADERS) except requests.exceptions.ConnectionError: raise Exception("faild to send post requests to NCE FAN") def delete_app_flow(self, app_flow_name: str) -> None: try: app_url = self._nce_fan_url + f"/app-flows/apps/application={app_flow_name}" - requests.delete(app_url) + LOGGER.info(f'Deleting app: {app_flow_name} URL: {app_url}') + # requests.delete(app_url) app_flow_url = self._nce_fan_url + f"/app-flows/app-flow={app_flow_name}" - requests.delete(app_flow_url) + LOGGER.info(f'Deleting app flow: {app_flow_name} URL: {app_flow_url}') + # requests.delete(app_flow_url) except requests.exceptions.ConnectionError: raise Exception("faild to send delete request to NCE FAN") -- GitLab From 6da99c19ed99169a4e1965418c9b9fcccec05b3c Mon Sep 17 00:00:00 2001 From: hajipour Date: Wed, 1 Jan 2025 16:11:33 +0100 Subject: [PATCH 143/463] debug: - request temporarily commented for tests in ietf_slice driver's connect method - ietf slice url's updated in tfs_slice-nbi_client.py --- src/device/service/drivers/ietf_slice/driver.py | 4 +++- .../drivers/ietf_slice/tfs_slice_nbi_client.py | 12 +++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/device/service/drivers/ietf_slice/driver.py b/src/device/service/drivers/ietf_slice/driver.py index e02542d37..aa036c9ad 100644 --- a/src/device/service/drivers/ietf_slice/driver.py +++ b/src/device/service/drivers/ietf_slice/driver.py @@ -142,7 +142,8 @@ class IetfSliceDriver(_Driver): if self.__started.is_set(): return True try: - requests.get(url, timeout=self.__timeout) + # requests.get(url, timeout=self.__timeout) + ... except requests.exceptions.Timeout: LOGGER.exception("Timeout connecting {:s}".format(url)) return False @@ -243,6 +244,7 @@ class IetfSliceDriver(_Driver): self.tac.delete_slice(slice_name) results.append((resource_key, True)) except Exception as e: # pylint: disable=broad-except + raise e LOGGER.exception( "Unhandled error processing resource_key({:s})".format( str(resource_key) diff --git a/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py b/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py index 5443484d7..e7b61ea9a 100644 --- a/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py +++ b/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py @@ -18,11 +18,13 @@ from typing import Optional import requests from requests.auth import HTTPBasicAuth -IETF_SLICE_URL = "{:s}://{:s}:{:d}/restconf/data/ietf-network-slice-service:ietf-nss" +IETF_SLICE_URL = "{:s}://{:s}:{:d}/restconf/data/ietf-network-slice-service" TIMEOUT = 30 LOGGER = logging.getLogger(__name__) +HEADERS = {'Content-Type': 'application/json'} + class TfsApiClient: def __init__( @@ -42,9 +44,9 @@ class TfsApiClient: # ) def create_slice(self, slice_data: dict) -> None: - url = self._slice_url + "/network-slice-services" + url = self._slice_url + ":network-slice-services" try: - requests.post(url, json=slice_data) + requests.post(url, json=slice_data, headers=HEADERS) except requests.exceptions.ConnectionError: raise Exception("faild to send post request to TFS IETF Slice NBI") @@ -56,10 +58,10 @@ class TfsApiClient: ) -> None: url = ( self._slice_url - + f"/network-slice-services/slice-service={slice_name}/connection-groups/connection-group={connection_group_id}" + + f":network-slice-services/slice-service={slice_name}/connection-groups/connection-group={connection_group_id}" ) try: - requests.put(url, json=updated_connection_group_data) + requests.put(url, json=updated_connection_group_data, headers=HEADERS) except requests.exceptions.ConnectionError: raise Exception("faild to send update request to TFS IETF Slice NBI") -- GitLab From b06cbae91baff402638f7fa4805c8abd0234a3c1 Mon Sep 17 00:00:00 2001 From: hajipour Date: Wed, 1 Jan 2025 18:24:49 +0100 Subject: [PATCH 144/463] debug: - service id extraction from l3vpn data model in l3vpn driver fixed - service id extraction from ietf slice data model in l3vpn service handler fixed --- .../service/drivers/ietf_l3vpn/driver.py | 17 +++++++------ .../L3NM_IETFL3VPN_ServiceHandler.py | 24 ++++++++++++------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/src/device/service/drivers/ietf_l3vpn/driver.py b/src/device/service/drivers/ietf_l3vpn/driver.py index 45542527a..cdab75625 100644 --- a/src/device/service/drivers/ietf_l3vpn/driver.py +++ b/src/device/service/drivers/ietf_l3vpn/driver.py @@ -235,7 +235,6 @@ class IetfL3VpnDriver(_Driver): try: resource_value = json.loads(resource_value) - # if service_exists(self.__tfs_nbi_root, self.__auth, service_uuid): # exc = NotImplementedError( # "IETF L3VPN Service Update is still not supported" @@ -243,16 +242,20 @@ class IetfL3VpnDriver(_Driver): # results.append((resource[0], exc)) # continue if operation_type == "create": - service_id = resource_value["network-slice-services"]["slice-service"][0]["id"] + service_id = resource_value["ietf-l3vpn-svc:l3vpn-svc"][ + "vpn-services" + ]["vpn-service"][0]["vpn-id"] l3vpn_datamodel = create_l3vpn_datamodel( - service_id, resource_value, operation_type - ) + service_id, resource_value, operation_type + ) self.tac.create_connectivity_service(l3vpn_datamodel) elif operation_type == "update": - service_id = resource_value["network-slice-services"]["slice-service"][0]["id"] + service_id = resource_value["ietf-l3vpn-svc:l3vpn-svc"][ + "vpn-services" + ]["vpn-service"][0]["vpn-id"] l3vpn_datamodel = create_l3vpn_datamodel( - service_id, resource_value, operation_type - ) + service_id, resource_value, operation_type + ) self.tac.update_connectivity_service(l3vpn_datamodel) else: raise Exception("operation type not supported") diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py index a1bbe7557..2d9f369fa 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py @@ -168,7 +168,6 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): if len(endpoints) < 2: return [] results = [] - service_uuid = self.__service.service_id.service_uuid.uuid service_config = self.__service.service_config try: ( @@ -178,8 +177,6 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): dst_endpoint_uuid, controller, ) = self.__find_IP_transport_edge_endpoints(endpoints) - service_uuid = self.__service.service_id.service_uuid.uuid - service_config = self.__service.service_config src_device_obj = self.__task_executor.get_device( DeviceId(**json_device_id(src_device_uuid)) ) @@ -229,6 +226,7 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): running_candidate_diff = get_running_candidate_ietf_slice_data_diff( service_config ) + service_id = candidate_resource_value_dict["network-slice-services"]["slice-service"][0]["id"] if not running_candidate_diff: operation_type = "create" elif "values_changed" in running_candidate_diff: @@ -278,7 +276,7 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): dst_pe_address = dst_ce_address dst_ce_address_prefix = dst_endpoint_settings["address_prefix"] resource_value_dict = { - "uuid": service_uuid, + "uuid": service_id, "src_device_name": src_device_name, "src_endpoint_name": src_endpoint_obj.name, "src_site_location": src_endpoint_settings["site_location"], @@ -296,14 +294,14 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): "dst_ce_pe_network_prefix": dst_ce_address_prefix, "dst_mtu": MTU, } - json_config_rules = setup_config_rules(service_uuid, resource_value_dict, operation_type) + json_config_rules = setup_config_rules(service_id, resource_value_dict, operation_type) del controller.device_config.config_rules[:] for jcr in json_config_rules: controller.device_config.config_rules.append(ConfigRule(**jcr)) self.__task_executor.configure_device(controller) except Exception as e: # pylint: disable=broad-except LOGGER.exception( - "Unable to SetEndpoint for Service({:s})".format(str(service_uuid)) + "Unable to SetEndpoint for Service({:s})".format(str(service_id)) ) results.append(e) @@ -319,7 +317,15 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): if len(endpoints) < 2: return [] - service_uuid = self.__service.service_id.service_uuid.uuid + service_config = self.__service.service_config + + ietf_slice_candidate_cr = get_custom_config_rule( + service_config, CANDIDATE_RESOURCE_KEY + ) + candidate_resource_value_dict = json.loads( + ietf_slice_candidate_cr.custom.resource_value + ) + service_id = candidate_resource_value_dict["network-slice-services"]["slice-service"][0]["id"] results = [] try: @@ -342,7 +348,7 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): controller = src_controller json_config_rule = json_config_rule_delete( - "/services/service[{:s}]".format(service_uuid), {"uuid": service_uuid} + "/services/service[{:s}]".format(service_id), {"uuid": service_id} ) del controller.device_config.config_rules[:] controller.device_config.config_rules.append(ConfigRule(**json_config_rule)) @@ -350,7 +356,7 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception( - "Unable to DeleteEndpoint for Service({:s})".format(str(service_uuid)) + "Unable to DeleteEndpoint for Service({:s})".format(str(service_id)) ) results.append(e) -- GitLab From 82d6dadc842f64a2c6e51635744fb26c8799b741 Mon Sep 17 00:00:00 2001 From: hajipour Date: Wed, 1 Jan 2025 18:41:40 +0100 Subject: [PATCH 145/463] debug: - create_l3vvpn_datamodel removed from l3vpn's driver --- .../service/drivers/ietf_l3vpn/Tools.py | 216 ------------------ .../service/drivers/ietf_l3vpn/driver.py | 16 +- 2 files changed, 3 insertions(+), 229 deletions(-) diff --git a/src/device/service/drivers/ietf_l3vpn/Tools.py b/src/device/service/drivers/ietf_l3vpn/Tools.py index eeb0d87f1..7caaa27a5 100644 --- a/src/device/service/drivers/ietf_l3vpn/Tools.py +++ b/src/device/service/drivers/ietf_l3vpn/Tools.py @@ -76,222 +76,6 @@ def get_connectivity_service(wim_url, auth, service_uuid): raise Exception("Request Timeout", http_code=408) -def create_l3vpn_datamodel(service_uuid, resource_value: dict) -> dict: - src_device_uuid: str = resource_value["src_device_name"] - src_endpoint_uuid: str = resource_value["src_endpoint_name"] - src_site_location: str = resource_value["src_site_location"] - src_ipv4_lan_prefixes: list[LANPrefixesDict] = resource_value.get( - "src_ipv4_lan_prefixes" - ) - src_site_id: str = resource_value.get("src_site_id", f"site_{src_site_location}") - src_management_type: str = resource_value.get( - "src_management_type", "ietf-l3vpn-svc:provider-managed" - ) - if src_management_type != "ietf-l3vpn-svc:provider-managed": - raise Exception("management type %s not supported", src_management_type) - src_role: str = "ietf-l3vpn-svc:hub-role" - src_ce_address: str = resource_value["src_ce_address"] - src_pe_address: str = resource_value["src_pe_address"] - src_ce_pe_network_prefix: int = resource_value["src_ce_pe_network_prefix"] - src_mtu: int = resource_value["src_mtu"] - src_input_bw: int = resource_value.get("src_input_bw", 1000000000) - src_output_bw: int = resource_value.get("src_input_bw", 1000000000) - src_qos_profile_id = "qos-realtime" - src_qos_profile_direction = "ietf-l3vpn-svc:both" - src_qos_profile_latency: int = resource_value.get("src_qos_profile_latency", 10) - src_qos_profile_bw_guarantee: int = resource_value.get( - "src_qos_profile_bw_guarantee", 100 - ) - - dst_device_uuid = resource_value["dst_device_name"] - dst_endpoint_uuid = resource_value["dst_endpoint_name"] - dst_site_location: str = resource_value["dst_site_location"] - dst_ipv4_lan_prefixes: list[LANPrefixesDict] = resource_value[ - "dst_ipv4_lan_prefixes" - ] - dst_site_id: str = resource_value.get("dst_site_id", f"site_{dst_site_location}") - dst_management_type: str = resource_value.get( - "dst_management_type", "ietf-l3vpn-svc:provider-managed" - ) - if dst_management_type != "ietf-l3vpn-svc:provider-managed": - raise Exception("management type %s not supported", dst_management_type) - dst_role: str = "ietf-l3vpn-svc:spoke-role" - dst_ce_address: str = resource_value["dst_ce_address"] - dst_pe_address: str = resource_value["dst_pe_address"] - dst_ce_pe_network_prefix: int = resource_value["dst_ce_pe_network_prefix"] - dst_mtu: int = resource_value["dst_mtu"] - dst_input_bw: int = resource_value.get("dst_input_bw", 1000000000) - dst_output_bw: int = resource_value.get("dst_output_bw", 1000000000) - dst_qos_profile_id = "qos-realtime" - dst_qos_profile_direction = "ietf-l3vpn-svc:both" - dst_qos_profile_latency: int = resource_value.get("dst_qos_profile_latency", 10) - dst_qos_profile_bw_guarantee: int = resource_value.get( - "dst_qos_profile_bw_guarantee", 100 - ) - - # Create source site information - src_management = {"type": src_management_type} - src_locations = {"location": [{"location-id": src_site_location}]} - src_devices = { - "device": [{"device-id": src_device_uuid, "location": src_site_location}] - } - src_site_lan_prefixes = [ - {"lan": lp["lan"], "lan-tag": lp["lan_tag"], "next-hop": src_pe_address} - for lp in src_ipv4_lan_prefixes - ] - src_site_routing_protocols = { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": src_site_lan_prefixes - } - }, - } - ] - } - src_site_network_accesses = { - "site-network-access": [ - { - "site-network-access-id": src_endpoint_uuid, - "site-network-access-type": SITE_NETWORK_ACCESS_TYPE, - "device-reference": src_device_uuid, - "vpn-attachment": {"vpn-id": service_uuid, "site-role": src_role}, - "ip-connection": { - "ipv4": { - "address-allocation-type": "ietf-l3vpn-svc:static-address", - "addresses": { - "provider-address": src_pe_address, - "customer-address": src_ce_address, - "prefix-length": src_ce_pe_network_prefix, - }, - } - }, - "service": { - "svc-mtu": src_mtu, - "svc-input-bandwidth": src_input_bw, - "svc-output-bandwidth": src_output_bw, - "qos": { - "qos-profile": { - "classes": { - "class": [ - { - "class-id": src_qos_profile_id, - "direction": src_qos_profile_direction, - "latency": { - "latency-boundary": src_qos_profile_latency - }, - "bandwidth": { - "guaranteed-bw-percent": src_qos_profile_bw_guarantee - }, - } - ] - } - } - }, - }, - } - ] - } - - # Create destination site information - dst_management = {"type": src_management_type} - dst_locations = {"location": [{"location-id": dst_site_location}]} - dst_devices = { - "device": [{"device-id": dst_device_uuid, "location": dst_site_location}] - } - dst_site_lan_prefixes = [ - {"lan": lp["lan"], "lan-tag": lp["lan_tag"], "next-hop": dst_pe_address} - for lp in dst_ipv4_lan_prefixes - ] - dst_site_routing_protocols = { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": dst_site_lan_prefixes - } - }, - } - ] - } - dst_site_network_accesses = { - "site-network-access": [ - { - "site-network-access-id": dst_endpoint_uuid, - "site-network-access-type": SITE_NETWORK_ACCESS_TYPE, - "device-reference": dst_device_uuid, - "vpn-attachment": {"vpn-id": service_uuid, "site-role": dst_role}, - "ip-connection": { - "ipv4": { - "address-allocation-type": "ietf-l3vpn-svc:static-address", - "addresses": { - "provider-address": dst_pe_address, - "customer-address": dst_ce_address, - "prefix-length": dst_ce_pe_network_prefix, - }, - } - }, - "service": { - "svc-mtu": dst_mtu, - "svc-input-bandwidth": dst_input_bw, - "svc-output-bandwidth": dst_output_bw, - "qos": { - "qos-profile": { - "classes": { - "class": [ - { - "class-id": dst_qos_profile_id, - "direction": dst_qos_profile_direction, - "latency": { - "latency-boundary": dst_qos_profile_latency - }, - "bandwidth": { - "guaranteed-bw-percent": dst_qos_profile_bw_guarantee - }, - } - ] - } - } - }, - }, - } - ] - } - - sites = { - "site": [ - { - "site-id": src_site_id, - "management": src_management, - "locations": src_locations, - "devices": src_devices, - "routing-protocols": src_site_routing_protocols, - "site-network-accesses": src_site_network_accesses, - }, - { - "site-id": dst_site_id, - "management": dst_management, - "locations": dst_locations, - "devices": dst_devices, - "routing-protocols": dst_site_routing_protocols, - "site-network-accesses": dst_site_network_accesses, - }, - ] - } - - l3_vpn_data_model = { - "ietf-l3vpn-svc:l3vpn-svc": { - "vpn-services": {"vpn-service": [{"vpn-id": service_uuid}]}, - "sites": sites, - } - } - - return l3_vpn_data_model - - def process_optional_string_field( endpoint_data: Dict[str, Any], field_name: str, diff --git a/src/device/service/drivers/ietf_l3vpn/driver.py b/src/device/service/drivers/ietf_l3vpn/driver.py index cdab75625..2aca83b6a 100644 --- a/src/device/service/drivers/ietf_l3vpn/driver.py +++ b/src/device/service/drivers/ietf_l3vpn/driver.py @@ -42,11 +42,7 @@ from device.service.driver_api.ImportTopologyEnum import ( from .Constants import SPECIAL_RESOURCE_MAPPINGS from .TfsApiClient import TfsApiClient -from .Tools import ( - compose_resource_endpoint, - create_l3vpn_datamodel, - service_exists, -) +from .Tools import compose_resource_endpoint LOGGER = logging.getLogger(__name__) @@ -245,18 +241,12 @@ class IetfL3VpnDriver(_Driver): service_id = resource_value["ietf-l3vpn-svc:l3vpn-svc"][ "vpn-services" ]["vpn-service"][0]["vpn-id"] - l3vpn_datamodel = create_l3vpn_datamodel( - service_id, resource_value, operation_type - ) - self.tac.create_connectivity_service(l3vpn_datamodel) + self.tac.create_connectivity_service(resource_value) elif operation_type == "update": service_id = resource_value["ietf-l3vpn-svc:l3vpn-svc"][ "vpn-services" ]["vpn-service"][0]["vpn-id"] - l3vpn_datamodel = create_l3vpn_datamodel( - service_id, resource_value, operation_type - ) - self.tac.update_connectivity_service(l3vpn_datamodel) + self.tac.update_connectivity_service(resource_value) else: raise Exception("operation type not supported") results.append((resource_key, True)) -- GitLab From 09aa2b2db4b7524e0a69feb95ac37978d1056651 Mon Sep 17 00:00:00 2001 From: hajipour Date: Wed, 1 Jan 2025 20:19:04 +0100 Subject: [PATCH 146/463] extra 'self' removed from ietf_slice_handler.pyi --- .../nbi_plugins/ietf_network_slice/ietf_slice_handler.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py index 030ae8aa0..408aeeb01 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py @@ -314,7 +314,6 @@ class IETFSliceHandler: @staticmethod def update_connection_group( - self, slice_name: str, updated_connection_group: dict, context_client: ContextClient, -- GitLab From aa6b1af603204f004f7ae3b88c8ef8144052511d Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 4 Jan 2025 16:09:41 +0100 Subject: [PATCH 147/463] debug: - slice id extraction from ietfslice data model fixed - delete slice url fixed --- src/device/service/drivers/ietf_slice/driver.py | 2 +- src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device/service/drivers/ietf_slice/driver.py b/src/device/service/drivers/ietf_slice/driver.py index aa036c9ad..a7e91925c 100644 --- a/src/device/service/drivers/ietf_slice/driver.py +++ b/src/device/service/drivers/ietf_slice/driver.py @@ -227,7 +227,7 @@ class IetfSliceDriver(_Driver): resource_value = json.loads(resource_value) slice_name = resource_value["network-slice-services"][ "slice-service" - ][0]["connection-groups"]["connection-group"] + ][0]["id"] if operation_type == "create": self.tac.create_slice(resource_value) elif operation_type == "update": diff --git a/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py b/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py index e7b61ea9a..67b0d5cdb 100644 --- a/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py +++ b/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py @@ -66,7 +66,7 @@ class TfsApiClient: raise Exception("faild to send update request to TFS IETF Slice NBI") def delete_slice(self, slice_name: str) -> None: - url = self._slice_url + f"/network-slice-services/slice-service={slice_name}" + url = self._slice_url + f":network-slice-services/slice-service={slice_name}" try: requests.delete(url) except requests.exceptions.ConnectionError: -- GitLab From fc5f3e93e7c29e8d4aff180864d8881780447abe Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 4 Jan 2025 16:13:31 +0100 Subject: [PATCH 148/463] debug: - endpoint order based on access domain fixed (access endpoints come first) - connection group id extraction fixed --- .../ietf_network_slice/ietf_slice_handler.py | 57 +++++++++++++------ 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py index 408aeeb01..46e2423c4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py @@ -8,6 +8,7 @@ from common.proto.context_pb2 import ( ConfigRule, Constraint, DeviceId, + Device, Empty, EndPointId, ServiceConfig, @@ -16,6 +17,8 @@ from common.proto.context_pb2 import ( ) from common.tools.context_queries.Slice import get_slice_by_defualt_name from common.tools.grpc.ConfigRules import update_config_rule_custom +from common.tools.object_factory.Device import json_device_id +from common.DeviceTypes import DeviceTypeEnum from context.client import ContextClient from .YangValidator import YangValidator @@ -29,6 +32,19 @@ ADDRESS_PREFIX = 24 RAISE_IF_DIFFERS = False +def get_endpoint_controller_type( + endpoint: EndPointId, context_client: ContextClient +) -> str: + endpoint_device: Device = context_client.GetDevice(endpoint.device_id) + if endpoint_device.controller_id == DeviceId(): + return "" + controller = context_client.GetDevice(endpoint_device.controller_id) + if controller is None: + controller_uuid = endpoint_device.controller_id.device_uuid.uuid + raise Exception("Device({:s}) not found".format(str(controller_uuid))) + return controller.device_type + + def get_custom_config_rule( service_config: ServiceConfig, resource_key: str ) -> Optional[ConfigRule]: @@ -40,12 +56,29 @@ def get_custom_config_rule( return cr -def sort_endpoints(endpoinst_list: List, sdps: List, connection_group: Dict) -> List: - src_sdp_id = connection_group["connectivity-construct"][0]["p2p-sender-sdp"] - sdp_id_name_mapping = {sdp["id"]: sdp["node-id"] for sdp in sdps} - if endpoinst_list[0].device_id.device_uuid.uuid == sdp_id_name_mapping[src_sdp_id]: +def sort_endpoints( + endpoinst_list: List[EndPointId], + sdps: List, + connection_group: Dict, + context_client: ContextClient, +) -> List[EndPointId]: + first_ep = endpoinst_list[0] + first_controller_type = get_endpoint_controller_type(first_ep, context_client) + last_ep = endpoinst_list[-1] + last_controller_type = get_endpoint_controller_type(last_ep, context_client) + if first_controller_type == DeviceTypeEnum.NCE.value: return endpoinst_list - return endpoinst_list[::-1] + elif last_controller_type == DeviceTypeEnum.NCE.value: + return endpoinst_list[::-1] + else: + src_sdp_id = connection_group["connectivity-construct"][0]["p2p-sender-sdp"] + sdp_id_name_mapping = {sdp["id"]: sdp["node-id"] for sdp in sdps} + if ( + endpoinst_list[0].device_id.device_uuid.uuid + == sdp_id_name_mapping[src_sdp_id] + ): + return endpoinst_list + return endpoinst_list[::-1] def replace_ont_endpoint_with_emu_dc( @@ -191,7 +224,7 @@ class IETFSliceHandler: break else: raise Exception("connection group not found") - list_endpoints = sort_endpoints(list_endpoints, sdps, cg) + list_endpoints = sort_endpoints(list_endpoints, sdps, cg, context_client) list_endpoints = replace_ont_endpoint_with_emu_dc( list_endpoints, context_client ) @@ -327,16 +360,14 @@ class IETFSliceHandler: slice_services = candidate_ietf_data["network-slice-services"]["slice-service"] slice_service = slice_services[0] slice_connection_groups = slice_service["connection-groups"]["connection-group"] - connection_group_id = updated_connection_group["connection-group"][0]["id"] + connection_group_id = updated_connection_group["id"] cg_idx = list( ( slice_cg["id"] == connection_group_id for slice_cg in slice_connection_groups ) ).index(True) - slice_connection_groups[cg_idx] = updated_connection_group["connection-group"][ - 0 - ] + slice_connection_groups[cg_idx] = updated_connection_group fields = { name: (value, RAISE_IF_DIFFERS) for name, value in candidate_ietf_data.items() @@ -462,12 +493,6 @@ class IETFSliceHandler: else: raise Exception("connection group not found") del slice_request.slice_constraints[:] - # del slice_request.slice_endpoint_ids[:] - # list_endpoints = sort_endpoints(list_endpoints, sdps, cg) - # list_endpoints = replace_ont_endpoint_with_emu_dc( - # list_endpoints, context_client - # ) - # slice_request.slice_endpoint_ids.extend(list_endpoints) slice_request.slice_constraints.extend(list_constraints) fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} update_config_rule_custom( -- GitLab From eefc016a45b46b1770cb469c2224f1a2a5ceb402 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 4 Jan 2025 16:17:14 +0100 Subject: [PATCH 149/463] debug: match criteria extraction in slice creation fixed --- .../service_handlers/l3nm_nce/L3NMNCEServiceHandler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py b/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py index 3e9380bae..cbf92ac80 100644 --- a/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py @@ -171,7 +171,6 @@ class L3NMNCEServiceHandler(_ServiceHandler): endpoints: List[Tuple[str, str, Optional[str]]], connection_uuid: Optional[str] = None, ) -> List[Union[bool, Exception]]: - LOGGER.debug(f"P3: {len(endpoints)} {endpoints}") chk_type("endpoints", endpoints, list) if len(endpoints) == 0: return [] @@ -207,7 +206,6 @@ class L3NMNCEServiceHandler(_ServiceHandler): service_name = running_resource_value_dict["network-slice-services"][ "slice-service" ][0]["id"] - LOGGER.debug(f"P1: {service_name}") if not running_candidate_diff: # Slice Creation operation_type = "create" slice_services = candidate_resource_value_dict[ @@ -328,7 +326,9 @@ class L3NMNCEServiceHandler(_ServiceHandler): raise Exception( "connection group missmatch in destination sdp and added connection group" ) - match_criteria = removed_sdp["service-match-criteria"]["match-criterion"] + match_criteria = removed_sdp["service-match-criteria"][ + "match-criterion" + ] match_criterion = match_criteria[0] for type_value in match_criterion["match-type"]: if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": @@ -414,7 +414,7 @@ class L3NMNCEServiceHandler(_ServiceHandler): self.__task_executor.configure_device(controller) LOGGER.debug('Configured device "{:s}"'.format(controller.name)) except Exception as e: # pylint: disable=broad-except - LOGGER.exception(f'P4: {e}') + LOGGER.exception(f"P4: {e}") raise e results.append(e) return results -- GitLab From 85f5ddeb7664e2f17ee886b68635c788eacf6333 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 4 Jan 2025 21:07:08 +0100 Subject: [PATCH 150/463] device_drivers of nce changed to enum 15 --- src/nbi/tests/data/camara-e2e-topology.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/nbi/tests/data/camara-e2e-topology.json b/src/nbi/tests/data/camara-e2e-topology.json index b8fcf338a..9cddb88d5 100644 --- a/src/nbi/tests/data/camara-e2e-topology.json +++ b/src/nbi/tests/data/camara-e2e-topology.json @@ -428,7 +428,6 @@ }, "device_operational_status": 1, "device_drivers": [ - 0, 15 ], "device_config": { @@ -501,7 +500,6 @@ }, "device_operational_status": 1, "device_drivers": [ - 0, 15 ], "device_config": { @@ -567,7 +565,6 @@ }, "device_operational_status": 1, "device_drivers": [ - 0, 15 ], "device_config": { -- GitLab From c917350aa3be969182842b8a925a5493747a894d Mon Sep 17 00:00:00 2001 From: hajipour Date: Sun, 5 Jan 2025 20:51:32 +0100 Subject: [PATCH 151/463] debug: - teardown_config_rules added to the L3NM L3VPN's service handler - several bugs resolved --- .../l3nm_ietfl3vpn/ConfigRules.py | 15 ++-- .../L3NM_IETFL3VPN_ServiceHandler.py | 85 ++++++++++++++++--- 2 files changed, 79 insertions(+), 21 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py index 72f0dfd31..7649f166e 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py @@ -50,15 +50,14 @@ def setup_config_rules( src_pe_address: str = json_settings["src_pe_address"] src_ce_pe_network_prefix: int = json_settings["src_ce_pe_network_prefix"] src_mtu: int = json_settings["src_mtu"] - src_input_bw: int = json_settings.get("src_input_bw", 1000000000) - src_output_bw: int = json_settings.get("src_input_bw", 1000000000) + src_input_bw: int = json_settings["src_input_bw"] + src_output_bw: int = json_settings["src_input_bw"] src_qos_profile_id = "qos-realtime" src_qos_profile_direction = "ietf-l3vpn-svc:both" - src_qos_profile_latency: int = json_settings.get("src_qos_profile_latency", 10) + src_qos_profile_latency: int = json_settings["src_qos_profile_latency"] src_qos_profile_bw_guarantee: int = json_settings.get( "src_qos_profile_bw_guarantee", 100 ) - dst_device_uuid = json_settings["dst_device_name"] dst_endpoint_uuid = json_settings["dst_endpoint_name"] dst_site_location: str = json_settings["dst_site_location"] @@ -76,11 +75,11 @@ def setup_config_rules( dst_pe_address: str = json_settings["dst_pe_address"] dst_ce_pe_network_prefix: int = json_settings["dst_ce_pe_network_prefix"] dst_mtu: int = json_settings["dst_mtu"] - dst_input_bw: int = json_settings.get("dst_input_bw", 1000000000) - dst_output_bw: int = json_settings.get("dst_output_bw", 1000000000) + dst_input_bw: int = json_settings["dst_input_bw"] + dst_output_bw: int = json_settings["dst_output_bw"] dst_qos_profile_id = "qos-realtime" dst_qos_profile_direction = "ietf-l3vpn-svc:both" - dst_qos_profile_latency: int = json_settings.get("dst_qos_profile_latency", 10) + dst_qos_profile_latency: int = json_settings["dst_qos_profile_latency"] dst_qos_profile_bw_guarantee: int = json_settings.get( "dst_qos_profile_bw_guarantee", 100 ) @@ -257,7 +256,7 @@ def setup_config_rules( return json_config_rules -def teardown_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: +def teardown_config_rules(service_uuid: str) -> List[Dict]: json_config_rules = [ json_config_rule_delete( "/service[{:s}]/IETFL3VPN".format(service_uuid), diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py index 2d9f369fa..64423129d 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py @@ -27,7 +27,6 @@ from common.proto.context_pb2 import ( Service, ServiceConfig, ) -from common.tools.object_factory.ConfigRule import json_config_rule_delete from common.tools.object_factory.Device import json_device_id from common.type_checkers.Checkers import chk_type from service.service.service_handler_api._ServiceHandler import _ServiceHandler @@ -38,7 +37,7 @@ from service.service.service_handler_api.Tools import ( ) from service.service.task_scheduler.TaskExecutor import TaskExecutor -from .ConfigRules import setup_config_rules +from .ConfigRules import setup_config_rules, teardown_config_rules RUNNING_RESOURCE_KEY = "running_ietf_slice" CANDIDATE_RESOURCE_KEY = "candidate_ietf_slice" @@ -62,6 +61,56 @@ class Ipv4Info(TypedDict): vlan: str +class QoSInfo(TypedDict): + src_qos_profile_latency: int + src_input_bw: int + src_output_bw: int + dst_qos_profile_latency: int + dst_input_bw: int + dst_output_bw: int + + +def extract_qos_info_from_connection_group( + src_sdp_id: str, dst_sdp_id: str, connectivity_constructs: dict +) -> QoSInfo: + def extract_qos_info(cc: dict) -> Tuple[int, int]: + for metric_bound in cc["service-slo-sle-policy"]["slo-policy"]["metric-bound"]: + if ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-delay-maximum" + and metric_bound["metric-unit"] == "milliseconds" + ): + max_delay = int(metric_bound["bound"]) + elif ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-bandwidth" + and metric_bound["metric-unit"] == "Mbps" + ): + bandwidth = int(metric_bound["bound"]) * 1e6 + return max_delay, bandwidth + + src_cc = next( + cc + for cc in connectivity_constructs + if cc["p2p-sender-sdp"] == src_sdp_id and cc["p2p-receiver-sdp"] == dst_sdp_id + ) + dst_cc = next( + cc + for cc in connectivity_constructs + if cc["p2p-sender-sdp"] == dst_sdp_id and cc["p2p-receiver-sdp"] == src_sdp_id + ) + src_max_delay, src_bandwidth = extract_qos_info(src_cc) + dst_max_delay, dst_bandwidth = extract_qos_info(dst_cc) + return QoSInfo( + src_qos_profile_latency=src_max_delay, + src_input_bw=dst_bandwidth, + src_output_bw=src_bandwidth, + dst_qos_profile_latency=dst_max_delay, + dst_input_bw=src_bandwidth, + dst_output_bw=dst_bandwidth, + ) + + def get_custom_config_rule( service_config: ServiceConfig, resource_key: str ) -> Optional[ConfigRule]: @@ -226,7 +275,9 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): running_candidate_diff = get_running_candidate_ietf_slice_data_diff( service_config ) - service_id = candidate_resource_value_dict["network-slice-services"]["slice-service"][0]["id"] + service_id = candidate_resource_value_dict["network-slice-services"][ + "slice-service" + ][0]["id"] if not running_candidate_diff: operation_type = "create" elif "values_changed" in running_candidate_diff: @@ -243,6 +294,9 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): connecitivity_construct = connecitivity_constructs[0] src_sdp_idx = connecitivity_construct["p2p-sender-sdp"] dst_sdp_idx = connecitivity_construct["p2p-receiver-sdp"] + qos_info = extract_qos_info_from_connection_group( + src_sdp_idx, dst_sdp_idx, connecitivity_constructs + ) src_sdp = next(sdp for sdp in sdps if sdp["id"] == src_sdp_idx) dst_sdp = next(sdp for sdp in sdps if sdp["id"] == dst_sdp_idx) src_match_criterion = src_sdp["service-match-criteria"]["match-criterion"][ @@ -285,6 +339,9 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): "src_pe_address": src_pe_address, "src_ce_pe_network_prefix": src_ce_address_prefix, "src_mtu": MTU, + "src_qos_profile_latency": qos_info["src_qos_profile_latency"], + "src_input_bw": qos_info["src_input_bw"], + "src_output_bw": qos_info["src_output_bw"], "dst_device_name": dst_device_name, "dst_endpoint_name": dst_endpoint_obj.name, "dst_site_location": dst_endpoint_settings["site_location"], @@ -293,8 +350,13 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): "dst_pe_address": dst_pe_address, "dst_ce_pe_network_prefix": dst_ce_address_prefix, "dst_mtu": MTU, + "dst_qos_profile_latency": qos_info["dst_qos_profile_latency"], + "dst_input_bw": qos_info["dst_input_bw"], + "dst_output_bw": qos_info["dst_output_bw"], } - json_config_rules = setup_config_rules(service_id, resource_value_dict, operation_type) + json_config_rules = setup_config_rules( + service_id, resource_value_dict, operation_type + ) del controller.device_config.config_rules[:] for jcr in json_config_rules: controller.device_config.config_rules.append(ConfigRule(**jcr)) @@ -316,17 +378,16 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): chk_type("endpoints", endpoints, list) if len(endpoints) < 2: return [] - service_config = self.__service.service_config - ietf_slice_candidate_cr = get_custom_config_rule( service_config, CANDIDATE_RESOURCE_KEY ) candidate_resource_value_dict = json.loads( ietf_slice_candidate_cr.custom.resource_value ) - service_id = candidate_resource_value_dict["network-slice-services"]["slice-service"][0]["id"] - + service_id = candidate_resource_value_dict["network-slice-services"][ + "slice-service" + ][0]["id"] results = [] try: src_device_uuid, _ = get_device_endpoint_uuids(endpoints[0]) @@ -346,12 +407,10 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): ): 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_id), {"uuid": service_id} - ) + json_config_rules = teardown_config_rules(service_id) del controller.device_config.config_rules[:] - controller.device_config.config_rules.append(ConfigRule(**json_config_rule)) + for jcr in json_config_rules: + controller.device_config.config_rules.append(ConfigRule(**jcr)) self.__task_executor.configure_device(controller) results.append(True) except Exception as e: # pylint: disable=broad-except -- GitLab From ad57480a959016eb93ed2a929bb3bc14bf5334b5 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sun, 5 Jan 2025 21:00:56 +0100 Subject: [PATCH 152/463] debug: connection group extraction bug resolved --- .../L3SliceIETFSliceServiceHandler.py | 141 ++++++++++++------ 1 file changed, 99 insertions(+), 42 deletions(-) diff --git a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py index 6a63201bb..258ea27f0 100644 --- a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py +++ b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py @@ -77,6 +77,77 @@ METRICS_POOL = MetricsPool( RAISE_IF_DIFFERS = True +def get_removed_items( + candidate_ietf_slice_dict: dict, running_ietf_slice_dict: dict +) -> dict: + removed_items = { + "sdp": {"sdp_idx": None, "value": {}}, + "connection_group": {"connection_group_idx": None, "value": {}}, + "match_criterion": { + "sdp_idx": None, + "match_criterion_idx": None, + "value": {}, + }, + } + running_slice_services = running_ietf_slice_dict["network-slice-services"][ + "slice-service" + ][0] + running_slice_sdps = [sdp["id"] for sdp in running_slice_services["sdps"]["sdp"]] + candidate_slice_services = candidate_ietf_slice_dict["network-slice-services"][ + "slice-service" + ][0] + candidiate_slice_sdps = [ + sdp["id"] for sdp in candidate_slice_services["sdps"]["sdp"] + ] + removed_sdps = set(running_slice_sdps) - set(candidiate_slice_sdps) + if len(removed_sdps) > 1: + raise Exception("Multiple SDPs removed") + removed_sdp_id = list(removed_sdps)[0] + removed_items["sdp"]["sdp_idx"] = running_slice_sdps.index(removed_sdp_id) + removed_items["sdp"]["value"] = next( + sdp + for sdp in running_slice_services["sdps"]["sdp"] + if sdp["id"] == removed_sdp_id + ) + + match_criteria = removed_items["sdp"]["value"]["service-match-criteria"][ + "match-criterion" + ] + if len(match_criteria) > 1: + raise Exception("Multiple match criteria found") + match_criterion = match_criteria[0] + connection_grp_id = match_criterion["target-connection-group-id"] + connection_groups = running_slice_services["connection-groups"]["connection-group"] + connection_group = next( + (idx, cg) + for idx, cg in enumerate(connection_groups) + if cg["id"] == connection_grp_id + ) + removed_items["connection_group"]["connection_group_idx"] = connection_group[0] + removed_items["connection_group"]["value"] = connection_group[1] + for sdp in running_slice_services["sdps"]["sdp"]: + if sdp["id"] == removed_sdp_id: + continue + for mc in sdp["service-match-criteria"]["match-criterion"]: + if mc["target-connection-group-id"] == connection_grp_id: + removed_items["match_criterion"]["sdp_idx"] = running_slice_sdps.index( + sdp["id"] + ) + removed_items["match_criterion"]["match_criterion_idx"] = sdp[ + "service-match-criteria" + ]["match-criterion"].index(mc) + removed_items["match_criterion"]["value"] = mc + break + + if ( + removed_items["match_criterion"]["sdp_idx"] is None + or removed_items["sdp"]["sdp_idx"] is None + or removed_items["connection_group"]["connection_group_idx"] is None + ): + raise Exception("sdp, connection group or match criterion not found") + return removed_items + + def extract_source_destination_device_endpoint_info( device_ep_pairs: list, connection_group: Dict ) -> Tuple[DeviceEpInfo, DeviceEpInfo]: @@ -224,8 +295,11 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): slice_services = candidate_resource_value_dict[ "network-slice-services" ]["slice-service"] - slice_service = slice_services[0] - sdps = slice_service["sdps"]["sdp"] + candidate_slice_service = slice_services[0] + full_connection_groups = candidate_slice_service["connection-groups"][ + "connection-group" + ] + sdps = candidate_slice_service["sdps"]["sdp"] operation_type = "create" sdp_ids = [sdp["node-id"] for sdp in sdps] for sdp in sdps: @@ -316,8 +390,11 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): slice_services = candidate_resource_value_dict[ "network-slice-services" ]["slice-service"] - slice_service = slice_services[0] - sdps = slice_service["sdps"]["sdp"] + candidate_slice_service = slice_services[0] + full_connection_groups = candidate_slice_service["connection-groups"][ + "connection-group" + ] + sdps = candidate_slice_service["sdps"]["sdp"] operation_type = "update" added_items = { "sdp": {"sdp_idx": None, "value": {}}, @@ -457,44 +534,19 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): slice_services = running_resource_value_dict["network-slice-services"][ "slice-service" ] + candidate_slice_services = candidate_resource_value_dict[ + "network-slice-services" + ]["slice-service"] + candidate_slice_service = candidate_slice_services[0] slice_service = slice_services[0] + full_connection_groups = slice_service["connection-groups"][ + "connection-group" + ] sdps = slice_service["sdps"]["sdp"] operation_type = "update" - removed_items = { - "sdp": {"sdp_idx": None, "value": {}}, - "connection_group": {"connection_group_idx": None, "value": {}}, - "match_criterion": { - "sdp_idx": None, - "match_criterion_idx": None, - "value": {}, - }, - } - for added_key, added_value in running_candidate_diff[ - "iterable_item_removed" - ].items(): - sdp_match = SDP_DIFF_RE.match(added_key) - connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) - match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) - if sdp_match: - removed_items["sdp"] = { - "sdp_idx": int(sdp_match.groups()[0]), - "value": added_value, - } - elif connection_group_match: - removed_items["connection_group"] = { - "connection_group_idx": int( - connection_group_match.groups()[0] - ), - "value": added_value, - } - elif match_criterion_match: - removed_items["match_criterion"] = { - "sdp_idx": int(match_criterion_match.groups()[0]), - "match_criterion_idx": int( - match_criterion_match.groups()[1] - ), - "value": added_value, - } + removed_items = get_removed_items( + candidate_resource_value_dict, running_resource_value_dict + ) new_sdp = sdps[removed_items["sdp"]["sdp_idx"]] src_sdp_name = new_sdp["node-id"] dst_sdp_idx = sdps[removed_items["match_criterion"]["sdp_idx"]]["id"] @@ -594,8 +646,11 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): break else: raise Exception("sdp between the domains not found") - connection_groups = slice_service["connection-groups"]["connection-group"] - for cg in connection_groups: + candidate_connection_groups = candidate_slice_service["connection-groups"][ + "connection-group" + ] + LOGGER.debug(f"connection_groups: {candidate_connection_groups}") + for cg in candidate_connection_groups: for cc in cg["connectivity-construct"]: for metric_bound in cc["service-slo-sle-policy"]["slo-policy"][ "metric-bound" @@ -633,7 +688,9 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): ): operation_type = "delete" target_connection_group = next( - cg for cg in connection_groups if cg["id"] == target_connection_group_id + cg + for cg in full_connection_groups + if cg["id"] == target_connection_group_id ) source_device_ep_info, destination_device_ep_info = ( extract_source_destination_device_endpoint_info( -- GitLab From 77d1e68dc453a7d2de9f55ff8fdb4e9e0cf93263 Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 6 Jan 2025 12:59:09 +0100 Subject: [PATCH 153/463] camara-e2e-topology.json refactored for the demo --- src/nbi/tests/data/camara-e2e-topology.json | 3139 +++++++++---------- 1 file changed, 1561 insertions(+), 1578 deletions(-) diff --git a/src/nbi/tests/data/camara-e2e-topology.json b/src/nbi/tests/data/camara-e2e-topology.json index 9cddb88d5..0b314e104 100644 --- a/src/nbi/tests/data/camara-e2e-topology.json +++ b/src/nbi/tests/data/camara-e2e-topology.json @@ -1,1659 +1,1642 @@ { - "contexts": [ - { - "context_id": { - "context_uuid": { - "uuid": "admin" - } + "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": "agg-net-controller" + } + }, + "name": "agg-net-controller", + "device_type": "ietf-slice", + "device_operational_status": 1, + "device_drivers": [ + 14 + ], + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "10.0.58.9" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "80" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + } + ], + "scheme": "http", + "username": "admin", + "password": "admin", + "base_url": "/restconf/v2/data", + "timeout": 120, + "verify": false + } } + } + ] + }, + "device_endpoints": [] + }, + { + "device_id": { + "device_uuid": { + "uuid": "nce-controller" } - ], - "topologies": [ - { - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "devices": [ - { - "device_id": { - "device_uuid": { - "uuid": "agg-net-controller" - } - }, - "name": "agg-net-controller", - "device_type": "ietf-slice", - "device_operational_status": 1, - "device_drivers": [ - 14 - ], - "device_config": { - "config_rules": [ - { - "action": 1, - "custom": { - "resource_key": "_connect/address", - "resource_value": "10.1.6.201" - } - }, - { - "action": 1, - "custom": { - "resource_key": "_connect/port", - "resource_value": "9091" - } - }, - { - "action": 1, - "custom": { - "resource_key": "_connect/settings", - "resource_value": { - "endpoints": [ - { - "uuid": "mgmt", - "name": "mgmt", - "type": "mgmt" - } - ], - "scheme": "http", - "username": "admin", - "password": "admin", - "base_url": "/restconf/v2/data", - "timeout": 120, - "verify": false - } - } - } + }, + "name": "nce-controller", + "device_type": "nce", + "device_operational_status": 1, + "device_drivers": [ + 15 + ], + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "10.10.10.10" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "80" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + } + ], + "scheme": "http", + "username": "admin", + "password": "admin", + "base_url": "/restconf/v2/data", + "timeout": 120, + "verify": false + } + } + } + ] + }, + "device_endpoints": [] + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "name": "172.16.182.25", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 14 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "address_ip": "128.32.33.254", + "address_prefix": "24", + "site_location": "access", + "mtu": "1500" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } ] - }, - "device_endpoints": [] - }, - { - "device_id": { - "device_uuid": { - "uuid": "nce-controller" - } - }, - "name": "nce-controller", - "device_type": "nce", - "device_operational_status": 1, - "device_drivers": [ - 15 - ], - "device_config": { - "config_rules": [ - { - "action": 1, - "custom": { - "resource_key": "_connect/address", - "resource_value": "10.1.7.194" - } - }, - { - "action": 1, - "custom": { - "resource_key": "_connect/port", - "resource_value": "80" - } - }, - { - "action": 1, - "custom": { - "resource_key": "_connect/settings", - "resource_value": { - "endpoints": [ - { - "uuid": "mgmt", - "name": "mgmt", - "type": "mgmt" - } - ], - "scheme": "http", - "username": "admin", - "password": "admin", - "base_url": "/restconf/v2/data", - "timeout": 120, - "verify": false - } - } - } + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "name": "172.16.185.31", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 14 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } ] - }, - "device_endpoints": [] - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.182.25" - } - }, - "name": "172.16.182.25", - "device_type": "emu-packet-router", - "controller_id": { - "device_uuid": { - "uuid": "agg-net-controller" - } - }, - "device_operational_status": 1, - "device_drivers": [ - 0, - 14 - ], - "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": [ - { - "uuid": "mgmt", - "name": "mgmt", - "type": "mgmt" - }, - { - "uuid": "200", - "name": "200", - "type": "optical", - "ce-ip": "128.32.33.2", - "address_ip": "128.32.33.254", - "address_prefix": "24", - "site_location": "access", - "mtu": "1500", - "ipv4_lan_prefixes": [ - { - "lan": "128.32.10.0/24", - "lan_tag": "10" - }, - { - "lan": "128.32.20.0/24", - "lan_tag": "20" - } - ] - }, - { - "uuid": "500", - "name": "500", - "type": "optical" - }, - { - "uuid": "501", - "name": "501", - "type": "optical" - } - ] - } - } - } + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "name": "172.16.185.33", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 14 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } ] + } } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.31" - } - }, - "name": "172.16.185.31", - "device_type": "emu-packet-router", - "controller_id": { - "device_uuid": { - "uuid": "agg-net-controller" - } - }, - "device_operational_status": 1, - "device_drivers": [ - 0, - 14 - ], - "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": [ - { - "uuid": "mgmt", - "name": "mgmt", - "type": "mgmt" - }, - { - "uuid": "500", - "name": "500", - "type": "optical" - }, - { - "uuid": "501", - "name": "501", - "type": "optical" - } - ] - } - } - } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "name": "172.16.185.32", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 14 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "ce-ip": "172.10.33.2", + "address_ip": "172.10.33.254", + "address_prefix": "24", + "site_location": "cloud", + "mtu": "1500" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } ] + } } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.33" - } - }, - "name": "172.16.185.33", - "device_type": "emu-packet-router", - "controller_id": { - "device_uuid": { - "uuid": "agg-net-controller" - } - }, - "device_operational_status": 1, - "device_drivers": [ - 0, - 14 - ], - "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": [ - { - "uuid": "mgmt", - "name": "mgmt", - "type": "mgmt" - }, - { - "uuid": "500", - "name": "500", - "type": "optical" - }, - { - "uuid": "501", - "name": "501", - "type": "optical" - } - ] - } - } - } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "name": "172.16.58.10", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 15 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "address_ip": "0.0.0.0", + "address_prefix": "24" + }, + { + "uuid": "201", + "name": "201", + "type": "optical", + "address_ip": "0.0.0.0", + "address_prefix": "24" + }, + { + "uuid": "500", + "name": "500", + "type": "optical", + "address_ip": "128.32.33.2", + "address_prefix": "24" + } ] + } } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.32" - } - }, - "name": "172.16.185.32", - "device_type": "emu-packet-router", - "controller_id": { - "device_uuid": { - "uuid": "agg-net-controller" - } - }, - "device_operational_status": 1, - "device_drivers": [ - 0, - 14 - ], - "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": [ - { - "uuid": "mgmt", - "name": "mgmt", - "type": "mgmt" - }, - { - "uuid": "200", - "name": "200", - "type": "optical", - "ce-ip": "172.10.33.2", - "address_ip": "172.10.33.254", - "address_prefix": "24", - "site_location": "cloud", - "mtu": "1500", - "ipv4_lan_prefixes": [ - { - "lan": "172.1.101.0/24", - "lan_tag": "101" - } - ] - }, - { - "uuid": "500", - "name": "500", - "type": "optical" - }, - { - "uuid": "501", - "name": "501", - "type": "optical" - } - ] - } - } - } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "name": "172.16.61.10", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 15 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "address_ip": "0.0.0.0", + "address_prefix": "24" + }, + { + "uuid": "500", + "name": "500", + "type": "optical", + "address_ip": "128.32.33.2", + "address_prefix": "24" + } ] + } } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.58.10" - } - }, - "name": "172.16.58.10", - "device_type": "emu-packet-router", - "controller_id": { - "device_uuid": { - "uuid": "nce-controller" - } - }, - "device_operational_status": 1, - "device_drivers": [ - 15 - ], - "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": [ - { - "uuid": "mgmt", - "name": "mgmt", - "type": "mgmt" - }, - { - "uuid": "200", - "name": "200", - "type": "optical", - "address_ip": "0.0.0.0", - "address_prefix": "24" - }, - { - "uuid": "201", - "name": "201", - "type": "optical", - "address_ip": "0.0.0.0", - "address_prefix": "24" - }, - { - "uuid": "500", - "name": "500", - "type": "optical", - "address_ip": "128.32.33.2", - "address_prefix": "24" - } - ] - } - } - } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "name": "172.16.61.11", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 15 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "address_ip": "0.0.0.0", + "address_prefix": "24" + }, + { + "uuid": "500", + "name": "500", + "type": "optical", + "address_ip": "128.32.33.2", + "address_prefix": "24" + } ] + } } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.61.10" - } - }, - "name": "172.16.61.10", - "device_type": "emu-packet-router", - "controller_id": { - "device_uuid": { - "uuid": "nce-controller" - } - }, - "device_operational_status": 1, - "device_drivers": [ - 15 - ], - "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": [ - { - "uuid": "mgmt", - "name": "mgmt", - "type": "mgmt" - }, - { - "uuid": "200", - "name": "200", - "type": "optical", - "address_ip": "0.0.0.0", - "address_prefix": "24" - }, - { - "uuid": "500", - "name": "500", - "type": "optical", - "address_ip": "128.32.33.2", - "address_prefix": "24" - } - ] - } - } - } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.221" + } + }, + "device_type": "emu-datacenter", + "device_drivers": [ + 0 + ], + "device_endpoints": [], + "device_operational_status": 1, + "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", + "uuid": "eth0" + } ] + } } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.61.11" - } - }, - "name": "172.16.61.11", - "device_type": "emu-packet-router", - "controller_id": { - "device_uuid": { - "uuid": "nce-controller" - } - }, - "device_operational_status": 1, - "device_drivers": [ - 15 - ], - "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": [ - { - "uuid": "mgmt", - "name": "mgmt", - "type": "mgmt" - }, - { - "uuid": "200", - "name": "200", - "type": "optical", - "address_ip": "0.0.0.0", - "address_prefix": "24" - }, - { - "uuid": "500", - "name": "500", - "type": "optical", - "address_ip": "128.32.33.2", - "address_prefix": "24" - } - ] - } - } - } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.222" + } + }, + "device_type": "emu-datacenter", + "device_drivers": [ + 0 + ], + "device_endpoints": [], + "device_operational_status": 1, + "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", + "uuid": "eth0" + } ] + } } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.104.221" - } - }, - "device_type": "emu-datacenter", - "device_drivers": [ - 0 - ], - "device_endpoints": [], - "device_operational_status": 1, - "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", - "uuid": "eth0" - } - ] - } - } - } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "device_type": "emu-datacenter", + "device_drivers": [ + 0 + ], + "device_endpoints": [], + "device_operational_status": 1, + "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", + "uuid": "500" + }, + { + "sample_types": [], + "type": "optical", + "uuid": "200" + }, + { + "sample_types": [], + "type": "optical", + "uuid": "201" + } ] + } } - }, + } + ] + } + } + ], + "links": [ + { + "link_id": { + "link_uuid": { + "uuid": "nce-controller/mgmt==172.16.61.11/mgmt" + } + }, + "name": "nce-controller/mgmt==172.16.61.11/mgmt", + "link_endpoint_ids": [ { - "device_id": { - "device_uuid": { - "uuid": "172.16.104.222" - } - }, - "device_type": "emu-datacenter", - "device_drivers": [ - 0 - ], - "device_endpoints": [], - "device_operational_status": 1, - "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", - "uuid": "eth0" - } - ] - } - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "nce-controller" } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } }, { - "device_id": { - "device_uuid": { - "uuid": "172.16.204.220" - } - }, - "device_type": "emu-datacenter", - "device_drivers": [ - 0 - ], - "device_endpoints": [], - "device_operational_status": 1, - "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", - "uuid": "500" - }, - { - "sample_types": [], - "type": "optical", - "uuid": "200" - }, - { - "sample_types": [], - "type": "optical", - "uuid": "201" - } - ] - } - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } } - ], - "links": [ + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "nce-controller/mgmt==172.16.61.10/mgmt" + } + }, + "name": "nce-controller/mgmt==172.16.61.10/mgmt", + "link_endpoint_ids": [ { - "link_id": { - "link_uuid": { - "uuid": "nce-controller/mgmt==172.16.61.11/mgmt" - } - }, - "name": "nce-controller/mgmt==172.16.61.11/mgmt", - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "nce-controller" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.61.11" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } }, { - "link_id": { - "link_uuid": { - "uuid": "nce-controller/mgmt==172.16.61.10/mgmt" - } - }, - "name": "nce-controller/mgmt==172.16.61.10/mgmt", - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "nce-controller" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.61.10" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "nce-controller/mgmt==172.16.58.10/mgmt" + } + }, + "name": "nce-controller/mgmt==172.16.58.10/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } }, { - "link_id": { - "link_uuid": { - "uuid": "nce-controller/mgmt==172.16.58.10/mgmt" - } - }, - "name": "nce-controller/mgmt==172.16.58.10/mgmt", - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "nce-controller" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.58.10" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==172.16.185.33/mgmt" + } + }, + "name": "agg-net-controller/mgmt==172.16.185.33/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } }, { - "link_id": { - "link_uuid": { - "uuid": "agg-net-controller/mgmt==172.16.185.33/mgmt" - } - }, - "name": "agg-net-controller/mgmt==172.16.185.33/mgmt", - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "agg-net-controller" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.33" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==172.16.185.31/mgmt" + } + }, + "name": "agg-net-controller/mgmt==172.16.185.31/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } }, { - "link_id": { - "link_uuid": { - "uuid": "agg-net-controller/mgmt==172.16.185.31/mgmt" - } - }, - "name": "agg-net-controller/mgmt==172.16.185.31/mgmt", - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "agg-net-controller" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.31" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==172.16.182.25/mgmt" + } + }, + "name": "agg-net-controller/mgmt==172.16.182.25/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } }, { - "link_id": { - "link_uuid": { - "uuid": "agg-net-controller/mgmt==172.16.182.25/mgmt" - } - }, - "name": "agg-net-controller/mgmt==172.16.182.25/mgmt", - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "agg-net-controller" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.182.25" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==172.16.182.25/mgmt" + } + }, + "name": "agg-net-controller/mgmt==172.16.182.25/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } }, { - "link_id": { - "link_uuid": { - "uuid": "agg-net-controller/mgmt==172.16.182.25/mgmt" - } - }, - "name": "agg-net-controller/mgmt==172.16.182.25/mgmt", - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "agg-net-controller" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.182.25" - } - }, - "endpoint_uuid": { - "uuid": "mgmt" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-500" + } + }, + "name": "172.16.182.25-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "500" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.182.25-500" - } - }, - "name": "172.16.182.25-500", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.182.25" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.33" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.33-500" + } + }, + "name": "172.16.185.33-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "500" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.185.33-500" - } - }, - "name": "172.16.185.33-500", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.33" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.182.25" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-501" + } + }, + "name": "172.16.182.25-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "501" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.182.25-501" - } - }, - "name": "172.16.182.25-501", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.182.25" - } - }, - "endpoint_uuid": { - "uuid": "501" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.31" - } - }, - "endpoint_uuid": { - "uuid": "501" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.31-501" + } + }, + "name": "172.16.185.31-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "501" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.185.31-501" - } - }, - "name": "172.16.185.31-501", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.31" - } - }, - "endpoint_uuid": { - "uuid": "501" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.182.25" - } - }, - "endpoint_uuid": { - "uuid": "501" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.31-500" + } + }, + "name": "172.16.185.31-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "500" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.185.31-500" - } - }, - "name": "172.16.185.31-500", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.31" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.32" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-500" + } + }, + "name": "172.16.185.32-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "500" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.185.32-500" - } - }, - "name": "172.16.185.32-500", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.32" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.31" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.33-501" + } + }, + "name": "172.16.185.33-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "501" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.185.33-501" - } - }, - "name": "172.16.185.33-501", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.33" - } - }, - "endpoint_uuid": { - "uuid": "501" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.32" - } - }, - "endpoint_uuid": { - "uuid": "501" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-501" + } + }, + "name": "172.16.185.32-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "501" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.185.32-501" - } - }, - "name": "172.16.185.32-501", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.32" - } - }, - "endpoint_uuid": { - "uuid": "501" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.33" - } - }, - "endpoint_uuid": { - "uuid": "501" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-200" + } + }, + "name": "172.16.185.32-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "200" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.185.32-200" - } - }, - "name": "172.16.185.32-200", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.32" - } - }, - "endpoint_uuid": { - "uuid": "200" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.204.220" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.204.220-500" + } + }, + "name": "172.16.204.220-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "endpoint_uuid": { + "uuid": "500" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.204.220-500" - } - }, - "name": "172.16.204.220-500", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.204.220" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.185.32" - } - }, - "endpoint_uuid": { - "uuid": "200" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-200" + } + }, + "name": "172.16.182.25-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "200" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.182.25-200" - } - }, - "name": "172.16.182.25-200", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.182.25" - } - }, - "endpoint_uuid": { - "uuid": "200" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.58.10" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.58.10-500" + } + }, + "name": "172.16.58.10-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "500" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.58.10-500" - } - }, - "name": "172.16.58.10-500", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.58.10" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.182.25" - } - }, - "endpoint_uuid": { - "uuid": "200" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.58.10-200" + } + }, + "name": "172.16.58.10-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "200" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.58.10-200" - } - }, - "name": "172.16.58.10-200", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.58.10" - } - }, - "endpoint_uuid": { - "uuid": "200" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.61.10" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.61.10-500" + } + }, + "name": "172.16.61.10-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "500" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.61.10-500" - } - }, - "name": "172.16.61.10-500", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.61.10" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.58.10" - } - }, - "endpoint_uuid": { - "uuid": "200" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.58.10-201" + } + }, + "name": "172.16.58.10-201", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "201" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.58.10-201" - } - }, - "name": "172.16.58.10-201", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.58.10" - } - }, - "endpoint_uuid": { - "uuid": "201" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.61.11" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.61.11-500" + } + }, + "name": "172.16.61.11-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "500" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.61.11-500" - } - }, - "name": "172.16.61.11-500", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.61.11" - } - }, - "endpoint_uuid": { - "uuid": "500" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.58.10" - } - }, - "endpoint_uuid": { - "uuid": "201" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "201" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.61.10-200" + } + }, + "name": "172.16.61.10-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "200" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.61.10-200" - } - }, - "name": "172.16.61.10-200", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.61.10" - } - }, - "endpoint_uuid": { - "uuid": "200" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.104.221" - } - }, - "endpoint_uuid": { - "uuid": "eth0" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.104.221" + } + }, + "endpoint_uuid": { + "uuid": "eth0" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.104.221-eth0" + } + }, + "name": "172.16.104.221-eth0", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.221" + } + }, + "endpoint_uuid": { + "uuid": "eth0" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.104.221-eth0" - } - }, - "name": "172.16.104.221-eth0", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.104.221" - } - }, - "endpoint_uuid": { - "uuid": "eth0" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.61.10" - } - }, - "endpoint_uuid": { - "uuid": "200" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.61.11-200" + } + }, + "name": "172.16.61.11-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "200" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.61.11-200" - } - }, - "name": "172.16.61.11-200", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.61.11" - } - }, - "endpoint_uuid": { - "uuid": "200" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.104.222" - } - }, - "endpoint_uuid": { - "uuid": "eth0" - } - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.104.222" + } + }, + "endpoint_uuid": { + "uuid": "eth0" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.104.222-eth0" + } + }, + "name": "172.16.104.222-eth0", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.222" + } + }, + "endpoint_uuid": { + "uuid": "eth0" + } }, { - "link_id": { - "link_uuid": { - "uuid": "172.16.104.222-eth0" - } - }, - "name": "172.16.104.222-eth0", - "attributes": { - "total_capacity_gbps": 10, - "used_capacity_gbps": 0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "172.16.104.222" - } - }, - "endpoint_uuid": { - "uuid": "eth0" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "172.16.61.11" - } - }, - "endpoint_uuid": { - "uuid": "200" - } - } - ] - } - ] + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + } + ] } -- GitLab From 32c15f4eea674b3a284ffc373f81bf0cea944fe0 Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 6 Jan 2025 17:51:01 +0100 Subject: [PATCH 154/463] deepdiff added to service component requirements --- src/service/requirements.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/service/requirements.in b/src/service/requirements.in index 3f8d2a354..d0dd6dcfe 100644 --- a/src/service/requirements.in +++ b/src/service/requirements.in @@ -13,6 +13,7 @@ # limitations under the License. +deepdiff==6.7.* anytree==2.8.0 geopy==2.3.0 netaddr==0.9.0 -- GitLab From 0a351b59b2cc6c8d05c809f62a98576d79575237 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Mon, 6 Jan 2025 18:02:49 +0000 Subject: [PATCH 155/463] Telemetry backend driver added. - Emulated driver is added. - MetricGenerated is added. - Emulated driver test is added. - backend requirement file is updated. - script added to test emulated driver. --- my_deploy.sh | 3 +- .../run_tests_locally-telemetry-emulated.sh | 29 + src/telemetry/backend/drivers/__init__.py | 13 + src/telemetry/backend/drivers/core/_Driver.py | 236 ++++++++ .../backend/drivers/core/__init__.py | 13 + .../drivers/emulated/EmulatedDriver.py | 549 ++++++++++++++++++ .../emulated/SyntheticMetricsGenerator.py | 116 ++++ .../backend/drivers/emulated/__init__.py | 13 + .../backend/tests/messages_emulated.py | 52 ++ src/telemetry/backend/tests/test_emulated.py | 93 +++ src/telemetry/requirements.in | 2 + 11 files changed, 1118 insertions(+), 1 deletion(-) create mode 100755 scripts/run_tests_locally-telemetry-emulated.sh create mode 100644 src/telemetry/backend/drivers/__init__.py create mode 100644 src/telemetry/backend/drivers/core/_Driver.py create mode 100644 src/telemetry/backend/drivers/core/__init__.py create mode 100644 src/telemetry/backend/drivers/emulated/EmulatedDriver.py create mode 100644 src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py create mode 100644 src/telemetry/backend/drivers/emulated/__init__.py create mode 100644 src/telemetry/backend/tests/messages_emulated.py create mode 100644 src/telemetry/backend/tests/test_emulated.py diff --git a/my_deploy.sh b/my_deploy.sh index 8d2e733d4..4aa4e43b9 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -21,12 +21,13 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. export TFS_COMPONENTS="context device pathcomp service slice nbi webui" +# export TFS_COMPONENTS="context device" # Uncomment to activate Monitoring (old) #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" # Uncomment to activate Monitoring Framework (new) -#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" +export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" # Uncomment to activate QoS Profiles #export TFS_COMPONENTS="${TFS_COMPONENTS} qos_profile" diff --git a/scripts/run_tests_locally-telemetry-emulated.sh b/scripts/run_tests_locally-telemetry-emulated.sh new file mode 100755 index 000000000..06d1ffd37 --- /dev/null +++ b/scripts/run_tests_locally-telemetry-emulated.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +PROJECTDIR=`pwd` + +cd $PROJECTDIR/src +# RCFILE=$PROJECTDIR/coverage/.coveragerc + +# export KFK_SERVER_ADDRESS='127.0.0.1:9092' +# CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}') +# export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_telemetry?sslmode=require" +RCFILE=$PROJECTDIR/coverage/.coveragerc + + +python3 -m pytest --log-level=debug --log-cli-level=info --verbose \ + telemetry/backend/tests/test_emulated.py diff --git a/src/telemetry/backend/drivers/__init__.py b/src/telemetry/backend/drivers/__init__.py new file mode 100644 index 000000000..bbfc943b6 --- /dev/null +++ b/src/telemetry/backend/drivers/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/telemetry/backend/drivers/core/_Driver.py b/src/telemetry/backend/drivers/core/_Driver.py new file mode 100644 index 000000000..9612952fe --- /dev/null +++ b/src/telemetry/backend/drivers/core/_Driver.py @@ -0,0 +1,236 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 threading +from typing import Any, Iterator, List, Optional, Tuple, Union + +# Special resource names to request to the driver to retrieve the specified +# configuration/structural resources. +# These resource names should be used with GetConfig() method. +RESOURCE_ENDPOINTS = '__endpoints__' +RESOURCE_INTERFACES = '__interfaces__' +RESOURCE_NETWORK_INSTANCES = '__network_instances__' +RESOURCE_ROUTING_POLICIES = '__routing_policies__' +RESOURCE_SERVICES = '__services__' +RESOURCE_ACL = '__acl__' +RESOURCE_INVENTORY = '__inventory__' + + +class _Driver: + def __init__(self, name : str, address: str, port: int, **settings) -> None: + """ Initialize Driver. + Parameters: + address : str + The address of the device + port : int + The port of the device + **settings + Extra settings required by the driver. + """ + self._name = name + self._address = address + self._port = port + self._settings = settings + + @property + def name(self): return self._name + + @property + def address(self): return self._address + + @property + def port(self): return self._port + + @property + def settings(self): return self._settings + + def Connect(self) -> bool: + """ Connect to the Device. + Returns: + succeeded : bool + Boolean variable indicating if connection succeeded. + """ + raise NotImplementedError() + + def Disconnect(self) -> bool: + """ Disconnect from the Device. + Returns: + succeeded : bool + Boolean variable indicating if disconnection succeeded. + """ + raise NotImplementedError() + + def GetInitialConfig(self) -> List[Tuple[str, Any]]: + """ Retrieve initial configuration of entire device. + Returns: + values : List[Tuple[str, Any]] + List of tuples (resource key, resource value) for + resource keys. + """ + raise NotImplementedError() + + def GetConfig(self, resource_keys: List[str] = []) -> \ + List[Tuple[str, Union[Any, None, Exception]]]: + """ Retrieve running configuration of entire device or + selected resource keys. + Parameters: + resource_keys : List[str] + List of keys pointing to the resources to be retrieved. + Returns: + values : List[Tuple[str, Union[Any, None, Exception]]] + List of tuples (resource key, resource value) for + resource keys requested. If a resource is found, + the appropriate value type must be retrieved. + If a resource is not found, None must be retrieved as + value for that resource. In case of Exception, + the Exception must be retrieved as value. + """ + raise NotImplementedError() + + def SetConfig(self, resources: List[Tuple[str, Any]]) -> \ + List[Union[bool, Exception]]: + """ Create/Update configuration for a list of resources. + Parameters: + resources : List[Tuple[str, Any]] + List of tuples, each containing a resource_key pointing the + resource to be modified, and a resource_value containing + the new value to be set. + Returns: + results : List[Union[bool, Exception]] + List of results for resource key changes requested. + Return values must be in the same order as the + resource keys requested. If a resource is properly set, + True must be retrieved; otherwise, the Exception that is + raised during the processing must be retrieved. + """ + raise NotImplementedError() + + def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> \ + List[Union[bool, Exception]]: + """ Delete configuration for a list of resources. + Parameters: + resources : List[Tuple[str, Any]] + List of tuples, each containing a resource_key pointing the + resource to be modified, and a resource_value containing + possible additionally required values to locate + the value to be removed. + Returns: + results : List[Union[bool, Exception]] + List of results for resource key deletions requested. + Return values must be in the same order as the resource keys + requested. If a resource is properly deleted, True must be + retrieved; otherwise, the Exception that is raised during + the processing must be retrieved. + """ + raise NotImplementedError() + + def SubscribeState(self, subscriptions: List[Tuple[str, float, float]]) -> \ + List[Union[bool, Exception]]: + """ Subscribe to state information of entire device or + selected resources. Subscriptions are incremental. + Driver should keep track of requested resources. + Parameters: + subscriptions : List[Tuple[str, float, float]] + List of tuples, each containing a resource_key pointing the + resource to be subscribed, a sampling_duration, and a + sampling_interval (both in seconds with float + representation) defining, respectively, for how long + monitoring should last, and the desired monitoring interval + for the resource specified. + Returns: + results : List[Union[bool, Exception]] + List of results for resource key subscriptions requested. + Return values must be in the same order as the resource keys + requested. If a resource is properly subscribed, + True must be retrieved; otherwise, the Exception that is + raised during the processing must be retrieved. + """ + raise NotImplementedError() + + def UnsubscribeState(self, subscriptions: List[Tuple[str, float, float]]) \ + -> List[Union[bool, Exception]]: + """ Unsubscribe from state information of entire device + or selected resources. Subscriptions are incremental. + Driver should keep track of requested resources. + Parameters: + subscriptions : List[str] + List of tuples, each containing a resource_key pointing the + resource to be subscribed, a sampling_duration, and a + sampling_interval (both in seconds with float + representation) defining, respectively, for how long + monitoring should last, and the desired monitoring interval + for the resource specified. + Returns: + results : List[Union[bool, Exception]] + List of results for resource key un-subscriptions requested. + Return values must be in the same order as the resource keys + requested. If a resource is properly unsubscribed, + True must be retrieved; otherwise, the Exception that is + raised during the processing must be retrieved. + """ + raise NotImplementedError() + + def GetState( + self, blocking=False, terminate : Optional[threading.Event] = None + ) -> Iterator[Tuple[float, str, Any]]: + """ Retrieve last collected values for subscribed resources. + Operates as a generator, so this method should be called once and will + block until values are available. When values are available, + it should yield each of them and block again until new values are + available. When the driver is destroyed, GetState() can return instead + of yield to terminate the loop. + Terminate enables to request interruption of the generation. + Examples: + # keep looping waiting for extra samples (generator loop) + terminate = threading.Event() + i = 0 + for timestamp,resource_key,resource_value in my_driver.GetState(blocking=True, terminate=terminate): + process(timestamp, resource_key, resource_value) + i += 1 + if i == 10: terminate.set() + + # just retrieve accumulated samples + samples = my_driver.GetState(blocking=False, terminate=terminate) + # or (as classical loop) + i = 0 + for timestamp,resource_key,resource_value in my_driver.GetState(blocking=False, terminate=terminate): + process(timestamp, resource_key, resource_value) + i += 1 + if i == 10: terminate.set() + Parameters: + blocking : bool + Select the driver behaviour. In both cases, the driver will + first retrieve the samples accumulated and available in the + internal queue. Then, if blocking, the driver does not + terminate the loop and waits for additional samples to come, + thus behaving as a generator. If non-blocking, the driver + terminates the loop and returns. Non-blocking behaviour can + be used for periodically polling the driver, while blocking + can be used when a separate thread is in charge of + collecting the samples produced by the driver. + terminate : threading.Event + Signals the interruption of the GetState method as soon as + possible. + Returns: + results : Iterator[Tuple[float, str, Any]] + Sequences of state sample. Each State sample contains a + float Unix-like timestamps of the samples in seconds with up + to microsecond resolution, the resource_key of the sample, + and its resource_value. + Only resources with an active subscription must be + retrieved. Interval and duration of the sampling process are + specified when creating the subscription using method + SubscribeState(). Order of values yielded is arbitrary. + """ + raise NotImplementedError() diff --git a/src/telemetry/backend/drivers/core/__init__.py b/src/telemetry/backend/drivers/core/__init__.py new file mode 100644 index 000000000..bbfc943b6 --- /dev/null +++ b/src/telemetry/backend/drivers/core/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/telemetry/backend/drivers/emulated/EmulatedDriver.py b/src/telemetry/backend/drivers/emulated/EmulatedDriver.py new file mode 100644 index 000000000..650867dba --- /dev/null +++ b/src/telemetry/backend/drivers/emulated/EmulatedDriver.py @@ -0,0 +1,549 @@ +from telemetry.backend.drivers.core._Driver import _Driver +from anytree import Node, Resolver +from apscheduler.events import EVENT_JOB_ADDED, EVENT_JOB_REMOVED +from apscheduler.schedulers.background import BackgroundScheduler +from apscheduler.jobstores.memory import MemoryJobStore +from apscheduler.executors.pool import ThreadPoolExecutor +from datetime import datetime, timedelta +from typing import Any, Iterator, List, Tuple, Union, Optional +from .SyntheticMetricsGenerator import SyntheticMetricsGenerator +import pytz +import queue +import logging +import uuid +import json + +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') + +class EmulatedDriver(_Driver): + """ + EmulatedDriver is a class that simulates a network driver for testing purposes. + It provides functionalities to manage configurations, state subscriptions, and synthetic data generation. + """ + def __init__(self, address: str, port: int, **settings): + super().__init__('emulated_driver', address, port, **settings) + self._initial_config = Node('root') # Tree structure for initial config + self._running_config = Node('root') # Tree structure for running config + self._subscriptions = Node('subscriptions') # Tree for state subscriptions + self._resolver = Resolver() # For path resolution in tree structures + self._out_samples = queue.Queue() # Queue to hold synthetic state samples + self._synthetic_data = SyntheticMetricsGenerator(metric_queue=self._out_samples) # Placeholder for synthetic data generator + self._scheduler = BackgroundScheduler(daemon=True) + self._scheduler.configure( + jobstores = {'default': MemoryJobStore()}, + executors = {'default': ThreadPoolExecutor(max_workers=1)}, + timezone = pytz.utc + ) + self._scheduler.add_listener(self._listener_job_added_to_subscription_tree, EVENT_JOB_ADDED) + self._scheduler.add_listener(self._listener_job_removed_from_subscription_tree, EVENT_JOB_REMOVED) + + self.logger = logging.getLogger(__name__) + self.connected = False # To track connection state + self.logger.info("EmulatedDriver initialized") + + def Connect(self) -> bool: + self.logger.info(f"Connecting to {self.address}:{self.port}") + self.connected = True + self._scheduler.start() + self.logger.info(f"Successfully connected to {self.address}:{self.port}") + return True + + def Disconnect(self) -> bool: + self.logger.info(f"Disconnecting from {self.address}:{self.port}") + if not self.connected: + self.logger.warning("Driver is not connected. Nothing to disconnect.") + return False + self._scheduler.shutdown() + self.connected = False + self.logger.info(f"Successfully disconnected from {self.address}:{self.port}") + return True + + def _require_connection(self): + if not self.connected: + raise RuntimeError("Driver is not connected. Please connect before performing operations.") + +# ------------- GetConfig, SetConfig, DeleteConfig, with helper methods (START)----------------- + + def GetInitialConfig(self) -> List[Tuple[str, Any]]: + self._require_connection() + results = [] + for node in self._initial_config.descendants: + value = getattr(node, "value", None) + results.append((node.name, json.loads(value) if value else None)) + self.logger.info("Retrieved initial configurations") + return results + + def GetConfig(self, resource_keys: List[str] = []) -> List[Tuple[str, Union[Any, dict, Exception]]]: + """ + Retrieves the configuration for the specified resource keys. + If no keys are provided, returns the full configuration tree. + + Args: + resource_keys (List[str]): A list of keys specifying the configuration to retrieve. + + Returns: + List[Tuple[str, Union[Any, dict, Exception]]]: A list of tuples with the resource key and its value, + subtree, or an exception. + """ + self._require_connection() + results = [] + + try: + if not resource_keys: + # If no specific keys are provided, return the full configuration tree + full_tree = self._generate_subtree(self._running_config) + return [("full_configuration", full_tree)] + + for key in resource_keys: + try: + # Parse the resource key + resource_path = self._parse_resource_key(key) + self.logger.info(f"1. Retrieving configuration for resource path : {resource_path}") + + # Navigate to the node corresponding to the key + parent = self._running_config + for part in resource_path: + parent = self._find_or_raise_node(part, parent) + + # Check if the node has a value + value = getattr(parent, "value", None) + if value: + # If a value exists, return it + results.append((key, json.loads(value))) + else: + # If no value, return the subtree of this node + subtree = self._generate_subtree(parent) + results.append((key, subtree)) + + except Exception as e: + self.logger.exception(f"Failed to retrieve configuration for key: {key}") + results.append((key, e)) + + except Exception as e: + self.logger.exception("Failed to retrieve configurations") + results.append(("Error", e)) + + return results + + def SetConfig(self, config: dict) -> List[Union[bool, Exception]]: + self._require_connection() + results = [] + + if not isinstance(config, dict): + self.logger.error("Invalid configuration format: config must be a dictionary.") + raise ValueError("Invalid configuration format. Must be a dictionary.") + if 'config_rules' not in config or not isinstance(config['config_rules'], list): + self.logger.error("Invalid configuration format: 'config_rules' key missing or not a list.") + raise ValueError("Invalid configuration format. Must contain a 'config_rules' key with a list of rules.") + + for rule in config['config_rules']: + try: + if 'action' not in rule or 'custom' not in rule: + raise ValueError(f"Invalid rule format: {rule}") + + action = rule['action'] + custom = rule['custom'] + resource_key = custom.get('resource_key') + resource_value = custom.get('resource_value') + + if not resource_key: + raise ValueError(f"Resource key is missing in rule: {rule}") + + if resource_value is None: + raise ValueError(f"Resource value is None for key: {resource_key}") + if not resource_key: + raise ValueError(f"Resource key is missing in rule: {rule}") + + if action == 1: # Set action + resource_path = self._parse_resource_key(resource_key) + # self.logger.info(f"1. Setting configuration for resource key {resource_key} and resource_path: {resource_path}") + parent = self._running_config + + for part in resource_path[:-1]: + if '[' in part and ']' in part: + base, index = part.split('[', 1) + index = index.rstrip(']') + parent = self._find_or_create_node(index, self._find_or_create_node(base, parent)) + # self.logger.info(f"2a. Creating node: {base}, {index}, {parent}") + elif resource_path[-1] != 'settings': + # self.logger.info(f"2b. Creating node: {part}") + parent = self._find_or_create_node(part, parent) + + final_part = resource_path[-1] + if final_part in ['address', 'port']: + self._create_or_update_node(final_part, parent, resource_value) + self.logger.info(f"Configured: {resource_key} = {resource_value}") + + if resource_key.startswith("_connect/settings"): + parent = self._find_or_create_node("_connect", self._running_config) + settings_node = self._find_or_create_node("settings", parent) + settings_node.value = None # Ensure settings node has None value + endpoints_node = self._find_or_create_node("endpoints", settings_node) + + for endpoint in resource_value.get("endpoints", []): + uuid = endpoint.get("uuid") + uuid = uuid.replace('/', '_') if uuid else None + if uuid: + # self.logger.info(f"3. Creating endpoint: {uuid}, {endpoint}, {endpoints_node}") + self._create_or_update_node(uuid, endpoints_node, endpoint) + self.logger.info(f"Configured endpoint: {uuid} : {endpoint}") + + elif resource_key.startswith("/interface"): + interface_parent = self._find_or_create_node("interface", self._running_config) + name = resource_value.get("name") + name = name.replace('/', '_') if name else None + if name: + self._create_or_update_node(name, interface_parent, resource_value) + self.logger.info(f"Configured interface: {name} : {resource_value}") + # self.logger.info(f"4. Configured interface: {name}") + + results.append(True) + else: + raise ValueError(f"Unsupported action '{action}' in rule: {rule}") + + if resource_value is None: + raise ValueError(f"Resource value is None for key: {resource_key}") + + except Exception as e: + self.logger.exception(f"Failed to apply rule: {rule}") + results.append(e) + + return results + + def _generate_subtree(self, node: Node) -> dict: + """ + Generates a subtree of the configuration tree starting from the specified node. + + Args: + node (Node): The node from which to generate the subtree. + + Returns: + dict: The subtree as a dictionary. + """ + subtree = {} + for child in node.children: + if child.children: + subtree[child.name] = self._generate_subtree(child) + else: + value = getattr(child, "value", None) + subtree[child.name] = json.loads(value) if value else None + return subtree + + def DeleteConfig(self, resource_keys: List[str]) -> List[Union[bool, Exception]]: + self._require_connection() + results = [] + + for key in resource_keys: + try: + # Parse resource key into parts, handling brackets correctly + resource_path = self._parse_resource_key(key) + + parent = self._running_config + for part in resource_path: + parent = self._find_or_raise_node(part, parent) + + # Delete the final node + node_to_delete = parent + parent = node_to_delete.parent + parent.children = tuple(child for child in parent.children if child != node_to_delete) + self.logger.info(f"Deleted configuration for key: {key}") + + # Handle endpoints structure + if "interface" in key and "settings" in key: + interface_name = key.split('[')[-1].split(']')[0] + endpoints_parent = self._find_or_raise_node("_connect", self._running_config) + endpoints_node = self._find_or_raise_node("endpoints", endpoints_parent) + endpoint_to_delete = next((child for child in endpoints_node.children if child.name == interface_name), None) + if endpoint_to_delete: + endpoints_node.children = tuple(child for child in endpoints_node.children if child != endpoint_to_delete) + self.logger.info(f"Removed endpoint entry for interface '{interface_name}'") + + # Check if parent has no more children and is not the root + while parent and parent.name != "root" and not parent.children: + node_to_delete = parent + parent = node_to_delete.parent + parent.children = tuple(child for child in parent.children if child != node_to_delete) + self.logger.info(f"Deleted empty parent node: {node_to_delete.name}") + + results.append(True) + except Exception as e: + self.logger.exception(f"Failed to delete configuration for key: {key}") + results.append(e) + + return results + + def _parse_resource_key(self, resource_key: str) -> List[str]: + """ + Parses the resource key into parts, correctly handling brackets. + + Args: + resource_key (str): The resource key to parse. + + Returns: + List[str]: A list of parts from the resource key. + """ + resource_path = [] + current_part = "" + in_brackets = False + + if not resource_key.startswith('/interface'): + for char in resource_key.strip('/'): + if char == '[': + in_brackets = True + current_part += char + elif char == ']': + in_brackets = False + current_part += char + elif char == '/' and not in_brackets: + resource_path.append(current_part) + current_part = "" + else: + current_part += char + if current_part: + resource_path.append(current_part) + return resource_path + else: + resource_path = resource_key.strip('/').split('/', 1) + if resource_path[1] == 'settings': + return resource_path + else: + resource_path = [resource_key.strip('/').split('[')[0].strip('/'), resource_key.strip('/').split('[')[1].split(']')[0].replace('/', '_')] + return resource_path + + def _find_or_raise_node(self, name: str, parent: Node) -> Node: + """ + Finds a node with the given name under the specified parent or raises an exception if not found. + + Args: + name (str): The name of the node to find. + parent (Node): The parent node. + + Returns: + Node: The found node. + + Raises: + ValueError: If the node is not found. + """ + node = next((child for child in parent.children if child.name == name), None) + if not node: + raise ValueError(f"Node '{name}' not found under parent '{parent.name}'.") + return node + + def _find_or_create_node(self, name: str, parent: Node) -> Node: + """ + Finds or creates a node with the given name under the specified parent. + + Args: + name (str): The name of the node to find or create. + parent (Node): The parent node. + + Returns: + Node: The found or created node. + """ + node = next((child for child in parent.children if child.name == name), None) + if not node: + node = Node(name, parent=parent) + return node + + def _create_or_update_node(self, name: str, parent: Node, value: Any): + """ + Creates or updates a node with the given name and value under the specified parent. + + Args: + name (str): The name of the node. + parent (Node): The parent node. + value (Any): The value to set on the node. + """ + node = next((child for child in parent.children if child.name == name), None) + if node: + node.value = json.dumps(value) + else: + Node(name, parent=parent, value=json.dumps(value)) + + def validate_resource_key(self, key: str) -> str: + """ + Splits the input string into two parts: + - The first part is '_connect/settings/endpoints/'. + - The second part is the remaining string after the first part, with '/' replaced by '_'. + + Args: + key (str): The input string to process. + + Returns: + str: A single string with the processed result. + """ + prefix = '_connect/settings/endpoints/' + if not key.startswith(prefix): + raise ValueError(f"The input path '{key}' does not start with the expected prefix: {prefix}") + second_part = key[len(prefix):] + second_part_processed = second_part.replace('/', '_') + validated_key = prefix + second_part_processed + return validated_key + +# ------------- GetConfig, SetConfig, DeleteConfig, with helper methods (END)----------------- + + def SubscribeState(self, subscriptions: List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + self._require_connection() + results = [] + for resource_key, duration, interval in subscriptions: + resource_key = self.validate_resource_key(resource_key) # Validate the endpoint name + self.logger.info(f"1. Subscribing to {resource_key} with duration {duration}s and interval {interval}s") + try: + self._resolver.get(self._running_config, resource_key) # Verify if the resource key exists in the running configuration + self.logger.info(f"Resource key {resource_key} exists in the configuration.") + resource_value = json.loads(self._resolver.get(self._running_config, resource_key).value) + if resource_value is not None: + sample_type_ids = resource_value['sample_types'] + self.logger.info(f"Sample type IDs for {resource_key}: {sample_type_ids}") + else: + self.logger.warning(f"No sample types found for {resource_key}. Skipping subscription.") + continue + # Add the job to the scheduler + job_id = f"{resource_key}-{uuid.uuid4()}" + self._scheduler.add_job( + self._generate_sample, + 'interval', + seconds=interval, + args=[resource_key, sample_type_ids], + id=job_id, + replace_existing=True, + end_date=datetime.now(pytz.utc) + timedelta(seconds=duration) + ) + self.logger.info(f"Job added to scheduler for resource key {resource_key} with duration {duration}s and interval {interval}s") + results.append(True) + except Exception as e: + self.logger.error(f"Failed to verify resource key or add job: {e}") + results.append(e) + return results + + def UnsubscribeState(self, subscriptions: List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + self._require_connection() + results = [] + for resource_key, _, _ in subscriptions: + resource_key = self.validate_resource_key(resource_key) + try: + # Check if job exists + job_ids = [job.id for job in self._scheduler.get_jobs() if resource_key in job.id] + if not job_ids: + self.logger.warning(f"No active jobs found for {resource_key}. It might have already terminated.") + results.append(False) + continue + # Remove jobs + for job_id in job_ids: + self._scheduler.remove_job(job_id) + + self.logger.info(f"Unsubscribed from {resource_key} with job IDs: {job_ids}") + results.append(True) + except Exception as e: + self.logger.exception(f"Failed to unsubscribe from {resource_key}") + results.append(e) + return results + + def GetState(self, blocking: bool = False, terminate: Optional[queue.Queue] = None) -> Iterator[Tuple[str, Any]]: + self._require_connection() + start_time = datetime.now(pytz.utc) + duration = 10 # Duration of the subscription in seconds (as an example) + + while True: + try: + if terminate and not terminate.empty(): + self.logger.info("Termination signal received, stopping GetState") + break + + elapsed_time = (datetime.now(pytz.utc) - start_time).total_seconds() + if elapsed_time >= duration: + self.logger.info("Duration expired, stopping GetState") + break + + sample = self._out_samples.get(block=blocking, timeout=1 if blocking else 0.1) + self.logger.info(f"Retrieved state sample: {sample}") + yield sample + except queue.Empty: + if not blocking: + self.logger.info("No more samples in queue, exiting GetState") + return None + + def _generate_sample(self, resource_key: str, sample_type_ids : List[int]): + self._require_connection() + # Simulate generating a sample for the resource key + self.logger.debug(f"Executing _generate_sample for resource: {resource_key}") + sample = self._synthetic_data.generate_synthetic_data_point(resource_key, sample_type_ids) + self._out_samples.put(sample) + +# ------------- Event Listeners (START)----------------- + + def _listener_job_removed_from_subscription_tree(self, event): + if event.job_id: + # Extract the resource key from the job ID + resource_key = event.job_id.split('-')[0] + resource_key = self.validate_resource_key(resource_key) + + # Remove the subscription from the tree + try: + subscription_path = resource_key.split('/') + parent = self._subscriptions + for part in subscription_path: + parent = next((child for child in parent.children if child.name == part), None) + if not parent: + raise ValueError(f"Subscription path '{resource_key}' not found in tree.") + if parent: + parent.parent.children = tuple(child for child in parent.parent.children if child != parent) + self.logger.info(f"Automatically removed subscription from subscription_tree for {resource_key} after job termination by listener.") + except Exception as e: + self.logger.warning(f"Failed to remove subscription for {resource_key}: {e}") + + def _listener_job_added_to_subscription_tree(self, event): + try: + job_id = event.job_id + if job_id: + resource_key = job_id.split('-')[0] # Extract resource key from job ID + resource_key = self.validate_resource_key(resource_key) + subscription_path = resource_key.split('/') + parent = self._subscriptions + for part in subscription_path: + node = next((child for child in parent.children if child.name == part), None) + if not node: + node = Node(part, parent=parent) + parent = node + parent.value = { + "job_id": job_id + } + self.logger.info(f"Automatically added subscription for {resource_key} to the subscription_tree by listener.") + except Exception as e: + self.logger.exception("Failed to add subscription to the tree") + +# ------------- Event Listeners (END)----------------- + + def log_active_jobs(self): + """ + Logs the IDs of all active jobs. + This method retrieves the list of active jobs from the scheduler and logs their IDs using the logger. + """ + self._require_connection() + jobs = self._scheduler.get_jobs() + self.logger.info(f"Active jobs: {[job.id for job in jobs]}") + + def print_config_tree(self): + """ + Reads the configuration using GetConfig and prints it as a hierarchical tree structure. + For debugging purposes. + """ + self._require_connection() + + def print_tree(node, indent=""): + """ + Recursively prints the configuration tree. + + Args: + node (Node): The current node to print. + indent (str): The current indentation level. + """ + if node.name != "root": # Skip the root node's name + value = getattr(node, "value", None) + print(f"{indent}- {node.name}: {json.loads(value) if value else ''}") + + for child in node.children: + print_tree(child, indent + " ") + + print("Configuration Tree:") + print_tree(self._running_config) diff --git a/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py b/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py new file mode 100644 index 000000000..d6606b2c1 --- /dev/null +++ b/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py @@ -0,0 +1,116 @@ +from types import NoneType +import numpy as np +import random +import logging +import queue +import time + +LOGGER = logging.getLogger(__name__) + +class SyntheticMetricsGenerator(): + """ + This collector class generates synthetic network metrics based on the current network state. + The metrics include packet_in, packet_out, bytes_in, bytes_out, packet_loss (percentage), packet_drop_count, byte_drop_count, and latency. + The network state can be 'good', 'moderate', or 'poor', and it affects the generated metrics accordingly. + """ + def __init__(self, metric_queue=None, network_state="good"): + LOGGER.info("Initiaitng Emulator") + super().__init__() + self.metric_queue = metric_queue if metric_queue is not None else queue.Queue() + self.network_state = network_state + self.running = True + self.set_initial_parameter_values() # update this method to set the initial values for the parameters + + def set_initial_parameter_values(self): + self.bytes_per_pkt = random.uniform(65, 150) + self.states = ["good", "moderate", "poor"] + self.state_probabilities = { + "good" : [0.9, 0.1, 0.0], + "moderate": [0.2, 0.7, 0.1], + "poor" : [0.0, 0.3, 0.7] + } + if self.network_state == "good": + self.packet_in = random.uniform(700, 900) + elif self.network_state == "moderate": + self.packet_in = random.uniform(300, 700) + else: + self.packet_in = random.uniform(100, 300) + + def generate_synthetic_data_point(self, resource_key, sample_type_ids): + """ + Generates a synthetic data point based on the current network state. + + Parameters: + resource_key (str): The key associated with the resource for which the data point is generated. + + Returns: + tuple: A tuple containing the timestamp, resource key, and a dictionary of generated metrics. + """ + if self.network_state == "good": + packet_loss = random.uniform(0.01, 0.1) + random_noise = random.uniform(1,10) + latency = random.uniform(5, 25) + elif self.network_state == "moderate": + packet_loss = random.uniform(0.1, 1) + random_noise = random.uniform(10, 40) + latency = random.uniform(25, 100) + elif self.network_state == "poor": + packet_loss = random.uniform(1, 3) + random_noise = random.uniform(40, 100) + latency = random.uniform(100, 300) + else: + raise ValueError("Invalid network state. Must be 'good', 'moderate', or 'poor'.") + + period = 60 * 60 * random.uniform(10, 100) + amplitude = random.uniform(50, 100) + sin_wave = amplitude * np.sin(2 * np.pi * 100 / period) + self.packet_in + packet_in = sin_wave + ((sin_wave/100) * random_noise) + packet_out = packet_in - ((packet_in / 100) * packet_loss) + bytes_in = packet_in * self.bytes_per_pkt + bytes_out = packet_out * self.bytes_per_pkt + packet_drop_count = packet_in * (packet_loss / 100) + byte_drop_count = packet_drop_count * self.bytes_per_pkt + + state_prob = self.state_probabilities[self.network_state] + self.network_state = random.choices(self.states, state_prob)[0] + print (self.network_state) + + generated_samples = { + "packet_in" : int(packet_in), "packet_out" : int(packet_out), "bytes_in" : float(bytes_in), + "bytes_out" : float(bytes_out), "packet_loss": float(packet_loss), "packet_drop_count" : int(packet_drop_count), + "latency" : float(latency), "byte_drop_count": float(byte_drop_count) + } + requested_metrics = self.metric_id_mapper(sample_type_ids) + generated_samples = {metric: generated_samples[metric] for metric in requested_metrics} + + return (time.time(), resource_key, generated_samples) + + def metric_id_mapper(self, sample_type_ids): + """ + Maps the sample type IDs to the corresponding metric names. + + Parameters: + sample_type_ids (list): A list of sample type IDs. + + Returns: + list: A list of metric names. + """ + metric_names = [] + for sample_type_id in sample_type_ids: + if sample_type_id == 102: + metric_names.append("packet_in") + elif sample_type_id == 101: + metric_names.append("packet_out") + elif sample_type_id == 103: + metric_names.append("packet_drop_count") + elif sample_type_id == 202: + metric_names.append("bytes_in") + elif sample_type_id == 201: + metric_names.append("bytes_out") + elif sample_type_id == 203: + metric_names.append("byte_drop_count") + elif sample_type_id == 701: + metric_names.append("latency") + else: + raise ValueError(f"Invalid sample type ID: {sample_type_id}") + return metric_names diff --git a/src/telemetry/backend/drivers/emulated/__init__.py b/src/telemetry/backend/drivers/emulated/__init__.py new file mode 100644 index 000000000..bbfc943b6 --- /dev/null +++ b/src/telemetry/backend/drivers/emulated/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/telemetry/backend/tests/messages_emulated.py b/src/telemetry/backend/tests/messages_emulated.py new file mode 100644 index 000000000..adf0376e9 --- /dev/null +++ b/src/telemetry/backend/tests/messages_emulated.py @@ -0,0 +1,52 @@ +import logging +# Configure logging to ensure logs appear on the console +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') +logger = logging.getLogger(__name__) + + +def create_test_configuration(): + return { + "config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": 8080}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "endpoints": [ + {"uuid": "eth0", "type": "ethernet", "sample_types": [101, 102]}, + {"uuid": "eth1", "type": "ethernet", "sample_types": [201, 202]}, + {"uuid": "13/1/2", "type": "copper", "sample_types": [101, 102, 201, 202]} + ] + }}}, + {"action": 1, "custom": {"resource_key": "/interface[eth0]/settings", "resource_value": { + "name": "eth0", "enabled": True + }}}, + {"action": 1, "custom": {"resource_key": "/interface[eth1]/settings", "resource_value": { + "name": "eth1", "enabled": False + }}}, + {"action": 1, "custom": {"resource_key": "/interface[13/1/2]/settings", "resource_value": { + "name": "13/1/2", "enabled": True + }}} + ] + } + +# This method is used to create a specific configuration to be used in the test case test_get_config in the test_EmulatedDriver.py file +def create_specific_config_keys(): + # config = create_test_configuration() + keys_to_return = ["_connect/settings/endpoints/eth1", "/interface/[13/1/2]/settings", "_connect/address"] + return keys_to_return + # return {rule["custom"]["resource_key"]: rule["custom"]["resource_value"] for rule in config["config_rules"] if rule["custom"]["resource_key"] in keys_to_return} + +# write a method to create a specific configuration to be used in the test case test_delete_config in the test_EmulatedDriver1.py file +def create_config_for_delete(): + keys_to_delete = ["_connect/settings/endpoints/eth0", "/interface/[eth1]", "_connect/port"] + return keys_to_delete + +# write a method to generate subscription for specific endpoints. +def create_test_subscriptions(): + return [("_connect/settings/endpoints/eth1", 10, 2), + ("_connect/settings/endpoints/13/1/2", 15, 3), + ("_connect/settings/endpoints/eth0", 8, 2)] + +def create_unscubscribe_subscriptions(): + return [("_connect/settings/endpoints/eth1", 10, 2), + ("_connect/settings/endpoints/13/1/2", 15, 3), + ("_connect/settings/endpoints/eth0", 8, 2)] \ No newline at end of file diff --git a/src/telemetry/backend/tests/test_emulated.py b/src/telemetry/backend/tests/test_emulated.py new file mode 100644 index 000000000..94eb76561 --- /dev/null +++ b/src/telemetry/backend/tests/test_emulated.py @@ -0,0 +1,93 @@ +import logging +import time +import pytest +from telemetry.backend.drivers.emulated.EmulatedDriver import EmulatedDriver +from telemetry.backend.tests.messages_emulated import ( + create_test_configuration, + create_specific_config_keys, + create_config_for_delete, + create_test_subscriptions, +) + +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') +logger = logging.getLogger(__name__) + +@pytest.fixture +def setup_driver(): + """Sets up an EmulatedDriver instance for testing.""" + yield EmulatedDriver(address="127.0.0.1", port=8080) + +@pytest.fixture +def connected_configured_driver(setup_driver): + driver = setup_driver # EmulatedDriver(address="127.0.0.1", port=8080) + driver.Connect() + driver.SetConfig(create_test_configuration()) + yield driver + driver.Disconnect() + +def test_connect(setup_driver): + logger.info(">>> test_connect <<<") + driver = setup_driver + assert driver.Connect() is True + assert driver.connected is True + +def test_disconnect(setup_driver): + logger.info(">>> test_disconnect <<<") + driver = setup_driver + driver.Connect() + assert driver.Disconnect() is True + assert driver.connected is False + +def test_set_config(setup_driver): + logger.info(">>> test_set_config <<<") + driver = setup_driver + driver.Connect() + + config = create_test_configuration() + + results = driver.SetConfig(config) + assert all(result is True for result in results) + +def test_get_config(connected_configured_driver): + logger.info(">>> test_get_config <<<") + resource_keys = create_specific_config_keys() + results = connected_configured_driver.GetConfig(resource_keys) + + for key, value in results: + assert key in create_specific_config_keys() + assert value is not None + +def test_delete_config(connected_configured_driver): + logger.info(">>> test_delete_config <<<") + resource_keys = create_config_for_delete() + + results = connected_configured_driver.DeleteConfig(resource_keys) + assert all(result is True for result in results) + +def test_subscribe_state(connected_configured_driver): + logger.info(">>> test_subscribe_state <<<") + subscriptions = create_test_subscriptions() + + results = connected_configured_driver.SubscribeState(subscriptions) + assert all(result is True for result in results) + +def test_unsubscribe_state(connected_configured_driver): + logger.info(">>> test_unsubscribe_state <<<") + subscriptions = create_test_subscriptions() + + connected_configured_driver.SubscribeState(subscriptions) + results = connected_configured_driver.UnsubscribeState(subscriptions) + assert all(result is True for result in results) + +def test_get_state(connected_configured_driver): + logger.info(">>> test_get_state <<<") + subscriptions = create_test_subscriptions() + + connected_configured_driver.SubscribeState(subscriptions) + logger.info(f"Subscribed to state: {subscriptions}. waiting for 3 seconds ...") + time.sleep(3) + + state_iterator = connected_configured_driver.GetState(blocking=False) + states = list(state_iterator) + + assert len(states) > 0 diff --git a/src/telemetry/requirements.in b/src/telemetry/requirements.in index 503468a66..e264104e3 100644 --- a/src/telemetry/requirements.in +++ b/src/telemetry/requirements.in @@ -12,7 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +anytree==2.8.0 APScheduler==3.10.1 +numpy==2.2.1 psycopg2-binary==2.9.3 python-dateutil==2.8.2 python-json-logger==2.0.2 -- GitLab From 91166434eb4640ab05e64306e14522dc218869cd Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 6 Jan 2025 19:18:46 +0100 Subject: [PATCH 156/463] slice retrieval helper functions added --- src/common/tools/context_queries/Slice.py | 107 +++++++++++++++++++++- 1 file changed, 104 insertions(+), 3 deletions(-) diff --git a/src/common/tools/context_queries/Slice.py b/src/common/tools/context_queries/Slice.py index c826c59ce..686f08a84 100644 --- a/src/common/tools/context_queries/Slice.py +++ b/src/common/tools/context_queries/Slice.py @@ -12,12 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -import grpc, logging -from typing import Optional +import logging +from typing import Optional, Tuple, Union +from uuid import UUID, uuid5 + +import grpc + from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import Slice, SliceFilter, SliceId +from common.method_wrappers.ServiceExceptions import InvalidArgumentsException +from common.proto.context_pb2 import ContextId, Slice, SliceFilter, SliceId from context.client.ContextClient import ContextClient + +NAMESPACE_TFS = UUID("200e3a1f-2223-534f-a100-758e29c37f40") + LOGGER = logging.getLogger(__name__) def get_slice_by_id( @@ -59,3 +67,96 @@ def get_slice_by_uuid( context_client, slice_id, rw_copy=rw_copy, include_endpoint_ids=include_endpoint_ids, include_constraints=include_constraints, include_service_ids=include_service_ids, include_subslice_ids=include_subslice_ids, include_config_rules=include_config_rules) + + +def get_uuid_from_string( + str_uuid_or_name: Union[str, UUID], prefix_for_name: Optional[str] = None +) -> str: + # if UUID given, assume it is already a valid UUID + if isinstance(str_uuid_or_name, UUID): + return str_uuid_or_name + if not isinstance(str_uuid_or_name, str): + MSG = "Parameter({:s}) cannot be used to produce a UUID" + raise Exception(MSG.format(str(repr(str_uuid_or_name)))) + try: + # try to parse as UUID + return str(UUID(str_uuid_or_name)) + except: # pylint: disable=bare-except + # produce a UUID within TFS namespace from parameter + if prefix_for_name is not None: + str_uuid_or_name = "{:s}/{:s}".format(prefix_for_name, str_uuid_or_name) + return str(uuid5(NAMESPACE_TFS, str_uuid_or_name)) + + +def context_get_uuid( + context_id: ContextId, + context_name: str = "", + allow_random: bool = False, + allow_default: bool = False, +) -> str: + context_uuid = context_id.context_uuid.uuid + + if len(context_uuid) > 0: + return get_uuid_from_string(context_uuid) + if len(context_name) > 0: + return get_uuid_from_string(context_name) + if allow_default: + return get_uuid_from_string(DEFAULT_CONTEXT_NAME) + + raise InvalidArgumentsException( + [ + ("context_id.context_uuid.uuid", context_uuid), + ("name", context_name), + ], + extra_details=["At least one is required to produce a Context UUID"], + ) + + +def slice_get_uuid(slice_id: SliceId) -> Tuple[str, str]: + context_uuid = context_get_uuid(slice_id.context_id, allow_random=False) + raw_slice_uuid = slice_id.slice_uuid.uuid + + if len(raw_slice_uuid) > 0: + return context_uuid, get_uuid_from_string( + raw_slice_uuid, prefix_for_name=context_uuid + ) + + raise InvalidArgumentsException( + [ + ("slice_id.slice_uuid.uuid", raw_slice_uuid), + ], + extra_details=["At least one is required to produce a Slice UUID"], + ) + +def get_slice_by_defualt_id( + context_client : ContextClient, default_slice_id : SliceId, context_uuid : str = DEFAULT_CONTEXT_NAME, + rw_copy : bool = False, include_endpoint_ids : bool = True, include_constraints : bool = True, + include_service_ids : bool = True, include_subslice_ids : bool = True, include_config_rules : bool = True +) -> Optional[Slice]: + context_uuid, slice_uuid = slice_get_uuid(default_slice_id) + LOGGER.debug(f'P60: {context_uuid} {slice_uuid}') + slice_id = SliceId() + slice_id.context_id.context_uuid.uuid = context_uuid # pylint: disable=no-member + slice_id.slice_uuid.uuid = slice_uuid # pylint: disable=no-member + return get_slice_by_id( + context_client, slice_id, rw_copy=rw_copy, include_endpoint_ids=include_endpoint_ids, + include_constraints=include_constraints, include_service_ids=include_service_ids, + include_subslice_ids=include_subslice_ids, include_config_rules=include_config_rules) + + +def get_slice_by_defualt_name( + context_client : ContextClient, slice_name : str, context_uuid : str = DEFAULT_CONTEXT_NAME, + rw_copy : bool = False, include_endpoint_ids : bool = True, include_constraints : bool = True, + include_service_ids : bool = True, include_subslice_ids : bool = True, include_config_rules : bool = True +) -> Optional[Slice]: + default_slice_id = SliceId() + default_slice_id.context_id.context_uuid.uuid = context_uuid # pylint: disable=no-member + default_slice_id.slice_uuid.uuid = slice_name # pylint: disable=no-member + context_uuid, slice_uuid = slice_get_uuid(default_slice_id) + slice_id = SliceId() + slice_id.context_id.context_uuid.uuid = context_uuid # pylint: disable=no-member + slice_id.slice_uuid.uuid = slice_uuid # pylint: disable=no-member + return get_slice_by_id( + context_client, slice_id, rw_copy=rw_copy, include_endpoint_ids=include_endpoint_ids, + include_constraints=include_constraints, include_service_ids=include_service_ids, + include_subslice_ids=include_subslice_ids, include_config_rules=include_config_rules) -- GitLab From 8c47a6257f1b6d8d9925ce24958340eacbd7347d Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Tue, 7 Jan 2025 09:43:44 +0000 Subject: [PATCH 157/463] Changes in Telemetry Backend. - Added licensing information - Updated requirements for telemetry backend. --- my_deploy.sh | 1 - .../backend/drivers/emulated/EmulatedDriver.py | 14 ++++++++++++++ .../drivers/emulated/SyntheticMetricsGenerator.py | 15 ++++++++++++++- src/telemetry/backend/requirements.in | 2 ++ src/telemetry/backend/tests/messages_emulated.py | 14 ++++++++++++++ src/telemetry/backend/tests/test_emulated.py | 14 ++++++++++++++ src/telemetry/requirements.in | 2 -- 7 files changed, 58 insertions(+), 4 deletions(-) diff --git a/my_deploy.sh b/my_deploy.sh index 4aa4e43b9..f74d4982e 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -21,7 +21,6 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. export TFS_COMPONENTS="context device pathcomp service slice nbi webui" -# export TFS_COMPONENTS="context device" # Uncomment to activate Monitoring (old) #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" diff --git a/src/telemetry/backend/drivers/emulated/EmulatedDriver.py b/src/telemetry/backend/drivers/emulated/EmulatedDriver.py index 650867dba..0c5712ffe 100644 --- a/src/telemetry/backend/drivers/emulated/EmulatedDriver.py +++ b/src/telemetry/backend/drivers/emulated/EmulatedDriver.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from telemetry.backend.drivers.core._Driver import _Driver from anytree import Node, Resolver from apscheduler.events import EVENT_JOB_ADDED, EVENT_JOB_REMOVED diff --git a/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py b/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py index d6606b2c1..5471fef19 100644 --- a/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py +++ b/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py @@ -1,4 +1,17 @@ -from types import NoneType +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 numpy as np import random import logging diff --git a/src/telemetry/backend/requirements.in b/src/telemetry/backend/requirements.in index e6a559be7..196dcc5a1 100644 --- a/src/telemetry/backend/requirements.in +++ b/src/telemetry/backend/requirements.in @@ -12,4 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. +anytree==2.8.0 confluent-kafka==2.3.* +numpy==2.2.1 diff --git a/src/telemetry/backend/tests/messages_emulated.py b/src/telemetry/backend/tests/messages_emulated.py index adf0376e9..451792327 100644 --- a/src/telemetry/backend/tests/messages_emulated.py +++ b/src/telemetry/backend/tests/messages_emulated.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 # Configure logging to ensure logs appear on the console logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') diff --git a/src/telemetry/backend/tests/test_emulated.py b/src/telemetry/backend/tests/test_emulated.py index 94eb76561..14d8a8ab9 100644 --- a/src/telemetry/backend/tests/test_emulated.py +++ b/src/telemetry/backend/tests/test_emulated.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 import time import pytest diff --git a/src/telemetry/requirements.in b/src/telemetry/requirements.in index e264104e3..503468a66 100644 --- a/src/telemetry/requirements.in +++ b/src/telemetry/requirements.in @@ -12,9 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -anytree==2.8.0 APScheduler==3.10.1 -numpy==2.2.1 psycopg2-binary==2.9.3 python-dateutil==2.8.2 python-json-logger==2.0.2 -- GitLab From 192573a4e33c3d97da452a53897a2ef90123f6f2 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Tue, 7 Jan 2025 09:56:33 +0000 Subject: [PATCH 158/463] Update numpy version and clean up imports in telemetry services. --- src/telemetry/backend/requirements.in | 2 +- src/telemetry/backend/service/TelemetryBackendService.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/telemetry/backend/requirements.in b/src/telemetry/backend/requirements.in index 196dcc5a1..bf2600a2c 100644 --- a/src/telemetry/backend/requirements.in +++ b/src/telemetry/backend/requirements.in @@ -14,4 +14,4 @@ anytree==2.8.0 confluent-kafka==2.3.* -numpy==2.2.1 +numpy==2.0.1 diff --git a/src/telemetry/backend/service/TelemetryBackendService.py b/src/telemetry/backend/service/TelemetryBackendService.py index ab4991690..b286519dc 100755 --- a/src/telemetry/backend/service/TelemetryBackendService.py +++ b/src/telemetry/backend/service/TelemetryBackendService.py @@ -22,7 +22,6 @@ from datetime import datetime, timezone from confluent_kafka import Producer as KafkaProducer from confluent_kafka import Consumer as KafkaConsumer from confluent_kafka import KafkaError -from numpy import info from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc from common.method_wrappers.Decorator import MetricsPool -- GitLab From f93b59f4e7537650ce4e3af4eed21cde8aeec286 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Tue, 7 Jan 2025 10:38:12 +0000 Subject: [PATCH 159/463] Changes in Telemetry backend emulated. - Refactor emulated telemetry tests - remove unused collector class. - Improved SyntheticMetricsGenerator class. --- .../emulated/SyntheticMetricsGenerator.py | 22 ++--- .../backend/service/EmulatedCollector.py | 92 ------------------ .../service/EmulatedCollectorMultiple.py | 97 ------------------- .../backend/tests/messages_emulated.py | 9 +- 4 files changed, 13 insertions(+), 207 deletions(-) delete mode 100644 src/telemetry/backend/service/EmulatedCollector.py delete mode 100644 src/telemetry/backend/service/EmulatedCollectorMultiple.py diff --git a/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py b/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py index 5471fef19..1af542eb4 100644 --- a/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py +++ b/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py @@ -93,12 +93,12 @@ class SyntheticMetricsGenerator(): "bytes_out" : float(bytes_out), "packet_loss": float(packet_loss), "packet_drop_count" : int(packet_drop_count), "latency" : float(latency), "byte_drop_count": float(byte_drop_count) } - requested_metrics = self.metric_id_mapper(sample_type_ids) - generated_samples = {metric: generated_samples[metric] for metric in requested_metrics} + requested_metrics = self.metric_id_mapper(sample_type_ids, generated_samples) + # generated_samples = {metric: generated_samples[metric] for metric in requested_metrics} - return (time.time(), resource_key, generated_samples) + return (time.time(), resource_key, requested_metrics) - def metric_id_mapper(self, sample_type_ids): + def metric_id_mapper(self, sample_type_ids, metric_dict): """ Maps the sample type IDs to the corresponding metric names. @@ -111,19 +111,19 @@ class SyntheticMetricsGenerator(): metric_names = [] for sample_type_id in sample_type_ids: if sample_type_id == 102: - metric_names.append("packet_in") + metric_names.append(metric_dict["packet_in"]) elif sample_type_id == 101: - metric_names.append("packet_out") + metric_names.append(metric_dict["packet_out"]) elif sample_type_id == 103: - metric_names.append("packet_drop_count") + metric_names.append(metric_dict["packet_drop_count"]) elif sample_type_id == 202: - metric_names.append("bytes_in") + metric_names.append(metric_dict["bytes_in"]) elif sample_type_id == 201: - metric_names.append("bytes_out") + metric_names.append(metric_dict["bytes_out"]) elif sample_type_id == 203: - metric_names.append("byte_drop_count") + metric_names.append(metric_dict["byte_drop_count"]) elif sample_type_id == 701: - metric_names.append("latency") + metric_names.append(metric_dict["latency"]) else: raise ValueError(f"Invalid sample type ID: {sample_type_id}") return metric_names diff --git a/src/telemetry/backend/service/EmulatedCollector.py b/src/telemetry/backend/service/EmulatedCollector.py deleted file mode 100644 index cffff516f..000000000 --- a/src/telemetry/backend/service/EmulatedCollector.py +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 numpy as np -import random -import threading -import time -import logging -import queue - -LOGGER = logging.getLogger(__name__) - -class NetworkMetricsEmulator(threading.Thread): - """ - This collector class will generate a single emulated metric value. - """ - def __init__(self, interval=1, duration=10, metric_queue=None, network_state="moderate"): - LOGGER.info("Initiaitng Emulator") - super().__init__() - self.interval = interval - self.duration = duration - self.metric_queue = metric_queue if metric_queue is not None else queue.Queue() - self.network_state = network_state - self.running = True - self.base_utilization = None - self.states = None - self.state_probabilities = None - self.set_inital_parameter_values() - - def set_inital_parameter_values(self): - self.states = ["good", "moderate", "poor"] - self.state_probabilities = { - "good" : [0.9, 0.1, 0.0], - "moderate": [0.2, 0.7, 0.1], - "poor" : [0.0, 0.3, 0.7] - } - if self.network_state == "good": - self.base_utilization = random.uniform(700, 900) - elif self.network_state == "moderate": - self.base_utilization = random.uniform(300, 700) - else: - self.base_utilization = random.uniform(100, 300) - - def generate_synthetic_data_point(self): - if self.network_state == "good": - variance = random.uniform(-5, 5) - elif self.network_state == "moderate": - variance = random.uniform(-50, 50) - elif self.network_state == "poor": - variance = random.uniform(-100, 100) - else: - raise ValueError("Invalid network state. Must be 'good', 'moderate', or 'poor'.") - self.base_utilization += variance - - period = 60 * 60 * random.uniform(10, 100) - amplitude = random.uniform(50, 100) - sin_wave = amplitude * np.sin(2 * np.pi * 100 / period) + self.base_utilization - random_noise = random.uniform(-10, 10) - utilization = sin_wave + random_noise - - state_prob = self.state_probabilities[self.network_state] - self.network_state = random.choices(self.states, state_prob)[0] - - return utilization - - def run(self): - while self.running and (self.duration == -1 or self.duration > 0): - utilization = self.generate_synthetic_data_point() - self.metric_queue.put(round(utilization,3)) - time.sleep(self.interval) - if self.duration > 0: - self.duration -= self.interval - if self.duration == -1: - self.duration = 0 - LOGGER.debug("Emulator collector is stopped.") - self.stop() - - def stop(self): - self.running = False - if not self.is_alive(): - LOGGER.debug("Emulator Collector is Termintated.") diff --git a/src/telemetry/backend/service/EmulatedCollectorMultiple.py b/src/telemetry/backend/service/EmulatedCollectorMultiple.py deleted file mode 100644 index 5be634dea..000000000 --- a/src/telemetry/backend/service/EmulatedCollectorMultiple.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 numpy as np -import random -import threading -import time -import logging -import queue - -LOGGER = logging.getLogger(__name__) - -class NetworkMetricsEmulator(threading.Thread): - """ - This collector class will generate the emulated metrics for PKT_IN, PKT_OUT, BYTES_IN, BYTES_OUT and PKT_DROP as a list. - """ - def __init__(self, interval=1, duration=10, metric_queue=None, network_state="moderate"): - LOGGER.info("Initiaitng Emulator") - super().__init__() - self.interval = interval - self.duration = duration - self.metric_queue = metric_queue if metric_queue is not None else queue.Queue() - self.network_state = network_state - self.running = True - self.set_inital_parameter_values() - - def set_inital_parameter_values(self): - self.bytes_per_pkt = random.uniform(65, 150) - self.states = ["good", "moderate", "poor"] - self.state_probabilities = { - "good" : [0.8, 0.2, 0.0], - "moderate": [0.2, 0.6, 0.2], - "poor" : [0.0, 0.4, 0.6] - } - if self.network_state == "good": - self.packet_in = random.uniform(700, 900) - elif self.network_state == "moderate": - self.packet_in = random.uniform(300, 700) - else: - self.packet_in = random.uniform(100, 300) - - def generate_synthetic_data_point(self): - if self.network_state == "good": - packet_loss = random.uniform(0.01, 0.1) - random_noise = random.uniform(1,10) - elif self.network_state == "moderate": - packet_loss = random.uniform(0.1, 1) - random_noise = random.uniform(10, 40) - elif self.network_state == "poor": - packet_loss = random.uniform(1, 3) - random_noise = random.uniform(40, 100) - else: - raise ValueError("Invalid network state. Must be 'good', 'moderate', or 'poor'.") - # self.packet_in += random_noise - - period = 60 * 60 * random.uniform(10, 100) - amplitude = random.uniform(50, 100) - sin_wave = amplitude * np.sin(2 * np.pi * 100 / period) + self.packet_in - packet_in = sin_wave + ((sin_wave/100) * random_noise) - packet_out = packet_in - ((packet_in / 100) * packet_loss) - bytes_in = packet_in * self.bytes_per_pkt - bytes_out = packet_out * self.bytes_per_pkt - - state_prob = self.state_probabilities[self.network_state] - self.network_state = random.choices(self.states, state_prob)[0] - print (self.network_state) - - return [float(packet_in), float(packet_out), float(bytes_in), float(bytes_out), float(packet_loss)] - # return packet_in - - def run(self): - while self.running and (self.duration == -1 or self.duration > 0): - packet_in = self.generate_synthetic_data_point() - self.metric_queue.put(packet_in) - time.sleep(self.interval) - if self.duration > 0: - self.duration -= self.interval - if self.duration == -1: - self.duration = 0 - LOGGER.debug("Emulator collector is stopped.") - self.stop() - - def stop(self): - self.running = False - if not self.is_alive(): - print("Thread is terminated.") diff --git a/src/telemetry/backend/tests/messages_emulated.py b/src/telemetry/backend/tests/messages_emulated.py index 451792327..fa4ddba1b 100644 --- a/src/telemetry/backend/tests/messages_emulated.py +++ b/src/telemetry/backend/tests/messages_emulated.py @@ -26,7 +26,7 @@ def create_test_configuration(): {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { "endpoints": [ {"uuid": "eth0", "type": "ethernet", "sample_types": [101, 102]}, - {"uuid": "eth1", "type": "ethernet", "sample_types": [201, 202]}, + {"uuid": "eth1", "type": "ethernet", "sample_types": []}, {"uuid": "13/1/2", "type": "copper", "sample_types": [101, 102, 201, 202]} ] }}}, @@ -42,19 +42,14 @@ def create_test_configuration(): ] } -# This method is used to create a specific configuration to be used in the test case test_get_config in the test_EmulatedDriver.py file def create_specific_config_keys(): - # config = create_test_configuration() keys_to_return = ["_connect/settings/endpoints/eth1", "/interface/[13/1/2]/settings", "_connect/address"] return keys_to_return - # return {rule["custom"]["resource_key"]: rule["custom"]["resource_value"] for rule in config["config_rules"] if rule["custom"]["resource_key"] in keys_to_return} -# write a method to create a specific configuration to be used in the test case test_delete_config in the test_EmulatedDriver1.py file def create_config_for_delete(): keys_to_delete = ["_connect/settings/endpoints/eth0", "/interface/[eth1]", "_connect/port"] return keys_to_delete -# write a method to generate subscription for specific endpoints. def create_test_subscriptions(): return [("_connect/settings/endpoints/eth1", 10, 2), ("_connect/settings/endpoints/13/1/2", 15, 3), @@ -63,4 +58,4 @@ def create_test_subscriptions(): def create_unscubscribe_subscriptions(): return [("_connect/settings/endpoints/eth1", 10, 2), ("_connect/settings/endpoints/13/1/2", 15, 3), - ("_connect/settings/endpoints/eth0", 8, 2)] \ No newline at end of file + ("_connect/settings/endpoints/eth0", 8, 2)] -- GitLab From 2ee1dcfd4a20708fe49710857aec2069035b31b1 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Tue, 7 Jan 2025 11:13:16 +0000 Subject: [PATCH 160/463] Add APScheduler dependency to telemetry backend requirements file. --- src/telemetry/backend/requirements.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/telemetry/backend/requirements.in b/src/telemetry/backend/requirements.in index bf2600a2c..4c5921998 100644 --- a/src/telemetry/backend/requirements.in +++ b/src/telemetry/backend/requirements.in @@ -15,3 +15,4 @@ anytree==2.8.0 confluent-kafka==2.3.* numpy==2.0.1 +APScheduler==3.10.1 -- GitLab From c09c401ac67dac3e1764e3106b214a40bcba833b Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Tue, 7 Jan 2025 11:27:22 +0000 Subject: [PATCH 161/463] Refactor TelemetryBackendService to comment out emulator collector implementation. - New implementation will be added soon. --- .../service/TelemetryBackendService.py | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/telemetry/backend/service/TelemetryBackendService.py b/src/telemetry/backend/service/TelemetryBackendService.py index b286519dc..559ba3c32 100755 --- a/src/telemetry/backend/service/TelemetryBackendService.py +++ b/src/telemetry/backend/service/TelemetryBackendService.py @@ -27,7 +27,6 @@ from common.Settings import get_service_port_grpc from common.method_wrappers.Decorator import MetricsPool from common.tools.kafka.Variables import KafkaConfig, KafkaTopic from common.tools.service.GenericGrpcService import GenericGrpcService -from telemetry.backend.service.EmulatedCollector import NetworkMetricsEmulator LOGGER = logging.getLogger(__name__) METRICS_POOL = MetricsPool('TelemetryBackend', 'backendService') @@ -87,23 +86,23 @@ class TelemetryBackendService(GenericGrpcService): """ Method receives collector request and initiates collecter backend. """ - LOGGER.info("Initiating backend for collector: {:s}".format(str(collector_id))) - start_time = time.time() - self.emulatorCollector = NetworkMetricsEmulator( - duration = collector['duration'], - interval = collector['interval'], - metric_queue = self.metric_queue - ) - self.emulatorCollector.start() - self.running_threads[collector_id] = self.emulatorCollector + LOGGER.info("Initiating backend for collector: (Not Implemented... In progress ) {:s}".format(str(collector_id))) + # start_time = time.time() + # self.emulatorCollector = NetworkMetricsEmulator( + # duration = collector['duration'], + # interval = collector['interval'], + # metric_queue = self.metric_queue + # ) + # self.emulatorCollector.start() + # self.running_threads[collector_id] = self.emulatorCollector - while self.emulatorCollector.is_alive(): - if not self.metric_queue.empty(): - metric_value = self.metric_queue.get() - LOGGER.debug("Metric: {:} - Value : {:}".format(collector['kpi_id'], metric_value)) - self.GenerateKpiValue(collector_id, collector['kpi_id'] , metric_value) - time.sleep(1) - self.TerminateCollectorBackend(collector_id) + # while self.emulatorCollector.is_alive(): + # if not self.metric_queue.empty(): + # metric_value = self.metric_queue.get() + # LOGGER.debug("Metric: {:} - Value : {:}".format(collector['kpi_id'], metric_value)) + # self.GenerateKpiValue(collector_id, collector['kpi_id'] , metric_value) + # time.sleep(1) + # self.TerminateCollectorBackend(collector_id) def GenerateKpiValue(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): """ -- GitLab From 7c6bffe5eaa6a4ff6d7db360cf53fef790af2ae4 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 7 Jan 2025 15:46:50 +0000 Subject: [PATCH 162/463] E2E Orchetsrator component: - Code cleanup --- .../E2EOrchestratorServiceServicerImpl.py | 93 +++++++++---------- 1 file changed, 42 insertions(+), 51 deletions(-) diff --git a/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py index 47307b12c..4878d4788 100644 --- a/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py +++ b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py @@ -12,29 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -import copy -import requests +import copy, grpc, json, logging, networkx, requests, threading from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.proto.e2eorchestrator_pb2 import E2EOrchestratorRequest, E2EOrchestratorReply from common.proto.context_pb2 import ( Empty, Connection, EndPointId, Link, LinkId, TopologyDetails, Topology, Context, Service, ServiceId, ServiceTypeEnum, ServiceStatusEnum) from common.proto.e2eorchestrator_pb2_grpc import E2EOrchestratorServiceServicer +from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME from common.Settings import get_setting from context.client.ContextClient import ContextClient -from service.client.ServiceClient import ServiceClient from context.service.database.uuids.EndPoint import endpoint_get_uuid from context.service.database.uuids.Device import device_get_uuid -from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest -from common.tools.grpc.Tools import grpc_message_to_json_string -import grpc -import json -import logging -import networkx as nx -from threading import Thread +from service.client.ServiceClient import ServiceClient from websockets.sync.client import connect from websockets.sync.server import serve -from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME LOGGER = logging.getLogger(__name__) @@ -48,53 +42,46 @@ context_client: ContextClient = ContextClient() service_client: ServiceClient = ServiceClient() EXT_HOST = str(get_setting('WS_IP_HOST')) -EXT_PORT = str(get_setting('WS_IP_PORT')) +EXT_PORT = int(get_setting('WS_IP_PORT')) +EXT_URL = 'ws://{:s}:{:d}'.format(EXT_HOST, EXT_PORT) OWN_HOST = str(get_setting('WS_E2E_HOST')) -OWN_PORT = str(get_setting('WS_E2E_PORT')) - +OWN_PORT = int(get_setting('WS_E2E_PORT')) -ALL_HOSTS = "0.0.0.0" +ALL_HOSTS = '0.0.0.0' -class SubscriptionServer(Thread): - def __init__(self): - Thread.__init__(self) - +class SubscriptionServer(threading.Thread): def run(self): - url = "ws://" + EXT_HOST + ":" + EXT_PORT request = VNTSubscriptionRequest() request.host = OWN_HOST request.port = OWN_PORT try: - LOGGER.debug("Trying to connect to {}".format(url)) - websocket = connect(url) - except Exception as ex: - LOGGER.error('Error connecting to {}'.format(url)) + LOGGER.debug('Trying to connect to {:s}'.format(EXT_URL)) + websocket = connect(EXT_URL) + except: # pylint: disable=bare-except + LOGGER.exception('Error connecting to {:s}'.format(EXT_URL)) else: with websocket: - LOGGER.debug("Connected to {}".format(url)) + LOGGER.debug('Connected to {:s}'.format(EXT_URL)) send = grpc_message_to_json_string(request) websocket.send(send) - LOGGER.debug("Sent: {}".format(send)) + LOGGER.debug('Sent: {:s}'.format(send)) try: message = websocket.recv() - LOGGER.debug("Received message from WebSocket: {}".format(message)) + LOGGER.debug('Received message from WebSocket: {:s}'.format(message)) except Exception as ex: - LOGGER.error('Exception receiving from WebSocket: {}'.format(ex)) + LOGGER.error('Exception receiving from WebSocket: {:s}'.format(ex)) self._events_server() def _events_server(self): - all_hosts = "0.0.0.0" - try: - server = serve(self._event_received, all_hosts, int(OWN_PORT)) - except Exception as ex: - LOGGER.error('Error starting server on {}:{}'.format(all_hosts, OWN_PORT)) - LOGGER.error('Exception!: {}'.format(ex)) + server = serve(self._event_received, ALL_HOSTS, int(OWN_PORT)) + except: # pylint: disable=bare-except + LOGGER.exception('Error starting server on {:s}:{:d}'.format(ALL_HOSTS, OWN_PORT)) else: with server: - LOGGER.info("Running events server...: {}:{}".format(all_hosts, OWN_PORT)) + LOGGER.info('Running events server...: {:s}:{:d}'.format(ALL_HOSTS, OWN_PORT)) server.serve_forever() @@ -178,32 +165,36 @@ class SubscriptionServer(Thread): class E2EOrchestratorServiceServicerImpl(E2EOrchestratorServiceServicer): def __init__(self): - LOGGER.debug("Creating Servicer...") + LOGGER.debug('Creating Servicer...') try: - LOGGER.debug("Requesting subscription") + LOGGER.debug('Requesting subscription') sub_server = SubscriptionServer() sub_server.start() - LOGGER.debug("Servicer Created") + LOGGER.debug('Servicer Created') self.retrieve_external_topologies() - except Exception as ex: - LOGGER.info("Exception!: {}".format(ex)) + except: + LOGGER.exception('Unhandled Exception') def retrieve_external_topologies(self): i = 1 while True: try: - ADD = str(get_setting(f'EXT_CONTROLLER{i}_ADD')) - PORT = str(get_setting(f'EXT_CONTROLLER{i}_PORT')) - except Exception as e: + ADD = str(get_setting(f'EXT_CONTROLLER{i}_ADD')) + PORT = int(get_setting(f'EXT_CONTROLLER{i}_PORT')) + except: # pylint: disable=bare-except break + try: - LOGGER.info(f'Retrieving external controller #{i}') - url = f'http://{ADD}:{PORT}/tfs-api/context/{DEFAULT_CONTEXT_NAME}/topology_details/{DEFAULT_TOPOLOGY_NAME}' - LOGGER.info(f'url= {url}') + LOGGER.info('Retrieving external controller #{:d}'.format(i)) + url = 'http://{:s}:{:d}/tfs-api/context/{:s}/topology_details/{:s}'.format( + ADD, PORT, DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME + ) + LOGGER.info('url={:s}'.format(str(url))) topo = requests.get(url).json() - LOGGER.info(f'Retrieved external controller #{i}') - except Exception as e: - LOGGER.info(f'Exception retrieven topology from external controler #{i}: {e}') + LOGGER.info('Retrieved external controller #{:d}'.format(i)) + except: # pylint: disable=bare-except + LOGGER.exception('Exception retrieven topology from external controler #{:d}'.format(i)) + topology_details = TopologyDetails(**topo) context = Context() context.context_id.context_uuid.uuid = topology_details.topology_id.context_id.context_uuid.uuid @@ -229,7 +220,7 @@ class E2EOrchestratorServiceServicerImpl(E2EOrchestratorServiceServicer): for endpoint_id in request.service.service_endpoint_ids: endpoints_ids.append(endpoint_get_uuid(endpoint_id)[2]) - graph = nx.Graph() + graph = networkx.Graph() devices = context_client.ListDevices(Empty()).devices @@ -253,7 +244,7 @@ class E2EOrchestratorServiceServicerImpl(E2EOrchestratorServiceServicer): graph.add_edge(eps[0], eps[1]) - shortest = nx.shortest_path(graph, endpoints_ids[0], endpoints_ids[1]) + shortest = networkx.shortest_path(graph, endpoints_ids[0], endpoints_ids[1]) path = E2EOrchestratorReply() path.services.append(copy.deepcopy(request.service)) -- GitLab From 696843569c0f174ad1416c0a78a48c88cad73e27 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Wed, 8 Jan 2025 15:38:45 +0000 Subject: [PATCH 163/463] Updated Telemetry backend emulator - Refactor telemetry tests to comment out unused test cases - add EmulatedDriverHelper class for resource key validation. --- .../{drivers/core => driver_api}/_Driver.py | 0 .../{drivers/core => driver_api}/__init__.py | 0 .../drivers/emulated/EmulatedDriver.py | 625 +++++++----------- .../drivers/emulated/EmulatedHelper.py | 166 +++++ src/telemetry/backend/tests/test_emulated.py | 47 +- 5 files changed, 447 insertions(+), 391 deletions(-) rename src/telemetry/backend/{drivers/core => driver_api}/_Driver.py (100%) rename src/telemetry/backend/{drivers/core => driver_api}/__init__.py (100%) create mode 100644 src/telemetry/backend/drivers/emulated/EmulatedHelper.py diff --git a/src/telemetry/backend/drivers/core/_Driver.py b/src/telemetry/backend/driver_api/_Driver.py similarity index 100% rename from src/telemetry/backend/drivers/core/_Driver.py rename to src/telemetry/backend/driver_api/_Driver.py diff --git a/src/telemetry/backend/drivers/core/__init__.py b/src/telemetry/backend/driver_api/__init__.py similarity index 100% rename from src/telemetry/backend/drivers/core/__init__.py rename to src/telemetry/backend/driver_api/__init__.py diff --git a/src/telemetry/backend/drivers/emulated/EmulatedDriver.py b/src/telemetry/backend/drivers/emulated/EmulatedDriver.py index 0c5712ffe..103753b03 100644 --- a/src/telemetry/backend/drivers/emulated/EmulatedDriver.py +++ b/src/telemetry/backend/drivers/emulated/EmulatedDriver.py @@ -12,7 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from telemetry.backend.drivers.core._Driver import _Driver +import pytz +import queue +import logging +import uuid +import json +from telemetry.backend.drivers.emulated.EmulatedHelper import EmulatedDriverHelper +from telemetry.backend.driver_api._Driver import _Driver from anytree import Node, Resolver from apscheduler.events import EVENT_JOB_ADDED, EVENT_JOB_REMOVED from apscheduler.schedulers.background import BackgroundScheduler @@ -21,11 +27,7 @@ from apscheduler.executors.pool import ThreadPoolExecutor from datetime import datetime, timedelta from typing import Any, Iterator, List, Tuple, Union, Optional from .SyntheticMetricsGenerator import SyntheticMetricsGenerator -import pytz -import queue -import logging -import uuid -import json + logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') @@ -36,11 +38,11 @@ class EmulatedDriver(_Driver): """ def __init__(self, address: str, port: int, **settings): super().__init__('emulated_driver', address, port, **settings) - self._initial_config = Node('root') # Tree structure for initial config - self._running_config = Node('root') # Tree structure for running config - self._subscriptions = Node('subscriptions') # Tree for state subscriptions - self._resolver = Resolver() # For path resolution in tree structures - self._out_samples = queue.Queue() # Queue to hold synthetic state samples + self._initial_config = Node('root') # Tree structure for initial config + self._running_config = Node('root') # Tree structure for running config + self._subscriptions = Node('subscriptions') # Tree for state subscriptions + self._resolver = Resolver() # For path resolution in tree structures + self._out_samples = queue.Queue() # Queue to hold synthetic state samples self._synthetic_data = SyntheticMetricsGenerator(metric_queue=self._out_samples) # Placeholder for synthetic data generator self._scheduler = BackgroundScheduler(daemon=True) self._scheduler.configure( @@ -50,9 +52,10 @@ class EmulatedDriver(_Driver): ) self._scheduler.add_listener(self._listener_job_added_to_subscription_tree, EVENT_JOB_ADDED) self._scheduler.add_listener(self._listener_job_removed_from_subscription_tree, EVENT_JOB_REMOVED) + self._helper_methods = EmulatedDriverHelper() self.logger = logging.getLogger(__name__) - self.connected = False # To track connection state + self.connected = False # To track connection state self.logger.info("EmulatedDriver initialized") def Connect(self) -> bool: @@ -76,331 +79,11 @@ class EmulatedDriver(_Driver): if not self.connected: raise RuntimeError("Driver is not connected. Please connect before performing operations.") -# ------------- GetConfig, SetConfig, DeleteConfig, with helper methods (START)----------------- - - def GetInitialConfig(self) -> List[Tuple[str, Any]]: - self._require_connection() - results = [] - for node in self._initial_config.descendants: - value = getattr(node, "value", None) - results.append((node.name, json.loads(value) if value else None)) - self.logger.info("Retrieved initial configurations") - return results - - def GetConfig(self, resource_keys: List[str] = []) -> List[Tuple[str, Union[Any, dict, Exception]]]: - """ - Retrieves the configuration for the specified resource keys. - If no keys are provided, returns the full configuration tree. - - Args: - resource_keys (List[str]): A list of keys specifying the configuration to retrieve. - - Returns: - List[Tuple[str, Union[Any, dict, Exception]]]: A list of tuples with the resource key and its value, - subtree, or an exception. - """ - self._require_connection() - results = [] - - try: - if not resource_keys: - # If no specific keys are provided, return the full configuration tree - full_tree = self._generate_subtree(self._running_config) - return [("full_configuration", full_tree)] - - for key in resource_keys: - try: - # Parse the resource key - resource_path = self._parse_resource_key(key) - self.logger.info(f"1. Retrieving configuration for resource path : {resource_path}") - - # Navigate to the node corresponding to the key - parent = self._running_config - for part in resource_path: - parent = self._find_or_raise_node(part, parent) - - # Check if the node has a value - value = getattr(parent, "value", None) - if value: - # If a value exists, return it - results.append((key, json.loads(value))) - else: - # If no value, return the subtree of this node - subtree = self._generate_subtree(parent) - results.append((key, subtree)) - - except Exception as e: - self.logger.exception(f"Failed to retrieve configuration for key: {key}") - results.append((key, e)) - - except Exception as e: - self.logger.exception("Failed to retrieve configurations") - results.append(("Error", e)) - - return results - - def SetConfig(self, config: dict) -> List[Union[bool, Exception]]: - self._require_connection() - results = [] - - if not isinstance(config, dict): - self.logger.error("Invalid configuration format: config must be a dictionary.") - raise ValueError("Invalid configuration format. Must be a dictionary.") - if 'config_rules' not in config or not isinstance(config['config_rules'], list): - self.logger.error("Invalid configuration format: 'config_rules' key missing or not a list.") - raise ValueError("Invalid configuration format. Must contain a 'config_rules' key with a list of rules.") - - for rule in config['config_rules']: - try: - if 'action' not in rule or 'custom' not in rule: - raise ValueError(f"Invalid rule format: {rule}") - - action = rule['action'] - custom = rule['custom'] - resource_key = custom.get('resource_key') - resource_value = custom.get('resource_value') - - if not resource_key: - raise ValueError(f"Resource key is missing in rule: {rule}") - - if resource_value is None: - raise ValueError(f"Resource value is None for key: {resource_key}") - if not resource_key: - raise ValueError(f"Resource key is missing in rule: {rule}") - - if action == 1: # Set action - resource_path = self._parse_resource_key(resource_key) - # self.logger.info(f"1. Setting configuration for resource key {resource_key} and resource_path: {resource_path}") - parent = self._running_config - - for part in resource_path[:-1]: - if '[' in part and ']' in part: - base, index = part.split('[', 1) - index = index.rstrip(']') - parent = self._find_or_create_node(index, self._find_or_create_node(base, parent)) - # self.logger.info(f"2a. Creating node: {base}, {index}, {parent}") - elif resource_path[-1] != 'settings': - # self.logger.info(f"2b. Creating node: {part}") - parent = self._find_or_create_node(part, parent) - - final_part = resource_path[-1] - if final_part in ['address', 'port']: - self._create_or_update_node(final_part, parent, resource_value) - self.logger.info(f"Configured: {resource_key} = {resource_value}") - - if resource_key.startswith("_connect/settings"): - parent = self._find_or_create_node("_connect", self._running_config) - settings_node = self._find_or_create_node("settings", parent) - settings_node.value = None # Ensure settings node has None value - endpoints_node = self._find_or_create_node("endpoints", settings_node) - - for endpoint in resource_value.get("endpoints", []): - uuid = endpoint.get("uuid") - uuid = uuid.replace('/', '_') if uuid else None - if uuid: - # self.logger.info(f"3. Creating endpoint: {uuid}, {endpoint}, {endpoints_node}") - self._create_or_update_node(uuid, endpoints_node, endpoint) - self.logger.info(f"Configured endpoint: {uuid} : {endpoint}") - - elif resource_key.startswith("/interface"): - interface_parent = self._find_or_create_node("interface", self._running_config) - name = resource_value.get("name") - name = name.replace('/', '_') if name else None - if name: - self._create_or_update_node(name, interface_parent, resource_value) - self.logger.info(f"Configured interface: {name} : {resource_value}") - # self.logger.info(f"4. Configured interface: {name}") - - results.append(True) - else: - raise ValueError(f"Unsupported action '{action}' in rule: {rule}") - - if resource_value is None: - raise ValueError(f"Resource value is None for key: {resource_key}") - - except Exception as e: - self.logger.exception(f"Failed to apply rule: {rule}") - results.append(e) - - return results - - def _generate_subtree(self, node: Node) -> dict: - """ - Generates a subtree of the configuration tree starting from the specified node. - - Args: - node (Node): The node from which to generate the subtree. - - Returns: - dict: The subtree as a dictionary. - """ - subtree = {} - for child in node.children: - if child.children: - subtree[child.name] = self._generate_subtree(child) - else: - value = getattr(child, "value", None) - subtree[child.name] = json.loads(value) if value else None - return subtree - - def DeleteConfig(self, resource_keys: List[str]) -> List[Union[bool, Exception]]: - self._require_connection() - results = [] - - for key in resource_keys: - try: - # Parse resource key into parts, handling brackets correctly - resource_path = self._parse_resource_key(key) - - parent = self._running_config - for part in resource_path: - parent = self._find_or_raise_node(part, parent) - - # Delete the final node - node_to_delete = parent - parent = node_to_delete.parent - parent.children = tuple(child for child in parent.children if child != node_to_delete) - self.logger.info(f"Deleted configuration for key: {key}") - - # Handle endpoints structure - if "interface" in key and "settings" in key: - interface_name = key.split('[')[-1].split(']')[0] - endpoints_parent = self._find_or_raise_node("_connect", self._running_config) - endpoints_node = self._find_or_raise_node("endpoints", endpoints_parent) - endpoint_to_delete = next((child for child in endpoints_node.children if child.name == interface_name), None) - if endpoint_to_delete: - endpoints_node.children = tuple(child for child in endpoints_node.children if child != endpoint_to_delete) - self.logger.info(f"Removed endpoint entry for interface '{interface_name}'") - - # Check if parent has no more children and is not the root - while parent and parent.name != "root" and not parent.children: - node_to_delete = parent - parent = node_to_delete.parent - parent.children = tuple(child for child in parent.children if child != node_to_delete) - self.logger.info(f"Deleted empty parent node: {node_to_delete.name}") - - results.append(True) - except Exception as e: - self.logger.exception(f"Failed to delete configuration for key: {key}") - results.append(e) - - return results - - def _parse_resource_key(self, resource_key: str) -> List[str]: - """ - Parses the resource key into parts, correctly handling brackets. - - Args: - resource_key (str): The resource key to parse. - - Returns: - List[str]: A list of parts from the resource key. - """ - resource_path = [] - current_part = "" - in_brackets = False - - if not resource_key.startswith('/interface'): - for char in resource_key.strip('/'): - if char == '[': - in_brackets = True - current_part += char - elif char == ']': - in_brackets = False - current_part += char - elif char == '/' and not in_brackets: - resource_path.append(current_part) - current_part = "" - else: - current_part += char - if current_part: - resource_path.append(current_part) - return resource_path - else: - resource_path = resource_key.strip('/').split('/', 1) - if resource_path[1] == 'settings': - return resource_path - else: - resource_path = [resource_key.strip('/').split('[')[0].strip('/'), resource_key.strip('/').split('[')[1].split(']')[0].replace('/', '_')] - return resource_path - - def _find_or_raise_node(self, name: str, parent: Node) -> Node: - """ - Finds a node with the given name under the specified parent or raises an exception if not found. - - Args: - name (str): The name of the node to find. - parent (Node): The parent node. - - Returns: - Node: The found node. - - Raises: - ValueError: If the node is not found. - """ - node = next((child for child in parent.children if child.name == name), None) - if not node: - raise ValueError(f"Node '{name}' not found under parent '{parent.name}'.") - return node - - def _find_or_create_node(self, name: str, parent: Node) -> Node: - """ - Finds or creates a node with the given name under the specified parent. - - Args: - name (str): The name of the node to find or create. - parent (Node): The parent node. - - Returns: - Node: The found or created node. - """ - node = next((child for child in parent.children if child.name == name), None) - if not node: - node = Node(name, parent=parent) - return node - - def _create_or_update_node(self, name: str, parent: Node, value: Any): - """ - Creates or updates a node with the given name and value under the specified parent. - - Args: - name (str): The name of the node. - parent (Node): The parent node. - value (Any): The value to set on the node. - """ - node = next((child for child in parent.children if child.name == name), None) - if node: - node.value = json.dumps(value) - else: - Node(name, parent=parent, value=json.dumps(value)) - - def validate_resource_key(self, key: str) -> str: - """ - Splits the input string into two parts: - - The first part is '_connect/settings/endpoints/'. - - The second part is the remaining string after the first part, with '/' replaced by '_'. - - Args: - key (str): The input string to process. - - Returns: - str: A single string with the processed result. - """ - prefix = '_connect/settings/endpoints/' - if not key.startswith(prefix): - raise ValueError(f"The input path '{key}' does not start with the expected prefix: {prefix}") - second_part = key[len(prefix):] - second_part_processed = second_part.replace('/', '_') - validated_key = prefix + second_part_processed - return validated_key - -# ------------- GetConfig, SetConfig, DeleteConfig, with helper methods (END)----------------- - def SubscribeState(self, subscriptions: List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: self._require_connection() results = [] for resource_key, duration, interval in subscriptions: - resource_key = self.validate_resource_key(resource_key) # Validate the endpoint name + resource_key = self._helper_methods.validate_resource_key(resource_key) # Validate the endpoint name self.logger.info(f"1. Subscribing to {resource_key} with duration {duration}s and interval {interval}s") try: self._resolver.get(self._running_config, resource_key) # Verify if the resource key exists in the running configuration @@ -409,8 +92,13 @@ class EmulatedDriver(_Driver): if resource_value is not None: sample_type_ids = resource_value['sample_types'] self.logger.info(f"Sample type IDs for {resource_key}: {sample_type_ids}") + if len(sample_type_ids) == 0: + self.logger.warning(f"No sample types found for {resource_key}. Skipping subscription.") + results.append(False) + continue else: self.logger.warning(f"No sample types found for {resource_key}. Skipping subscription.") + results.append(False) continue # Add the job to the scheduler job_id = f"{resource_key}-{uuid.uuid4()}" @@ -434,7 +122,7 @@ class EmulatedDriver(_Driver): self._require_connection() results = [] for resource_key, _, _ in subscriptions: - resource_key = self.validate_resource_key(resource_key) + resource_key = self._helper_methods.validate_resource_key(resource_key) try: # Check if job exists job_ids = [job.id for job in self._scheduler.get_jobs() if resource_key in job.id] @@ -453,7 +141,7 @@ class EmulatedDriver(_Driver): results.append(e) return results - def GetState(self, blocking: bool = False, terminate: Optional[queue.Queue] = None) -> Iterator[Tuple[str, Any]]: + def GetState(self, blocking: bool = False, terminate: Optional[queue.Queue] = None) -> Iterator[Tuple[float, str, Any]]: self._require_connection() start_time = datetime.now(pytz.utc) duration = 10 # Duration of the subscription in seconds (as an example) @@ -478,7 +166,6 @@ class EmulatedDriver(_Driver): return None def _generate_sample(self, resource_key: str, sample_type_ids : List[int]): - self._require_connection() # Simulate generating a sample for the resource key self.logger.debug(f"Executing _generate_sample for resource: {resource_key}") sample = self._synthetic_data.generate_synthetic_data_point(resource_key, sample_type_ids) @@ -490,7 +177,7 @@ class EmulatedDriver(_Driver): if event.job_id: # Extract the resource key from the job ID resource_key = event.job_id.split('-')[0] - resource_key = self.validate_resource_key(resource_key) + resource_key = self._helper_methods.validate_resource_key(resource_key) # Remove the subscription from the tree try: @@ -502,7 +189,7 @@ class EmulatedDriver(_Driver): raise ValueError(f"Subscription path '{resource_key}' not found in tree.") if parent: parent.parent.children = tuple(child for child in parent.parent.children if child != parent) - self.logger.info(f"Automatically removed subscription from subscription_tree for {resource_key} after job termination by listener.") + self.logger.warning(f"Automatically removed subscription from subscription_tree for {resource_key} after job termination by listener. Maybe due to timeout.") except Exception as e: self.logger.warning(f"Failed to remove subscription for {resource_key}: {e}") @@ -511,7 +198,7 @@ class EmulatedDriver(_Driver): job_id = event.job_id if job_id: resource_key = job_id.split('-')[0] # Extract resource key from job ID - resource_key = self.validate_resource_key(resource_key) + resource_key = self._helper_methods.validate_resource_key(resource_key) subscription_path = resource_key.split('/') parent = self._subscriptions for part in subscription_path: @@ -528,36 +215,238 @@ class EmulatedDriver(_Driver): # ------------- Event Listeners (END)----------------- - def log_active_jobs(self): - """ - Logs the IDs of all active jobs. - This method retrieves the list of active jobs from the scheduler and logs their IDs using the logger. - """ - self._require_connection() - jobs = self._scheduler.get_jobs() - self.logger.info(f"Active jobs: {[job.id for job in jobs]}") - - def print_config_tree(self): - """ - Reads the configuration using GetConfig and prints it as a hierarchical tree structure. - For debugging purposes. - """ +#------------------------------------------------------------------------------------- +# ------- The below methods are kept for debugging purposes (test-case) only --------- +#------------------------------------------------------------------------------------- + +# This method can be commented but this will arise an error in the test-case (@pytest.fixture --> connected_configured_driver()). + def SetConfig(self, resources: dict) -> List[Union[bool, Exception]]: # For debugging purposes. self._require_connection() + results = [] + + # if not isinstance(resources, dict): + # self.logger.error("Invalid configuration format: resources must be a dictionary.") + # raise ValueError("Invalid configuration format. Must be a dictionary.") + if 'config_rules' not in resources or not isinstance(resources['config_rules'], list): + self.logger.error("Invalid configuration format: 'config_rules' key missing or not a list.") + raise ValueError("Invalid configuration format. Must contain a 'config_rules' key with a list of rules.") + + for rule in resources['config_rules']: + try: + if 'action' not in rule or 'custom' not in rule: + raise ValueError(f"Invalid rule format: {rule}") + + action = rule['action'] + custom = rule['custom'] + resource_key = custom.get('resource_key') + resource_value = custom.get('resource_value') + + if not resource_key: + raise ValueError(f"Resource key is missing in rule: {rule}") + + if resource_value is None: + raise ValueError(f"Resource value is None for key: {resource_key}") + if not resource_key: + raise ValueError(f"Resource key is missing in rule: {rule}") + + if action == 1: # Set action + resource_path = self._helper_methods._parse_resource_key(resource_key) + # self.logger.info(f"1. Setting configuration for resource key {resource_key} and resource_path: {resource_path}") + parent = self._running_config + + for part in resource_path[:-1]: + if '[' in part and ']' in part: + base, index = part.split('[', 1) + index = index.rstrip(']') + parent = self._helper_methods._find_or_create_node(index, self._helper_methods._find_or_create_node(base, parent)) + # self.logger.info(f"2a. Creating node: {base}, {index}, {parent}") + elif resource_path[-1] != 'settings': + # self.logger.info(f"2b. Creating node: {part}") + parent = self._helper_methods._find_or_create_node(part, parent) + + final_part = resource_path[-1] + if final_part in ['address', 'port']: + self._helper_methods._create_or_update_node(final_part, parent, resource_value) + self.logger.info(f"Configured: {resource_key} = {resource_value}") + + if resource_key.startswith("_connect/settings"): + parent = self._helper_methods._find_or_create_node("_connect", self._running_config) + settings_node = self._helper_methods._find_or_create_node("settings", parent) + settings_node.value = None # Ensure settings node has None value + endpoints_node = self._helper_methods._find_or_create_node("endpoints", settings_node) + + for endpoint in resource_value.get("endpoints", []): + uuid = endpoint.get("uuid") + uuid = uuid.replace('/', '_') if uuid else None + if uuid: + # self.logger.info(f"3. Creating endpoint: {uuid}, {endpoint}, {endpoints_node}") + self._helper_methods._create_or_update_node(uuid, endpoints_node, endpoint) + self.logger.info(f"Configured endpoint: {uuid} : {endpoint}") + + elif resource_key.startswith("/interface"): + interface_parent = self._helper_methods._find_or_create_node("interface", self._running_config) + name = resource_value.get("name") + name = name.replace('/', '_') if name else None + if name: + self._helper_methods._create_or_update_node(name, interface_parent, resource_value) + self.logger.info(f"Configured interface: {name} : {resource_value}") + # self.logger.info(f"4. Configured interface: {name}") + + results.append(True) + else: + raise ValueError(f"Unsupported action '{action}' in rule: {rule}") + + if resource_value is None: + raise ValueError(f"Resource value is None for key: {resource_key}") + + except Exception as e: + self.logger.exception(f"Failed to apply rule: {rule}") + results.append(e) + + return results + +#----------------------------------- +# ------- EXTRA Methods ------------ +#----------------------------------- + + # def log_active_jobs(self): # For debugging purposes. + # """ + # Logs the IDs of all active jobs. + # This method retrieves the list of active jobs from the scheduler and logs their IDs using the logger. + # """ + # self._require_connection() + # jobs = self._scheduler.get_jobs() + # self.logger.info(f"Active jobs: {[job.id for job in jobs]}") + + # def print_config_tree(self): # For debugging purposes. + # """ + # Reads the configuration using GetConfig and prints it as a hierarchical tree structure. + # """ + # self._require_connection() + + # def print_tree(node, indent=""): + # """ + # Recursively prints the configuration tree. + + # Args: + # node (Node): The current node to print. + # indent (str): The current indentation level. + # """ + # if node.name != "root": # Skip the root node's name + # value = getattr(node, "value", None) + # print(f"{indent}- {node.name}: {json.loads(value) if value else ''}") + + # for child in node.children: + # print_tree(child, indent + " ") + + # print("Configuration Tree:") + # print_tree(self._running_config) + + + # def GetInitialConfig(self) -> List[Tuple[str, Any]]: # comment + # self._require_connection() + # results = [] + # for node in self._initial_config.descendants: + # value = getattr(node, "value", None) + # results.append((node.name, json.loads(value) if value else None)) + # self.logger.info("Retrieved initial configurations") + # return results + + # def GetConfig(self, resource_keys: List[str] = []) -> List[Tuple[str, Union[Any, dict, Exception]]]: # comment + # """ + # Retrieves the configuration for the specified resource keys. + # If no keys are provided, returns the full configuration tree. - def print_tree(node, indent=""): - """ - Recursively prints the configuration tree. - - Args: - node (Node): The current node to print. - indent (str): The current indentation level. - """ - if node.name != "root": # Skip the root node's name - value = getattr(node, "value", None) - print(f"{indent}- {node.name}: {json.loads(value) if value else ''}") + # Args: + # resource_keys (List[str]): A list of keys specifying the configuration to retrieve. - for child in node.children: - print_tree(child, indent + " ") + # Returns: + # List[Tuple[str, Union[Any, dict, Exception]]]: A list of tuples with the resource key and its value, + # subtree, or an exception. + # """ + # self._require_connection() + # results = [] + + # try: + # if not resource_keys: + # # If no specific keys are provided, return the full configuration tree + + # full_tree = self._helper_methods._generate_subtree(self._running_config) + # # full_tree = self._generate_subtree(self._running_config) + # return [("full_configuration", full_tree)] + + # for key in resource_keys: + # try: + # # Parse the resource key + # resource_path = self._helper_methods.(key) + # self.logger.info(f"1. Retrieving configuration for resource path : {resource_path}") + + # # Navigate to the node corresponding to the key + # parent = self._running_config + # for part in resource_path: + # parent = self._find_or_raise_node(part, parent) + + # # Check if the node has a value + # value = getattr(parent, "value", None) + # if value: + # # If a value exists, return it + # results.append((key, json.loads(value))) + # else: + # # If no value, return the subtree of this node + # subtree = self._helper_methods._generate_subtree(parent) + # # subtree = self._generate_subtree(parent) + # results.append((key, subtree)) + + # except Exception as e: + # self.logger.exception(f"Failed to retrieve configuration for key: {key}") + # results.append((key, e)) + + # except Exception as e: + # self.logger.exception("Failed to retrieve configurations") + # results.append(("Error", e)) + + # return results + + # def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: # comment + # self._require_connection() + # results = [] + + # for key in resources: + # try: + # # Parse resource key into parts, handling brackets correctly + # resource_path = self._helper_methods.(key) + + # parent = self._running_config + # for part in resource_path: + # parent = self._find_or_raise_node(part, parent) + + # # Delete the final node + # node_to_delete = parent + # parent = node_to_delete.parent + # parent.children = tuple(child for child in parent.children if child != node_to_delete) + # self.logger.info(f"Deleted configuration for key: {key}") + + # # Handle endpoints structure + # if "interface" in key and "settings" in key: + # interface_name = key.split('[')[-1].split(']')[0] + # endpoints_parent = self._find_or_raise_node("_connect", self._running_config) + # endpoints_node = self._find_or_raise_node("endpoints", endpoints_parent) + # endpoint_to_delete = next((child for child in endpoints_node.children if child.name == interface_name), None) + # if endpoint_to_delete: + # endpoints_node.children = tuple(child for child in endpoints_node.children if child != endpoint_to_delete) + # self.logger.info(f"Removed endpoint entry for interface '{interface_name}'") + + # # Check if parent has no more children and is not the root + # while parent and parent.name != "root" and not parent.children: + # node_to_delete = parent + # parent = node_to_delete.parent + # parent.children = tuple(child for child in parent.children if child != node_to_delete) + # self.logger.info(f"Deleted empty parent node: {node_to_delete.name}") + + # results.append(True) + # except Exception as e: + # self.logger.exception(f"Failed to delete configuration for key: {key}") + # results.append(e) + + # return results - print("Configuration Tree:") - print_tree(self._running_config) diff --git a/src/telemetry/backend/drivers/emulated/EmulatedHelper.py b/src/telemetry/backend/drivers/emulated/EmulatedHelper.py new file mode 100644 index 000000000..008ad95d6 --- /dev/null +++ b/src/telemetry/backend/drivers/emulated/EmulatedHelper.py @@ -0,0 +1,166 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from anytree import Node +import json +from typing import Any, List + + +class EmulatedDriverHelper: + """ + Helper class for the emulated driver. + """ + def __init__(self): + pass + + def validate_resource_key(self, key: str) -> str: + """ + Splits the input string into two parts: + - The first part is '_connect/settings/endpoints/'. + - The second part is the remaining string after the first part, with '/' replaced by '_'. + + Args: + key (str): The input string to process. + + Returns: + str: A single string with the processed result. + """ + prefix = '_connect/settings/endpoints/' + if not key.startswith(prefix): + raise ValueError(f"The input path '{key}' does not start with the expected prefix: {prefix}") + second_part = key[len(prefix):] + second_part_processed = second_part.replace('/', '_') + validated_key = prefix + second_part_processed + return validated_key + +#-------------------------------------------------------------------------------------- +# ------- Below function is kept for debugging purposes (test-cases) only ------------- +#-------------------------------------------------------------------------------------- + +# This below methods can be commented but are called by the SetConfig method in EmulatedDriver.py + + def _find_or_create_node(self, name: str, parent: Node) -> Node: + """ + Finds or creates a node with the given name under the specified parent. + + Args: + name (str): The name of the node to find or create. + parent (Node): The parent node. + + Returns: + Node: The found or created node. + """ + node = next((child for child in parent.children if child.name == name), None) + if not node: + node = Node(name, parent=parent) + return node + + + def _create_or_update_node(self, name: str, parent: Node, value: Any): + """ + Creates or updates a node with the given name and value under the specified parent. + + Args: + name (str): The name of the node. + parent (Node): The parent node. + value (Any): The value to set on the node. + """ + node = next((child for child in parent.children if child.name == name), None) + if node: + node.value = json.dumps(value) + else: + Node(name, parent=parent, value=json.dumps(value)) + + + def _parse_resource_key(self, resource_key: str) -> List[str]: + """ + Parses the resource key into parts, correctly handling brackets. + + Args: + resource_key (str): The resource key to parse. + + Returns: + List[str]: A list of parts from the resource key. + """ + resource_path = [] + current_part = "" + in_brackets = False + + if not resource_key.startswith('/interface'): + for char in resource_key.strip('/'): + if char == '[': + in_brackets = True + current_part += char + elif char == ']': + in_brackets = False + current_part += char + elif char == '/' and not in_brackets: + resource_path.append(current_part) + current_part = "" + else: + current_part += char + if current_part: + resource_path.append(current_part) + return resource_path + else: + resource_path = resource_key.strip('/').split('/', 1) + if resource_path[1] == 'settings': + return resource_path + else: + resource_path = [resource_key.strip('/').split('[')[0].strip('/'), resource_key.strip('/').split('[')[1].split(']')[0].replace('/', '_')] + return resource_path + + +#----------------------------------- +# ------- EXTRA Methods ------------ +#----------------------------------- + + # def _generate_subtree(self, node: Node) -> dict: + # """ + # Generates a subtree of the configuration tree starting from the specified node. + + # Args: + # node (Node): The node from which to generate the subtree. + + # Returns: + # dict: The subtree as a dictionary. + # """ + # subtree = {} + # for child in node.children: + # if child.children: + # subtree[child.name] = self._generate_subtree(child) + # else: + # value = getattr(child, "value", None) + # subtree[child.name] = json.loads(value) if value else None + # return subtree + + + # def _find_or_raise_node(self, name: str, parent: Node) -> Node: + # """ + # Finds a node with the given name under the specified parent or raises an exception if not found. + + # Args: + # name (str): The name of the node to find. + # parent (Node): The parent node. + + # Returns: + # Node: The found node. + + # Raises: + # ValueError: If the node is not found. + # """ + # node = next((child for child in parent.children if child.name == name), None) + # if not node: + # raise ValueError(f"Node '{name}' not found under parent '{parent.name}'.") + # return node diff --git a/src/telemetry/backend/tests/test_emulated.py b/src/telemetry/backend/tests/test_emulated.py index 14d8a8ab9..316b98d83 100644 --- a/src/telemetry/backend/tests/test_emulated.py +++ b/src/telemetry/backend/tests/test_emulated.py @@ -52,38 +52,39 @@ def test_disconnect(setup_driver): assert driver.Disconnect() is True assert driver.connected is False -def test_set_config(setup_driver): - logger.info(">>> test_set_config <<<") - driver = setup_driver - driver.Connect() +# def test_set_config(setup_driver): +# logger.info(">>> test_set_config <<<") +# driver = setup_driver +# driver.Connect() - config = create_test_configuration() +# config = create_test_configuration() - results = driver.SetConfig(config) - assert all(result is True for result in results) +# results = driver.SetConfig(config) +# assert all(result is True for result in results) -def test_get_config(connected_configured_driver): - logger.info(">>> test_get_config <<<") - resource_keys = create_specific_config_keys() - results = connected_configured_driver.GetConfig(resource_keys) +# def test_get_config(connected_configured_driver): +# logger.info(">>> test_get_config <<<") +# resource_keys = create_specific_config_keys() +# results = connected_configured_driver.GetConfig(resource_keys) - for key, value in results: - assert key in create_specific_config_keys() - assert value is not None +# for key, value in results: +# assert key in create_specific_config_keys() +# assert value is not None -def test_delete_config(connected_configured_driver): - logger.info(">>> test_delete_config <<<") - resource_keys = create_config_for_delete() +# def test_delete_config(connected_configured_driver): +# logger.info(">>> test_delete_config <<<") +# resource_keys = create_config_for_delete() - results = connected_configured_driver.DeleteConfig(resource_keys) - assert all(result is True for result in results) +# results = connected_configured_driver.DeleteConfig(resource_keys) +# assert all(result is True for result in results) def test_subscribe_state(connected_configured_driver): logger.info(">>> test_subscribe_state <<<") subscriptions = create_test_subscriptions() results = connected_configured_driver.SubscribeState(subscriptions) - assert all(result is True for result in results) + # logger.info(f"Subscribed result: {results}.") + assert results == [False, True, True] # all(result is True for result in results) def test_unsubscribe_state(connected_configured_driver): logger.info(">>> test_unsubscribe_state <<<") @@ -91,15 +92,15 @@ def test_unsubscribe_state(connected_configured_driver): connected_configured_driver.SubscribeState(subscriptions) results = connected_configured_driver.UnsubscribeState(subscriptions) - assert all(result is True for result in results) + assert results == [False, True, True] # all(result is True for result in results) def test_get_state(connected_configured_driver): logger.info(">>> test_get_state <<<") subscriptions = create_test_subscriptions() connected_configured_driver.SubscribeState(subscriptions) - logger.info(f"Subscribed to state: {subscriptions}. waiting for 3 seconds ...") - time.sleep(3) + logger.info(f"Subscribed to state: {subscriptions}. waiting for 12 seconds ...") + time.sleep(12) state_iterator = connected_configured_driver.GetState(blocking=False) states = list(state_iterator) -- GitLab From 336bdba93f7b533574212d1a7b7ef9e52fc7f114 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 11 Jan 2025 19:05:33 +0100 Subject: [PATCH 164/463] connection group translation from NBI IETF Slice to SBI IETF Slice fixed --- .../l3slice_ietfslice/ConfigRules.py | 27 ++-- .../L3SliceIETFSliceServiceHandler.py | 132 +++++++++++++----- 2 files changed, 113 insertions(+), 46 deletions(-) diff --git a/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py b/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py index e720f33bb..466c53fe4 100644 --- a/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py +++ b/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py @@ -33,6 +33,11 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: src_source_tcp_port: str = json_settings["src_source_tcp_port"] src_destination_ip_prefix: str = json_settings["src_destination_ip_prefix"] src_destination_tcp_port: str = json_settings["src_destination_tcp_port"] + source_one_way_delay: int = int(json_settings["source_one_way_delay"]) + source_one_way_bandwidth: int = int(json_settings["source_one_way_bandwidth"]) + source_one_way_packet_loss: float = float( + json_settings["source_one_way_packet_loss"] + ) dst_node_id: str = json_settings["dst_node_id"] dst_mgmt_ip_address: str = json_settings["dst_mgmt_ip_address"] dst_ac_node_id: str = json_settings["dst_ac_node_id"] @@ -42,10 +47,14 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: dst_source_tcp_port: str = json_settings["dst_source_tcp_port"] dst_destination_ip_prefix: str = json_settings["dst_destination_ip_prefix"] dst_destination_tcp_port: str = json_settings["dst_destination_tcp_port"] + destination_one_way_delay: int = int(json_settings["destination_one_way_delay"]) + destination_one_way_bandwidth: int = int( + json_settings["destination_one_way_bandwidth"] + ) + destination_one_way_packet_loss: float = float( + json_settings["destination_one_way_packet_loss"] + ) slice_id: str = json_settings["slice_id"] - delay: str = int(json_settings["delay"]) - bandwidth: str = int(json_settings["bandwidth"]) - packet_loss: str = float(json_settings["packet_loss"]) sdps = [ { @@ -155,17 +164,17 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: { "metric-type": "ietf-network-slice-service:one-way-delay-maximum", "metric-unit": "milliseconds", - "bound": delay, + "bound": source_one_way_delay, }, { "metric-type": "ietf-network-slice-service:one-way-bandwidth", "metric-unit": "Mbps", - "bound": bandwidth, + "bound": source_one_way_bandwidth, }, { "metric-type": "ietf-network-slice-service:two-way-packet-loss", "metric-unit": "percentage", - "percentile-value": packet_loss, + "percentile-value": source_one_way_packet_loss, }, ] } @@ -181,17 +190,17 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: { "metric-type": "ietf-network-slice-service:one-way-delay-maximum", "metric-unit": "milliseconds", - "bound": delay, + "bound": destination_one_way_delay, }, { "metric-type": "ietf-network-slice-service:one-way-bandwidth", "metric-unit": "Mbps", - "bound": bandwidth, + "bound": destination_one_way_bandwidth, }, { "metric-type": "ietf-network-slice-service:two-way-packet-loss", "metric-unit": "percentage", - "percentile-value": packet_loss, + "percentile-value": destination_one_way_packet_loss, }, ] } diff --git a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py index 258ea27f0..b5e9bb43f 100644 --- a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py +++ b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py @@ -18,6 +18,7 @@ import re from typing import Any, Dict, List, Optional, Tuple, TypedDict, Union from deepdiff import DeepDiff +from dataclasses import dataclass from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.proto.context_pb2 import ConfigRule, DeviceId, Empty, Service, ServiceConfig @@ -50,6 +51,16 @@ class DeviceEpInfo(TypedDict): ipv4_info: Ipv4Info node_name: str endpoint_name: str + one_way_delay: int + one_way_bandwidth: int + one_way_packet_loss: float + + +@dataclass +class ConnectivityConstructInfo: + bandwidth: int = 0 + delay: int = 0 + packet_loss: float = 0.0 RUNNING_RESOURCE_KEY = "running_ietf_slice" @@ -149,25 +160,91 @@ def get_removed_items( def extract_source_destination_device_endpoint_info( - device_ep_pairs: list, connection_group: Dict + device_ep_pairs: list, connection_group: Dict, candidate_connection_groups: List ) -> Tuple[DeviceEpInfo, DeviceEpInfo]: connectivity_construct = connection_group["connectivity-construct"][0] sender_sdp = connectivity_construct["p2p-sender-sdp"] + receiver_sdp = connectivity_construct["p2p-receiver-sdp"] if sender_sdp == device_ep_pairs[0][4]: ... elif sender_sdp == device_ep_pairs[1][4]: device_ep_pairs = device_ep_pairs[::-1] else: raise Exception("Sender SDP not found in device_ep_pairs") + cc_info: Dict[Tuple[str, str], ConnectivityConstructInfo] = {} + for cg in candidate_connection_groups: + for cc in cg["connectivity-construct"]: + cc_sender = cc["p2p-sender-sdp"] + cc_receiver = cc["p2p-receiver-sdp"] + cc_key = (cc_sender, cc_receiver) + cc_info[cc_key] = ConnectivityConstructInfo() + for metric_bound in cc["service-slo-sle-policy"]["slo-policy"][ + "metric-bound" + ]: + if ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-delay-maximum" + and metric_bound["metric-unit"] == "milliseconds" + ): + cc_info[cc_key].delay = int(metric_bound["bound"]) + elif ( + metric_bound["metric-type"] + == "ietf-network-slice-service:two-way-packet-loss" + and metric_bound["metric-unit"] == "percentage" + ): + cc_info[cc_key].packet_loss = float( + metric_bound["percentile-value"] + ) + elif ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-bandwidth" + and metric_bound["metric-unit"] == "Mbps" + ): + cc_info[cc_key].bandwidth = int(metric_bound["bound"]) + source_delay = int(1e6) + source_bandwidth = 0 + source_packet_loss = 1.0 + destination_delay = int(1e6) + destination_bandwidth = 0 + destination_packet_loss = 1.0 + if cc_info: + common_sdps = set.intersection(*[set(key) for key in cc_info.keys()]) + if len(cc_info) > 2 and len(common_sdps) != 1: + raise Exception( + "There should be one common sdp in all connectivity constructs, otherwise, it is not supported" + ) + common_sdp = common_sdps.pop() + for (sender, receiver), metrics in cc_info.items(): + cc_bandwidth = metrics.bandwidth + cc_max_delay = metrics.delay + cc_packet_loss = metrics.packet_loss + if sender == common_sdp: + source_bandwidth += cc_bandwidth + if cc_max_delay < source_delay: + source_delay = cc_max_delay + if cc_packet_loss < source_packet_loss: + source_packet_loss = cc_packet_loss + else: + destination_bandwidth += cc_bandwidth + if cc_max_delay < destination_delay: + destination_delay = cc_max_delay + if cc_packet_loss < destination_packet_loss: + destination_packet_loss = cc_packet_loss source_device_ep_info = DeviceEpInfo( ipv4_info=device_ep_pairs[0][5], node_name=device_ep_pairs[0][2], endpoint_name=device_ep_pairs[0][3], + one_way_delay=source_delay, + one_way_bandwidth=source_bandwidth, + one_way_packet_loss=source_packet_loss, ) destination_device_ep_info = DeviceEpInfo( ipv4_info=device_ep_pairs[1][5], node_name=device_ep_pairs[1][2], endpoint_name=device_ep_pairs[1][3], + one_way_delay=destination_delay, + one_way_bandwidth=destination_bandwidth, + one_way_packet_loss=destination_packet_loss, ) return source_device_ep_info, destination_device_ep_info @@ -268,9 +345,6 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): edge_device_names = [src_device_name, dst_device_name] link_list = context_client.ListLinks(Empty()) links = link_list.links - max_delay = 1e9 - packet_loss = 1.0 - bandwidth = 0.0 device_ep_pairs = [] sdp_ids = [] running_candidate_diff = get_running_candidate_ietf_slice_data_diff( @@ -650,34 +724,6 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): "connection-group" ] LOGGER.debug(f"connection_groups: {candidate_connection_groups}") - for cg in candidate_connection_groups: - for cc in cg["connectivity-construct"]: - for metric_bound in cc["service-slo-sle-policy"]["slo-policy"][ - "metric-bound" - ]: - if ( - metric_bound["metric-type"] - == "ietf-network-slice-service:one-way-delay-maximum" - and metric_bound["metric-unit"] == "milliseconds" - ): - metric_value = int(metric_bound["bound"]) - if metric_value < max_delay: - max_delay = metric_value - elif ( - metric_bound["metric-type"] - == "ietf-network-slice-service:two-way-packet-loss" - and metric_bound["metric-unit"] == "percentage" - ): - metric_value = float(metric_bound["percentile-value"]) - if metric_value < packet_loss: - packet_loss = metric_value - elif ( - metric_bound["metric-type"] - == "ietf-network-slice-service:one-way-bandwidth" - and metric_bound["metric-unit"] == "Mbps" - ): - metric_value = float(metric_bound["bound"]) - bandwidth += metric_value if ( len( candidate_resource_value_dict["network-slice-services"][ @@ -694,7 +740,9 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): ) source_device_ep_info, destination_device_ep_info = ( extract_source_destination_device_endpoint_info( - device_ep_pairs, target_connection_group + device_ep_pairs, + target_connection_group, + candidate_connection_groups, ) ) resource_value_dict = { @@ -713,6 +761,11 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): "src_destination_tcp_port": source_device_ep_info["ipv4_info"][ "dst_port" ], + "source_one_way_delay": source_device_ep_info["one_way_delay"], + "source_one_way_bandwidth": source_device_ep_info["one_way_bandwidth"], + "source_one_way_packet_loss": source_device_ep_info[ + "one_way_packet_loss" + ], "dst_node_id": destination_device_ep_info["node_name"], "dst_mgmt_ip_address": destination_device_ep_info["node_name"], "dst_ac_node_id": destination_device_ep_info["node_name"], @@ -730,12 +783,17 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): "dst_destination_tcp_port": destination_device_ep_info["ipv4_info"][ "dst_port" ], + "destination_one_way_delay": destination_device_ep_info[ + "one_way_delay" + ], + "destination_one_way_bandwidth": destination_device_ep_info[ + "one_way_bandwidth" + ], + "destination_one_way_packet_loss": destination_device_ep_info[ + "one_way_packet_loss" + ], "slice_id": slice_name, - "delay": max_delay, - "bandwidth": bandwidth, - "packet_loss": packet_loss, } - json_config_rules = setup_config_rules(slice_name, resource_value_dict) del controller.device_config.config_rules[:] for jcr in json_config_rules: -- GitLab From e2ae478def300aa85b82e9ac0700479b1c3915a0 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sun, 12 Jan 2025 10:39:39 +0100 Subject: [PATCH 165/463] debug: incorrect src_output_bw value assignment resolved --- .../service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py index 7649f166e..e2ad446ce 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py @@ -51,7 +51,7 @@ def setup_config_rules( src_ce_pe_network_prefix: int = json_settings["src_ce_pe_network_prefix"] src_mtu: int = json_settings["src_mtu"] src_input_bw: int = json_settings["src_input_bw"] - src_output_bw: int = json_settings["src_input_bw"] + src_output_bw: int = json_settings["src_output_bw"] src_qos_profile_id = "qos-realtime" src_qos_profile_direction = "ietf-l3vpn-svc:both" src_qos_profile_latency: int = json_settings["src_qos_profile_latency"] -- GitLab From 8c4cc1e766b5a86b87530d80bb43cfca03aa8e86 Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 13 Jan 2025 12:51:59 +0100 Subject: [PATCH 166/463] prefix added to lan value in ipv4-lan-prefixes --- .../L3NM_IETFL3VPN_ServiceHandler.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py index 64423129d..fb4af6cd2 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py @@ -54,8 +54,8 @@ class LANPrefixesDict(TypedDict): class Ipv4Info(TypedDict): - src_ip: str - dst_ip: str + src_lan: str + dst_lan: str src_port: str dst_port: str vlan: str @@ -144,9 +144,9 @@ def extract_match_criterion_ipv4_info( ) -> Ipv4Info: for type_value in match_criterion["match-type"]: if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": - src_ip = type_value["value"][0].split("/")[0] + src_lan = type_value["value"][0] elif type_value["type"] == "ietf-network-slice-service:destination-ip-prefix": - dst_ip = type_value["value"][0].split("/")[0] + dst_lan = type_value["value"][0] elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": src_port = type_value["value"][0] elif type_value["type"] == "ietf-network-slice-service:destination-tcp-port": @@ -154,8 +154,8 @@ def extract_match_criterion_ipv4_info( elif type_value["type"] == "ietf-network-slice-service:vlan": vlan = type_value["value"][0] return Ipv4Info( - src_ip=src_ip, - dst_ip=dst_ip, + src_lan=src_lan, + dst_lan=dst_lan, src_port=src_port, dst_port=dst_port, vlan=vlan, @@ -313,13 +313,13 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): ) src_ipv4_lan_prefixes = [ LANPrefixesDict( - lan=src_match_criterion_ipv4_info["dst_ip"], + lan=src_match_criterion_ipv4_info["dst_lan"], lan_tag=src_match_criterion_ipv4_info["vlan"], ) ] dst_ipv4_lan_prefixes = [ LANPrefixesDict( - lan=dst_match_criterion_ipv4_info["dst_ip"], + lan=dst_match_criterion_ipv4_info["dst_lan"], lan_tag=dst_match_criterion_ipv4_info["vlan"], ) ] -- GitLab From e0ee4da4091f24b7c44849368918f6cc2bebd9cc Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 13 Jan 2025 13:04:06 +0100 Subject: [PATCH 167/463] src_ip changed to src_lan because it also includes the prefix --- .../L3SliceIETFSliceServiceHandler.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py index b5e9bb43f..2cb6d59c3 100644 --- a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py +++ b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py @@ -40,8 +40,8 @@ from .ConfigRules import ( class Ipv4Info(TypedDict): - src_ip: str - dst_ip: str + src_lan: str + dst_lan: str src_port: str dst_port: str vlan: str @@ -254,9 +254,9 @@ def extract_match_criterion_ipv4_info( ) -> Ipv4Info: for type_value in match_criterion["match-type"]: if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": - src_ip = type_value["value"][0] + src_lan = type_value["value"][0] elif type_value["type"] == "ietf-network-slice-service:destination-ip-prefix": - dst_ip = type_value["value"][0] + dst_lan = type_value["value"][0] elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": src_port = type_value["value"][0] elif type_value["type"] == "ietf-network-slice-service:destination-tcp-port": @@ -264,8 +264,8 @@ def extract_match_criterion_ipv4_info( elif type_value["type"] == "ietf-network-slice-service:vlan": vlan = type_value["value"][0] return Ipv4Info( - src_ip=src_ip, - dst_ip=dst_ip, + src_lan=src_lan, + dst_lan=dst_lan, src_port=src_port, dst_port=dst_port, vlan=vlan, -- GitLab From b49e1d8fd9c724ede72467362e2e75cf4d8a65b6 Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 13 Jan 2025 13:50:32 +0100 Subject: [PATCH 168/463] debug: src/dst_ip changed to src/dst_lan --- .../l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py index 2cb6d59c3..a3d50c0e1 100644 --- a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py +++ b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py @@ -753,10 +753,10 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): "src_ac_node_id": source_device_ep_info["node_name"], "src_ac_ep_id": source_device_ep_info["endpoint_name"], "src_vlan": source_device_ep_info["ipv4_info"]["vlan"], - "src_source_ip_prefix": source_device_ep_info["ipv4_info"]["src_ip"], + "src_source_ip_prefix": source_device_ep_info["ipv4_info"]["src_lan"], "src_source_tcp_port": source_device_ep_info["ipv4_info"]["src_port"], "src_destination_ip_prefix": source_device_ep_info["ipv4_info"][ - "dst_ip" + "dst_lan" ], "src_destination_tcp_port": source_device_ep_info["ipv4_info"][ "dst_port" @@ -772,13 +772,13 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): "dst_ac_ep_id": destination_device_ep_info["endpoint_name"], "dst_vlan": destination_device_ep_info["ipv4_info"]["vlan"], "dst_source_ip_prefix": destination_device_ep_info["ipv4_info"][ - "src_ip" + "src_lan" ], "dst_source_tcp_port": destination_device_ep_info["ipv4_info"][ "src_port" ], "dst_destination_ip_prefix": destination_device_ep_info["ipv4_info"][ - "dst_ip" + "dst_lan" ], "dst_destination_tcp_port": destination_device_ep_info["ipv4_info"][ "dst_port" -- GitLab From 8c1d7155d62ae36c2297c46ed1a3862e1028521c Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Mon, 13 Jan 2025 13:04:35 +0000 Subject: [PATCH 169/463] Changes in Telemetry backend Analytics - Added AnalyzerHelper class - Added AnalyzerHandler class - Added updated streamer class - Update test scripts for analytics backend - Updated run script format --- .../run_tests_locally-analytics-backend.sh | 3 + .../backend/service/AnalyzerHandlers.py | 127 ++++++++ .../backend/service/AnalyzerHelper.py | 60 ++++ .../backend/service/DaskStreaming.py | 268 --------------- src/analytics/backend/service/Streamer.py | 159 +++++++++ src/analytics/backend/tests/messages.py | 5 +- .../backend/tests/messages_analyzer.py | 64 ++++ src/analytics/backend/tests/test_backend.py | 306 ++++++++++-------- 8 files changed, 589 insertions(+), 403 deletions(-) create mode 100644 src/analytics/backend/service/AnalyzerHandlers.py create mode 100644 src/analytics/backend/service/AnalyzerHelper.py delete mode 100644 src/analytics/backend/service/DaskStreaming.py create mode 100644 src/analytics/backend/service/Streamer.py create mode 100644 src/analytics/backend/tests/messages_analyzer.py diff --git a/scripts/run_tests_locally-analytics-backend.sh b/scripts/run_tests_locally-analytics-backend.sh index 1c3386c62..78fab0f76 100755 --- a/scripts/run_tests_locally-analytics-backend.sh +++ b/scripts/run_tests_locally-analytics-backend.sh @@ -18,8 +18,11 @@ PROJECTDIR=`pwd` cd $PROJECTDIR/src RCFILE=$PROJECTDIR/coverage/.coveragerc + export KFK_SERVER_ADDRESS='127.0.0.1:9092' + CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}') export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_analytics?sslmode=require" + python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG --verbose \ analytics/backend/tests/test_backend.py diff --git a/src/analytics/backend/service/AnalyzerHandlers.py b/src/analytics/backend/service/AnalyzerHandlers.py new file mode 100644 index 000000000..34ada434b --- /dev/null +++ b/src/analytics/backend/service/AnalyzerHandlers.py @@ -0,0 +1,127 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 enum import Enum +import pandas as pd + + +logger = logging.getLogger(__name__) +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(funcName)s - %(levelname)s - %(message)s') + +class AnalyzerHandlers(Enum): + AGGREGATION_HANDLER = "AggregationHandler" + UNSUPPORTED_HANDLER = "UnsupportedHandler" + + @classmethod + def is_valid_handler(cls, handler_name): + return handler_name in cls._value2member_map_ + +# This method is top-level and should not be part of the class due to serialization issues. +def threshold_handler(key, aggregated_df, thresholds): + """ + Apply thresholds (TH-Fall and TH-Raise) based on the thresholds dictionary + on the aggregated DataFrame. + + Args: + key (str): Key for the aggregated DataFrame. + aggregated_df (pd.DataFrame): DataFrame with aggregated metrics. + thresholds (dict): Thresholds dictionary with keys in the format '' and values as (fail_th, raise_th). + + Returns: + pd.DataFrame: DataFrame with additional threshold columns. + """ + for metric_name, threshold_values in thresholds.items(): + # Ensure the metric column exists in the DataFrame + if metric_name not in aggregated_df.columns: + logger.warning(f"Metric '{metric_name}' does not exist in the DataFrame for key: {key}. Skipping threshold application.") + continue + + # Ensure the threshold values are valid (check for tuple specifically) + if isinstance(threshold_values, tuple) and len(threshold_values) == 2: + fail_th, raise_th = threshold_values + + # Add threshold columns with updated naming + aggregated_df[f"{metric_name}_TH_RAISE"] = aggregated_df[metric_name] > raise_th + aggregated_df[f"{metric_name}_TH_FALL"] = aggregated_df[metric_name] < fail_th + else: + logger.warning(f"Threshold values for '{metric_name}' are not a tuple of length 2. Skipping threshold application.") + return aggregated_df + +def aggregation_handler( + batch_type_name, key, batch, input_kpi_list, output_kpi_list, thresholds + ): + """ + Process a batch of data and calculate aggregated values for each input KPI + and maps them to the output KPIs. """ + + logger.info(f"({batch_type_name}) Processing batch for key: {key}") + if not batch: + logger.info("Empty batch received. Skipping processing.") + return [] + else: + logger.info(f"Processing {len(batch)} records for key: {key}") + + # Convert data into a DataFrame + df = pd.DataFrame(batch) + + # Filter the DataFrame to retain rows where kpi_id is in the input list (subscribed endpoints only) + df = df[df['kpi_id'].isin(input_kpi_list)].copy() + + # Define all possible aggregation methods + aggregation_methods = { + "min" : ('kpi_value', 'min'), + "max" : ('kpi_value', 'max'), + "avg" : ('kpi_value', 'mean'), + "first" : ('kpi_value', lambda x: x.iloc[0]), + "last" : ('kpi_value', lambda x: x.iloc[-1]), + "variance": ('kpi_value', 'var'), + "count" : ('kpi_value', 'count'), + "range" : ('kpi_value', lambda x: x.max() - x.min()), + "sum" : ('kpi_value', 'sum'), + } + + # Process each KPI-specific task parameter + for kpi_index, kpi_id in enumerate(input_kpi_list): + + # logger.info(f"1.Processing KPI: {kpi_id}") + kpi_task_parameters = thresholds["task_parameter"][kpi_index] + + # Get valid task parameters for this KPI + valid_task_parameters = [ + method for method in kpi_task_parameters.keys() + if method in aggregation_methods + ] + + # Select the aggregation methods based on valid task parameters + selected_methods = {method: aggregation_methods[method] for method in valid_task_parameters} + + # logger.info(f"2. Processing KPI: {kpi_id} with task parameters: {kpi_task_parameters}") + + kpi_df = df[df['kpi_id'] == kpi_id] + + # Check if kpi_df is not empty before applying the aggregation methods + if not kpi_df.empty: + agg_df = kpi_df.groupby('kpi_id').agg(**selected_methods).reset_index() + + # logger.info(f"3. Aggregated DataFrame for KPI: {kpi_id}: {agg_df}") + + agg_df['kpi_id'] = output_kpi_list[kpi_index] + + result = threshold_handler(key, agg_df, kpi_task_parameters) + + return result.to_dict(orient='records') + else: + logger.debug(f"No data available for KPI: {kpi_id}. Skipping aggregation.") + continue diff --git a/src/analytics/backend/service/AnalyzerHelper.py b/src/analytics/backend/service/AnalyzerHelper.py new file mode 100644 index 000000000..26d6e5fb9 --- /dev/null +++ b/src/analytics/backend/service/AnalyzerHelper.py @@ -0,0 +1,60 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from dask.distributed import Client, LocalCluster +from common.tools.kafka.Variables import KafkaConfig, KafkaTopic +from confluent_kafka import Consumer, Producer, KafkaException, KafkaError + +import logging +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger(__name__) +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(funcName)s - %(levelname)s - %(message)s') + + +class AnalyzerHelper: + def __init__(self): + pass + + @staticmethod + def initialize_dask_client(n_workers=1, threads_per_worker=1): + """Initialize a local Dask cluster and client.""" + cluster = LocalCluster(n_workers=n_workers, threads_per_worker=threads_per_worker) + client = Client(cluster) + logger.info(f"Dask Client Initialized: {client}") + return client, cluster + + @staticmethod + def initialize_kafka_consumer(): + """Initialize the Kafka consumer.""" + consumer_conf = { + 'bootstrap.servers': KafkaConfig.get_kafka_address(), + 'group.id': 'analytics-backend', + 'auto.offset.reset': 'latest' + } + consumer = Consumer(consumer_conf) + consumer.subscribe([KafkaTopic.VALUE.value]) + return consumer + + @staticmethod + def initialize_kafka_producer(): + """Initialize the Kafka producer.""" + return Producer({'bootstrap.servers': KafkaConfig.get_kafka_address()}) + + @staticmethod + def delivery_report(err, msg): + if err is not None: + logger.error(f"Message delivery failed: {err}") + else: + logger.debug(f"Message delivered to {msg.topic()} [{msg.partition()}] at offset {msg.offset()}") diff --git a/src/analytics/backend/service/DaskStreaming.py b/src/analytics/backend/service/DaskStreaming.py deleted file mode 100644 index 79dee7ef9..000000000 --- a/src/analytics/backend/service/DaskStreaming.py +++ /dev/null @@ -1,268 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 -import time -import json -from confluent_kafka import Consumer, Producer, KafkaException, KafkaError -import pandas as pd -from dask.distributed import Client, LocalCluster -from common.tools.kafka.Variables import KafkaConfig, KafkaTopic - -logging.basicConfig(level=logging.INFO) -LOGGER = logging.getLogger(__name__) - -def SettingKafkaConsumerParams(): - return {'bootstrap.servers' : KafkaConfig.get_kafka_address(), - 'group.id' : 'analytics-backend', - 'auto.offset.reset' : 'latest'} - -def GetAggregationMappings(thresholds): - agg_dict = {} - for threshold_key in thresholds.keys(): - parts = threshold_key.split('_', 1) - if len(parts) != 2: - LOGGER.warning(f"Threshold key '{threshold_key}' does not follow the '_' format. Skipping.") - continue - aggregation, metric_name = parts - # Ensure that the aggregation function is valid in pandas - if aggregation not in ['mean', 'min', 'max', 'first', 'last', 'std']: - LOGGER.warning(f"Unsupported aggregation '{aggregation}' in threshold key '{threshold_key}'. Skipping.") - continue - agg_dict[threshold_key] = ('kpi_value', aggregation) - return agg_dict - - -def ApplyThresholds(aggregated_df, thresholds): - """ - Apply thresholds (TH-Fall and TH-Raise) based on the thresholds dictionary - on the aggregated DataFrame. - Args: aggregated_df (pd.DataFrame): DataFrame with aggregated metrics. - thresholds (dict): Thresholds dictionary with keys in the format '_'. - Returns: pd.DataFrame: DataFrame with additional threshold columns. - """ - for threshold_key, threshold_values in thresholds.items(): - if threshold_key not in aggregated_df.columns: - - LOGGER.warning(f"Threshold key '{threshold_key}' does not correspond to any aggregation result. Skipping threshold application.") - continue - if isinstance(threshold_values, (list, tuple)) and len(threshold_values) == 2: - fail_th, raise_th = threshold_values - aggregated_df["THRESHOLD_FALL"] = aggregated_df[threshold_key] < fail_th - aggregated_df["THRESHOLD_RAISE"] = aggregated_df[threshold_key] > raise_th - aggregated_df["value"] = aggregated_df[threshold_key] - else: - LOGGER.warning(f"Threshold values for '{threshold_key}' are not a list or tuple of length 2. Skipping threshold application.") - return aggregated_df - -def initialize_dask_client(): - """ - Initialize a local Dask cluster and client. - """ - cluster = LocalCluster(n_workers=2, threads_per_worker=2) - client = Client(cluster) - LOGGER.info(f"Dask Client Initialized: {client}") - return client, cluster - -def initialize_kafka_producer(): - return Producer({'bootstrap.servers': KafkaConfig.get_kafka_address()}) - -def delivery_report(err, msg): - if err is not None: - LOGGER.error(f"Message delivery failed: {err}") - else: - LOGGER.info(f"Message delivered to {msg.topic()} [{msg.partition()}] at offset {msg.offset()}") - -def process_batch(batch, agg_mappings, thresholds, key): - """ - Process a batch of data and apply thresholds. - Args: batch (list of dict): List of messages from Kafka. - agg_mappings (dict): Mapping from threshold key to aggregation function. - thresholds (dict): Thresholds dictionary. - Returns: list of dict: Processed records ready to be sent to Kafka. - """ - if not batch: - LOGGER.info("Empty batch received. Skipping processing.") - return [] - - - df = pd.DataFrame(batch) - LOGGER.info(f"df {df} ") - df['time_stamp'] = pd.to_datetime(df['time_stamp'], errors='coerce') - df.dropna(subset=['time_stamp'], inplace=True) - LOGGER.info(f"df {df} ") - required_columns = {'time_stamp', 'kpi_id', 'kpi_value'} - if not required_columns.issubset(df.columns): - LOGGER.warning(f"Batch contains missing required columns. Required columns: {required_columns}. Skipping batch.") - return [] - if df.empty: - LOGGER.info("No data after filtering by KPI IDs. Skipping processing.") - return [] - - # Perform aggregations using named aggregation - try: - agg_dict = {key: value for key, value in agg_mappings.items()} - - df_agg_ = df.groupby(['window_start']).agg(**agg_dict).reset_index() - - #example: agg_dict = {'min_latency_E2E': ('kpi_value', 'min') - - #given that threshold has 1 value - second_value_tuple = next(iter(agg_dict.values()))[1] - #in case we have multiple thresholds! - #second_values_tuples = [value[1] for value in agg_dict.values()] - if second_value_tuple=="min": - df_agg = df_agg_.min(numeric_only=True).to_frame().T - elif second_value_tuple == "max": - df_agg = df_agg_.max(numeric_only=True).to_frame().T - elif second_value_tuple == "std": - df_agg = df_agg_.sted(numeric_only=True).to_frame().T - else: - df_agg = df_agg_.mean(numeric_only=True).to_frame().T - - # Assign the first value of window_start from the original aggregated data - df_agg['window_start'] = df_agg_['window_start'].iloc[0] - - # Reorder columns to place 'window_start' first if needed - cols = ['window_start'] + [col for col in df_agg.columns if col != 'window_start'] - df_agg = df_agg[cols] - - except Exception as e: - LOGGER.error(f"Aggregation error: {e}") - return [] - - # Apply thresholds - - - df_thresholded = ApplyThresholds(df_agg, thresholds) - df_thresholded['kpi_id'] = key - df_thresholded['window_start'] = df_thresholded['window_start'].dt.strftime('%Y-%m-%dT%H:%M:%SZ') - # Convert aggregated DataFrame to list of dicts - result = df_thresholded.to_dict(orient='records') - LOGGER.info(f"Processed batch with {len(result)} records after aggregation and thresholding.") - return result - -def produce_result(result, producer, destination_topic): - for record in result: - try: - producer.produce( - destination_topic, - key=str(record.get('kpi_id', '')), - value=json.dumps(record), - callback=delivery_report - ) - except KafkaException as e: - LOGGER.error(f"Failed to produce message: {e}") - producer.flush() - LOGGER.info(f"Produced {len(result)} aggregated records to '{destination_topic}'.") - -def DaskStreamer(key, kpi_list, thresholds, stop_event, - window_size="30s", time_stamp_col="time_stamp"): - client, cluster = initialize_dask_client() - consumer_conf = SettingKafkaConsumerParams() - consumer = Consumer(consumer_conf) - consumer.subscribe([KafkaTopic.VALUE.value]) - producer = initialize_kafka_producer() - - # Parse window_size to seconds - try: - window_size_td = pd.to_timedelta(window_size) - window_size_seconds = window_size_td.total_seconds() - except Exception as e: - LOGGER.error(f"Invalid window_size format: {window_size}. Error: {e}") - window_size_seconds = 30 - LOGGER.info(f"Batch processing interval set to {window_size_seconds} seconds.") - - # Extract aggregation mappings from thresholds - agg_mappings = GetAggregationMappings(thresholds) - if not agg_mappings: - LOGGER.error("No valid aggregation mappings extracted from thresholds. Exiting streamer.") - consumer.close() - producer.flush() - client.close() - cluster.close() - return - try: - batch = [] - last_batch_time = time.time() - LOGGER.info("Starting to consume messages...") - - while not stop_event.is_set(): - msg = consumer.poll(1.0) - - if msg is None: - current_time = time.time() - if (current_time - last_batch_time) >= window_size_seconds and batch: - LOGGER.info("Time-based batch threshold reached. Processing batch.") - future = client.submit(process_batch, batch, agg_mappings, thresholds) - future.add_done_callback(lambda fut: produce_result(fut.result(), producer, KafkaTopic.ALARMS.value)) - batch = [] - last_batch_time = current_time - continue - - if msg.error(): - if msg.error().code() == KafkaError._PARTITION_EOF: - LOGGER.warning(f"End of partition reached {msg.topic()} [{msg.partition()}] at offset {msg.offset()}") - else: - LOGGER.error(f"Kafka error: {msg.error()}") - continue - - try: - message_value = json.loads(msg.value().decode('utf-8')) - except json.JSONDecodeError as e: - LOGGER.error(f"JSON decode error: {e}") - continue - - try: - message_timestamp = pd.to_datetime(message_value[time_stamp_col], errors='coerce') - LOGGER.warning(f"message_timestamp: {message_timestamp}. Skipping message.") - - if pd.isna(message_timestamp): - LOGGER.warning(f"Invalid timestamp in message: {message_value}. Skipping message.") - continue - window_start = message_timestamp.floor(window_size) - LOGGER.warning(f"window_start: {window_start}. Skipping message.") - message_value['window_start'] = window_start - except Exception as e: - LOGGER.error(f"Error processing timestamp: {e}. Skipping message.") - continue - - if message_value['kpi_id'] not in kpi_list: - LOGGER.debug(f"KPI ID '{message_value['kpi_id']}' not in kpi_list. Skipping message.") - continue - - batch.append(message_value) - - current_time = time.time() - if (current_time - last_batch_time) >= window_size_seconds and batch: - LOGGER.info("Time-based batch threshold reached. Processing batch.") - future = client.submit(process_batch, batch, agg_mappings, thresholds, key) - future.add_done_callback(lambda fut: produce_result(fut.result(), producer, KafkaTopic.ALARMS.value)) - batch = [] - last_batch_time = current_time - - except Exception as e: - LOGGER.exception(f"Error in Dask streaming process: {e}") - finally: - # Process any remaining messages in the batch - if batch: - LOGGER.info("Processing remaining messages in the batch.") - future = client.submit(process_batch, batch, agg_mappings, thresholds) - future.add_done_callback(lambda fut: produce_result(fut.result(), producer, KafkaTopic.ALARMS.value)) - consumer.close() - producer.flush() - LOGGER.info("Kafka consumer and producer closed.") - client.close() - cluster.close() - LOGGER.info("Dask client and cluster closed.") diff --git a/src/analytics/backend/service/Streamer.py b/src/analytics/backend/service/Streamer.py new file mode 100644 index 000000000..124ef5651 --- /dev/null +++ b/src/analytics/backend/service/Streamer.py @@ -0,0 +1,159 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 +import time +import json +from confluent_kafka import KafkaException, KafkaError +# import pandas as pd +from common.tools.kafka.Variables import KafkaTopic +from .AnalyzerHandlers import AnalyzerHandlers, aggregation_handler +from .AnalyzerHelper import AnalyzerHelper + + +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger(__name__) +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(funcName)s - %(levelname)s - %(message)s') + + +class DaskStreamer: + def __init__(self, key, input_kpis, output_kpis, thresholds, batch_size=5, + window_size=None, n_workers=5, threads_per_worker=2): + self.key = key + self.input_kpis = input_kpis + self.output_kpis = output_kpis + self.thresholds = thresholds + self.window_size = window_size + self.batch_size = batch_size + self.n_workers = n_workers + self.threads_per_worker = threads_per_worker + self.running = True + self.batch = [] + + # Initialize Kafka and Dask components + self.client, self.cluster = AnalyzerHelper.initialize_dask_client(n_workers, threads_per_worker) + self.consumer = AnalyzerHelper.initialize_kafka_consumer() + self.producer = AnalyzerHelper.initialize_kafka_producer() + logger.info("Dask Streamer initialized.") + + def run(self): + """Main method to start the DaskStreamer.""" + try: + logger.info("Starting Dask Streamer") + last_batch_time = time.time() + while True: + if not self.consumer: + logger.warning("Kafka consumer is not initialized or stopped. Exiting loop.") + break + if not self.running: + logger.warning("Dask Streamer is not running. Exiting loop.") + break + message = self.consumer.poll(timeout=2.0) + if message is None: + # logger.info("No new messages received.") + continue + if message.error(): + if message.error().code() == KafkaError._PARTITION_EOF: + logger.warning(f"Consumer reached end of topic {message.topic()}/{message.partition()}") + elif message.error(): + raise KafkaException(message.error()) + else: + try: + value = json.loads(message.value()) + except json.JSONDecodeError: + logger.error(f"Failed to decode message: {message.value()}") + continue + self.batch.append(value) + # logger.info(f"Received message: {value}") + + # Window size has a priority over batch size + if self.window_size is None: + if len(self.batch) >= self.batch_size: # If batch size is not provided, process continue with default batch size + logger.info(f"Processing based on batch size {self.batch_size}.") + self.task_handler_selector() + self.batch = [] + else: + # Process based on window size + current_time = time.time() + if (current_time - last_batch_time) >= self.window_size and self.batch: + logger.info(f"Processing based on window size {self.window_size}.") + self.task_handler_selector() + self.batch = [] + last_batch_time = current_time + + except Exception as e: + logger.exception(f"Error in Dask streaming process: {e}") + finally: + logger.info(">>> Exiting Dask Streamer...") + self.cleanup() + logger.info(">>> Dask Streamer Cleanup Completed.") + + def task_handler_selector(self): + """Select the task handler based on the task type.""" + if AnalyzerHandlers.is_valid_handler(self.thresholds["task_type"]): + if self.client.status == 'running': + future = self.client.submit(aggregation_handler, "batch size", self.key, + self.batch, self.input_kpis, self.output_kpis, self.thresholds) + future.add_done_callback(lambda fut: self.produce_result(fut.result(), KafkaTopic.ALARMS.value)) + else: + logger.warning("Dask client is not running. Skipping processing.") + else: + logger.warning(f"Unknown task type: {self.thresholds['task_type']}. Skipping processing.") + + def produce_result(self, result, destination_topic): + """Produce results to the Kafka topic.""" + for record in result: + try: + self.producer.produce( + destination_topic, + key=str(record.get('kpi_id', '')), + value=json.dumps(record), + callback=AnalyzerHelper.delivery_report + ) + except KafkaException as e: + logger.error(f"Failed to produce message: {e}") + self.producer.flush() + logger.info(f"Produced {len(result)} aggregated records to '{destination_topic}'.") + + def cleanup(self): + """Clean up Kafka and Dask resources.""" + logger.info("Shutting down resources...") + self.running = False + if self.consumer: + try: + self.consumer.close() + logger.info("Kafka consumer closed.") + except Exception as e: + logger.error(f"Error closing Kafka consumer: {e}") + + if self.producer: + try: + self.producer.flush() + logger.info("Kafka producer flushed and closed.") + except Exception as e: + logger.error(f"Error closing Kafka producer: {e}") + + if self.client and hasattr(self.client, 'status') and self.client.status == 'running': + try: + self.client.close() + logger.info("Dask client closed.") + except Exception as e: + logger.error(f"Error closing Dask client: {e}") + + if self.cluster and hasattr(self.cluster, 'close'): + try: + self.cluster.close(timeout=5) + logger.info("Dask cluster closed.") + except Exception as e: + logger.error(f"May be timeout. Error closing Dask cluster: {e}") diff --git a/src/analytics/backend/tests/messages.py b/src/analytics/backend/tests/messages.py index 55d966dfb..2ff1e9353 100644 --- a/src/analytics/backend/tests/messages.py +++ b/src/analytics/backend/tests/messages.py @@ -53,8 +53,8 @@ def create_analyzer(): _create_analyzer.algorithm_name = "Test_Aggergate_and_Threshold" _create_analyzer.operation_mode = AnalyzerOperationMode.ANALYZEROPERATIONMODE_STREAMING - _kpi_id = KpiId() # input IDs to analyze + _kpi_id = KpiId() _kpi_id.kpi_id.uuid = str(uuid.uuid4()) _kpi_id.kpi_id.uuid = "5716c369-932b-4a02-b4c7-6a2e808b92d7" _create_analyzer.input_kpi_ids.append(_kpi_id) @@ -63,11 +63,14 @@ def create_analyzer(): _create_analyzer.input_kpi_ids.append(_kpi_id) _kpi_id.kpi_id.uuid = str(uuid.uuid4()) _create_analyzer.input_kpi_ids.append(_kpi_id) + # output IDs after analysis + _kpi_id = KpiId() _kpi_id.kpi_id.uuid = str(uuid.uuid4()) _create_analyzer.output_kpi_ids.append(_kpi_id) _kpi_id.kpi_id.uuid = str(uuid.uuid4()) _create_analyzer.output_kpi_ids.append(_kpi_id) + # parameter _threshold_dict = { # 'avg_value' :(20, 30), 'min_value' :(00, 10), 'max_value' :(45, 50), diff --git a/src/analytics/backend/tests/messages_analyzer.py b/src/analytics/backend/tests/messages_analyzer.py new file mode 100644 index 000000000..040fbb468 --- /dev/null +++ b/src/analytics/backend/tests/messages_analyzer.py @@ -0,0 +1,64 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 pandas as pd +from analytics.backend.service.AnalyzerHandlers import AnalyzerHandlers + +def get_input_kpi_list(): + return ["1e22f180-ba28-4641-b190-2287bf446666", "6e22f180-ba28-4641-b190-2287bf448888", 'kpi_3'] + +def get_output_kpi_list(): + return ["1e22f180-ba28-4641-b190-2287bf441616", "6e22f180-ba28-4641-b190-2287bf181818", 'kpi_4'] + +def get_thresholds(): + return { + "task_type": AnalyzerHandlers.AGGREGATION_HANDLER.value, + "task_parameter": [ + {"last": (40, 80), "variance": (300, 500)}, + {"count": (2, 4), "max": (70, 100)}, + {"min": (10, 20), "avg": (50, 70)}, + ], + } + +def get_duration(): + return 30 + +def get_windows_size(): + return None + +def get_batch_size(): + return 10 + +def get_interval(): + return 5 + +def get_batch(): + return [ + {"time_stamp": "2025-01-13T08:44:10Z", "kpi_id": "6e22f180-ba28-4641-b190-2287bf448888", "kpi_value": 46.72}, + {"time_stamp": "2025-01-13T08:44:12Z", "kpi_id": "6e22f180-ba28-4641-b190-2287bf448888", "kpi_value": 65.22}, + {"time_stamp": "2025-01-13T08:44:14Z", "kpi_id": "1e22f180-ba28-4641-b190-2287bf446666", "kpi_value": 54.24}, + {"time_stamp": "2025-01-13T08:44:16Z", "kpi_id": "1e22f180-ba28-4641-b190-2287bf446666", "kpi_value": 57.67}, + {"time_stamp": "2025-01-13T08:44:18Z", "kpi_id": "1e22f180-ba28-4641-b190-2287bf446666", "kpi_value": 38.6}, + {"time_stamp": "2025-01-13T08:44:20Z", "kpi_id": "6e22f180-ba28-4641-b190-2287bf448888", "kpi_value": 38.9}, + {"time_stamp": "2025-01-13T08:44:22Z", "kpi_id": "6e22f180-ba28-4641-b190-2287bf448888", "kpi_value": 52.44}, + {"time_stamp": "2025-01-13T08:44:24Z", "kpi_id": "6e22f180-ba28-4641-b190-2287bf448888", "kpi_value": 47.76}, + {"time_stamp": "2025-01-13T08:44:26Z", "kpi_id": "efef4d95-1cf1-43c4-9742-95c283ddd7a6", "kpi_value": 33.71}, + {"time_stamp": "2025-01-13T08:44:28Z", "kpi_id": "efef4d95-1cf1-43c4-9742-95c283ddd7a6", "kpi_value": 64.44}, + ] + +def get_agg_df(): + data = [ + {"kpi_id": "1e22f180-ba28-4641-b190-2287bf441616", "last": 47.76, "variance": 970.41}, + ] + return pd.DataFrame(data) diff --git a/src/analytics/backend/tests/test_backend.py b/src/analytics/backend/tests/test_backend.py index 4aa9df5fa..cc0167399 100644 --- a/src/analytics/backend/tests/test_backend.py +++ b/src/analytics/backend/tests/test_backend.py @@ -12,148 +12,186 @@ # See the License for the specific language governing permissions and # limitations under the License. -import time, json -from typing import Dict +import pytest import logging -from threading import Event, Thread +import pandas as pd +from unittest.mock import MagicMock, patch from common.tools.kafka.Variables import KafkaTopic -from analytics.backend.service.AnalyticsBackendService import AnalyticsBackendService -from analytics.backend.tests.messages import get_kpi_id_list, get_operation_list, get_threshold_dict -from .messages import create_analyzer, create_analyzer_dask -from threading import Thread, Event -from ..service.DaskStreaming import DaskStreamer +from analytics.backend.service.Streamer import DaskStreamer +from .messages_analyzer import get_batch, get_input_kpi_list, get_output_kpi_list, get_thresholds, \ + get_windows_size, get_batch_size, get_agg_df +from analytics.backend.service.AnalyzerHandlers import aggregation_handler, threshold_handler -LOGGER = logging.getLogger(__name__) +logger = logging.getLogger(__name__) +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(funcName)s - %(levelname)s - %(message)s') +# --- "test_validate_kafka_topics" should be run before the functionality tests --- +def test_validate_kafka_topics(): + logger.debug(" >>> test_validate_kafka_topics: START <<< ") + response = KafkaTopic.create_all_topics() + assert isinstance(response, bool) ########################### # Tests Implementation of Telemetry Backend ########################### -# --- "test_validate_kafka_topics" should be run before the functionality tests --- -def test_validate_kafka_topics(): - LOGGER.debug(" >>> test_validate_kafka_topics: START <<< ") - response = KafkaTopic.create_all_topics() - assert isinstance(response, bool) +@pytest.fixture(autouse=True) +def log_all_methods(request): + ''' + This fixture logs messages before and after each test function runs, indicating the start and end of the test. + The autouse=True parameter ensures that this logging happens automatically for all tests in the module. + ''' + logger.info(f" >>> Starting test: {request.node.name} >>> ") + yield + logger.info(f" <<< Finished test: {request.node.name} <<< ") + +@pytest.fixture +def dask_streamer(): + with patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_dask_client') as mock_dask_client, \ + patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_kafka_consumer') as mock_kafka_consumer, \ + patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_kafka_producer') as mock_kafka_producer: + + mock_dask_client.return_value = (MagicMock(), MagicMock()) + mock_kafka_consumer.return_value = MagicMock() + mock_kafka_producer.return_value = MagicMock() + + return DaskStreamer( + key="test_key", + input_kpis=get_input_kpi_list(), + output_kpis=get_output_kpi_list(), + thresholds=get_thresholds(), + batch_size=get_batch_size(), + window_size=get_windows_size(), + n_workers=3, + threads_per_worker=1 + ) + +def test_initialization(dask_streamer): + """Test if the DaskStreamer initializes correctly.""" + assert dask_streamer.key == "test_key" + assert dask_streamer.batch_size == get_batch_size() + assert dask_streamer.window_size is None + assert dask_streamer.n_workers == 3 + assert dask_streamer.consumer is not None + assert dask_streamer.producer is not None + assert dask_streamer.client is not None + assert dask_streamer.cluster is not None + + +def test_run_stops_on_no_consumer(dask_streamer): + """Test if the run method exits when the consumer is not initialized.""" + dask_streamer.consumer = None + with patch('time.sleep', return_value=None): + dask_streamer.run() + assert not dask_streamer.running + +def test_task_handler_selector_valid_handler(dask_streamer): + """Test task handler selection with a valid handler.""" + with patch('analytics.backend.service.AnalyzerHandlers.AnalyzerHandlers.is_valid_handler', return_value=True), \ + patch.object(dask_streamer.client, 'submit', return_value=MagicMock()) as mock_submit, \ + patch.object(dask_streamer.client, 'status', 'running'): + + dask_streamer.task_handler_selector() + mock_submit.assert_called_once() + +def test_task_handler_selector_invalid_handler(dask_streamer): + """Test task handler selection with an invalid handler.""" + with patch('analytics.backend.service.AnalyzerHandlers.AnalyzerHandlers.is_valid_handler', return_value=False): + dask_streamer.task_handler_selector() + assert dask_streamer.batch == [] + +def test_produce_result(dask_streamer): + """Test if produce_result sends records to Kafka.""" + result = [{"kpi_id": "kpi1", "value": 100}] + with patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.delivery_report', return_value=None) as mock_delivery_report, \ + patch.object(dask_streamer.producer, 'produce') as mock_produce: + dask_streamer.produce_result(result, "test_topic") + mock_produce.assert_called_once_with( + "test_topic", + key="kpi1", + value='{"kpi_id": "kpi1", "value": 100}', + callback=mock_delivery_report + ) + +def test_cleanup(dask_streamer): + """Test the cleanup method.""" + with patch.object(dask_streamer.consumer, 'close') as mock_consumer_close, \ + patch.object(dask_streamer.producer, 'flush') as mock_producer_flush, \ + patch.object(dask_streamer.client, 'close') as mock_client_close, \ + patch.object(dask_streamer.cluster, 'close', MagicMock()) as mock_cluster_close: + + # Mock the conditions required for the close calls + dask_streamer.client.status = 'running' + dask_streamer.cluster.close = MagicMock() + + dask_streamer.cleanup() + + mock_consumer_close.assert_called_once() + mock_producer_flush.assert_called_once() + mock_client_close.assert_called_once() + dask_streamer.cluster.close.assert_called_once() + +def test_run_with_valid_consumer(dask_streamer): + """Test the run method with a valid Kafka consumer.""" + with patch.object(dask_streamer.consumer, 'poll') as mock_poll, \ + patch.object(dask_streamer, 'task_handler_selector') as mock_task_handler_selector: + + # Simulate valid messages without errors + mock_message_1 = MagicMock() + mock_message_1.value.return_value = b'{"kpi_id": "kpi1", "value": 100}' + mock_message_1.error.return_value = None # No error + + mock_message_2 = MagicMock() + mock_message_2.value.return_value = b'{"kpi_id": "kpi2", "value": 200}' + mock_message_2.error.return_value = None # No error + + # Mock `poll` to return valid messages + mock_poll.side_effect = [mock_message_1, mock_message_2] + + # Run the `run` method in a limited loop + with patch('time.sleep', return_value=None): # Mock `sleep` to avoid delays + dask_streamer.running = True # Ensure the streamer runs + dask_streamer.batch_size = 2 # Set a small batch size for the test + + # Limit the loop by breaking it after one full processing cycle + def stop_running_after_task_handler(*args, **kwargs): + logger.info("Stopping the streamer after processing the first batch.") + dask_streamer.running = False + + mock_task_handler_selector.side_effect = stop_running_after_task_handler + + # Execute the method + dask_streamer.run() + + # Assertions + assert len(dask_streamer.batch) == 0 # Batch should be cleared after processing + mock_task_handler_selector.assert_called_once() # Task handler should be called once + mock_poll.assert_any_call(timeout=2.0) # Poll should have been called + + +# add a test to check the working of aggregation_handler function and threshold_handler from AnalyzerHandlers.py +def test_aggregation_handler(): + + # Create a sample batch + batch = get_batch() + input_kpi_list = get_input_kpi_list() + output_kpi_list = get_output_kpi_list() + thresholds = get_thresholds() + + # Test aggregation_handler + aggregated_df = aggregation_handler( + "test_batch", "test_key", batch, input_kpi_list, output_kpi_list, thresholds + ) + assert isinstance(aggregated_df, list) + assert all(isinstance(item, dict) for item in aggregated_df) +# Test threshold_handler +def test_threshold_handler(): + # Create a sample aggregated DataFrame + agg_df = get_agg_df() + thresholds = get_thresholds() -# --- To test Dask Streamer functionality --- -# def test_StartDaskStreamer(): # Directly from the Streamer class -# LOGGER.debug(" >>> test_StartSparkStreamer: START <<< ") -# stop_event = Event() -# kpi_list = ["1e22f180-ba28-4641-b190-2287bf446666", "6e22f180-ba28-4641-b190-2287bf448888", 'kpi_3'] -# oper_list = ['avg', 'min', 'max',] -# thresholds = { -# 'avg_value': (10.0, 90.0), -# 'min_value': (5.0, 95.0), -# 'max_value': (15.0, 85.0), -# 'latency' : (2.0, 10.0) -# } - -# # Start the DaskStreamer in a separate thread -# streamer_thread = Thread( -# target=DaskStreamer, -# args=("analytics_stream", kpi_list, oper_list, thresholds, stop_event), -# kwargs={ -# "window_size": "60s", -# "win_slide_duration": "30s", -# "time_stamp_col": "time_stamp" -# } -# ) -# streamer_thread.start() -# try: -# while True: -# time.sleep(10) -# except KeyboardInterrupt: -# LOGGER.info("KeyboardInterrupt received. Stopping streamer...") -# stop_event.set() -# streamer_thread.join() -# LOGGER.info("Streamer stopped gracefully.") - -# --- To test Start Streamer functionality --- -# def test_StartDaskStreamer(): -# LOGGER.debug(" >>> test_StartBaskStreamer: START <<< ") -# analyzer_obj = create_analyzer_dask() -# # LOGGER.info("Created Analyzer Object: {:}".format(analyzer_obj)) -# analyzer_uuid = analyzer_obj.analyzer_id.analyzer_id.uuid -# analyzer_to_generate : Dict = { -# "algo_name" : analyzer_obj.algorithm_name, -# "input_kpis" : [k.kpi_id.uuid for k in analyzer_obj.input_kpi_ids], -# "output_kpis" : [k.kpi_id.uuid for k in analyzer_obj.output_kpi_ids], -# "oper_mode" : analyzer_obj.operation_mode, -# "thresholds" : json.loads(analyzer_obj.parameters["thresholds"]), -# "oper_list" : json.loads(analyzer_obj.parameters["oper_list"]), -# # "oper_list" : analyzer_obj.parameters["oper_list"], -# "window_size" : analyzer_obj.parameters["window_size"], -# "window_slider" : analyzer_obj.parameters["window_slider"], -# # "store_aggregate" : analyzer_obj.parameters["store_aggregate"] -# } -# AnalyticsBackendServiceObj = AnalyticsBackendService() -# LOGGER.info("Analyzer to be generated: {:}".format((analyzer_to_generate))) -# response = AnalyticsBackendServiceObj.StartDaskListener(analyzer_uuid, analyzer_to_generate) -# assert isinstance(response, bool) -# time.sleep(100) -# LOGGER.info('Initiating StopRequestListener...') -# # AnalyticsBackendServiceObj = AnalyticsBackendService() -# response = AnalyticsBackendServiceObj.StopDaskListener(analyzer_uuid) -# LOGGER.debug(str(response)) -# assert isinstance(response, bool) - -# --- To test Start Streamer functionality --- -# def test_StartSparkStreamer(): -# LOGGER.debug(" >>> test_StartSparkStreamer: START <<< ") -# analyzer_obj = create_analyzer() -# analyzer_uuid = analyzer_obj.analyzer_id.analyzer_id.uuid -# analyzer_to_generate : Dict = { -# "algo_name" : analyzer_obj.algorithm_name, -# "input_kpis" : [k.kpi_id.uuid for k in analyzer_obj.input_kpi_ids], -# "output_kpis" : [k.kpi_id.uuid for k in analyzer_obj.output_kpi_ids], -# "oper_mode" : analyzer_obj.operation_mode, -# "thresholds" : json.loads(analyzer_obj.parameters["thresholds"]), -# "window_size" : analyzer_obj.parameters["window_size"], -# "window_slider" : analyzer_obj.parameters["window_slider"], -# # "store_aggregate" : analyzer_obj.parameters["store_aggregate"] -# } -# AnalyticsBackendServiceObj = AnalyticsBackendService() -# response = AnalyticsBackendServiceObj.StartSparkStreamer(analyzer_uuid, analyzer_to_generate) -# assert isinstance(response, bool) - -# --- To TEST StartRequestListenerFunctionality -# def test_StartRequestListener(): -# LOGGER.info('test_RunRequestListener') -# AnalyticsBackendServiceObj = AnalyticsBackendService() -# AnalyticsBackendServiceObj.stop_event = Event() -# listener_thread = Thread(target=AnalyticsBackendServiceObj.RequestListener, args=()) -# listener_thread.start() - -# time.sleep(100) - - # AnalyticsBackendServiceObj.stop_event.set() - # LOGGER.info('Backend termination initiated. waiting for termination... 10 seconds') - # listener_thread.join(timeout=10) - # assert not listener_thread.is_alive(), "RequestListener thread did not terminate as expected." - # LOGGER.info('Completed test_RunRequestListener') - -# To test START and STOP communication together -# def test_StopRequestListener(): -# LOGGER.info('test_RunRequestListener') -# LOGGER.info('Initiating StartRequestListener...') -# AnalyticsBackendServiceObj = AnalyticsBackendService() -# response_thread = AnalyticsBackendServiceObj.StartRequestListener() # response is Tuple (thread, stop_event) -# # LOGGER.debug(str(response_thread)) -# time.sleep(10) -# LOGGER.info('Initiating StopRequestListener...') -# AnalyticsBackendServiceObj = AnalyticsBackendService() -# response = AnalyticsBackendServiceObj.StopRequestListener(response_thread) -# LOGGER.debug(str(response)) -# assert isinstance(response, bool) - -# To independently tests the SparkListener functionality -# def test_SparkListener(): -# LOGGER.info('test_RunRequestListener') -# AnalyticsBackendServiceObj = AnalyticsBackendService() -# response = AnalyticsBackendServiceObj.RunSparkStreamer( -# get_kpi_id_list(), get_operation_list(), get_threshold_dict() -# ) -# LOGGER.debug(str(response)) -# assert isinstance(response, bool) + # Test threshold_handler + result = threshold_handler("test_key", agg_df, thresholds["task_parameter"][0]) + assert isinstance(result, pd.DataFrame) + assert result.shape == (1, 7) -- GitLab From 26865f9320e8e0935c56fd7e964595e289ca1719 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Mon, 13 Jan 2025 13:40:41 +0000 Subject: [PATCH 170/463] Commented previous DaskStreamer import. - To be updated later. --- src/analytics/backend/service/AnalyticsBackendService.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/analytics/backend/service/AnalyticsBackendService.py b/src/analytics/backend/service/AnalyticsBackendService.py index f3a58feaa..38a305aec 100755 --- a/src/analytics/backend/service/AnalyticsBackendService.py +++ b/src/analytics/backend/service/AnalyticsBackendService.py @@ -23,7 +23,7 @@ from confluent_kafka import KafkaError from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc from threading import Thread, Event -from .DaskStreaming import DaskStreamer +# from .DaskStreaming import DaskStreamer LOGGER = logging.getLogger(__name__) @@ -89,7 +89,7 @@ class AnalyticsBackendService(GenericGrpcService): try: stop_event = Event() thread = Thread( - target=DaskStreamer, + target=None, # DaskStreamer, # args=(analyzer_uuid, kpi_list, oper_list, thresholds, stop_event), args=(analyzer['output_kpis'][0] , kpi_list, thresholds, stop_event), kwargs={ -- GitLab From 1e90b149dbbc5e2bbb044e35954870c77925132c Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Mon, 13 Jan 2025 17:27:16 +0000 Subject: [PATCH 171/463] Initial Telemetry backend and new analytics integration test. --- .../run_tests_locally-analytics-backend.sh | 2 +- .../run_tests_locally-analytics-frontend.sh | 2 +- .../service/AnalyticsBackendService.py | 95 ++++++++++--------- .../backend/service/AnalyzerHandlers.py | 8 +- src/analytics/backend/service/Streamer.py | 4 +- src/analytics/backend/tests/test_backend.py | 35 +++++-- 6 files changed, 85 insertions(+), 61 deletions(-) diff --git a/scripts/run_tests_locally-analytics-backend.sh b/scripts/run_tests_locally-analytics-backend.sh index 78fab0f76..700155a42 100755 --- a/scripts/run_tests_locally-analytics-backend.sh +++ b/scripts/run_tests_locally-analytics-backend.sh @@ -24,5 +24,5 @@ export KFK_SERVER_ADDRESS='127.0.0.1:9092' CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}') export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_analytics?sslmode=require" -python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG --verbose \ +python3 -m pytest --log-level=DEBUG --log-cli-level=INFO --verbose \ analytics/backend/tests/test_backend.py diff --git a/scripts/run_tests_locally-analytics-frontend.sh b/scripts/run_tests_locally-analytics-frontend.sh index 6e945406f..0cb4dc98d 100755 --- a/scripts/run_tests_locally-analytics-frontend.sh +++ b/scripts/run_tests_locally-analytics-frontend.sh @@ -21,5 +21,5 @@ RCFILE=$PROJECTDIR/coverage/.coveragerc export KFK_SERVER_ADDRESS='127.0.0.1:9092' CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}') export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_analytics?sslmode=require" -python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG --verbose \ +python3 -m pytest --log-level=DEBUG --log-cli-level=INFO --verbose \ analytics/frontend/tests/test_frontend.py diff --git a/src/analytics/backend/service/AnalyticsBackendService.py b/src/analytics/backend/service/AnalyticsBackendService.py index 38a305aec..508feecea 100755 --- a/src/analytics/backend/service/AnalyticsBackendService.py +++ b/src/analytics/backend/service/AnalyticsBackendService.py @@ -12,10 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import time import json import logging import threading + +import pytz from common.tools.service.GenericGrpcService import GenericGrpcService from common.tools.kafka.Variables import KafkaConfig, KafkaTopic from confluent_kafka import Consumer as KafkaConsumer @@ -23,7 +24,11 @@ from confluent_kafka import KafkaError from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc from threading import Thread, Event -# from .DaskStreaming import DaskStreamer +from analytics.backend.service.Streamer import DaskStreamer +from common.proto.analytics_frontend_pb2 import Analyzer +from apscheduler.schedulers.background import BackgroundScheduler +from datetime import datetime, timedelta + LOGGER = logging.getLogger(__name__) @@ -35,13 +40,18 @@ class AnalyticsBackendService(GenericGrpcService): LOGGER.info('Init AnalyticsBackendService') port = get_service_port_grpc(ServiceNameEnum.ANALYTICSBACKEND) super().__init__(port, cls_name=cls_name) + self.schedular = BackgroundScheduler(daemon=True) + self.schedular.start() self.running_threads = {} # To keep track of all running analyzers self.kafka_consumer = KafkaConsumer({'bootstrap.servers' : KafkaConfig.get_kafka_address(), 'group.id' : 'analytics-frontend', 'auto.offset.reset' : 'latest'}) def install_servicers(self): - threading.Thread(target=self.RequestListener, args=()).start() + threading.Thread( + target=self.RequestListener, + args=() + ).start() def RequestListener(self): """ @@ -69,56 +79,53 @@ class AnalyticsBackendService(GenericGrpcService): # print ('Recevied Analyzer: {:} - {:}'.format(analyzer_uuid, analyzer)) if analyzer["algo_name"] is None and analyzer["oper_mode"] is None: - self.StopDaskListener(analyzer_uuid) + self.StopStreamer(analyzer_uuid) else: - self.StartDaskListener(analyzer_uuid, analyzer) + self.StartStreamer(analyzer_uuid, analyzer) except Exception as e: LOGGER.warning("Unable to consume message from topic: {:}. ERROR: {:}".format(KafkaTopic.ANALYTICS_REQUEST.value, e)) - # print ("Unable to consume message from topic: {:}. ERROR: {:}".format(KafkaTopic.ANALYTICS_REQUEST.value, e)) - def StartDaskListener(self, analyzer_uuid, analyzer): - kpi_list = analyzer[ 'input_kpis' ] - thresholds = analyzer[ 'thresholds' ] - window_size = analyzer[ 'window_size' ] - window_slider = analyzer[ 'window_slider'] - LOGGER.debug ("Received parameters: {:} - {:} - {:} - {:}".format( - kpi_list, thresholds, window_size, window_slider)) - # print ("Received parameters: {:} - {:} - {:} - {:}".format( - # kpi_list, thresholds, window_size, window_slider)) + def StartStreamer(self, analyzer_uuid : str, analyzer : json): + """ + Start the DaskStreamer with the given parameters. + """ try: - stop_event = Event() - thread = Thread( - target=None, # DaskStreamer, - # args=(analyzer_uuid, kpi_list, oper_list, thresholds, stop_event), - args=(analyzer['output_kpis'][0] , kpi_list, thresholds, stop_event), - kwargs={ - "window_size" : window_size, - } + streamer = DaskStreamer( + analyzer_uuid, + analyzer['input_kpis' ], + analyzer['output_kpis'], + analyzer['thresholds' ], + analyzer['batch_size' ], + analyzer['window_size'], ) - thread.start() - self.running_threads[analyzer_uuid] = (thread, stop_event) - # print ("Initiated Analyzer backend: {:}".format(analyzer_uuid)) - LOGGER.info("Initiated Analyzer backend: {:}".format(analyzer_uuid)) + self.schedular.add_job( + streamer.run, + 'date', + run_date=datetime.now(pytz.utc), + id=analyzer_uuid, + replace_existing=True + ) + LOGGER.info("Dask Streamer started.") return True except Exception as e: - # print ("Failed to initiate Analyzer backend: {:}".format(e)) - LOGGER.error("Failed to initiate Analyzer backend: {:}".format(e)) + LOGGER.error("Failed to start Dask Streamer. ERROR: {:}".format(e)) return False - def StopDaskListener(self, analyzer_uuid): - if analyzer_uuid in self.running_threads: - try: - thread, stop_event = self.running_threads[analyzer_uuid] - stop_event.set() - thread.join() - del self.running_threads[analyzer_uuid] - # print ("Terminating backend (by TerminateBackend): Analyzer Id: {:}".format(analyzer_uuid)) - LOGGER.info("Terminating backend (by TerminateBackend): Analyzer Id: {:}".format(analyzer_uuid)) - return True - except Exception as e: - LOGGER.error("Failed to terminate. Analyzer Id: {:} - ERROR: {:}".format(analyzer_uuid, e)) + def StopStreamer(self, analyzer_uuid : str): + """ + Stop the DaskStreamer with the given analyzer_uuid. + """ + try: + active_jobs = self.schedular.get_jobs() + logger.debug("Active Jobs: {:}".format(active_jobs)) + if analyzer_uuid not in [job.id for job in active_jobs]: + LOGGER.warning("Dask Streamer not found with the given analyzer_uuid: {:}".format(analyzer_uuid)) return False - else: - # print ("Analyzer not found in active collectors. Analyzer Id: {:}".format(analyzer_uuid)) - LOGGER.warning("Analyzer not found in active collectors: Analyzer Id: {:}".format(analyzer_uuid)) + self.schedular.remove_job(analyzer_uuid) + LOGGER.info("Dask Streamer stopped.") + return True + except Exception as e: + LOGGER.error("Failed to stop Dask Streamer. ERROR: {:}".format(e)) + return False + diff --git a/src/analytics/backend/service/AnalyzerHandlers.py b/src/analytics/backend/service/AnalyzerHandlers.py index 34ada434b..f407de2a0 100644 --- a/src/analytics/backend/service/AnalyzerHandlers.py +++ b/src/analytics/backend/service/AnalyzerHandlers.py @@ -18,7 +18,7 @@ import pandas as pd logger = logging.getLogger(__name__) -logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(funcName)s - %(levelname)s - %(message)s') +logging.basicConfig(level=logging.INFO, format='%(levelname)s - %(message)s') class AnalyzerHandlers(Enum): AGGREGATION_HANDLER = "AggregationHandler" @@ -49,14 +49,14 @@ def threshold_handler(key, aggregated_df, thresholds): continue # Ensure the threshold values are valid (check for tuple specifically) - if isinstance(threshold_values, tuple) and len(threshold_values) == 2: + if isinstance(threshold_values, list) and len(threshold_values) == 2: fail_th, raise_th = threshold_values # Add threshold columns with updated naming aggregated_df[f"{metric_name}_TH_RAISE"] = aggregated_df[metric_name] > raise_th aggregated_df[f"{metric_name}_TH_FALL"] = aggregated_df[metric_name] < fail_th else: - logger.warning(f"Threshold values for '{metric_name}' are not a tuple of length 2. Skipping threshold application.") + logger.warning(f"Threshold values for '{metric_name}' ({threshold_values}) are not a tuple of length 2. Skipping threshold application.") return aggregated_df def aggregation_handler( @@ -71,7 +71,7 @@ def aggregation_handler( logger.info("Empty batch received. Skipping processing.") return [] else: - logger.info(f"Processing {len(batch)} records for key: {key}") + logger.info(f" >>>>> Processing {len(batch)} records for key: {key}") # Convert data into a DataFrame df = pd.DataFrame(batch) diff --git a/src/analytics/backend/service/Streamer.py b/src/analytics/backend/service/Streamer.py index 124ef5651..cabed8588 100644 --- a/src/analytics/backend/service/Streamer.py +++ b/src/analytics/backend/service/Streamer.py @@ -24,7 +24,7 @@ from .AnalyzerHelper import AnalyzerHelper logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) -logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(funcName)s - %(levelname)s - %(message)s') +logging.basicConfig(level=logging.INFO, format=' %(levelname)s - %(message)s') class DaskStreamer: @@ -59,7 +59,7 @@ class DaskStreamer: if not self.running: logger.warning("Dask Streamer is not running. Exiting loop.") break - message = self.consumer.poll(timeout=2.0) + message = self.consumer.poll(timeout=2.0) # Poll for new messages after 2 sceonds if message is None: # logger.info("No new messages received.") continue diff --git a/src/analytics/backend/tests/test_backend.py b/src/analytics/backend/tests/test_backend.py index cc0167399..09be90e4c 100644 --- a/src/analytics/backend/tests/test_backend.py +++ b/src/analytics/backend/tests/test_backend.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import time import pytest import logging import pandas as pd @@ -21,19 +22,11 @@ from analytics.backend.service.Streamer import DaskStreamer from .messages_analyzer import get_batch, get_input_kpi_list, get_output_kpi_list, get_thresholds, \ get_windows_size, get_batch_size, get_agg_df from analytics.backend.service.AnalyzerHandlers import aggregation_handler, threshold_handler +from analytics.backend.service.AnalyticsBackendService import AnalyticsBackendService logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(funcName)s - %(levelname)s - %(message)s') -# --- "test_validate_kafka_topics" should be run before the functionality tests --- -def test_validate_kafka_topics(): - logger.debug(" >>> test_validate_kafka_topics: START <<< ") - response = KafkaTopic.create_all_topics() - assert isinstance(response, bool) - -########################### -# Tests Implementation of Telemetry Backend -########################### @pytest.fixture(autouse=True) def log_all_methods(request): @@ -45,6 +38,30 @@ def log_all_methods(request): yield logger.info(f" <<< Finished test: {request.node.name} <<< ") + +# --- "test_validate_kafka_topics" should be run before the functionality tests --- +def test_validate_kafka_topics(): + logger.debug(" >>> test_validate_kafka_topics: START <<< ") + response = KafkaTopic.create_all_topics() + assert isinstance(response, bool) + +########################### +# integration test of Streamer with backend service +########################### + +def test_backend_integration_with_analyzer(): + backendServiceObject = AnalyticsBackendService() + backendServiceObject.install_servicers() + logger.info(" waiting for 2 minutes for the backend service before termination ... ") + time.sleep(120) + backendServiceObject.StopStreamer("efef4d95-1cf1-43c4-9742-95c283ddd666") + logger.info(" Backend service terminated successfully ... ") + + +########################### +# funtionality pytest for analyzer sub methods +########################### + @pytest.fixture def dask_streamer(): with patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_dask_client') as mock_dask_client, \ -- GitLab From 835a8e7a3cfef66277ab4029dc94a424489af42d Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 14 Jan 2025 10:41:37 +0100 Subject: [PATCH 172/463] feat:ofc25 camara e2e test added --- src/tests/ofc25/.gitignore | 5 + src/tests/ofc25/.gitlab-ci.yml | 121 ++ src/tests/ofc25/Dockerfile | 71 + src/tests/ofc25/README.md | 97 + src/tests/ofc25/__init__.py | 14 + src/tests/ofc25/data/camara-e2e-topology.json | 1642 +++++++++++++++++ ...st_connection_group_to_network_slice1.json | 62 + ...st_connection_group_to_network_slice2.json | 62 + ...post_match_criteria_to_sdp1_in_slice1.json | 40 + ...post_match_criteria_to_sdp1_in_slice2.json | 40 + .../ofc25/data/slice/post_network_slice1.json | 188 ++ .../ofc25/data/slice/post_network_slice2.json | 189 ++ .../slice/post_sdp_to_network_slice1.json | 61 + .../slice/post_sdp_to_network_slice2.json | 62 + .../data/slice/target-full-ietf-slice.json | 678 +++++++ .../data/target-ietf-slice-posted-slices.json | 382 ++++ ...rget-ietf-slice-put-connection-groups.json | 234 +++ .../ofc25/data/target-nce-app-flows.json | 58 + src/tests/ofc25/data/target-nce-apps.json | 82 + src/tests/ofc25/deploy_specs.sh | 208 +++ src/tests/ofc25/redeploy-tfs.sh | 17 + src/tests/ofc25/requirements.in | 16 + .../scripts/run-e2e-ietf-slice-operations.sh | 20 + src/tests/ofc25/scripts/run-onboarding.sh | 20 + src/tests/ofc25/tests/Tools.py | 109 ++ src/tests/ofc25/tests/__init__.py | 14 + .../tests/test_e2e_ietf_slice_operations.py | 481 +++++ src/tests/ofc25/tests/test_onboarding.py | 67 + 28 files changed, 5040 insertions(+) create mode 100644 src/tests/ofc25/.gitignore create mode 100644 src/tests/ofc25/.gitlab-ci.yml create mode 100644 src/tests/ofc25/Dockerfile create mode 100644 src/tests/ofc25/README.md create mode 100644 src/tests/ofc25/__init__.py create mode 100644 src/tests/ofc25/data/camara-e2e-topology.json create mode 100644 src/tests/ofc25/data/slice/post_connection_group_to_network_slice1.json create mode 100644 src/tests/ofc25/data/slice/post_connection_group_to_network_slice2.json create mode 100644 src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice1.json create mode 100644 src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice2.json create mode 100644 src/tests/ofc25/data/slice/post_network_slice1.json create mode 100644 src/tests/ofc25/data/slice/post_network_slice2.json create mode 100644 src/tests/ofc25/data/slice/post_sdp_to_network_slice1.json create mode 100644 src/tests/ofc25/data/slice/post_sdp_to_network_slice2.json create mode 100644 src/tests/ofc25/data/slice/target-full-ietf-slice.json create mode 100644 src/tests/ofc25/data/target-ietf-slice-posted-slices.json create mode 100644 src/tests/ofc25/data/target-ietf-slice-put-connection-groups.json create mode 100644 src/tests/ofc25/data/target-nce-app-flows.json create mode 100644 src/tests/ofc25/data/target-nce-apps.json create mode 100755 src/tests/ofc25/deploy_specs.sh create mode 100755 src/tests/ofc25/redeploy-tfs.sh create mode 100644 src/tests/ofc25/requirements.in create mode 100755 src/tests/ofc25/scripts/run-e2e-ietf-slice-operations.sh create mode 100755 src/tests/ofc25/scripts/run-onboarding.sh create mode 100644 src/tests/ofc25/tests/Tools.py create mode 100644 src/tests/ofc25/tests/__init__.py create mode 100644 src/tests/ofc25/tests/test_e2e_ietf_slice_operations.py create mode 100644 src/tests/ofc25/tests/test_onboarding.py diff --git a/src/tests/ofc25/.gitignore b/src/tests/ofc25/.gitignore new file mode 100644 index 000000000..24a4b2333 --- /dev/null +++ b/src/tests/ofc25/.gitignore @@ -0,0 +1,5 @@ +clab-*/ +images/ +*.clab.yml.bak +*.tar +*.tar.gz diff --git a/src/tests/ofc25/.gitlab-ci.yml b/src/tests/ofc25/.gitlab-ci.yml new file mode 100644 index 000000000..7bc42ce7b --- /dev/null +++ b/src/tests/ofc25/.gitlab-ci.yml @@ -0,0 +1,121 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Build, tag, and push the Docker images to the GitLab Docker registry +build ofc25: + variables: + TEST_NAME: 'ofc25' + NCE_NAME: 'nce' + AGG_NET_NAME: 'agg_net' + NCE_PORT: '9090' + AGG_NET_PORT: '9091' + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') + - sed -i "s/AGG_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json + - sed -i "s/NCE_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json + - sed -i "s/AGG_NET_PORT/${AGG_NET_PORT}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json + - sed -i "s/NCE_PORT/${NCE_PORT}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json + - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . + - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + - docker buildx build -t "${NCE_NAME}:latest" -f ./src/tests/tools/mock_nce_ctrl/Dockerfile . + - docker tag "${NCE_NAME}:latest" "$CI_REGISTRY_IMAGE/${NCE_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${NCE_NAME}:latest" + - docker buildx build -t "${AGG_NET_NAME}:latest" -f ./src/tests/tools/mock_ietf_network_slice_sdn_ctrl/Dockerfile . + - docker tag "${AGG_NET_NAME}:latest" "$CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest" + after_script: + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/tests/${TEST_NAME}/**/*.{py,in,sh,yml} + - src/tests/${TEST_NAME}/Dockerfile + - .gitlab-ci.yml + +# Deploy TeraFlowSDN and Execute end-2-end test +end2end_test ofc25: + variables: + TEST_NAME: 'ofc25' + NCE_NAME: 'nce' + AGG_NET_NAME: 'agg_net' + NCE_PORT: '9090' + AGG_NET_PORT: '9091' + stage: end2end_test + # Disable to force running it after all other tasks + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - docker rm -f ${TEST_NAME} || true + - docker pull "${CI_REGISTRY_IMAGE}/${NCE_NAME}:latest" + - docker run -d --name ${NCE_NAME} -p ${NCE_PORT}:8443 $CI_REGISTRY_IMAGE/${NCE_NAME}:latest + - docker pull "${CI_REGISTRY_IMAGE}/${AGG_NET_NAME}:latest" + - docker run -d --name ${AGG_NET_NAME} -p ${AGG_NET_PORT}:8443 $CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest + + script: + # Download Docker image to run the test + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}:latest" + + # Check MicroK8s is ready + - microk8s status --wait-ready + - kubectl get pods --all-namespaces + + - source src/tests/${TEST_NAME}/deploy_specs.sh + + # Deploy TeraFlowSDN + - ./deploy/crdb.sh + - ./deploy/nats.sh + - ./deploy/qdb.sh + - ./deploy/kafka.sh + - ./deploy/tfs.sh + - ./deploy/show.sh + + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + + # Run end-to-end test: onboard scenario + - > + docker run -t --rm --name ${TEST_NAME} --network=host + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-onboarding.sh + + # Run end-to-end test: configure service TFS + - > + docker run -t --rm --name ${TEST_NAME} --network=host + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-e2e-ietf-slice-operations.sh + + after_script: + - kubectl --namespace tfs logs deployment/contextservice -c server + - kubectl --namespace tfs logs deployment/deviceservice -c server + - kubectl --namespace tfs logs deployment/pathcompservice -c frontend + - kubectl --namespace tfs logs deployment/serviceservice -c server + - kubectl --namespace tfs logs deployment/nbiservice -c server + + # Destroy Scenario + - kubectl delete namespaces tfs || true + + # Clean old docker images + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + + #coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + artifacts: + when: always + reports: + junit: ./src/tests/${TEST_NAME}/report_*.xml diff --git a/src/tests/ofc25/Dockerfile b/src/tests/ofc25/Dockerfile new file mode 100644 index 000000000..b2ce8157a --- /dev/null +++ b/src/tests/ofc25/Dockerfile @@ -0,0 +1,71 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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 + +# Install dependencies +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install wget g++ git && \ + rm -rf /var/lib/apt/lists/* + +# 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 + +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + +# Add common files into working directory +WORKDIR /var/teraflow/common +COPY src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto +RUN touch __init__.py +COPY proto/*.proto ./ +RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto +RUN rm *.proto +RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; + +# Create component sub-folders, get specific Python packages +RUN mkdir -p /var/teraflow/tests/ofc25 +WORKDIR /var/teraflow/tests/ofc25 +COPY src/tests/ofc25/requirements.in requirements.in +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +# Add component files into working directory +WORKDIR /var/teraflow +COPY src/__init__.py ./__init__.py +COPY src/tests/*.py ./tests/ +COPY src/tests/ofc25/__init__.py ./tests/ofc25/__init__.py +COPY src/tests/ofc25/data/. ./tests/ofc25/data/ +COPY src/tests/ofc25/tests/. ./tests/ofc25/tests/ +COPY src/tests/ofc25/scripts/. ./ + +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install tree && \ + rm -rf /var/lib/apt/lists/* + +RUN tree -la /var/teraflow diff --git a/src/tests/ofc25/README.md b/src/tests/ofc25/README.md new file mode 100644 index 000000000..23522ad6f --- /dev/null +++ b/src/tests/ofc25/README.md @@ -0,0 +1,97 @@ +# DataPlane-in-a-Box - Control an Emulated DataPlane through TeraFlowSDN + +## Emulated DataPlane Deployment +- Scenario +- Descriptor + +## TeraFlowSDN Deployment +```bash +cd ~/tfs-ctrl +source ~/tfs-ctrl/src/tests/ofc25/deploy_specs.sh +./deploy/all.sh +``` + +## Deploy scenario +```bash +cd ~/tfs-ctrl/src/tests/ofc25/ +sudo containerlab deploy --topo eucnc24.clab.yml +``` + +## Inspect scenario +```bash +cd ~/tfs-ctrl/src/tests/eucnc24/ +sudo containerlab inspect --topo eucnc24.clab.yml +``` + +## Destroy scenario +```bash +cd ~/tfs-ctrl/src/tests/eucnc24/ +sudo containerlab destroy --topo eucnc24.clab.yml +sudo rm -rf clab-eucnc24/ .eucnc24.clab.yml.bak +``` + +## Access cEOS Bash/CLI +```bash +docker exec -it clab-eucnc24-r1 bash +docker exec -it clab-eucnc24-r2 bash +docker exec -it clab-eucnc24-r3 bash +docker exec -it clab-eucnc24-r1 Cli +docker exec -it clab-eucnc24-r2 Cli +docker exec -it clab-eucnc24-r3 Cli +``` + +## Configure ContainerLab clients +```bash +docker exec -it clab-eucnc24-dc1 bash + ip address add 172.16.1.10/24 dev eth1 + ip route add 172.16.2.0/24 via 172.16.1.1 + ping 172.16.2.10 + +docker exec -it clab-eucnc24-dc2 bash + ip address add 172.16.2.10/24 dev eth1 + ip route add 172.16.1.0/24 via 172.16.2.1 + ping 172.16.1.10 +``` + +## Install gNMIc +```bash +sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)" +``` + +## gNMI Capabilities request +```bash +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure capabilities +``` + +## gNMI Get request +```bash +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path / > r1.json +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /interfaces/interface > r1-ifaces.json +``` + +## gNMI Set request +```bash +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --update-path /system/config/hostname --update-value srl11 +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /system/config/hostname +``` + +## Subscribe request +```bash +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf subscribe --path /interfaces/interface[name=Management0]/state/ + +# In another terminal, you can generate traffic opening SSH connection +ssh admin@clab-eucnc24-r1 +``` + +# Check configurations done: +```bash +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/network-instances' > r1-nis.json +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/interfaces' > r1-ifs.json +``` + +# Delete elements: +```bash +--address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/network-instances/network-instance[name=b19229e8]' +--address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/1]/subinterfaces/subinterface[index=0]' +--address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/2]/subinterfaces/subinterface[index=0]' +``` diff --git a/src/tests/ofc25/__init__.py b/src/tests/ofc25/__init__.py new file mode 100644 index 000000000..3ccc21c7d --- /dev/null +++ b/src/tests/ofc25/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ofc25/data/camara-e2e-topology.json b/src/tests/ofc25/data/camara-e2e-topology.json new file mode 100644 index 000000000..7ae2da79c --- /dev/null +++ b/src/tests/ofc25/data/camara-e2e-topology.json @@ -0,0 +1,1642 @@ +{ + "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": "agg-net-controller" + } + }, + "name": "agg-net-controller", + "device_type": "ietf-slice", + "device_operational_status": 1, + "device_drivers": [ + 14 + ], + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "AGG_NET_IP" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "AGG_NET_PORT" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + } + ], + "scheme": "http", + "username": "admin", + "password": "admin", + "base_url": "/restconf/v2/data", + "timeout": 120, + "verify": false + } + } + } + ] + }, + "device_endpoints": [] + }, + { + "device_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "name": "nce-controller", + "device_type": "nce", + "device_operational_status": 1, + "device_drivers": [ + 15 + ], + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "NCE_IP" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "NCE_PORT" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + } + ], + "scheme": "http", + "username": "admin", + "password": "admin", + "base_url": "/restconf/v2/data", + "timeout": 120, + "verify": false + } + } + } + ] + }, + "device_endpoints": [] + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "name": "172.16.182.25", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 14 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "address_ip": "128.32.33.254", + "address_prefix": "24", + "site_location": "access", + "mtu": "1500" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "name": "172.16.185.31", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 14 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "name": "172.16.185.33", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 14 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "name": "172.16.185.32", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 0, + 14 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "ce-ip": "172.10.33.2", + "address_ip": "172.10.33.254", + "address_prefix": "24", + "site_location": "cloud", + "mtu": "1500" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "name": "172.16.58.10", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 15 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "address_ip": "0.0.0.0", + "address_prefix": "24" + }, + { + "uuid": "201", + "name": "201", + "type": "optical", + "address_ip": "0.0.0.0", + "address_prefix": "24" + }, + { + "uuid": "500", + "name": "500", + "type": "optical", + "address_ip": "128.32.33.2", + "address_prefix": "24" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "name": "172.16.61.10", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 15 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "address_ip": "0.0.0.0", + "address_prefix": "24" + }, + { + "uuid": "500", + "name": "500", + "type": "optical", + "address_ip": "128.32.33.2", + "address_prefix": "24" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "name": "172.16.61.11", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 15 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "address_ip": "0.0.0.0", + "address_prefix": "24" + }, + { + "uuid": "500", + "name": "500", + "type": "optical", + "address_ip": "128.32.33.2", + "address_prefix": "24" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.221" + } + }, + "device_type": "emu-datacenter", + "device_drivers": [ + 0 + ], + "device_endpoints": [], + "device_operational_status": 1, + "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", + "uuid": "eth0" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.222" + } + }, + "device_type": "emu-datacenter", + "device_drivers": [ + 0 + ], + "device_endpoints": [], + "device_operational_status": 1, + "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", + "uuid": "eth0" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "device_type": "emu-datacenter", + "device_drivers": [ + 0 + ], + "device_endpoints": [], + "device_operational_status": 1, + "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", + "uuid": "500" + }, + { + "sample_types": [], + "type": "optical", + "uuid": "200" + }, + { + "sample_types": [], + "type": "optical", + "uuid": "201" + } + ] + } + } + } + ] + } + } + ], + "links": [ + { + "link_id": { + "link_uuid": { + "uuid": "nce-controller/mgmt==172.16.61.11/mgmt" + } + }, + "name": "nce-controller/mgmt==172.16.61.11/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "nce-controller/mgmt==172.16.61.10/mgmt" + } + }, + "name": "nce-controller/mgmt==172.16.61.10/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "nce-controller/mgmt==172.16.58.10/mgmt" + } + }, + "name": "nce-controller/mgmt==172.16.58.10/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "nce-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==172.16.185.33/mgmt" + } + }, + "name": "agg-net-controller/mgmt==172.16.185.33/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==172.16.185.31/mgmt" + } + }, + "name": "agg-net-controller/mgmt==172.16.185.31/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==172.16.182.25/mgmt" + } + }, + "name": "agg-net-controller/mgmt==172.16.182.25/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==172.16.182.25/mgmt" + } + }, + "name": "agg-net-controller/mgmt==172.16.182.25/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-500" + } + }, + "name": "172.16.182.25-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.33-500" + } + }, + "name": "172.16.185.33-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-501" + } + }, + "name": "172.16.182.25-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.31-501" + } + }, + "name": "172.16.185.31-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.31-500" + } + }, + "name": "172.16.185.31-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-500" + } + }, + "name": "172.16.185.32-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.33-501" + } + }, + "name": "172.16.185.33-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-501" + } + }, + "name": "172.16.185.32-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-200" + } + }, + "name": "172.16.185.32-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.204.220-500" + } + }, + "name": "172.16.204.220-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-200" + } + }, + "name": "172.16.182.25-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.58.10-500" + } + }, + "name": "172.16.58.10-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.58.10-200" + } + }, + "name": "172.16.58.10-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.61.10-500" + } + }, + "name": "172.16.61.10-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.58.10-201" + } + }, + "name": "172.16.58.10-201", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "201" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.61.11-500" + } + }, + "name": "172.16.61.11-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.58.10" + } + }, + "endpoint_uuid": { + "uuid": "201" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.61.10-200" + } + }, + "name": "172.16.61.10-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.221" + } + }, + "endpoint_uuid": { + "uuid": "eth0" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.104.221-eth0" + } + }, + "name": "172.16.104.221-eth0", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.221" + } + }, + "endpoint_uuid": { + "uuid": "eth0" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.10" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.61.11-200" + } + }, + "name": "172.16.61.11-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.222" + } + }, + "endpoint_uuid": { + "uuid": "eth0" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.104.222-eth0" + } + }, + "name": "172.16.104.222-eth0", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.104.222" + } + }, + "endpoint_uuid": { + "uuid": "eth0" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.61.11" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + } + ] +} diff --git a/src/tests/ofc25/data/slice/post_connection_group_to_network_slice1.json b/src/tests/ofc25/data/slice/post_connection_group_to_network_slice1.json new file mode 100644 index 000000000..d39a837bd --- /dev/null +++ b/src/tests/ofc25/data/slice/post_connection_group_to_network_slice1.json @@ -0,0 +1,62 @@ +{ + "connection-group": [ + { + "id": "line2", + "connectivity-type": "point-to-point", + "connectivity-construct": [ + { + "id": 1, + "p2p-sender-sdp": "1", + "p2p-receiver-sdp": "3", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "10" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "5000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + }, + { + "id": 2, + "p2p-sender-sdp": "3", + "p2p-receiver-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "20" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "1000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/src/tests/ofc25/data/slice/post_connection_group_to_network_slice2.json b/src/tests/ofc25/data/slice/post_connection_group_to_network_slice2.json new file mode 100644 index 000000000..d39a837bd --- /dev/null +++ b/src/tests/ofc25/data/slice/post_connection_group_to_network_slice2.json @@ -0,0 +1,62 @@ +{ + "connection-group": [ + { + "id": "line2", + "connectivity-type": "point-to-point", + "connectivity-construct": [ + { + "id": 1, + "p2p-sender-sdp": "1", + "p2p-receiver-sdp": "3", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "10" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "5000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + }, + { + "id": 2, + "p2p-sender-sdp": "3", + "p2p-receiver-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "20" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "1000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice1.json b/src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice1.json new file mode 100644 index 000000000..16a36d45b --- /dev/null +++ b/src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice1.json @@ -0,0 +1,40 @@ +{ + "match-criterion": [ + { + "index": 2, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "101" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.222/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + } + ], + "target-connection-group-id": "line2" + } + ] +} \ No newline at end of file diff --git a/src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice2.json b/src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice2.json new file mode 100644 index 000000000..8ceefdc2f --- /dev/null +++ b/src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice2.json @@ -0,0 +1,40 @@ +{ + "match-criterion": [ + { + "index": 2, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "201" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.222/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + } + ], + "target-connection-group-id": "line2" + } + ] +} \ No newline at end of file diff --git a/src/tests/ofc25/data/slice/post_network_slice1.json b/src/tests/ofc25/data/slice/post_network_slice1.json new file mode 100644 index 000000000..e6e0ee90a --- /dev/null +++ b/src/tests/ofc25/data/slice/post_network_slice1.json @@ -0,0 +1,188 @@ +{ + "slice-service": [ + { + "id": "slice1", + "description": "network slice 1, connect to VM1", + "sdps": { + "sdp": [ + { + "id": "1", + "node-id": "172.16.204.220", + "sdp-ip-address": [ + "172.16.204.220" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "101" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC POP to VM1", + "description": "AC VM1 connected to POP", + "ac-node-id": "172.16.204.220", + "ac-tp-id": "200" + } + ] + } + }, + { + "id": "2", + "node-id": "172.16.61.10", + "sdp-ip-address": [ + "172.16.61.10" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "21" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC ONT", + "description": "AC connected to PC1", + "ac-node-id": "172.16.61.10", + "ac-tp-id": "200" + } + ] + } + } + ] + }, + "connection-groups": { + "connection-group": [ + { + "id": "line1", + "connectivity-type": "point-to-point", + "connectivity-construct": [ + { + "id": 1, + "p2p-sender-sdp": "1", + "p2p-receiver-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "10" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "5000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + }, + { + "id": 2, + "p2p-sender-sdp": "2", + "p2p-receiver-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "20" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "1000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + } + ] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/tests/ofc25/data/slice/post_network_slice2.json b/src/tests/ofc25/data/slice/post_network_slice2.json new file mode 100644 index 000000000..97e6ade27 --- /dev/null +++ b/src/tests/ofc25/data/slice/post_network_slice2.json @@ -0,0 +1,189 @@ +{ + "slice-service": [ + { + "id": "slice2", + "description": "network slice 2, connect to VM2", + "sdps": { + "sdp": [ + { + "id": "1", + "node-id": "172.16.204.220", + "sdp-ip-address": [ + "172.16.204.220" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "201" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC POP to VM2", + "description": "AC VM2 connected to POP", + "ac-node-id": "172.16.204.220", + "ac-tp-id": "201" + } + ] + } + }, + { + "id": "2", + "node-id": "172.16.61.10", + "sdp-ip-address": [ + "172.16.61.10" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "31" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC ONT", + "description": "AC connected to PC", + "ac-node-id": "172.16.61.10", + "ac-tp-id": "200", + "ac-ipv4-address": "172.16.61.10" + } + ] + } + } + ] + }, + "connection-groups": { + "connection-group": [ + { + "id": "line1", + "connectivity-type": "point-to-point", + "connectivity-construct": [ + { + "id": 1, + "p2p-sender-sdp": "1", + "p2p-receiver-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "10" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "5000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + }, + { + "id": 2, + "p2p-sender-sdp": "2", + "p2p-receiver-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": "20" + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": "1000" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + } + ] + } + ] + } + } + ] +} diff --git a/src/tests/ofc25/data/slice/post_sdp_to_network_slice1.json b/src/tests/ofc25/data/slice/post_sdp_to_network_slice1.json new file mode 100644 index 000000000..bd3895fc4 --- /dev/null +++ b/src/tests/ofc25/data/slice/post_sdp_to_network_slice1.json @@ -0,0 +1,61 @@ +{ + "sdp": [ + { + "id": "3", + "node-id": "172.16.61.11", + "sdp-ip-address": [ + "172.16.61.11" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "21" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.222/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line2" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC ONT", + "description": "AC connected to PC2", + "ac-node-id": "172.16.61.11", + "ac-tp-id": "200" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/tests/ofc25/data/slice/post_sdp_to_network_slice2.json b/src/tests/ofc25/data/slice/post_sdp_to_network_slice2.json new file mode 100644 index 000000000..0b147125b --- /dev/null +++ b/src/tests/ofc25/data/slice/post_sdp_to_network_slice2.json @@ -0,0 +1,62 @@ +{ + "sdp": [ + { + "id": "3", + "node-id": "172.16.61.11", + "sdp-ip-address": [ + "172.16.61.11" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "31" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.222/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line2" + } + ] + }, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": "AC ONT", + "description": "AC connected to PC2", + "ac-node-id": "172.16.61.11", + "ac-tp-id": "200", + "ac-ipv4-address": "172.16.61.11" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/tests/ofc25/data/slice/target-full-ietf-slice.json b/src/tests/ofc25/data/slice/target-full-ietf-slice.json new file mode 100644 index 000000000..c99876ad9 --- /dev/null +++ b/src/tests/ofc25/data/slice/target-full-ietf-slice.json @@ -0,0 +1,678 @@ +{ + "network-slice-services": { + "slice-service": [ + { + "connection-groups": { + "connection-group": [ + { + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": "10", + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": "5000", + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": "20", + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": "1000", + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" + }, + { + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "3", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": "10", + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": "5000", + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "3", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": "20", + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": "1000", + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line2" + } + ] + }, + "description": "network slice 2, connect to VM2", + "id": "slice2", + "sdps": { + "sdp": [ + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-node-id": "172.16.204.220", + "ac-tp-id": "201", + "description": "AC VM2 connected to POP", + "id": "AC POP to VM2" + } + ] + }, + "id": "1", + "node-id": "172.16.204.220", + "sdp-ip-address": [ + "172.16.204.220" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "201" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + }, + { + "index": 2, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "201" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.222/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + } + ], + "target-connection-group-id": "line2" + } + ] + } + }, + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-ipv4-address": "172.16.61.10", + "ac-node-id": "172.16.61.10", + "ac-tp-id": "200", + "description": "AC connected to PC", + "id": "AC ONT" + } + ] + }, + "id": "2", + "node-id": "172.16.61.10", + "sdp-ip-address": [ + "172.16.61.10" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "31" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + } + }, + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-ipv4-address": "172.16.61.11", + "ac-node-id": "172.16.61.11", + "ac-tp-id": "200", + "description": "AC connected to PC2", + "id": "AC ONT" + } + ] + }, + "id": "3", + "node-id": "172.16.61.11", + "sdp-ip-address": [ + "172.16.61.11" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "31" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.222/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line2" + } + ] + } + } + ] + } + }, + { + "connection-groups": { + "connection-group": [ + { + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": "10", + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": "5000", + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": "20", + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": "1000", + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" + }, + { + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "3", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": "10", + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": "5000", + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "3", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": "20", + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": "1000", + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": "0.001" + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line2" + } + ] + }, + "description": "network slice 1, connect to VM1", + "id": "slice1", + "sdps": { + "sdp": [ + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-node-id": "172.16.204.220", + "ac-tp-id": "200", + "description": "AC VM1 connected to POP", + "id": "AC POP to VM1" + } + ] + }, + "id": "1", + "node-id": "172.16.204.220", + "sdp-ip-address": [ + "172.16.204.220" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "101" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + }, + { + "index": 2, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "101" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.222/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + } + ], + "target-connection-group-id": "line2" + } + ] + } + }, + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-node-id": "172.16.61.10", + "ac-tp-id": "200", + "description": "AC connected to PC1", + "id": "AC ONT" + } + ] + }, + "id": "2", + "node-id": "172.16.61.10", + "sdp-ip-address": [ + "172.16.61.10" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "21" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + } + }, + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-node-id": "172.16.61.11", + "ac-tp-id": "200", + "description": "AC connected to PC2", + "id": "AC ONT" + } + ] + }, + "id": "3", + "node-id": "172.16.61.11", + "sdp-ip-address": [ + "172.16.61.11" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "21" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.222/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line2" + } + ] + } + } + ] + } + } + ] + } +} diff --git a/src/tests/ofc25/data/target-ietf-slice-posted-slices.json b/src/tests/ofc25/data/target-ietf-slice-posted-slices.json new file mode 100644 index 000000000..004d3caff --- /dev/null +++ b/src/tests/ofc25/data/target-ietf-slice-posted-slices.json @@ -0,0 +1,382 @@ +[ + { + "network-slice-services": { + "slice-service": [ + { + "connection-groups": { + "connection-group": [ + { + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 10, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 5000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 20, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 1000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" + } + ] + }, + "description": "dsc", + "id": "slice1", + "sdps": { + "sdp": [ + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-node-id": "172.16.185.32", + "ac-tp-id": "200", + "description": "dsc", + "id": "0" + } + ] + }, + "id": "1", + "node-id": "172.16.185.32", + "sdp-ip-address": [ + "172.16.185.32" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "101" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + } + }, + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-node-id": "172.16.182.25", + "ac-tp-id": "200", + "description": "dsc", + "id": "0" + } + ] + }, + "id": "2", + "node-id": "172.16.182.25", + "sdp-ip-address": [ + "172.16.182.25" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "21" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + } + } + ] + } + } + ] + } + }, + { + "network-slice-services": { + "slice-service": [ + { + "connection-groups": { + "connection-group": [ + { + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 10, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 5000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 20, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 1000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" + } + ] + }, + "description": "dsc", + "id": "slice2", + "sdps": { + "sdp": [ + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-node-id": "172.16.185.32", + "ac-tp-id": "200", + "description": "dsc", + "id": "0" + } + ] + }, + "id": "1", + "node-id": "172.16.185.32", + "sdp-ip-address": [ + "172.16.185.32" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "201" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + } + }, + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-node-id": "172.16.182.25", + "ac-tp-id": "200", + "description": "dsc", + "id": "0" + } + ] + }, + "id": "2", + "node-id": "172.16.182.25", + "sdp-ip-address": [ + "172.16.182.25" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "31" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + } + } + ] + } + } + ] + } + } +] diff --git a/src/tests/ofc25/data/target-ietf-slice-put-connection-groups.json b/src/tests/ofc25/data/target-ietf-slice-put-connection-groups.json new file mode 100644 index 000000000..7526ebd8b --- /dev/null +++ b/src/tests/ofc25/data/target-ietf-slice-put-connection-groups.json @@ -0,0 +1,234 @@ +[ + { + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 10, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 10000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 20, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 2000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" + }, + { + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 10, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 10000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 20, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 2000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" + }, + { + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 10, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 5000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 20, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 1000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" + }, + { + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 10, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 5000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 20, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 1000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" + } +] diff --git a/src/tests/ofc25/data/target-nce-app-flows.json b/src/tests/ofc25/data/target-nce-app-flows.json new file mode 100644 index 000000000..66f7ed254 --- /dev/null +++ b/src/tests/ofc25/data/target-nce-app-flows.json @@ -0,0 +1,58 @@ +{ + "App_Flow_2_1_slice1": { + "app-flow": [ + { + "app-name": "App_Flow_2_1_slice1", + "duration": 9999, + "max-online-users": 1, + "name": "App_Flow_2_1_slice1", + "qos-profile": "AR_VR_Gaming", + "service-profile": "service_2_1_slice1", + "stas": "00:3D:E1:18:82:9E", + "user-id": "a8b5b840-1548-46c9-892e-5c18f9ec8d99" + } + ] + }, + "App_Flow_3_1_slice1": { + "app-flow": [ + { + "app-name": "App_Flow_3_1_slice1", + "duration": 9999, + "max-online-users": 1, + "name": "App_Flow_3_1_slice1", + "qos-profile": "AR_VR_Gaming", + "service-profile": "service_3_1_slice1", + "stas": "00:3D:E1:18:82:9E", + "user-id": "28a1c47b-0179-4ab8-85da-632e6f946491" + } + ] + }, + "App_Flow_2_1_slice2": { + "app-flow": [ + { + "app-name": "App_Flow_2_1_slice2", + "duration": 9999, + "max-online-users": 1, + "name": "App_Flow_2_1_slice2", + "qos-profile": "AR_VR_Gaming", + "service-profile": "service_2_1_slice2", + "stas": "00:3D:E1:18:82:9E", + "user-id": "9df7b98a-d5c0-43d4-bd0e-8d81ee4485f0" + } + ] + }, + "App_Flow_3_1_slice2": { + "app-flow": [ + { + "app-name": "App_Flow_3_1_slice2", + "duration": 9999, + "max-online-users": 1, + "name": "App_Flow_3_1_slice2", + "qos-profile": "AR_VR_Gaming", + "service-profile": "service_3_1_slice2", + "stas": "00:3D:E1:18:82:9E", + "user-id": "79b2becb-8500-42cc-b6be-c27c2ea60b22" + } + ] + } +} diff --git a/src/tests/ofc25/data/target-nce-apps.json b/src/tests/ofc25/data/target-nce-apps.json new file mode 100644 index 000000000..11a258979 --- /dev/null +++ b/src/tests/ofc25/data/target-nce-apps.json @@ -0,0 +1,82 @@ +{ + "App_Flow_2_1_slice1": { + "application": [ + { + "app-features": { + "app-feature": [ + { + "dest-ip": "172.1.101.22", + "dest-port": "10200", + "id": "feature_2_1_slice1", + "protocol": "tcp", + "src-ip": "172.16.104.221", + "src-port": "10500" + } + ] + }, + "app-id": "app_2_1_slice1", + "name": "App_Flow_2_1_slice1" + } + ] + }, + "App_Flow_3_1_slice1": { + "application": [ + { + "app-features": { + "app-feature": [ + { + "dest-ip": "172.1.101.22", + "dest-port": "10200", + "id": "feature_3_1_slice1", + "protocol": "tcp", + "src-ip": "172.16.104.222", + "src-port": "10500" + } + ] + }, + "app-id": "app_3_1_slice1", + "name": "App_Flow_3_1_slice1" + } + ] + }, + "App_Flow_2_1_slice2": { + "application": [ + { + "app-features": { + "app-feature": [ + { + "dest-ip": "172.1.201.22", + "dest-port": "10200", + "id": "feature_2_1_slice2", + "protocol": "tcp", + "src-ip": "172.16.104.221", + "src-port": "10500" + } + ] + }, + "app-id": "app_2_1_slice2", + "name": "App_Flow_2_1_slice2" + } + ] + }, + "App_Flow_3_1_slice2": { + "application": [ + { + "app-features": { + "app-feature": [ + { + "dest-ip": "172.1.201.22", + "dest-port": "10200", + "id": "feature_3_1_slice2", + "protocol": "tcp", + "src-ip": "172.16.104.222", + "src-port": "10500" + } + ] + }, + "app-id": "app_3_1_slice2", + "name": "App_Flow_3_1_slice2" + } + ] + } +} diff --git a/src/tests/ofc25/deploy_specs.sh b/src/tests/ofc25/deploy_specs.sh new file mode 100755 index 000000000..72cd25b58 --- /dev/null +++ b/src/tests/ofc25/deploy_specs.sh @@ -0,0 +1,208 @@ +#!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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. +#export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator" +export TFS_COMPONENTS="context device pathcomp service nbi" + +# Uncomment to activate Monitoring (old) +#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" + +# Uncomment to activate Monitoring Framework (new) +#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" + +# Uncomment to activate QoS Profiles +#export TFS_COMPONENTS="${TFS_COMPONENTS} qos_profile" + +# Uncomment to activate BGP-LS Speaker +#export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker" + +# Uncomment to activate Optical Controller +# To manage optical connections, "service" requires "opticalcontroller" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "opticalcontroller" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} opticalcontroller service ${AFTER}" +#fi + +# Uncomment to activate ZTP +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" + +# Uncomment to activate Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} policy" + +# Uncomment to activate Optical CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" + +# Uncomment to activate L3 CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector" + +# Uncomment to activate TE +#export TFS_COMPONENTS="${TFS_COMPONENTS} te" + +# Uncomment to activate Forecaster +#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster" + +# Uncomment to activate E2E Orchestrator +#export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator" + +# Uncomment to activate DLT and Interdomain +#export TFS_COMPONENTS="${TFS_COMPONENTS} interdomain dlt" +#if [[ "$TFS_COMPONENTS" == *"dlt"* ]]; then +# export KEY_DIRECTORY_PATH="src/dlt/gateway/keys/priv_sk" +# export CERT_DIRECTORY_PATH="src/dlt/gateway/keys/cert.pem" +# export TLS_CERT_PATH="src/dlt/gateway/keys/ca.crt" +#fi + +# Uncomment to activate QKD App +# To manage QKD Apps, "service" requires "qkd_app" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "qkd_app" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}" +#fi + + +# 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" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Uncomment to monitor performance of components +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" + +# Uncomment when deploying Optical CyberSecurity +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.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 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" + +# 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" + +# Set NATS installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/nats.sh for additional details +export NATS_DEPLOY_MODE="single" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb" + +# 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="9009" + +# 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="" + + +# ----- K8s Observability ------------------------------------------------------ + +# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to. +export PROM_EXT_PORT_HTTP="9090" + +# Set the external port Grafana HTTP Dashboards will be exposed to. +export GRAF_EXT_PORT_HTTP="3000" + + +# ----- Apache Kafka ----------------------------------------------------------- + +# Set the namespace where Apache Kafka will be deployed. +export KFK_NAMESPACE="kafka" + +# Set the port Apache Kafka server will be exposed to. +export KFK_SERVER_PORT="9092" + +# Set the flag to YES for redeploying of Apache Kafka +export KFK_REDEPLOY="" diff --git a/src/tests/ofc25/redeploy-tfs.sh b/src/tests/ofc25/redeploy-tfs.sh new file mode 100755 index 000000000..a82dcbf25 --- /dev/null +++ b/src/tests/ofc25/redeploy-tfs.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source ~/tfs-ctrl/src/tests/ofc25/deploy_specs.sh +./deploy/all.sh diff --git a/src/tests/ofc25/requirements.in b/src/tests/ofc25/requirements.in new file mode 100644 index 000000000..6210ec817 --- /dev/null +++ b/src/tests/ofc25/requirements.in @@ -0,0 +1,16 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +deepdiff==6.7.* +requests==2.27.* diff --git a/src/tests/ofc25/scripts/run-e2e-ietf-slice-operations.sh b/src/tests/ofc25/scripts/run-e2e-ietf-slice-operations.sh new file mode 100755 index 000000000..8996bfecd --- /dev/null +++ b/src/tests/ofc25/scripts/run-e2e-ietf-slice-operations.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source /var/teraflow/tfs_runtime_env_vars.sh +export PYTHONPATH=/var/teraflow +pytest --verbose --log-level=INFO \ + --junitxml=/opt/results/report_e2e_ietf_slice_operations.xml \ + /var/teraflow/tests/ofc25/tests/test_e2e_ietf_slice_operations.py diff --git a/src/tests/ofc25/scripts/run-onboarding.sh b/src/tests/ofc25/scripts/run-onboarding.sh new file mode 100755 index 000000000..689de9c5a --- /dev/null +++ b/src/tests/ofc25/scripts/run-onboarding.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source /var/teraflow/tfs_runtime_env_vars.sh +export PYTHONPATH=/var/teraflow +pytest --verbose --log-level=INFO \ + --junitxml=/opt/results/report_onboarding.xml \ + /var/teraflow/tests/ofc25/tests/test_onboarding.py diff --git a/src/tests/ofc25/tests/Tools.py b/src/tests/ofc25/tests/Tools.py new file mode 100644 index 000000000..cd2add49e --- /dev/null +++ b/src/tests/ofc25/tests/Tools.py @@ -0,0 +1,109 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 enum, logging, requests +from typing import Any, Dict, List, Optional, Set, Union +from common.Constants import ServiceNameEnum +from common.Settings import get_service_host, get_service_port_http + +NBI_ADDRESS = get_service_host(ServiceNameEnum.NBI) +NBI_PORT = get_service_port_http(ServiceNameEnum.NBI) +NBI_USERNAME = 'admin' +NBI_PASSWORD = 'admin' +NBI_BASE_URL = '' + +class RestRequestMethod(enum.Enum): + GET = 'get' + POST = 'post' + PUT = 'put' + PATCH = 'patch' + DELETE = 'delete' + +EXPECTED_STATUS_CODES : Set[int] = { + requests.codes['OK' ], + requests.codes['CREATED' ], + requests.codes['ACCEPTED' ], + requests.codes['NO_CONTENT'], +} + +def do_rest_request( + method : RestRequestMethod, url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + request_url = 'http://{:s}:{:s}@{:s}:{:d}{:s}{:s}'.format( + NBI_USERNAME, NBI_PASSWORD, NBI_ADDRESS, NBI_PORT, str(NBI_BASE_URL), url + ) + + if logger is not None: + msg = 'Request: {:s} {:s}'.format(str(method.value).upper(), str(request_url)) + if body is not None: msg += ' body={:s}'.format(str(body)) + logger.warning(msg) + reply = requests.request(method.value, request_url, headers={'Content-Type': 'application/json'}, timeout=timeout, json=body, allow_redirects=allow_redirects) + if logger is not None: + logger.warning('Reply: {:s}'.format(str(reply.text))) + assert reply.status_code in expected_status_codes, 'Reply failed with status code {:d}'.format(reply.status_code) + + if reply.content and len(reply.content) > 0: return reply.json() + return None + +def do_rest_get_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.GET, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_post_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.POST, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_put_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.PUT, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_patch_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.PATCH, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_delete_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.DELETE, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) diff --git a/src/tests/ofc25/tests/__init__.py b/src/tests/ofc25/tests/__init__.py new file mode 100644 index 000000000..3ccc21c7d --- /dev/null +++ b/src/tests/ofc25/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ofc25/tests/test_e2e_ietf_slice_operations.py b/src/tests/ofc25/tests/test_e2e_ietf_slice_operations.py new file mode 100644 index 000000000..d6207d675 --- /dev/null +++ b/src/tests/ofc25/tests/test_e2e_ietf_slice_operations.py @@ -0,0 +1,481 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os +import requests +from deepdiff import DeepDiff + + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +HEADERS = {"Content-Type": "application/json"} + +POST_NETWORK_SLICE1 = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "slice", + "post_network_slice1.json", +) +POST_NETWORK_SLICE2 = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "slice", + "post_network_slice2.json", +) +POST_CONNECTION_GROUP_TO_NETWORK_SLICE1 = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "slice", + "post_connection_group_to_network_slice1.json", +) +POST_CONNECTION_GROUP_TO_NETWORK_SLICE2 = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "slice", + "post_connection_group_to_network_slice2.json", +) +POST_MATCH_CRITERIA_TO_SDP1_IN_SLICE1 = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "slice", + "post_match_criteria_to_sdp1_in_slice1.json", +) +POST_MATCH_CRITERIA_TO_SDP1_IN_SLICE2 = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "slice", + "post_match_criteria_to_sdp1_in_slice2.json", +) +POST_SDP_TO_NETWORK_SLICE1 = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "slice", + "post_sdp_to_network_slice1.json", +) +POST_SDP_TO_NETWORK_SLICE2 = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "slice", + "post_sdp_to_network_slice2.json", +) +TARGET_NCE_APP_FLOWS = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "slice", + "target-nce-app-flows.json", +) +TARGET_NCE_APPS = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "slice", + "target-nce-apps.json", +) +TARGET_FULL_IETF_SLICE = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "slice", + "target-full-ietf-slice.json", +) +TARGET_FULL_IETF_SLICE = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "slice", + "target-full-ietf-slice.json", +) +TARGET_IETF_SLICE_POSTED_SLICES = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "target-ietf-slice-posted-slices.json", +) +TARGET_IETF_SLICE_PUT_CONNECTION_GROUPS = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "target-ietf-slice-put-connection-groups.json", +) + +NBI_ADDRESS = "localhost" +NBI_PORT = "80" +NBI_USERNAME = "admin" +NBI_PASSWORD = "admin" + +NCE_ADDRESS = "localhost" +NCE_PORT = 9090 + +AGG_TFS_ADDRESS = "localhost" +AGG_TFS_PORT = 9091 + +BASE_IETF_SLICE_URL = f"http://{NBI_ADDRESS}:{NBI_PORT}/restconf/data/ietf-network-slice-service:network-slice-services" +NCE_APP_DATA_URL = f"http://{NCE_ADDRESS}:{NCE_PORT}/restconf/v1/data/app-flows/apps" +NCE_APP_FLOW_DATA_URL = f"http://{NCE_ADDRESS}:{NCE_PORT}/restconf/v1/data/app-flows" +AGG_TFS_IETF_SLICE_URL = f"http://{AGG_TFS_ADDRESS}:{AGG_TFS_PORT}/restconf/data/ietf-network-slice-service:network-slice-services" + + +# pylint: disable=redefined-outer-name, unused-argument +def test_ietf_slice_creation_removal(): + # Issue service creation request + with open(POST_NETWORK_SLICE1, "r", encoding="UTF-8") as f: + post_network_slice1 = json.load(f) + with open(POST_NETWORK_SLICE2, "r", encoding="UTF-8") as f: + post_network_slice2 = json.load(f) + with open(POST_CONNECTION_GROUP_TO_NETWORK_SLICE1, "r", encoding="UTF-8") as f: + post_connection_group_to_network_slice1 = json.load(f) + with open(POST_CONNECTION_GROUP_TO_NETWORK_SLICE2, "r", encoding="UTF-8") as f: + post_connection_group_to_network_slice2 = json.load(f) + with open(POST_MATCH_CRITERIA_TO_SDP1_IN_SLICE1, "r", encoding="UTF-8") as f: + post_match_criteria_to_sdp1_in_slice1 = json.load(f) + with open(POST_MATCH_CRITERIA_TO_SDP1_IN_SLICE2, "r", encoding="UTF-8") as f: + post_match_criteria_to_sdp1_in_slice2 = json.load(f) + with open(POST_SDP_TO_NETWORK_SLICE1, "r", encoding="UTF-8") as f: + post_sdp_to_network_slice1 = json.load(f) + with open(POST_SDP_TO_NETWORK_SLICE2, "r", encoding="UTF-8") as f: + post_sdp_to_network_slice2 = json.load(f) + with open(TARGET_NCE_APPS, "r", encoding="UTF-8") as f: + target_nce_apps = json.load(f) + with open(TARGET_NCE_APP_FLOWS, "r", encoding="UTF-8") as f: + target_nce_app_flows = json.load(f) + with open(TARGET_FULL_IETF_SLICE, "r", encoding="UTF-8") as f: + target_full_ietf_slice = json.load(f) + with open(TARGET_IETF_SLICE_POSTED_SLICES, "r", encoding="UTF-8") as f: + target_ietf_slice_posted_slices = json.load(f) + with open(TARGET_IETF_SLICE_PUT_CONNECTION_GROUPS, "r", encoding="UTF-8") as f: + target_ietf_slice_put_connection_groups = json.load(f) + + # op 1 + URL = BASE_IETF_SLICE_URL + requests.post(URL, headers=HEADERS, json=post_network_slice1) + + URL = NCE_APP_DATA_URL + apps_response = requests.get(URL) + URL = NCE_APP_FLOW_DATA_URL + app_flows_response = requests.get(URL) + URL = AGG_TFS_IETF_SLICE_URL + ietf_slice_services = requests.get(URL) + URL = ( + AGG_TFS_IETF_SLICE_URL + + "/slice-service=dummy/connection-groups/connection-group=dummy" + ) + ietf_slice_connection_groups = requests.get(URL) + + app_name = apps_response["application"][0]["name"] + apps_diff = DeepDiff(apps_response[app_name], target_nce_apps[app_name]) + app_flows_diff = DeepDiff( + app_flows_response[app_name], + target_nce_app_flows[app_name], + exclude_regex_paths=r"root\['app-flow'\]\[\d+\]\['user-id'\]", + ) + assert not apps_diff + assert not app_flows_diff + assert len(apps_response) == 1 and len(app_flows_response) == 1 + + assert len(ietf_slice_connection_groups) == 0 + assert len(ietf_slice_services) == 1 + slice_diff = DeepDiff( + ietf_slice_services["slice1"], target_ietf_slice_posted_slices[0] + ) + assert not slice_diff + + # op 2 + URL = BASE_IETF_SLICE_URL + "/slice-service=slice1/sdps" + requests.post(URL, headers=HEADERS, json=post_sdp_to_network_slice1) + URL = BASE_IETF_SLICE_URL + "/slice-service=slice1/connection-groups" + requests.post(URL, headers=HEADERS, json=post_connection_group_to_network_slice1) + URL = ( + BASE_IETF_SLICE_URL + "/slice-service=slice1/sdps/sdp=1/service-match-criteria" + ) + requests.post(URL, headers=HEADERS, json=post_match_criteria_to_sdp1_in_slice1) + + URL = NCE_APP_DATA_URL + apps_response = requests.get(URL) + URL = NCE_APP_FLOW_DATA_URL + app_flows_response = requests.get(URL) + URL = AGG_TFS_IETF_SLICE_URL + ietf_slice_services = requests.get(URL) + URL = ( + AGG_TFS_IETF_SLICE_URL + + "/slice-service=dummy/connection-groups/connection-group=dummy" + ) + ietf_slice_connection_groups = requests.get(URL) + + app_name = apps_response["application"][0]["name"] + apps_diff = DeepDiff(apps_response[app_name], target_nce_apps[app_name]) + app_flows_diff = DeepDiff( + app_flows_response[app_name], + target_nce_app_flows[app_name], + exclude_regex_paths=r"root\['app-flow'\]\[\d+\]\['user-id'\]", + ) + assert not apps_diff + assert not app_flows_diff + assert len(apps_response) == 2 and len(app_flows_response) == 2 + + assert len(ietf_slice_connection_groups) == 1 + assert len(ietf_slice_services) == 1 + connection_group_diff = DeepDiff( + ietf_slice_connection_groups[0], target_ietf_slice_put_connection_groups[0] + ) + assert not connection_group_diff + + # op 3 + URL = BASE_IETF_SLICE_URL + requests.post(URL, headers=HEADERS, json=post_network_slice2) + + URL = NCE_APP_DATA_URL + apps_response = requests.get(URL) + URL = NCE_APP_FLOW_DATA_URL + app_flows_response = requests.get(URL) + URL = AGG_TFS_IETF_SLICE_URL + ietf_slice_services = requests.get(URL) + URL = ( + AGG_TFS_IETF_SLICE_URL + + "/slice-service=dummy/connection-groups/connection-group=dummy" + ) + ietf_slice_connection_groups = requests.get(URL) + + app_name = apps_response["application"][0]["name"] + apps_diff = DeepDiff(apps_response[app_name], target_nce_apps[app_name]) + app_flows_diff = DeepDiff( + app_flows_response[app_name], + target_nce_app_flows[app_name], + exclude_regex_paths=r"root\['app-flow'\]\[\d+\]\['user-id'\]", + ) + assert not apps_diff + assert not app_flows_diff + assert len(apps_response) == 3 and len(app_flows_response) == 3 + + assert len(ietf_slice_connection_groups) == 0 + assert len(ietf_slice_services) == 2 + slice_diff = DeepDiff( + ietf_slice_services["slice2"], target_ietf_slice_posted_slices[1] + ) + assert not slice_diff + + # op 4 + URL = BASE_IETF_SLICE_URL + "/slice-service=slice2/sdps" + requests.post(URL, headers=HEADERS, json=post_sdp_to_network_slice2) + URL = BASE_IETF_SLICE_URL + "/slice-service=slice2/connection-groups" + requests.post(URL, headers=HEADERS, json=post_connection_group_to_network_slice2) + URL = ( + BASE_IETF_SLICE_URL + "/slice-service=slice2/sdps/sdp=1/service-match-criteria" + ) + requests.post(URL, headers=HEADERS, json=post_match_criteria_to_sdp1_in_slice2) + + URL = NCE_APP_DATA_URL + apps_response = requests.get(URL) + URL = NCE_APP_FLOW_DATA_URL + app_flows_response = requests.get(URL) + URL = AGG_TFS_IETF_SLICE_URL + ietf_slice_services = requests.get(URL) + URL = ( + AGG_TFS_IETF_SLICE_URL + + "/slice-service=dummy/connection-groups/connection-group=dummy" + ) + ietf_slice_connection_groups = requests.get(URL) + + app_name = apps_response["application"][0]["name"] + apps_diff = DeepDiff(apps_response[app_name], target_nce_apps[app_name]) + app_flows_diff = DeepDiff( + app_flows_response[app_name], + target_nce_app_flows[app_name], + exclude_regex_paths=r"root\['app-flow'\]\[\d+\]\['user-id'\]", + ) + assert not apps_diff + assert not app_flows_diff + assert len(apps_response) == 4 and len(app_flows_response) == 4 + + assert len(ietf_slice_connection_groups) == 2 + assert len(ietf_slice_services) == 2 + connection_group_diff = DeepDiff( + ietf_slice_connection_groups[1], target_ietf_slice_put_connection_groups[1] + ) + assert not connection_group_diff + + # op 5 + ietf_slices_full_retrieved = requests.get(BASE_IETF_SLICE_URL) + ietf_slice_data = DeepDiff(ietf_slices_full_retrieved, target_full_ietf_slice) + assert not ietf_slice_data + + # op 6 + URL = BASE_IETF_SLICE_URL + "/slice-service=slice1/sdps/sdp=2" + requests.delete(URL) + URL = ( + BASE_IETF_SLICE_URL + + "/slice-service=slice1/sdps/sdp=1/service-match-criteria/match-criterion=1" + ) + requests.delete(URL) + URL = ( + BASE_IETF_SLICE_URL + + "/slice-service=slice1/connection-groups/connection-group=line1" + ) + requests.delete(URL) + + URL = NCE_APP_DATA_URL + apps_response = requests.get(URL) + URL = NCE_APP_FLOW_DATA_URL + app_flows_response = requests.get(URL) + URL = AGG_TFS_IETF_SLICE_URL + ietf_slice_services = requests.get(URL) + URL = ( + AGG_TFS_IETF_SLICE_URL + + "/slice-service=dummy/connection-groups/connection-group=dummy" + ) + ietf_slice_connection_groups = requests.get(URL) + + app_name = "App_Flow_2_1_slice1" + assert app_name not in apps_response + assert app_name not in app_flows_response + assert len(apps_response) == 3 and len(app_flows_response) == 3 + + assert len(ietf_slice_connection_groups) == 3 + assert len(ietf_slice_services) == 2 + connection_group_diff = DeepDiff( + ietf_slice_connection_groups[2], target_ietf_slice_put_connection_groups[2] + ) + assert not connection_group_diff + + # op 7 + URL = BASE_IETF_SLICE_URL + "/slice-service=slice1/sdps/sdp=3" + requests.delete(URL) + URL = ( + BASE_IETF_SLICE_URL + + "/slice-service=slice1/sdps/sdp=1/service-match-criteria/match-criterion=2" + ) + requests.delete(URL) + URL = ( + BASE_IETF_SLICE_URL + + "/slice-service=slice1/connection-groups/connection-group=line2" + ) + requests.delete(URL) + URL = BASE_IETF_SLICE_URL + "/slice-service=slice1/sdps/sdp=1" + + URL = NCE_APP_DATA_URL + apps_response = requests.get(URL) + URL = NCE_APP_FLOW_DATA_URL + app_flows_response = requests.get(URL) + URL = AGG_TFS_IETF_SLICE_URL + ietf_slice_services = requests.get(URL) + URL = ( + AGG_TFS_IETF_SLICE_URL + + "/slice-service=dummy/connection-groups/connection-group=dummy" + ) + ietf_slice_connection_groups = requests.get(URL) + + requests.delete(URL) + URL = BASE_IETF_SLICE_URL + "/slice-service=slice1" + requests.delete(URL) + + app_name = "App_Flow_3_1_slice1" + assert app_name not in apps_response + assert app_name not in app_flows_response + assert len(apps_response) == 2 and len(app_flows_response) == 2 + + assert len(ietf_slice_connection_groups) == 3 + assert len(ietf_slice_services) == 1 + assert "slice1" not in ietf_slice_services + + # op 8 + URL = BASE_IETF_SLICE_URL + "/slice-service=slice2/sdps/sdp=2" + requests.delete(URL) + URL = ( + BASE_IETF_SLICE_URL + + "/slice-service=slice2/sdps/sdp=1/service-match-criteria/match-criterion=1" + ) + requests.delete(URL) + URL = ( + BASE_IETF_SLICE_URL + + "/slice-service=slice2/connection-groups/connection-group=line1" + ) + requests.delete(URL) + + URL = NCE_APP_DATA_URL + apps_response = requests.get(URL) + URL = NCE_APP_FLOW_DATA_URL + app_flows_response = requests.get(URL) + URL = AGG_TFS_IETF_SLICE_URL + ietf_slice_services = requests.get(URL) + URL = ( + AGG_TFS_IETF_SLICE_URL + + "/slice-service=dummy/connection-groups/connection-group=dummy" + ) + ietf_slice_connection_groups = requests.get(URL) + + app_name = "App_Flow_2_1_slice2" + assert app_name not in apps_response + assert app_name not in app_flows_response + assert len(apps_response) == 1 and len(app_flows_response) == 1 + + assert len(ietf_slice_connection_groups) == 4 + assert len(ietf_slice_services) == 1 + connection_group_diff = DeepDiff( + ietf_slice_connection_groups[3], target_ietf_slice_put_connection_groups[3] + ) + assert not connection_group_diff + + # op 9 + URL = BASE_IETF_SLICE_URL + "/slice-service=slice2/sdps/sdp=3" + requests.delete(URL) + URL = ( + BASE_IETF_SLICE_URL + + "/slice-service=slice2/sdps/sdp=1/service-match-criteria/match-criterion=2" + ) + requests.delete(URL) + URL = ( + BASE_IETF_SLICE_URL + + "/slice-service=slice2/connection-groups/connection-group=line2" + ) + requests.delete(URL) + + URL = NCE_APP_DATA_URL + apps_response = requests.get(URL) + URL = NCE_APP_FLOW_DATA_URL + app_flows_response = requests.get(URL) + URL = AGG_TFS_IETF_SLICE_URL + ietf_slice_services = requests.get(URL) + URL = ( + AGG_TFS_IETF_SLICE_URL + + "/slice-service=dummy/connection-groups/connection-group=dummy" + ) + ietf_slice_connection_groups = requests.get(URL) + + URL = BASE_IETF_SLICE_URL + "/slice-service=slice2/sdps/sdp=1" + requests.delete(URL) + URL = BASE_IETF_SLICE_URL + "/slice-service=slice2" + requests.delete(URL) + + app_name = "App_Flow_3_1_slice2" + assert app_name not in apps_response + assert app_name not in app_flows_response + assert len(apps_response) == 0 and len(app_flows_response) == 0 + + assert len(ietf_slice_connection_groups) == 4 + assert len(ietf_slice_services) == 0 + + # op 10 + ietf_slices_full_retrieved = requests.get(BASE_IETF_SLICE_URL) + empty_ietf_slices = {"network-slice-services": {"slice-service": []}} + ietf_slice_data = DeepDiff(ietf_slices_full_retrieved, empty_ietf_slices) + assert not ietf_slice_data diff --git a/src/tests/ofc25/tests/test_onboarding.py b/src/tests/ofc25/tests/test_onboarding.py new file mode 100644 index 000000000..b58cb3821 --- /dev/null +++ b/src/tests/ofc25/tests/test_onboarding.py @@ -0,0 +1,67 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os, time +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum, Empty +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from .Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'data', 'camara-e2e-topology.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_scenario_onboarding( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + validate_empty_scenario(context_client) + + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + +def test_scenario_devices_enabled( + context_client : ContextClient, # pylint: disable=redefined-outer-name +) -> None: + """ + This test validates that the devices are enabled. + """ + DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + num_devices = -1 + num_devices_enabled, num_retry = 0, 0 + while (num_devices != num_devices_enabled) and (num_retry < 10): + time.sleep(1.0) + response = context_client.ListDevices(Empty()) + num_devices = len(response.devices) + num_devices_enabled = 0 + for device in response.devices: + if device.device_operational_status != DEVICE_OP_STATUS_ENABLED: continue + num_devices_enabled += 1 + LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) + num_retry += 1 + assert num_devices_enabled == num_devices -- GitLab From 7aeb77b8eae3dbd111b64440b8c4a3a838d0c1f8 Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 14 Jan 2025 10:44:06 +0100 Subject: [PATCH 173/463] feat: IETF Network Slice mock added --- .../Dockerfile | 37 ++++++++ .../MockIetfNetworkSliceSdnCtrl.py | 88 +++++++++++++++++++ .../README.md | 31 +++++++ .../ResourceConnectionGroups.py | 31 +++++++ .../ResourceNetworkSlices.py | 39 ++++++++ .../__init__.py | 14 +++ .../mock_ietf_network_slice_sdn_ctrl/build.sh | 21 +++++ .../deploy.sh | 17 ++++ .../mock-ietf-network-slice-sdn-ctrl.yaml | 64 ++++++++++++++ .../requirements.in | 22 +++++ .../mock_ietf_network_slice_sdn_ctrl/run.sh | 19 ++++ 11 files changed, 383 insertions(+) create mode 100644 src/tests/tools/mock_ietf_network_slice_sdn_ctrl/Dockerfile create mode 100644 src/tests/tools/mock_ietf_network_slice_sdn_ctrl/MockIetfNetworkSliceSdnCtrl.py create mode 100644 src/tests/tools/mock_ietf_network_slice_sdn_ctrl/README.md create mode 100644 src/tests/tools/mock_ietf_network_slice_sdn_ctrl/ResourceConnectionGroups.py create mode 100644 src/tests/tools/mock_ietf_network_slice_sdn_ctrl/ResourceNetworkSlices.py create mode 100644 src/tests/tools/mock_ietf_network_slice_sdn_ctrl/__init__.py create mode 100755 src/tests/tools/mock_ietf_network_slice_sdn_ctrl/build.sh create mode 100755 src/tests/tools/mock_ietf_network_slice_sdn_ctrl/deploy.sh create mode 100644 src/tests/tools/mock_ietf_network_slice_sdn_ctrl/mock-ietf-network-slice-sdn-ctrl.yaml create mode 100644 src/tests/tools/mock_ietf_network_slice_sdn_ctrl/requirements.in create mode 100755 src/tests/tools/mock_ietf_network_slice_sdn_ctrl/run.sh diff --git a/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/Dockerfile b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/Dockerfile new file mode 100644 index 000000000..a624152de --- /dev/null +++ b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/Dockerfile @@ -0,0 +1,37 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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-folders, and copy content +RUN mkdir -p /var/teraflow/mock_ietf_network_slice_sdn_ctrl +WORKDIR /var/teraflow/mock_ietf_network_slice_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 + +RUN python3 -m pip list + +# Start the service +ENTRYPOINT ["python", "MockIetfNetworkSliceSdnCtrl.py"] diff --git a/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/MockIetfNetworkSliceSdnCtrl.py b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/MockIetfNetworkSliceSdnCtrl.py new file mode 100644 index 000000000..59b7f609e --- /dev/null +++ b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/MockIetfNetworkSliceSdnCtrl.py @@ -0,0 +1,88 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 IETF ACTN SDN controller +# ----------------------------- +# REST server implementing minimal support for: +# - IETF YANG Data Model for Transport Network Client Signals +# Ref: https://www.ietf.org/archive/id/draft-ietf-ccamp-client-signal-yang-10.html +# - IETF YANG Data Model for Traffic Engineering Tunnels, Label Switched Paths and Interfaces +# Ref: https://www.ietf.org/archive/id/draft-ietf-teas-yang-te-34.html + + +import functools, logging, sys, time +from flask import Flask, jsonify, make_response, request +from flask_restful import Api, Resource +from ResourceNetworkSlices import NetworkSliceService, NetworkSliceServices +from ResourceConnectionGroups import ConnectionGroup + +BIND_ADDRESS = "0.0.0.0" +BIND_PORT = 8443 +BASE_URL = "/restconf/data/ietf-network-slice-service:network-slice-services" +STR_ENDPOINT = "http://{:s}:{:s}{:s}".format( + str(BIND_ADDRESS), str(BIND_PORT), str(BASE_URL) +) +LOG_LEVEL = logging.DEBUG + +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 Health(Resource): + def get(self): + return make_response(jsonify({}), 200) + + +def main(): + LOGGER.info("Starting...") + + app = Flask(__name__) + app.after_request(functools.partial(log_request, LOGGER)) + + api = Api(app, prefix=BASE_URL) + api.add_resource(Health, "/") + api.add_resource(NetworkSliceServices, BASE_URL) + api.add_resource(NetworkSliceService, BASE_URL + "/slice-service=") + api.add_resource( + ConnectionGroup, + BASE_URL + + "/slice-service=/connection-groups/connection-group=", + ) + + 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_ietf_network_slice_sdn_ctrl/README.md b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/README.md new file mode 100644 index 000000000..e547f719a --- /dev/null +++ b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/README.md @@ -0,0 +1,31 @@ +# Mock IETF ACTN SDN Controller + +This REST server implements very basic support for the following YANG data models: +- IETF YANG Data Model for Transport Network Client Signals (draft-ietf-ccamp-client-signal-yang-10) + - Ref: https://datatracker.ietf.org/doc/draft-ietf-teas-ietf-network-slice-nbi-yang/ + +The aim of this server is to enable testing ietf netowrk slice service driver and ietf slice service service handler + + +## 1. Install requirements for the Mock IETF Network Slice SDN controller +__NOTE__: if you run the Mock IETF Network Slice SDN controller from the PyEnv used for developing on the TeraFlowSDN +framework and you followed the official steps in +[Development Guide > Configure Environment > Python](https://labs.etsi.org/rep/tfs/controller/-/wikis/2.-Development-Guide/2.1.-Configure-Environment/2.1.1.-Python), +all the requirements are already in place. Install them only if you execute it in a separate/standalone environment. + +Install the required dependencies as follows: +```bash +pip install -r src/tests/tools/mock_ietf_network_slice_sdn_ctrl/requirements.in +``` + +Run the Mock IETF Network Slice SDN Controller as follows: +```bash +python src/tests/tools/mock_ietf_network_slice_sdn_ctrl/MockIetfNetworkSliceSdnCtrl.py +``` + + +## 2. Run the Mock IETF Network Slice SDN controller +Run the Mock IETF Network Slice SDN Controller as follows: +```bash +python src/tests/tools/mock_ietf_network_slice_sdn_ctrl/MockIetfNetworkSliceSdnCtrl.py +``` diff --git a/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/ResourceConnectionGroups.py b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/ResourceConnectionGroups.py new file mode 100644 index 000000000..19c84e181 --- /dev/null +++ b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/ResourceConnectionGroups.py @@ -0,0 +1,31 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# REST-API resource implementing minimal support for "IETF YANG Data Model for Transport Network Client Signals". +# Ref: https://www.ietf.org/archive/id/draft-ietf-ccamp-client-signal-yang-10.html + +from flask import jsonify, make_response, request +from flask_restful import Resource + +CONNECTION_GROUPS = [] + + +class ConnectionGroup(Resource): + def get(self, slice_id: str, connection_group_id: str): + return make_response(jsonify(CONNECTION_GROUPS), 200) + + def put(self, slice_id: str, connection_group_id: str): + json_request = request.get_json() + CONNECTION_GROUPS.append(json_request) + return make_response(jsonify({}), 200) diff --git a/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/ResourceNetworkSlices.py b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/ResourceNetworkSlices.py new file mode 100644 index 000000000..80840f8da --- /dev/null +++ b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/ResourceNetworkSlices.py @@ -0,0 +1,39 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# REST-API resource implementing minimal support for "IETF YANG Data Model for Transport Network Client Signals". +# Ref: https://www.ietf.org/archive/id/draft-ietf-ccamp-client-signal-yang-10.html + +from flask import jsonify, make_response, request +from flask_restful import Resource + +NETWORK_SLICES = {} + + +class NetworkSliceServices(Resource): + def get(self): + return make_response(jsonify(NETWORK_SLICES), 200) + + def post(self): + json_request = request.get_json() + name = json_request["network-slice-services"]["slice-service"][0]["id"] + NETWORK_SLICES[name] = json_request + return make_response(jsonify({}), 201) + + +class NetworkSliceService(Resource): + def delete(self, slice_id: str): + slice = NETWORK_SLICES.pop(slice_id, None) + data, status = ({}, 404) if slice is None else (slice, 204) + return make_response(jsonify(data), status) diff --git a/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/__init__.py b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/__init__.py new file mode 100644 index 000000000..3ccc21c7d --- /dev/null +++ b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/tools/mock_ietf_network_slice_sdn_ctrl/build.sh b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/build.sh new file mode 100755 index 000000000..8e4dda34d --- /dev/null +++ b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Make folder containing the script the root folder for its execution +cd $(dirname $0) + +docker build -t mock-ietf-network-slice-sdn-ctrl:test -f Dockerfile . +docker tag mock-ietf-network-slice-sdn-ctrl:test localhost:32000/tfs/mock-ietf-network-slice-sdn-ctrl:test +docker push localhost:32000/tfs/mock-ietf-network-slice-sdn-ctrl:test diff --git a/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/deploy.sh b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/deploy.sh new file mode 100755 index 000000000..6db45be58 --- /dev/null +++ b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/deploy.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 mocks +kubectl --namespace mocks apply -f mock-ietf-network-slice-sdn-ctrl.yaml diff --git a/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/mock-ietf-network-slice-sdn-ctrl.yaml b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/mock-ietf-network-slice-sdn-ctrl.yaml new file mode 100644 index 000000000..cd5734a5f --- /dev/null +++ b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/mock-ietf-network-slice-sdn-ctrl.yaml @@ -0,0 +1,64 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +kind: Namespace +apiVersion: v1 +metadata: + name: mocks +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mock-ietf-network-slice-sdn-ctrl +spec: + selector: + matchLabels: + app: mock-ietf-network-slice-sdn-ctrl + replicas: 1 + template: + metadata: + annotations: + config.linkerd.io/skip-inbound-ports: "8443" + labels: + app: mock-ietf-network-slice-sdn-ctrl + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: server + image: localhost:32000/tfs/mock-ietf-network-slice-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-ietf-network-slice-sdn-ctrl + labels: + app: mock-ietf-network-slice-sdn-ctrl +spec: + type: ClusterIP + selector: + app: mock-ietf-network-slice-sdn-ctrl + ports: + - name: http + port: 8443 + targetPort: 8443 diff --git a/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/requirements.in b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/requirements.in new file mode 100644 index 000000000..dbb8e95d6 --- /dev/null +++ b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/requirements.in @@ -0,0 +1,22 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 +werkzeug==2.3.7 diff --git a/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/run.sh b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/run.sh new file mode 100755 index 000000000..f52b6061b --- /dev/null +++ b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/run.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Make folder containing the script the root folder for its execution +cd $(dirname $0) + +python MockIetfNetworkSliceSdnCtrl.py -- GitLab From 0b8dde58f4ed63e7418d6ecfe1e61d2652acb5bc Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 14 Jan 2025 10:44:29 +0100 Subject: [PATCH 174/463] NCE controller mock added --- src/tests/tools/mock_nce_ctrl/Dockerfile | 37 ++++++++ src/tests/tools/mock_nce_ctrl/MockNCECtrl.py | 85 +++++++++++++++++++ src/tests/tools/mock_nce_ctrl/README.md | 29 +++++++ .../tools/mock_nce_ctrl/ResourceAppFlows.py | 39 +++++++++ src/tests/tools/mock_nce_ctrl/ResourceApps.py | 39 +++++++++ src/tests/tools/mock_nce_ctrl/__init__.py | 14 +++ src/tests/tools/mock_nce_ctrl/build.sh | 21 +++++ src/tests/tools/mock_nce_ctrl/deploy.sh | 17 ++++ .../tools/mock_nce_ctrl/mock-nce-ctrl.yaml | 64 ++++++++++++++ src/tests/tools/mock_nce_ctrl/requirements.in | 22 +++++ src/tests/tools/mock_nce_ctrl/run.sh | 19 +++++ 11 files changed, 386 insertions(+) create mode 100644 src/tests/tools/mock_nce_ctrl/Dockerfile create mode 100644 src/tests/tools/mock_nce_ctrl/MockNCECtrl.py create mode 100644 src/tests/tools/mock_nce_ctrl/README.md create mode 100644 src/tests/tools/mock_nce_ctrl/ResourceAppFlows.py create mode 100644 src/tests/tools/mock_nce_ctrl/ResourceApps.py create mode 100644 src/tests/tools/mock_nce_ctrl/__init__.py create mode 100755 src/tests/tools/mock_nce_ctrl/build.sh create mode 100755 src/tests/tools/mock_nce_ctrl/deploy.sh create mode 100644 src/tests/tools/mock_nce_ctrl/mock-nce-ctrl.yaml create mode 100644 src/tests/tools/mock_nce_ctrl/requirements.in create mode 100755 src/tests/tools/mock_nce_ctrl/run.sh diff --git a/src/tests/tools/mock_nce_ctrl/Dockerfile b/src/tests/tools/mock_nce_ctrl/Dockerfile new file mode 100644 index 000000000..ae9dde4eb --- /dev/null +++ b/src/tests/tools/mock_nce_ctrl/Dockerfile @@ -0,0 +1,37 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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-folders, and copy content +RUN mkdir -p /var/teraflow/mock_nce_ctrl +WORKDIR /var/teraflow/mock_nce_ctrl +COPY . . + +# Get specific Python packages +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +RUN python3 -m pip list + +# Start the service +ENTRYPOINT ["python", "MockNCECtrl.py"] diff --git a/src/tests/tools/mock_nce_ctrl/MockNCECtrl.py b/src/tests/tools/mock_nce_ctrl/MockNCECtrl.py new file mode 100644 index 000000000..5de351e05 --- /dev/null +++ b/src/tests/tools/mock_nce_ctrl/MockNCECtrl.py @@ -0,0 +1,85 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 IETF ACTN SDN controller +# ----------------------------- +# REST server implementing minimal support for: +# - IETF YANG Data Model for Transport Network Client Signals +# Ref: https://www.ietf.org/archive/id/draft-ietf-ccamp-client-signal-yang-10.html +# - IETF YANG Data Model for Traffic Engineering Tunnels, Label Switched Paths and Interfaces +# Ref: https://www.ietf.org/archive/id/draft-ietf-teas-yang-te-34.html + + +import functools, logging, sys, time +from flask import Flask, jsonify, make_response, request +from flask_restful import Api, Resource +from ResourceApps import Apps, App +from ResourceAppFlows import AppFlows, AppFlow + +BIND_ADDRESS = "0.0.0.0" +BIND_PORT = 8443 +BASE_URL = "/restconf/v1/data/app-flows" +STR_ENDPOINT = "http://{:s}:{:s}{:s}".format( + str(BIND_ADDRESS), str(BIND_PORT), str(BASE_URL) +) +LOG_LEVEL = logging.DEBUG + +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 Health(Resource): + def get(self): + return make_response(jsonify({}), 200) + + +def main(): + LOGGER.info("Starting...") + + app = Flask(__name__) + app.after_request(functools.partial(log_request, LOGGER)) + + api = Api(app, prefix=BASE_URL) + api.add_resource(Health, "/") + api.add_resource(Apps, BASE_URL + "/apps") + api.add_resource(App, BASE_URL + "/application=") + api.add_resource(AppFlows, BASE_URL) + api.add_resource(AppFlow, BASE_URL + "/app-flow=") + + 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_nce_ctrl/README.md b/src/tests/tools/mock_nce_ctrl/README.md new file mode 100644 index 000000000..407f26425 --- /dev/null +++ b/src/tests/tools/mock_nce_ctrl/README.md @@ -0,0 +1,29 @@ +# Mock NCE Controller + +This REST server implements very basic support for the NCE access controller. + +The aim of this server is to enable testing IETF Network Slice NBI, NCE driver and NCE service handler. + + +## 1. Install requirements for the Mock NCE controller +__NOTE__: if you run the Mock NCE controller from the PyEnv used for developing on the TeraFlowSDN +framework and you followed the official steps in +[Development Guide > Configure Environment > Python](https://labs.etsi.org/rep/tfs/controller/-/wikis/2.-Development-Guide/2.1.-Configure-Environment/2.1.1.-Python), +all the requirements are already in place. Install them only if you execute it in a separate/standalone environment. + +Install the required dependencies as follows: +```bash +pip install -r src/tests/tools/mock_nce_ctrl/requirements.in +``` + +Run the Mock NCE Controller as follows: +```bash +python src/tests/tools/mock_nce_ctrl/MockNCECtrl.py +``` + + +## 2. Run the Mock NCE controller +Run the Mock NCE Controller as follows: +```bash +python src/tests/tools/mock_nce_ctrl/MockNCECtrl.py +``` diff --git a/src/tests/tools/mock_nce_ctrl/ResourceAppFlows.py b/src/tests/tools/mock_nce_ctrl/ResourceAppFlows.py new file mode 100644 index 000000000..9f7a8df41 --- /dev/null +++ b/src/tests/tools/mock_nce_ctrl/ResourceAppFlows.py @@ -0,0 +1,39 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# REST-API resource implementing minimal support for "IETF YANG Data Model for Transport Network Client Signals". +# Ref: https://www.ietf.org/archive/id/draft-ietf-ccamp-client-signal-yang-10.html + +from flask import jsonify, make_response, request +from flask_restful import Resource + +APP_FLOWS = {} + + +class AppFlows(Resource): + def get(self): + return make_response(jsonify(APP_FLOWS), 200) + + def post(self): + json_request = request.get_json() + name = json_request["app-flow"][0]["app-name"] + APP_FLOWS[name] = json_request + return make_response(jsonify({}), 201) + + +class AppFlow(Resource): + def delete(self, app_name: str): + app_flow = APP_FLOWS.pop(app_name, None) + data, status = ({}, 404) if app_flow is None else (app_flow, 204) + return make_response(jsonify(data), status) diff --git a/src/tests/tools/mock_nce_ctrl/ResourceApps.py b/src/tests/tools/mock_nce_ctrl/ResourceApps.py new file mode 100644 index 000000000..163d08fc2 --- /dev/null +++ b/src/tests/tools/mock_nce_ctrl/ResourceApps.py @@ -0,0 +1,39 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# REST-API resource implementing minimal support for "IETF YANG Data Model for Transport Network Client Signals". +# Ref: https://www.ietf.org/archive/id/draft-ietf-ccamp-client-signal-yang-10.html + +from flask import jsonify, make_response, request +from flask_restful import Resource + +APPS = {} + + +class Apps(Resource): + def get(self): + return make_response(jsonify(APPS), 200) + + def post(self): + json_request = request.get_json() + name = json_request["application"][0]["name"] + APPS[name] = json_request + return make_response(jsonify({}), 201) + + +class App(Resource): + def delete(self, app_name: str): + app_flow = APPS.pop(app_name, None) + data, status = ({}, 404) if app_flow is None else (app_flow, 204) + return make_response(jsonify(data), status) diff --git a/src/tests/tools/mock_nce_ctrl/__init__.py b/src/tests/tools/mock_nce_ctrl/__init__.py new file mode 100644 index 000000000..3ccc21c7d --- /dev/null +++ b/src/tests/tools/mock_nce_ctrl/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/tools/mock_nce_ctrl/build.sh b/src/tests/tools/mock_nce_ctrl/build.sh new file mode 100755 index 000000000..766d2c1dc --- /dev/null +++ b/src/tests/tools/mock_nce_ctrl/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Make folder containing the script the root folder for its execution +cd $(dirname $0) + +docker build -t mock-nce-ctrl:test -f Dockerfile . +docker tag mock-nce-ctrl:test localhost:32000/tfs/mock-nce-ctrl:test +docker push localhost:32000/tfs/mock-nce-ctrl:test diff --git a/src/tests/tools/mock_nce_ctrl/deploy.sh b/src/tests/tools/mock_nce_ctrl/deploy.sh new file mode 100755 index 000000000..0e5faf26d --- /dev/null +++ b/src/tests/tools/mock_nce_ctrl/deploy.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 mocks +kubectl --namespace mocks apply -f mock-nce-ctrl.yaml diff --git a/src/tests/tools/mock_nce_ctrl/mock-nce-ctrl.yaml b/src/tests/tools/mock_nce_ctrl/mock-nce-ctrl.yaml new file mode 100644 index 000000000..4a1512f23 --- /dev/null +++ b/src/tests/tools/mock_nce_ctrl/mock-nce-ctrl.yaml @@ -0,0 +1,64 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +kind: Namespace +apiVersion: v1 +metadata: + name: mocks +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mock-nce-ctrl +spec: + selector: + matchLabels: + app: mock-nce-ctrl + replicas: 1 + template: + metadata: + annotations: + config.linkerd.io/skip-inbound-ports: "8443" + labels: + app: mock-nce-ctrl + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: server + image: localhost:32000/tfs/mock-nce-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-nce-ctrl + labels: + app: mock-nce-ctrl +spec: + type: ClusterIP + selector: + app: mock-nce-ctrl + ports: + - name: https + port: 8443 + targetPort: 8443 diff --git a/src/tests/tools/mock_nce_ctrl/requirements.in b/src/tests/tools/mock_nce_ctrl/requirements.in new file mode 100644 index 000000000..dbb8e95d6 --- /dev/null +++ b/src/tests/tools/mock_nce_ctrl/requirements.in @@ -0,0 +1,22 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 +werkzeug==2.3.7 diff --git a/src/tests/tools/mock_nce_ctrl/run.sh b/src/tests/tools/mock_nce_ctrl/run.sh new file mode 100755 index 000000000..6aa1149a4 --- /dev/null +++ b/src/tests/tools/mock_nce_ctrl/run.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Make folder containing the script the root folder for its execution +cd $(dirname $0) + +python MockNCECtrl.py -- GitLab From ebe90747e898490905776deff47a9f44e414f68b Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 14 Jan 2025 10:50:09 +0100 Subject: [PATCH 175/463] ofc25 camara e2e test added to gitlab e2e test execution list --- src/tests/.gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index fdc86805b..cd3c3cc21 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -21,4 +21,5 @@ include: #- local: '/src/tests/ofc23/.gitlab-ci.yml' - local: '/src/tests/ofc24/.gitlab-ci.yml' - local: '/src/tests/eucnc24/.gitlab-ci.yml' + - local: '/src/tests/ofc25/.gitlab-ci.yml' #- local: '/src/tests/ecoc24/.gitlab-ci.yml' -- GitLab From cf640e651d7a775222dc9c2367d8c262c9f59d1a Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Tue, 14 Jan 2025 16:53:05 +0000 Subject: [PATCH 176/463] Updated Analaytics backend streamer class. - Enhance AnalyticsBackendService - DaskStreamer with improved logging and threading management - Update duration handling in tests. --- .../service/AnalyticsBackendService.py | 45 ++++++++++++------- .../backend/service/AnalyzerHandlers.py | 6 ++- src/analytics/backend/service/Streamer.py | 21 +++++---- .../backend/tests/messages_analyzer.py | 2 +- 4 files changed, 44 insertions(+), 30 deletions(-) diff --git a/src/analytics/backend/service/AnalyticsBackendService.py b/src/analytics/backend/service/AnalyticsBackendService.py index 508feecea..eab275324 100755 --- a/src/analytics/backend/service/AnalyticsBackendService.py +++ b/src/analytics/backend/service/AnalyticsBackendService.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import time import json import logging import threading @@ -26,11 +27,11 @@ from common.Settings import get_service_port_grpc from threading import Thread, Event from analytics.backend.service.Streamer import DaskStreamer from common.proto.analytics_frontend_pb2 import Analyzer -from apscheduler.schedulers.background import BackgroundScheduler from datetime import datetime, timedelta LOGGER = logging.getLogger(__name__) +logging.basicConfig(level=logging.INFO, format=' %(levelname)s - %(message)s') class AnalyticsBackendService(GenericGrpcService): """ @@ -40,9 +41,7 @@ class AnalyticsBackendService(GenericGrpcService): LOGGER.info('Init AnalyticsBackendService') port = get_service_port_grpc(ServiceNameEnum.ANALYTICSBACKEND) super().__init__(port, cls_name=cls_name) - self.schedular = BackgroundScheduler(daemon=True) - self.schedular.start() - self.running_threads = {} # To keep track of all running analyzers + self.active_streamers = {} self.kafka_consumer = KafkaConsumer({'bootstrap.servers' : KafkaConfig.get_kafka_address(), 'group.id' : 'analytics-frontend', 'auto.offset.reset' : 'latest'}) @@ -75,7 +74,7 @@ class AnalyticsBackendService(GenericGrpcService): try: analyzer = json.loads(receive_msg.value().decode('utf-8')) analyzer_uuid = receive_msg.key().decode('utf-8') - LOGGER.debug('Recevied Analyzer: {:} - {:}'.format(analyzer_uuid, analyzer)) + LOGGER.info('Recevied Analyzer: {:} - {:}'.format(analyzer_uuid, analyzer)) # print ('Recevied Analyzer: {:} - {:}'.format(analyzer_uuid, analyzer)) if analyzer["algo_name"] is None and analyzer["oper_mode"] is None: @@ -90,6 +89,9 @@ class AnalyticsBackendService(GenericGrpcService): """ Start the DaskStreamer with the given parameters. """ + if analyzer_uuid in self.active_streamers: + LOGGER.warning("Dask Streamer already running with the given analyzer_uuid: {:}".format(analyzer_uuid)) + return False try: streamer = DaskStreamer( analyzer_uuid, @@ -99,13 +101,20 @@ class AnalyticsBackendService(GenericGrpcService): analyzer['batch_size' ], analyzer['window_size'], ) - self.schedular.add_job( - streamer.run, - 'date', - run_date=datetime.now(pytz.utc), - id=analyzer_uuid, - replace_existing=True - ) + streamer.start() + logging.info(f"Streamer started with analyzer Id: {analyzer_uuid}") + + # Stop the streamer after the given duration + if analyzer['duration'] is not None: + def stop_after_duration(): + time.sleep(analyzer['duration']) + logging.info(f"Stopping streamer with analyzer: {analyzer_uuid}") + streamer.stop() + + duration_thread = threading.Thread(target=stop_after_duration, daemon=True) + duration_thread.start() + + self.active_streamers[analyzer_uuid] = streamer LOGGER.info("Dask Streamer started.") return True except Exception as e: @@ -117,13 +126,15 @@ class AnalyticsBackendService(GenericGrpcService): Stop the DaskStreamer with the given analyzer_uuid. """ try: - active_jobs = self.schedular.get_jobs() - logger.debug("Active Jobs: {:}".format(active_jobs)) - if analyzer_uuid not in [job.id for job in active_jobs]: + if analyzer_uuid not in self.active_streamers: LOGGER.warning("Dask Streamer not found with the given analyzer_uuid: {:}".format(analyzer_uuid)) return False - self.schedular.remove_job(analyzer_uuid) - LOGGER.info("Dask Streamer stopped.") + LOGGER.info(f"Stopping streamer with key: {analyzer_uuid}") + streamer = self.active_streamers[analyzer_uuid] + streamer.stop() + streamer.join() + del self.active_streamers[analyzer_uuid] + LOGGER.info(f"Streamer with analyzer_uuid '{analyzer_uuid}' has been stopped.") return True except Exception as e: LOGGER.error("Failed to stop Dask Streamer. ERROR: {:}".format(e)) diff --git a/src/analytics/backend/service/AnalyzerHandlers.py b/src/analytics/backend/service/AnalyzerHandlers.py index f407de2a0..0e23bab69 100644 --- a/src/analytics/backend/service/AnalyzerHandlers.py +++ b/src/analytics/backend/service/AnalyzerHandlers.py @@ -119,9 +119,13 @@ def aggregation_handler( agg_df['kpi_id'] = output_kpi_list[kpi_index] + # if agg_df.empty: + # logger.warning(f"No data available for KPI: {kpi_id}. Skipping threshold application.") + # continue + # logger.info(f"4. Applying thresholds for df: {agg_df['kpi_id']}") result = threshold_handler(key, agg_df, kpi_task_parameters) return result.to_dict(orient='records') else: - logger.debug(f"No data available for KPI: {kpi_id}. Skipping aggregation.") + logger.warning(f"No data available for KPIs: {kpi_id}. Skipping aggregation.") continue diff --git a/src/analytics/backend/service/Streamer.py b/src/analytics/backend/service/Streamer.py index cabed8588..35d35b36e 100644 --- a/src/analytics/backend/service/Streamer.py +++ b/src/analytics/backend/service/Streamer.py @@ -16,20 +16,19 @@ import logging import time import json from confluent_kafka import KafkaException, KafkaError -# import pandas as pd from common.tools.kafka.Variables import KafkaTopic from .AnalyzerHandlers import AnalyzerHandlers, aggregation_handler from .AnalyzerHelper import AnalyzerHelper +import threading - -logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO, format=' %(levelname)s - %(message)s') -class DaskStreamer: +class DaskStreamer(threading.Thread): def __init__(self, key, input_kpis, output_kpis, thresholds, batch_size=5, - window_size=None, n_workers=5, threads_per_worker=2): + window_size=None, n_workers=1, threads_per_worker=1): + super().__init__() self.key = key self.input_kpis = input_kpis self.output_kpis = output_kpis @@ -96,8 +95,6 @@ class DaskStreamer: logger.exception(f"Error in Dask streaming process: {e}") finally: logger.info(">>> Exiting Dask Streamer...") - self.cleanup() - logger.info(">>> Dask Streamer Cleanup Completed.") def task_handler_selector(self): """Select the task handler based on the task type.""" @@ -126,7 +123,7 @@ class DaskStreamer: self.producer.flush() logger.info(f"Produced {len(result)} aggregated records to '{destination_topic}'.") - def cleanup(self): + def stop(self): """Clean up Kafka and Dask resources.""" logger.info("Shutting down resources...") self.running = False @@ -144,16 +141,18 @@ class DaskStreamer: except Exception as e: logger.error(f"Error closing Kafka producer: {e}") - if self.client and hasattr(self.client, 'status') and self.client.status == 'running': + if self.client is not None and hasattr(self.client, 'status') and self.client.status == 'running': try: self.client.close() logger.info("Dask client closed.") except Exception as e: logger.error(f"Error closing Dask client: {e}") - if self.cluster and hasattr(self.cluster, 'close'): + if self.cluster is not None and hasattr(self.cluster, 'close'): try: self.cluster.close(timeout=5) logger.info("Dask cluster closed.") except Exception as e: - logger.error(f"May be timeout. Error closing Dask cluster: {e}") + logger.error(f"Timeout error while closing Dask cluster: {e}") + + diff --git a/src/analytics/backend/tests/messages_analyzer.py b/src/analytics/backend/tests/messages_analyzer.py index 040fbb468..6a303d474 100644 --- a/src/analytics/backend/tests/messages_analyzer.py +++ b/src/analytics/backend/tests/messages_analyzer.py @@ -32,7 +32,7 @@ def get_thresholds(): } def get_duration(): - return 30 + return 60 def get_windows_size(): return None -- GitLab From 6e220c6ff630da2d96bd9c3c4f39b269f172102a Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 17 Jan 2025 14:39:24 +0100 Subject: [PATCH 177/463] debug: nce controller mock debugged - redundant BASE_URL removed from endpoints - ssl deactivated - Health class removed --- src/tests/tools/mock_nce_ctrl/MockNCECtrl.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/tests/tools/mock_nce_ctrl/MockNCECtrl.py b/src/tests/tools/mock_nce_ctrl/MockNCECtrl.py index 5de351e05..e58a4dc44 100644 --- a/src/tests/tools/mock_nce_ctrl/MockNCECtrl.py +++ b/src/tests/tools/mock_nce_ctrl/MockNCECtrl.py @@ -56,11 +56,6 @@ def log_request(logger: logging.Logger, response): return response -class Health(Resource): - def get(self): - return make_response(jsonify({}), 200) - - def main(): LOGGER.info("Starting...") @@ -68,14 +63,13 @@ def main(): app.after_request(functools.partial(log_request, LOGGER)) api = Api(app, prefix=BASE_URL) - api.add_resource(Health, "/") - api.add_resource(Apps, BASE_URL + "/apps") - api.add_resource(App, BASE_URL + "/application=") - api.add_resource(AppFlows, BASE_URL) - api.add_resource(AppFlow, BASE_URL + "/app-flow=") + api.add_resource(Apps, "/apps") + api.add_resource(App, "/apps/application=") + api.add_resource(AppFlows, "") + api.add_resource(AppFlow, "/app-flow=") LOGGER.info("Listening on {:s}...".format(str(STR_ENDPOINT))) - app.run(debug=True, host=BIND_ADDRESS, port=BIND_PORT, ssl_context="adhoc") + app.run(debug=True, host=BIND_ADDRESS, port=BIND_PORT) LOGGER.info("Bye") return 0 -- GitLab From 6123804ab75ea4d9cc382aa2ec245b0d2935d288 Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 17 Jan 2025 14:40:34 +0100 Subject: [PATCH 178/463] debug: ietf network slice mock debugged - endpoint paths fixed --- .../MockIetfNetworkSliceSdnCtrl.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/MockIetfNetworkSliceSdnCtrl.py b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/MockIetfNetworkSliceSdnCtrl.py index 59b7f609e..8d13f1baf 100644 --- a/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/MockIetfNetworkSliceSdnCtrl.py +++ b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/MockIetfNetworkSliceSdnCtrl.py @@ -22,8 +22,8 @@ import functools, logging, sys, time -from flask import Flask, jsonify, make_response, request -from flask_restful import Api, Resource +from flask import Flask, request +from flask_restful import Api from ResourceNetworkSlices import NetworkSliceService, NetworkSliceServices from ResourceConnectionGroups import ConnectionGroup @@ -56,11 +56,6 @@ def log_request(logger: logging.Logger, response): return response -class Health(Resource): - def get(self): - return make_response(jsonify({}), 200) - - def main(): LOGGER.info("Starting...") @@ -68,17 +63,15 @@ def main(): app.after_request(functools.partial(log_request, LOGGER)) api = Api(app, prefix=BASE_URL) - api.add_resource(Health, "/") - api.add_resource(NetworkSliceServices, BASE_URL) - api.add_resource(NetworkSliceService, BASE_URL + "/slice-service=") + api.add_resource(NetworkSliceServices, "") + api.add_resource(NetworkSliceService, "/slice-service=") api.add_resource( ConnectionGroup, - BASE_URL - + "/slice-service=/connection-groups/connection-group=", + "/slice-service=/connection-groups/connection-group=", ) LOGGER.info("Listening on {:s}...".format(str(STR_ENDPOINT))) - app.run(debug=True, host=BIND_ADDRESS, port=BIND_PORT, ssl_context="adhoc") + app.run(debug=True, host=BIND_ADDRESS, port=BIND_PORT) LOGGER.info("Bye") return 0 -- GitLab From b4248caef35c47104d71c8c32be14fff6cb570a1 Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 17 Jan 2025 14:50:18 +0100 Subject: [PATCH 179/463] debug: camara ofc25 e2e test - target files' path fixed - app_name hardcoded - json content of responses extracted - target-full-ietf-slice.json moved to src/tests/of25/data - descriptor validation in test_onboarding phase deactivated - tfs_runtime_env_vars.sh mounted in ofc25's docker container - slice component deployment added to deploy_specs.sh - components' client directory added to the image - new requirements added to the requirements.in of ofc25 --- src/tests/ofc25/.gitlab-ci.yml | 4 + src/tests/ofc25/Dockerfile | 13 +++ .../{slice => }/target-full-ietf-slice.json | 0 src/tests/ofc25/deploy_specs.sh | 2 +- src/tests/ofc25/requirements.in | 14 ++++ .../tests/test_e2e_ietf_slice_operations.py | 81 +++++++++---------- src/tests/ofc25/tests/test_onboarding.py | 2 +- 7 files changed, 72 insertions(+), 44 deletions(-) rename src/tests/ofc25/data/{slice => }/target-full-ietf-slice.json (100%) diff --git a/src/tests/ofc25/.gitlab-ci.yml b/src/tests/ofc25/.gitlab-ci.yml index 7bc42ce7b..49eaba523 100644 --- a/src/tests/ofc25/.gitlab-ci.yml +++ b/src/tests/ofc25/.gitlab-ci.yml @@ -91,11 +91,15 @@ end2end_test ofc25: # Run end-to-end test: onboard scenario - > docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-onboarding.sh # Run end-to-end test: configure service TFS - > docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-e2e-ietf-slice-operations.sh after_script: diff --git a/src/tests/ofc25/Dockerfile b/src/tests/ofc25/Dockerfile index b2ce8157a..2d7d5ce34 100644 --- a/src/tests/ofc25/Dockerfile +++ b/src/tests/ofc25/Dockerfile @@ -58,6 +58,19 @@ RUN python3 -m pip install -r requirements.txt # Add component files into working directory WORKDIR /var/teraflow COPY src/__init__.py ./__init__.py +COPY src/common/*.py ./common/ +COPY src/common/tests/. ./common/tests/ +COPY src/common/tools/. ./common/tools/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ +COPY src/monitoring/__init__.py monitoring/__init__.py +COPY src/monitoring/client/. monitoring/client/ +COPY src/service/__init__.py service/__init__.py +COPY src/service/client/. service/client/ +COPY src/slice/__init__.py slice/__init__.py +COPY src/slice/client/. slice/client/ COPY src/tests/*.py ./tests/ COPY src/tests/ofc25/__init__.py ./tests/ofc25/__init__.py COPY src/tests/ofc25/data/. ./tests/ofc25/data/ diff --git a/src/tests/ofc25/data/slice/target-full-ietf-slice.json b/src/tests/ofc25/data/target-full-ietf-slice.json similarity index 100% rename from src/tests/ofc25/data/slice/target-full-ietf-slice.json rename to src/tests/ofc25/data/target-full-ietf-slice.json diff --git a/src/tests/ofc25/deploy_specs.sh b/src/tests/ofc25/deploy_specs.sh index 72cd25b58..9ae83e7b1 100755 --- a/src/tests/ofc25/deploy_specs.sh +++ b/src/tests/ofc25/deploy_specs.sh @@ -21,7 +21,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. #export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator" -export TFS_COMPONENTS="context device pathcomp service nbi" +export TFS_COMPONENTS="context device pathcomp service slice nbi" # Uncomment to activate Monitoring (old) #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" diff --git a/src/tests/ofc25/requirements.in b/src/tests/ofc25/requirements.in index 6210ec817..1bdaec999 100644 --- a/src/tests/ofc25/requirements.in +++ b/src/tests/ofc25/requirements.in @@ -14,3 +14,17 @@ deepdiff==6.7.* requests==2.27.* + +coverage==6.3 +grpcio==1.47.* +grpcio-health-checking==1.47.* +grpcio-reflection==1.47.* +grpcio-tools==1.47.* +grpclib==0.4.4 +prettytable==3.5.0 +prometheus-client==0.13.0 +protobuf==3.20.* +pytest==6.2.5 +pytest-benchmark==3.4.1 +python-dateutil==2.8.2 +pytest-depends==1.0.1 diff --git a/src/tests/ofc25/tests/test_e2e_ietf_slice_operations.py b/src/tests/ofc25/tests/test_e2e_ietf_slice_operations.py index d6207d675..cb991edbf 100644 --- a/src/tests/ofc25/tests/test_e2e_ietf_slice_operations.py +++ b/src/tests/ofc25/tests/test_e2e_ietf_slice_operations.py @@ -82,14 +82,12 @@ TARGET_NCE_APP_FLOWS = os.path.join( os.path.dirname(os.path.abspath(__file__)), "..", "data", - "slice", "target-nce-app-flows.json", ) TARGET_NCE_APPS = os.path.join( os.path.dirname(os.path.abspath(__file__)), "..", "data", - "slice", "target-nce-apps.json", ) TARGET_FULL_IETF_SLICE = os.path.join( @@ -103,7 +101,6 @@ TARGET_FULL_IETF_SLICE = os.path.join( os.path.dirname(os.path.abspath(__file__)), "..", "data", - "slice", "target-full-ietf-slice.json", ) TARGET_IETF_SLICE_POSTED_SLICES = os.path.join( @@ -171,18 +168,18 @@ def test_ietf_slice_creation_removal(): requests.post(URL, headers=HEADERS, json=post_network_slice1) URL = NCE_APP_DATA_URL - apps_response = requests.get(URL) + apps_response = requests.get(URL).json() URL = NCE_APP_FLOW_DATA_URL - app_flows_response = requests.get(URL) + app_flows_response = requests.get(URL).json() URL = AGG_TFS_IETF_SLICE_URL - ietf_slice_services = requests.get(URL) + ietf_slice_services = requests.get(URL).json() URL = ( AGG_TFS_IETF_SLICE_URL + "/slice-service=dummy/connection-groups/connection-group=dummy" ) - ietf_slice_connection_groups = requests.get(URL) + ietf_slice_connection_groups = requests.get(URL).json() - app_name = apps_response["application"][0]["name"] + app_name = "App_Flow_2_1_slice1" apps_diff = DeepDiff(apps_response[app_name], target_nce_apps[app_name]) app_flows_diff = DeepDiff( app_flows_response[app_name], @@ -211,18 +208,18 @@ def test_ietf_slice_creation_removal(): requests.post(URL, headers=HEADERS, json=post_match_criteria_to_sdp1_in_slice1) URL = NCE_APP_DATA_URL - apps_response = requests.get(URL) + apps_response = requests.get(URL).json() URL = NCE_APP_FLOW_DATA_URL - app_flows_response = requests.get(URL) + app_flows_response = requests.get(URL).json() URL = AGG_TFS_IETF_SLICE_URL - ietf_slice_services = requests.get(URL) + ietf_slice_services = requests.get(URL).json() URL = ( AGG_TFS_IETF_SLICE_URL + "/slice-service=dummy/connection-groups/connection-group=dummy" ) - ietf_slice_connection_groups = requests.get(URL) + ietf_slice_connection_groups = requests.get(URL).json() - app_name = apps_response["application"][0]["name"] + app_name = "App_Flow_3_1_slice1" apps_diff = DeepDiff(apps_response[app_name], target_nce_apps[app_name]) app_flows_diff = DeepDiff( app_flows_response[app_name], @@ -245,18 +242,18 @@ def test_ietf_slice_creation_removal(): requests.post(URL, headers=HEADERS, json=post_network_slice2) URL = NCE_APP_DATA_URL - apps_response = requests.get(URL) + apps_response = requests.get(URL).json() URL = NCE_APP_FLOW_DATA_URL - app_flows_response = requests.get(URL) + app_flows_response = requests.get(URL).json() URL = AGG_TFS_IETF_SLICE_URL - ietf_slice_services = requests.get(URL) + ietf_slice_services = requests.get(URL).json() URL = ( AGG_TFS_IETF_SLICE_URL + "/slice-service=dummy/connection-groups/connection-group=dummy" ) - ietf_slice_connection_groups = requests.get(URL) + ietf_slice_connection_groups = requests.get(URL).json() - app_name = apps_response["application"][0]["name"] + app_name = "App_Flow_2_1_slice2" apps_diff = DeepDiff(apps_response[app_name], target_nce_apps[app_name]) app_flows_diff = DeepDiff( app_flows_response[app_name], @@ -267,7 +264,7 @@ def test_ietf_slice_creation_removal(): assert not app_flows_diff assert len(apps_response) == 3 and len(app_flows_response) == 3 - assert len(ietf_slice_connection_groups) == 0 + assert len(ietf_slice_connection_groups) == 1 assert len(ietf_slice_services) == 2 slice_diff = DeepDiff( ietf_slice_services["slice2"], target_ietf_slice_posted_slices[1] @@ -285,18 +282,18 @@ def test_ietf_slice_creation_removal(): requests.post(URL, headers=HEADERS, json=post_match_criteria_to_sdp1_in_slice2) URL = NCE_APP_DATA_URL - apps_response = requests.get(URL) + apps_response = requests.get(URL).json() URL = NCE_APP_FLOW_DATA_URL - app_flows_response = requests.get(URL) + app_flows_response = requests.get(URL).json() URL = AGG_TFS_IETF_SLICE_URL - ietf_slice_services = requests.get(URL) + ietf_slice_services = requests.get(URL).json() URL = ( AGG_TFS_IETF_SLICE_URL + "/slice-service=dummy/connection-groups/connection-group=dummy" ) - ietf_slice_connection_groups = requests.get(URL) + ietf_slice_connection_groups = requests.get(URL).json() - app_name = apps_response["application"][0]["name"] + app_name = "App_Flow_3_1_slice2" apps_diff = DeepDiff(apps_response[app_name], target_nce_apps[app_name]) app_flows_diff = DeepDiff( app_flows_response[app_name], @@ -315,7 +312,7 @@ def test_ietf_slice_creation_removal(): assert not connection_group_diff # op 5 - ietf_slices_full_retrieved = requests.get(BASE_IETF_SLICE_URL) + ietf_slices_full_retrieved = requests.get(BASE_IETF_SLICE_URL).json() ietf_slice_data = DeepDiff(ietf_slices_full_retrieved, target_full_ietf_slice) assert not ietf_slice_data @@ -334,16 +331,16 @@ def test_ietf_slice_creation_removal(): requests.delete(URL) URL = NCE_APP_DATA_URL - apps_response = requests.get(URL) + apps_response = requests.get(URL).json() URL = NCE_APP_FLOW_DATA_URL - app_flows_response = requests.get(URL) + app_flows_response = requests.get(URL).json() URL = AGG_TFS_IETF_SLICE_URL - ietf_slice_services = requests.get(URL) + ietf_slice_services = requests.get(URL).json() URL = ( AGG_TFS_IETF_SLICE_URL + "/slice-service=dummy/connection-groups/connection-group=dummy" ) - ietf_slice_connection_groups = requests.get(URL) + ietf_slice_connection_groups = requests.get(URL).json() app_name = "App_Flow_2_1_slice1" assert app_name not in apps_response @@ -373,16 +370,16 @@ def test_ietf_slice_creation_removal(): URL = BASE_IETF_SLICE_URL + "/slice-service=slice1/sdps/sdp=1" URL = NCE_APP_DATA_URL - apps_response = requests.get(URL) + apps_response = requests.get(URL).json() URL = NCE_APP_FLOW_DATA_URL - app_flows_response = requests.get(URL) + app_flows_response = requests.get(URL).json() URL = AGG_TFS_IETF_SLICE_URL - ietf_slice_services = requests.get(URL) + ietf_slice_services = requests.get(URL).json() URL = ( AGG_TFS_IETF_SLICE_URL + "/slice-service=dummy/connection-groups/connection-group=dummy" ) - ietf_slice_connection_groups = requests.get(URL) + ietf_slice_connection_groups = requests.get(URL).json() requests.delete(URL) URL = BASE_IETF_SLICE_URL + "/slice-service=slice1" @@ -412,16 +409,16 @@ def test_ietf_slice_creation_removal(): requests.delete(URL) URL = NCE_APP_DATA_URL - apps_response = requests.get(URL) + apps_response = requests.get(URL).json() URL = NCE_APP_FLOW_DATA_URL - app_flows_response = requests.get(URL) + app_flows_response = requests.get(URL).json() URL = AGG_TFS_IETF_SLICE_URL - ietf_slice_services = requests.get(URL) + ietf_slice_services = requests.get(URL).json() URL = ( AGG_TFS_IETF_SLICE_URL + "/slice-service=dummy/connection-groups/connection-group=dummy" ) - ietf_slice_connection_groups = requests.get(URL) + ietf_slice_connection_groups = requests.get(URL).json() app_name = "App_Flow_2_1_slice2" assert app_name not in apps_response @@ -450,16 +447,16 @@ def test_ietf_slice_creation_removal(): requests.delete(URL) URL = NCE_APP_DATA_URL - apps_response = requests.get(URL) + apps_response = requests.get(URL).json() URL = NCE_APP_FLOW_DATA_URL - app_flows_response = requests.get(URL) + app_flows_response = requests.get(URL).json() URL = AGG_TFS_IETF_SLICE_URL - ietf_slice_services = requests.get(URL) + ietf_slice_services = requests.get(URL).json() URL = ( AGG_TFS_IETF_SLICE_URL + "/slice-service=dummy/connection-groups/connection-group=dummy" ) - ietf_slice_connection_groups = requests.get(URL) + ietf_slice_connection_groups = requests.get(URL).json() URL = BASE_IETF_SLICE_URL + "/slice-service=slice2/sdps/sdp=1" requests.delete(URL) @@ -475,7 +472,7 @@ def test_ietf_slice_creation_removal(): assert len(ietf_slice_services) == 0 # op 10 - ietf_slices_full_retrieved = requests.get(BASE_IETF_SLICE_URL) + ietf_slices_full_retrieved = requests.get(BASE_IETF_SLICE_URL).json() empty_ietf_slices = {"network-slice-services": {"slice-service": []}} ietf_slice_data = DeepDiff(ietf_slices_full_retrieved, empty_ietf_slices) assert not ietf_slice_data diff --git a/src/tests/ofc25/tests/test_onboarding.py b/src/tests/ofc25/tests/test_onboarding.py index b58cb3821..05e031da7 100644 --- a/src/tests/ofc25/tests/test_onboarding.py +++ b/src/tests/ofc25/tests/test_onboarding.py @@ -37,7 +37,7 @@ def test_scenario_onboarding( descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) results = descriptor_loader.process() check_descriptor_load_results(results, descriptor_loader) - descriptor_loader.validate() + # descriptor_loader.validate() # Verify the scenario has no services/slices response = context_client.GetContext(ADMIN_CONTEXT_ID) -- GitLab From 45383bf0ca7685ae31fead602afd8a01acc30dc0 Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 17 Jan 2025 15:39:48 +0100 Subject: [PATCH 180/463] debug: qos calculation fixed for slice creation --- .../l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py index a3d50c0e1..ea1c0f425 100644 --- a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py +++ b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py @@ -213,7 +213,12 @@ def extract_source_destination_device_endpoint_info( raise Exception( "There should be one common sdp in all connectivity constructs, otherwise, it is not supported" ) - common_sdp = common_sdps.pop() + if len(common_sdps) == 1: + common_sdp = common_sdps.pop() + elif len(common_sdps) == 2: + common_sdp = sender_sdp + else: + raise Exception('Invalid number of common sdps') for (sender, receiver), metrics in cc_info.items(): cc_bandwidth = metrics.bandwidth cc_max_delay = metrics.delay -- GitLab From 2594c23a3cac999e3034017cc9a4c3df669080e6 Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 17 Jan 2025 15:43:07 +0100 Subject: [PATCH 181/463] nce requests uncommented --- src/device/service/drivers/nce/nce_fan_client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/device/service/drivers/nce/nce_fan_client.py b/src/device/service/drivers/nce/nce_fan_client.py index 022ae15a5..fd42ef962 100644 --- a/src/device/service/drivers/nce/nce_fan_client.py +++ b/src/device/service/drivers/nce/nce_fan_client.py @@ -70,13 +70,13 @@ class NCEClient: app_data = app_flow_data["huawei-nce-app-flow:app-flows"]["applications"] app_url = self._nce_fan_url + "/app-flows/apps" LOGGER.info(f'Creating app: {app_data} URL: {app_url}') - # requests.post(app_url, json=app_data, headers=HEADERS) + requests.post(app_url, json=app_data, headers=HEADERS) app_flow_data = { "app-flow": app_flow_data["huawei-nce-app-flow:app-flows"]["app-flow"] } app_flow_url = self._nce_fan_url + "/app-flows" LOGGER.info(f'Creating app flow: {app_flow_data} URL: {app_flow_url}') - # requests.post(app_flow_url, json=app_flow_data, headers=HEADERS) + requests.post(app_flow_url, json=app_flow_data, headers=HEADERS) except requests.exceptions.ConnectionError: raise Exception("faild to send post requests to NCE FAN") @@ -84,9 +84,9 @@ class NCEClient: try: app_url = self._nce_fan_url + f"/app-flows/apps/application={app_flow_name}" LOGGER.info(f'Deleting app: {app_flow_name} URL: {app_url}') - # requests.delete(app_url) + requests.delete(app_url) app_flow_url = self._nce_fan_url + f"/app-flows/app-flow={app_flow_name}" LOGGER.info(f'Deleting app flow: {app_flow_name} URL: {app_flow_url}') - # requests.delete(app_flow_url) + requests.delete(app_flow_url) except requests.exceptions.ConnectionError: raise Exception("faild to send delete request to NCE FAN") -- GitLab From a65301c9f9911951595ee015b28e66c94cf4ef2d Mon Sep 17 00:00:00 2001 From: hajipour Date: Fri, 17 Jan 2025 15:45:24 +0100 Subject: [PATCH 182/463] comments added to ietf slice driver --- src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py b/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py index 67b0d5cdb..5716982af 100644 --- a/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py +++ b/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py @@ -47,6 +47,7 @@ class TfsApiClient: url = self._slice_url + ":network-slice-services" try: requests.post(url, json=slice_data, headers=HEADERS) + LOGGER.info(f"IETF Slice Post to {url}: {slice_data}") except requests.exceptions.ConnectionError: raise Exception("faild to send post request to TFS IETF Slice NBI") @@ -62,6 +63,7 @@ class TfsApiClient: ) try: requests.put(url, json=updated_connection_group_data, headers=HEADERS) + LOGGER.info(f"IETF Slice Put to {url}: {updated_connection_group_data}") except requests.exceptions.ConnectionError: raise Exception("faild to send update request to TFS IETF Slice NBI") @@ -69,5 +71,6 @@ class TfsApiClient: url = self._slice_url + f":network-slice-services/slice-service={slice_name}" try: requests.delete(url) + LOGGER.info(f"IETF Slice Delete to {url}") except requests.exceptions.ConnectionError: raise Exception("faild to send delete request to TFS IETF Slice NBI") -- GitLab From 04e1cf6ccc5d4edefac84c7cd05895a2d3246fe8 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Fri, 17 Jan 2025 14:55:59 +0000 Subject: [PATCH 183/463] Updated Analytics backend Service and streamer class - Add new output KPI types - refactor AnalyzerHandlers - Updated streamer interaction - added more test cases. --- proto/kpi_sample_types.proto | 10 + .../service/AnalyticsBackendService.py | 86 ++++--- .../backend/service/AnalyzerHandlers.py | 15 +- .../backend/service/AnalyzerHelper.py | 26 +- src/analytics/backend/service/Streamer.py | 83 +++--- .../backend/tests/messages_analyzer.py | 12 +- src/analytics/backend/tests/test_backend.py | 241 ++++++++++++------ 7 files changed, 306 insertions(+), 167 deletions(-) diff --git a/proto/kpi_sample_types.proto b/proto/kpi_sample_types.proto index 0a9800d9e..d4efc084e 100644 --- a/proto/kpi_sample_types.proto +++ b/proto/kpi_sample_types.proto @@ -39,4 +39,14 @@ enum KpiSampleType { KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605; KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; + +// output KPIs + KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT = 1101; + KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT = 1102; + KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT = 1103; + KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT = 1201; + KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT = 1202; + KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT = 1203; + + KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT = 1701; } diff --git a/src/analytics/backend/service/AnalyticsBackendService.py b/src/analytics/backend/service/AnalyticsBackendService.py index eab275324..11ce1b377 100755 --- a/src/analytics/backend/service/AnalyticsBackendService.py +++ b/src/analytics/backend/service/AnalyticsBackendService.py @@ -17,17 +17,14 @@ import json import logging import threading -import pytz from common.tools.service.GenericGrpcService import GenericGrpcService from common.tools.kafka.Variables import KafkaConfig, KafkaTopic -from confluent_kafka import Consumer as KafkaConsumer +from confluent_kafka import Consumer from confluent_kafka import KafkaError from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc -from threading import Thread, Event from analytics.backend.service.Streamer import DaskStreamer -from common.proto.analytics_frontend_pb2 import Analyzer -from datetime import datetime, timedelta +from analytics.backend.service.AnalyzerHelper import AnalyzerHelper LOGGER = logging.getLogger(__name__) @@ -35,16 +32,25 @@ logging.basicConfig(level=logging.INFO, format=' %(levelname)s - %(message)s') class AnalyticsBackendService(GenericGrpcService): """ - Class listens for ... + AnalyticsBackendService class is responsible for handling the requests from the AnalyticsFrontendService. + It listens to the Kafka topic for the requests and starts/stops the DaskStreamer accordingly. + It also initializes the Kafka producer and Dask cluster for the streamer. """ - def __init__(self, cls_name : str = __name__) -> None: + def __init__(self, cls_name : str = __name__, n_workers=1, threads_per_worker=1 + ) -> None: LOGGER.info('Init AnalyticsBackendService') port = get_service_port_grpc(ServiceNameEnum.ANALYTICSBACKEND) super().__init__(port, cls_name=cls_name) self.active_streamers = {} - self.kafka_consumer = KafkaConsumer({'bootstrap.servers' : KafkaConfig.get_kafka_address(), - 'group.id' : 'analytics-frontend', - 'auto.offset.reset' : 'latest'}) + self.central_producer = AnalyzerHelper.initialize_kafka_producer() # Multi-threaded producer + self.cluster = AnalyzerHelper.initialize_dask_cluster( + n_workers, threads_per_worker) # Local cluster + self.request_consumer = Consumer({ + 'bootstrap.servers' : KafkaConfig.get_kafka_address(), + 'group.id' : 'analytics-backend', + 'auto.offset.reset' : 'latest', + }) + def install_servicers(self): threading.Thread( @@ -58,7 +64,7 @@ class AnalyticsBackendService(GenericGrpcService): """ LOGGER.info("Request Listener is initiated ...") # print ("Request Listener is initiated ...") - consumer = self.kafka_consumer + consumer = self.request_consumer consumer.subscribe([KafkaTopic.ANALYTICS_REQUEST.value]) while True: receive_msg = consumer.poll(2.0) @@ -69,23 +75,27 @@ class AnalyticsBackendService(GenericGrpcService): continue else: LOGGER.error("Consumer error: {:}".format(receive_msg.error())) - # print ("Consumer error: {:}".format(receive_msg.error())) break try: analyzer = json.loads(receive_msg.value().decode('utf-8')) analyzer_uuid = receive_msg.key().decode('utf-8') LOGGER.info('Recevied Analyzer: {:} - {:}'.format(analyzer_uuid, analyzer)) - # print ('Recevied Analyzer: {:} - {:}'.format(analyzer_uuid, analyzer)) if analyzer["algo_name"] is None and analyzer["oper_mode"] is None: - self.StopStreamer(analyzer_uuid) + if self.StopStreamer(analyzer_uuid): + LOGGER.info("Dask Streamer stopped.") + else: + LOGGER.error("Failed to stop Dask Streamer.") else: - self.StartStreamer(analyzer_uuid, analyzer) + if self.StartStreamer(analyzer_uuid, analyzer): + LOGGER.info("Dask Streamer started.") + else: + LOGGER.error("Failed to start Dask Streamer.") except Exception as e: LOGGER.warning("Unable to consume message from topic: {:}. ERROR: {:}".format(KafkaTopic.ANALYTICS_REQUEST.value, e)) - def StartStreamer(self, analyzer_uuid : str, analyzer : json): + def StartStreamer(self, analyzer_uuid : str, analyzer : dict): """ Start the DaskStreamer with the given parameters. """ @@ -94,28 +104,30 @@ class AnalyticsBackendService(GenericGrpcService): return False try: streamer = DaskStreamer( - analyzer_uuid, - analyzer['input_kpis' ], - analyzer['output_kpis'], - analyzer['thresholds' ], - analyzer['batch_size' ], - analyzer['window_size'], + key = analyzer_uuid, + input_kpis = analyzer['input_kpis' ], + output_kpis = analyzer['output_kpis'], + thresholds = analyzer['thresholds' ], + batch_size = analyzer['batch_size' ], + window_size = analyzer['window_size'], + cluster_instance = self.cluster, + producer_instance = self.central_producer, ) streamer.start() - logging.info(f"Streamer started with analyzer Id: {analyzer_uuid}") + LOGGER.info(f"Streamer started with analyzer Id: {analyzer_uuid}") # Stop the streamer after the given duration - if analyzer['duration'] is not None: + if analyzer['duration'] > 0: def stop_after_duration(): time.sleep(analyzer['duration']) - logging.info(f"Stopping streamer with analyzer: {analyzer_uuid}") - streamer.stop() + LOGGER.warning(f"Execution duration completed of Analyzer: {analyzer_uuid}") + if not self.StopStreamer(analyzer_uuid): + LOGGER.warning("Failed to stop Dask Streamer. Streamer may be already terminated.") duration_thread = threading.Thread(target=stop_after_duration, daemon=True) duration_thread.start() self.active_streamers[analyzer_uuid] = streamer - LOGGER.info("Dask Streamer started.") return True except Exception as e: LOGGER.error("Failed to start Dask Streamer. ERROR: {:}".format(e)) @@ -129,14 +141,30 @@ class AnalyticsBackendService(GenericGrpcService): if analyzer_uuid not in self.active_streamers: LOGGER.warning("Dask Streamer not found with the given analyzer_uuid: {:}".format(analyzer_uuid)) return False - LOGGER.info(f"Stopping streamer with key: {analyzer_uuid}") + LOGGER.info(f"Terminating streamer with Analyzer Id: {analyzer_uuid}") streamer = self.active_streamers[analyzer_uuid] streamer.stop() streamer.join() del self.active_streamers[analyzer_uuid] - LOGGER.info(f"Streamer with analyzer_uuid '{analyzer_uuid}' has been stopped.") + LOGGER.info(f"Streamer with analyzer_uuid '{analyzer_uuid}' has been trerminated sucessfully.") return True except Exception as e: LOGGER.error("Failed to stop Dask Streamer. ERROR: {:}".format(e)) return False + def close(self): # TODO: Is this function needed? + """ + Close the producer and cluster cleanly. + """ + if self.central_producer: + try: + self.central_producer.flush() + LOGGER.info("Kafka producer flushed and closed.") + except Exception as e: + LOGGER.error(f"Error closing Kafka producer: {e}") + if self.cluster: + try: + self.cluster.close() + LOGGER.info("Dask cluster closed.") + except Exception as e: + LOGGER.error(f"Error closing Dask cluster: {e}") diff --git a/src/analytics/backend/service/AnalyzerHandlers.py b/src/analytics/backend/service/AnalyzerHandlers.py index 0e23bab69..c8a9c838a 100644 --- a/src/analytics/backend/service/AnalyzerHandlers.py +++ b/src/analytics/backend/service/AnalyzerHandlers.py @@ -16,11 +16,11 @@ import logging from enum import Enum import pandas as pd - logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO, format='%(levelname)s - %(message)s') -class AnalyzerHandlers(Enum): + +class Handlers(Enum): AGGREGATION_HANDLER = "AggregationHandler" UNSUPPORTED_HANDLER = "UnsupportedHandler" @@ -56,7 +56,7 @@ def threshold_handler(key, aggregated_df, thresholds): aggregated_df[f"{metric_name}_TH_RAISE"] = aggregated_df[metric_name] > raise_th aggregated_df[f"{metric_name}_TH_FALL"] = aggregated_df[metric_name] < fail_th else: - logger.warning(f"Threshold values for '{metric_name}' ({threshold_values}) are not a tuple of length 2. Skipping threshold application.") + logger.warning(f"Threshold values for '{metric_name}' ({threshold_values}) are not a list of length 2. Skipping threshold application.") return aggregated_df def aggregation_handler( @@ -79,6 +79,10 @@ def aggregation_handler( # Filter the DataFrame to retain rows where kpi_id is in the input list (subscribed endpoints only) df = df[df['kpi_id'].isin(input_kpi_list)].copy() + if df.empty: + logger.warning(f"No data available for KPIs: {input_kpi_list}. Skipping processing.") + return [] + # Define all possible aggregation methods aggregation_methods = { "min" : ('kpi_value', 'min'), @@ -108,7 +112,6 @@ def aggregation_handler( selected_methods = {method: aggregation_methods[method] for method in valid_task_parameters} # logger.info(f"2. Processing KPI: {kpi_id} with task parameters: {kpi_task_parameters}") - kpi_df = df[df['kpi_id'] == kpi_id] # Check if kpi_df is not empty before applying the aggregation methods @@ -119,9 +122,6 @@ def aggregation_handler( agg_df['kpi_id'] = output_kpi_list[kpi_index] - # if agg_df.empty: - # logger.warning(f"No data available for KPI: {kpi_id}. Skipping threshold application.") - # continue # logger.info(f"4. Applying thresholds for df: {agg_df['kpi_id']}") result = threshold_handler(key, agg_df, kpi_task_parameters) @@ -129,3 +129,4 @@ def aggregation_handler( else: logger.warning(f"No data available for KPIs: {kpi_id}. Skipping aggregation.") continue + return [] diff --git a/src/analytics/backend/service/AnalyzerHelper.py b/src/analytics/backend/service/AnalyzerHelper.py index 26d6e5fb9..15dde6e62 100644 --- a/src/analytics/backend/service/AnalyzerHelper.py +++ b/src/analytics/backend/service/AnalyzerHelper.py @@ -15,12 +15,11 @@ from dask.distributed import Client, LocalCluster from common.tools.kafka.Variables import KafkaConfig, KafkaTopic -from confluent_kafka import Consumer, Producer, KafkaException, KafkaError +from confluent_kafka import Consumer, Producer import logging -logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) -logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(funcName)s - %(levelname)s - %(message)s') +logging.basicConfig(level=logging.INFO, format=' %(levelname)s - %(message)s') class AnalyzerHelper: @@ -28,15 +27,24 @@ class AnalyzerHelper: pass @staticmethod - def initialize_dask_client(n_workers=1, threads_per_worker=1): - """Initialize a local Dask cluster and client.""" - cluster = LocalCluster(n_workers=n_workers, threads_per_worker=threads_per_worker) - client = Client(cluster) + def initialize_dask_client(cluster_instance): + """Initialize a local Dask client.""" + if cluster_instance is None: + logger.error("Dask Cluster is not initialized. Exiting.") + return None + client = Client(cluster_instance) logger.info(f"Dask Client Initialized: {client}") - return client, cluster + return client + + @staticmethod + def initialize_dask_cluster(n_workers=1, threads_per_worker=2): + """Initialize a local Dask cluster""" + cluster = LocalCluster(n_workers=n_workers, threads_per_worker=threads_per_worker) + logger.info(f"Dask Cluster Initialized: {cluster}") + return cluster @staticmethod - def initialize_kafka_consumer(): + def initialize_kafka_consumer(): # TODO: update to receive topic and group_id as parameters """Initialize the Kafka consumer.""" consumer_conf = { 'bootstrap.servers': KafkaConfig.get_kafka_address(), diff --git a/src/analytics/backend/service/Streamer.py b/src/analytics/backend/service/Streamer.py index 35d35b36e..54ca70f5f 100644 --- a/src/analytics/backend/service/Streamer.py +++ b/src/analytics/backend/service/Streamer.py @@ -12,22 +12,28 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging import time import json -from confluent_kafka import KafkaException, KafkaError -from common.tools.kafka.Variables import KafkaTopic -from .AnalyzerHandlers import AnalyzerHandlers, aggregation_handler -from .AnalyzerHelper import AnalyzerHelper import threading +import logging + +from confluent_kafka import KafkaException, KafkaError +from common.tools.kafka.Variables import KafkaTopic +from analytics.backend.service.AnalyzerHandlers import Handlers, aggregation_handler +from analytics.backend.service.AnalyzerHelper import AnalyzerHelper + logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO, format=' %(levelname)s - %(message)s') class DaskStreamer(threading.Thread): - def __init__(self, key, input_kpis, output_kpis, thresholds, batch_size=5, - window_size=None, n_workers=1, threads_per_worker=1): + def __init__(self, key, input_kpis, output_kpis, thresholds, + batch_size = 5, + window_size = None, + cluster_instance = None, + producer_instance = AnalyzerHelper.initialize_kafka_producer() + ): super().__init__() self.key = key self.input_kpis = input_kpis @@ -35,15 +41,14 @@ class DaskStreamer(threading.Thread): self.thresholds = thresholds self.window_size = window_size self.batch_size = batch_size - self.n_workers = n_workers - self.threads_per_worker = threads_per_worker self.running = True self.batch = [] # Initialize Kafka and Dask components - self.client, self.cluster = AnalyzerHelper.initialize_dask_client(n_workers, threads_per_worker) - self.consumer = AnalyzerHelper.initialize_kafka_consumer() - self.producer = AnalyzerHelper.initialize_kafka_producer() + self.client = AnalyzerHelper.initialize_dask_client(cluster_instance) + self.consumer = AnalyzerHelper.initialize_kafka_consumer() # Single-threaded consumer + self.producer = producer_instance + logger.info("Dask Streamer initialized.") def run(self): @@ -56,9 +61,12 @@ class DaskStreamer(threading.Thread): logger.warning("Kafka consumer is not initialized or stopped. Exiting loop.") break if not self.running: - logger.warning("Dask Streamer is not running. Exiting loop.") + logger.warning("Dask Streamer instance has been terminated. Exiting loop.") + break + if not self.client: + logger.warning("Dask client is not running. Exiting loop.") break - message = self.consumer.poll(timeout=2.0) # Poll for new messages after 2 sceonds + message = self.consumer.poll(timeout=2.0) if message is None: # logger.info("No new messages received.") continue @@ -74,11 +82,10 @@ class DaskStreamer(threading.Thread): logger.error(f"Failed to decode message: {message.value()}") continue self.batch.append(value) - # logger.info(f"Received message: {value}") - # Window size has a priority over batch size + # Window size has a precedence over batch size if self.window_size is None: - if len(self.batch) >= self.batch_size: # If batch size is not provided, process continue with default batch size + if len(self.batch) >= self.batch_size: # If batch size is not provided, process continue with the default batch size logger.info(f"Processing based on batch size {self.batch_size}.") self.task_handler_selector() self.batch = [] @@ -94,15 +101,20 @@ class DaskStreamer(threading.Thread): except Exception as e: logger.exception(f"Error in Dask streaming process: {e}") finally: + self.stop() logger.info(">>> Exiting Dask Streamer...") def task_handler_selector(self): """Select the task handler based on the task type.""" - if AnalyzerHandlers.is_valid_handler(self.thresholds["task_type"]): - if self.client.status == 'running': - future = self.client.submit(aggregation_handler, "batch size", self.key, - self.batch, self.input_kpis, self.output_kpis, self.thresholds) - future.add_done_callback(lambda fut: self.produce_result(fut.result(), KafkaTopic.ALARMS.value)) + logger.info(f"Batch to be processed: {self.batch}") + if Handlers.is_valid_handler(self.thresholds["task_type"]): + if self.client is not None and self.client.status == 'running': + try: + future = self.client.submit(aggregation_handler, "batch size", self.key, + self.batch, self.input_kpis, self.output_kpis, self.thresholds) + future.add_done_callback(lambda fut: self.produce_result(fut.result(), KafkaTopic.ALARMS.value)) + except Exception as e: + logger.error(f"Failed to submit task to Dask client or unable to process future. See error for detail: {e}") else: logger.warning("Dask client is not running. Skipping processing.") else: @@ -110,6 +122,9 @@ class DaskStreamer(threading.Thread): def produce_result(self, result, destination_topic): """Produce results to the Kafka topic.""" + if not result: + logger.warning("Nothing to produce. Skipping.") + return for record in result: try: self.producer.produce( @@ -124,9 +139,13 @@ class DaskStreamer(threading.Thread): logger.info(f"Produced {len(result)} aggregated records to '{destination_topic}'.") def stop(self): - """Clean up Kafka and Dask resources.""" - logger.info("Shutting down resources...") + """Clean up Kafka and Dask thread resources.""" + if not self.running: + logger.info("Dask Streamer is already stopped.") + return self.running = False + logger.info("Streamer running status is set to False. Waiting 5 seconds before stopping...") + time.sleep(5) # Waiting time for running tasks to complete if self.consumer: try: self.consumer.close() @@ -134,13 +153,6 @@ class DaskStreamer(threading.Thread): except Exception as e: logger.error(f"Error closing Kafka consumer: {e}") - if self.producer: - try: - self.producer.flush() - logger.info("Kafka producer flushed and closed.") - except Exception as e: - logger.error(f"Error closing Kafka producer: {e}") - if self.client is not None and hasattr(self.client, 'status') and self.client.status == 'running': try: self.client.close() @@ -148,11 +160,4 @@ class DaskStreamer(threading.Thread): except Exception as e: logger.error(f"Error closing Dask client: {e}") - if self.cluster is not None and hasattr(self.cluster, 'close'): - try: - self.cluster.close(timeout=5) - logger.info("Dask cluster closed.") - except Exception as e: - logger.error(f"Timeout error while closing Dask cluster: {e}") - - +# TODO: May be Single streamer for all analyzers ... ? diff --git a/src/analytics/backend/tests/messages_analyzer.py b/src/analytics/backend/tests/messages_analyzer.py index 6a303d474..4a119d948 100644 --- a/src/analytics/backend/tests/messages_analyzer.py +++ b/src/analytics/backend/tests/messages_analyzer.py @@ -13,7 +13,7 @@ # limitations under the License. import pandas as pd -from analytics.backend.service.AnalyzerHandlers import AnalyzerHandlers +from analytics.backend.service.AnalyzerHandlers import Handlers def get_input_kpi_list(): return ["1e22f180-ba28-4641-b190-2287bf446666", "6e22f180-ba28-4641-b190-2287bf448888", 'kpi_3'] @@ -23,16 +23,16 @@ def get_output_kpi_list(): def get_thresholds(): return { - "task_type": AnalyzerHandlers.AGGREGATION_HANDLER.value, + "task_type": Handlers.AGGREGATION_HANDLER.value, "task_parameter": [ - {"last": (40, 80), "variance": (300, 500)}, - {"count": (2, 4), "max": (70, 100)}, - {"min": (10, 20), "avg": (50, 70)}, + {"last": [40, 80], "variance": [300, 500]}, + {"count": [2, 4], "max": [70, 100]}, + {"min": [10, 20], "avg": [50, 70]}, ], } def get_duration(): - return 60 + return 40 def get_windows_size(): return None diff --git a/src/analytics/backend/tests/test_backend.py b/src/analytics/backend/tests/test_backend.py index 09be90e4c..3be34ee9f 100644 --- a/src/analytics/backend/tests/test_backend.py +++ b/src/analytics/backend/tests/test_backend.py @@ -13,107 +13,177 @@ # limitations under the License. import time +import json import pytest import logging import pandas as pd -from unittest.mock import MagicMock, patch -from common.tools.kafka.Variables import KafkaTopic -from analytics.backend.service.Streamer import DaskStreamer + +from unittest.mock import MagicMock, patch from .messages_analyzer import get_batch, get_input_kpi_list, get_output_kpi_list, get_thresholds, \ - get_windows_size, get_batch_size, get_agg_df -from analytics.backend.service.AnalyzerHandlers import aggregation_handler, threshold_handler + get_windows_size, get_batch_size, get_agg_df, get_duration + +from common.tools.kafka.Variables import KafkaTopic +from analytics.backend.service.Streamer import DaskStreamer +from analytics.backend.service.AnalyzerHandlers import aggregation_handler, threshold_handler from analytics.backend.service.AnalyticsBackendService import AnalyticsBackendService + logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(funcName)s - %(levelname)s - %(message)s') +# ---- +# Test fixtures and helper functions +# ---- + @pytest.fixture(autouse=True) def log_all_methods(request): ''' This fixture logs messages before and after each test function runs, indicating the start and end of the test. The autouse=True parameter ensures that this logging happens automatically for all tests in the module. ''' - logger.info(f" >>> Starting test: {request.node.name} >>> ") + logger.info(f" >>>>> Starting test: {request.node.name} ") yield - logger.info(f" <<< Finished test: {request.node.name} <<< ") + logger.info(f" <<<<< Finished test: {request.node.name} ") +@pytest.fixture +def mock_kafka_producer(): + mock_producer = MagicMock() + mock_producer.produce = MagicMock() + mock_producer.flush = MagicMock() + return mock_producer -# --- "test_validate_kafka_topics" should be run before the functionality tests --- -def test_validate_kafka_topics(): - logger.debug(" >>> test_validate_kafka_topics: START <<< ") - response = KafkaTopic.create_all_topics() - assert isinstance(response, bool) +@pytest.fixture +def mock_dask_cluster(): + mock_cluster = MagicMock() + mock_cluster.close = MagicMock() + return mock_cluster + +@pytest.fixture +def mock_dask_client(): + mock_client = MagicMock() + mock_client.status = 'running' + mock_client.submit = MagicMock() + return mock_client + +@pytest.fixture() +def mock_kafka_consumer(): + mock_consumer = MagicMock() + mock_consumer.subscribe = MagicMock() + return mock_consumer + +@pytest.fixture() +def mock_streamer_start(): + mock_streamer = MagicMock() + mock_streamer.start = MagicMock() + return mock_streamer ########################### -# integration test of Streamer with backend service +# funtionality pytest cases with specific fixtures for AnalyticsBackendService class sub-methods ########################### -def test_backend_integration_with_analyzer(): - backendServiceObject = AnalyticsBackendService() - backendServiceObject.install_servicers() - logger.info(" waiting for 2 minutes for the backend service before termination ... ") - time.sleep(120) - backendServiceObject.StopStreamer("efef4d95-1cf1-43c4-9742-95c283ddd666") - logger.info(" Backend service terminated successfully ... ") +@pytest.fixture +def analytics_service(mock_kafka_producer, mock_dask_cluster, mock_dask_client, mock_kafka_consumer, mock_streamer_start): + with patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_kafka_producer', return_value = mock_kafka_producer), \ + patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_dask_cluster', return_value = mock_dask_cluster ), \ + patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_dask_client', return_value = mock_dask_client ), \ + patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_kafka_consumer', return_value = mock_kafka_consumer), \ + patch('analytics.backend.service.Streamer.DaskStreamer.run', return_value = mock_streamer_start): + + service = AnalyticsBackendService() + yield service + service.close() + +@pytest.fixture +def analyzer_data(): + return { + 'algo_name' : 'test_algorithm', + 'oper_mode' : 'test_mode', + 'input_kpis' : ['kpi1', 'kpi2'], + 'output_kpis': ['kpi3'], + 'thresholds' : {'kpi1': 0.5}, + 'batch_size' : 10, + 'window_size': 5, + 'duration' : 20, + } + +def test_start_streamer(analytics_service, analyzer_data): + analyzer_uuid = "test-analyzer-uuid" + # Start streamer + result = analytics_service.StartStreamer(analyzer_uuid, analyzer_data) + assert result is True + assert analyzer_uuid in analytics_service.active_streamers + +def test_stop_streamer(analytics_service, analyzer_data): + analyzer_uuid = "test-analyzer-uuid" + + # Start streamer for stopping it later + analytics_service.StartStreamer(analyzer_uuid, analyzer_data) + assert analyzer_uuid in analytics_service.active_streamers + # Stop streamer + result = analytics_service.StopStreamer(analyzer_uuid) + assert result is True + assert analyzer_uuid not in analytics_service.active_streamers + + # Verify that the streamer was stopped + assert analyzer_uuid not in analytics_service.active_streamers + +def test_close(analytics_service, mock_kafka_producer, mock_dask_cluster): + analytics_service.close() + + mock_kafka_producer.flush.assert_called_once() + mock_dask_cluster.close.assert_called_once() ########################### -# funtionality pytest for analyzer sub methods +# funtionality pytest with specific fixtures for streamer class sub methods ########################### @pytest.fixture -def dask_streamer(): - with patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_dask_client') as mock_dask_client, \ - patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_kafka_consumer') as mock_kafka_consumer, \ - patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_kafka_producer') as mock_kafka_producer: - - mock_dask_client.return_value = (MagicMock(), MagicMock()) - mock_kafka_consumer.return_value = MagicMock() - mock_kafka_producer.return_value = MagicMock() +def dask_streamer(mock_kafka_producer, mock_dask_cluster, mock_dask_client, mock_kafka_consumer): + with patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_kafka_producer', return_value = mock_kafka_producer), \ + patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_dask_cluster', return_value = mock_dask_cluster ), \ + patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_dask_client', return_value = mock_dask_client ), \ + patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_kafka_consumer', return_value = mock_kafka_consumer): return DaskStreamer( - key="test_key", - input_kpis=get_input_kpi_list(), - output_kpis=get_output_kpi_list(), - thresholds=get_thresholds(), - batch_size=get_batch_size(), - window_size=get_windows_size(), - n_workers=3, - threads_per_worker=1 + key = "test_key", + input_kpis = get_input_kpi_list(), + output_kpis = get_output_kpi_list(), + thresholds = get_thresholds(), + batch_size = get_batch_size(), + window_size = get_windows_size(), + cluster_instance = mock_dask_cluster(), + producer_instance = mock_kafka_producer(), ) -def test_initialization(dask_streamer): +def test_dask_streamer_initialization(dask_streamer): """Test if the DaskStreamer initializes correctly.""" - assert dask_streamer.key == "test_key" - assert dask_streamer.batch_size == get_batch_size() + assert dask_streamer.key == "test_key" + assert dask_streamer.batch_size == get_batch_size() assert dask_streamer.window_size is None - assert dask_streamer.n_workers == 3 - assert dask_streamer.consumer is not None - assert dask_streamer.producer is not None - assert dask_streamer.client is not None - assert dask_streamer.cluster is not None - + assert dask_streamer.consumer is not None + assert dask_streamer.producer is not None + assert dask_streamer.client is not None def test_run_stops_on_no_consumer(dask_streamer): """Test if the run method exits when the consumer is not initialized.""" dask_streamer.consumer = None with patch('time.sleep', return_value=None): dask_streamer.run() + assert not dask_streamer.running -def test_task_handler_selector_valid_handler(dask_streamer): +def test_task_handler_selector_valid_handler(dask_streamer, mock_dask_client): """Test task handler selection with a valid handler.""" - with patch('analytics.backend.service.AnalyzerHandlers.AnalyzerHandlers.is_valid_handler', return_value=True), \ - patch.object(dask_streamer.client, 'submit', return_value=MagicMock()) as mock_submit, \ - patch.object(dask_streamer.client, 'status', 'running'): + with patch('analytics.backend.service.AnalyzerHelper.AnalyzerHelper.initialize_dask_client', return_value = mock_dask_client): dask_streamer.task_handler_selector() - mock_submit.assert_called_once() + assert dask_streamer.client.status == 'running' def test_task_handler_selector_invalid_handler(dask_streamer): """Test task handler selection with an invalid handler.""" - with patch('analytics.backend.service.AnalyzerHandlers.AnalyzerHandlers.is_valid_handler', return_value=False): + with patch('analytics.backend.service.AnalyzerHandlers.Handlers.is_valid_handler', return_value=False): dask_streamer.task_handler_selector() assert dask_streamer.batch == [] @@ -126,31 +196,27 @@ def test_produce_result(dask_streamer): mock_produce.assert_called_once_with( "test_topic", key="kpi1", - value='{"kpi_id": "kpi1", "value": 100}', + value=json.dumps({"kpi_id": "kpi1", "value": 100}), callback=mock_delivery_report ) -def test_cleanup(dask_streamer): +def test_stop(dask_streamer): """Test the cleanup method.""" - with patch.object(dask_streamer.consumer, 'close') as mock_consumer_close, \ - patch.object(dask_streamer.producer, 'flush') as mock_producer_flush, \ - patch.object(dask_streamer.client, 'close') as mock_client_close, \ - patch.object(dask_streamer.cluster, 'close', MagicMock()) as mock_cluster_close: + with patch.object(dask_streamer.consumer, 'close') as mock_consumer_close, \ + patch.object(dask_streamer.client, 'close') as mock_client_close, \ + patch('time.sleep', return_value=0): # Mock the conditions required for the close calls dask_streamer.client.status = 'running' - dask_streamer.cluster.close = MagicMock() - dask_streamer.cleanup() + dask_streamer.stop() mock_consumer_close.assert_called_once() - mock_producer_flush.assert_called_once() mock_client_close.assert_called_once() - dask_streamer.cluster.close.assert_called_once() def test_run_with_valid_consumer(dask_streamer): """Test the run method with a valid Kafka consumer.""" - with patch.object(dask_streamer.consumer, 'poll') as mock_poll, \ + with patch.object(dask_streamer.consumer, 'poll') as mock_poll, \ patch.object(dask_streamer, 'task_handler_selector') as mock_task_handler_selector: # Simulate valid messages without errors @@ -167,33 +233,29 @@ def test_run_with_valid_consumer(dask_streamer): # Run the `run` method in a limited loop with patch('time.sleep', return_value=None): # Mock `sleep` to avoid delays - dask_streamer.running = True # Ensure the streamer runs - dask_streamer.batch_size = 2 # Set a small batch size for the test + dask_streamer.running = True + dask_streamer.batch_size = 2 # Limit the loop by breaking it after one full processing cycle - def stop_running_after_task_handler(*args, **kwargs): + def stop_running_after_task_handler(): logger.info("Stopping the streamer after processing the first batch.") dask_streamer.running = False mock_task_handler_selector.side_effect = stop_running_after_task_handler - - # Execute the method dask_streamer.run() - # Assertions assert len(dask_streamer.batch) == 0 # Batch should be cleared after processing mock_task_handler_selector.assert_called_once() # Task handler should be called once - mock_poll.assert_any_call(timeout=2.0) # Poll should have been called - + mock_poll.assert_any_call(timeout=2.0) # Poll should have been called at least once -# add a test to check the working of aggregation_handler function and threshold_handler from AnalyzerHandlers.py +# # add a test to check the working of aggregation_handler function and threshold_handler from AnalyzerHandlers.py def test_aggregation_handler(): # Create a sample batch - batch = get_batch() - input_kpi_list = get_input_kpi_list() + batch = get_batch() + input_kpi_list = get_input_kpi_list() output_kpi_list = get_output_kpi_list() - thresholds = get_thresholds() + thresholds = get_thresholds() # Test aggregation_handler aggregated_df = aggregation_handler( @@ -202,13 +264,38 @@ def test_aggregation_handler(): assert isinstance(aggregated_df, list) assert all(isinstance(item, dict) for item in aggregated_df) -# Test threshold_handler +# # Test threshold_handler def test_threshold_handler(): # Create a sample aggregated DataFrame - agg_df = get_agg_df() + agg_df = get_agg_df() thresholds = get_thresholds() # Test threshold_handler result = threshold_handler("test_key", agg_df, thresholds["task_parameter"][0]) + assert isinstance(result, pd.DataFrame) assert result.shape == (1, 7) + + +########################### +# integration test of Streamer with backend service (Shouldn't be run in the CI/CD pipeline) +########################### +# This is a local machine test to check the integration of the backend service with the Streamer + +# --- "test_validate_kafka_topics" should be run before the functionality tests --- +# def test_validate_kafka_topics(): +# logger.debug(" >>> test_validate_kafka_topics: START <<< ") +# response = KafkaTopic.create_all_topics() +# assert isinstance(response, bool) + +# def test_backend_integration_with_analyzer(): +# backendServiceObject = AnalyticsBackendService() +# backendServiceObject.install_servicers() +# logger.info(" waiting for 2 minutes for the backend service before termination ... ") +# time.sleep(150) +# logger.info(" Initiating stop collector ... ") +# status = backendServiceObject.StopStreamer("efef4d95-1cf1-43c4-9742-95c283ddd666") +# backendServiceObject.close() +# assert isinstance(status, bool) +# assert status == True +# logger.info(" Backend service terminated successfully ... ") -- GitLab From cfa1829bbc7a6a70675896af567145c50f2f1817 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Fri, 17 Jan 2025 15:01:09 +0000 Subject: [PATCH 184/463] Updated Analyatics Backend tests --- src/analytics/backend/tests/test_backend.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/analytics/backend/tests/test_backend.py b/src/analytics/backend/tests/test_backend.py index 3be34ee9f..91d53000d 100644 --- a/src/analytics/backend/tests/test_backend.py +++ b/src/analytics/backend/tests/test_backend.py @@ -99,12 +99,12 @@ def analyzer_data(): return { 'algo_name' : 'test_algorithm', 'oper_mode' : 'test_mode', - 'input_kpis' : ['kpi1', 'kpi2'], - 'output_kpis': ['kpi3'], - 'thresholds' : {'kpi1': 0.5}, - 'batch_size' : 10, - 'window_size': 5, - 'duration' : 20, + 'input_kpis' : get_input_kpi_list(), + 'output_kpis': get_output_kpi_list(), + 'thresholds' : get_thresholds(), + 'batch_size' : get_batch_size(), + 'window_size': get_windows_size(), + 'duration' : get_duration(), } def test_start_streamer(analytics_service, analyzer_data): -- GitLab From 13e67200d946bd3b623063342d5189bb08e98536 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 17 Jan 2025 15:24:04 +0000 Subject: [PATCH 185/463] Telemetry backend component: - Renamed Driver to Collector --- .../_Collector.py} | 30 ++++---- .../{driver_api => collector_api}/__init__.py | 0 .../{drivers => collectors}/__init__.py | 0 .../emulated/EmulatedCollector.py} | 20 +++--- .../emulated/EmulatedHelper.py | 6 +- .../emulated/SyntheticMetricsGenerator.py | 0 .../emulated/__init__.py | 0 src/telemetry/backend/tests/test_emulated.py | 72 +++++++++---------- 8 files changed, 64 insertions(+), 64 deletions(-) rename src/telemetry/backend/{driver_api/_Driver.py => collector_api/_Collector.py} (91%) rename src/telemetry/backend/{driver_api => collector_api}/__init__.py (100%) rename src/telemetry/backend/{drivers => collectors}/__init__.py (100%) rename src/telemetry/backend/{drivers/emulated/EmulatedDriver.py => collectors/emulated/EmulatedCollector.py} (96%) rename src/telemetry/backend/{drivers => collectors}/emulated/EmulatedHelper.py (98%) rename src/telemetry/backend/{drivers => collectors}/emulated/SyntheticMetricsGenerator.py (100%) rename src/telemetry/backend/{drivers => collectors}/emulated/__init__.py (100%) diff --git a/src/telemetry/backend/driver_api/_Driver.py b/src/telemetry/backend/collector_api/_Collector.py similarity index 91% rename from src/telemetry/backend/driver_api/_Driver.py rename to src/telemetry/backend/collector_api/_Collector.py index 9612952fe..7f464f17f 100644 --- a/src/telemetry/backend/driver_api/_Driver.py +++ b/src/telemetry/backend/collector_api/_Collector.py @@ -15,7 +15,7 @@ import threading from typing import Any, Iterator, List, Optional, Tuple, Union -# Special resource names to request to the driver to retrieve the specified +# Special resource names to request to the collector to retrieve the specified # configuration/structural resources. # These resource names should be used with GetConfig() method. RESOURCE_ENDPOINTS = '__endpoints__' @@ -27,16 +27,16 @@ RESOURCE_ACL = '__acl__' RESOURCE_INVENTORY = '__inventory__' -class _Driver: +class _Collector: def __init__(self, name : str, address: str, port: int, **settings) -> None: - """ Initialize Driver. + """ Initialize Collector. Parameters: address : str The address of the device port : int The port of the device **settings - Extra settings required by the driver. + Extra settings required by the collector. """ self._name = name self._address = address @@ -139,7 +139,7 @@ class _Driver: List[Union[bool, Exception]]: """ Subscribe to state information of entire device or selected resources. Subscriptions are incremental. - Driver should keep track of requested resources. + Collector should keep track of requested resources. Parameters: subscriptions : List[Tuple[str, float, float]] List of tuples, each containing a resource_key pointing the @@ -162,7 +162,7 @@ class _Driver: -> List[Union[bool, Exception]]: """ Unsubscribe from state information of entire device or selected resources. Subscriptions are incremental. - Driver should keep track of requested resources. + Collector should keep track of requested resources. Parameters: subscriptions : List[str] List of tuples, each containing a resource_key pointing the @@ -188,37 +188,37 @@ class _Driver: Operates as a generator, so this method should be called once and will block until values are available. When values are available, it should yield each of them and block again until new values are - available. When the driver is destroyed, GetState() can return instead + available. When the collector is destroyed, GetState() can return instead of yield to terminate the loop. Terminate enables to request interruption of the generation. Examples: # keep looping waiting for extra samples (generator loop) terminate = threading.Event() i = 0 - for timestamp,resource_key,resource_value in my_driver.GetState(blocking=True, terminate=terminate): + for timestamp,resource_key,resource_value in my_collector.GetState(blocking=True, terminate=terminate): process(timestamp, resource_key, resource_value) i += 1 if i == 10: terminate.set() # just retrieve accumulated samples - samples = my_driver.GetState(blocking=False, terminate=terminate) + samples = my_collector.GetState(blocking=False, terminate=terminate) # or (as classical loop) i = 0 - for timestamp,resource_key,resource_value in my_driver.GetState(blocking=False, terminate=terminate): + for timestamp,resource_key,resource_value in my_collector.GetState(blocking=False, terminate=terminate): process(timestamp, resource_key, resource_value) i += 1 if i == 10: terminate.set() Parameters: blocking : bool - Select the driver behaviour. In both cases, the driver will + Select the collector behaviour. In both cases, the collector will first retrieve the samples accumulated and available in the - internal queue. Then, if blocking, the driver does not + internal queue. Then, if blocking, the collector does not terminate the loop and waits for additional samples to come, - thus behaving as a generator. If non-blocking, the driver + thus behaving as a generator. If non-blocking, the collector terminates the loop and returns. Non-blocking behaviour can - be used for periodically polling the driver, while blocking + be used for periodically polling the collector, while blocking can be used when a separate thread is in charge of - collecting the samples produced by the driver. + collecting the samples produced by the collector. terminate : threading.Event Signals the interruption of the GetState method as soon as possible. diff --git a/src/telemetry/backend/driver_api/__init__.py b/src/telemetry/backend/collector_api/__init__.py similarity index 100% rename from src/telemetry/backend/driver_api/__init__.py rename to src/telemetry/backend/collector_api/__init__.py diff --git a/src/telemetry/backend/drivers/__init__.py b/src/telemetry/backend/collectors/__init__.py similarity index 100% rename from src/telemetry/backend/drivers/__init__.py rename to src/telemetry/backend/collectors/__init__.py diff --git a/src/telemetry/backend/drivers/emulated/EmulatedDriver.py b/src/telemetry/backend/collectors/emulated/EmulatedCollector.py similarity index 96% rename from src/telemetry/backend/drivers/emulated/EmulatedDriver.py rename to src/telemetry/backend/collectors/emulated/EmulatedCollector.py index 103753b03..4f69be670 100644 --- a/src/telemetry/backend/drivers/emulated/EmulatedDriver.py +++ b/src/telemetry/backend/collectors/emulated/EmulatedCollector.py @@ -17,8 +17,6 @@ import queue import logging import uuid import json -from telemetry.backend.drivers.emulated.EmulatedHelper import EmulatedDriverHelper -from telemetry.backend.driver_api._Driver import _Driver from anytree import Node, Resolver from apscheduler.events import EVENT_JOB_ADDED, EVENT_JOB_REMOVED from apscheduler.schedulers.background import BackgroundScheduler @@ -26,18 +24,20 @@ from apscheduler.jobstores.memory import MemoryJobStore from apscheduler.executors.pool import ThreadPoolExecutor from datetime import datetime, timedelta from typing import Any, Iterator, List, Tuple, Union, Optional +from telemetry.backend.collector_api._Collector import _Collector +from .EmulatedHelper import EmulatedCollectorHelper from .SyntheticMetricsGenerator import SyntheticMetricsGenerator logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') -class EmulatedDriver(_Driver): +class EmulatedCollector(_Collector): """ - EmulatedDriver is a class that simulates a network driver for testing purposes. + EmulatedCollector is a class that simulates a network collector for testing purposes. It provides functionalities to manage configurations, state subscriptions, and synthetic data generation. """ def __init__(self, address: str, port: int, **settings): - super().__init__('emulated_driver', address, port, **settings) + super().__init__('emulated_collector', address, port, **settings) self._initial_config = Node('root') # Tree structure for initial config self._running_config = Node('root') # Tree structure for running config self._subscriptions = Node('subscriptions') # Tree for state subscriptions @@ -52,11 +52,11 @@ class EmulatedDriver(_Driver): ) self._scheduler.add_listener(self._listener_job_added_to_subscription_tree, EVENT_JOB_ADDED) self._scheduler.add_listener(self._listener_job_removed_from_subscription_tree, EVENT_JOB_REMOVED) - self._helper_methods = EmulatedDriverHelper() + self._helper_methods = EmulatedCollectorHelper() self.logger = logging.getLogger(__name__) self.connected = False # To track connection state - self.logger.info("EmulatedDriver initialized") + self.logger.info("EmulatedCollector initialized") def Connect(self) -> bool: self.logger.info(f"Connecting to {self.address}:{self.port}") @@ -68,7 +68,7 @@ class EmulatedDriver(_Driver): def Disconnect(self) -> bool: self.logger.info(f"Disconnecting from {self.address}:{self.port}") if not self.connected: - self.logger.warning("Driver is not connected. Nothing to disconnect.") + self.logger.warning("Collector is not connected. Nothing to disconnect.") return False self._scheduler.shutdown() self.connected = False @@ -77,7 +77,7 @@ class EmulatedDriver(_Driver): def _require_connection(self): if not self.connected: - raise RuntimeError("Driver is not connected. Please connect before performing operations.") + raise RuntimeError("Collector is not connected. Please connect before performing operations.") def SubscribeState(self, subscriptions: List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: self._require_connection() @@ -219,7 +219,7 @@ class EmulatedDriver(_Driver): # ------- The below methods are kept for debugging purposes (test-case) only --------- #------------------------------------------------------------------------------------- -# This method can be commented but this will arise an error in the test-case (@pytest.fixture --> connected_configured_driver()). +# This method can be commented but this will arise an error in the test-case (@pytest.fixture --> connected_configured_collector()). def SetConfig(self, resources: dict) -> List[Union[bool, Exception]]: # For debugging purposes. self._require_connection() results = [] diff --git a/src/telemetry/backend/drivers/emulated/EmulatedHelper.py b/src/telemetry/backend/collectors/emulated/EmulatedHelper.py similarity index 98% rename from src/telemetry/backend/drivers/emulated/EmulatedHelper.py rename to src/telemetry/backend/collectors/emulated/EmulatedHelper.py index 008ad95d6..97191ed91 100644 --- a/src/telemetry/backend/drivers/emulated/EmulatedHelper.py +++ b/src/telemetry/backend/collectors/emulated/EmulatedHelper.py @@ -17,9 +17,9 @@ import json from typing import Any, List -class EmulatedDriverHelper: +class EmulatedCollectorHelper: """ - Helper class for the emulated driver. + Helper class for the emulated collector. """ def __init__(self): pass @@ -48,7 +48,7 @@ class EmulatedDriverHelper: # ------- Below function is kept for debugging purposes (test-cases) only ------------- #-------------------------------------------------------------------------------------- -# This below methods can be commented but are called by the SetConfig method in EmulatedDriver.py +# This below methods can be commented but are called by the SetConfig method in EmulatedCollector.py def _find_or_create_node(self, name: str, parent: Node) -> Node: """ diff --git a/src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py b/src/telemetry/backend/collectors/emulated/SyntheticMetricsGenerator.py similarity index 100% rename from src/telemetry/backend/drivers/emulated/SyntheticMetricsGenerator.py rename to src/telemetry/backend/collectors/emulated/SyntheticMetricsGenerator.py diff --git a/src/telemetry/backend/drivers/emulated/__init__.py b/src/telemetry/backend/collectors/emulated/__init__.py similarity index 100% rename from src/telemetry/backend/drivers/emulated/__init__.py rename to src/telemetry/backend/collectors/emulated/__init__.py diff --git a/src/telemetry/backend/tests/test_emulated.py b/src/telemetry/backend/tests/test_emulated.py index 316b98d83..749138bbe 100644 --- a/src/telemetry/backend/tests/test_emulated.py +++ b/src/telemetry/backend/tests/test_emulated.py @@ -15,7 +15,7 @@ import logging import time import pytest -from telemetry.backend.drivers.emulated.EmulatedDriver import EmulatedDriver +from telemetry.backend.collectors.emulated.EmulatedCollector import EmulatedCollector from telemetry.backend.tests.messages_emulated import ( create_test_configuration, create_specific_config_keys, @@ -27,82 +27,82 @@ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %( logger = logging.getLogger(__name__) @pytest.fixture -def setup_driver(): - """Sets up an EmulatedDriver instance for testing.""" - yield EmulatedDriver(address="127.0.0.1", port=8080) +def setup_collector(): + """Sets up an EmulatedCollector instance for testing.""" + yield EmulatedCollector(address="127.0.0.1", port=8080) @pytest.fixture -def connected_configured_driver(setup_driver): - driver = setup_driver # EmulatedDriver(address="127.0.0.1", port=8080) - driver.Connect() - driver.SetConfig(create_test_configuration()) - yield driver - driver.Disconnect() - -def test_connect(setup_driver): +def connected_configured_collector(setup_collector): + collector = setup_collector # EmulatedCollector(address="127.0.0.1", port=8080) + collector.Connect() + collector.SetConfig(create_test_configuration()) + yield collector + collector.Disconnect() + +def test_connect(setup_collector): logger.info(">>> test_connect <<<") - driver = setup_driver - assert driver.Connect() is True - assert driver.connected is True + collector = setup_collector + assert collector.Connect() is True + assert collector.connected is True -def test_disconnect(setup_driver): +def test_disconnect(setup_collector): logger.info(">>> test_disconnect <<<") - driver = setup_driver - driver.Connect() - assert driver.Disconnect() is True - assert driver.connected is False + collector = setup_collector + collector.Connect() + assert collector.Disconnect() is True + assert collector.connected is False -# def test_set_config(setup_driver): +# def test_set_config(setup_collector): # logger.info(">>> test_set_config <<<") -# driver = setup_driver -# driver.Connect() +# collector = setup_collector +# collector.Connect() # config = create_test_configuration() -# results = driver.SetConfig(config) +# results = collector.SetConfig(config) # assert all(result is True for result in results) -# def test_get_config(connected_configured_driver): +# def test_get_config(connected_configured_collector): # logger.info(">>> test_get_config <<<") # resource_keys = create_specific_config_keys() -# results = connected_configured_driver.GetConfig(resource_keys) +# results = connected_configured_collector.GetConfig(resource_keys) # for key, value in results: # assert key in create_specific_config_keys() # assert value is not None -# def test_delete_config(connected_configured_driver): +# def test_delete_config(connected_configured_collector): # logger.info(">>> test_delete_config <<<") # resource_keys = create_config_for_delete() -# results = connected_configured_driver.DeleteConfig(resource_keys) +# results = connected_configured_collector.DeleteConfig(resource_keys) # assert all(result is True for result in results) -def test_subscribe_state(connected_configured_driver): +def test_subscribe_state(connected_configured_collector): logger.info(">>> test_subscribe_state <<<") subscriptions = create_test_subscriptions() - results = connected_configured_driver.SubscribeState(subscriptions) + results = connected_configured_collector.SubscribeState(subscriptions) # logger.info(f"Subscribed result: {results}.") assert results == [False, True, True] # all(result is True for result in results) -def test_unsubscribe_state(connected_configured_driver): +def test_unsubscribe_state(connected_configured_collector): logger.info(">>> test_unsubscribe_state <<<") subscriptions = create_test_subscriptions() - connected_configured_driver.SubscribeState(subscriptions) - results = connected_configured_driver.UnsubscribeState(subscriptions) + connected_configured_collector.SubscribeState(subscriptions) + results = connected_configured_collector.UnsubscribeState(subscriptions) assert results == [False, True, True] # all(result is True for result in results) -def test_get_state(connected_configured_driver): +def test_get_state(connected_configured_collector): logger.info(">>> test_get_state <<<") subscriptions = create_test_subscriptions() - connected_configured_driver.SubscribeState(subscriptions) + connected_configured_collector.SubscribeState(subscriptions) logger.info(f"Subscribed to state: {subscriptions}. waiting for 12 seconds ...") time.sleep(12) - state_iterator = connected_configured_driver.GetState(blocking=False) + state_iterator = connected_configured_collector.GetState(blocking=False) states = list(state_iterator) assert len(states) > 0 -- GitLab From 98d4a421ce948ffb8c7eedd341746bc558594bb2 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 17 Jan 2025 15:26:25 +0000 Subject: [PATCH 186/463] Telemetry backend component - Emulated collector: - Cleanup --- src/telemetry/backend/collectors/emulated/EmulatedCollector.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/telemetry/backend/collectors/emulated/EmulatedCollector.py b/src/telemetry/backend/collectors/emulated/EmulatedCollector.py index 4f69be670..10748c281 100644 --- a/src/telemetry/backend/collectors/emulated/EmulatedCollector.py +++ b/src/telemetry/backend/collectors/emulated/EmulatedCollector.py @@ -29,8 +29,6 @@ from .EmulatedHelper import EmulatedCollectorHelper from .SyntheticMetricsGenerator import SyntheticMetricsGenerator -logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') - class EmulatedCollector(_Collector): """ EmulatedCollector is a class that simulates a network collector for testing purposes. -- GitLab From 2151a04e74bef13ed1b1f655f1cc4f719c040ada Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 17 Jan 2025 15:28:26 +0000 Subject: [PATCH 187/463] Telemetry backend component: - Correct License headers --- scripts/run_tests_locally-telemetry-emulated.sh | 2 +- src/telemetry/backend/collector_api/_Collector.py | 2 +- src/telemetry/backend/collector_api/__init__.py | 2 +- src/telemetry/backend/collectors/__init__.py | 2 +- src/telemetry/backend/collectors/emulated/EmulatedCollector.py | 2 +- src/telemetry/backend/collectors/emulated/EmulatedHelper.py | 2 +- .../backend/collectors/emulated/SyntheticMetricsGenerator.py | 2 +- src/telemetry/backend/collectors/emulated/__init__.py | 2 +- src/telemetry/backend/tests/messages_emulated.py | 2 +- src/telemetry/backend/tests/test_emulated.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/run_tests_locally-telemetry-emulated.sh b/scripts/run_tests_locally-telemetry-emulated.sh index 06d1ffd37..879b878c7 100755 --- a/scripts/run_tests_locally-telemetry-emulated.sh +++ b/scripts/run_tests_locally-telemetry-emulated.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/telemetry/backend/collector_api/_Collector.py b/src/telemetry/backend/collector_api/_Collector.py index 7f464f17f..ec4ba943c 100644 --- a/src/telemetry/backend/collector_api/_Collector.py +++ b/src/telemetry/backend/collector_api/_Collector.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/telemetry/backend/collector_api/__init__.py b/src/telemetry/backend/collector_api/__init__.py index bbfc943b6..023830645 100644 --- a/src/telemetry/backend/collector_api/__init__.py +++ b/src/telemetry/backend/collector_api/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/telemetry/backend/collectors/__init__.py b/src/telemetry/backend/collectors/__init__.py index bbfc943b6..023830645 100644 --- a/src/telemetry/backend/collectors/__init__.py +++ b/src/telemetry/backend/collectors/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/telemetry/backend/collectors/emulated/EmulatedCollector.py b/src/telemetry/backend/collectors/emulated/EmulatedCollector.py index 10748c281..90be01336 100644 --- a/src/telemetry/backend/collectors/emulated/EmulatedCollector.py +++ b/src/telemetry/backend/collectors/emulated/EmulatedCollector.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/telemetry/backend/collectors/emulated/EmulatedHelper.py b/src/telemetry/backend/collectors/emulated/EmulatedHelper.py index 97191ed91..ebfb7d49f 100644 --- a/src/telemetry/backend/collectors/emulated/EmulatedHelper.py +++ b/src/telemetry/backend/collectors/emulated/EmulatedHelper.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/telemetry/backend/collectors/emulated/SyntheticMetricsGenerator.py b/src/telemetry/backend/collectors/emulated/SyntheticMetricsGenerator.py index 1af542eb4..a01e2c0e6 100644 --- a/src/telemetry/backend/collectors/emulated/SyntheticMetricsGenerator.py +++ b/src/telemetry/backend/collectors/emulated/SyntheticMetricsGenerator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/telemetry/backend/collectors/emulated/__init__.py b/src/telemetry/backend/collectors/emulated/__init__.py index bbfc943b6..023830645 100644 --- a/src/telemetry/backend/collectors/emulated/__init__.py +++ b/src/telemetry/backend/collectors/emulated/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/telemetry/backend/tests/messages_emulated.py b/src/telemetry/backend/tests/messages_emulated.py index fa4ddba1b..e081fb3fe 100644 --- a/src/telemetry/backend/tests/messages_emulated.py +++ b/src/telemetry/backend/tests/messages_emulated.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/telemetry/backend/tests/test_emulated.py b/src/telemetry/backend/tests/test_emulated.py index 749138bbe..feb5b1f7f 100644 --- a/src/telemetry/backend/tests/test_emulated.py +++ b/src/telemetry/backend/tests/test_emulated.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -- GitLab From dcbc6c58ecd32e57fc1d621780618fa5d0dfc861 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 17 Jan 2025 15:33:04 +0000 Subject: [PATCH 188/463] Pre-merge code cleanup --- my_deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/my_deploy.sh b/my_deploy.sh index 409dc98f2..a048edb30 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -26,7 +26,7 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui" #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" # Uncomment to activate Monitoring Framework (new) -export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" +#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" # Uncomment to activate QoS Profiles #export TFS_COMPONENTS="${TFS_COMPONENTS} qos_profile" -- GitLab From 5d18e0086f7d260613ea9c03fc17c5f17bbf6fc5 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 17 Jan 2025 15:38:01 +0000 Subject: [PATCH 189/463] Pre-merge code cleanup --- src/analytics/backend/service/AnalyticsBackendService.py | 1 - src/analytics/backend/service/AnalyzerHandlers.py | 1 - src/analytics/backend/service/AnalyzerHelper.py | 1 - src/analytics/backend/service/Streamer.py | 1 - 4 files changed, 4 deletions(-) diff --git a/src/analytics/backend/service/AnalyticsBackendService.py b/src/analytics/backend/service/AnalyticsBackendService.py index 11ce1b377..92332df6f 100755 --- a/src/analytics/backend/service/AnalyticsBackendService.py +++ b/src/analytics/backend/service/AnalyticsBackendService.py @@ -28,7 +28,6 @@ from analytics.backend.service.AnalyzerHelper import AnalyzerHelper LOGGER = logging.getLogger(__name__) -logging.basicConfig(level=logging.INFO, format=' %(levelname)s - %(message)s') class AnalyticsBackendService(GenericGrpcService): """ diff --git a/src/analytics/backend/service/AnalyzerHandlers.py b/src/analytics/backend/service/AnalyzerHandlers.py index c8a9c838a..a05b1a0b7 100644 --- a/src/analytics/backend/service/AnalyzerHandlers.py +++ b/src/analytics/backend/service/AnalyzerHandlers.py @@ -17,7 +17,6 @@ from enum import Enum import pandas as pd logger = logging.getLogger(__name__) -logging.basicConfig(level=logging.INFO, format='%(levelname)s - %(message)s') class Handlers(Enum): diff --git a/src/analytics/backend/service/AnalyzerHelper.py b/src/analytics/backend/service/AnalyzerHelper.py index 15dde6e62..15a45aee6 100644 --- a/src/analytics/backend/service/AnalyzerHelper.py +++ b/src/analytics/backend/service/AnalyzerHelper.py @@ -19,7 +19,6 @@ from confluent_kafka import Consumer, Producer import logging logger = logging.getLogger(__name__) -logging.basicConfig(level=logging.INFO, format=' %(levelname)s - %(message)s') class AnalyzerHelper: diff --git a/src/analytics/backend/service/Streamer.py b/src/analytics/backend/service/Streamer.py index 54ca70f5f..c72359db2 100644 --- a/src/analytics/backend/service/Streamer.py +++ b/src/analytics/backend/service/Streamer.py @@ -24,7 +24,6 @@ from analytics.backend.service.AnalyzerHelper import AnalyzerHelper logger = logging.getLogger(__name__) -logging.basicConfig(level=logging.INFO, format=' %(levelname)s - %(message)s') class DaskStreamer(threading.Thread): -- GitLab From e33ba8b88dc992169546bae89b57089215d32d6b Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 17 Jan 2025 15:51:33 +0000 Subject: [PATCH 190/463] Telemetry backend component: - Added call to close() method - Fixed exception log messages in method close() --- .../backend/service/AnalyticsBackendService.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/analytics/backend/service/AnalyticsBackendService.py b/src/analytics/backend/service/AnalyticsBackendService.py index 92332df6f..f676b2c50 100755 --- a/src/analytics/backend/service/AnalyticsBackendService.py +++ b/src/analytics/backend/service/AnalyticsBackendService.py @@ -151,7 +151,7 @@ class AnalyticsBackendService(GenericGrpcService): LOGGER.error("Failed to stop Dask Streamer. ERROR: {:}".format(e)) return False - def close(self): # TODO: Is this function needed? + def close(self): """ Close the producer and cluster cleanly. """ @@ -159,11 +159,15 @@ class AnalyticsBackendService(GenericGrpcService): try: self.central_producer.flush() LOGGER.info("Kafka producer flushed and closed.") - except Exception as e: - LOGGER.error(f"Error closing Kafka producer: {e}") + except: + LOGGER.exception("Error closing Kafka producer") if self.cluster: try: self.cluster.close() LOGGER.info("Dask cluster closed.") - except Exception as e: - LOGGER.error(f"Error closing Dask cluster: {e}") + except: + LOGGER.exception("Error closing Dask cluster") + + def stop(self): + self.close() + return super().stop() -- GitLab From b9f7d6a1b906c3d3cba19775019080a4830c1ddc Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 18 Jan 2025 16:52:24 +0100 Subject: [PATCH 191/463] refactoring --- .../l3slice_ietfslice/ConfigRules.py | 302 ++++++------ .../L3SliceIETFSliceServiceHandler.py | 455 ++++++++++-------- .../l3slice_ietfslice/__init__.py | 2 +- 3 files changed, 420 insertions(+), 339 deletions(-) diff --git a/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py b/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py index 466c53fe4..173d4ba10 100644 --- a/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py +++ b/src/service/service/service_handlers/l3slice_ietfslice/ConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,8 +22,114 @@ from common.tools.object_factory.ConfigRule import ( from context.client.ContextClient import ContextClient +def build_match_criterion( + vlan: str, + src_ip: str, + src_port: str, + dst_ip: str, + dst_port: str, + target_conn_group_id: str = "line1", + index: int = 1, +) -> Dict: + """ + Build the match-criterion structure used in the 'service-match-criteria'. + """ + return { + "index": index, + "match-type": [ + {"type": "ietf-network-slice-service:vlan", "value": [vlan]}, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [src_ip], + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [src_port], + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [dst_ip], + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [dst_port], + }, + ], + "target-connection-group-id": target_conn_group_id, + } + + +def build_sdp( + sdp_id: str, + node_id: str, + mgmt_ip: str, + ac_node_id: str, + ac_ep_id: str, + match_criterion: Dict, + attachment_id: str = "0", + attachment_description: str = "dsc", +) -> Dict: + """ + Build the sdp structure used in the 'slice_service' dictionary. + """ + return { + "id": sdp_id, + "node-id": node_id, + "sdp-ip-address": [mgmt_ip], + "service-match-criteria": {"match-criterion": [match_criterion]}, + "attachment-circuits": { + "attachment-circuit": [ + { + "id": attachment_id, + "description": attachment_description, + "ac-node-id": ac_node_id, + "ac-tp-id": ac_ep_id, + } + ] + }, + } + + +def build_slo_policy_bound( + one_way_delay: int, one_way_bandwidth: int, one_way_packet_loss: float +) -> List[Dict]: + """ + Build the 'metric-bound' portion of the 'slo-policy' dictionary. + """ + return [ + { + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds", + "bound": one_way_delay, + }, + { + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps", + "bound": one_way_bandwidth, + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": one_way_packet_loss, + }, + ] + + +def _get_device_endpoint_name(device_obj, endpoint_uuid: str) -> str: + """ + Given a device object and an endpoint UUID, return the device endpoint name. + Raises an exception if not found. + """ + for d_ep in device_obj.device_endpoints: + if d_ep.endpoint_id.endpoint_uuid.uuid == endpoint_uuid: + return d_ep.name + raise Exception("Endpoint not found") + + def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: operation_type: str = json_settings["operation_type"] + + # Source parameters src_node_id: str = json_settings["src_node_id"] src_mgmt_ip_address: str = json_settings["src_mgmt_ip_address"] src_ac_node_id: str = json_settings["src_ac_node_id"] @@ -38,6 +144,8 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: source_one_way_packet_loss: float = float( json_settings["source_one_way_packet_loss"] ) + + # Destination parameters dst_node_id: str = json_settings["dst_node_id"] dst_mgmt_ip_address: str = json_settings["dst_mgmt_ip_address"] dst_ac_node_id: str = json_settings["dst_ac_node_id"] @@ -54,101 +162,47 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: destination_one_way_packet_loss: float = float( json_settings["destination_one_way_packet_loss"] ) + + # Slice ID slice_id: str = json_settings["slice_id"] - sdps = [ - { - "id": "1", - "node-id": src_node_id, - "sdp-ip-address": [src_mgmt_ip_address], - "service-match-criteria": { - "match-criterion": [ - { - "index": 1, - "match-type": [ - { - "type": "ietf-network-slice-service:vlan", - "value": [src_vlan], - }, - { - "type": "ietf-network-slice-service:source-ip-prefix", - "value": [src_source_ip_prefix], - }, - { - "type": "ietf-network-slice-service:source-tcp-port", - "value": [src_source_tcp_port], - }, - { - "type": "ietf-network-slice-service:destination-ip-prefix", - "value": [src_destination_ip_prefix], - }, - { - "type": "ietf-network-slice-service:destination-tcp-port", - "value": [src_destination_tcp_port], - }, - ], - "target-connection-group-id": "line1", - } - ] - }, - "attachment-circuits": { - "attachment-circuit": [ - { - "id": "0", - "description": "dsc", - "ac-node-id": src_ac_node_id, - "ac-tp-id": src_ac_ep_id, - } - ] - }, - }, - { - "id": "2", - "node-id": dst_node_id, - "sdp-ip-address": [dst_mgmt_ip_address], - "service-match-criteria": { - "match-criterion": [ - { - "index": 1, - "match-type": [ - { - "type": "ietf-network-slice-service:vlan", - "value": [dst_vlan], - }, - { - "type": "ietf-network-slice-service:source-ip-prefix", - "value": [dst_source_ip_prefix], - }, - { - "type": "ietf-network-slice-service:source-tcp-port", - "value": [dst_source_tcp_port], - }, - { - "type": "ietf-network-slice-service:destination-ip-prefix", - "value": [dst_destination_ip_prefix], - }, - { - "type": "ietf-network-slice-service:destination-tcp-port", - "value": [dst_destination_tcp_port], - }, - ], - "target-connection-group-id": "line1", - } - ] - }, - "attachment-circuits": { - "attachment-circuit": [ - { - "id": "0", - "description": "dsc", - "ac-node-id": dst_ac_node_id, - "ac-tp-id": dst_ac_ep_id, - } - ] - }, - }, - ] + # build source & destination match criteria + src_match_criterion = build_match_criterion( + vlan=src_vlan, + src_ip=src_source_ip_prefix, + src_port=src_source_tcp_port, + dst_ip=src_destination_ip_prefix, + dst_port=src_destination_tcp_port, + ) + dst_match_criterion = build_match_criterion( + vlan=dst_vlan, + src_ip=dst_source_ip_prefix, + src_port=dst_source_tcp_port, + dst_ip=dst_destination_ip_prefix, + dst_port=dst_destination_tcp_port, + ) + + # Build SDPs + sdp_src = build_sdp( + sdp_id="1", + node_id=src_node_id, + mgmt_ip=src_mgmt_ip_address, + ac_node_id=src_ac_node_id, + ac_ep_id=src_ac_ep_id, + match_criterion=src_match_criterion, + ) + sdp_dst = build_sdp( + sdp_id="2", + node_id=dst_node_id, + mgmt_ip=dst_mgmt_ip_address, + ac_node_id=dst_ac_node_id, + ac_ep_id=dst_ac_ep_id, + match_criterion=dst_match_criterion, + ) + sdps = [sdp_src, sdp_dst] + + # Build connection-groups connection_groups = [ { "id": "line1", @@ -160,23 +214,11 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: "p2p-receiver-sdp": "2", "service-slo-sle-policy": { "slo-policy": { - "metric-bound": [ - { - "metric-type": "ietf-network-slice-service:one-way-delay-maximum", - "metric-unit": "milliseconds", - "bound": source_one_way_delay, - }, - { - "metric-type": "ietf-network-slice-service:one-way-bandwidth", - "metric-unit": "Mbps", - "bound": source_one_way_bandwidth, - }, - { - "metric-type": "ietf-network-slice-service:two-way-packet-loss", - "metric-unit": "percentage", - "percentile-value": source_one_way_packet_loss, - }, - ] + "metric-bound": build_slo_policy_bound( + one_way_delay=source_one_way_delay, + one_way_bandwidth=source_one_way_bandwidth, + one_way_packet_loss=source_one_way_packet_loss, + ) } }, }, @@ -186,29 +228,18 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: "p2p-receiver-sdp": "1", "service-slo-sle-policy": { "slo-policy": { - "metric-bound": [ - { - "metric-type": "ietf-network-slice-service:one-way-delay-maximum", - "metric-unit": "milliseconds", - "bound": destination_one_way_delay, - }, - { - "metric-type": "ietf-network-slice-service:one-way-bandwidth", - "metric-unit": "Mbps", - "bound": destination_one_way_bandwidth, - }, - { - "metric-type": "ietf-network-slice-service:two-way-packet-loss", - "metric-unit": "percentage", - "percentile-value": destination_one_way_packet_loss, - }, - ] + "metric-bound": build_slo_policy_bound( + one_way_delay=destination_one_way_delay, + one_way_bandwidth=destination_one_way_bandwidth, + one_way_packet_loss=destination_one_way_packet_loss, + ) } }, }, ], } ] + slice_service = { "id": slice_id, "description": "dsc", @@ -216,6 +247,7 @@ def setup_config_rules(service_uuid: str, json_settings: Dict) -> List[Dict]: "connection-groups": {"connection-group": connection_groups}, } slice_data_model = {"network-slice-services": {"slice-service": [slice_service]}} + json_config_rules = [ json_config_rule_set( "/service[{:s}]/IETFSlice".format(service_uuid), @@ -250,23 +282,15 @@ def get_link_ep_device_names( ep_device_id_1 = ep_ids[0].device_id ep_uuid_1 = ep_ids[0].endpoint_uuid.uuid device_obj_1 = context_client.GetDevice(ep_device_id_1) - for d_ep in device_obj_1.device_endpoints: - if d_ep.endpoint_id.endpoint_uuid.uuid == ep_uuid_1: - ep_name_1 = d_ep.name - break - else: - raise Exception("endpoint not found") + ep_name_1 = _get_device_endpoint_name(device_obj_1, ep_uuid_1) device_obj_name_1 = device_obj_1.name + ep_device_id_2 = ep_ids[1].device_id ep_uuid_2 = ep_ids[1].endpoint_uuid.uuid device_obj_2 = context_client.GetDevice(ep_device_id_2) - for d_ep in device_obj_2.device_endpoints: - if d_ep.endpoint_id.endpoint_uuid.uuid == ep_uuid_2: - ep_name_2 = d_ep.name - break - else: - raise Exception("endpoint not found") + ep_name_2 = _get_device_endpoint_name(device_obj_2, ep_uuid_2) device_obj_name_2 = device_obj_2.name + return ( device_obj_name_1, ep_name_1, diff --git a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py index ea1c0f425..0df8b56e3 100644 --- a/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py +++ b/src/service/service/service_handlers/l3slice_ietfslice/L3SliceIETFSliceServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -38,6 +38,30 @@ from .ConfigRules import ( teardown_config_rules, ) +RUNNING_RESOURCE_KEY = "running_ietf_slice" +CANDIDATE_RESOURCE_KEY = "candidate_ietf_slice" + +SDP_DIFF_RE = re.compile( + r"^root\[\'network-slice-services\'\]\[\'slice-service\'\]\[0\]\[\'sdps\'\]\[\'sdp\'\]\[(\d)\]$" +) +CONNECTION_GROUP_DIFF_RE = re.compile( + r"^root\[\'network-slice-services\'\]\[\'slice-service\'\]\[0\]\[\'connection-groups\'\]\[\'connection-group\'\]\[(\d)\]$" +) +MATCH_CRITERION_DIFF_RE = re.compile( + r"^root\[\'network-slice-services\'\]\[\'slice-service\'\]\[0\]\[\'sdps\'\]\[\'sdp\'\]\[(\d)\]\[\'service-match-criteria\'\]\[\'match-criterion\'\]\[(\d)\]$" +) + +RE_GET_ENDPOINT_FROM_INTERFACE = re.compile(r"^\/interface\[([^\]]+)\].*") + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool( + "Service", "Handler", labels={"handler": "l3slice_ietfslice"} +) + + +RAISE_IF_DIFFERS = True + class Ipv4Info(TypedDict): src_lan: str @@ -63,34 +87,68 @@ class ConnectivityConstructInfo: packet_loss: float = 0.0 -RUNNING_RESOURCE_KEY = "running_ietf_slice" -CANDIDATE_RESOURCE_KEY = "candidate_ietf_slice" - -SDP_DIFF_RE = re.compile( - r"^root\[\'network-slice-services\'\]\[\'slice-service\'\]\[0\]\[\'sdps\'\]\[\'sdp\'\]\[(\d)\]$" -) -CONNECTION_GROUP_DIFF_RE = re.compile( - r"^root\[\'network-slice-services\'\]\[\'slice-service\'\]\[0\]\[\'connection-groups\'\]\[\'connection-group\'\]\[(\d)\]$" -) -MATCH_CRITERION_DIFF_RE = re.compile( - r"^root\[\'network-slice-services\'\]\[\'slice-service\'\]\[0\]\[\'sdps\'\]\[\'sdp\'\]\[(\d)\]\[\'service-match-criteria\'\]\[\'match-criterion\'\]\[(\d)\]$" -) - -RE_GET_ENDPOINT_FROM_INTERFACE = re.compile(r"^\/interface\[([^\]]+)\].*") - -LOGGER = logging.getLogger(__name__) - -METRICS_POOL = MetricsPool( - "Service", "Handler", labels={"handler": "l3slice_ietfslice"} -) +def get_custom_config_rule( + service_config: ServiceConfig, resource_key: str +) -> Optional[ConfigRule]: + """ + Returns the ConfigRule from service_config matching the provided resource_key + if found, otherwise returns None. + """ + for cr in service_config.config_rules: + if ( + cr.WhichOneof("config_rule") == "custom" + and cr.custom.resource_key == resource_key + ): + return cr + return None -RAISE_IF_DIFFERS = True +def get_running_candidate_ietf_slice_data_diff(service_config: ServiceConfig) -> Dict: + """ + Loads the JSON from the running/candidate resource ConfigRules and returns + their DeepDiff comparison. + """ + running_cr = get_custom_config_rule(service_config, RUNNING_RESOURCE_KEY) + candidate_cr = get_custom_config_rule(service_config, CANDIDATE_RESOURCE_KEY) + running_value_dict = json.loads(running_cr.custom.resource_value) + candidate_value_dict = json.loads(candidate_cr.custom.resource_value) + return DeepDiff(running_value_dict, candidate_value_dict) + + +def extract_match_criterion_ipv4_info(match_criterion: Dict) -> Ipv4Info: + """ + Extracts IPv4 info from the match criterion dictionary. + """ + src_lan = dst_lan = src_port = dst_port = vlan = "" + for type_value in match_criterion["match-type"]: + m_type = type_value["type"] + val = type_value["value"][0] + if m_type == "ietf-network-slice-service:source-ip-prefix": + src_lan = val + elif m_type == "ietf-network-slice-service:destination-ip-prefix": + dst_lan = val + elif m_type == "ietf-network-slice-service:source-tcp-port": + src_port = val + elif m_type == "ietf-network-slice-service:destination-tcp-port": + dst_port = val + elif m_type == "ietf-network-slice-service:vlan": + vlan = val + return Ipv4Info( + src_lan=src_lan, + dst_lan=dst_lan, + src_port=src_port, + dst_port=dst_port, + vlan=vlan, + ) def get_removed_items( candidate_ietf_slice_dict: dict, running_ietf_slice_dict: dict ) -> dict: + """ + For the 'iterable_item_removed' scenario, returns dict with removed sdp / connection_group / match_criterion info. + Raises an exception if there's inconsistent data or multiple items removed (which is not supported). + """ removed_items = { "sdp": {"sdp_idx": None, "value": {}}, "connection_group": {"connection_group_idx": None, "value": {}}, @@ -100,20 +158,24 @@ def get_removed_items( "value": {}, }, } + running_slice_services = running_ietf_slice_dict["network-slice-services"][ "slice-service" ][0] - running_slice_sdps = [sdp["id"] for sdp in running_slice_services["sdps"]["sdp"]] candidate_slice_services = candidate_ietf_slice_dict["network-slice-services"][ "slice-service" ][0] + + running_slice_sdps = [sdp["id"] for sdp in running_slice_services["sdps"]["sdp"]] candidiate_slice_sdps = [ sdp["id"] for sdp in candidate_slice_services["sdps"]["sdp"] ] removed_sdps = set(running_slice_sdps) - set(candidiate_slice_sdps) + if len(removed_sdps) > 1: - raise Exception("Multiple SDPs removed") - removed_sdp_id = list(removed_sdps)[0] + raise Exception("Multiple SDPs removed - not supported.") + removed_sdp_id = removed_sdps.pop() + removed_items["sdp"]["sdp_idx"] = running_slice_sdps.index(removed_sdp_id) removed_items["sdp"]["value"] = next( sdp @@ -125,7 +187,7 @@ def get_removed_items( "match-criterion" ] if len(match_criteria) > 1: - raise Exception("Multiple match criteria found") + raise Exception("Multiple match criteria found - not supported") match_criterion = match_criteria[0] connection_grp_id = match_criterion["target-connection-group-id"] connection_groups = running_slice_services["connection-groups"]["connection-group"] @@ -136,6 +198,7 @@ def get_removed_items( ) removed_items["connection_group"]["connection_group_idx"] = connection_group[0] removed_items["connection_group"]["value"] = connection_group[1] + for sdp in running_slice_services["sdps"]["sdp"]: if sdp["id"] == removed_sdp_id: continue @@ -159,18 +222,13 @@ def get_removed_items( return removed_items -def extract_source_destination_device_endpoint_info( - device_ep_pairs: list, connection_group: Dict, candidate_connection_groups: List -) -> Tuple[DeviceEpInfo, DeviceEpInfo]: - connectivity_construct = connection_group["connectivity-construct"][0] - sender_sdp = connectivity_construct["p2p-sender-sdp"] - receiver_sdp = connectivity_construct["p2p-receiver-sdp"] - if sender_sdp == device_ep_pairs[0][4]: - ... - elif sender_sdp == device_ep_pairs[1][4]: - device_ep_pairs = device_ep_pairs[::-1] - else: - raise Exception("Sender SDP not found in device_ep_pairs") +def gather_connectivity_construct_info( + candidate_connection_groups: List[Dict], +) -> Dict[Tuple[str, str], ConnectivityConstructInfo]: + """ + Creates a dict mapping (sender_sdp, receiver_sdp) -> ConnectivityConstructInfo + from the given list of candidate connection groups. + """ cc_info: Dict[Tuple[str, str], ConnectivityConstructInfo] = {} for cg in candidate_connection_groups: for cc in cg["connectivity-construct"]: @@ -201,12 +259,39 @@ def extract_source_destination_device_endpoint_info( and metric_bound["metric-unit"] == "Mbps" ): cc_info[cc_key].bandwidth = int(metric_bound["bound"]) + return cc_info + + +def extract_source_destination_device_endpoint_info( + device_ep_pairs: list, connection_group: Dict, candidate_connection_groups: List +) -> Tuple[DeviceEpInfo, DeviceEpInfo]: + """ + Given device_ep_pairs, the relevant connection_group data, and all candidate + connection groups, figure out the final DeviceEpInfo for source and destination. + This includes computing the combined bandwidth, min delay, etc. + """ + connectivity_construct = connection_group["connectivity-construct"][0] + sender_sdp = connectivity_construct["p2p-sender-sdp"] + receiver_sdp = connectivity_construct["p2p-receiver-sdp"] + + # If the first pair is not the sender, we invert them + if sender_sdp == device_ep_pairs[0][4]: + ... + elif sender_sdp == device_ep_pairs[1][4]: + device_ep_pairs = device_ep_pairs[::-1] + else: + raise Exception("Sender SDP not found in device_ep_pairs") + + # Gather info from candidate connection groups + cc_info = gather_connectivity_construct_info(candidate_connection_groups) + source_delay = int(1e6) source_bandwidth = 0 source_packet_loss = 1.0 destination_delay = int(1e6) destination_bandwidth = 0 destination_packet_loss = 1.0 + if cc_info: common_sdps = set.intersection(*[set(key) for key in cc_info.keys()]) if len(cc_info) > 2 and len(common_sdps) != 1: @@ -216,9 +301,11 @@ def extract_source_destination_device_endpoint_info( if len(common_sdps) == 1: common_sdp = common_sdps.pop() elif len(common_sdps) == 2: + # Fallback if intersection is 2 => pick sender_sdp common_sdp = sender_sdp else: - raise Exception('Invalid number of common sdps') + raise Exception("Invalid number of common sdps") + for (sender, receiver), metrics in cc_info.items(): cc_bandwidth = metrics.bandwidth cc_max_delay = metrics.delay @@ -235,6 +322,7 @@ def extract_source_destination_device_endpoint_info( destination_delay = cc_max_delay if cc_packet_loss < destination_packet_loss: destination_packet_loss = cc_packet_loss + source_device_ep_info = DeviceEpInfo( ipv4_info=device_ep_pairs[0][5], node_name=device_ep_pairs[0][2], @@ -251,58 +339,45 @@ def extract_source_destination_device_endpoint_info( one_way_bandwidth=destination_bandwidth, one_way_packet_loss=destination_packet_loss, ) - return source_device_ep_info, destination_device_ep_info - - -def extract_match_criterion_ipv4_info( - match_criterion: Dict, -) -> Ipv4Info: - for type_value in match_criterion["match-type"]: - if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": - src_lan = type_value["value"][0] - elif type_value["type"] == "ietf-network-slice-service:destination-ip-prefix": - dst_lan = type_value["value"][0] - elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": - src_port = type_value["value"][0] - elif type_value["type"] == "ietf-network-slice-service:destination-tcp-port": - dst_port = type_value["value"][0] - elif type_value["type"] == "ietf-network-slice-service:vlan": - vlan = type_value["value"][0] - return Ipv4Info( - src_lan=src_lan, - dst_lan=dst_lan, - src_port=src_port, - dst_port=dst_port, - vlan=vlan, - ) - -def get_custom_config_rule( - service_config: ServiceConfig, resource_key: str -) -> Optional[ConfigRule]: - for cr in service_config.config_rules: - if ( - cr.WhichOneof("config_rule") == "custom" - and cr.custom.resource_key == resource_key - ): - return cr + return source_device_ep_info, destination_device_ep_info -def get_running_candidate_ietf_slice_data_diff(service_config: ServiceConfig) -> Dict: - running_ietf_slice_cr = get_custom_config_rule(service_config, RUNNING_RESOURCE_KEY) - running_resource_value_dict = json.loads( - running_ietf_slice_cr.custom.resource_value - ) - candidate_ietf_slice_cr = get_custom_config_rule( - service_config, CANDIDATE_RESOURCE_KEY - ) - candidate_resource_value_dict = json.loads( - candidate_ietf_slice_cr.custom.resource_value - ) - return DeepDiff( - running_resource_value_dict, - candidate_resource_value_dict, - ) +def _parse_item_added(diff: Dict) -> dict: + """ + Helper to parse 'iterable_item_added' from the running_candidate_diff + and return the relevant items for sdp, connection_group, match_criterion, etc. + """ + added_items = { + "sdp": {"sdp_idx": None, "value": {}}, + "connection_group": {"connection_group_idx": None, "value": {}}, + "match_criterion": { + "sdp_idx": None, + "match_criterion_idx": None, + "value": {}, + }, + } + for added_key, added_value in diff["iterable_item_added"].items(): + sdp_match = SDP_DIFF_RE.match(added_key) + connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) + match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) + if sdp_match: + added_items["sdp"] = { + "sdp_idx": int(sdp_match.groups()[0]), + "value": added_value, + } + elif connection_group_match: + added_items["connection_group"] = { + "connection_group_idx": int(connection_group_match.groups()[0]), + "value": added_value, + } + elif match_criterion_match: + added_items["match_criterion"] = { + "sdp_idx": int(match_criterion_match.groups()[0]), + "match_criterion_idx": int(match_criterion_match.groups()[1]), + "value": added_value, + } + return added_items class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): @@ -326,12 +401,15 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): results = [] try: service_config = self.__service.service_config + + # 1. Identify source and destination devices src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) src_device_obj = self.__task_executor.get_device( DeviceId(**json_device_id(src_device_uuid)) ) src_device_name = src_device_obj.name src_controller = self.__task_executor.get_device_controller(src_device_obj) + dst_device_uuid, dst_endpoint_uuid = get_device_endpoint_uuids( endpoints[-1] ) @@ -340,18 +418,16 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): ) dst_device_name = dst_device_obj.name dst_controller = self.__task_executor.get_device_controller(dst_device_obj) + 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 - context_client = ContextClient() - edge_device_names = [src_device_name, dst_device_name] - link_list = context_client.ListLinks(Empty()) - links = link_list.links - device_ep_pairs = [] - sdp_ids = [] + + controller = src_controller # same device controller + + # 2. Determine how the candidate & running resources differ running_candidate_diff = get_running_candidate_ietf_slice_data_diff( service_config ) @@ -370,35 +446,39 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): slice_name = running_resource_value_dict["network-slice-services"][ "slice-service" ][0]["id"] + + # 3. Retrieve the context links for matching endpoints + context_client = ContextClient() + links = context_client.ListLinks(Empty()).links + + device_ep_pairs = [] + sdp_ids = [] + target_connection_group_id = None + operation_type = "update" # default fallback + + # 4. Handle creation vs additions vs removals if not running_candidate_diff: # Slice Creation - slice_services = candidate_resource_value_dict[ + # 4a. New Slice Creation + operation_type = "create" + + candidate_slice_service = candidate_resource_value_dict[ "network-slice-services" - ]["slice-service"] - candidate_slice_service = slice_services[0] + ]["slice-service"][0] full_connection_groups = candidate_slice_service["connection-groups"][ "connection-group" ] sdps = candidate_slice_service["sdps"]["sdp"] - operation_type = "create" sdp_ids = [sdp["node-id"] for sdp in sdps] + + # figure out which device is connected to which link + edge_device_names = [src_device_name, dst_device_name] for sdp in sdps: node_id = sdp["node-id"] for link in links: - ( - device_obj_name_1, - ep_name_1, - device_obj_1, - device_obj_name_2, - ep_name_2, - device_obj_2, - ) = get_link_ep_device_names(link, context_client) - if ( - device_obj_name_1 == node_id - and device_obj_name_2 in edge_device_names - ): - del edge_device_names[ - edge_device_names.index(device_obj_name_2) - ] + info = get_link_ep_device_names(link, context_client) + dev1, ep1, _, dev2, ep2, _ = info + if dev1 == node_id and dev2 in edge_device_names: + edge_device_names.remove(dev2) match_criteria = sdp["service-match-criteria"][ "match-criterion" ] @@ -413,9 +493,9 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): device_ep_pairs.append( ( node_id, - ep_name_1, - device_obj_name_2, - ep_name_2, + ep1, + dev2, + ep2, sdp["id"], ipv4_info, ) @@ -423,19 +503,19 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): target_connection_group_id = match_criterion[ "target-connection-group-id" ] - del sdp_ids[sdp_ids.index(node_id)] + sdp_ids.remove(node_id) break + + # find the second link + if not edge_device_names: + raise Exception("Edge device names exhausted unexpectedly.") + + # second link logic for link in links: - ( - device_obj_name_1, - ep_name_1, - device_obj_1, - device_obj_name_2, - ep_name_2, - device_obj_2, - ) = get_link_ep_device_names(link, context_client) + info = get_link_ep_device_names(link, context_client) + dev1, ep1, device_obj_1, dev2, ep2, device_obj_2 = info if ( - device_obj_name_1 == edge_device_names[0] + dev1 == edge_device_names[0] and device_obj_2.controller_id != device_obj_1.controller_id ): for sdp in sdps: @@ -454,62 +534,34 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): ) device_ep_pairs.append( ( - device_obj_name_2, - ep_name_2, - device_obj_name_1, - ep_name_1, + dev2, + ep2, + dev1, + ep1, sdp["id"], ipv4_info, ) ) + break + else: + raise Exception("No matching sdp found for second link.") break else: raise Exception("sdp between the domains not found") + elif "iterable_item_added" in running_candidate_diff: # new SDP added - slice_services = candidate_resource_value_dict[ + # 4b. A new SDP was added + operation_type = "update" + + candidate_slice_service = candidate_resource_value_dict[ "network-slice-services" - ]["slice-service"] - candidate_slice_service = slice_services[0] + ]["slice-service"][0] + sdps = candidate_slice_service["sdps"]["sdp"] full_connection_groups = candidate_slice_service["connection-groups"][ "connection-group" ] - sdps = candidate_slice_service["sdps"]["sdp"] - operation_type = "update" - added_items = { - "sdp": {"sdp_idx": None, "value": {}}, - "connection_group": {"connection_group_idx": None, "value": {}}, - "match_criterion": { - "sdp_idx": None, - "match_criterion_idx": None, - "value": {}, - }, - } - for added_key, added_value in running_candidate_diff[ - "iterable_item_added" - ].items(): - sdp_match = SDP_DIFF_RE.match(added_key) - connection_group_match = CONNECTION_GROUP_DIFF_RE.match(added_key) - match_criterion_match = MATCH_CRITERION_DIFF_RE.match(added_key) - if sdp_match: - added_items["sdp"] = { - "sdp_idx": int(sdp_match.groups()[0]), - "value": added_value, - } - elif connection_group_match: - added_items["connection_group"] = { - "connection_group_idx": int( - connection_group_match.groups()[0] - ), - "value": added_value, - } - elif match_criterion_match: - added_items["match_criterion"] = { - "sdp_idx": int(match_criterion_match.groups()[0]), - "match_criterion_idx": int( - match_criterion_match.groups()[1] - ), - "value": added_value, - } + added_items = _parse_item_added(running_candidate_diff) + new_sdp = sdps[added_items["sdp"]["sdp_idx"]] src_sdp_name = new_sdp["node-id"] dst_sdp_idx = sdps[added_items["match_criterion"]["sdp_idx"]]["id"] @@ -517,16 +569,10 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): "node-id" ] for link in links: - ( - device_obj_name_1, - ep_name_1, - device_obj_1, - device_obj_name_2, - ep_name_2, - device_obj_2, - ) = get_link_ep_device_names(link, context_client) + info = get_link_ep_device_names(link, context_client) + dev1, ep1, device_obj_1, dev2, ep2, device_obj_2 = info if ( - device_obj_name_1 == src_sdp_name + dev1 == src_sdp_name and device_obj_2.controller_id != device_obj_1.controller_id ): for sdp in sdps: @@ -545,10 +591,10 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): ) device_ep_pairs.append( ( - device_obj_name_2, - ep_name_2, - device_obj_name_1, - ep_name_1, + dev2, + ep2, + dev1, + ep1, sdp["id"], ipv4_info, ) @@ -560,16 +606,10 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): else: raise Exception("sdp between the domains not found") for link in links: - ( - device_obj_name_1, - ep_name_1, - device_obj_1, - device_obj_name_2, - ep_name_2, - device_obj_2, - ) = get_link_ep_device_names(link, context_client) + info = get_link_ep_device_names(link, context_client) + dev1, ep1, device_obj_1, dev2, ep2, device_obj_2 = info if ( - device_obj_name_1 == dst_sdp_name + dev1 == dst_sdp_name and device_obj_2.controller_id != device_obj_1.controller_id ): for sdp in sdps: @@ -598,10 +638,10 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): ) device_ep_pairs.append( ( - device_obj_name_2, - ep_name_2, - device_obj_name_1, - ep_name_1, + dev2, + ep2, + dev1, + ep1, sdp["id"], ipv4_info, ) @@ -610,6 +650,9 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): else: raise Exception("sdp between the domains not found") elif "iterable_item_removed" in running_candidate_diff: # an SDP removed + # 4c. An existing SDP was removed + operation_type = "update" + slice_services = running_resource_value_dict["network-slice-services"][ "slice-service" ] @@ -622,7 +665,6 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): "connection-group" ] sdps = slice_service["sdps"]["sdp"] - operation_type = "update" removed_items = get_removed_items( candidate_resource_value_dict, running_resource_value_dict ) @@ -725,10 +767,15 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): break else: raise Exception("sdp between the domains not found") + else: + raise Exception( + "transition from candidate to running info not supported" + ) + candidate_connection_groups = candidate_slice_service["connection-groups"][ "connection-group" ] - LOGGER.debug(f"connection_groups: {candidate_connection_groups}") + if ( len( candidate_resource_value_dict["network-slice-services"][ @@ -737,12 +784,19 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): ) == 0 ): + # 5. If connection_groups is now empty => operation = delete operation_type = "delete" + + # 6. Retrieve actual target connection_group from the full connection groups + if not target_connection_group_id: + raise Exception("No target_connection_group_id found.") target_connection_group = next( cg for cg in full_connection_groups if cg["id"] == target_connection_group_id ) + + # 7. Build source/destination device info source_device_ep_info, destination_device_ep_info = ( extract_source_destination_device_endpoint_info( device_ep_pairs, @@ -799,10 +853,13 @@ class L3NMSliceIETFSliceServiceHandler(_ServiceHandler): ], "slice_id": slice_name, } + + # 9. Create config rules and configure device json_config_rules = setup_config_rules(slice_name, resource_value_dict) del controller.device_config.config_rules[:] for jcr in json_config_rules: controller.device_config.config_rules.append(ConfigRule(**jcr)) + self.__task_executor.configure_device(controller) except Exception as e: # pylint: disable=broad-except raise e diff --git a/src/service/service/service_handlers/l3slice_ietfslice/__init__.py b/src/service/service/service_handlers/l3slice_ietfslice/__init__.py index 53d5157f7..3ccc21c7d 100644 --- a/src/service/service/service_handlers/l3slice_ietfslice/__init__.py +++ b/src/service/service/service_handlers/l3slice_ietfslice/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -- GitLab From 4c887249b2232e0959b1349bb173bf20b952db34 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 18 Jan 2025 21:23:59 +0100 Subject: [PATCH 192/463] refactoring --- .../service_handlers/l3nm_nce/ConfigRules.py | 2 +- .../l3nm_nce/L3NMNCEServiceHandler.py | 272 +++++++++++------- .../service_handlers/l3nm_nce/__init__.py | 2 +- 3 files changed, 164 insertions(+), 112 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_nce/ConfigRules.py b/src/service/service/service_handlers/l3nm_nce/ConfigRules.py index d6bcadb45..0544d8976 100644 --- a/src/service/service/service_handlers/l3nm_nce/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_nce/ConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py b/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py index cbf92ac80..1317bd061 100644 --- a/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_nce/L3NMNCEServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ import json import logging import re -from typing import Any, List, Optional, Tuple, Union +from typing import Any, List, Optional, Tuple, Union, TypedDict, Dict from uuid import uuid4 from deepdiff import DeepDiff @@ -40,6 +40,7 @@ CANDIDATE_RESOURCE_KEY = "candidate_ietf_slice" LOGGER = logging.getLogger(__name__) METRICS_POOL = MetricsPool("Service", "Handler", labels={"handler": "l3nm_nce"}) + SDP_DIFF_RE = re.compile( r"^root\[\'network-slice-services\'\]\[\'slice-service\'\]\[0\]\[\'sdps\'\]\[\'sdp\'\]\[(\d)\]$" ) @@ -51,9 +52,20 @@ MATCH_CRITERION_DIFF_RE = re.compile( ) +class Ipv4Info(TypedDict): + src_ip: str + dst_ip: str + src_port: str + dst_port: str + + def get_removed_items( candidate_ietf_slice_dict: dict, running_ietf_slice_dict: dict ) -> dict: + """ + For the 'iterable_item_removed' scenario, returns dict with removed sdp / connection_group / match_criterion info. + Raises an exception if there's inconsistent data or multiple items removed (which is not supported). + """ removed_items = { "sdp": {"sdp_idx": None, "value": {}}, "connection_group": {"connection_group_idx": None, "value": {}}, @@ -63,20 +75,24 @@ def get_removed_items( "value": {}, }, } + running_slice_services = running_ietf_slice_dict["network-slice-services"][ "slice-service" ][0] - running_slice_sdps = [sdp["id"] for sdp in running_slice_services["sdps"]["sdp"]] candidate_slice_services = candidate_ietf_slice_dict["network-slice-services"][ "slice-service" ][0] + + running_slice_sdps = [sdp["id"] for sdp in running_slice_services["sdps"]["sdp"]] candidiate_slice_sdps = [ sdp["id"] for sdp in candidate_slice_services["sdps"]["sdp"] ] removed_sdps = set(running_slice_sdps) - set(candidiate_slice_sdps) + if len(removed_sdps) > 1: - raise Exception("Multiple SDPs removed") - removed_sdp_id = list(removed_sdps)[0] + raise Exception("Multiple SDPs removed - not supported.") + removed_sdp_id = removed_sdps.pop() + removed_items["sdp"]["sdp_idx"] = running_slice_sdps.index(removed_sdp_id) removed_items["sdp"]["value"] = next( sdp @@ -88,7 +104,7 @@ def get_removed_items( "match-criterion" ] if len(match_criteria) > 1: - raise Exception("Multiple match criteria found") + raise Exception("Multiple match criteria found - not supported") match_criterion = match_criteria[0] connection_grp_id = match_criterion["target-connection-group-id"] connection_groups = running_slice_services["connection-groups"]["connection-group"] @@ -99,6 +115,7 @@ def get_removed_items( ) removed_items["connection_group"]["connection_group_idx"] = connection_group[0] removed_items["connection_group"]["value"] = connection_group[1] + for sdp in running_slice_services["sdps"]["sdp"]: if sdp["id"] == removed_sdp_id: continue @@ -119,41 +136,116 @@ def get_removed_items( or removed_items["connection_group"]["connection_group_idx"] is None ): raise Exception("sdp, connection group or match criterion not found") + return removed_items def get_custom_config_rule( service_config: ServiceConfig, resource_key: str ) -> Optional[ConfigRule]: + """ + Returns the ConfigRule from service_config matching the provided resource_key + if found, otherwise returns None. + """ for cr in service_config.config_rules: if ( cr.WhichOneof("config_rule") == "custom" and cr.custom.resource_key == resource_key ): return cr + return None -def get_running_candidate_ietf_slice_data_diff(service_config: ServiceConfig) -> dict: - running_ietf_slice_cr = get_custom_config_rule(service_config, RUNNING_RESOURCE_KEY) - running_resource_value_dict = json.loads( - running_ietf_slice_cr.custom.resource_value - ) - candidate_ietf_slice_cr = get_custom_config_rule( - service_config, CANDIDATE_RESOURCE_KEY - ) - candidate_resource_value_dict = json.loads( - candidate_ietf_slice_cr.custom.resource_value +def get_running_candidate_ietf_slice_data_diff(service_config: ServiceConfig) -> Dict: + """ + Loads the JSON from the running/candidate resource ConfigRules and returns + their DeepDiff comparison. + """ + running_cr = get_custom_config_rule(service_config, RUNNING_RESOURCE_KEY) + candidate_cr = get_custom_config_rule(service_config, CANDIDATE_RESOURCE_KEY) + + running_value_dict = json.loads(running_cr.custom.resource_value) + candidate_value_dict = json.loads(candidate_cr.custom.resource_value) + + return DeepDiff(running_value_dict, candidate_value_dict) + + +def extract_qos_info( + connection_groups: List, connection_grp_id: str, src_sdp_idx: str, dst_sdp_idx: str +) -> Dict: + """ + Extract QoS information from connection groups based on the connection group ID. + """ + qos_info = { + "upstream": {"max_delay": "0", "bw": "0", "packet_loss": "0"}, + "downstream": {"max_delay": "0", "bw": "0", "packet_loss": "0"}, + } + connection_group = next( + (cg for cg in connection_groups if cg["id"] == connection_grp_id), None ) - return ( - DeepDiff( - running_resource_value_dict, - candidate_resource_value_dict, - ), - DeepDiff( - running_resource_value_dict, - candidate_resource_value_dict, - ignore_order=True, - ), + + if not connection_group: + return qos_info + + for cc in connection_group["connectivity-construct"]: + if ( + cc["p2p-sender-sdp"] == src_sdp_idx + and cc["p2p-receiver-sdp"] == dst_sdp_idx + ): + direction = "upstream" + elif ( + cc["p2p-sender-sdp"] == dst_sdp_idx + and cc["p2p-receiver-sdp"] == src_sdp_idx + ): + direction = "downstream" + else: + raise Exception("invalid sender and receiver sdp ids") + for metric_bound in cc["service-slo-sle-policy"]["slo-policy"]["metric-bound"]: + if ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-delay-maximum" + and metric_bound["metric-unit"] == "milliseconds" + ): + qos_info[direction]["max_delay"] = metric_bound["bound"] + elif ( + metric_bound["metric-type"] + == "ietf-network-slice-service:one-way-bandwidth" + and metric_bound["metric-unit"] == "Mbps" + ): + qos_info[direction]["bw"] = metric_bound["bound"] + elif ( + metric_bound["metric-type"] + == "ietf-network-slice-service:two-way-packet-loss" + and metric_bound["metric-unit"] == "percentage" + ): + qos_info[direction]["packet_loss"] = metric_bound["percentile-value"] + + return qos_info + + +def extract_match_criterion_ipv4_info(match_criterion: Dict) -> Ipv4Info: + """ + Extracts IPv4 info from the match criterion dictionary. + """ + src_ip = dst_ip = src_port = dst_port = "" + + for type_value in match_criterion["match-type"]: + m_type = type_value["type"] + val = type_value["value"][0] + if m_type == "ietf-network-slice-service:source-ip-prefix": + src_ip = val.split("/")[0] + elif m_type == "ietf-network-slice-service:destination-ip-prefix": + dst_ip = val.split("/")[0] + elif m_type == "ietf-network-slice-service:source-tcp-port": + src_port = val + elif m_type == "ietf-network-slice-service:destination-tcp-port": + dst_port = val + + return Ipv4Info( + src_ip=src_ip, + dst_ip=dst_ip, + src_port=src_port, + dst_port=dst_port, ) @@ -174,22 +266,25 @@ class L3NMNCEServiceHandler(_ServiceHandler): chk_type("endpoints", endpoints, list) if len(endpoints) == 0: return [] + results = [] try: context_client = ContextClient() service_config = self.__service.service_config settings = self.__settings_handler.get("/settings") + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) src_device_obj = self.__task_executor.get_device( DeviceId(**json_device_id(src_device_uuid)) ) controller = self.__task_executor.get_device_controller(src_device_obj) + list_devices = context_client.ListDevices(Empty()) devices = list_devices.devices - device_name_device = {d.name: d for d in devices} - device_uuid_device = {d.device_id.device_uuid.uuid: d for d in devices} - running_candidate_diff, running_candidate_diff_no_order = ( - get_running_candidate_ietf_slice_data_diff(service_config) + device_name_map = {d.name: d for d in devices} + + running_candidate_diff = get_running_candidate_ietf_slice_data_diff( + service_config ) candidate_ietf_slice_cr = get_custom_config_rule( service_config, CANDIDATE_RESOURCE_KEY @@ -203,15 +298,17 @@ class L3NMNCEServiceHandler(_ServiceHandler): running_resource_value_dict = json.loads( running_ietf_slice_cr.custom.resource_value ) + service_name = running_resource_value_dict["network-slice-services"][ "slice-service" ][0]["id"] + if not running_candidate_diff: # Slice Creation operation_type = "create" - slice_services = candidate_resource_value_dict[ - "network-slice-services" - ]["slice-service"] - slice_service = slice_services[0] + + slice_service = candidate_resource_value_dict["network-slice-services"][ + "slice-service" + ][0] sdps = slice_service["sdps"]["sdp"] connection_groups = slice_service["connection-groups"][ "connection-group" @@ -219,7 +316,7 @@ class L3NMNCEServiceHandler(_ServiceHandler): sdp_ids = [sdp["id"] for sdp in sdps] for sdp in sdps: node_id = sdp["node-id"] - device_obj = device_name_device[node_id] + device_obj = device_name_map[node_id] device_controller = self.__task_executor.get_device_controller( device_obj ) @@ -237,15 +334,15 @@ class L3NMNCEServiceHandler(_ServiceHandler): else: raise Exception("connection group id not found") elif "iterable_item_added" in running_candidate_diff: # new SDP added - slice_services = candidate_resource_value_dict[ - "network-slice-services" - ]["slice-service"] - slice_service = slice_services[0] + operation_type = "create" + + slice_service = candidate_resource_value_dict["network-slice-services"][ + "slice-service" + ][0] sdps = slice_service["sdps"]["sdp"] connection_groups = slice_service["connection-groups"][ "connection-group" ] - operation_type = "create" added_items = { "sdp": {"sdp_idx": None, "value": {}}, "connection_group": {"connection_group_idx": None, "value": {}}, @@ -287,6 +384,7 @@ class L3NMNCEServiceHandler(_ServiceHandler): connection_grp_id = connection_groups[ added_items["connection_group"]["connection_group_idx"] ]["id"] + if ( connection_grp_id != added_items["match_criterion"]["value"][ @@ -299,15 +397,15 @@ class L3NMNCEServiceHandler(_ServiceHandler): match_criteria = new_sdp["service-match-criteria"]["match-criterion"] match_criterion = match_criteria[0] elif "iterable_item_removed" in running_candidate_diff: # new SDP added - slice_services = running_resource_value_dict["network-slice-services"][ + operation_type = "delete" + + slice_service = running_resource_value_dict["network-slice-services"][ "slice-service" - ] - slice_service = slice_services[0] + ][0] sdps = slice_service["sdps"]["sdp"] connection_groups = slice_service["connection-groups"][ "connection-group" ] - operation_type = "delete" removed_items = get_removed_items( candidate_resource_value_dict, running_resource_value_dict ) @@ -317,6 +415,7 @@ class L3NMNCEServiceHandler(_ServiceHandler): connection_grp_id = connection_groups[ removed_items["connection_group"]["connection_group_idx"] ]["id"] + if ( connection_grp_id != removed_items["match_criterion"]["value"][ @@ -330,65 +429,17 @@ class L3NMNCEServiceHandler(_ServiceHandler): "match-criterion" ] match_criterion = match_criteria[0] - for type_value in match_criterion["match-type"]: - if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": - src_ip = type_value["value"][0].split("/")[0] - elif ( - type_value["type"] - == "ietf-network-slice-service:destination-ip-prefix" - ): - dst_ip = type_value["value"][0].split("/")[0] - elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": - src_port = type_value["value"][0] - elif ( - type_value["type"] - == "ietf-network-slice-service:destination-tcp-port" - ): - dst_port = type_value["value"][0] - qos_info = { - "upstream": {"max_delay": "0", "bw": "0", "packet_loss": "0"}, - "downstream": {"max_delay": "0", "bw": "0", "packet_loss": "0"}, - } - for cg in connection_groups: - if cg["id"] != connection_grp_id: - continue - for cc in cg["connectivity-construct"]: - if ( - cc["p2p-sender-sdp"] == src_sdp_idx - and cc["p2p-receiver-sdp"] == dst_sdp_idx - ): - direction = "upstream" - elif ( - cc["p2p-sender-sdp"] == dst_sdp_idx - and cc["p2p-receiver-sdp"] == src_sdp_idx - ): - direction = "downstream" - else: - raise Exception("invalid sender and receiver sdp ids") - for metric_bound in cc["service-slo-sle-policy"]["slo-policy"][ - "metric-bound" - ]: - if ( - metric_bound["metric-type"] - == "ietf-network-slice-service:one-way-delay-maximum" - and metric_bound["metric-unit"] == "milliseconds" - ): - qos_info[direction]["max_delay"] = metric_bound["bound"] - elif ( - metric_bound["metric-type"] - == "ietf-network-slice-service:one-way-bandwidth" - and metric_bound["metric-unit"] == "Mbps" - ): - qos_info[direction]["bw"] = metric_bound["bound"] - elif ( - metric_bound["metric-type"] - == "ietf-network-slice-service:two-way-packet-loss" - and metric_bound["metric-unit"] == "percentage" - ): - qos_info[direction]["packet_loss"] = metric_bound[ - "percentile-value" - ] - break + else: + raise Exception( + "transition from candidate to running info not supported" + ) + + ip_info = extract_match_criterion_ipv4_info(match_criterion) + + qos_info = extract_qos_info( + connection_groups, connection_grp_id, src_sdp_idx, dst_sdp_idx + ) + resource_value_dict = { "uuid": service_name, "operation_type": operation_type, @@ -401,22 +452,23 @@ class L3NMNCEServiceHandler(_ServiceHandler): "upstream_max_bw": 2 * int(qos_info["upstream"]["bw"]) * 1e6, "downstream_assure_bw": int(qos_info["downstream"]["bw"]) * 1e6, "downstream_max_bw": 2 * int(qos_info["downstream"]["bw"]) * 1e6, - "src_ip": src_ip, - "src_port": src_port, - "dst_ip": dst_ip, - "dst_port": dst_port, + "src_ip": ip_info["src_ip"], + "src_port": ip_info["src_port"], + "dst_ip": ip_info["dst_ip"], + "dst_port": ip_info["dst_port"], } json_config_rules = setup_config_rules(service_name, resource_value_dict) - LOGGER.debug(f"Config Rules: {json_config_rules}") + del controller.device_config.config_rules[:] for jcr in json_config_rules: controller.device_config.config_rules.append(ConfigRule(**jcr)) + self.__task_executor.configure_device(controller) LOGGER.debug('Configured device "{:s}"'.format(controller.name)) + except Exception as e: # pylint: disable=broad-except - LOGGER.exception(f"P4: {e}") - raise e results.append(e) + return results @metered_subclass_method(METRICS_POOL) diff --git a/src/service/service/service_handlers/l3nm_nce/__init__.py b/src/service/service/service_handlers/l3nm_nce/__init__.py index 53d5157f7..3ccc21c7d 100644 --- a/src/service/service/service_handlers/l3nm_nce/__init__.py +++ b/src/service/service/service_handlers/l3nm_nce/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -- GitLab From 5ddadb6a5f2e4ee1e60be0b0988bf12287f84c3e Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 18 Jan 2025 21:39:48 +0100 Subject: [PATCH 193/463] minor polish --- .../service/drivers/ietf_slice/Constants.py | 2 +- .../service/drivers/ietf_slice/Tools.py | 2 +- .../service/drivers/ietf_slice/__init__.py | 2 +- .../service/drivers/ietf_slice/driver.py | 20 ++++++++++++------- .../ietf_slice/tfs_slice_nbi_client.py | 4 ++-- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/device/service/drivers/ietf_slice/Constants.py b/src/device/service/drivers/ietf_slice/Constants.py index df66eb16b..172c328ae 100644 --- a/src/device/service/drivers/ietf_slice/Constants.py +++ b/src/device/service/drivers/ietf_slice/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/ietf_slice/Tools.py b/src/device/service/drivers/ietf_slice/Tools.py index fddfd8940..bd976927e 100644 --- a/src/device/service/drivers/ietf_slice/Tools.py +++ b/src/device/service/drivers/ietf_slice/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/ietf_slice/__init__.py b/src/device/service/drivers/ietf_slice/__init__.py index bbfc943b6..6242c89c7 100644 --- a/src/device/service/drivers/ietf_slice/__init__.py +++ b/src/device/service/drivers/ietf_slice/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/ietf_slice/driver.py b/src/device/service/drivers/ietf_slice/driver.py index a7e91925c..e8b6e7d0e 100644 --- a/src/device/service/drivers/ietf_slice/driver.py +++ b/src/device/service/drivers/ietf_slice/driver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -200,15 +200,16 @@ class IetfSliceDriver(_Driver): continue results.extend(dump_subtree(resource_node)) return results - 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: for resource in resources: resource_key, resource_value = resource @@ -225,26 +226,33 @@ class IetfSliceDriver(_Driver): continue try: resource_value = json.loads(resource_value) + slice_name = resource_value["network-slice-services"][ "slice-service" ][0]["id"] + if operation_type == "create": self.tac.create_slice(resource_value) + elif operation_type == "update": connection_groups = resource_value["network-slice-services"][ "slice-service" ][0]["connection-groups"]["connection-group"] + if len(connection_groups) != 1: raise Exception("only one connection group is supported") + connection_group = connection_groups[0] + self.tac.update_slice( slice_name, connection_group["id"], connection_group ) + elif operation_type == "delete": self.tac.delete_slice(slice_name) + results.append((resource_key, True)) except Exception as e: # pylint: disable=broad-except - raise e LOGGER.exception( "Unhandled error processing resource_key({:s})".format( str(resource_key) @@ -258,17 +266,15 @@ class IetfSliceDriver(_Driver): self, resources: List[Tuple[str, Any]] ) -> List[Union[bool, Exception]]: results = [] + if len(resources) == 0: return results + with self.__lock: 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.__tfs_nbi_root, self.__auth, service_uuid): - # self.tac.delete_slice(service_uuid) results.append((resource_key, True)) except Exception as e: # pylint: disable=broad-except LOGGER.exception( diff --git a/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py b/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py index 5716982af..596e3d903 100644 --- a/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py +++ b/src/device/service/drivers/ietf_slice/tfs_slice_nbi_client.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ TIMEOUT = 30 LOGGER = logging.getLogger(__name__) -HEADERS = {'Content-Type': 'application/json'} +HEADERS = {"Content-Type": "application/json"} class TfsApiClient: -- GitLab From 307e5ba1bbae8e0b5a904c6ac8a1c4f157013be9 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sun, 19 Jan 2025 13:38:43 +0100 Subject: [PATCH 194/463] code polishing --- src/device/service/drivers/nce/Constants.py | 2 +- src/device/service/drivers/nce/Tools.py | 2 +- src/device/service/drivers/nce/__init__.py | 2 +- src/device/service/drivers/nce/driver.py | 11 +++++------ src/device/service/drivers/nce/nce_fan_client.py | 4 +++- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/device/service/drivers/nce/Constants.py b/src/device/service/drivers/nce/Constants.py index df66eb16b..172c328ae 100644 --- a/src/device/service/drivers/nce/Constants.py +++ b/src/device/service/drivers/nce/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/nce/Tools.py b/src/device/service/drivers/nce/Tools.py index ba54beb36..f9b2f24a8 100644 --- a/src/device/service/drivers/nce/Tools.py +++ b/src/device/service/drivers/nce/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/nce/__init__.py b/src/device/service/drivers/nce/__init__.py index bbfc943b6..6242c89c7 100644 --- a/src/device/service/drivers/nce/__init__.py +++ b/src/device/service/drivers/nce/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/nce/driver.py b/src/device/service/drivers/nce/driver.py index 003a0fabf..4ac1a2b1c 100644 --- a/src/device/service/drivers/nce/driver.py +++ b/src/device/service/drivers/nce/driver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -195,8 +195,10 @@ class NCEDriver(_Driver): self, resources: List[Tuple[str, Any]] ) -> List[Union[bool, Exception]]: results = [] + if len(resources) == 0: return results + with self.__lock: for resource in resources: resource_key, resource_value = resource @@ -215,13 +217,14 @@ class NCEDriver(_Driver): try: resource_value = json.loads(resource_value) if operation_type == "create": + self.nce.create_app_flow(resource_value) elif operation_type == "delete": + app_flow_name = resource_value["huawei-nce-app-flow:app-flows"][ "app-flow" ][0]["app-name"] self.nce.delete_app_flow(app_flow_name) - LOGGER.debug(f"app_flow_datamodel {resource_value}") results.append((resource_key, True)) except Exception as e: # pylint: disable=broad-except LOGGER.exception( @@ -244,10 +247,6 @@ class NCEDriver(_Driver): 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.__tfs_nbi_root, self.__auth, service_uuid): - # self.tac.delete_connectivity_service(service_uuid) results.append((resource_key, True)) except Exception as e: # pylint: disable=broad-except LOGGER.exception( diff --git a/src/device/service/drivers/nce/nce_fan_client.py b/src/device/service/drivers/nce/nce_fan_client.py index fd42ef962..1c3523427 100644 --- a/src/device/service/drivers/nce/nce_fan_client.py +++ b/src/device/service/drivers/nce/nce_fan_client.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -71,6 +71,7 @@ class NCEClient: app_url = self._nce_fan_url + "/app-flows/apps" LOGGER.info(f'Creating app: {app_data} URL: {app_url}') requests.post(app_url, json=app_data, headers=HEADERS) + app_flow_data = { "app-flow": app_flow_data["huawei-nce-app-flow:app-flows"]["app-flow"] } @@ -85,6 +86,7 @@ class NCEClient: app_url = self._nce_fan_url + f"/app-flows/apps/application={app_flow_name}" LOGGER.info(f'Deleting app: {app_flow_name} URL: {app_url}') requests.delete(app_url) + app_flow_url = self._nce_fan_url + f"/app-flows/app-flow={app_flow_name}" LOGGER.info(f'Deleting app flow: {app_flow_name} URL: {app_flow_url}') requests.delete(app_flow_url) -- GitLab From b8f35a21beaa13b985d549a1ad9e22d4d84aa432 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sun, 19 Jan 2025 14:01:31 +0100 Subject: [PATCH 195/463] refactor: - ofc25 test renamed to ofc25-camara-e2e-controller - Fixtures.py added to src/tests/ofc25-camara-e2e-controller/tests directory --- .../.gitignore | 0 .../.gitlab-ci.yml | 0 .../Dockerfile | 14 +++--- .../README.md | 4 +- .../__init__.py | 0 .../data/camara-e2e-topology.json | 0 ...st_connection_group_to_network_slice1.json | 0 ...st_connection_group_to_network_slice2.json | 0 ...post_match_criteria_to_sdp1_in_slice1.json | 0 ...post_match_criteria_to_sdp1_in_slice2.json | 0 .../data/slice/post_network_slice1.json | 0 .../data/slice/post_network_slice2.json | 0 .../slice/post_sdp_to_network_slice1.json | 0 .../slice/post_sdp_to_network_slice2.json | 0 .../data/target-full-ietf-slice.json | 0 .../data/target-ietf-slice-posted-slices.json | 0 ...rget-ietf-slice-put-connection-groups.json | 0 .../data/target-nce-app-flows.json | 0 .../data/target-nce-apps.json | 0 .../deploy_specs.sh | 0 .../redeploy-tfs.sh | 2 +- .../requirements.in | 0 .../scripts/run-e2e-ietf-slice-operations.sh | 2 +- .../scripts/run-onboarding.sh | 2 +- .../tests/Fixtures.py | 43 +++++++++++++++++++ .../tests/Tools.py | 0 .../tests/__init__.py | 0 .../tests/test_e2e_ietf_slice_operations.py | 0 .../tests/test_onboarding.py | 0 29 files changed, 55 insertions(+), 12 deletions(-) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/.gitignore (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/.gitlab-ci.yml (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/Dockerfile (84%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/README.md (96%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/__init__.py (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/camara-e2e-topology.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/slice/post_connection_group_to_network_slice1.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/slice/post_connection_group_to_network_slice2.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/slice/post_match_criteria_to_sdp1_in_slice1.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/slice/post_match_criteria_to_sdp1_in_slice2.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/slice/post_network_slice1.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/slice/post_network_slice2.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/slice/post_sdp_to_network_slice1.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/slice/post_sdp_to_network_slice2.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/target-full-ietf-slice.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/target-ietf-slice-posted-slices.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/target-ietf-slice-put-connection-groups.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/target-nce-app-flows.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/data/target-nce-apps.json (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/deploy_specs.sh (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/redeploy-tfs.sh (90%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/requirements.in (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/scripts/run-e2e-ietf-slice-operations.sh (89%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/scripts/run-onboarding.sh (91%) create mode 100644 src/tests/ofc25-camara-e2e-controller/tests/Fixtures.py rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/tests/Tools.py (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/tests/__init__.py (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/tests/test_e2e_ietf_slice_operations.py (100%) rename src/tests/{ofc25 => ofc25-camara-e2e-controller}/tests/test_onboarding.py (100%) diff --git a/src/tests/ofc25/.gitignore b/src/tests/ofc25-camara-e2e-controller/.gitignore similarity index 100% rename from src/tests/ofc25/.gitignore rename to src/tests/ofc25-camara-e2e-controller/.gitignore diff --git a/src/tests/ofc25/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml similarity index 100% rename from src/tests/ofc25/.gitlab-ci.yml rename to src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml diff --git a/src/tests/ofc25/Dockerfile b/src/tests/ofc25-camara-e2e-controller/Dockerfile similarity index 84% rename from src/tests/ofc25/Dockerfile rename to src/tests/ofc25-camara-e2e-controller/Dockerfile index 2d7d5ce34..79b709c13 100644 --- a/src/tests/ofc25/Dockerfile +++ b/src/tests/ofc25-camara-e2e-controller/Dockerfile @@ -49,9 +49,9 @@ RUN rm *.proto RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; # Create component sub-folders, get specific Python packages -RUN mkdir -p /var/teraflow/tests/ofc25 -WORKDIR /var/teraflow/tests/ofc25 -COPY src/tests/ofc25/requirements.in requirements.in +RUN mkdir -p /var/teraflow/tests/ofc25-camara-e2e-controller +WORKDIR /var/teraflow/tests/ofc25-camara-e2e-controller +COPY src/tests/ofc25-camara-e2e-controller/requirements.in requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN python3 -m pip install -r requirements.txt @@ -72,10 +72,10 @@ COPY src/service/client/. service/client/ COPY src/slice/__init__.py slice/__init__.py COPY src/slice/client/. slice/client/ COPY src/tests/*.py ./tests/ -COPY src/tests/ofc25/__init__.py ./tests/ofc25/__init__.py -COPY src/tests/ofc25/data/. ./tests/ofc25/data/ -COPY src/tests/ofc25/tests/. ./tests/ofc25/tests/ -COPY src/tests/ofc25/scripts/. ./ +COPY src/tests/ofc25-camara-e2e-controller/__init__.py ./tests/ofc25-camara-e2e-controller/__init__.py +COPY src/tests/ofc25-camara-e2e-controller/data/. ./tests/ofc25-camara-e2e-controller/data/ +COPY src/tests/ofc25-camara-e2e-controller/tests/. ./tests/ofc25-camara-e2e-controller/tests/ +COPY src/tests/ofc25-camara-e2e-controller/scripts/. ./ RUN apt-get --yes --quiet --quiet update && \ apt-get --yes --quiet --quiet install tree && \ diff --git a/src/tests/ofc25/README.md b/src/tests/ofc25-camara-e2e-controller/README.md similarity index 96% rename from src/tests/ofc25/README.md rename to src/tests/ofc25-camara-e2e-controller/README.md index 23522ad6f..187f156f6 100644 --- a/src/tests/ofc25/README.md +++ b/src/tests/ofc25-camara-e2e-controller/README.md @@ -7,13 +7,13 @@ ## TeraFlowSDN Deployment ```bash cd ~/tfs-ctrl -source ~/tfs-ctrl/src/tests/ofc25/deploy_specs.sh +source ~/tfs-ctrl/src/tests/ofc25-camara-e2e-controller/deploy_specs.sh ./deploy/all.sh ``` ## Deploy scenario ```bash -cd ~/tfs-ctrl/src/tests/ofc25/ +cd ~/tfs-ctrl/src/tests/ofc25-camara-e2e-controller/ sudo containerlab deploy --topo eucnc24.clab.yml ``` diff --git a/src/tests/ofc25/__init__.py b/src/tests/ofc25-camara-e2e-controller/__init__.py similarity index 100% rename from src/tests/ofc25/__init__.py rename to src/tests/ofc25-camara-e2e-controller/__init__.py diff --git a/src/tests/ofc25/data/camara-e2e-topology.json b/src/tests/ofc25-camara-e2e-controller/data/camara-e2e-topology.json similarity index 100% rename from src/tests/ofc25/data/camara-e2e-topology.json rename to src/tests/ofc25-camara-e2e-controller/data/camara-e2e-topology.json diff --git a/src/tests/ofc25/data/slice/post_connection_group_to_network_slice1.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_connection_group_to_network_slice1.json similarity index 100% rename from src/tests/ofc25/data/slice/post_connection_group_to_network_slice1.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_connection_group_to_network_slice1.json diff --git a/src/tests/ofc25/data/slice/post_connection_group_to_network_slice2.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_connection_group_to_network_slice2.json similarity index 100% rename from src/tests/ofc25/data/slice/post_connection_group_to_network_slice2.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_connection_group_to_network_slice2.json diff --git a/src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice1.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_match_criteria_to_sdp1_in_slice1.json similarity index 100% rename from src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice1.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_match_criteria_to_sdp1_in_slice1.json diff --git a/src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice2.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_match_criteria_to_sdp1_in_slice2.json similarity index 100% rename from src/tests/ofc25/data/slice/post_match_criteria_to_sdp1_in_slice2.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_match_criteria_to_sdp1_in_slice2.json diff --git a/src/tests/ofc25/data/slice/post_network_slice1.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_network_slice1.json similarity index 100% rename from src/tests/ofc25/data/slice/post_network_slice1.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_network_slice1.json diff --git a/src/tests/ofc25/data/slice/post_network_slice2.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_network_slice2.json similarity index 100% rename from src/tests/ofc25/data/slice/post_network_slice2.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_network_slice2.json diff --git a/src/tests/ofc25/data/slice/post_sdp_to_network_slice1.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_sdp_to_network_slice1.json similarity index 100% rename from src/tests/ofc25/data/slice/post_sdp_to_network_slice1.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_sdp_to_network_slice1.json diff --git a/src/tests/ofc25/data/slice/post_sdp_to_network_slice2.json b/src/tests/ofc25-camara-e2e-controller/data/slice/post_sdp_to_network_slice2.json similarity index 100% rename from src/tests/ofc25/data/slice/post_sdp_to_network_slice2.json rename to src/tests/ofc25-camara-e2e-controller/data/slice/post_sdp_to_network_slice2.json diff --git a/src/tests/ofc25/data/target-full-ietf-slice.json b/src/tests/ofc25-camara-e2e-controller/data/target-full-ietf-slice.json similarity index 100% rename from src/tests/ofc25/data/target-full-ietf-slice.json rename to src/tests/ofc25-camara-e2e-controller/data/target-full-ietf-slice.json diff --git a/src/tests/ofc25/data/target-ietf-slice-posted-slices.json b/src/tests/ofc25-camara-e2e-controller/data/target-ietf-slice-posted-slices.json similarity index 100% rename from src/tests/ofc25/data/target-ietf-slice-posted-slices.json rename to src/tests/ofc25-camara-e2e-controller/data/target-ietf-slice-posted-slices.json diff --git a/src/tests/ofc25/data/target-ietf-slice-put-connection-groups.json b/src/tests/ofc25-camara-e2e-controller/data/target-ietf-slice-put-connection-groups.json similarity index 100% rename from src/tests/ofc25/data/target-ietf-slice-put-connection-groups.json rename to src/tests/ofc25-camara-e2e-controller/data/target-ietf-slice-put-connection-groups.json diff --git a/src/tests/ofc25/data/target-nce-app-flows.json b/src/tests/ofc25-camara-e2e-controller/data/target-nce-app-flows.json similarity index 100% rename from src/tests/ofc25/data/target-nce-app-flows.json rename to src/tests/ofc25-camara-e2e-controller/data/target-nce-app-flows.json diff --git a/src/tests/ofc25/data/target-nce-apps.json b/src/tests/ofc25-camara-e2e-controller/data/target-nce-apps.json similarity index 100% rename from src/tests/ofc25/data/target-nce-apps.json rename to src/tests/ofc25-camara-e2e-controller/data/target-nce-apps.json diff --git a/src/tests/ofc25/deploy_specs.sh b/src/tests/ofc25-camara-e2e-controller/deploy_specs.sh similarity index 100% rename from src/tests/ofc25/deploy_specs.sh rename to src/tests/ofc25-camara-e2e-controller/deploy_specs.sh diff --git a/src/tests/ofc25/redeploy-tfs.sh b/src/tests/ofc25-camara-e2e-controller/redeploy-tfs.sh similarity index 90% rename from src/tests/ofc25/redeploy-tfs.sh rename to src/tests/ofc25-camara-e2e-controller/redeploy-tfs.sh index a82dcbf25..d030596d7 100755 --- a/src/tests/ofc25/redeploy-tfs.sh +++ b/src/tests/ofc25-camara-e2e-controller/redeploy-tfs.sh @@ -13,5 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -source ~/tfs-ctrl/src/tests/ofc25/deploy_specs.sh +source ~/tfs-ctrl/src/tests/ofc25-camara-e2e-controller/deploy_specs.sh ./deploy/all.sh diff --git a/src/tests/ofc25/requirements.in b/src/tests/ofc25-camara-e2e-controller/requirements.in similarity index 100% rename from src/tests/ofc25/requirements.in rename to src/tests/ofc25-camara-e2e-controller/requirements.in diff --git a/src/tests/ofc25/scripts/run-e2e-ietf-slice-operations.sh b/src/tests/ofc25-camara-e2e-controller/scripts/run-e2e-ietf-slice-operations.sh similarity index 89% rename from src/tests/ofc25/scripts/run-e2e-ietf-slice-operations.sh rename to src/tests/ofc25-camara-e2e-controller/scripts/run-e2e-ietf-slice-operations.sh index 8996bfecd..6c41a85db 100755 --- a/src/tests/ofc25/scripts/run-e2e-ietf-slice-operations.sh +++ b/src/tests/ofc25-camara-e2e-controller/scripts/run-e2e-ietf-slice-operations.sh @@ -17,4 +17,4 @@ source /var/teraflow/tfs_runtime_env_vars.sh export PYTHONPATH=/var/teraflow pytest --verbose --log-level=INFO \ --junitxml=/opt/results/report_e2e_ietf_slice_operations.xml \ - /var/teraflow/tests/ofc25/tests/test_e2e_ietf_slice_operations.py + /var/teraflow/tests/ofc25-camara-e2e-controller/tests/test_e2e_ietf_slice_operations.py diff --git a/src/tests/ofc25/scripts/run-onboarding.sh b/src/tests/ofc25-camara-e2e-controller/scripts/run-onboarding.sh similarity index 91% rename from src/tests/ofc25/scripts/run-onboarding.sh rename to src/tests/ofc25-camara-e2e-controller/scripts/run-onboarding.sh index 689de9c5a..397d98d4b 100755 --- a/src/tests/ofc25/scripts/run-onboarding.sh +++ b/src/tests/ofc25-camara-e2e-controller/scripts/run-onboarding.sh @@ -17,4 +17,4 @@ source /var/teraflow/tfs_runtime_env_vars.sh export PYTHONPATH=/var/teraflow pytest --verbose --log-level=INFO \ --junitxml=/opt/results/report_onboarding.xml \ - /var/teraflow/tests/ofc25/tests/test_onboarding.py + /var/teraflow/tests/ofc25-camara-e2e-controller/tests/test_onboarding.py diff --git a/src/tests/ofc25-camara-e2e-controller/tests/Fixtures.py b/src/tests/ofc25-camara-e2e-controller/tests/Fixtures.py new file mode 100644 index 000000000..15978851f --- /dev/null +++ b/src/tests/ofc25-camara-e2e-controller/tests/Fixtures.py @@ -0,0 +1,43 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 pytest +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from monitoring.client.MonitoringClient import MonitoringClient +from service.client.ServiceClient import ServiceClient + +@pytest.fixture(scope='session') +def context_client(): + _client = ContextClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def device_client(): + _client = DeviceClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def monitoring_client(): + _client = MonitoringClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def service_client(): + _client = ServiceClient() + yield _client + _client.close() diff --git a/src/tests/ofc25/tests/Tools.py b/src/tests/ofc25-camara-e2e-controller/tests/Tools.py similarity index 100% rename from src/tests/ofc25/tests/Tools.py rename to src/tests/ofc25-camara-e2e-controller/tests/Tools.py diff --git a/src/tests/ofc25/tests/__init__.py b/src/tests/ofc25-camara-e2e-controller/tests/__init__.py similarity index 100% rename from src/tests/ofc25/tests/__init__.py rename to src/tests/ofc25-camara-e2e-controller/tests/__init__.py diff --git a/src/tests/ofc25/tests/test_e2e_ietf_slice_operations.py b/src/tests/ofc25-camara-e2e-controller/tests/test_e2e_ietf_slice_operations.py similarity index 100% rename from src/tests/ofc25/tests/test_e2e_ietf_slice_operations.py rename to src/tests/ofc25-camara-e2e-controller/tests/test_e2e_ietf_slice_operations.py diff --git a/src/tests/ofc25/tests/test_onboarding.py b/src/tests/ofc25-camara-e2e-controller/tests/test_onboarding.py similarity index 100% rename from src/tests/ofc25/tests/test_onboarding.py rename to src/tests/ofc25-camara-e2e-controller/tests/test_onboarding.py -- GitLab From 95bec6f11e391842a8c88d155bbe7f07c1a2a6a5 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sun, 19 Jan 2025 21:00:17 +0100 Subject: [PATCH 196/463] refactoring: - ofc25 in ofc25-camara-e2e demo changed to camara e2e - ofc25 readme updated --- .../.gitlab-ci.yml | 6 +- .../ofc25-camara-e2e-controller/README.md | 79 ------------------- 2 files changed, 3 insertions(+), 82 deletions(-) diff --git a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml index 49eaba523..388a28434 100644 --- a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml @@ -15,7 +15,7 @@ # Build, tag, and push the Docker images to the GitLab Docker registry build ofc25: variables: - TEST_NAME: 'ofc25' + TEST_NAME: 'ofc25_camara_e2e' NCE_NAME: 'nce' AGG_NET_NAME: 'agg_net' NCE_PORT: '9090' @@ -51,9 +51,9 @@ build ofc25: - .gitlab-ci.yml # Deploy TeraFlowSDN and Execute end-2-end test -end2end_test ofc25: +end2end_test ofc25_camara_e2e: variables: - TEST_NAME: 'ofc25' + TEST_NAME: 'ofc25_camara_e2e' NCE_NAME: 'nce' AGG_NET_NAME: 'agg_net' NCE_PORT: '9090' diff --git a/src/tests/ofc25-camara-e2e-controller/README.md b/src/tests/ofc25-camara-e2e-controller/README.md index 187f156f6..9c200ce4e 100644 --- a/src/tests/ofc25-camara-e2e-controller/README.md +++ b/src/tests/ofc25-camara-e2e-controller/README.md @@ -16,82 +16,3 @@ source ~/tfs-ctrl/src/tests/ofc25-camara-e2e-controller/deploy_specs.sh cd ~/tfs-ctrl/src/tests/ofc25-camara-e2e-controller/ sudo containerlab deploy --topo eucnc24.clab.yml ``` - -## Inspect scenario -```bash -cd ~/tfs-ctrl/src/tests/eucnc24/ -sudo containerlab inspect --topo eucnc24.clab.yml -``` - -## Destroy scenario -```bash -cd ~/tfs-ctrl/src/tests/eucnc24/ -sudo containerlab destroy --topo eucnc24.clab.yml -sudo rm -rf clab-eucnc24/ .eucnc24.clab.yml.bak -``` - -## Access cEOS Bash/CLI -```bash -docker exec -it clab-eucnc24-r1 bash -docker exec -it clab-eucnc24-r2 bash -docker exec -it clab-eucnc24-r3 bash -docker exec -it clab-eucnc24-r1 Cli -docker exec -it clab-eucnc24-r2 Cli -docker exec -it clab-eucnc24-r3 Cli -``` - -## Configure ContainerLab clients -```bash -docker exec -it clab-eucnc24-dc1 bash - ip address add 172.16.1.10/24 dev eth1 - ip route add 172.16.2.0/24 via 172.16.1.1 - ping 172.16.2.10 - -docker exec -it clab-eucnc24-dc2 bash - ip address add 172.16.2.10/24 dev eth1 - ip route add 172.16.1.0/24 via 172.16.2.1 - ping 172.16.1.10 -``` - -## Install gNMIc -```bash -sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)" -``` - -## gNMI Capabilities request -```bash -gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure capabilities -``` - -## gNMI Get request -```bash -gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path / > r1.json -gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /interfaces/interface > r1-ifaces.json -``` - -## gNMI Set request -```bash -gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --update-path /system/config/hostname --update-value srl11 -gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /system/config/hostname -``` - -## Subscribe request -```bash -gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf subscribe --path /interfaces/interface[name=Management0]/state/ - -# In another terminal, you can generate traffic opening SSH connection -ssh admin@clab-eucnc24-r1 -``` - -# Check configurations done: -```bash -gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/network-instances' > r1-nis.json -gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/interfaces' > r1-ifs.json -``` - -# Delete elements: -```bash ---address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/network-instances/network-instance[name=b19229e8]' ---address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/1]/subinterfaces/subinterface[index=0]' ---address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/2]/subinterfaces/subinterface[index=0]' -``` -- GitLab From 4781c27ef09e9cee38b934bdf85009c6123dc3b1 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sun, 19 Jan 2025 21:24:23 +0100 Subject: [PATCH 197/463] l3vpn driver: - l3vpn post, delete, put requests uncommented - l3vpn put request url temporarily fixed for integration --- src/device/service/drivers/ietf_l3vpn/TfsApiClient.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py index b05278fa0..1ca965f87 100644 --- a/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py +++ b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py @@ -160,7 +160,7 @@ class TfsApiClient: def create_connectivity_service(self, l3vpn_data: dict) -> None: try: - # requests.post(self._l3vpn_url, json=l3vpn_data) + requests.post(self._l3vpn_url, json=l3vpn_data) LOGGER.debug( "[create_connectivity_service] l3vpn_data={:s}".format(str(l3vpn_data)) ) @@ -168,8 +168,10 @@ class TfsApiClient: raise Exception("faild to send post request to TFS L3VPN NBI") def update_connectivity_service(self, l3vpn_data: dict) -> None: + vpn_id = l3vpn_data['ietf-l3vpn-svc:l3vpn-svc']["vpn-services"]["vpn-service"][0]["vpn-id"] + url = self._l3vpn_url + f"/vpn-service={vpn_id}" try: - # requests.post(self._l3vpn_url, json=l3vpn_data) + requests.put(url, json=l3vpn_data) LOGGER.debug( "[update_connectivity_service] l3vpn_data={:s}".format(str(l3vpn_data)) ) @@ -179,7 +181,7 @@ class TfsApiClient: def delete_connectivity_service(self, service_uuid: str) -> None: url = self._l3vpn_url + f"/vpn-service={service_uuid}" try: - # requests.delete(url, auth=self._auth) + requests.delete(url, auth=self._auth) LOGGER.debug("[delete_connectivity_service] url={:s}".format(str(url))) except requests.exceptions.ConnectionError: raise Exception("faild to send delete request to TFS L3VPN NBI") -- GitLab From f1f40ca4dc8b375045fb3b4e1bd30e88a0035e63 Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 20 Jan 2025 16:49:33 +0100 Subject: [PATCH 198/463] debug: source and destination bandwidths replaced in l3vpn service handler --- .../l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py index fb4af6cd2..c43338a70 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py @@ -86,7 +86,7 @@ def extract_qos_info_from_connection_group( == "ietf-network-slice-service:one-way-bandwidth" and metric_bound["metric-unit"] == "Mbps" ): - bandwidth = int(metric_bound["bound"]) * 1e6 + bandwidth = int(metric_bound["bound"]) * 1000000 return max_delay, bandwidth src_cc = next( @@ -103,11 +103,11 @@ def extract_qos_info_from_connection_group( dst_max_delay, dst_bandwidth = extract_qos_info(dst_cc) return QoSInfo( src_qos_profile_latency=src_max_delay, - src_input_bw=dst_bandwidth, - src_output_bw=src_bandwidth, + src_input_bw=src_bandwidth, + src_output_bw=dst_bandwidth, dst_qos_profile_latency=dst_max_delay, - dst_input_bw=src_bandwidth, - dst_output_bw=dst_bandwidth, + dst_input_bw=dst_bandwidth, + dst_output_bw=src_bandwidth, ) -- GitLab From 0fd39e8677a48bcef1619942fdc94b44aec713cd Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 20 Jan 2025 16:51:56 +0100 Subject: [PATCH 199/463] ofc25-camara-agg-net-controller test added --- .../.gitignore | 5 + .../.gitlab-ci.yml | 114 +++ .../Dockerfile | 84 ++ .../ofc25-camara-agg-net-controller/README.md | 13 + .../__init__.py | 14 + .../data/agg-net-descriptor.json | 858 ++++++++++++++++++ .../pc1_slice1_post_ietf_network_slice.json | 190 ++++ .../pc1_slice1_put_ietf_network_slice.json | 58 ++ .../pc1_slice2_post_ietf_network_slice.json | 190 ++++ .../pc1_slice2_put_ietf_network_slice.json | 58 ++ .../pc2_slice1_put_ietf_network_slice.json | 58 ++ .../pc2_slice2_put_ietf_network_slice.json | 58 ++ .../data/target-l3vpn-slice1-stages.json | 557 ++++++++++++ .../data/target-l3vpn-slice2-stages.json | 557 ++++++++++++ .../deploy_specs.sh | 208 +++++ .../redeploy-tfs.sh | 17 + .../report_e2e_ietf_l3vpn_operations.xml | 1 + .../report_e2e_ietf_slice_operations.xml | 1 + .../report_onboarding.xml | 1 + .../requirements.in | 30 + .../run-agg-net-ietf-slice-operations.sh | 20 + .../scripts/run-onboarding.sh | 20 + .../tests/Fixtures.py | 43 + .../tests/Tools.py | 109 +++ .../tests/__init__.py | 14 + .../test_agg_net_ietf_slice_operations.py | 206 +++++ .../tests/test_onboarding.py | 67 ++ 27 files changed, 3551 insertions(+) create mode 100644 src/tests/ofc25-camara-agg-net-controller/.gitignore create mode 100644 src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml create mode 100644 src/tests/ofc25-camara-agg-net-controller/Dockerfile create mode 100644 src/tests/ofc25-camara-agg-net-controller/README.md create mode 100644 src/tests/ofc25-camara-agg-net-controller/__init__.py create mode 100644 src/tests/ofc25-camara-agg-net-controller/data/agg-net-descriptor.json create mode 100644 src/tests/ofc25-camara-agg-net-controller/data/pc1_slice1_post_ietf_network_slice.json create mode 100644 src/tests/ofc25-camara-agg-net-controller/data/pc1_slice1_put_ietf_network_slice.json create mode 100644 src/tests/ofc25-camara-agg-net-controller/data/pc1_slice2_post_ietf_network_slice.json create mode 100644 src/tests/ofc25-camara-agg-net-controller/data/pc1_slice2_put_ietf_network_slice.json create mode 100644 src/tests/ofc25-camara-agg-net-controller/data/pc2_slice1_put_ietf_network_slice.json create mode 100644 src/tests/ofc25-camara-agg-net-controller/data/pc2_slice2_put_ietf_network_slice.json create mode 100644 src/tests/ofc25-camara-agg-net-controller/data/target-l3vpn-slice1-stages.json create mode 100644 src/tests/ofc25-camara-agg-net-controller/data/target-l3vpn-slice2-stages.json create mode 100755 src/tests/ofc25-camara-agg-net-controller/deploy_specs.sh create mode 100755 src/tests/ofc25-camara-agg-net-controller/redeploy-tfs.sh create mode 100644 src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_l3vpn_operations.xml create mode 100644 src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_slice_operations.xml create mode 100644 src/tests/ofc25-camara-agg-net-controller/report_onboarding.xml create mode 100644 src/tests/ofc25-camara-agg-net-controller/requirements.in create mode 100755 src/tests/ofc25-camara-agg-net-controller/scripts/run-agg-net-ietf-slice-operations.sh create mode 100755 src/tests/ofc25-camara-agg-net-controller/scripts/run-onboarding.sh create mode 100644 src/tests/ofc25-camara-agg-net-controller/tests/Fixtures.py create mode 100644 src/tests/ofc25-camara-agg-net-controller/tests/Tools.py create mode 100644 src/tests/ofc25-camara-agg-net-controller/tests/__init__.py create mode 100644 src/tests/ofc25-camara-agg-net-controller/tests/test_agg_net_ietf_slice_operations.py create mode 100644 src/tests/ofc25-camara-agg-net-controller/tests/test_onboarding.py diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitignore b/src/tests/ofc25-camara-agg-net-controller/.gitignore new file mode 100644 index 000000000..24a4b2333 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/.gitignore @@ -0,0 +1,5 @@ +clab-*/ +images/ +*.clab.yml.bak +*.tar +*.tar.gz diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml new file mode 100644 index 000000000..9469568ca --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -0,0 +1,114 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Build, tag, and push the Docker images to the GitLab Docker registry +build ofc25: + variables: + TEST_NAME: 'ofc25_camara_agg_net' + IP_NAME: 'ip' + IP_PORT: '9090' + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') + - sed -i "s/IP_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json + - sed -i "s/IP_NET_PORT/${IP_PORT}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json + - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . + - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + - docker buildx build -t "${IP_NAME}:latest" -f ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile . + - docker tag "${IP_NAME}:latest" "$CI_REGISTRY_IMAGE/${IP_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${IP_NAME}:latest" + after_script: + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/tests/${TEST_NAME}/**/*.{py,in,sh,yml} + - src/tests/${TEST_NAME}/Dockerfile + - .gitlab-ci.yml + +# Deploy TeraFlowSDN and Execute end-2-end test +end2end_test ofc25_camara_agg_net: + variables: + TEST_NAME: 'ofc25_camara_agg_net' + IP_NAME: 'ip' + IP_PORT: '9090' + stage: end2end_test + # Disable to force running it after all other tasks + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - docker rm -f ${TEST_NAME} || true + - docker pull "${CI_REGISTRY_IMAGE}/${IP_NAME}:latest" + - docker run -d --name ${IP_NAME} -p ${IP_PORT}:8443 $CI_REGISTRY_IMAGE/${IP_NAME}:latest + + script: + # Download Docker image to run the test + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}:latest" + + # Check MicroK8s is ready + - microk8s status --wait-ready + - kubectl get pods --all-namespaces + + - source src/tests/${TEST_NAME}/deploy_specs.sh + + # Deploy TeraFlowSDN + - ./deploy/crdb.sh + - ./deploy/nats.sh + - ./deploy/qdb.sh + - ./deploy/kafka.sh + - ./deploy/tfs.sh + - ./deploy/show.sh + + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + + # Run end-to-end test: onboard scenario + - > + docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-onboarding.sh + + # Run end-to-end test: configure service TFS + - > + docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-e2e-ietf-slice-operations.sh + + after_script: + - kubectl --namespace tfs logs deployment/contextservice -c server + - kubectl --namespace tfs logs deployment/deviceservice -c server + - kubectl --namespace tfs logs deployment/pathcompservice -c frontend + - kubectl --namespace tfs logs deployment/serviceservice -c server + - kubectl --namespace tfs logs deployment/nbiservice -c server + + # Destroy Scenario + - kubectl delete namespaces tfs || true + + # Clean old docker images + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + + #coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + artifacts: + when: always + reports: + junit: ./src/tests/${TEST_NAME}/report_*.xml diff --git a/src/tests/ofc25-camara-agg-net-controller/Dockerfile b/src/tests/ofc25-camara-agg-net-controller/Dockerfile new file mode 100644 index 000000000..36ab9d366 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/Dockerfile @@ -0,0 +1,84 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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 + +# Install dependencies +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install wget g++ git && \ + rm -rf /var/lib/apt/lists/* + +# 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 + +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + +# Add common files into working directory +WORKDIR /var/teraflow/common +COPY src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto +RUN touch __init__.py +COPY proto/*.proto ./ +RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto +RUN rm *.proto +RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; + +# Create component sub-folders, get specific Python packages +RUN mkdir -p /var/teraflow/tests/ofc25-camara-agg-net-controller +WORKDIR /var/teraflow/tests/ofc25-camara-agg-net-controller +COPY src/tests/ofc25-camara-agg-net-controller/requirements.in requirements.in +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +# Add component files into working directory +WORKDIR /var/teraflow +COPY src/__init__.py ./__init__.py +COPY src/common/*.py ./common/ +COPY src/common/tests/. ./common/tests/ +COPY src/common/tools/. ./common/tools/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ +COPY src/monitoring/__init__.py monitoring/__init__.py +COPY src/monitoring/client/. monitoring/client/ +COPY src/service/__init__.py service/__init__.py +COPY src/service/client/. service/client/ +COPY src/slice/__init__.py slice/__init__.py +COPY src/slice/client/. slice/client/ +COPY src/tests/*.py ./tests/ +COPY src/tests/ofc25-camara-agg-net-controller/__init__.py ./tests/ofc25-camara-agg-net-controller/__init__.py +COPY src/tests/ofc25-camara-agg-net-controller/data/. ./tests/ofc25-camara-agg-net-controller/data/ +COPY src/tests/ofc25-camara-agg-net-controller/tests/. ./tests/ofc25-camara-agg-net-controller/tests/ +COPY src/tests/ofc25-camara-agg-net-controller/scripts/. ./ + +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install tree && \ + rm -rf /var/lib/apt/lists/* + +RUN tree -la /var/teraflow diff --git a/src/tests/ofc25-camara-agg-net-controller/README.md b/src/tests/ofc25-camara-agg-net-controller/README.md new file mode 100644 index 000000000..a60c6f2bc --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/README.md @@ -0,0 +1,13 @@ +# DataPlane-in-a-Box - Control an Emulated DataPlane through TeraFlowSDN + +## Emulated DataPlane Deployment +- Scenario +- Descriptor + +## TeraFlowSDN Deployment +```bash +cd ~/tfs-ctrl +source ~/tfs-ctrl/src/tests/ofc25-camara-agg-net-controller/deploy_specs.sh +./deploy/all.sh +``` + diff --git a/src/tests/ofc25-camara-agg-net-controller/__init__.py b/src/tests/ofc25-camara-agg-net-controller/__init__.py new file mode 100644 index 000000000..3ccc21c7d --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ofc25-camara-agg-net-controller/data/agg-net-descriptor.json b/src/tests/ofc25-camara-agg-net-controller/data/agg-net-descriptor.json new file mode 100644 index 000000000..5874fd3b4 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/data/agg-net-descriptor.json @@ -0,0 +1,858 @@ +{ + "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": "ip-net-controller" + } + }, + "name": "ip-net-controller", + "device_type": "ip-sdn-controller", + "device_operational_status": 1, + "device_drivers": [ + 13 + ], + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "192.168.1.27" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "9090" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + } + ], + "scheme": "http", + "username": "admin", + "password": "admin", + "base_url": "/restconf/v2/data", + "timeout": 120, + "verify": false + } + } + } + ] + }, + "device_endpoints": [] + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "name": "172.16.182.25", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 13 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "address_ip": "128.32.33.254", + "address_prefix": "24", + "site_location": "access" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "name": "172.16.185.31", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 13 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "name": "172.16.185.33", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 13 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "name": "172.16.185.32", + "device_type": "emu-packet-router", + "controller_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "device_operational_status": 1, + "device_drivers": [ + 13 + ], + "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": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + }, + { + "uuid": "200", + "name": "200", + "type": "optical", + "address_ip": "172.10.33.254", + "address_prefix": "24", + "site_location": "cloud" + }, + { + "uuid": "500", + "name": "500", + "type": "optical" + }, + { + "uuid": "501", + "name": "501", + "type": "optical" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "device_type": "emu-datacenter", + "device_drivers": [ + 0 + ], + "device_endpoints": [], + "device_operational_status": 1, + "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", + "uuid": "500" + }, + { + "sample_types": [], + "type": "optical", + "uuid": "200" + }, + { + "sample_types": [], + "type": "optical", + "uuid": "201" + } + ] + } + } + } + ] + } + } + ], + "links": [ + { + "link_id": { + "link_uuid": { + "uuid": "ip-net-controller/mgmt==172.16.182.25/mgmt" + } + }, + "name": "ip-net-controller/mgmt==172.16.182.25/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "ip-net-controller/mgmt==172.16.185.31/mgmt" + } + }, + "name": "ip-net-controller/mgmt==172.16.185.31/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "ip-net-controller/mgmt==172.16.185.33/mgmt" + } + }, + "name": "ip-net-controller/mgmt==172.16.185.33/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "ip-net-controller/mgmt==172.16.185.32/mgmt" + } + }, + "name": "ip-net-controller/mgmt==172.16.185.32/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-500" + } + }, + "name": "172.16.182.25-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.33-500" + } + }, + "name": "172.16.185.33-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.182.25-501" + } + }, + "name": "172.16.182.25-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.31-501" + } + }, + "name": "172.16.185.31-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.31-500" + } + }, + "name": "172.16.185.31-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-500" + } + }, + "name": "172.16.185.32-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.33-501" + } + }, + "name": "172.16.185.33-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-501" + } + }, + "name": "172.16.185.32-501", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "501" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-200" + } + }, + "name": "172.16.185.32-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.204.220-500" + } + }, + "name": "172.16.204.220-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] + } + ] +} diff --git a/src/tests/ofc25-camara-agg-net-controller/data/pc1_slice1_post_ietf_network_slice.json b/src/tests/ofc25-camara-agg-net-controller/data/pc1_slice1_post_ietf_network_slice.json new file mode 100644 index 000000000..ac1f09dd8 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/data/pc1_slice1_post_ietf_network_slice.json @@ -0,0 +1,190 @@ +{ + "network-slice-services": { + "slice-service": [ + { + "connection-groups": { + "connection-group": [ + { + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 10, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 5000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 20, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 1000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" + } + ] + }, + "description": "dsc", + "id": "slice1", + "sdps": { + "sdp": [ + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-node-id": "172.16.185.32", + "ac-tp-id": "200", + "description": "dsc", + "id": "0" + } + ] + }, + "id": "1", + "node-id": "172.16.185.32", + "sdp-ip-address": [ + "172.16.185.32" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "101" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + } + }, + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-node-id": "172.16.182.25", + "ac-tp-id": "200", + "description": "dsc", + "id": "0" + } + ] + }, + "id": "2", + "node-id": "172.16.182.25", + "sdp-ip-address": [ + "172.16.182.25" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "21" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.101.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + } + } + ] + } + } + ] + } +} diff --git a/src/tests/ofc25-camara-agg-net-controller/data/pc1_slice1_put_ietf_network_slice.json b/src/tests/ofc25-camara-agg-net-controller/data/pc1_slice1_put_ietf_network_slice.json new file mode 100644 index 000000000..690a84d91 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/data/pc1_slice1_put_ietf_network_slice.json @@ -0,0 +1,58 @@ +{ + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 10, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 5000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 20, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 1000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" + } diff --git a/src/tests/ofc25-camara-agg-net-controller/data/pc1_slice2_post_ietf_network_slice.json b/src/tests/ofc25-camara-agg-net-controller/data/pc1_slice2_post_ietf_network_slice.json new file mode 100644 index 000000000..079239a8b --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/data/pc1_slice2_post_ietf_network_slice.json @@ -0,0 +1,190 @@ +{ + "network-slice-services": { + "slice-service": [ + { + "connection-groups": { + "connection-group": [ + { + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 10, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 5000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 20, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 1000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" + } + ] + }, + "description": "dsc", + "id": "slice2", + "sdps": { + "sdp": [ + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-node-id": "172.16.185.32", + "ac-tp-id": "200", + "description": "dsc", + "id": "0" + } + ] + }, + "id": "1", + "node-id": "172.16.185.32", + "sdp-ip-address": [ + "172.16.185.32" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "201" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10200" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10500" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + } + }, + { + "attachment-circuits": { + "attachment-circuit": [ + { + "ac-node-id": "172.16.182.25", + "ac-tp-id": "200", + "description": "dsc", + "id": "0" + } + ] + }, + "id": "2", + "node-id": "172.16.182.25", + "sdp-ip-address": [ + "172.16.182.25" + ], + "service-match-criteria": { + "match-criterion": [ + { + "index": 1, + "match-type": [ + { + "type": "ietf-network-slice-service:vlan", + "value": [ + "31" + ] + }, + { + "type": "ietf-network-slice-service:source-ip-prefix", + "value": [ + "172.16.104.221/24" + ] + }, + { + "type": "ietf-network-slice-service:source-tcp-port", + "value": [ + "10500" + ] + }, + { + "type": "ietf-network-slice-service:destination-ip-prefix", + "value": [ + "172.1.201.22/24" + ] + }, + { + "type": "ietf-network-slice-service:destination-tcp-port", + "value": [ + "10200" + ] + } + ], + "target-connection-group-id": "line1" + } + ] + } + } + ] + } + } + ] + } +} diff --git a/src/tests/ofc25-camara-agg-net-controller/data/pc1_slice2_put_ietf_network_slice.json b/src/tests/ofc25-camara-agg-net-controller/data/pc1_slice2_put_ietf_network_slice.json new file mode 100644 index 000000000..948276a5a --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/data/pc1_slice2_put_ietf_network_slice.json @@ -0,0 +1,58 @@ +{ + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 10, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 5000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 20, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 1000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" +} diff --git a/src/tests/ofc25-camara-agg-net-controller/data/pc2_slice1_put_ietf_network_slice.json b/src/tests/ofc25-camara-agg-net-controller/data/pc2_slice1_put_ietf_network_slice.json new file mode 100644 index 000000000..66e386c48 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/data/pc2_slice1_put_ietf_network_slice.json @@ -0,0 +1,58 @@ +{ + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 10, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 10000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 20, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 2000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" +} diff --git a/src/tests/ofc25-camara-agg-net-controller/data/pc2_slice2_put_ietf_network_slice.json b/src/tests/ofc25-camara-agg-net-controller/data/pc2_slice2_put_ietf_network_slice.json new file mode 100644 index 000000000..66e386c48 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/data/pc2_slice2_put_ietf_network_slice.json @@ -0,0 +1,58 @@ +{ + "connectivity-construct": [ + { + "id": 1, + "p2p-receiver-sdp": "2", + "p2p-sender-sdp": "1", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 10, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 10000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + }, + { + "id": 2, + "p2p-receiver-sdp": "1", + "p2p-sender-sdp": "2", + "service-slo-sle-policy": { + "slo-policy": { + "metric-bound": [ + { + "bound": 20, + "metric-type": "ietf-network-slice-service:one-way-delay-maximum", + "metric-unit": "milliseconds" + }, + { + "bound": 2000, + "metric-type": "ietf-network-slice-service:one-way-bandwidth", + "metric-unit": "Mbps" + }, + { + "metric-type": "ietf-network-slice-service:two-way-packet-loss", + "metric-unit": "percentage", + "percentile-value": 0.001 + } + ] + } + } + } + ], + "connectivity-type": "point-to-point", + "id": "line1" +} diff --git a/src/tests/ofc25-camara-agg-net-controller/data/target-l3vpn-slice1-stages.json b/src/tests/ofc25-camara-agg-net-controller/data/target-l3vpn-slice1-stages.json new file mode 100644 index 000000000..5e75b0ff7 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/data/target-l3vpn-slice1-stages.json @@ -0,0 +1,557 @@ +[ + { + "ietf-l3vpn-svc:l3vpn-svc": { + "sites": { + "site": [ + { + "devices": { + "device": [ + { + "device-id": "172.16.185.32", + "location": "cloud" + } + ] + }, + "locations": { + "location": [ + { + "location-id": "cloud" + } + ] + }, + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "routing-protocols": { + "routing-protocol": [ + { + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.16.104.221/24", + "lan-tag": "101", + "next-hop": "172.10.33.254" + } + ] + } + }, + "type": "ietf-l3vpn-svc:static" + } + ] + }, + "site-id": "site_cloud", + "site-network-accesses": { + "site-network-access": [ + { + "device-reference": "172.16.185.32", + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "customer-address": "172.10.33.254", + "prefix-length": "24", + "provider-address": "172.10.33.254" + } + } + }, + "service": { + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + } + } + ] + } + } + }, + "svc-input-bandwidth": 5000000000, + "svc-mtu": 1500, + "svc-output-bandwidth": 1000000000 + }, + "site-network-access-id": "200", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "vpn-attachment": { + "site-role": "ietf-l3vpn-svc:hub-role", + "vpn-id": "slice1" + } + } + ] + } + }, + { + "devices": { + "device": [ + { + "device-id": "172.16.182.25", + "location": "access" + } + ] + }, + "locations": { + "location": [ + { + "location-id": "access" + } + ] + }, + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "routing-protocols": { + "routing-protocol": [ + { + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.101.22/24", + "lan-tag": "21", + "next-hop": "128.32.33.254" + } + ] + } + }, + "type": "ietf-l3vpn-svc:static" + } + ] + }, + "site-id": "site_access", + "site-network-accesses": { + "site-network-access": [ + { + "device-reference": "172.16.182.25", + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "customer-address": "128.32.33.254", + "prefix-length": "24", + "provider-address": "128.32.33.254" + } + } + }, + "service": { + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 20 + } + } + ] + } + } + }, + "svc-input-bandwidth": 1000000000, + "svc-mtu": 1500, + "svc-output-bandwidth": 5000000000 + }, + "site-network-access-id": "200", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "vpn-attachment": { + "site-role": "ietf-l3vpn-svc:spoke-role", + "vpn-id": "slice1" + } + } + ] + } + } + ] + }, + "vpn-services": { + "vpn-service": [ + { + "vpn-id": "slice1" + } + ] + } + } + }, + { + "ietf-l3vpn-svc:l3vpn-svc": { + "sites": { + "site": [ + { + "devices": { + "device": [ + { + "device-id": "172.16.185.32", + "location": "cloud" + } + ] + }, + "locations": { + "location": [ + { + "location-id": "cloud" + } + ] + }, + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "routing-protocols": { + "routing-protocol": [ + { + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.16.104.221/24", + "lan-tag": "101", + "next-hop": "172.10.33.254" + } + ] + } + }, + "type": "ietf-l3vpn-svc:static" + } + ] + }, + "site-id": "site_cloud", + "site-network-accesses": { + "site-network-access": [ + { + "device-reference": "172.16.185.32", + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "customer-address": "172.10.33.254", + "prefix-length": "24", + "provider-address": "172.10.33.254" + } + } + }, + "service": { + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + } + } + ] + } + } + }, + "svc-input-bandwidth": 10000000000, + "svc-mtu": 1500, + "svc-output-bandwidth": 2000000000 + }, + "site-network-access-id": "200", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "vpn-attachment": { + "site-role": "ietf-l3vpn-svc:hub-role", + "vpn-id": "slice1" + } + } + ] + } + }, + { + "devices": { + "device": [ + { + "device-id": "172.16.182.25", + "location": "access" + } + ] + }, + "locations": { + "location": [ + { + "location-id": "access" + } + ] + }, + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "routing-protocols": { + "routing-protocol": [ + { + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.101.22/24", + "lan-tag": "21", + "next-hop": "128.32.33.254" + } + ] + } + }, + "type": "ietf-l3vpn-svc:static" + } + ] + }, + "site-id": "site_access", + "site-network-accesses": { + "site-network-access": [ + { + "device-reference": "172.16.182.25", + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "customer-address": "128.32.33.254", + "prefix-length": "24", + "provider-address": "128.32.33.254" + } + } + }, + "service": { + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 20 + } + } + ] + } + } + }, + "svc-input-bandwidth": 2000000000, + "svc-mtu": 1500, + "svc-output-bandwidth": 10000000000 + }, + "site-network-access-id": "200", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "vpn-attachment": { + "site-role": "ietf-l3vpn-svc:spoke-role", + "vpn-id": "slice1" + } + } + ] + } + } + ] + }, + "vpn-services": { + "vpn-service": [ + { + "vpn-id": "slice1" + } + ] + } + } + }, + { + "ietf-l3vpn-svc:l3vpn-svc": { + "sites": { + "site": [ + { + "devices": { + "device": [ + { + "device-id": "172.16.185.32", + "location": "cloud" + } + ] + }, + "locations": { + "location": [ + { + "location-id": "cloud" + } + ] + }, + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "routing-protocols": { + "routing-protocol": [ + { + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.16.104.221/24", + "lan-tag": "101", + "next-hop": "172.10.33.254" + } + ] + } + }, + "type": "ietf-l3vpn-svc:static" + } + ] + }, + "site-id": "site_cloud", + "site-network-accesses": { + "site-network-access": [ + { + "device-reference": "172.16.185.32", + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "customer-address": "172.10.33.254", + "prefix-length": "24", + "provider-address": "172.10.33.254" + } + } + }, + "service": { + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + } + } + ] + } + } + }, + "svc-input-bandwidth": 5000000000, + "svc-mtu": 1500, + "svc-output-bandwidth": 1000000000 + }, + "site-network-access-id": "200", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "vpn-attachment": { + "site-role": "ietf-l3vpn-svc:hub-role", + "vpn-id": "slice1" + } + } + ] + } + }, + { + "devices": { + "device": [ + { + "device-id": "172.16.182.25", + "location": "access" + } + ] + }, + "locations": { + "location": [ + { + "location-id": "access" + } + ] + }, + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "routing-protocols": { + "routing-protocol": [ + { + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.101.22/24", + "lan-tag": "21", + "next-hop": "128.32.33.254" + } + ] + } + }, + "type": "ietf-l3vpn-svc:static" + } + ] + }, + "site-id": "site_access", + "site-network-accesses": { + "site-network-access": [ + { + "device-reference": "172.16.182.25", + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "customer-address": "128.32.33.254", + "prefix-length": "24", + "provider-address": "128.32.33.254" + } + } + }, + "service": { + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 20 + } + } + ] + } + } + }, + "svc-input-bandwidth": 1000000000, + "svc-mtu": 1500, + "svc-output-bandwidth": 5000000000 + }, + "site-network-access-id": "200", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "vpn-attachment": { + "site-role": "ietf-l3vpn-svc:spoke-role", + "vpn-id": "slice1" + } + } + ] + } + } + ] + }, + "vpn-services": { + "vpn-service": [ + { + "vpn-id": "slice1" + } + ] + } + } + } +] diff --git a/src/tests/ofc25-camara-agg-net-controller/data/target-l3vpn-slice2-stages.json b/src/tests/ofc25-camara-agg-net-controller/data/target-l3vpn-slice2-stages.json new file mode 100644 index 000000000..216287af8 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/data/target-l3vpn-slice2-stages.json @@ -0,0 +1,557 @@ +[ + { + "ietf-l3vpn-svc:l3vpn-svc": { + "sites": { + "site": [ + { + "devices": { + "device": [ + { + "device-id": "172.16.185.32", + "location": "cloud" + } + ] + }, + "locations": { + "location": [ + { + "location-id": "cloud" + } + ] + }, + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "routing-protocols": { + "routing-protocol": [ + { + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.16.104.221/24", + "lan-tag": "201", + "next-hop": "172.10.33.254" + } + ] + } + }, + "type": "ietf-l3vpn-svc:static" + } + ] + }, + "site-id": "site_cloud", + "site-network-accesses": { + "site-network-access": [ + { + "device-reference": "172.16.185.32", + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "customer-address": "172.10.33.254", + "prefix-length": "24", + "provider-address": "172.10.33.254" + } + } + }, + "service": { + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + } + } + ] + } + } + }, + "svc-input-bandwidth": 5000000000, + "svc-mtu": 1500, + "svc-output-bandwidth": 1000000000 + }, + "site-network-access-id": "200", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "vpn-attachment": { + "site-role": "ietf-l3vpn-svc:hub-role", + "vpn-id": "slice2" + } + } + ] + } + }, + { + "devices": { + "device": [ + { + "device-id": "172.16.182.25", + "location": "access" + } + ] + }, + "locations": { + "location": [ + { + "location-id": "access" + } + ] + }, + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "routing-protocols": { + "routing-protocol": [ + { + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.201.22/24", + "lan-tag": "31", + "next-hop": "128.32.33.254" + } + ] + } + }, + "type": "ietf-l3vpn-svc:static" + } + ] + }, + "site-id": "site_access", + "site-network-accesses": { + "site-network-access": [ + { + "device-reference": "172.16.182.25", + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "customer-address": "128.32.33.254", + "prefix-length": "24", + "provider-address": "128.32.33.254" + } + } + }, + "service": { + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 20 + } + } + ] + } + } + }, + "svc-input-bandwidth": 1000000000, + "svc-mtu": 1500, + "svc-output-bandwidth": 5000000000 + }, + "site-network-access-id": "200", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "vpn-attachment": { + "site-role": "ietf-l3vpn-svc:spoke-role", + "vpn-id": "slice2" + } + } + ] + } + } + ] + }, + "vpn-services": { + "vpn-service": [ + { + "vpn-id": "slice2" + } + ] + } + } + }, + { + "ietf-l3vpn-svc:l3vpn-svc": { + "sites": { + "site": [ + { + "devices": { + "device": [ + { + "device-id": "172.16.185.32", + "location": "cloud" + } + ] + }, + "locations": { + "location": [ + { + "location-id": "cloud" + } + ] + }, + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "routing-protocols": { + "routing-protocol": [ + { + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.16.104.221/24", + "lan-tag": "201", + "next-hop": "172.10.33.254" + } + ] + } + }, + "type": "ietf-l3vpn-svc:static" + } + ] + }, + "site-id": "site_cloud", + "site-network-accesses": { + "site-network-access": [ + { + "device-reference": "172.16.185.32", + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "customer-address": "172.10.33.254", + "prefix-length": "24", + "provider-address": "172.10.33.254" + } + } + }, + "service": { + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + } + } + ] + } + } + }, + "svc-input-bandwidth": 10000000000, + "svc-mtu": 1500, + "svc-output-bandwidth": 2000000000 + }, + "site-network-access-id": "200", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "vpn-attachment": { + "site-role": "ietf-l3vpn-svc:hub-role", + "vpn-id": "slice2" + } + } + ] + } + }, + { + "devices": { + "device": [ + { + "device-id": "172.16.182.25", + "location": "access" + } + ] + }, + "locations": { + "location": [ + { + "location-id": "access" + } + ] + }, + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "routing-protocols": { + "routing-protocol": [ + { + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.201.22/24", + "lan-tag": "31", + "next-hop": "128.32.33.254" + } + ] + } + }, + "type": "ietf-l3vpn-svc:static" + } + ] + }, + "site-id": "site_access", + "site-network-accesses": { + "site-network-access": [ + { + "device-reference": "172.16.182.25", + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "customer-address": "128.32.33.254", + "prefix-length": "24", + "provider-address": "128.32.33.254" + } + } + }, + "service": { + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 20 + } + } + ] + } + } + }, + "svc-input-bandwidth": 2000000000, + "svc-mtu": 1500, + "svc-output-bandwidth": 10000000000 + }, + "site-network-access-id": "200", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "vpn-attachment": { + "site-role": "ietf-l3vpn-svc:spoke-role", + "vpn-id": "slice2" + } + } + ] + } + } + ] + }, + "vpn-services": { + "vpn-service": [ + { + "vpn-id": "slice2" + } + ] + } + } + }, + { + "ietf-l3vpn-svc:l3vpn-svc": { + "sites": { + "site": [ + { + "devices": { + "device": [ + { + "device-id": "172.16.185.32", + "location": "cloud" + } + ] + }, + "locations": { + "location": [ + { + "location-id": "cloud" + } + ] + }, + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "routing-protocols": { + "routing-protocol": [ + { + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.16.104.221/24", + "lan-tag": "201", + "next-hop": "172.10.33.254" + } + ] + } + }, + "type": "ietf-l3vpn-svc:static" + } + ] + }, + "site-id": "site_cloud", + "site-network-accesses": { + "site-network-access": [ + { + "device-reference": "172.16.185.32", + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "customer-address": "172.10.33.254", + "prefix-length": "24", + "provider-address": "172.10.33.254" + } + } + }, + "service": { + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + } + } + ] + } + } + }, + "svc-input-bandwidth": 5000000000, + "svc-mtu": 1500, + "svc-output-bandwidth": 1000000000 + }, + "site-network-access-id": "200", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "vpn-attachment": { + "site-role": "ietf-l3vpn-svc:hub-role", + "vpn-id": "slice2" + } + } + ] + } + }, + { + "devices": { + "device": [ + { + "device-id": "172.16.182.25", + "location": "access" + } + ] + }, + "locations": { + "location": [ + { + "location-id": "access" + } + ] + }, + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "routing-protocols": { + "routing-protocol": [ + { + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.201.22/24", + "lan-tag": "31", + "next-hop": "128.32.33.254" + } + ] + } + }, + "type": "ietf-l3vpn-svc:static" + } + ] + }, + "site-id": "site_access", + "site-network-accesses": { + "site-network-access": [ + { + "device-reference": "172.16.182.25", + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "customer-address": "128.32.33.254", + "prefix-length": "24", + "provider-address": "128.32.33.254" + } + } + }, + "service": { + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "bandwidth": { + "guaranteed-bw-percent": 100 + }, + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 20 + } + } + ] + } + } + }, + "svc-input-bandwidth": 1000000000, + "svc-mtu": 1500, + "svc-output-bandwidth": 5000000000 + }, + "site-network-access-id": "200", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "vpn-attachment": { + "site-role": "ietf-l3vpn-svc:spoke-role", + "vpn-id": "slice2" + } + } + ] + } + } + ] + }, + "vpn-services": { + "vpn-service": [ + { + "vpn-id": "slice2" + } + ] + } + } + } +] diff --git a/src/tests/ofc25-camara-agg-net-controller/deploy_specs.sh b/src/tests/ofc25-camara-agg-net-controller/deploy_specs.sh new file mode 100755 index 000000000..9ae83e7b1 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/deploy_specs.sh @@ -0,0 +1,208 @@ +#!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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. +#export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator" +export TFS_COMPONENTS="context device pathcomp service slice nbi" + +# Uncomment to activate Monitoring (old) +#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" + +# Uncomment to activate Monitoring Framework (new) +#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" + +# Uncomment to activate QoS Profiles +#export TFS_COMPONENTS="${TFS_COMPONENTS} qos_profile" + +# Uncomment to activate BGP-LS Speaker +#export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker" + +# Uncomment to activate Optical Controller +# To manage optical connections, "service" requires "opticalcontroller" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "opticalcontroller" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} opticalcontroller service ${AFTER}" +#fi + +# Uncomment to activate ZTP +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" + +# Uncomment to activate Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} policy" + +# Uncomment to activate Optical CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" + +# Uncomment to activate L3 CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector" + +# Uncomment to activate TE +#export TFS_COMPONENTS="${TFS_COMPONENTS} te" + +# Uncomment to activate Forecaster +#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster" + +# Uncomment to activate E2E Orchestrator +#export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator" + +# Uncomment to activate DLT and Interdomain +#export TFS_COMPONENTS="${TFS_COMPONENTS} interdomain dlt" +#if [[ "$TFS_COMPONENTS" == *"dlt"* ]]; then +# export KEY_DIRECTORY_PATH="src/dlt/gateway/keys/priv_sk" +# export CERT_DIRECTORY_PATH="src/dlt/gateway/keys/cert.pem" +# export TLS_CERT_PATH="src/dlt/gateway/keys/ca.crt" +#fi + +# Uncomment to activate QKD App +# To manage QKD Apps, "service" requires "qkd_app" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "qkd_app" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}" +#fi + + +# 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" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Uncomment to monitor performance of components +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" + +# Uncomment when deploying Optical CyberSecurity +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.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 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" + +# 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" + +# Set NATS installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/nats.sh for additional details +export NATS_DEPLOY_MODE="single" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb" + +# 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="9009" + +# 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="" + + +# ----- K8s Observability ------------------------------------------------------ + +# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to. +export PROM_EXT_PORT_HTTP="9090" + +# Set the external port Grafana HTTP Dashboards will be exposed to. +export GRAF_EXT_PORT_HTTP="3000" + + +# ----- Apache Kafka ----------------------------------------------------------- + +# Set the namespace where Apache Kafka will be deployed. +export KFK_NAMESPACE="kafka" + +# Set the port Apache Kafka server will be exposed to. +export KFK_SERVER_PORT="9092" + +# Set the flag to YES for redeploying of Apache Kafka +export KFK_REDEPLOY="" diff --git a/src/tests/ofc25-camara-agg-net-controller/redeploy-tfs.sh b/src/tests/ofc25-camara-agg-net-controller/redeploy-tfs.sh new file mode 100755 index 000000000..7f4e0c0f4 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/redeploy-tfs.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source ~/tfs-ctrl/src/tests/ofc25-camara-agg-net-controller/deploy_specs.sh +./deploy/all.sh diff --git a/src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_l3vpn_operations.xml b/src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_l3vpn_operations.xml new file mode 100644 index 000000000..8b0d3b207 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_l3vpn_operations.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_slice_operations.xml b/src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_slice_operations.xml new file mode 100644 index 000000000..f567a4429 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_slice_operations.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/tests/ofc25-camara-agg-net-controller/report_onboarding.xml b/src/tests/ofc25-camara-agg-net-controller/report_onboarding.xml new file mode 100644 index 000000000..b7922065e --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/report_onboarding.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/tests/ofc25-camara-agg-net-controller/requirements.in b/src/tests/ofc25-camara-agg-net-controller/requirements.in new file mode 100644 index 000000000..1bdaec999 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/requirements.in @@ -0,0 +1,30 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +deepdiff==6.7.* +requests==2.27.* + +coverage==6.3 +grpcio==1.47.* +grpcio-health-checking==1.47.* +grpcio-reflection==1.47.* +grpcio-tools==1.47.* +grpclib==0.4.4 +prettytable==3.5.0 +prometheus-client==0.13.0 +protobuf==3.20.* +pytest==6.2.5 +pytest-benchmark==3.4.1 +python-dateutil==2.8.2 +pytest-depends==1.0.1 diff --git a/src/tests/ofc25-camara-agg-net-controller/scripts/run-agg-net-ietf-slice-operations.sh b/src/tests/ofc25-camara-agg-net-controller/scripts/run-agg-net-ietf-slice-operations.sh new file mode 100755 index 000000000..001380ea2 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/scripts/run-agg-net-ietf-slice-operations.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source /var/teraflow/tfs_runtime_env_vars.sh +export PYTHONPATH=/var/teraflow +pytest --verbose --log-level=INFO \ + --junitxml=/opt/results/report_e2e_ietf_l3vpn_operations.xml \ + /var/teraflow/tests/ofc25-camara-agg-net-controller/tests/test_agg_net_ietf_slice_operations.py diff --git a/src/tests/ofc25-camara-agg-net-controller/scripts/run-onboarding.sh b/src/tests/ofc25-camara-agg-net-controller/scripts/run-onboarding.sh new file mode 100755 index 000000000..f62294a93 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/scripts/run-onboarding.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source /var/teraflow/tfs_runtime_env_vars.sh +export PYTHONPATH=/var/teraflow +pytest --verbose --log-level=INFO \ + --junitxml=/opt/results/report_onboarding.xml \ + /var/teraflow/tests/ofc25-camara-agg-net-controller/tests/test_onboarding.py diff --git a/src/tests/ofc25-camara-agg-net-controller/tests/Fixtures.py b/src/tests/ofc25-camara-agg-net-controller/tests/Fixtures.py new file mode 100644 index 000000000..15978851f --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/tests/Fixtures.py @@ -0,0 +1,43 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 pytest +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from monitoring.client.MonitoringClient import MonitoringClient +from service.client.ServiceClient import ServiceClient + +@pytest.fixture(scope='session') +def context_client(): + _client = ContextClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def device_client(): + _client = DeviceClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def monitoring_client(): + _client = MonitoringClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def service_client(): + _client = ServiceClient() + yield _client + _client.close() diff --git a/src/tests/ofc25-camara-agg-net-controller/tests/Tools.py b/src/tests/ofc25-camara-agg-net-controller/tests/Tools.py new file mode 100644 index 000000000..cd2add49e --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/tests/Tools.py @@ -0,0 +1,109 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 enum, logging, requests +from typing import Any, Dict, List, Optional, Set, Union +from common.Constants import ServiceNameEnum +from common.Settings import get_service_host, get_service_port_http + +NBI_ADDRESS = get_service_host(ServiceNameEnum.NBI) +NBI_PORT = get_service_port_http(ServiceNameEnum.NBI) +NBI_USERNAME = 'admin' +NBI_PASSWORD = 'admin' +NBI_BASE_URL = '' + +class RestRequestMethod(enum.Enum): + GET = 'get' + POST = 'post' + PUT = 'put' + PATCH = 'patch' + DELETE = 'delete' + +EXPECTED_STATUS_CODES : Set[int] = { + requests.codes['OK' ], + requests.codes['CREATED' ], + requests.codes['ACCEPTED' ], + requests.codes['NO_CONTENT'], +} + +def do_rest_request( + method : RestRequestMethod, url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + request_url = 'http://{:s}:{:s}@{:s}:{:d}{:s}{:s}'.format( + NBI_USERNAME, NBI_PASSWORD, NBI_ADDRESS, NBI_PORT, str(NBI_BASE_URL), url + ) + + if logger is not None: + msg = 'Request: {:s} {:s}'.format(str(method.value).upper(), str(request_url)) + if body is not None: msg += ' body={:s}'.format(str(body)) + logger.warning(msg) + reply = requests.request(method.value, request_url, headers={'Content-Type': 'application/json'}, timeout=timeout, json=body, allow_redirects=allow_redirects) + if logger is not None: + logger.warning('Reply: {:s}'.format(str(reply.text))) + assert reply.status_code in expected_status_codes, 'Reply failed with status code {:d}'.format(reply.status_code) + + if reply.content and len(reply.content) > 0: return reply.json() + return None + +def do_rest_get_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.GET, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_post_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.POST, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_put_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.PUT, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_patch_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.PATCH, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_delete_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.DELETE, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) diff --git a/src/tests/ofc25-camara-agg-net-controller/tests/__init__.py b/src/tests/ofc25-camara-agg-net-controller/tests/__init__.py new file mode 100644 index 000000000..3ccc21c7d --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ofc25-camara-agg-net-controller/tests/test_agg_net_ietf_slice_operations.py b/src/tests/ofc25-camara-agg-net-controller/tests/test_agg_net_ietf_slice_operations.py new file mode 100644 index 000000000..b2c086fd0 --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/tests/test_agg_net_ietf_slice_operations.py @@ -0,0 +1,206 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os +import requests +from deepdiff import DeepDiff + + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +HEADERS = {"Content-Type": "application/json"} + +TARGET_L3VPN_SLICE1_STAGES = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "target-l3vpn-slice1-stages.json", +) + +TARGET_L3VPN_SLICE2_STAGES = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "target-l3vpn-slice2-stages.json", +) + +OP1_IETF_SLICE = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "pc1_slice1_post_ietf_network_slice.json", +) + +OP2_IETF_SLICE = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "pc2_slice1_put_ietf_network_slice.json", +) + +OP3_IETF_SLICE = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "pc1_slice2_post_ietf_network_slice.json", +) + +OP4_IETF_SLICE = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "pc2_slice2_put_ietf_network_slice.json", +) + +OP6_IETF_SLICE = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "pc1_slice1_put_ietf_network_slice.json", +) + +OP8_IETF_SLICE = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "..", + "data", + "pc1_slice2_put_ietf_network_slice.json", +) + +NBI_ADDRESS = "localhost" +NBI_PORT = "80" +NBI_USERNAME = "admin" +NBI_PASSWORD = "admin" + +IP_ADDRESS = "localhost" +IP_PORT = 9090 + +BASE_IETF_SLICE_URL = f"http://{NBI_ADDRESS}:{NBI_PORT}/restconf/data/ietf-network-slice-service:network-slice-services" +IP_L3VPN_URL = f"http://{IP_ADDRESS}:{IP_PORT}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" + +# pylint: disable=redefined-outer-name, unused-argument +def test_ietf_slice_creation_removal(): + # Issue service creation request + with open(OP1_IETF_SLICE, "r", encoding="UTF-8") as f: + op1_ietf_slice = json.load(f) + with open(OP2_IETF_SLICE, "r", encoding="UTF-8") as f: + op2_ietf_slice = json.load(f) + with open(OP3_IETF_SLICE, "r", encoding="UTF-8") as f: + op3_ietf_slice = json.load(f) + with open(OP4_IETF_SLICE, "r", encoding="UTF-8") as f: + op4_ietf_slice = json.load(f) + with open(OP6_IETF_SLICE, "r", encoding="UTF-8") as f: + op6_ietf_slice = json.load(f) + with open(OP8_IETF_SLICE, "r", encoding="UTF-8") as f: + op8_ietf_slice = json.load(f) + with open(TARGET_L3VPN_SLICE1_STAGES, "r", encoding="UTF-8") as f: + target_l3vpn_slice1_stages = json.load(f) + with open(TARGET_L3VPN_SLICE2_STAGES, "r", encoding="UTF-8") as f: + target_l3vpn_slice2_stages = json.load(f) + + # op 1 + URL = BASE_IETF_SLICE_URL + requests.post(URL, headers=HEADERS, json=op1_ietf_slice) + + URL = IP_L3VPN_URL + l3vpns = requests.get(URL).json() + + slice_name = "slice1" + diff = DeepDiff(target_l3vpn_slice1_stages[0], l3vpns[slice_name]) + assert not diff + + # op 2 + URL = BASE_IETF_SLICE_URL + "/slice-service=slice1/connection-groups/connection-group=line1" + requests.put(URL, headers=HEADERS, json=op2_ietf_slice) + + URL = IP_L3VPN_URL + l3vpns = requests.get(URL).json() + + slice_name = "slice1" + diff = DeepDiff(target_l3vpn_slice1_stages[1], l3vpns[slice_name]) + assert not diff + + # op 3 + URL = BASE_IETF_SLICE_URL + requests.post(URL, headers=HEADERS, json=op3_ietf_slice) + + URL = IP_L3VPN_URL + l3vpns = requests.get(URL).json() + + slice_name = "slice2" + diff = DeepDiff(target_l3vpn_slice2_stages[0], l3vpns[slice_name]) + assert not diff + + # op 4 + URL = BASE_IETF_SLICE_URL + "/slice-service=slice2/connection-groups/connection-group=line1" + requests.put(URL, headers=HEADERS, json=op4_ietf_slice) + + URL = IP_L3VPN_URL + l3vpns = requests.get(URL).json() + + slice_name = "slice2" + diff = DeepDiff(target_l3vpn_slice2_stages[1], l3vpns[slice_name]) + assert not diff + + # op 5 + + + # op 6 + URL = BASE_IETF_SLICE_URL + "/slice-service=slice1/connection-groups/connection-group=line1" + requests.put(URL, headers=HEADERS, json=op6_ietf_slice) + + URL = IP_L3VPN_URL + l3vpns = requests.get(URL).json() + + slice_name = "slice1" + diff = DeepDiff(target_l3vpn_slice1_stages[2], l3vpns[slice_name]) + assert not diff + + # op 7 + URL = BASE_IETF_SLICE_URL + "/slice-service=slice1" + requests.delete(URL) + + URL = IP_L3VPN_URL + l3vpns = requests.get(URL).json() + + slice_name = "slice1" + assert slice_name not in l3vpns + + # op 8 + URL = BASE_IETF_SLICE_URL + "/slice-service=slice2/connection-groups/connection-group=line1" + requests.put(URL, headers=HEADERS, json=op8_ietf_slice) + + URL = IP_L3VPN_URL + l3vpns = requests.get(URL).json() + + slice_name = "slice2" + diff = DeepDiff(target_l3vpn_slice2_stages[2], l3vpns[slice_name]) + assert not diff + + # op 9 + URL = BASE_IETF_SLICE_URL + "/slice-service=slice2" + requests.delete(URL) + + URL = IP_L3VPN_URL + l3vpns = requests.get(URL).json() + + slice_name = "slice2" + assert slice_name not in l3vpns + + # op 10 + + URL = IP_L3VPN_URL + l3vpns = requests.get(URL).json() + + assert not l3vpns diff --git a/src/tests/ofc25-camara-agg-net-controller/tests/test_onboarding.py b/src/tests/ofc25-camara-agg-net-controller/tests/test_onboarding.py new file mode 100644 index 000000000..7173ddacc --- /dev/null +++ b/src/tests/ofc25-camara-agg-net-controller/tests/test_onboarding.py @@ -0,0 +1,67 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os, time +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum, Empty +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from .Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'data', 'agg-net-descriptor.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_scenario_onboarding( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + validate_empty_scenario(context_client) + + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + # descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + +def test_scenario_devices_enabled( + context_client : ContextClient, # pylint: disable=redefined-outer-name +) -> None: + """ + This test validates that the devices are enabled. + """ + DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + num_devices = -1 + num_devices_enabled, num_retry = 0, 0 + while (num_devices != num_devices_enabled) and (num_retry < 10): + time.sleep(1.0) + response = context_client.ListDevices(Empty()) + num_devices = len(response.devices) + num_devices_enabled = 0 + for device in response.devices: + if device.device_operational_status != DEVICE_OP_STATUS_ENABLED: continue + num_devices_enabled += 1 + LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) + num_retry += 1 + assert num_devices_enabled == num_devices -- GitLab From 4c6ec60ba66a3eff6950f74e0bf7b0c8e1e5718a Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 20 Jan 2025 16:52:41 +0100 Subject: [PATCH 200/463] mock_ietf_l3vpn_sdn_controller added --- .../tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile | 37 +++++++++ .../mock_ietf_l3vpn_sdn_ctrl/L3VPNServices.py | 44 +++++++++++ .../MockIetfL3VPNSdnCtrl.py | 77 +++++++++++++++++++ .../tools/mock_ietf_l3vpn_sdn_ctrl/README.md | 31 ++++++++ .../mock_ietf_l3vpn_sdn_ctrl/__init__.py | 14 ++++ .../tools/mock_ietf_l3vpn_sdn_ctrl/build.sh | 21 +++++ .../tools/mock_ietf_l3vpn_sdn_ctrl/deploy.sh | 17 ++++ .../mock-ietf-network-slice-sdn-ctrl.yaml | 64 +++++++++++++++ .../mock_ietf_l3vpn_sdn_ctrl/requirements.in | 22 ++++++ .../tools/mock_ietf_l3vpn_sdn_ctrl/run.sh | 19 +++++ 10 files changed, 346 insertions(+) create mode 100644 src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile create mode 100644 src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/L3VPNServices.py create mode 100644 src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/MockIetfL3VPNSdnCtrl.py create mode 100644 src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/README.md create mode 100644 src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/__init__.py create mode 100755 src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/build.sh create mode 100755 src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/deploy.sh create mode 100644 src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/mock-ietf-network-slice-sdn-ctrl.yaml create mode 100644 src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/requirements.in create mode 100755 src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/run.sh diff --git a/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile new file mode 100644 index 000000000..b2ac55af4 --- /dev/null +++ b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile @@ -0,0 +1,37 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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-folders, and copy content +RUN mkdir -p /var/teraflow/mock_ietf_l3vpn_sdn_ctrl +WORKDIR /var/teraflow/mock_ietf_l3vpn_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 + +RUN python3 -m pip list + +# Start the service +ENTRYPOINT ["python", "MockIetfL3VPNSdnCtrl.py"] diff --git a/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/L3VPNServices.py b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/L3VPNServices.py new file mode 100644 index 000000000..1e4d7c619 --- /dev/null +++ b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/L3VPNServices.py @@ -0,0 +1,44 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# REST-API resource implementing minimal support for "IETF YANG Data Model for Transport Network Client Signals". +# Ref: https://www.ietf.org/archive/id/draft-ietf-ccamp-client-signal-yang-10.html + +from flask import jsonify, make_response, request +from flask_restful import Resource + +VPN_SERVICES = {} + + +class L3VPNServices(Resource): + def get(self): + return make_response(jsonify(VPN_SERVICES), 200) + + def post(self): + json_request = request.get_json() + name = json_request["ietf-l3vpn-svc:l3vpn-svc"]["vpn-services"]["vpn-service"][0]["vpn-id"] + VPN_SERVICES[name] = json_request + return make_response(jsonify({}), 201) + + +class L3VPNService(Resource): + def put(self, vpn_id: str): + json_request = request.get_json() + VPN_SERVICES[vpn_id] = json_request + return make_response(jsonify({}), 200) + + def delete(self, vpn_id: str): + slice = VPN_SERVICES.pop(vpn_id, None) + data, status = ({}, 404) if slice is None else (slice, 204) + return make_response(jsonify(data), status) diff --git a/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/MockIetfL3VPNSdnCtrl.py b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/MockIetfL3VPNSdnCtrl.py new file mode 100644 index 000000000..49685aa19 --- /dev/null +++ b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/MockIetfL3VPNSdnCtrl.py @@ -0,0 +1,77 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 IETF ACTN SDN controller +# ----------------------------- +# REST server implementing minimal support for: +# - IETF YANG Data Model for Transport Network Client Signals +# Ref: https://www.ietf.org/archive/id/draft-ietf-ccamp-client-signal-yang-10.html +# - IETF YANG Data Model for Traffic Engineering Tunnels, Label Switched Paths and Interfaces +# Ref: https://www.ietf.org/archive/id/draft-ietf-teas-yang-te-34.html + + +import functools, logging, sys, time +from flask import Flask, request +from flask_restful import Api + +from L3VPNServices import L3VPNService, L3VPNServices + +BIND_ADDRESS = "0.0.0.0" +BIND_PORT = 8443 +BASE_URL = "/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" +STR_ENDPOINT = "http://{:s}:{:s}{:s}".format( + str(BIND_ADDRESS), str(BIND_PORT), str(BASE_URL) +) +LOG_LEVEL = logging.DEBUG + +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 + + +def main(): + LOGGER.info("Starting...") + + app = Flask(__name__) + app.after_request(functools.partial(log_request, LOGGER)) + + api = Api(app, prefix=BASE_URL) + api.add_resource(L3VPNServices, "") + api.add_resource(L3VPNService, "/vpn-service=") + + LOGGER.info("Listening on {:s}...".format(str(STR_ENDPOINT))) + app.run(debug=True, host=BIND_ADDRESS, port=BIND_PORT) + + LOGGER.info("Bye") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/README.md b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/README.md new file mode 100644 index 000000000..a999f9e9f --- /dev/null +++ b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/README.md @@ -0,0 +1,31 @@ +# Mock IETF ACTN SDN Controller + +This REST server implements very basic support for the following YANG data models: +- YANG Data Model for L3VPN Service Delivery + - Ref: https://datatracker.ietf.org/doc/html/rfc8049 + +The aim of this server is to enable testing ietf netowrk slice service handler, ietf l3vpn service handler, and ietf l3vpn driver + + +## 1. Install requirements for the Mock IETF Network Slice SDN controller +__NOTE__: if you run the Mock IETF L3VPN SDN controller from the PyEnv used for developing on the TeraFlowSDN +framework and you followed the official steps in +[Development Guide > Configure Environment > Python](https://labs.etsi.org/rep/tfs/controller/-/wikis/2.-Development-Guide/2.1.-Configure-Environment/2.1.1.-Python), +all the requirements are already in place. Install them only if you execute it in a separate/standalone environment. + +Install the required dependencies as follows: +```bash +pip install -r src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/requirements.in +``` + +Run the Mock IETF L3VPN SDN Controller as follows: +```bash +python src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/MockIetfL3VPNSdnCtrl.py +``` + + +## 2. Run the Mock IETF L3VPN SDN controller +Run the Mock IETF L3VPN SDN Controller as follows: +```bash +python src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/MockIetfL3VPNSdnCtrl.py +``` diff --git a/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/__init__.py b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/__init__.py new file mode 100644 index 000000000..3ccc21c7d --- /dev/null +++ b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/tools/mock_ietf_l3vpn_sdn_ctrl/build.sh b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/build.sh new file mode 100755 index 000000000..e5f127985 --- /dev/null +++ b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Make folder containing the script the root folder for its execution +cd $(dirname $0) + +docker build -t mock-ietf-l3vpn-sdn-ctrl:test -f Dockerfile . +docker tag mock-ietf-l3vpn-sdn-ctrl:test localhost:32000/tfs/mock-ietf-l3vpn-sdn-ctrl:test +docker push localhost:32000/tfs/mock-ietf-l3vpn-sdn-ctrl:test diff --git a/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/deploy.sh b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/deploy.sh new file mode 100755 index 000000000..1c6e68deb --- /dev/null +++ b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/deploy.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 mocks +kubectl --namespace mocks apply -f mock-ietf-l3vpn-sdn-ctrl.yaml diff --git a/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/mock-ietf-network-slice-sdn-ctrl.yaml b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/mock-ietf-network-slice-sdn-ctrl.yaml new file mode 100644 index 000000000..ace79810f --- /dev/null +++ b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/mock-ietf-network-slice-sdn-ctrl.yaml @@ -0,0 +1,64 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +kind: Namespace +apiVersion: v1 +metadata: + name: mocks +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mock-ietf-l3vpn-sdn-ctrl +spec: + selector: + matchLabels: + app: mock-ietf-l3vpn-sdn-ctrl + replicas: 1 + template: + metadata: + annotations: + config.linkerd.io/skip-inbound-ports: "8443" + labels: + app: mock-ietf-l3vpn-sdn-ctrl + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: server + image: localhost:32000/tfs/mock-ietf-l3vpn-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-ietf-l3vpn-sdn-ctrl + labels: + app: mock-ietf-l3vpn-sdn-ctrl +spec: + type: ClusterIP + selector: + app: mock-ietf-l3vpn-sdn-ctrl + ports: + - name: http + port: 8443 + targetPort: 8443 diff --git a/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/requirements.in b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/requirements.in new file mode 100644 index 000000000..dbb8e95d6 --- /dev/null +++ b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/requirements.in @@ -0,0 +1,22 @@ +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 +werkzeug==2.3.7 diff --git a/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/run.sh b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/run.sh new file mode 100755 index 000000000..3c0ddc2b0 --- /dev/null +++ b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/run.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Make folder containing the script the root folder for its execution +cd $(dirname $0) + +python MockIetfL3VPNSdnCtrl.py -- GitLab From 55fc09825adc38d401ee3c3015920cd4c6f55a21 Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 20 Jan 2025 21:19:55 +0100 Subject: [PATCH 201/463] refactoring --- .../l3nm_ietfl3vpn/ConfigRules.py | 306 +++++++-------- .../L3NM_IETFL3VPN_ServiceHandler.py | 354 ++++++++++-------- .../l3nm_ietfl3vpn/__init__.py | 2 +- 3 files changed, 368 insertions(+), 294 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py index e2ad446ce..c5638fc10 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/ConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -30,9 +30,117 @@ class LANPrefixesDict(TypedDict): SITE_NETWORK_ACCESS_TYPE = "ietf-l3vpn-svc:multipoint" +def create_site_dict( + site_id: str, + site_location: str, + device_uuid: str, + endpoint_uuid: str, + service_uuid: str, + role: str, + management_type: str, + ce_address: str, + pe_address: str, + ce_pe_network_prefix: int, + mtu: int, + input_bw: int, + output_bw: int, + qos_profile_id: str, + qos_profile_direction: str, + qos_profile_latency: int, + qos_profile_bw_guarantee: int, + lan_prefixes: List[LANPrefixesDict], +) -> Dict: + """ + Helper function that creates a dictionary representing a single 'site' + entry (including management, locations, devices, routing-protocols, and + site-network-accesses). + """ + site_lan_prefixes = [ + { + "lan": lp["lan"], + "lan-tag": lp["lan_tag"], + "next-hop": ce_address, + } + for lp in lan_prefixes + ] + + return { + "site-id": site_id, + "management": {"type": management_type}, + "locations": {"location": [{"location-id": site_location}]}, + "devices": { + "device": [ + { + "device-id": device_uuid, + "location": site_location, + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": site_lan_prefixes + } + }, + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": endpoint_uuid, + "site-network-access-type": SITE_NETWORK_ACCESS_TYPE, + "device-reference": device_uuid, + "vpn-attachment": { + "vpn-id": service_uuid, + "site-role": role, + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": pe_address, + "customer-address": ce_address, + "prefix-length": ce_pe_network_prefix, + }, + } + }, + "service": { + "svc-mtu": mtu, + "svc-input-bandwidth": input_bw, + "svc-output-bandwidth": output_bw, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": qos_profile_id, + "direction": qos_profile_direction, + "latency": { + "latency-boundary": qos_profile_latency + }, + "bandwidth": { + "guaranteed-bw-percent": qos_profile_bw_guarantee + }, + } + ] + } + } + }, + }, + } + ] + }, + } + + def setup_config_rules( service_uuid: str, json_settings: Dict, operation_type: str ) -> List[Dict]: + # --- Extract common or required fields for the source site --- src_device_uuid: str = json_settings["src_device_name"] src_endpoint_uuid: str = json_settings["src_endpoint_name"] src_site_location: str = json_settings["src_site_location"] @@ -45,6 +153,7 @@ def setup_config_rules( ) if src_management_type != "ietf-l3vpn-svc:provider-managed": raise Exception("management type %s not supported", src_management_type) + src_role: str = "ietf-l3vpn-svc:hub-role" src_ce_address: str = json_settings["src_ce_address"] src_pe_address: str = json_settings["src_pe_address"] @@ -58,6 +167,8 @@ def setup_config_rules( src_qos_profile_bw_guarantee: int = json_settings.get( "src_qos_profile_bw_guarantee", 100 ) + + # --- Extract common or required fields for the destination site --- dst_device_uuid = json_settings["dst_device_name"] dst_endpoint_uuid = json_settings["dst_endpoint_name"] dst_site_location: str = json_settings["dst_site_location"] @@ -70,6 +181,7 @@ def setup_config_rules( ) if dst_management_type != "ietf-l3vpn-svc:provider-managed": raise Exception("management type %s not supported", dst_management_type) + dst_role: str = "ietf-l3vpn-svc:spoke-role" dst_ce_address: str = json_settings["dst_ce_address"] dst_pe_address: str = json_settings["dst_pe_address"] @@ -84,156 +196,54 @@ def setup_config_rules( "dst_qos_profile_bw_guarantee", 100 ) - # Create source site information - src_management = {"type": src_management_type} - src_locations = {"location": [{"location-id": src_site_location}]} - src_devices = { - "device": [{"device-id": src_device_uuid, "location": src_site_location}] - } - src_site_lan_prefixes = [ - {"lan": lp["lan"], "lan-tag": lp["lan_tag"], "next-hop": src_ce_address} - for lp in src_ipv4_lan_prefixes - ] - src_site_routing_protocols = { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": src_site_lan_prefixes - } - }, - } - ] - } - src_site_network_accesses = { - "site-network-access": [ - { - "site-network-access-id": src_endpoint_uuid, - "site-network-access-type": SITE_NETWORK_ACCESS_TYPE, - "device-reference": src_device_uuid, - "vpn-attachment": {"vpn-id": service_uuid, "site-role": src_role}, - "ip-connection": { - "ipv4": { - "address-allocation-type": "ietf-l3vpn-svc:static-address", - "addresses": { - "provider-address": src_pe_address, - "customer-address": src_ce_address, - "prefix-length": src_ce_pe_network_prefix, - }, - } - }, - "service": { - "svc-mtu": src_mtu, - "svc-input-bandwidth": src_input_bw, - "svc-output-bandwidth": src_output_bw, - "qos": { - "qos-profile": { - "classes": { - "class": [ - { - "class-id": src_qos_profile_id, - "direction": src_qos_profile_direction, - "latency": { - "latency-boundary": src_qos_profile_latency - }, - "bandwidth": { - "guaranteed-bw-percent": src_qos_profile_bw_guarantee - }, - } - ] - } - } - }, - }, - } - ] - } + # --- Build site dictionaries using the helper function --- + src_site_dict = create_site_dict( + site_id=src_site_id, + site_location=src_site_location, + device_uuid=src_device_uuid, + endpoint_uuid=src_endpoint_uuid, + service_uuid=service_uuid, + role=src_role, + management_type=src_management_type, + ce_address=src_ce_address, + pe_address=src_pe_address, + ce_pe_network_prefix=src_ce_pe_network_prefix, + mtu=src_mtu, + input_bw=src_input_bw, + output_bw=src_output_bw, + qos_profile_id=src_qos_profile_id, + qos_profile_direction=src_qos_profile_direction, + qos_profile_latency=src_qos_profile_latency, + qos_profile_bw_guarantee=src_qos_profile_bw_guarantee, + lan_prefixes=src_ipv4_lan_prefixes, + ) - # Create destination site information - dst_management = {"type": src_management_type} - dst_locations = {"location": [{"location-id": dst_site_location}]} - dst_devices = { - "device": [{"device-id": dst_device_uuid, "location": dst_site_location}] - } - dst_site_lan_prefixes = [ - {"lan": lp["lan"], "lan-tag": lp["lan_tag"], "next-hop": dst_ce_address} - for lp in dst_ipv4_lan_prefixes - ] - dst_site_routing_protocols = { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": dst_site_lan_prefixes - } - }, - } - ] - } - dst_site_network_accesses = { - "site-network-access": [ - { - "site-network-access-id": dst_endpoint_uuid, - "site-network-access-type": SITE_NETWORK_ACCESS_TYPE, - "device-reference": dst_device_uuid, - "vpn-attachment": {"vpn-id": service_uuid, "site-role": dst_role}, - "ip-connection": { - "ipv4": { - "address-allocation-type": "ietf-l3vpn-svc:static-address", - "addresses": { - "provider-address": dst_pe_address, - "customer-address": dst_ce_address, - "prefix-length": dst_ce_pe_network_prefix, - }, - } - }, - "service": { - "svc-mtu": dst_mtu, - "svc-input-bandwidth": dst_input_bw, - "svc-output-bandwidth": dst_output_bw, - "qos": { - "qos-profile": { - "classes": { - "class": [ - { - "class-id": dst_qos_profile_id, - "direction": dst_qos_profile_direction, - "latency": { - "latency-boundary": dst_qos_profile_latency - }, - "bandwidth": { - "guaranteed-bw-percent": dst_qos_profile_bw_guarantee - }, - } - ] - } - } - }, - }, - } - ] - } + dst_site_dict = create_site_dict( + site_id=dst_site_id, + site_location=dst_site_location, + device_uuid=dst_device_uuid, + endpoint_uuid=dst_endpoint_uuid, + service_uuid=service_uuid, + role=dst_role, + management_type=dst_management_type, + ce_address=dst_ce_address, + pe_address=dst_pe_address, + ce_pe_network_prefix=dst_ce_pe_network_prefix, + mtu=dst_mtu, + input_bw=dst_input_bw, + output_bw=dst_output_bw, + qos_profile_id=dst_qos_profile_id, + qos_profile_direction=dst_qos_profile_direction, + qos_profile_latency=dst_qos_profile_latency, + qos_profile_bw_guarantee=dst_qos_profile_bw_guarantee, + lan_prefixes=dst_ipv4_lan_prefixes, + ) + # --- Combine both sites into one structure --- sites = { "site": [ - { - "site-id": src_site_id, - "management": src_management, - "locations": src_locations, - "devices": src_devices, - "routing-protocols": src_site_routing_protocols, - "site-network-accesses": src_site_network_accesses, - }, - { - "site-id": dst_site_id, - "management": dst_management, - "locations": dst_locations, - "devices": dst_devices, - "routing-protocols": dst_site_routing_protocols, - "site-network-accesses": dst_site_network_accesses, - }, + src_site_dict, + dst_site_dict, ] } @@ -243,6 +253,7 @@ def setup_config_rules( "sites": sites, } } + json_config_rules = [ json_config_rule_set( "/service[{:s}]/IETFL3VPN".format(service_uuid), @@ -253,6 +264,7 @@ def setup_config_rules( {"type": operation_type}, ), ] + return json_config_rules diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py index c43338a70..aa650c809 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -70,11 +70,78 @@ class QoSInfo(TypedDict): dst_output_bw: int +def get_custom_config_rule( + service_config: ServiceConfig, resource_key: str +) -> Optional[ConfigRule]: + """ + Return the custom ConfigRule from the ServiceConfig matching the given resource_key, + or None if not found. + """ + for cr in service_config.config_rules: + if ( + cr.WhichOneof("config_rule") == "custom" + and cr.custom.resource_key == resource_key + ): + return cr + return None + + +def load_json_rule_data(service_config: ServiceConfig) -> Tuple[dict, dict]: + """ + Loads the running/candidate JSON data from the service_config for IETF slice data. + Raises an exception if either is missing. + """ + running_cr = get_custom_config_rule(service_config, RUNNING_RESOURCE_KEY) + candidate_cr = get_custom_config_rule(service_config, CANDIDATE_RESOURCE_KEY) + + if not running_cr or not candidate_cr: + raise ValueError("Missing running/candidate IETF slice config rules.") + + running_data = json.loads(running_cr.custom.resource_value) + candidate_data = json.loads(candidate_cr.custom.resource_value) + return running_data, candidate_data + + +def extract_match_criterion_ipv4_info(match_criterion: dict) -> Ipv4Info: + """ + Extracts IPv4 match criteria data (src/dst IP, ports, VLAN) from a match_criterion dict. + """ + src_lan = dst_lan = src_port = dst_port = vlan = "" + for type_value in match_criterion["match-type"]: + value = type_value["value"][0] + if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": + src_lan = value + elif type_value["type"] == "ietf-network-slice-service:destination-ip-prefix": + dst_lan = value + elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": + src_port = value + elif type_value["type"] == "ietf-network-slice-service:destination-tcp-port": + dst_port = value + elif type_value["type"] == "ietf-network-slice-service:vlan": + vlan = value + + return Ipv4Info( + src_lan=src_lan, + dst_lan=dst_lan, + src_port=src_port, + dst_port=dst_port, + vlan=vlan, + ) + + def extract_qos_info_from_connection_group( - src_sdp_id: str, dst_sdp_id: str, connectivity_constructs: dict + src_sdp_id: str, dst_sdp_id: str, connectivity_constructs: list ) -> QoSInfo: - def extract_qos_info(cc: dict) -> Tuple[int, int]: - for metric_bound in cc["service-slo-sle-policy"]["slo-policy"]["metric-bound"]: + """ + Given a pair of SDP ids and a list of connectivity constructs, extract QoS info + such as latency and bandwidth (for both directions). + """ + + def _extract_qos_fields(cc: dict) -> Tuple[int, int]: + max_delay = 0 + bandwidth = 0 + metric_bounds = cc["service-slo-sle-policy"]["slo-policy"]["metric-bound"] + for metric_bound in metric_bounds: if ( metric_bound["metric-type"] == "ietf-network-slice-service:one-way-delay-maximum" @@ -86,6 +153,7 @@ def extract_qos_info_from_connection_group( == "ietf-network-slice-service:one-way-bandwidth" and metric_bound["metric-unit"] == "Mbps" ): + # Convert from Mbps to bps bandwidth = int(metric_bound["bound"]) * 1000000 return max_delay, bandwidth @@ -99,8 +167,9 @@ def extract_qos_info_from_connection_group( for cc in connectivity_constructs if cc["p2p-sender-sdp"] == dst_sdp_id and cc["p2p-receiver-sdp"] == src_sdp_id ) - src_max_delay, src_bandwidth = extract_qos_info(src_cc) - dst_max_delay, dst_bandwidth = extract_qos_info(dst_cc) + src_max_delay, src_bandwidth = _extract_qos_fields(src_cc) + dst_max_delay, dst_bandwidth = _extract_qos_fields(dst_cc) + return QoSInfo( src_qos_profile_latency=src_max_delay, src_input_bw=src_bandwidth, @@ -111,55 +180,18 @@ def extract_qos_info_from_connection_group( ) -def get_custom_config_rule( - service_config: ServiceConfig, resource_key: str -) -> Optional[ConfigRule]: - for cr in service_config.config_rules: +def get_endpoint_settings(device_obj: Device, endpoint_name: str) -> dict: + """ + Helper to retrieve endpoint settings from a device's config rules given an endpoint name. + Raises an exception if not found. + """ + for rule in device_obj.device_config.config_rules: if ( - cr.WhichOneof("config_rule") == "custom" - and cr.custom.resource_key == resource_key + rule.WhichOneof("config_rule") == "custom" + and rule.custom.resource_key == f"/endpoints/endpoint[{endpoint_name}]" ): - return cr - - -def get_running_candidate_ietf_slice_data_diff(service_config: ServiceConfig) -> dict: - running_ietf_slice_cr = get_custom_config_rule(service_config, RUNNING_RESOURCE_KEY) - running_resource_value_dict = json.loads( - running_ietf_slice_cr.custom.resource_value - ) - candidate_ietf_slice_cr = get_custom_config_rule( - service_config, CANDIDATE_RESOURCE_KEY - ) - candidate_resource_value_dict = json.loads( - candidate_ietf_slice_cr.custom.resource_value - ) - return DeepDiff( - running_resource_value_dict, - candidate_resource_value_dict, - ) - - -def extract_match_criterion_ipv4_info( - match_criterion: dict, -) -> Ipv4Info: - for type_value in match_criterion["match-type"]: - if type_value["type"] == "ietf-network-slice-service:source-ip-prefix": - src_lan = type_value["value"][0] - elif type_value["type"] == "ietf-network-slice-service:destination-ip-prefix": - dst_lan = type_value["value"][0] - elif type_value["type"] == "ietf-network-slice-service:source-tcp-port": - src_port = type_value["value"][0] - elif type_value["type"] == "ietf-network-slice-service:destination-tcp-port": - dst_port = type_value["value"][0] - elif type_value["type"] == "ietf-network-slice-service:vlan": - vlan = type_value["value"][0] - return Ipv4Info( - src_lan=src_lan, - dst_lan=dst_lan, - src_port=src_port, - dst_port=dst_port, - vlan=vlan, - ) + return json.loads(rule.custom.resource_value) + raise ValueError(f"Endpoint settings not found for endpoint {endpoint_name}") class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): @@ -173,6 +205,13 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): def __find_IP_transport_edge_endpoints( self, endpoints ) -> Tuple[str, str, str, str, Device]: + """ + Searches for two endpoints whose device controllers are IP_SDN_CONTROLLER. + Returns (src_device_uuid, src_endpoint_uuid, dst_device_uuid, dst_endpoint_uuid, controller_device). + Raises an exception if not found or if the two IP devices differ. + """ + + # Find the first IP transport edge endpoint from the head of endpoints for ep in endpoints: device_uuid, endpoint_uuid = get_device_endpoint_uuids(ep) device_obj = self.__task_executor.get_device( @@ -185,7 +224,9 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): break else: raise Exception("No IP transport edge endpoints found") - for ep in endpoints[::-1]: + + # Find the second IP transport edge endpoint from the tail of endpoints + for ep in reversed(endpoints): device_uuid, endpoint_uuid = get_device_endpoint_uuids(ep) device_obj = self.__task_executor.get_device( DeviceId(**json_device_id(device_uuid)) @@ -197,8 +238,10 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): break else: raise Exception("No IP transport edge endpoints found") + if src_device_controller != dst_device_controller: raise Exception("Different Src-Dst devices not supported by now") + return ( src_device_uuid, src_endpoint_uuid, @@ -207,6 +250,70 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): src_device_controller, ) + def __build_resource_value_dict( + self, + service_id: str, + src_device_obj: Device, + dst_device_obj: Device, + src_endpoint_name: str, + dst_endpoint_name: str, + qos_info: QoSInfo, + src_endpoint_settings: dict, + dst_endpoint_settings: dict, + src_match_criterion_ipv4_info: Ipv4Info, + dst_match_criterion_ipv4_info: Ipv4Info, + ) -> dict: + """ + Builds the final resource-value dict to be used when calling setup_config_rules(). + """ + # Prepare data for source + src_device_name = src_device_obj.name + src_ce_ip = src_endpoint_settings["address_ip"] + src_ce_prefix = src_endpoint_settings["address_prefix"] + src_lan_prefixes = [ + LANPrefixesDict( + lan=src_match_criterion_ipv4_info["dst_lan"], + lan_tag=src_match_criterion_ipv4_info["vlan"], + ) + ] + + # Prepare data for destination + dst_device_name = dst_device_obj.name + dst_ce_ip = dst_endpoint_settings["address_ip"] + dst_ce_prefix = dst_endpoint_settings["address_prefix"] + dst_lan_prefixes = [ + LANPrefixesDict( + lan=dst_match_criterion_ipv4_info["dst_lan"], + lan_tag=dst_match_criterion_ipv4_info["vlan"], + ) + ] + + return { + "uuid": service_id, + "src_device_name": src_device_name, + "src_endpoint_name": src_endpoint_name, + "src_site_location": src_endpoint_settings["site_location"], + "src_ipv4_lan_prefixes": src_lan_prefixes, + "src_ce_address": src_ce_ip, + "src_pe_address": src_ce_ip, + "src_ce_pe_network_prefix": src_ce_prefix, + "src_mtu": MTU, + "src_qos_profile_latency": qos_info["src_qos_profile_latency"], + "src_input_bw": qos_info["src_input_bw"], + "src_output_bw": qos_info["src_output_bw"], + "dst_device_name": dst_device_name, + "dst_endpoint_name": dst_endpoint_name, + "dst_site_location": dst_endpoint_settings["site_location"], + "dst_ipv4_lan_prefixes": dst_lan_prefixes, + "dst_ce_address": dst_ce_ip, + "dst_pe_address": dst_ce_ip, + "dst_ce_pe_network_prefix": dst_ce_prefix, + "dst_mtu": MTU, + "dst_qos_profile_latency": qos_info["dst_qos_profile_latency"], + "dst_input_bw": qos_info["dst_input_bw"], + "dst_output_bw": qos_info["dst_output_bw"], + } + @metered_subclass_method(METRICS_POOL) def SetEndpoint( self, @@ -216,9 +323,12 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): chk_type("endpoints", endpoints, list) if len(endpoints) < 2: return [] + results = [] service_config = self.__service.service_config + try: + # Identify IP transport edge endpoints ( src_device_uuid, src_endpoint_uuid, @@ -226,79 +336,58 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): dst_endpoint_uuid, controller, ) = self.__find_IP_transport_edge_endpoints(endpoints) + + # Retrieve device objects src_device_obj = self.__task_executor.get_device( DeviceId(**json_device_id(src_device_uuid)) ) src_endpoint_obj = get_endpoint_matching(src_device_obj, src_endpoint_uuid) - src_device_name = src_device_obj.name + dst_device_obj = self.__task_executor.get_device( DeviceId(**json_device_id(dst_device_uuid)) ) dst_endpoint_obj = get_endpoint_matching(dst_device_obj, dst_endpoint_uuid) - dst_device_name = dst_device_obj.name - for cr in src_device_obj.device_config.config_rules: - if ( - cr.WhichOneof("config_rule") == "custom" - and cr.custom.resource_key - == f"/endpoints/endpoint[{src_endpoint_obj.name}]" - ): - src_endpoint_settings = json.loads(cr.custom.resource_value) - break - else: - raise Exception("Endpoint settings not found") - for cr in dst_device_obj.device_config.config_rules: - if ( - cr.WhichOneof("config_rule") == "custom" - and cr.custom.resource_key - == f"/endpoints/endpoint[{dst_endpoint_obj.name}]" - ): - dst_endpoint_settings = json.loads(cr.custom.resource_value) - break - else: - raise Exception("Endpoint settings not found") - ietf_slice_running_cr = get_custom_config_rule( - service_config, RUNNING_RESOURCE_KEY - ) - ietf_slice_candidate_cr = get_custom_config_rule( - service_config, CANDIDATE_RESOURCE_KEY - ) - if not ( - ietf_slice_running_cr and ietf_slice_candidate_cr - ): # The request comes from the IETF Slice NBI - raise Exception("IETF Slice data not found") - running_resource_value_dict = json.loads( - ietf_slice_running_cr.custom.resource_value - ) - candidate_resource_value_dict = json.loads( - ietf_slice_candidate_cr.custom.resource_value + + # Obtain endpoint settings + src_endpoint_settings = get_endpoint_settings( + src_device_obj, src_endpoint_obj.name ) - running_candidate_diff = get_running_candidate_ietf_slice_data_diff( - service_config + dst_endpoint_settings = get_endpoint_settings( + dst_device_obj, dst_endpoint_obj.name ) - service_id = candidate_resource_value_dict["network-slice-services"][ - "slice-service" - ][0]["id"] + + # Load running & candidate data, compute diff + running_data, candidate_data = load_json_rule_data(service_config) + running_candidate_diff = DeepDiff(running_data, candidate_data) + + # Determine service_id and operation_type + slice_service = candidate_data["network-slice-services"]["slice-service"][0] + service_id = slice_service["id"] if not running_candidate_diff: operation_type = "create" elif "values_changed" in running_candidate_diff: operation_type = "update" - LOGGER.debug("running_candidate_diff: %s", running_candidate_diff) - slice_services = candidate_resource_value_dict["network-slice-services"][ - "slice-service" - ] - slice_service = slice_services[0] + + # Parse relevant connectivity data sdps = slice_service["sdps"]["sdp"] - connection_groups = slice_service["connection-groups"]["connection-group"] - connection_group = connection_groups[0] + connection_group = slice_service["connection-groups"]["connection-group"][0] connecitivity_constructs = connection_group["connectivity-construct"] + + # The code below assumes a single connectivity construct or + # that the relevant one is the first in the list: connecitivity_construct = connecitivity_constructs[0] src_sdp_idx = connecitivity_construct["p2p-sender-sdp"] dst_sdp_idx = connecitivity_construct["p2p-receiver-sdp"] + + # QoS qos_info = extract_qos_info_from_connection_group( src_sdp_idx, dst_sdp_idx, connecitivity_constructs ) + + # Retrieve match-criterion info src_sdp = next(sdp for sdp in sdps if sdp["id"] == src_sdp_idx) dst_sdp = next(sdp for sdp in sdps if sdp["id"] == dst_sdp_idx) + src_match_criterion = src_sdp["service-match-criteria"]["match-criterion"][ 0 ] @@ -311,52 +400,25 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler): dst_match_criterion_ipv4_info = extract_match_criterion_ipv4_info( dst_match_criterion ) - src_ipv4_lan_prefixes = [ - LANPrefixesDict( - lan=src_match_criterion_ipv4_info["dst_lan"], - lan_tag=src_match_criterion_ipv4_info["vlan"], - ) - ] - dst_ipv4_lan_prefixes = [ - LANPrefixesDict( - lan=dst_match_criterion_ipv4_info["dst_lan"], - lan_tag=dst_match_criterion_ipv4_info["vlan"], - ) - ] - src_ce_address = src_endpoint_settings["address_ip"] - src_pe_address = src_ce_address - src_ce_address_prefix = src_endpoint_settings["address_prefix"] - dst_ce_address = dst_endpoint_settings["address_ip"] - dst_pe_address = dst_ce_address - dst_ce_address_prefix = dst_endpoint_settings["address_prefix"] - resource_value_dict = { - "uuid": service_id, - "src_device_name": src_device_name, - "src_endpoint_name": src_endpoint_obj.name, - "src_site_location": src_endpoint_settings["site_location"], - "src_ipv4_lan_prefixes": src_ipv4_lan_prefixes, - "src_ce_address": src_ce_address, - "src_pe_address": src_pe_address, - "src_ce_pe_network_prefix": src_ce_address_prefix, - "src_mtu": MTU, - "src_qos_profile_latency": qos_info["src_qos_profile_latency"], - "src_input_bw": qos_info["src_input_bw"], - "src_output_bw": qos_info["src_output_bw"], - "dst_device_name": dst_device_name, - "dst_endpoint_name": dst_endpoint_obj.name, - "dst_site_location": dst_endpoint_settings["site_location"], - "dst_ipv4_lan_prefixes": dst_ipv4_lan_prefixes, - "dst_ce_address": dst_ce_address, - "dst_pe_address": dst_pe_address, - "dst_ce_pe_network_prefix": dst_ce_address_prefix, - "dst_mtu": MTU, - "dst_qos_profile_latency": qos_info["dst_qos_profile_latency"], - "dst_input_bw": qos_info["dst_input_bw"], - "dst_output_bw": qos_info["dst_output_bw"], - } + + # Build resource dict & config rules + resource_value_dict = self.__build_resource_value_dict( + service_id=service_id, + src_device_obj=src_device_obj, + dst_device_obj=dst_device_obj, + src_endpoint_name=src_endpoint_obj.name, + dst_endpoint_name=dst_endpoint_obj.name, + qos_info=qos_info, + src_endpoint_settings=src_endpoint_settings, + dst_endpoint_settings=dst_endpoint_settings, + src_match_criterion_ipv4_info=src_match_criterion_ipv4_info, + dst_match_criterion_ipv4_info=dst_match_criterion_ipv4_info, + ) json_config_rules = setup_config_rules( service_id, resource_value_dict, operation_type ) + + # Configure device del controller.device_config.config_rules[:] for jcr in json_config_rules: controller.device_config.config_rules.append(ConfigRule(**jcr)) diff --git a/src/service/service/service_handlers/l3nm_ietfl3vpn/__init__.py b/src/service/service/service_handlers/l3nm_ietfl3vpn/__init__.py index 3ee6f7071..906dd19f3 100644 --- a/src/service/service/service_handlers/l3nm_ietfl3vpn/__init__.py +++ b/src/service/service/service_handlers/l3nm_ietfl3vpn/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2025 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -- GitLab From 2e6121087074dd840dd3472de7851daaf146fefc Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 21 Jan 2025 11:13:06 +0100 Subject: [PATCH 202/463] refactoring --- .../ietf_network_slice/ietf_slice_handler.py | 626 ++++++++++-------- 1 file changed, 343 insertions(+), 283 deletions(-) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py index 46e2423c4..6c52a4398 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py @@ -32,90 +32,177 @@ ADDRESS_PREFIX = 24 RAISE_IF_DIFFERS = False -def get_endpoint_controller_type( - endpoint: EndPointId, context_client: ContextClient -) -> str: - endpoint_device: Device = context_client.GetDevice(endpoint.device_id) - if endpoint_device.controller_id == DeviceId(): - return "" - controller = context_client.GetDevice(endpoint_device.controller_id) - if controller is None: - controller_uuid = endpoint_device.controller_id.device_uuid.uuid - raise Exception("Device({:s}) not found".format(str(controller_uuid))) - return controller.device_type +def validate_ietf_slice_data(request_data: Dict) -> None: + """ + Validate the provided IETF slice data against the YANG model. + """ + yang_validator = YangValidator("ietf-network-slice-service") + _ = yang_validator.parse_to_dict(request_data) + yang_validator.destroy() def get_custom_config_rule( service_config: ServiceConfig, resource_key: str ) -> Optional[ConfigRule]: + """ + Retrieve the custom config rule with the given resource_key from a ServiceConfig. + """ for cr in service_config.config_rules: if ( cr.WhichOneof("config_rule") == "custom" and cr.custom.resource_key == resource_key ): return cr + return None + + +def get_ietf_data_from_config(slice_request: Slice, resource_key: str) -> Dict: + """ + Retrieve the IETF data (as a Python dict) from a slice's config rule for the specified resource_key. + Raises an exception if not found. + """ + config_rule = get_custom_config_rule(slice_request.slice_config, resource_key) + if not config_rule: + raise Exception(f"IETF data not found for resource_key: {resource_key}") + return json.loads(config_rule.custom.resource_value) + + +def update_ietf_data_in_config( + slice_request: Slice, resource_key: str, ietf_data: Dict +) -> None: + """ + Update the slice config rule (identified by resource_key) with the provided IETF data. + """ + fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} + update_config_rule_custom( + slice_request.slice_config.config_rules, resource_key, fields + ) + + +def build_constraints_from_connection_group(connection_group: dict) -> List[Constraint]: + """ + Build a list of Constraints from the 'metric-bound' data in a connection group. + """ + constraints = [] + metric_bounds = connection_group["connectivity-construct"][0][ + "service-slo-sle-policy" + ]["slo-policy"]["metric-bound"] + + for metric in metric_bounds: + metric_type = metric["metric-type"] + if metric_type == "ietf-nss:one-way-delay-maximum": + bound_value = float(metric["bound"]) + constraint = Constraint() + constraint.sla_latency.e2e_latency_ms = bound_value + constraints.append(constraint) + elif metric_type == "ietf-nss:one-way-bandwidth": + bound_value = float(metric["bound"]) + constraint = Constraint() + # Convert from Mbps to Gbps if needed + constraint.sla_capacity.capacity_gbps = bound_value / 1.0e3 + constraints.append(constraint) + + return constraints + + +def get_endpoint_controller_type( + endpoint: EndPointId, context_client: ContextClient +) -> str: + """ + Retrieve the device type of an endpoint's controller device, if any; otherwise returns an empty string. + """ + endpoint_device: Device = context_client.GetDevice(endpoint.device_id) + if endpoint_device.controller_id == DeviceId(): + return "" + controller = context_client.GetDevice(endpoint_device.controller_id) + if controller is None: + controller_uuid = endpoint_device.controller_id.device_uuid.uuid + raise Exception(f"Controller device {controller_uuid} not found") + return controller.device_type def sort_endpoints( - endpoinst_list: List[EndPointId], + endpoints_list: List[EndPointId], sdps: List, connection_group: Dict, context_client: ContextClient, ) -> List[EndPointId]: - first_ep = endpoinst_list[0] + """ + Sort the endpoints_list based on controller type: + - If the first endpoint is an NCE, keep order. + - If the last endpoint is an NCE, reverse order. + - Otherwise, use the 'p2p-sender-sdp' from the connection group to decide. + """ + if not endpoints_list: + return endpoints_list + + first_ep = endpoints_list[0] + last_ep = endpoints_list[-1] first_controller_type = get_endpoint_controller_type(first_ep, context_client) - last_ep = endpoinst_list[-1] last_controller_type = get_endpoint_controller_type(last_ep, context_client) + if first_controller_type == DeviceTypeEnum.NCE.value: - return endpoinst_list + return endpoints_list elif last_controller_type == DeviceTypeEnum.NCE.value: - return endpoinst_list[::-1] - else: - src_sdp_id = connection_group["connectivity-construct"][0]["p2p-sender-sdp"] - sdp_id_name_mapping = {sdp["id"]: sdp["node-id"] for sdp in sdps} - if ( - endpoinst_list[0].device_id.device_uuid.uuid - == sdp_id_name_mapping[src_sdp_id] - ): - return endpoinst_list - return endpoinst_list[::-1] + return endpoints_list[::-1] + + src_sdp_id = connection_group["connectivity-construct"][0]["p2p-sender-sdp"] + sdp_id_name_mapping = {sdp["id"]: sdp["node-id"] for sdp in sdps} + if endpoints_list[0].device_id.device_uuid.uuid == sdp_id_name_mapping[src_sdp_id]: + return endpoints_list + return endpoints_list[::-1] def replace_ont_endpoint_with_emu_dc( - endpoint_list: List, context_client: ContextClient -) -> List: + endpoint_list: List[EndPointId], context_client: ContextClient +) -> List[EndPointId]: + """ + Replace an ONT endpoint in endpoint_list with an 'emu-datacenter' endpoint if found. + One endpoint must be managed (controller_id != empty), the other must be unmanaged. + """ + if len(endpoint_list) != 2: + raise Exception( + "Expecting exactly two endpoints to handle ONT -> emu-dc replacement" + ) + link_list = context_client.ListLinks(Empty()) links = list(link_list.links) devices_list = context_client.ListDevices(Empty()) devices = devices_list.devices + uuid_name_map = {d.device_id.device_uuid.uuid: d.name for d in devices} uuid_device_map = {d.device_id.device_uuid.uuid: d for d in devices} name_device_map = {d.name: d for d in devices} - endpoint_id_1 = endpoint_list[0] + + endpoint_id_1, endpoint_id_2 = endpoint_list device_uuid_1 = endpoint_id_1.device_id.device_uuid.uuid - device_1 = name_device_map[device_uuid_1] - endpoint_id_2 = endpoint_list[1] device_uuid_2 = endpoint_id_2.device_id.device_uuid.uuid - device_2 = name_device_map[device_uuid_2] + + device_1 = name_device_map.get(device_uuid_1) + device_2 = name_device_map.get(device_uuid_2) + + if not device_1 or not device_2: + raise Exception("One or both devices not found in name_device_map") + + # Check if the first endpoint is managed if device_1.controller_id != DeviceId(): for link in links: link_endpoints = list(link.link_endpoint_ids) - link_ep_1 = link_endpoints[0] - link_ep_2 = link_endpoints[1] + link_ep_1, link_ep_2 = link_endpoints if ( - device_uuid_1 == uuid_name_map[link_ep_1.device_id.device_uuid.uuid] + device_uuid_1 == uuid_name_map.get(link_ep_1.device_id.device_uuid.uuid) and uuid_device_map[link_ep_2.device_id.device_uuid.uuid].device_type == "emu-datacenter" ): endpoint_list[0] = link_ep_2 break + # Otherwise, check if the second endpoint is managed elif device_2.controller_id != DeviceId(): for link in links: link_endpoints = list(link.link_endpoint_ids) - link_ep_1 = link_endpoints[0] - link_ep_2 = link_endpoints[1] + link_ep_1, link_ep_2 = link_endpoints if ( - device_uuid_2 == uuid_name_map[link_ep_1.device_id.device_uuid.uuid] + device_uuid_2 == uuid_name_map.get(link_ep_1.device_id.device_uuid.uuid) and uuid_device_map[link_ep_2.device_id.device_uuid.uuid].device_type == "emu-datacenter" ): @@ -123,31 +210,34 @@ def replace_ont_endpoint_with_emu_dc( break else: raise Exception( - "one of the sdps should be managed by a controller and the other one should not be controlled" + "One endpoint should be managed by a controller and the other should not be" ) - return endpoint_list - -def validate_ietf_slice_data(request_data: Dict) -> None: - yang_validator = YangValidator("ietf-network-slice-service") - _ = yang_validator.parse_to_dict(request_data) - yang_validator.destroy() + return endpoint_list class IETFSliceHandler: @staticmethod def get_all_ietf_slices(context_client: ContextClient) -> Dict: + """ + Retrieve all IETF slices from the (single) context. Expects exactly one context in the system. + """ existing_context_ids = context_client.ListContextIds(Empty()) context_ids = list(existing_context_ids.context_ids) if len(context_ids) != 1: - raise Exception("Number of contexts should be 1") + raise Exception("Number of contexts should be exactly 1") + slices_list = context_client.ListSlices(context_ids[0]) slices = slices_list.slices + ietf_slices = {"network-slice-services": {"slice-service": []}} - for slice in slices: + for slc in slices: candidate_cr = get_custom_config_rule( - slice.slice_config, CANDIDATE_RESOURCE_KEY + slc.slice_config, CANDIDATE_RESOURCE_KEY ) + if not candidate_cr: + # Skip slices that don't have the candidate_ietf_slice data + continue candidate_ietf_data = json.loads(candidate_cr.custom.resource_value) ietf_slices["network-slice-services"]["slice-service"].append( candidate_ietf_data["network-slice-services"]["slice-service"][0] @@ -158,27 +248,37 @@ class IETFSliceHandler: def create_slice_service( request_data: dict, context_client: ContextClient ) -> Slice: + """ + Create a new slice service from the provided IETF data, applying validations and constructing a Slice object. + """ + # Ensure the top-level key is "network-slice-services" if "network-slice-services" not in request_data: request_data = {"network-slice-services": request_data} + validate_ietf_slice_data(request_data) - slice_services = request_data["network-slice-services"]["slice-service"] - slice_service = slice_services[0] + slice_service = request_data["network-slice-services"]["slice-service"][0] + slice_id = slice_service["id"] sdps = slice_service["sdps"]["sdp"] - connection_groups = slice_service["connection-groups"]["connection-group"] if len(sdps) != 2: - raise Exception("Number of SDPs should be 2") - slice_request: Slice = Slice() + raise Exception("Number of SDPs should be exactly 2") + + connection_groups = slice_service["connection-groups"]["connection-group"] + slice_request = Slice() slice_request.slice_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME slice_request.slice_id.slice_uuid.uuid = slice_id slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED + list_endpoints = [] endpoint_config_rules = [] connection_group_ids = set() + + # Build endpoints from SDPs for sdp in sdps: attachment_circuits = sdp["attachment-circuits"]["attachment-circuit"] if len(attachment_circuits) != 1: - raise Exception("All SDPs should have 1 attachment-circuit") + raise Exception("Each SDP must have exactly 1 attachment-circuit") + endpoint = EndPointId() endpoint.topology_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME device_uuid = sdp["node-id"] @@ -186,11 +286,15 @@ class IETFSliceHandler: endpoint_uuid = attachment_circuits[0]["ac-tp-id"] endpoint.endpoint_uuid.uuid = endpoint_uuid list_endpoints.append(endpoint) + + # Keep track of connection-group-id from each SDP connection_group_ids.add( sdp["service-match-criteria"]["match-criterion"][0][ "target-connection-group-id" ] ) + + # Endpoint-specific config rule fields endpoint_config_rule_fields = { "address_ip": (endpoint_uuid, RAISE_IF_DIFFERS), "address_prefix": (ADDRESS_PREFIX, RAISE_IF_DIFFERS), @@ -201,41 +305,36 @@ class IETFSliceHandler: endpoint_config_rule_fields, ) ) + if len(connection_group_ids) != 1: - raise Exception("SDPs target-connection-group-id do not match") - list_constraints = [] - for cg in connection_groups: - if cg["id"] != list(connection_group_ids)[0]: - continue - metric_bounds = cg["connectivity-construct"][0]["service-slo-sle-policy"][ - "slo-policy" - ]["metric-bound"] - for metric in metric_bounds: - if metric["metric-type"] == "ietf-nss:one-way-delay-maximum": - constraint = Constraint() - constraint.sla_latency.e2e_latency_ms = float(metric["bound"]) - list_constraints.append(constraint) - elif metric["metric-type"] == "ietf-nss:one-way-bandwidth": - constraint = Constraint() - constraint.sla_capacity.capacity_gbps = ( - float(metric["bound"]) / 1.0e3 - ) - list_constraints.append(constraint) - break - else: - raise Exception("connection group not found") - list_endpoints = sort_endpoints(list_endpoints, sdps, cg, context_client) + raise Exception("SDPs do not share a common connection-group-id") + + # Build constraints from the matching connection group + unique_cg_id = connection_group_ids.pop() + found_cg = next( + (cg for cg in connection_groups if cg["id"] == unique_cg_id), None + ) + if not found_cg: + raise Exception("The connection group referenced by the SDPs was not found") + + list_constraints = build_constraints_from_connection_group(found_cg) + + # Sort endpoints and optionally replace the ONT endpoint + list_endpoints = sort_endpoints(list_endpoints, sdps, found_cg, context_client) list_endpoints = replace_ont_endpoint_with_emu_dc( list_endpoints, context_client ) + slice_request.slice_endpoint_ids.extend(list_endpoints) slice_request.slice_constraints.extend(list_constraints) - # TODO adding owner, needs to be recoded after updating the bindings - owner = slice_id - slice_request.slice_owner.owner_string = owner + + # Set slice owner + slice_request.slice_owner.owner_string = slice_id slice_request.slice_owner.owner_uuid.uuid = str( - uuid.uuid5(uuid.NAMESPACE_DNS, owner) + uuid.uuid5(uuid.NAMESPACE_DNS, slice_id) ) + + # Update slice config with IETF data (both running and candidate) ietf_slice_fields = { name: (value, RAISE_IF_DIFFERS) for name, value in request_data.items() } @@ -250,6 +349,7 @@ class IETFSliceHandler: ietf_slice_fields, ) + # Update endpoint config rules for ep_cr_key, ep_cr_fields in endpoint_config_rules: update_config_rule_custom( slice_request.slice_config.config_rules, ep_cr_key, ep_cr_fields @@ -261,120 +361,113 @@ class IETFSliceHandler: def create_sdp( request_data: dict, slice_uuid: str, context_client: ContextClient ) -> Slice: + """ + Add a new SDP to an existing slice, updating the candidate IETF data. + """ sdps = request_data["sdp"] if len(sdps) != 1: - raise Exception("Number of SDPs should be 1") + raise Exception("Number of SDPs to create must be exactly 1") + new_sdp = sdps[0] - # slice_request = get_slice_by_uuid(context_client, slice_uuid) slice_request = get_slice_by_defualt_name( context_client, slice_uuid, rw_copy=False ) - for cr in slice_request.slice_config.config_rules: - if cr.WhichOneof("config_rule") != "custom": - continue - if cr.custom.resource_key == CANDIDATE_RESOURCE_KEY: - ietf_data = json.loads(cr.custom.resource_value) - break - else: - raise Exception("ietf data not found") - slice_services = ietf_data["network-slice-services"]["slice-service"] - slice_service = slice_services[0] + ietf_data = get_ietf_data_from_config(slice_request, CANDIDATE_RESOURCE_KEY) + + slice_service = ietf_data["network-slice-services"]["slice-service"][0] slice_sdps = slice_service["sdps"]["sdp"] slice_sdps.append(new_sdp) - fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} - update_config_rule_custom( - slice_request.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields - ) + + # Save updated IETF data + update_ietf_data_in_config(slice_request, CANDIDATE_RESOURCE_KEY, ietf_data) return slice_request @staticmethod def delete_sdp( slice_uuid: str, sdp_id: str, context_client: ContextClient ) -> Slice: - # slice_request = get_slice_by_uuid(context_client, slice_uuid) + """ + Delete the specified SDP from an existing slice's candidate IETF data. + """ slice_request = get_slice_by_defualt_name( context_client, slice_uuid, rw_copy=False ) - for cr in slice_request.slice_config.config_rules: - if cr.WhichOneof("config_rule") != "custom": - continue - if cr.custom.resource_key == CANDIDATE_RESOURCE_KEY: - ietf_data = json.loads(cr.custom.resource_value) - break - else: - raise Exception("ietf data not found") - slice_services = ietf_data["network-slice-services"]["slice-service"] - slice_service = slice_services[0] + ietf_data = get_ietf_data_from_config(slice_request, CANDIDATE_RESOURCE_KEY) + + slice_service = ietf_data["network-slice-services"]["slice-service"][0] slice_sdps = slice_service["sdps"]["sdp"] - sdp_idx = list((slice_sdp["id"] == sdp_id for slice_sdp in slice_sdps)).index( - True + + # Find and remove the matching SDP + sdp_idx = next( + (i for i, sdp in enumerate(slice_sdps) if sdp["id"] == sdp_id), None ) + if sdp_idx is None: + raise Exception(f"SDP with id '{sdp_id}' not found in slice '{slice_uuid}'") slice_sdps.pop(sdp_idx) - fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} - update_config_rule_custom( - slice_request.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields - ) + + update_ietf_data_in_config(slice_request, CANDIDATE_RESOURCE_KEY, ietf_data) return slice_request @staticmethod def create_connection_group( request_data: dict, slice_id: str, context_client: ContextClient ) -> Slice: + """ + Add a new connection group to an existing slice's candidate IETF data. + """ connection_groups = request_data["connection-group"] if len(connection_groups) != 1: - raise Exception("Number of connection groups should be 1") + raise Exception("Number of connection groups to create must be exactly 1") + new_connection_group = connection_groups[0] - # slice = get_slice_by_uuid(context_client, slice_id) - slice = get_slice_by_defualt_name(context_client, slice_id, rw_copy=False) - for cr in slice.slice_config.config_rules: - if cr.WhichOneof("config_rule") != "custom": - continue - if cr.custom.resource_key == CANDIDATE_RESOURCE_KEY: - ietf_data = json.loads(cr.custom.resource_value) - break - else: - raise Exception("ietf data not found") - slice_services = ietf_data["network-slice-services"]["slice-service"] - slice_service = slice_services[0] + slice_request = get_slice_by_defualt_name( + context_client, slice_id, rw_copy=False + ) + ietf_data = get_ietf_data_from_config(slice_request, CANDIDATE_RESOURCE_KEY) + + slice_service = ietf_data["network-slice-services"]["slice-service"][0] slice_connection_groups = slice_service["connection-groups"]["connection-group"] slice_connection_groups.append(new_connection_group) - fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} - update_config_rule_custom( - slice.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields - ) + + # Validate the updated data, then save validate_ietf_slice_data(ietf_data) - return slice + update_ietf_data_in_config(slice_request, CANDIDATE_RESOURCE_KEY, ietf_data) + return slice_request @staticmethod def update_connection_group( slice_name: str, updated_connection_group: dict, context_client: ContextClient, - ): + ) -> Slice: + """ + Update an existing connection group in the candidate IETF data. + """ slice_request = get_slice_by_defualt_name( context_client, slice_name, rw_copy=False ) - slice_config = slice_request.slice_config - cr = get_custom_config_rule(slice_config, CANDIDATE_RESOURCE_KEY) - candidate_ietf_data = json.loads(cr.custom.resource_value) - slice_services = candidate_ietf_data["network-slice-services"]["slice-service"] - slice_service = slice_services[0] + candidate_ietf_data = get_ietf_data_from_config( + slice_request, CANDIDATE_RESOURCE_KEY + ) + + slice_service = candidate_ietf_data["network-slice-services"]["slice-service"][ + 0 + ] slice_connection_groups = slice_service["connection-groups"]["connection-group"] - connection_group_id = updated_connection_group["id"] - cg_idx = list( - ( - slice_cg["id"] == connection_group_id - for slice_cg in slice_connection_groups - ) - ).index(True) + + cg_id = updated_connection_group["id"] + cg_idx = next( + (i for i, cg in enumerate(slice_connection_groups) if cg["id"] == cg_id), + None, + ) + if cg_idx is None: + raise Exception(f"Connection group with id '{cg_id}' not found") + slice_connection_groups[cg_idx] = updated_connection_group - fields = { - name: (value, RAISE_IF_DIFFERS) - for name, value in candidate_ietf_data.items() - } - update_config_rule_custom( - slice_request.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields + update_ietf_data_in_config( + slice_request, CANDIDATE_RESOURCE_KEY, candidate_ietf_data ) + slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED return slice_request @@ -382,30 +475,39 @@ class IETFSliceHandler: def delete_connection_group( slice_uuid: str, connection_group_id: str, context_client: ContextClient ) -> Slice: - # slice_request = get_slice_by_uuid(context_client, slice_uuid) + """ + Remove an existing connection group from the candidate IETF data of a slice. + """ slice_request = get_slice_by_defualt_name( context_client, slice_uuid, rw_copy=False ) - slice_config = slice_request.slice_config - cr = get_custom_config_rule(slice_config, CANDIDATE_RESOURCE_KEY) - candidate_ietf_data = json.loads(cr.custom.resource_value) - slice_services = candidate_ietf_data["network-slice-services"]["slice-service"] - slice_service = slice_services[0] + candidate_ietf_data = get_ietf_data_from_config( + slice_request, CANDIDATE_RESOURCE_KEY + ) + + slice_service = candidate_ietf_data["network-slice-services"]["slice-service"][ + 0 + ] slice_connection_groups = slice_service["connection-groups"]["connection-group"] - sdp_idx = list( + + cg_idx = next( ( - slice_cr["id"] == connection_group_id - for slice_cr in slice_connection_groups + i + for i, cg in enumerate(slice_connection_groups) + if cg["id"] == connection_group_id + ), + None, + ) + if cg_idx is None: + raise Exception( + f"Connection group with id '{connection_group_id}' not found" ) - ).index(True) - removed_connection_group = slice_connection_groups.pop(sdp_idx) - fields = { - name: (value, RAISE_IF_DIFFERS) - for name, value in candidate_ietf_data.items() - } - update_config_rule_custom( - slice_request.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields + + slice_connection_groups.pop(cg_idx) + update_ietf_data_in_config( + slice_request, CANDIDATE_RESOURCE_KEY, candidate_ietf_data ) + slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED return slice_request @@ -413,91 +515,55 @@ class IETFSliceHandler: def create_match_criteria( request_data: dict, slice_name: str, sdp_id: str, context_client: ContextClient ) -> Slice: + """ + Create a new match-criterion for the specified SDP in a slice's candidate IETF data. + """ match_criteria = request_data["match-criterion"] if len(match_criteria) != 1: - raise Exception("Number of SDPs should be 1") + raise Exception( + "Number of match-criterion entries to create must be exactly 1" + ) + new_match_criterion = match_criteria[0] target_connection_group_id = new_match_criterion["target-connection-group-id"] - # slice_request = get_slice_by_uuid(context_client, slice_id) + slice_request = get_slice_by_defualt_name( context_client, slice_name, rw_copy=False ) - for cr in slice_request.slice_config.config_rules: - if cr.WhichOneof("config_rule") != "custom": - continue - if cr.custom.resource_key == CANDIDATE_RESOURCE_KEY: - ietf_data = json.loads(cr.custom.resource_value) - break - else: - raise Exception("ietf data not found") - slice_services = ietf_data["network-slice-services"]["slice-service"] - slice_service = slice_services[0] - slice_id = slice_service["id"] - sdps = slice_service["sdps"]["sdp"] + ietf_data = get_ietf_data_from_config(slice_request, CANDIDATE_RESOURCE_KEY) + + slice_service = ietf_data["network-slice-services"]["slice-service"][0] connection_groups = slice_service["connection-groups"]["connection-group"] - slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED - list_endpoints = [] - for sdp in sdps: - if ( - sdp["service-match-criteria"]["match-criterion"][0][ - "target-connection-group-id" - ] - == target_connection_group_id - ): - attachment_circuits = sdp["attachment-circuits"]["attachment-circuit"] - if len(attachment_circuits) != 1: - raise Exception("All SDPs should have 1 attachment-circuit") - 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 = attachment_circuits[0]["ac-tp-id"] - list_endpoints.append(endpoint) - break - else: - raise Exception("Second SDP not found") - for sdp in sdps: - if sdp["id"] == sdp_id: - sdp["service-match-criteria"]["match-criterion"].append( - new_match_criterion - ) - attachment_circuits = sdp["attachment-circuits"]["attachment-circuit"] - if len(attachment_circuits) != 1: - raise Exception("All SDPs should have 1 attachment-circuit") - 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 = attachment_circuits[0]["ac-tp-id"] - list_endpoints.append(endpoint) - break - else: - raise Exception("SDP not found") - list_constraints = [] - for cg in connection_groups: - if cg["id"] != target_connection_group_id: - continue - metric_bounds = cg["connectivity-construct"][0]["service-slo-sle-policy"][ - "slo-policy" - ]["metric-bound"] - for metric in metric_bounds: - if metric["metric-type"] == "ietf-nss:one-way-delay-maximum": - constraint = Constraint() - constraint.sla_latency.e2e_latency_ms = float(metric["bound"]) - list_constraints.append(constraint) - elif metric["metric-type"] == "ietf-nss:one-way-bandwidth": - constraint = Constraint() - constraint.sla_capacity.capacity_gbps = ( - float(metric["bound"]) / 1.0e3 - ) - list_constraints.append(constraint) - break - else: - raise Exception("connection group not found") + sdps = slice_service["sdps"]["sdp"] + + # Find the referenced connection group + found_cg = next( + (cg for cg in connection_groups if cg["id"] == target_connection_group_id), + None, + ) + if not found_cg: + raise Exception( + f"Connection group '{target_connection_group_id}' not found" + ) + + # Build constraints from that connection group + list_constraints = build_constraints_from_connection_group(found_cg) + + # Add match-criterion to the relevant SDP + sdp_to_update = next((s for s in sdps if s["id"] == sdp_id), None) + if not sdp_to_update: + raise Exception(f"SDP '{sdp_id}' not found") + + sdp_to_update["service-match-criteria"]["match-criterion"].append( + new_match_criterion + ) + + # Update constraints at the slice level as needed del slice_request.slice_constraints[:] slice_request.slice_constraints.extend(list_constraints) - fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} - update_config_rule_custom( - slice_request.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields - ) + slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED + + update_ietf_data_in_config(slice_request, CANDIDATE_RESOURCE_KEY, ietf_data) return slice_request @staticmethod @@ -507,60 +573,54 @@ class IETFSliceHandler: match_criterion_id: int, context_client: ContextClient, ) -> Slice: - # slice_request = get_slice_by_uuid(context_client, slice_uuid) + """ + Delete the specified match-criterion from an SDP in the slice's candidate IETF data. + """ slice_request = get_slice_by_defualt_name( context_client, slice_uuid, rw_copy=False ) - for cr in slice_request.slice_config.config_rules: - if cr.WhichOneof("config_rule") != "custom": - continue - if cr.custom.resource_key == CANDIDATE_RESOURCE_KEY: - ietf_data = json.loads(cr.custom.resource_value) - break - else: - raise Exception("ietf data not found") - slice_services = ietf_data["network-slice-services"]["slice-service"] - slice_service = slice_services[0] + ietf_data = get_ietf_data_from_config(slice_request, CANDIDATE_RESOURCE_KEY) + + slice_service = ietf_data["network-slice-services"]["slice-service"][0] sdps = slice_service["sdps"]["sdp"] - for sdp in sdps: - if sdp["id"] == sdp_id: - match_criteria = sdp["service-match-criteria"]["match-criterion"] - match_criterion_idx = [ - match_criterion["index"] == match_criterion_id - for match_criterion in match_criteria - ].index(True) - del match_criteria[match_criterion_idx] - break - else: - raise Exception("Second SDP not found") - fields = {name: (value, RAISE_IF_DIFFERS) for name, value in ietf_data.items()} - update_config_rule_custom( - slice_request.slice_config.config_rules, CANDIDATE_RESOURCE_KEY, fields + + # Find and modify the specified SDP + sdp_to_update = next((s for s in sdps if s["id"] == sdp_id), None) + if not sdp_to_update: + raise Exception(f"SDP '{sdp_id}' not found in slice '{slice_uuid}'") + + match_criteria = sdp_to_update["service-match-criteria"]["match-criterion"] + mc_index = next( + ( + i + for i, m in enumerate(match_criteria) + if m["index"] == match_criterion_id + ), + None, ) + if mc_index is None: + raise Exception( + f"No match-criterion with index '{match_criterion_id}' found in SDP '{sdp_id}'" + ) + + match_criteria.pop(mc_index) + update_ietf_data_in_config(slice_request, CANDIDATE_RESOURCE_KEY, ietf_data) return slice_request @staticmethod def copy_candidate_ietf_slice_data_to_running( slice_uuid: str, context_client: ContextClient ) -> Slice: - # slice_request = get_slice_by_uuid(context_client, slice_uuid) + """ + Copy candidate IETF slice data to the running IETF slice data for a given slice. + """ slice_request = get_slice_by_defualt_name( context_client, slice_uuid, rw_copy=False ) - for cr in slice_request.slice_config.config_rules: - if ( - cr.WhichOneof("config_rule") == "custom" - and cr.custom.resource_key == CANDIDATE_RESOURCE_KEY - ): - candidate_resource_value_dict = json.loads(cr.custom.resource_value) - fields = { - name: (value, RAISE_IF_DIFFERS) - for name, value in candidate_resource_value_dict.items() - } - break - else: - raise Exception("candidate ietf slice data not found") - update_config_rule_custom( - slice_request.slice_config.config_rules, RUNNING_RESOURCE_KEY, fields + candidate_ietf_data = get_ietf_data_from_config( + slice_request, CANDIDATE_RESOURCE_KEY + ) + update_ietf_data_in_config( + slice_request, RUNNING_RESOURCE_KEY, candidate_ietf_data ) return slice_request -- GitLab From ef493576e561ebeb429734b726d5355b1cd12a7a Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Tue, 21 Jan 2025 10:50:42 +0000 Subject: [PATCH 203/463] Add osm_client microservice Implement new osm_client.proto Create logic to manage request provide by NBI microservice Including ServiceServicer implementation ToDo: Automatic test with HTTP Mock Dockerfile --- manifests/osm_clientservice.yaml | 75 ++++++++++++++++++ proto/osm_client.proto | 71 +++++++++++++++++ src/common/Constants.py | 2 + src/device/requirements.in | 2 +- src/osm_client/Config.py | 20 +++++ src/osm_client/__init__.py | 14 ++++ src/osm_client/client/OsmClient.py | 79 +++++++++++++++++++ src/osm_client/client/__init__.py | 14 ++++ src/osm_client/service/OsmClientService.py | 33 ++++++++ .../service/OsmClientServiceServicerImpl.py | 70 ++++++++++++++++ src/osm_client/service/__init__.py | 14 ++++ src/osm_client/service/__main__.py | 68 ++++++++++++++++ 12 files changed, 461 insertions(+), 1 deletion(-) create mode 100644 manifests/osm_clientservice.yaml create mode 100644 proto/osm_client.proto create mode 100644 src/osm_client/Config.py create mode 100644 src/osm_client/__init__.py create mode 100644 src/osm_client/client/OsmClient.py create mode 100644 src/osm_client/client/__init__.py create mode 100644 src/osm_client/service/OsmClientService.py create mode 100644 src/osm_client/service/OsmClientServiceServicerImpl.py create mode 100644 src/osm_client/service/__init__.py create mode 100644 src/osm_client/service/__main__.py diff --git a/manifests/osm_clientservice.yaml b/manifests/osm_clientservice.yaml new file mode 100644 index 000000000..bf536e2fd --- /dev/null +++ b/manifests/osm_clientservice.yaml @@ -0,0 +1,75 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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: apps/v1 +kind: Deployment +metadata: + name: osm_clientservice +spec: + selector: + matchLabels: + app: osm_clientservice + #replicas: 1 + template: + metadata: + labels: + app: osm_clientservice + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: server + image: labs.etsi.org:5050/tfs/controller/osm_client:latest + imagePullPolicy: Always + ports: + - containerPort: 30210 + - containerPort: 9192 + env: + - name: OSM_ADDRESS + value: "127.0.0.1" + - name: LOG_LEVEL + value: "INFO" + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:30210"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:30210"] + resources: + requests: + cpu: 250m + memory: 128Mi + limits: + cpu: 1000m + memory: 1024Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: osm_clientservice + labels: + app: osm_clientservice +spec: + type: ClusterIP + selector: + app: osm_clientservice + ports: + - name: grpc + protocol: TCP + port: 30210 + targetPort: 30210 + - name: metrics + protocol: TCP + port: 9192 + targetPort: +--- \ No newline at end of file diff --git a/proto/osm_client.proto b/proto/osm_client.proto new file mode 100644 index 000000000..b44781641 --- /dev/null +++ b/proto/osm_client.proto @@ -0,0 +1,71 @@ +// Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package osmClient; + +import "context.proto"; + +service OsmService { + rpc NsiCreate (CreateRequest) returns(CreateResponse) {} + rpc NsiList (context.Empty) returns(NsiListResponse) {} + rpc NsiGet (GetRequest) returns(GetResponse) {} + rpc NsiDelete (DeleteRequest) returns(DeleteResponse) {} +} + +message CreateRequest { + string nst_name = 1; + string nsi_name = 2; + string config = 3; + string ssh_key = 4; + string account = 5; +} + +//OSM library doesn't return nsi ID, just an exception +message CreateResponse { + bool succeded = 1; + string errormessage = 2; +} + +message NsiListResponse { + repeated string id = 1; +} + +message GetRequest { + string id = 1; +} + +message GetResponse { + NsiObject nsi = 1; +} + +message NsiObject { + string nst_name = 1; + string nsi_name = 2; + string description = 3; + string VimAccountId = 4; + string Netslice_Subnet_id = 5; + string Netslice_vld_ip = 6; +} + +message DeleteRequest { + string id = 1; +} + +//OSM library doesn't return nsi ID, just an exception +message DeleteResponse { + bool succeded = 1; + string errormessage = 2; +} + diff --git a/src/common/Constants.py b/src/common/Constants.py index 682007646..8b5b714b5 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -72,6 +72,7 @@ class ServiceNameEnum(Enum): ANALYTICS = 'analytics' ANALYTICSBACKEND = 'analytics-backend' QOSPROFILE = 'qos-profile' + OSMCLIENT = 'osm-client' # Used for test and debugging only DLT_GATEWAY = 'dltgateway' @@ -112,6 +113,7 @@ DEFAULT_SERVICE_GRPC_PORTS = { ServiceNameEnum.ANALYTICS .value : 30080, ServiceNameEnum.ANALYTICSBACKEND .value : 30090, ServiceNameEnum.AUTOMATION .value : 30200, + ServiceNameEnum.OSMCLIENT .value : 30210, # Used for test and debugging only ServiceNameEnum.DLT_GATEWAY .value : 50051, diff --git a/src/device/requirements.in b/src/device/requirements.in index 30c982650..c89303df3 100644 --- a/src/device/requirements.in +++ b/src/device/requirements.in @@ -39,7 +39,7 @@ python-json-logger==2.0.2 requests==2.27.1 requests-mock==1.9.3 tabulate -websockets==10.4 +websockets==12.0 werkzeug==2.3.7 xmltodict==0.12.0 yattag diff --git a/src/osm_client/Config.py b/src/osm_client/Config.py new file mode 100644 index 000000000..84feff3d9 --- /dev/null +++ b/src/osm_client/Config.py @@ -0,0 +1,20 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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.Settings import get_setting + +DEFAULT_OSM_ADDRESS = '127.0.0.1' +OSM_ADDRESS = get_setting('OSM_ADDRESS', DEFAULT_OSM_ADDRESS) + + \ No newline at end of file diff --git a/src/osm_client/__init__.py b/src/osm_client/__init__.py new file mode 100644 index 000000000..53d5157f7 --- /dev/null +++ b/src/osm_client/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/osm_client/client/OsmClient.py b/src/osm_client/client/OsmClient.py new file mode 100644 index 000000000..a040f661c --- /dev/null +++ b/src/osm_client/client/OsmClient.py @@ -0,0 +1,79 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 grpc, logging +from common.Constants import ServiceNameEnum +from common.Settings import get_service_host, get_service_port_grpc +from common.proto.osm_client_pb2_grpc import osmClientServiceStub +from common.proto.context_pb2 import (Empty) +from common.tools.client.RetryDecorator import retry, delay_exponential +from common.tools.grpc.Tools import grpc_message_to_json_string + +from osmclient import client +from osmclient.common.exceptions import ClientException + + +LOGGER = logging.getLogger(__name__) +MAX_RETRIES = 15 +DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) +RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') + +class OsmClient: + def __init__(self, host=None, port=None): + if not host: host = get_service_host(ServiceNameEnum.OSMCLIENT) + if not port: port = get_service_port_grpc(ServiceNameEnum.OSMCLIENT) + self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) + LOGGER.debug('Creating channel to {:s}...'.format(str(self.endpoint))) + self.channel = None + self.stub = None + self.connect() + LOGGER.debug('Channel created') + + + def connect(self): + self.channel = grpc.insecure_channel(self.endpoint) + self.stub = osmClientServiceStub(self.channel) + + def close(self): + if self.channel is not None: self.channel.close() + self.channel = None + self.stub = None + + @RETRY_DECORATOR + def NsiCreate(self, request : CreateRequest) -> CreateResponse: + LOGGER.debug('NsiCreate request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.NsiCreate(request) + LOGGER.debug('NsiCreate result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def NsiList(self, request : Empty) -> NsiListResponse: + LOGGER.debug('NsiList request') + response = self.stub.NsiList(request) + LOGGER.debug('NsiList result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def NsiGet(self, request : GetRequest) -> GetResponse: + LOGGER.debug('NsiGet request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.NsiGet(request) + LOGGER.debug('NsiGet result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def NsiDelete(self, request : DeleteRequest) -> DeleteResponse: + LOGGER.debug('NsiDelete request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.NsiDelete(request) + LOGGER.debug('NsiDelete result: {:s}'.format(grpc_message_to_json_string(response))) + return response \ No newline at end of file diff --git a/src/osm_client/client/__init__.py b/src/osm_client/client/__init__.py new file mode 100644 index 000000000..53d5157f7 --- /dev/null +++ b/src/osm_client/client/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/osm_client/service/OsmClientService.py b/src/osm_client/service/OsmClientService.py new file mode 100644 index 000000000..ccbf15366 --- /dev/null +++ b/src/osm_client/service/OsmClientService.py @@ -0,0 +1,33 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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.Constants import ServiceNameEnum +from common.Settings import get_service_port_grpc +from common.proto.osm_client_pb2_grpc import add_OsmServiceServicer_to_server +from common.tools.service.GenericGrpcService import GenericGrpcService +from osm_client.service.OsmClientServiceServicerImpl import OsmClientServiceServicerImpl + +from osmclient import client +from osmclient.common.exceptions import ClientException + + +class OsmClientService(GenericGrpcService): + def __init__(self, cls_name: str = __name__) -> None: + port = get_service_port_grpc(ServiceNameEnum.OSMCLIENT) + super().__init__(port, cls_name=cls_name) + self.osmClient_servicer = OsmClientServiceServicerImpl() + + + def install_servicers(self): + add_OsmServiceServicer_to_server(self.osmClient_servicer, self.server) diff --git a/src/osm_client/service/OsmClientServiceServicerImpl.py b/src/osm_client/service/OsmClientServiceServicerImpl.py new file mode 100644 index 000000000..f45c682a4 --- /dev/null +++ b/src/osm_client/service/OsmClientServiceServicerImpl.py @@ -0,0 +1,70 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 grpc, logging +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.proto.context_pb2 import (Empty) +from common.proto.osm_client_pb2 import CreateRequest, CreateResponse, NsiListResponse, GetRequest, GetResponse, DeleteRequest, DeleteResponse +from common.proto.osm_client_pb2_grpc import osmCLientServiceServicer +from osmclient import client +from osmclient.common.exceptions import ClientException +from osm_client.Config import OSM_ADDRESS + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('OSMCLIENT', 'RPC') + +class OsmClientServiceServicerImpl(osmCLientServiceServicer): + def __init__(self): + LOGGER.info('Creating Servicer...') + self.myclient = client.Client(host=OSM_ADDRESS, sol005=True) + LOGGER.info('osmClient created') + + LOGGER.info('Servicer Created') + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def NsiCreate(self, request : CreateRequest, context : grpc.ServicerContext) -> CreateResponse: + try: + #OSM library doesn't return nsi ID, just an exception + self.myclient.nsi.create(request.nst_name, request.nsi_name, request.account) + except Exception as e: + resp = CreateResponse(succeded = False, errormessage = str(e)) + else: + resp = CreateResponse(succeded = True) + return resp + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def NsiList(self, request : Empty, context : grpc.ServicerContext) -> NsiListResponse: + nsiIDs = self.myclient.nsi.list() + resp = NsiListResponse(id=nsiIDs) + return resp + + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def NsiGet(self, request : GetRequest, context : grpc.ServicerContext) -> GetResponse: + nsiObject = self.myclient.nsi.get(request.id) + resp = GetResponse(NsiObject = nsiObject) + return resp + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def NsiDelete(self, request : DeleteRequest, context : grpc.ServicerContext) -> DeleteResponse: + try: + #OSM library doesn't return nsi ID, just an exception + self.myclient.nsi.delete(request.id, False, False) + except Exception as e: + resp = DeleteResponse(succeded = False, errormessage = str(e)) + else: + resp = DeleteResponse(succeded = True) + return resp \ No newline at end of file diff --git a/src/osm_client/service/__init__.py b/src/osm_client/service/__init__.py new file mode 100644 index 000000000..53d5157f7 --- /dev/null +++ b/src/osm_client/service/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/osm_client/service/__main__.py b/src/osm_client/service/__main__.py new file mode 100644 index 000000000..d27b5c80a --- /dev/null +++ b/src/osm_client/service/__main__.py @@ -0,0 +1,68 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, signal, sys, threading +from common.Constants import ServiceNameEnum +from common.Settings import ( + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, + get_env_var_name, get_log_level, + wait_for_environment_variables +) +from .OsmClientService import OsmClientService + +terminate = threading.Event() +LOGGER = None + +def signal_handler(signal, frame): # pylint: disable=redefined-outer-name, unused-argument + LOGGER.warning('Terminate signal received') + terminate.set() + +def main(): + global LOGGER # pylint: disable=global-statement + + log_level = get_log_level() + logging.basicConfig(level=log_level) + LOGGER = logging.getLogger(__name__) + + wait_for_environment_variables([ + get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + ]) + + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + + LOGGER.info('Starting...') + + # Starting OsmClient service + grpc_service = OsmClientService() + grpc_service.start() + + LOGGER.debug('Configured Rules:') + + # Wait for Ctrl+C or termination signal + while not terminate.wait(timeout=1.0): pass + + LOGGER.info('Terminating...') + grpc_service.stop() + + LOGGER.info('Bye') + return 0 + +if __name__ == '__main__': + sys.exit(main()) -- GitLab From eaffff44689773a2b0bc757c0e8fa22a944e7a2e Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Tue, 21 Jan 2025 11:45:07 +0000 Subject: [PATCH 204/463] Updated Analytics Backend with Streamer - Refactor DaskStreamer by replacing "windows_size" with "batch_duration". - Refactor aggregation_handler to support multiple KPI dataframe --- .../service/AnalyticsBackendService.py | 13 +++++----- .../backend/service/AnalyzerHandlers.py | 11 +++++--- src/analytics/backend/service/Streamer.py | 26 ++++++++++--------- .../backend/tests/messages_analyzer.py | 4 +-- 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/analytics/backend/service/AnalyticsBackendService.py b/src/analytics/backend/service/AnalyticsBackendService.py index f676b2c50..10f1f75ea 100755 --- a/src/analytics/backend/service/AnalyticsBackendService.py +++ b/src/analytics/backend/service/AnalyticsBackendService.py @@ -104,11 +104,12 @@ class AnalyticsBackendService(GenericGrpcService): try: streamer = DaskStreamer( key = analyzer_uuid, - input_kpis = analyzer['input_kpis' ], - output_kpis = analyzer['output_kpis'], - thresholds = analyzer['thresholds' ], - batch_size = analyzer['batch_size' ], - window_size = analyzer['window_size'], + input_kpis = analyzer['input_kpis' ], + output_kpis = analyzer['output_kpis' ], + thresholds = analyzer['thresholds' ], + batch_size = analyzer['batch_size_min' ], + batch_duration = analyzer['batch_duration_min'], + window_size = analyzer['window_size' ], cluster_instance = self.cluster, producer_instance = self.central_producer, ) @@ -119,7 +120,7 @@ class AnalyticsBackendService(GenericGrpcService): if analyzer['duration'] > 0: def stop_after_duration(): time.sleep(analyzer['duration']) - LOGGER.warning(f"Execution duration completed of Analyzer: {analyzer_uuid}") + LOGGER.warning(f"Execution duration ({analyzer['duration']}) completed of Analyzer: {analyzer_uuid}") if not self.StopStreamer(analyzer_uuid): LOGGER.warning("Failed to stop Dask Streamer. Streamer may be already terminated.") diff --git a/src/analytics/backend/service/AnalyzerHandlers.py b/src/analytics/backend/service/AnalyzerHandlers.py index a05b1a0b7..256530ba7 100644 --- a/src/analytics/backend/service/AnalyzerHandlers.py +++ b/src/analytics/backend/service/AnalyzerHandlers.py @@ -95,6 +95,8 @@ def aggregation_handler( "sum" : ('kpi_value', 'sum'), } + results = [] + # Process each KPI-specific task parameter for kpi_index, kpi_id in enumerate(input_kpi_list): @@ -122,10 +124,13 @@ def aggregation_handler( agg_df['kpi_id'] = output_kpi_list[kpi_index] # logger.info(f"4. Applying thresholds for df: {agg_df['kpi_id']}") - result = threshold_handler(key, agg_df, kpi_task_parameters) + record = threshold_handler(key, agg_df, kpi_task_parameters) - return result.to_dict(orient='records') + results.extend(record.to_dict(orient='records')) else: logger.warning(f"No data available for KPIs: {kpi_id}. Skipping aggregation.") continue - return [] + if results: + return results + else: + return [] diff --git a/src/analytics/backend/service/Streamer.py b/src/analytics/backend/service/Streamer.py index c72359db2..e1eaffc49 100644 --- a/src/analytics/backend/service/Streamer.py +++ b/src/analytics/backend/service/Streamer.py @@ -29,19 +29,21 @@ logger = logging.getLogger(__name__) class DaskStreamer(threading.Thread): def __init__(self, key, input_kpis, output_kpis, thresholds, batch_size = 5, + batch_duration = None, window_size = None, cluster_instance = None, producer_instance = AnalyzerHelper.initialize_kafka_producer() ): super().__init__() - self.key = key - self.input_kpis = input_kpis - self.output_kpis = output_kpis - self.thresholds = thresholds - self.window_size = window_size - self.batch_size = batch_size - self.running = True - self.batch = [] + self.key = key + self.input_kpis = input_kpis + self.output_kpis = output_kpis + self.thresholds = thresholds + self.window_size = window_size # TODO: Not implemented + self.batch_size = batch_size + self.batch_duration = batch_duration + self.running = True + self.batch = [] # Initialize Kafka and Dask components self.client = AnalyzerHelper.initialize_dask_client(cluster_instance) @@ -65,7 +67,7 @@ class DaskStreamer(threading.Thread): if not self.client: logger.warning("Dask client is not running. Exiting loop.") break - message = self.consumer.poll(timeout=2.0) + message = self.consumer.poll(timeout=1.0) if message is None: # logger.info("No new messages received.") continue @@ -83,7 +85,7 @@ class DaskStreamer(threading.Thread): self.batch.append(value) # Window size has a precedence over batch size - if self.window_size is None: + if self.batch_duration is None: if len(self.batch) >= self.batch_size: # If batch size is not provided, process continue with the default batch size logger.info(f"Processing based on batch size {self.batch_size}.") self.task_handler_selector() @@ -91,8 +93,8 @@ class DaskStreamer(threading.Thread): else: # Process based on window size current_time = time.time() - if (current_time - last_batch_time) >= self.window_size and self.batch: - logger.info(f"Processing based on window size {self.window_size}.") + if (current_time - last_batch_time) >= self.batch_duration and self.batch: + logger.info(f"Processing based on window size {self.batch_duration}.") self.task_handler_selector() self.batch = [] last_batch_time = current_time diff --git a/src/analytics/backend/tests/messages_analyzer.py b/src/analytics/backend/tests/messages_analyzer.py index 4a119d948..11210ded1 100644 --- a/src/analytics/backend/tests/messages_analyzer.py +++ b/src/analytics/backend/tests/messages_analyzer.py @@ -32,13 +32,13 @@ def get_thresholds(): } def get_duration(): - return 40 + return 90 def get_windows_size(): return None def get_batch_size(): - return 10 + return 5 def get_interval(): return 5 -- GitLab From 60b45b062c0fb31d82ab029a52d8a8572f5ff8fa Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Thu, 23 Jan 2025 13:14:46 +0000 Subject: [PATCH 205/463] Add DockerFile to osm_client MicroServices Solve imports typo --- src/osm_client/Dockerfile | 77 +++++++++++++++++++ src/osm_client/client/OsmClient.py | 4 +- src/osm_client/service/OsmClientService.py | 4 - .../service/OsmClientServiceServicerImpl.py | 4 +- 4 files changed, 81 insertions(+), 8 deletions(-) create mode 100644 src/osm_client/Dockerfile diff --git a/src/osm_client/Dockerfile b/src/osm_client/Dockerfile new file mode 100644 index 000000000..1c7427404 --- /dev/null +++ b/src/osm_client/Dockerfile @@ -0,0 +1,77 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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.10.16-slim + + +# Install dependencies +RUN apt-get --yes --quiet --quiet update +RUN apt-get --yes --quiet --quiet install wget g++ git build-essential cmake make git \ + libpcre2-dev python3-dev python3-pip python3-cffi curl software-properties-common && \ + rm -rf /var/lib/apt/lists/* + +# Set Python to show logs as they occur +ENV PYTHONUNBUFFERED=0 + + +# Download the gRPC health probe +RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ + wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ + chmod +x /bin/grpc_health_probe + +# 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 + +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + +# Add common files into working directory +WORKDIR /var/teraflow/common +COPY src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto +RUN touch __init__.py +COPY proto/*.proto ./ +RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto +RUN rm *.proto +RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; + +# Create component sub-folders +RUN mkdir -p /var/teraflow/osm_client +WORKDIR /var/teraflow/osm_client +ENV OSM_CLIENT_VERSION=v16.0 +RUN python3 -m pip install -r "https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=${OSM_CLIENT_VERSION}" +RUN python3 -m pip install "git+https://osm.etsi.org/gerrit/osm/IM.git@${OSM_CLIENT_VERSION}#egg=osm-im" --upgrade +#Clone OsmCLient code +RUN git clone https://osm.etsi.org/gerrit/osm/osmclient +RUN git -C osmclient checkout ${OSM_CLIENT_VERSION} +# Install osmClient using pip +RUN python3 -m pip install -r osmclient/requirements.txt +RUN python3 -m pip install ./osmclient + +# Add component files into working directory +WORKDIR /var/teraflow +COPY src/osm_client/. osm_client/ + +# Start the service +ENTRYPOINT ["python", "-m", "osm_client.service"] diff --git a/src/osm_client/client/OsmClient.py b/src/osm_client/client/OsmClient.py index a040f661c..239e2a2fb 100644 --- a/src/osm_client/client/OsmClient.py +++ b/src/osm_client/client/OsmClient.py @@ -15,7 +15,7 @@ import grpc, logging from common.Constants import ServiceNameEnum from common.Settings import get_service_host, get_service_port_grpc -from common.proto.osm_client_pb2_grpc import osmClientServiceStub +from common.proto.osm_client_pb2_grpc import OsmServiceStub from common.proto.context_pb2 import (Empty) from common.tools.client.RetryDecorator import retry, delay_exponential from common.tools.grpc.Tools import grpc_message_to_json_string @@ -43,7 +43,7 @@ class OsmClient: def connect(self): self.channel = grpc.insecure_channel(self.endpoint) - self.stub = osmClientServiceStub(self.channel) + self.stub = OsmServiceStub(self.channel) def close(self): if self.channel is not None: self.channel.close() diff --git a/src/osm_client/service/OsmClientService.py b/src/osm_client/service/OsmClientService.py index ccbf15366..81ec534d2 100644 --- a/src/osm_client/service/OsmClientService.py +++ b/src/osm_client/service/OsmClientService.py @@ -18,10 +18,6 @@ from common.proto.osm_client_pb2_grpc import add_OsmServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from osm_client.service.OsmClientServiceServicerImpl import OsmClientServiceServicerImpl -from osmclient import client -from osmclient.common.exceptions import ClientException - - class OsmClientService(GenericGrpcService): def __init__(self, cls_name: str = __name__) -> None: port = get_service_port_grpc(ServiceNameEnum.OSMCLIENT) diff --git a/src/osm_client/service/OsmClientServiceServicerImpl.py b/src/osm_client/service/OsmClientServiceServicerImpl.py index f45c682a4..5bbde3b8b 100644 --- a/src/osm_client/service/OsmClientServiceServicerImpl.py +++ b/src/osm_client/service/OsmClientServiceServicerImpl.py @@ -17,7 +17,7 @@ from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_m from common.tools.grpc.Tools import grpc_message_to_json_string from common.proto.context_pb2 import (Empty) from common.proto.osm_client_pb2 import CreateRequest, CreateResponse, NsiListResponse, GetRequest, GetResponse, DeleteRequest, DeleteResponse -from common.proto.osm_client_pb2_grpc import osmCLientServiceServicer +from common.proto.osm_client_pb2_grpc import OsmServiceServicer from osmclient import client from osmclient.common.exceptions import ClientException from osm_client.Config import OSM_ADDRESS @@ -26,7 +26,7 @@ LOGGER = logging.getLogger(__name__) METRICS_POOL = MetricsPool('OSMCLIENT', 'RPC') -class OsmClientServiceServicerImpl(osmCLientServiceServicer): +class OsmClientServiceServicerImpl(OsmServiceServicer): def __init__(self): LOGGER.info('Creating Servicer...') self.myclient = client.Client(host=OSM_ADDRESS, sol005=True) -- GitLab From bba35aa993dd856be154bec9a734c74d73d29a56 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Thu, 23 Jan 2025 17:08:28 +0000 Subject: [PATCH 206/463] Changes in Telemetry backend and frontend - (Backend) Refore code to improved logging and error handling - (Backend) Improved tests - (Frontend) Refector code to improve Analyzer handling - (Frontend) improve tests and messages format to handle new backend enhancements. --- .../run_tests_locally-analytics-frontend.sh | 2 + .../service/AnalyticsBackendService.py | 45 ++++++------ src/analytics/backend/service/Streamer.py | 3 + .../backend/tests/messages_analyzer.py | 3 + src/analytics/backend/tests/test_backend.py | 51 ++++++++----- .../AnalyticsFrontendServiceServicerImpl.py | 28 ++++---- src/analytics/frontend/tests/messages.py | 71 +++++++++++++++---- src/analytics/frontend/tests/test_frontend.py | 28 ++++---- 8 files changed, 153 insertions(+), 78 deletions(-) diff --git a/scripts/run_tests_locally-analytics-frontend.sh b/scripts/run_tests_locally-analytics-frontend.sh index 0cb4dc98d..2c18296cf 100755 --- a/scripts/run_tests_locally-analytics-frontend.sh +++ b/scripts/run_tests_locally-analytics-frontend.sh @@ -18,8 +18,10 @@ PROJECTDIR=`pwd` cd $PROJECTDIR/src RCFILE=$PROJECTDIR/coverage/.coveragerc + export KFK_SERVER_ADDRESS='127.0.0.1:9092' CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}') export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_analytics?sslmode=require" + python3 -m pytest --log-level=DEBUG --log-cli-level=INFO --verbose \ analytics/frontend/tests/test_frontend.py diff --git a/src/analytics/backend/service/AnalyticsBackendService.py b/src/analytics/backend/service/AnalyticsBackendService.py index 10f1f75ea..5c924bfc5 100755 --- a/src/analytics/backend/service/AnalyticsBackendService.py +++ b/src/analytics/backend/service/AnalyticsBackendService.py @@ -20,7 +20,7 @@ import threading from common.tools.service.GenericGrpcService import GenericGrpcService from common.tools.kafka.Variables import KafkaConfig, KafkaTopic from confluent_kafka import Consumer -from confluent_kafka import KafkaError +from confluent_kafka import KafkaError, KafkaException from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc from analytics.backend.service.Streamer import DaskStreamer @@ -32,7 +32,7 @@ LOGGER = logging.getLogger(__name__) class AnalyticsBackendService(GenericGrpcService): """ AnalyticsBackendService class is responsible for handling the requests from the AnalyticsFrontendService. - It listens to the Kafka topic for the requests and starts/stops the DaskStreamer accordingly. + It listens to the Kafka topic for the requests to start and stop the Streamer accordingly. It also initializes the Kafka producer and Dask cluster for the streamer. """ def __init__(self, cls_name : str = __name__, n_workers=1, threads_per_worker=1 @@ -62,34 +62,36 @@ class AnalyticsBackendService(GenericGrpcService): listener for requests on Kafka topic. """ LOGGER.info("Request Listener is initiated ...") - # print ("Request Listener is initiated ...") consumer = self.request_consumer consumer.subscribe([KafkaTopic.ANALYTICS_REQUEST.value]) while True: - receive_msg = consumer.poll(2.0) - if receive_msg is None: + message = consumer.poll(2.0) + if message is None: continue - elif receive_msg.error(): - if receive_msg.error().code() == KafkaError._PARTITION_EOF: - continue - else: - LOGGER.error("Consumer error: {:}".format(receive_msg.error())) - break + elif message.error(): + if message.error().code() == KafkaError._PARTITION_EOF: + LOGGER.warning(f"Consumer reached end of topic {message.topic()}/{message.partition()}") + break + elif message.error().code() == KafkaError.UNKNOWN_TOPIC_OR_PART: + LOGGER.error(f"Subscribed topic {message.topic()} does not exist. May be topic does not have any messages.") + continue + elif message.error(): + raise KafkaException(message.error()) try: - analyzer = json.loads(receive_msg.value().decode('utf-8')) - analyzer_uuid = receive_msg.key().decode('utf-8') + analyzer = json.loads(message.value().decode('utf-8')) + analyzer_uuid = message.key().decode('utf-8') LOGGER.info('Recevied Analyzer: {:} - {:}'.format(analyzer_uuid, analyzer)) if analyzer["algo_name"] is None and analyzer["oper_mode"] is None: if self.StopStreamer(analyzer_uuid): LOGGER.info("Dask Streamer stopped.") else: - LOGGER.error("Failed to stop Dask Streamer.") + LOGGER.warning("Failed to stop Dask Streamer. May be already terminated...") else: if self.StartStreamer(analyzer_uuid, analyzer): LOGGER.info("Dask Streamer started.") else: - LOGGER.error("Failed to start Dask Streamer.") + LOGGER.warning("Failed to start Dask Streamer.") except Exception as e: LOGGER.warning("Unable to consume message from topic: {:}. ERROR: {:}".format(KafkaTopic.ANALYTICS_REQUEST.value, e)) @@ -117,14 +119,17 @@ class AnalyticsBackendService(GenericGrpcService): LOGGER.info(f"Streamer started with analyzer Id: {analyzer_uuid}") # Stop the streamer after the given duration - if analyzer['duration'] > 0: + duration = analyzer['duration'] + if duration > 0: def stop_after_duration(): - time.sleep(analyzer['duration']) - LOGGER.warning(f"Execution duration ({analyzer['duration']}) completed of Analyzer: {analyzer_uuid}") + time.sleep(duration) + LOGGER.warning(f"Execution duration ({duration}) completed of Analyzer: {analyzer_uuid}") if not self.StopStreamer(analyzer_uuid): LOGGER.warning("Failed to stop Dask Streamer. Streamer may be already terminated.") - duration_thread = threading.Thread(target=stop_after_duration, daemon=True) + duration_thread = threading.Thread( + target=stop_after_duration, daemon=True, name=f"stop_after_duration_{analyzer_uuid}" + ) duration_thread.start() self.active_streamers[analyzer_uuid] = streamer @@ -140,7 +145,7 @@ class AnalyticsBackendService(GenericGrpcService): try: if analyzer_uuid not in self.active_streamers: LOGGER.warning("Dask Streamer not found with the given analyzer_uuid: {:}".format(analyzer_uuid)) - return False + return True LOGGER.info(f"Terminating streamer with Analyzer Id: {analyzer_uuid}") streamer = self.active_streamers[analyzer_uuid] streamer.stop() diff --git a/src/analytics/backend/service/Streamer.py b/src/analytics/backend/service/Streamer.py index e1eaffc49..10917f002 100644 --- a/src/analytics/backend/service/Streamer.py +++ b/src/analytics/backend/service/Streamer.py @@ -74,6 +74,9 @@ class DaskStreamer(threading.Thread): if message.error(): if message.error().code() == KafkaError._PARTITION_EOF: logger.warning(f"Consumer reached end of topic {message.topic()}/{message.partition()}") + elif message.error().code() == KafkaError.UNKNOWN_TOPIC_OR_PART: + logger.error(f"Subscribed topic {message.topic()} does not exist. May be topic does not have any messages.") + continue elif message.error(): raise KafkaException(message.error()) else: diff --git a/src/analytics/backend/tests/messages_analyzer.py b/src/analytics/backend/tests/messages_analyzer.py index 11210ded1..813b4f06c 100644 --- a/src/analytics/backend/tests/messages_analyzer.py +++ b/src/analytics/backend/tests/messages_analyzer.py @@ -34,6 +34,9 @@ def get_thresholds(): def get_duration(): return 90 +def get_batch_duration(): + return 30 + def get_windows_size(): return None diff --git a/src/analytics/backend/tests/test_backend.py b/src/analytics/backend/tests/test_backend.py index 91d53000d..1bbfaee13 100644 --- a/src/analytics/backend/tests/test_backend.py +++ b/src/analytics/backend/tests/test_backend.py @@ -97,14 +97,15 @@ def analytics_service(mock_kafka_producer, mock_dask_cluster, mock_dask_client, @pytest.fixture def analyzer_data(): return { - 'algo_name' : 'test_algorithm', - 'oper_mode' : 'test_mode', - 'input_kpis' : get_input_kpi_list(), - 'output_kpis': get_output_kpi_list(), - 'thresholds' : get_thresholds(), - 'batch_size' : get_batch_size(), - 'window_size': get_windows_size(), - 'duration' : get_duration(), + 'algo_name' : 'test_algorithm', + 'oper_mode' : 'test_mode', + 'input_kpis' : get_input_kpi_list(), + 'output_kpis' : get_output_kpi_list(), + 'thresholds' : get_thresholds(), + 'duration' : get_duration(), + 'batch_size_min' : get_batch_size(), + 'window_size' : get_windows_size(), + 'batch_duration_min' : get_duration(), } def test_start_streamer(analytics_service, analyzer_data): @@ -122,7 +123,8 @@ def test_stop_streamer(analytics_service, analyzer_data): assert analyzer_uuid in analytics_service.active_streamers # Stop streamer - result = analytics_service.StopStreamer(analyzer_uuid) + with patch('time.sleep', return_value=None): + result = analytics_service.StopStreamer(analyzer_uuid) assert result is True assert analyzer_uuid not in analytics_service.active_streamers @@ -246,7 +248,7 @@ def test_run_with_valid_consumer(dask_streamer): assert len(dask_streamer.batch) == 0 # Batch should be cleared after processing mock_task_handler_selector.assert_called_once() # Task handler should be called once - mock_poll.assert_any_call(timeout=2.0) # Poll should have been called at least once + mock_poll.assert_any_call(timeout=1.0) # Poll should have been called at least once # # add a test to check the working of aggregation_handler function and threshold_handler from AnalyzerHandlers.py def test_aggregation_handler(): @@ -282,20 +284,35 @@ def test_threshold_handler(): ########################### # This is a local machine test to check the integration of the backend service with the Streamer -# --- "test_validate_kafka_topics" should be run before the functionality tests --- +# @pytest.fixture(scope='session') +# def analyticBackend_service(): +# logger.info('Initializing AnalyticsBackendService...') + +# _service = AnalyticsBackendService() +# _service.start() + +# logger.info('Yielding AnalyticsBackendService...') +# yield _service + +# logger.info('Terminating AnalyticsBackendService...') +# _service.stop() +# logger.info('Terminated AnalyticsBackendService...') + + +# # --- "test_validate_kafka_topics" should be run before the functionality tests --- # def test_validate_kafka_topics(): # logger.debug(" >>> test_validate_kafka_topics: START <<< ") # response = KafkaTopic.create_all_topics() # assert isinstance(response, bool) -# def test_backend_integration_with_analyzer(): -# backendServiceObject = AnalyticsBackendService() -# backendServiceObject.install_servicers() +# def test_backend_integration_with_frontend(analyticBackend_service: AnalyticsBackendService): +# # backendServiceObject = AnalyticsBackendService() +# # backendServiceObject.install_servicers() # logger.info(" waiting for 2 minutes for the backend service before termination ... ") -# time.sleep(150) +# time.sleep(300) # logger.info(" Initiating stop collector ... ") -# status = backendServiceObject.StopStreamer("efef4d95-1cf1-43c4-9742-95c283ddd666") -# backendServiceObject.close() +# status = analyticBackend_service.StopStreamer("efef4d95-1cf1-43c4-9742-95c283ddd666") +# analyticBackend_service.close() # assert isinstance(status, bool) # assert status == True # logger.info(" Backend service terminated successfully ... ") diff --git a/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py b/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py index fd5bcd185..cd20503e7 100644 --- a/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py +++ b/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py @@ -46,7 +46,7 @@ class AnalyticsFrontendServiceServicerImpl(AnalyticsFrontendServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def StartAnalyzer(self, - request : Analyzer, grpc_context: grpc.ServicerContext # type: ignore + request : Analyzer, context: grpc.ServicerContext # type: ignore ) -> AnalyzerId: # type: ignore LOGGER.info ("At Service gRPC message: {:}".format(request)) response = AnalyzerId() @@ -65,14 +65,18 @@ class AnalyticsFrontendServiceServicerImpl(AnalyticsFrontendServiceServicer): """ analyzer_uuid = analyzer_obj.analyzer_id.analyzer_id.uuid analyzer_to_generate : Dict = { - "algo_name" : analyzer_obj.algorithm_name, - "input_kpis" : [k.kpi_id.uuid for k in analyzer_obj.input_kpi_ids], - "output_kpis" : [k.kpi_id.uuid for k in analyzer_obj.output_kpi_ids], - "oper_mode" : analyzer_obj.operation_mode, - "thresholds" : json.loads(analyzer_obj.parameters["thresholds"]), - "window_size" : analyzer_obj.parameters["window_size"], - "window_slider" : analyzer_obj.parameters["window_slider"], - # "store_aggregate" : analyzer_obj.parameters["store_aggregate"] + "algo_name" : analyzer_obj.algorithm_name, + "input_kpis" : [k.kpi_id.uuid for k in analyzer_obj.input_kpi_ids], + "output_kpis" : [k.kpi_id.uuid for k in analyzer_obj.output_kpi_ids], + "oper_mode" : analyzer_obj.operation_mode, + "duration" : analyzer_obj.duration_s, + "thresholds" : json.loads(analyzer_obj.parameters["thresholds"]), + "window_size" : analyzer_obj.parameters["window_size"], # slider window size in seconds (single batch execution time) + "window_slider" : analyzer_obj.parameters["window_slider"], # slider shift in seconds + "batch_size_min" : analyzer_obj.batch_min_size, # currently implemented + "batch_size_max" : analyzer_obj.batch_max_size, + "batch_duration_min" : analyzer_obj.batch_min_duration_s, # currently implemented + "batch_interval_max" : analyzer_obj.batch_max_duration_s } self.kafka_producer.produce( KafkaTopic.ANALYTICS_REQUEST.value, @@ -137,7 +141,7 @@ class AnalyticsFrontendServiceServicerImpl(AnalyticsFrontendServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def StopAnalyzer(self, - request : AnalyzerId, grpc_context: grpc.ServicerContext # type: ignore + request : AnalyzerId, context: grpc.ServicerContext # type: ignore ) -> Empty: # type: ignore LOGGER.info ("At Service gRPC message: {:}".format(request)) try: @@ -181,7 +185,7 @@ class AnalyticsFrontendServiceServicerImpl(AnalyticsFrontendServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def SelectAnalyzers(self, - filter : AnalyzerFilter, contextgrpc_context: grpc.ServicerContext # type: ignore + filter : AnalyzerFilter, context: grpc.ServicerContext # type: ignore ) -> AnalyzerList: # type: ignore LOGGER.info("At Service gRPC message: {:}".format(filter)) response = AnalyzerList() @@ -202,7 +206,5 @@ class AnalyticsFrontendServiceServicerImpl(AnalyticsFrontendServiceServicer): def delivery_callback(self, err, msg): if err: LOGGER.debug('Message delivery failed: {:}'.format(err)) - # print ('Message delivery failed: {:}'.format(err)) else: LOGGER.debug('Message delivered to topic {:}'.format(msg.topic())) - # print('Message delivered to topic {:}'.format(msg.topic())) diff --git a/src/analytics/frontend/tests/messages.py b/src/analytics/frontend/tests/messages.py index 4df6070be..326bc0be2 100644 --- a/src/analytics/frontend/tests/messages.py +++ b/src/analytics/frontend/tests/messages.py @@ -20,43 +20,77 @@ from common.proto.analytics_frontend_pb2 import ( AnalyzerOperationMode, Analyze def create_analyzer_id(): _create_analyzer_id = AnalyzerId() - # _create_analyzer_id.analyzer_id.uuid = str(uuid.uuid4()) + _create_analyzer_id.analyzer_id.uuid = str(uuid.uuid4()) # _create_analyzer_id.analyzer_id.uuid = "efef4d95-1cf1-43c4-9742-95c283ddd7a6" - _create_analyzer_id.analyzer_id.uuid = "1e22f180-ba28-4641-b190-2287bf446666" + # _create_analyzer_id.analyzer_id.uuid = "1e22f180-ba28-4641-b190-2287bf446666" return _create_analyzer_id def create_analyzer(): _create_analyzer = Analyzer() - # _create_analyzer.analyzer_id.analyzer_id.uuid = str(uuid.uuid4()) - _create_analyzer.analyzer_id.analyzer_id.uuid = "1e22f180-ba28-4641-b190-2287bf446666" - _create_analyzer.algorithm_name = "Test_Aggergate_and_Threshold" + + _create_analyzer.analyzer_id.analyzer_id.uuid = str(uuid.uuid4()) + # _create_analyzer.analyzer_id.analyzer_id.uuid = "1e22f180-ba28-4641-b190-2287bf446666" + _create_analyzer.algorithm_name = "Test_new_Threshold" _create_analyzer.operation_mode = AnalyzerOperationMode.ANALYZEROPERATIONMODE_STREAMING - _kpi_id = KpiId() # input IDs to analyze - _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _kpi_id = KpiId() + + # _kpi_id.kpi_id.uuid = str(uuid.uuid4()) _kpi_id.kpi_id.uuid = "6e22f180-ba28-4641-b190-2287bf448888" _create_analyzer.input_kpi_ids.append(_kpi_id) - _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + + # _kpi_id.kpi_id.uuid = str(uuid.uuid4()) _kpi_id.kpi_id.uuid = "1e22f180-ba28-4641-b190-2287bf446666" _create_analyzer.input_kpi_ids.append(_kpi_id) + _kpi_id.kpi_id.uuid = str(uuid.uuid4()) _create_analyzer.input_kpi_ids.append(_kpi_id) + # output IDs after analysis - _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _kpi_id = KpiId() + + # _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _kpi_id.kpi_id.uuid = "6e22f180-ba28-4641-b190-2287bf181818" + _create_analyzer.output_kpi_ids.append(_kpi_id) + + # _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _kpi_id.kpi_id.uuid = "1e22f180-ba28-4641-b190-2287bf441616" _create_analyzer.output_kpi_ids.append(_kpi_id) + _kpi_id.kpi_id.uuid = str(uuid.uuid4()) _create_analyzer.output_kpi_ids.append(_kpi_id) + # parameter + # _threshold_dict = { + # 'mean_value' :[20, 30], 'min_value' :[00, 10], 'max_value' :[45, 50], + # 'first_value' :[00, 10], 'last_value' :[40, 50], 'std_value' :[00, 10] + # } _threshold_dict = { - 'mean_value' :(20, 30), 'min_value' :(00, 10), 'max_value' :(45, 50), - 'first_value' :(00, 10), 'last_value' :(40, 50), 'std_value':(00, 10) - } + "task_type": Handlers.AGGREGATION_HANDLER.value, + "task_parameter": [ + {"last": [40, 80], "variance": [300, 500]}, + {"count": [2, 4], "max": [70, 100]}, + {"min": [10, 20], "avg": [50, 70]}, + ], + } + _create_analyzer.parameters['thresholds'] = json.dumps(_threshold_dict) - _create_analyzer.parameters['window_size'] = "10s" # Such as "10 seconds", "2 minutes", "3 hours", "4 days" or "5 weeks" - _create_analyzer.parameters['window_slider'] = "5s" # should be less than window size - _create_analyzer.parameters['store_aggregate'] = str(False) # TRUE to store. No implemented yet + _create_analyzer.parameters['window_size'] = "0" # slider window size in seconds (Total time for aggeration processing) + _create_analyzer.parameters['window_slider'] = "0" # should be less than window size + _create_analyzer.parameters['store_aggregate'] = str(False) # TRUE to store. No implemented yet + # duration of the analyzer + _create_analyzer.duration_s = 90 + + # batch window size + _create_analyzer.batch_min_duration_s = 20 + _create_analyzer.batch_max_duration_s = 50 + + # batch size + _create_analyzer.batch_min_size = 5 + _create_analyzer.batch_max_size = 10 + return _create_analyzer def create_analyzer_filter(): @@ -84,3 +118,10 @@ def create_analyzer_filter(): # _create_analyzer_filter.input_kpi_ids.append(_output_kpi_id_obj) return _create_analyzer_filter + + +# Added for testing to remove the dependency on the backend service +from enum import Enum +class Handlers(Enum): + AGGREGATION_HANDLER = "AggregationHandler" + UNSUPPORTED_HANDLER = "UnsupportedHandler" diff --git a/src/analytics/frontend/tests/test_frontend.py b/src/analytics/frontend/tests/test_frontend.py index 134871fb7..7d8a08d3a 100644 --- a/src/analytics/frontend/tests/test_frontend.py +++ b/src/analytics/frontend/tests/test_frontend.py @@ -78,6 +78,15 @@ def analyticsFrontend_client(analyticsFrontend_service : AnalyticsFrontendServic LOGGER.info('Closed AnalyticsFrontendClient...') +@pytest.fixture(autouse=True) +def log_all_methods(request): + ''' + This fixture logs messages before and after each test function runs, indicating the start and end of the test. + The autouse=True parameter ensures that this logging happens automatically for all tests in the module. + ''' + LOGGER.info(f" >>>>> Starting test: {request.node.name} ") + yield + LOGGER.info(f" <<<<< Finished test: {request.node.name} ") ########################### # Tests Implementation of Analytics Frontend @@ -89,24 +98,17 @@ def test_validate_kafka_topics(): response = KafkaTopic.create_all_topics() assert isinstance(response, bool) -# ----- core funtionality test ----- -# def test_StartAnalytics(analyticsFrontend_client): -# LOGGER.info(' >>> test_StartAnalytic START: <<< ') -# response = analyticsFrontend_client.StartAnalyzer(create_analyzer()) -# LOGGER.debug(str(response)) -# assert isinstance(response, AnalyzerId) - # To test start and stop listener together def test_StartAnalyzers(analyticsFrontend_client): LOGGER.info(' >>> test_StartAnalyzers START: <<< ') added_analyzer_id = analyticsFrontend_client.StartAnalyzer(create_analyzer()) LOGGER.debug(str(added_analyzer_id)) - LOGGER.info(' --> Calling StartResponseListener... ') - class_obj = AnalyticsFrontendServiceServicerImpl() - response = class_obj.StartResponseListener(added_analyzer_id.analyzer_id.uuid) - LOGGER.debug(response) - LOGGER.info("waiting for timer to comlete ...") - time.sleep(3) + # LOGGER.info(' --> Calling StartResponseListener... ') + # class_obj = AnalyticsFrontendServiceServicerImpl() + # response = class_obj.StartResponseListener(added_analyzer_id.analyzer_id.uuid) + # LOGGER.debug(response) + LOGGER.info("waiting for timer to complete ...") + time.sleep(15) LOGGER.info('--> StopAnalyzer') response = analyticsFrontend_client.StopAnalyzer(added_analyzer_id) LOGGER.debug(str(response)) -- GitLab From a8b0695ca755e6d77bd8d225c0d4daf6ab2cd574 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Thu, 23 Jan 2025 17:27:15 +0000 Subject: [PATCH 207/463] Updated Analytics Backed - Add Exception --- src/analytics/backend/service/AnalyticsBackendService.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/analytics/backend/service/AnalyticsBackendService.py b/src/analytics/backend/service/AnalyticsBackendService.py index 5c924bfc5..9ff2ef101 100755 --- a/src/analytics/backend/service/AnalyticsBackendService.py +++ b/src/analytics/backend/service/AnalyticsBackendService.py @@ -153,8 +153,8 @@ class AnalyticsBackendService(GenericGrpcService): del self.active_streamers[analyzer_uuid] LOGGER.info(f"Streamer with analyzer_uuid '{analyzer_uuid}' has been trerminated sucessfully.") return True - except Exception as e: - LOGGER.error("Failed to stop Dask Streamer. ERROR: {:}".format(e)) + except: + LOGGER.exception("Failed to stop Dask Streamer. ERROR: {:}".format(e)) return False def close(self): -- GitLab From bb6e6b8ab719cce7eecd526d1b00626f5e3236e5 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Thu, 23 Jan 2025 17:28:40 +0000 Subject: [PATCH 208/463] Updated error string --- src/analytics/backend/service/AnalyticsBackendService.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/analytics/backend/service/AnalyticsBackendService.py b/src/analytics/backend/service/AnalyticsBackendService.py index 9ff2ef101..1abdd62c0 100755 --- a/src/analytics/backend/service/AnalyticsBackendService.py +++ b/src/analytics/backend/service/AnalyticsBackendService.py @@ -154,7 +154,7 @@ class AnalyticsBackendService(GenericGrpcService): LOGGER.info(f"Streamer with analyzer_uuid '{analyzer_uuid}' has been trerminated sucessfully.") return True except: - LOGGER.exception("Failed to stop Dask Streamer. ERROR: {:}".format(e)) + LOGGER.exception("Failed to stop Dask Streamer.") return False def close(self): -- GitLab From 1be101f8a11bc7cabc327b17952d692ea669f75f Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Sun, 26 Jan 2025 07:58:02 +0000 Subject: [PATCH 209/463] Updated Telemetry Backend. - Refactor Telemetry backend service methods - Enhance test logging for better clarity. --- .../service/TelemetryBackendService.py | 183 ++++++++++++------ src/telemetry/backend/tests/test_backend.py | 67 ++++--- .../TelemetryFrontendServiceServicerImpl.py | 8 +- 3 files changed, 172 insertions(+), 86 deletions(-) diff --git a/src/telemetry/backend/service/TelemetryBackendService.py b/src/telemetry/backend/service/TelemetryBackendService.py index a1f17df3c..0c515768e 100755 --- a/src/telemetry/backend/service/TelemetryBackendService.py +++ b/src/telemetry/backend/service/TelemetryBackendService.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import queue import json import time import logging @@ -27,6 +26,7 @@ from common.Settings import get_service_port_grpc from common.method_wrappers.Decorator import MetricsPool from common.tools.kafka.Variables import KafkaConfig, KafkaTopic from common.tools.service.GenericGrpcService import GenericGrpcService +from telemetry.backend.collectors.emulated.EmulatedCollector import EmulatedCollector LOGGER = logging.getLogger(__name__) METRICS_POOL = MetricsPool('TelemetryBackend', 'backendService') @@ -44,9 +44,7 @@ class TelemetryBackendService(GenericGrpcService): self.kafka_consumer = KafkaConsumer({'bootstrap.servers' : KafkaConfig.get_kafka_address(), 'group.id' : 'backend', 'auto.offset.reset' : 'latest'}) - self.running_threads = {} - self.emulatorCollector = None - self.metric_queue = queue.Queue() + self.active_jobs = {} def install_servicers(self): threading.Thread(target=self.RequestListener).start() @@ -60,49 +58,88 @@ class TelemetryBackendService(GenericGrpcService): consumer = self.kafka_consumer consumer.subscribe([KafkaTopic.TELEMETRY_REQUEST.value]) while True: - receive_msg = consumer.poll(2.0) + receive_msg = consumer.poll(1.0) if receive_msg is None: continue elif receive_msg.error(): if receive_msg.error().code() == KafkaError._PARTITION_EOF: continue + elif receive_msg.error().code() == KafkaError.UNKNOWN_TOPIC_OR_PART: + LOGGER.warning(f"Subscribed topic {receive_msg.topic()} does not exist. May be topic does not have any messages.") + continue else: LOGGER.error("Consumer error: {}".format(receive_msg.error())) break try: - collector = json.loads(receive_msg.value().decode('utf-8')) + collector = json.loads( + receive_msg.value().decode('utf-8') + ) collector_id = receive_msg.key().decode('utf-8') LOGGER.debug('Recevied Collector: {:} - {:}'.format(collector_id, collector)) - if collector['duration'] == -1 and collector['interval'] == -1: - self.TerminateCollectorBackend(collector_id) + duration = collector.get('duration', -1) + if duration == -1 and collector['interval'] == -1: + self.TerminateCollector(collector_id) else: - threading.Thread(target=self.InitiateCollectorBackend, - args=(collector_id, collector)).start() + LOGGER.info("Collector ID: {:} - Scheduling...".format(collector_id)) + if collector_id not in self.active_jobs: + stop_event = threading.Event() + self.active_jobs[collector_id] = stop_event + threading.Thread(target = self.CollectorHandler, + args=( + collector_id, + collector['kpi_id'], + duration, + collector['interval'], + stop_event + )).start() + # Stop the Collector after the given duration + if duration > 0: + def stop_after_duration(): + time.sleep(duration) + LOGGER.warning(f"Execution duration ({duration}) completed of Collector: {collector_id}") + self.TerminateCollector(collector_id) + + duration_thread = threading.Thread( + target=stop_after_duration, daemon=True, name=f"stop_after_duration_{collector_id}" + ) + duration_thread.start() + else: + LOGGER.warning("Collector ID: {:} - Already scheduled or running".format(collector_id)) except Exception as e: LOGGER.warning("Unable to consumer message from topic: {:}. ERROR: {:}".format(KafkaTopic.TELEMETRY_REQUEST.value, e)) - def InitiateCollectorBackend(self, collector_id, collector): + def CollectorHandler(self, collector_id, kpi_id, duration, interval, stop_event): """ - Method receives collector request and initiates collecter backend. + Method to handle collector request. """ - LOGGER.info("Initiating backend for collector: (Not Implemented... In progress ) {:s}".format(str(collector_id))) - # start_time = time.time() - # self.emulatorCollector = NetworkMetricsEmulator( - # duration = collector['duration'], - # interval = collector['interval'], - # metric_queue = self.metric_queue - # ) - # self.emulatorCollector.start() - # self.running_threads[collector_id] = self.emulatorCollector - - # while self.emulatorCollector.is_alive(): - # if not self.metric_queue.empty(): - # metric_value = self.metric_queue.get() - # LOGGER.debug("Metric: {:} - Value : {:}".format(collector['kpi_id'], metric_value)) - # self.GenerateKpiValue(collector_id, collector['kpi_id'] , metric_value) - # time.sleep(1) - # self.TerminateCollectorBackend(collector_id) + end_points : list = self.get_endpoints_from_kpi_id(kpi_id) + if not end_points: + LOGGER.warning("KPI ID: {:} - Endpoints not found. Skipping...".format(kpi_id)) + + device_type : str = self.get_device_type_from_kpi_id(kpi_id) + + if device_type == "Unknown": + LOGGER.warning("KPI ID: {:} - Device Type not found. Skipping...".format(kpi_id)) + + if device_type == "EMU-Device": + LOGGER.info("KPI ID: {:} - Device Type: {:} - Endpoints: {:}".format(kpi_id, device_type, end_points)) + subscription = [collector_id, end_points, duration, interval] + self.EmulatedCollectorHandler(subscription, kpi_id, stop_event) + else: + LOGGER.warning("KPI ID: {:} - Device Type: {:} - Not Supported".format(kpi_id, device_type)) + + + def EmulatedCollectorHandler(self, subscription, kpi_id, stop_event): + # EmulatedCollector + collector = EmulatedCollector(address="127.0.0.1", port=8000) + collector.Connect() + while not stop_event.is_set(): + # samples = collector.SubscribeState(subscription) + # LOGGER.debug("KPI: {:} - Value: {:}".format(kpi_id, samples)) + # self.GenerateKpiValue(job_id, kpi_id, samples) + LOGGER.info("Generating KPI Values ...") + time.sleep(1) def GenerateKpiValue(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): """ @@ -122,38 +159,74 @@ class TelemetryBackendService(GenericGrpcService): ) producer.flush() - def TerminateCollectorBackend(self, collector_id): + def TerminateCollector(self, job_id): LOGGER.debug("Terminating collector backend...") - if collector_id in self.running_threads: - thread = self.running_threads[collector_id] - thread.stop() - del self.running_threads[collector_id] - LOGGER.debug("Collector backend terminated. Collector ID: {:}".format(collector_id)) - self.GenerateCollectorTerminationSignal(collector_id, "-1", -1) # Termination confirmation to frontend. - else: - LOGGER.warning('Backend collector {:} not found'.format(collector_id)) + try: + if job_id not in self.active_jobs: # not job_ids: + # self.logger.warning(f"Active jobs: {self.active_jobs}") + self.logger.warning(f"No active jobs found for {job_id}. It might have already terminated.") + else: + LOGGER.info(f"Terminating job: {job_id}") + stop_event = self.active_jobs.pop(job_id, None) + if stop_event: + stop_event.set() + LOGGER.info(f"Job {job_id} terminated.") + else: + LOGGER.warning(f"Job {job_id} not found in active jobs.") + except: + LOGGER.exception("Error terminating job: {:}".format(job_id)) - def GenerateCollectorTerminationSignal(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): + def get_endpoints_from_kpi_id(self, kpi_id: str) -> list: """ - Method to write kpi Termination signat on TELEMETRY_RESPONSE Kafka topic + Method to get endpoints based on kpi_id. """ - producer = self.kafka_producer - kpi_value : Dict = { - "kpi_id" : kpi_id, - "kpi_value" : measured_kpi_value, + kpi_endpoints = { + '6e22f180-ba28-4641-b190-2287bf448888': {"uuid": "123e4567-e89b-12d3-a456-42661417ed06", "name": "eth0", "type": "ethernet", "sample_types": [101, 102]}, + '123e4567-e89b-12d3-a456-426614174001': {"uuid": "123e4567-e89b-12d3-a456-42661417ed07", "name": "eth1", "type": "ethernet", "sample_types": []}, + '123e4567-e89b-12d3-a456-426614174002': {"uuid": "123e4567-e89b-12d3-a456-42661417ed08", "name": "13/1/2", "type": "copper", "sample_types": [101, 102, 201, 202]}, } - producer.produce( - KafkaTopic.TELEMETRY_RESPONSE.value, - key = collector_id, - value = json.dumps(kpi_value), - callback = self.delivery_callback - ) - producer.flush() + return [kpi_endpoints.get(kpi_id, {})] if kpi_id in kpi_endpoints else [] + + def get_device_type_from_kpi_id(self, kpi_id: str) -> str: + """ + Method to get device type based on kpi_id. + """ + kpi_device_types = { + "123e4567-e89b-12d3-a456-42661type003" : {'device_type': "PKT-Device"}, + "123e4567-e89b-12d3-a456-42661type004" : {'device_type': "OPT-Device"}, + "6e22f180-ba28-4641-b190-2287bf448888" : {'device_type': "EMU-Device"}, + } + return kpi_device_types.get(kpi_id, {}).get('device_type', "Unknown") + + + # def TerminateCollectorBackend(self, collector_id): + # LOGGER.debug("Terminating collector backend...") + # if collector_id in self.running_threads: + # thread = self.running_threads[collector_id] + # thread.stop() + # del self.running_threads[collector_id] + # LOGGER.debug("Collector backend terminated. Collector ID: {:}".format(collector_id)) + # self.GenerateCollectorTerminationSignal(collector_id, "-1", -1) # Termination confirmation to frontend. + # else: + # LOGGER.warning('Backend collector {:} not found'.format(collector_id)) + + # def GenerateCollectorTerminationSignal(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): + # """ + # Method to write kpi Termination signat on TELEMETRY_RESPONSE Kafka topic + # """ + # producer = self.kafka_producer + # kpi_value : Dict = { + # "kpi_id" : kpi_id, + # "kpi_value" : measured_kpi_value, + # } + # producer.produce( + # KafkaTopic.TELEMETRY_RESPONSE.value, + # key = collector_id, + # value = json.dumps(kpi_value), + # callback = self.delivery_callback + # ) + # producer.flush() def delivery_callback(self, err, msg): if err: LOGGER.error('Message delivery failed: {:s}'.format(str(err))) - # print(f'Message delivery failed: {err}') - # else: - # LOGGER.info('Message delivered to topic {:}'.format(msg.topic())) - # print(f'Message delivered to topic {msg.topic()}') diff --git a/src/telemetry/backend/tests/test_backend.py b/src/telemetry/backend/tests/test_backend.py index e75b33ca5..28b92fb29 100644 --- a/src/telemetry/backend/tests/test_backend.py +++ b/src/telemetry/backend/tests/test_backend.py @@ -12,12 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +import pytest import logging import time -from typing import Dict -from common.tools.kafka.Variables import KafkaTopic from telemetry.backend.service.TelemetryBackendService import TelemetryBackendService from .messages import create_collector_request +from .Fixtures import context_client, device_client +from .add_devices import load_topology LOGGER = logging.getLogger(__name__) @@ -26,28 +27,42 @@ LOGGER = logging.getLogger(__name__) # Tests Implementation of Telemetry Backend ########################### +@pytest.fixture(autouse=True) +def log_all_methods(request): + ''' + This fixture logs messages before and after each test function runs, indicating the start and end of the test. + The autouse=True parameter ensures that this logging happens automatically for all tests in the module. + ''' + LOGGER.info(f" >>>>> Starting test: {request.node.name} ") + yield + LOGGER.info(f" <<<<< Finished test: {request.node.name} ") + +@pytest.fixture +def telemetryBackend_service(): + LOGGER.info('Initializing TelemetryBackendService...') + + _service = TelemetryBackendService() + _service.start() + + LOGGER.info('Yielding TelemetryBackendService...') + yield _service + + LOGGER.info('Terminating TelemetryBackendService...') + _service.stop() + LOGGER.info('Terminated TelemetryBackendService...') + + +def test_InitiateCollectorBackend(telemetryBackend_service): + LOGGER.info(" Backend Initiated Successfully. Waiting for timer to finish ...") + time.sleep(300) + LOGGER.info(" Backend Timer Finished Successfully. ") + # --- "test_validate_kafka_topics" should be run before the functionality tests --- -def test_validate_kafka_topics(): - LOGGER.debug(" >>> test_validate_kafka_topics: START <<< ") - response = KafkaTopic.create_all_topics() - assert isinstance(response, bool) - -# def test_RunRequestListener(): -# LOGGER.info('test_RunRequestListener') -# TelemetryBackendServiceObj = TelemetryBackendService() -# threading.Thread(target=TelemetryBackendServiceObj.RequestListener).start() - -def test_RunInitiateCollectorBackend(): - LOGGER.debug(">>> RunInitiateCollectorBackend <<<") - collector_obj = create_collector_request() - collector_id = collector_obj.collector_id.collector_id.uuid - collector_dict : Dict = { - "kpi_id" : collector_obj.kpi_id.kpi_id.uuid, - "duration": collector_obj.duration_s, - "interval": collector_obj.interval_s - } - TeleObj = TelemetryBackendService() - TeleObj.InitiateCollectorBackend(collector_id, collector_dict) - time.sleep(20) - - LOGGER.debug("--- Execution Finished Sucessfully---") +# def test_validate_kafka_topics(): +# LOGGER.debug(" >>> test_validate_kafka_topics: START <<< ") +# response = KafkaTopic.create_all_topics() +# assert isinstance(response, bool) + +# # Call load_topology from the add_devices.py file +# def test_load_topology(context_client, device_client): +# load_topology(context_client, device_client) diff --git a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py index f74e97ffd..1ef8ed46b 100644 --- a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py +++ b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py @@ -13,7 +13,6 @@ # limitations under the License. import json -import threading from typing import Any, Dict import grpc import logging @@ -29,7 +28,6 @@ from telemetry.database.Telemetry_DB import TelemetryDB from confluent_kafka import Consumer as KafkaConsumer from confluent_kafka import Producer as KafkaProducer -from confluent_kafka import KafkaError LOGGER = logging.getLogger(__name__) @@ -49,7 +47,7 @@ class TelemetryFrontendServiceServicerImpl(TelemetryFrontendServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def StartCollector(self, - request : Collector, grpc_context: grpc.ServicerContext # type: ignore + request : Collector, context: grpc.ServicerContext # type: ignore ) -> CollectorId: # type: ignore LOGGER.info ("gRPC message: {:}".format(request)) response = CollectorId() @@ -86,7 +84,7 @@ class TelemetryFrontendServiceServicerImpl(TelemetryFrontendServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def StopCollector(self, - request : CollectorId, grpc_context: grpc.ServicerContext # type: ignore + request : CollectorId, context: grpc.ServicerContext # type: ignore ) -> Empty: # type: ignore LOGGER.info ("gRPC message: {:}".format(request)) try: @@ -125,7 +123,7 @@ class TelemetryFrontendServiceServicerImpl(TelemetryFrontendServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def SelectCollectors(self, - request : CollectorFilter, contextgrpc_context: grpc.ServicerContext # type: ignore + request : CollectorFilter, context: grpc.ServicerContext # type: ignore ) -> CollectorList: # type: ignore LOGGER.info("gRPC message: {:}".format(request)) response = CollectorList() -- GitLab From af6688ba9ad5972ed2f5334b2f1925f5c2a0265b Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Sun, 26 Jan 2025 18:00:10 +0000 Subject: [PATCH 210/463] Updated Telemetry Backend - Enhance telemetry tests with logging - Update collector API methods - Updated Telemetry backend collector management --- .../backend/collector_api/_Collector.py | 42 +- .../collectors/emulated/EmulatedCollector.py | 378 ++---------------- .../service/TelemetryBackendService.py | 84 ++-- src/telemetry/frontend/tests/test_frontend.py | 37 +- 4 files changed, 110 insertions(+), 431 deletions(-) diff --git a/src/telemetry/backend/collector_api/_Collector.py b/src/telemetry/backend/collector_api/_Collector.py index ec4ba943c..d6e711d65 100644 --- a/src/telemetry/backend/collector_api/_Collector.py +++ b/src/telemetry/backend/collector_api/_Collector.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import threading +import queue from typing import Any, Iterator, List, Optional, Tuple, Union # Special resource names to request to the collector to retrieve the specified @@ -135,31 +135,25 @@ class _Collector: """ raise NotImplementedError() - def SubscribeState(self, subscriptions: List[Tuple[str, float, float]]) -> \ + def SubscribeState(self, subscriptions: List[Tuple[str, dict, float, float]]) -> \ + bool: + """ Subscribe to state information of the entire device or selected resources. + Subscriptions are incremental, and the collector should keep track of requested resources. + List of tuples, each containing: + - resource_id (str): Identifier pointing to the resource to be subscribed. + - resource_dict (dict): Dictionary containing resource name, KPI to be subscribed, and type. + - sampling_duration (float): Duration (in seconds) for how long monitoring should last. + - sampling_interval (float): Desired monitoring interval (in seconds) for the specified resource. + List of results for the requested resource key subscriptions. + The return values are in the same order as the requested resource keys. + - True if a resource is successfully subscribed. + - Exception if an error occurs during the subscription process. List[Union[bool, Exception]]: - """ Subscribe to state information of entire device or - selected resources. Subscriptions are incremental. - Collector should keep track of requested resources. - Parameters: - subscriptions : List[Tuple[str, float, float]] - List of tuples, each containing a resource_key pointing the - resource to be subscribed, a sampling_duration, and a - sampling_interval (both in seconds with float - representation) defining, respectively, for how long - monitoring should last, and the desired monitoring interval - for the resource specified. - Returns: - results : List[Union[bool, Exception]] - List of results for resource key subscriptions requested. - Return values must be in the same order as the resource keys - requested. If a resource is properly subscribed, - True must be retrieved; otherwise, the Exception that is - raised during the processing must be retrieved. - """ + """ raise NotImplementedError() - def UnsubscribeState(self, subscriptions: List[Tuple[str, float, float]]) \ - -> List[Union[bool, Exception]]: + def UnsubscribeState(self, resource_key: str) \ + -> bool: """ Unsubscribe from state information of entire device or selected resources. Subscriptions are incremental. Collector should keep track of requested resources. @@ -182,7 +176,7 @@ class _Collector: raise NotImplementedError() def GetState( - self, blocking=False, terminate : Optional[threading.Event] = None + self, duration : int, blocking=False, terminate: Optional[queue.Queue] = None ) -> Iterator[Tuple[float, str, Any]]: """ Retrieve last collected values for subscribed resources. Operates as a generator, so this method should be called once and will diff --git a/src/telemetry/backend/collectors/emulated/EmulatedCollector.py b/src/telemetry/backend/collectors/emulated/EmulatedCollector.py index 90be01336..48102a943 100644 --- a/src/telemetry/backend/collectors/emulated/EmulatedCollector.py +++ b/src/telemetry/backend/collectors/emulated/EmulatedCollector.py @@ -15,10 +15,7 @@ import pytz import queue import logging -import uuid -import json from anytree import Node, Resolver -from apscheduler.events import EVENT_JOB_ADDED, EVENT_JOB_REMOVED from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.jobstores.memory import MemoryJobStore from apscheduler.executors.pool import ThreadPoolExecutor @@ -36,10 +33,6 @@ class EmulatedCollector(_Collector): """ def __init__(self, address: str, port: int, **settings): super().__init__('emulated_collector', address, port, **settings) - self._initial_config = Node('root') # Tree structure for initial config - self._running_config = Node('root') # Tree structure for running config - self._subscriptions = Node('subscriptions') # Tree for state subscriptions - self._resolver = Resolver() # For path resolution in tree structures self._out_samples = queue.Queue() # Queue to hold synthetic state samples self._synthetic_data = SyntheticMetricsGenerator(metric_queue=self._out_samples) # Placeholder for synthetic data generator self._scheduler = BackgroundScheduler(daemon=True) @@ -48,8 +41,8 @@ class EmulatedCollector(_Collector): executors = {'default': ThreadPoolExecutor(max_workers=1)}, timezone = pytz.utc ) - self._scheduler.add_listener(self._listener_job_added_to_subscription_tree, EVENT_JOB_ADDED) - self._scheduler.add_listener(self._listener_job_removed_from_subscription_tree, EVENT_JOB_REMOVED) + # self._scheduler.add_listener(self._listener_job_added_to_subscription_tree, EVENT_JOB_ADDED) + # self._scheduler.add_listener(self._listener_job_removed_from_subscription_tree, EVENT_JOB_REMOVED) self._helper_methods = EmulatedCollectorHelper() self.logger = logging.getLogger(__name__) @@ -77,73 +70,56 @@ class EmulatedCollector(_Collector): if not self.connected: raise RuntimeError("Collector is not connected. Please connect before performing operations.") - def SubscribeState(self, subscriptions: List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + def SubscribeState(self, subscriptions: List[Tuple[str, dict, float, float]]) -> bool: self._require_connection() - results = [] - for resource_key, duration, interval in subscriptions: - resource_key = self._helper_methods.validate_resource_key(resource_key) # Validate the endpoint name - self.logger.info(f"1. Subscribing to {resource_key} with duration {duration}s and interval {interval}s") + try: + job_id, endpoint, duration, interval = subscriptions + except: + self.logger.exception(f"Invalid subscription format: {subscriptions}") + return False + if endpoint: + self.logger.info(f"Subscribing to {endpoint} with duration {duration}s and interval {interval}s") try: - self._resolver.get(self._running_config, resource_key) # Verify if the resource key exists in the running configuration - self.logger.info(f"Resource key {resource_key} exists in the configuration.") - resource_value = json.loads(self._resolver.get(self._running_config, resource_key).value) - if resource_value is not None: - sample_type_ids = resource_value['sample_types'] - self.logger.info(f"Sample type IDs for {resource_key}: {sample_type_ids}") - if len(sample_type_ids) == 0: - self.logger.warning(f"No sample types found for {resource_key}. Skipping subscription.") - results.append(False) - continue - else: - self.logger.warning(f"No sample types found for {resource_key}. Skipping subscription.") - results.append(False) - continue + sample_type_ids = endpoint['sample_types'] # type: ignore + resource_name = endpoint['name'] # type: ignore # Add the job to the scheduler - job_id = f"{resource_key}-{uuid.uuid4()}" self._scheduler.add_job( self._generate_sample, 'interval', seconds=interval, - args=[resource_key, sample_type_ids], - id=job_id, + args=[resource_name, sample_type_ids], + id=f"{job_id}", replace_existing=True, end_date=datetime.now(pytz.utc) + timedelta(seconds=duration) ) - self.logger.info(f"Job added to scheduler for resource key {resource_key} with duration {duration}s and interval {interval}s") - results.append(True) - except Exception as e: - self.logger.error(f"Failed to verify resource key or add job: {e}") - results.append(e) - return results + self.logger.info(f"Job added to scheduler for resource key {resource_name} with duration {duration}s and interval {interval}s") + return True + except: + self.logger.exception(f"Failed to verify resource key or add job:") + return False + else: + self.logger.warning(f"No sample types found for {endpoint}. Skipping subscription.") + return False - def UnsubscribeState(self, subscriptions: List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + def UnsubscribeState(self, resource_key: str) -> bool: self._require_connection() - results = [] - for resource_key, _, _ in subscriptions: - resource_key = self._helper_methods.validate_resource_key(resource_key) - try: - # Check if job exists - job_ids = [job.id for job in self._scheduler.get_jobs() if resource_key in job.id] - if not job_ids: - self.logger.warning(f"No active jobs found for {resource_key}. It might have already terminated.") - results.append(False) - continue - # Remove jobs - for job_id in job_ids: - self._scheduler.remove_job(job_id) - - self.logger.info(f"Unsubscribed from {resource_key} with job IDs: {job_ids}") - results.append(True) - except Exception as e: - self.logger.exception(f"Failed to unsubscribe from {resource_key}") - results.append(e) - return results + try: + # Check if job exists + job_ids = [job.id for job in self._scheduler.get_jobs() if resource_key in job.id] + if not job_ids: + self.logger.warning(f"No active jobs found for {resource_key}. It might have already terminated.") + return False + for job_id in job_ids: + self._scheduler.remove_job(job_id) + self.logger.info(f"Unsubscribed from {resource_key} with job IDs: {job_ids}") + return True + except: + self.logger.exception(f"Failed to unsubscribe from {resource_key}") + return False - def GetState(self, blocking: bool = False, terminate: Optional[queue.Queue] = None) -> Iterator[Tuple[float, str, Any]]: + def GetState(self, duration : int, blocking: bool = False, terminate: Optional[queue.Queue] = None) -> Iterator[Tuple[float, str, Any]]: self._require_connection() start_time = datetime.now(pytz.utc) - duration = 10 # Duration of the subscription in seconds (as an example) - while True: try: if terminate and not terminate.empty(): @@ -168,283 +144,3 @@ class EmulatedCollector(_Collector): self.logger.debug(f"Executing _generate_sample for resource: {resource_key}") sample = self._synthetic_data.generate_synthetic_data_point(resource_key, sample_type_ids) self._out_samples.put(sample) - -# ------------- Event Listeners (START)----------------- - - def _listener_job_removed_from_subscription_tree(self, event): - if event.job_id: - # Extract the resource key from the job ID - resource_key = event.job_id.split('-')[0] - resource_key = self._helper_methods.validate_resource_key(resource_key) - - # Remove the subscription from the tree - try: - subscription_path = resource_key.split('/') - parent = self._subscriptions - for part in subscription_path: - parent = next((child for child in parent.children if child.name == part), None) - if not parent: - raise ValueError(f"Subscription path '{resource_key}' not found in tree.") - if parent: - parent.parent.children = tuple(child for child in parent.parent.children if child != parent) - self.logger.warning(f"Automatically removed subscription from subscription_tree for {resource_key} after job termination by listener. Maybe due to timeout.") - except Exception as e: - self.logger.warning(f"Failed to remove subscription for {resource_key}: {e}") - - def _listener_job_added_to_subscription_tree(self, event): - try: - job_id = event.job_id - if job_id: - resource_key = job_id.split('-')[0] # Extract resource key from job ID - resource_key = self._helper_methods.validate_resource_key(resource_key) - subscription_path = resource_key.split('/') - parent = self._subscriptions - for part in subscription_path: - node = next((child for child in parent.children if child.name == part), None) - if not node: - node = Node(part, parent=parent) - parent = node - parent.value = { - "job_id": job_id - } - self.logger.info(f"Automatically added subscription for {resource_key} to the subscription_tree by listener.") - except Exception as e: - self.logger.exception("Failed to add subscription to the tree") - -# ------------- Event Listeners (END)----------------- - -#------------------------------------------------------------------------------------- -# ------- The below methods are kept for debugging purposes (test-case) only --------- -#------------------------------------------------------------------------------------- - -# This method can be commented but this will arise an error in the test-case (@pytest.fixture --> connected_configured_collector()). - def SetConfig(self, resources: dict) -> List[Union[bool, Exception]]: # For debugging purposes. - self._require_connection() - results = [] - - # if not isinstance(resources, dict): - # self.logger.error("Invalid configuration format: resources must be a dictionary.") - # raise ValueError("Invalid configuration format. Must be a dictionary.") - if 'config_rules' not in resources or not isinstance(resources['config_rules'], list): - self.logger.error("Invalid configuration format: 'config_rules' key missing or not a list.") - raise ValueError("Invalid configuration format. Must contain a 'config_rules' key with a list of rules.") - - for rule in resources['config_rules']: - try: - if 'action' not in rule or 'custom' not in rule: - raise ValueError(f"Invalid rule format: {rule}") - - action = rule['action'] - custom = rule['custom'] - resource_key = custom.get('resource_key') - resource_value = custom.get('resource_value') - - if not resource_key: - raise ValueError(f"Resource key is missing in rule: {rule}") - - if resource_value is None: - raise ValueError(f"Resource value is None for key: {resource_key}") - if not resource_key: - raise ValueError(f"Resource key is missing in rule: {rule}") - - if action == 1: # Set action - resource_path = self._helper_methods._parse_resource_key(resource_key) - # self.logger.info(f"1. Setting configuration for resource key {resource_key} and resource_path: {resource_path}") - parent = self._running_config - - for part in resource_path[:-1]: - if '[' in part and ']' in part: - base, index = part.split('[', 1) - index = index.rstrip(']') - parent = self._helper_methods._find_or_create_node(index, self._helper_methods._find_or_create_node(base, parent)) - # self.logger.info(f"2a. Creating node: {base}, {index}, {parent}") - elif resource_path[-1] != 'settings': - # self.logger.info(f"2b. Creating node: {part}") - parent = self._helper_methods._find_or_create_node(part, parent) - - final_part = resource_path[-1] - if final_part in ['address', 'port']: - self._helper_methods._create_or_update_node(final_part, parent, resource_value) - self.logger.info(f"Configured: {resource_key} = {resource_value}") - - if resource_key.startswith("_connect/settings"): - parent = self._helper_methods._find_or_create_node("_connect", self._running_config) - settings_node = self._helper_methods._find_or_create_node("settings", parent) - settings_node.value = None # Ensure settings node has None value - endpoints_node = self._helper_methods._find_or_create_node("endpoints", settings_node) - - for endpoint in resource_value.get("endpoints", []): - uuid = endpoint.get("uuid") - uuid = uuid.replace('/', '_') if uuid else None - if uuid: - # self.logger.info(f"3. Creating endpoint: {uuid}, {endpoint}, {endpoints_node}") - self._helper_methods._create_or_update_node(uuid, endpoints_node, endpoint) - self.logger.info(f"Configured endpoint: {uuid} : {endpoint}") - - elif resource_key.startswith("/interface"): - interface_parent = self._helper_methods._find_or_create_node("interface", self._running_config) - name = resource_value.get("name") - name = name.replace('/', '_') if name else None - if name: - self._helper_methods._create_or_update_node(name, interface_parent, resource_value) - self.logger.info(f"Configured interface: {name} : {resource_value}") - # self.logger.info(f"4. Configured interface: {name}") - - results.append(True) - else: - raise ValueError(f"Unsupported action '{action}' in rule: {rule}") - - if resource_value is None: - raise ValueError(f"Resource value is None for key: {resource_key}") - - except Exception as e: - self.logger.exception(f"Failed to apply rule: {rule}") - results.append(e) - - return results - -#----------------------------------- -# ------- EXTRA Methods ------------ -#----------------------------------- - - # def log_active_jobs(self): # For debugging purposes. - # """ - # Logs the IDs of all active jobs. - # This method retrieves the list of active jobs from the scheduler and logs their IDs using the logger. - # """ - # self._require_connection() - # jobs = self._scheduler.get_jobs() - # self.logger.info(f"Active jobs: {[job.id for job in jobs]}") - - # def print_config_tree(self): # For debugging purposes. - # """ - # Reads the configuration using GetConfig and prints it as a hierarchical tree structure. - # """ - # self._require_connection() - - # def print_tree(node, indent=""): - # """ - # Recursively prints the configuration tree. - - # Args: - # node (Node): The current node to print. - # indent (str): The current indentation level. - # """ - # if node.name != "root": # Skip the root node's name - # value = getattr(node, "value", None) - # print(f"{indent}- {node.name}: {json.loads(value) if value else ''}") - - # for child in node.children: - # print_tree(child, indent + " ") - - # print("Configuration Tree:") - # print_tree(self._running_config) - - - # def GetInitialConfig(self) -> List[Tuple[str, Any]]: # comment - # self._require_connection() - # results = [] - # for node in self._initial_config.descendants: - # value = getattr(node, "value", None) - # results.append((node.name, json.loads(value) if value else None)) - # self.logger.info("Retrieved initial configurations") - # return results - - # def GetConfig(self, resource_keys: List[str] = []) -> List[Tuple[str, Union[Any, dict, Exception]]]: # comment - # """ - # Retrieves the configuration for the specified resource keys. - # If no keys are provided, returns the full configuration tree. - - # Args: - # resource_keys (List[str]): A list of keys specifying the configuration to retrieve. - - # Returns: - # List[Tuple[str, Union[Any, dict, Exception]]]: A list of tuples with the resource key and its value, - # subtree, or an exception. - # """ - # self._require_connection() - # results = [] - - # try: - # if not resource_keys: - # # If no specific keys are provided, return the full configuration tree - - # full_tree = self._helper_methods._generate_subtree(self._running_config) - # # full_tree = self._generate_subtree(self._running_config) - # return [("full_configuration", full_tree)] - - # for key in resource_keys: - # try: - # # Parse the resource key - # resource_path = self._helper_methods.(key) - # self.logger.info(f"1. Retrieving configuration for resource path : {resource_path}") - - # # Navigate to the node corresponding to the key - # parent = self._running_config - # for part in resource_path: - # parent = self._find_or_raise_node(part, parent) - - # # Check if the node has a value - # value = getattr(parent, "value", None) - # if value: - # # If a value exists, return it - # results.append((key, json.loads(value))) - # else: - # # If no value, return the subtree of this node - # subtree = self._helper_methods._generate_subtree(parent) - # # subtree = self._generate_subtree(parent) - # results.append((key, subtree)) - - # except Exception as e: - # self.logger.exception(f"Failed to retrieve configuration for key: {key}") - # results.append((key, e)) - - # except Exception as e: - # self.logger.exception("Failed to retrieve configurations") - # results.append(("Error", e)) - - # return results - - # def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: # comment - # self._require_connection() - # results = [] - - # for key in resources: - # try: - # # Parse resource key into parts, handling brackets correctly - # resource_path = self._helper_methods.(key) - - # parent = self._running_config - # for part in resource_path: - # parent = self._find_or_raise_node(part, parent) - - # # Delete the final node - # node_to_delete = parent - # parent = node_to_delete.parent - # parent.children = tuple(child for child in parent.children if child != node_to_delete) - # self.logger.info(f"Deleted configuration for key: {key}") - - # # Handle endpoints structure - # if "interface" in key and "settings" in key: - # interface_name = key.split('[')[-1].split(']')[0] - # endpoints_parent = self._find_or_raise_node("_connect", self._running_config) - # endpoints_node = self._find_or_raise_node("endpoints", endpoints_parent) - # endpoint_to_delete = next((child for child in endpoints_node.children if child.name == interface_name), None) - # if endpoint_to_delete: - # endpoints_node.children = tuple(child for child in endpoints_node.children if child != endpoint_to_delete) - # self.logger.info(f"Removed endpoint entry for interface '{interface_name}'") - - # # Check if parent has no more children and is not the root - # while parent and parent.name != "root" and not parent.children: - # node_to_delete = parent - # parent = node_to_delete.parent - # parent.children = tuple(child for child in parent.children if child != node_to_delete) - # self.logger.info(f"Deleted empty parent node: {node_to_delete.name}") - - # results.append(True) - # except Exception as e: - # self.logger.exception(f"Failed to delete configuration for key: {key}") - # results.append(e) - - # return results - diff --git a/src/telemetry/backend/service/TelemetryBackendService.py b/src/telemetry/backend/service/TelemetryBackendService.py index 0c515768e..c392efd1d 100755 --- a/src/telemetry/backend/service/TelemetryBackendService.py +++ b/src/telemetry/backend/service/TelemetryBackendService.py @@ -44,6 +44,7 @@ class TelemetryBackendService(GenericGrpcService): self.kafka_consumer = KafkaConsumer({'bootstrap.servers' : KafkaConfig.get_kafka_address(), 'group.id' : 'backend', 'auto.offset.reset' : 'latest'}) + self.collector = EmulatedCollector(address="127.0.0.1", port=8000) self.active_jobs = {} def install_servicers(self): @@ -65,7 +66,7 @@ class TelemetryBackendService(GenericGrpcService): if receive_msg.error().code() == KafkaError._PARTITION_EOF: continue elif receive_msg.error().code() == KafkaError.UNKNOWN_TOPIC_OR_PART: - LOGGER.warning(f"Subscribed topic {receive_msg.topic()} does not exist. May be topic does not have any messages.") + LOGGER.warning(f"Subscribed topic {receive_msg.topic()} does not exist or topic does not have any messages.") continue else: LOGGER.error("Consumer error: {}".format(receive_msg.error())) @@ -77,11 +78,11 @@ class TelemetryBackendService(GenericGrpcService): collector_id = receive_msg.key().decode('utf-8') LOGGER.debug('Recevied Collector: {:} - {:}'.format(collector_id, collector)) - duration = collector.get('duration', -1) + duration = collector.get('duration', 0) if duration == -1 and collector['interval'] == -1: self.TerminateCollector(collector_id) else: - LOGGER.info("Collector ID: {:} - Scheduling...".format(collector_id)) + LOGGER.info("Received Collector ID: {:} - Scheduling...".format(collector_id)) if collector_id not in self.active_jobs: stop_event = threading.Event() self.active_jobs[collector_id] = stop_event @@ -95,13 +96,15 @@ class TelemetryBackendService(GenericGrpcService): )).start() # Stop the Collector after the given duration if duration > 0: - def stop_after_duration(): - time.sleep(duration) - LOGGER.warning(f"Execution duration ({duration}) completed of Collector: {collector_id}") - self.TerminateCollector(collector_id) + def stop_after_duration(completion_time, stop_event): + time.sleep(completion_time) + if not stop_event.is_set(): + LOGGER.warning(f"Execution duration ({completion_time}) completed of Collector: {collector_id}") + self.TerminateCollector(collector_id) duration_thread = threading.Thread( - target=stop_after_duration, daemon=True, name=f"stop_after_duration_{collector_id}" + target=stop_after_duration, daemon=True, name=f"stop_after_duration_{collector_id}", + args=(duration, stop_event) ) duration_thread.start() else: @@ -113,7 +116,7 @@ class TelemetryBackendService(GenericGrpcService): """ Method to handle collector request. """ - end_points : list = self.get_endpoints_from_kpi_id(kpi_id) + end_points : dict = self.get_endpoints_from_kpi_id(kpi_id) if not end_points: LOGGER.warning("KPI ID: {:} - Endpoints not found. Skipping...".format(kpi_id)) @@ -125,21 +128,24 @@ class TelemetryBackendService(GenericGrpcService): if device_type == "EMU-Device": LOGGER.info("KPI ID: {:} - Device Type: {:} - Endpoints: {:}".format(kpi_id, device_type, end_points)) subscription = [collector_id, end_points, duration, interval] - self.EmulatedCollectorHandler(subscription, kpi_id, stop_event) + self.EmulatedCollectorHandler(subscription, duration, collector_id, kpi_id, stop_event) else: LOGGER.warning("KPI ID: {:} - Device Type: {:} - Not Supported".format(kpi_id, device_type)) - - def EmulatedCollectorHandler(self, subscription, kpi_id, stop_event): + def EmulatedCollectorHandler(self, subscription, duration, collector_id, kpi_id, stop_event): # EmulatedCollector - collector = EmulatedCollector(address="127.0.0.1", port=8000) - collector.Connect() - while not stop_event.is_set(): - # samples = collector.SubscribeState(subscription) - # LOGGER.debug("KPI: {:} - Value: {:}".format(kpi_id, samples)) - # self.GenerateKpiValue(job_id, kpi_id, samples) - LOGGER.info("Generating KPI Values ...") - time.sleep(1) + + self.collector.Connect() + if not self.collector.SubscribeState(subscription): + LOGGER.warning("KPI ID: {:} - Subscription failed. Skipping...".format(kpi_id)) + else: + while not stop_event.is_set(): + samples = list(self.collector.GetState(duration=duration, blocking=True)) + LOGGER.info("KPI: {:} - Value: {:}".format(kpi_id, samples)) + self.GenerateKpiValue(collector_id, kpi_id, samples) + time.sleep(1) + self.collector.Disconnect() + # self.TerminateCollector(collector_id) # No need to terminate, automatically terminated after duration. def GenerateKpiValue(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): """ @@ -171,12 +177,17 @@ class TelemetryBackendService(GenericGrpcService): if stop_event: stop_event.set() LOGGER.info(f"Job {job_id} terminated.") + if self.collector.UnsubscribeState(job_id): + LOGGER.info(f"Unsubscribed from collector: {job_id}") + else: + LOGGER.warning(f"Failed to unsubscribe from collector: {job_id}") else: LOGGER.warning(f"Job {job_id} not found in active jobs.") except: LOGGER.exception("Error terminating job: {:}".format(job_id)) - def get_endpoints_from_kpi_id(self, kpi_id: str) -> list: +# --- Mock Methods --- + def get_endpoints_from_kpi_id(self, kpi_id: str) -> dict: """ Method to get endpoints based on kpi_id. """ @@ -185,7 +196,7 @@ class TelemetryBackendService(GenericGrpcService): '123e4567-e89b-12d3-a456-426614174001': {"uuid": "123e4567-e89b-12d3-a456-42661417ed07", "name": "eth1", "type": "ethernet", "sample_types": []}, '123e4567-e89b-12d3-a456-426614174002': {"uuid": "123e4567-e89b-12d3-a456-42661417ed08", "name": "13/1/2", "type": "copper", "sample_types": [101, 102, 201, 202]}, } - return [kpi_endpoints.get(kpi_id, {})] if kpi_id in kpi_endpoints else [] + return kpi_endpoints.get(kpi_id, {}) if kpi_id in kpi_endpoints else {} def get_device_type_from_kpi_id(self, kpi_id: str) -> str: """ @@ -198,35 +209,6 @@ class TelemetryBackendService(GenericGrpcService): } return kpi_device_types.get(kpi_id, {}).get('device_type', "Unknown") - - # def TerminateCollectorBackend(self, collector_id): - # LOGGER.debug("Terminating collector backend...") - # if collector_id in self.running_threads: - # thread = self.running_threads[collector_id] - # thread.stop() - # del self.running_threads[collector_id] - # LOGGER.debug("Collector backend terminated. Collector ID: {:}".format(collector_id)) - # self.GenerateCollectorTerminationSignal(collector_id, "-1", -1) # Termination confirmation to frontend. - # else: - # LOGGER.warning('Backend collector {:} not found'.format(collector_id)) - - # def GenerateCollectorTerminationSignal(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): - # """ - # Method to write kpi Termination signat on TELEMETRY_RESPONSE Kafka topic - # """ - # producer = self.kafka_producer - # kpi_value : Dict = { - # "kpi_id" : kpi_id, - # "kpi_value" : measured_kpi_value, - # } - # producer.produce( - # KafkaTopic.TELEMETRY_RESPONSE.value, - # key = collector_id, - # value = json.dumps(kpi_value), - # callback = self.delivery_callback - # ) - # producer.flush() - def delivery_callback(self, err, msg): if err: LOGGER.error('Message delivery failed: {:s}'.format(str(err))) diff --git a/src/telemetry/frontend/tests/test_frontend.py b/src/telemetry/frontend/tests/test_frontend.py index 067925a28..6c6107152 100644 --- a/src/telemetry/frontend/tests/test_frontend.py +++ b/src/telemetry/frontend/tests/test_frontend.py @@ -15,6 +15,7 @@ import os import pytest import logging +import time from common.Constants import ServiceNameEnum from common.proto.telemetry_frontend_pb2 import CollectorId, CollectorList @@ -42,6 +43,16 @@ os.environ[get_env_var_name(ServiceNameEnum.TELEMETRY, ENVVAR_SUFIX_SERVICE_PORT LOGGER = logging.getLogger(__name__) +@pytest.fixture(autouse=True) +def log_all_methods(request): + ''' + This fixture logs messages before and after each test function runs, indicating the start and end of the test. + The autouse=True parameter ensures that this logging happens automatically for all tests in the module. + ''' + LOGGER.info(f" >>>>> Starting test: {request.node.name} ") + yield + LOGGER.info(f" <<<<< Finished test: {request.node.name} ") + @pytest.fixture(scope='session') def telemetryFrontend_service(): LOGGER.info('Initializing TelemetryFrontendService...') @@ -82,33 +93,29 @@ def telemetryFrontend_client( # ------- Re-structuring Test --------- # --- "test_validate_kafka_topics" should be run before the functionality tests --- def test_validate_kafka_topics(): - LOGGER.debug(" >>> test_validate_kafka_topics: START <<< ") + # LOGGER.debug(" >>> test_validate_kafka_topics: START <<< ") response = KafkaTopic.create_all_topics() assert isinstance(response, bool) # ----- core funtionality test ----- def test_StartCollector(telemetryFrontend_client): - LOGGER.info(' >>> test_StartCollector START: <<< ') + # LOGGER.info(' >>> test_StartCollector START: <<< ') response = telemetryFrontend_client.StartCollector(create_collector_request()) LOGGER.debug(str(response)) assert isinstance(response, CollectorId) + def test_StopCollector(telemetryFrontend_client): - LOGGER.info(' >>> test_StopCollector START: <<< ') + # LOGGER.info(' >>> test_StopCollector START: <<< ') + LOGGER.info("Waiting before termination...") + time.sleep(30) response = telemetryFrontend_client.StopCollector(create_collector_id()) LOGGER.debug(str(response)) assert isinstance(response, Empty) -def test_SelectCollectors(telemetryFrontend_client): - LOGGER.info(' >>> test_SelectCollectors START: <<< ') - response = telemetryFrontend_client.SelectCollectors(create_collector_filter()) - LOGGER.debug(str(response)) - assert isinstance(response, CollectorList) - -# # ----- Non-gRPC method tests ----- -# def test_RunResponseListener(): -# LOGGER.info(' >>> test_RunResponseListener START: <<< ') -# TelemetryFrontendServiceObj = TelemetryFrontendServiceServicerImpl() -# response = TelemetryFrontendServiceObj.RunResponseListener() # becasue Method "run_kafka_listener" is not define in frontend.proto +# def test_SelectCollectors(telemetryFrontend_client): +# LOGGER.info(' >>> test_SelectCollectors START: <<< ') +# response = telemetryFrontend_client.SelectCollectors(create_collector_filter()) # LOGGER.debug(str(response)) -# assert isinstance(response, bool) +# assert isinstance(response, CollectorList) + -- GitLab From 21a72d9806f82395b19d0cee6dce3ae81058fc2c Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Mon, 27 Jan 2025 14:57:40 +0000 Subject: [PATCH 211/463] Add HTTP Server and gRPC Server Add manifest.yaml Add DockerFile Solve some typo on .proto file --- manifests/ztp_server.yaml | 78 + proto/ztp_server.proto | 4 +- src/common/Constants.py | 5 +- src/ztp_server/Dockerfile | 43 +- src/ztp_server/README.md | 35 - src/ztp_server/client/ZtpClient.py | 7 +- src/ztp_server/data/nso_client.proto | 60 - src/ztp_server/requirements.in | 3 - src/ztp_server/service/ZtpServerService.py | 4 +- .../service/ZtpServerServiceServicerImpl.py | 26 +- .../service/context_subscription/__init__.py | 64 - .../ztpServer_plugins/tfs_api/Resources.py | 22 +- .../ztpServer_plugins/tfs_api/Tools.py | 30 +- .../ztpServer_plugins/tools/Validator.py | 35 - src/ztp_server/tests/Constants.py | 85 - .../tests/MockService_Dependencies.py | 58 - src/ztp_server/tests/PrepareTestScenario.py | 169 - src/ztp_server/tests/__init__.py | 14 - src/ztp_server/tests/data/ietf_acl.json | 56 - .../tests/data/ietf_l3vpn_req_svc1.json | 231 -- .../tests/data/ietf_l3vpn_req_svc2.json | 231 -- .../tests/data/test-ietf-network.json | 1962 ----------- src/ztp_server/tests/data/tfs_api_dummy.json | 442 --- .../data/topology-7router-emu-dummy.json | 157 - .../tests/data/topology-7router-emu.json | 156 - src/ztp_server/tests/data/topology-dummy.json | 3134 ----------------- src/ztp_server/tests/data/topology-real.json | 259 -- src/ztp_server/tests/ietf_acl_client.py | 89 - src/ztp_server/tests/test_etsi_bwm.py | 240 -- src/ztp_server/tests/test_ietf_l2vpn.py | 75 - src/ztp_server/tests/test_ietf_l3vpn.py | 113 - src/ztp_server/tests/test_ietf_network.py | 105 - src/ztp_server/tests/test_slice.py | 125 - src/ztp_server/tests/test_tfs_api.py | 217 -- src/ztp_server/tests/test_yang_acl.py | 104 - 35 files changed, 123 insertions(+), 8315 deletions(-) create mode 100644 manifests/ztp_server.yaml delete mode 100755 src/ztp_server/README.md delete mode 100644 src/ztp_server/data/nso_client.proto delete mode 100755 src/ztp_server/service/context_subscription/__init__.py delete mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py delete mode 100755 src/ztp_server/tests/Constants.py delete mode 100755 src/ztp_server/tests/MockService_Dependencies.py delete mode 100755 src/ztp_server/tests/PrepareTestScenario.py delete mode 100755 src/ztp_server/tests/__init__.py delete mode 100755 src/ztp_server/tests/data/ietf_acl.json delete mode 100755 src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json delete mode 100755 src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json delete mode 100755 src/ztp_server/tests/data/test-ietf-network.json delete mode 100755 src/ztp_server/tests/data/tfs_api_dummy.json delete mode 100755 src/ztp_server/tests/data/topology-7router-emu-dummy.json delete mode 100755 src/ztp_server/tests/data/topology-7router-emu.json delete mode 100755 src/ztp_server/tests/data/topology-dummy.json delete mode 100755 src/ztp_server/tests/data/topology-real.json delete mode 100755 src/ztp_server/tests/ietf_acl_client.py delete mode 100755 src/ztp_server/tests/test_etsi_bwm.py delete mode 100755 src/ztp_server/tests/test_ietf_l2vpn.py delete mode 100755 src/ztp_server/tests/test_ietf_l3vpn.py delete mode 100755 src/ztp_server/tests/test_ietf_network.py delete mode 100755 src/ztp_server/tests/test_slice.py delete mode 100755 src/ztp_server/tests/test_tfs_api.py delete mode 100755 src/ztp_server/tests/test_yang_acl.py diff --git a/manifests/ztp_server.yaml b/manifests/ztp_server.yaml new file mode 100644 index 000000000..6ed469174 --- /dev/null +++ b/manifests/ztp_server.yaml @@ -0,0 +1,78 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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: apps/v1 +kind: Deployment +metadata: + name: ztp_serverservice +spec: + selector: + matchLabels: + app: ztp_serverservice + #replicas: 1 + template: + metadata: + labels: + app: ztp_serverservice + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: server + image: labs.etsi.org:5050/tfs/controller/ztp_server:latest + imagePullPolicy: Always + ports: + - containerPort: 8005 + - containerPort: 5051 + - containerPort: 9192 + env: + - name: LOG_LEVEL + value: "INFO" + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:5051"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:5051"] + resources: + requests: + cpu: 250m + memory: 128Mi + limits: + cpu: 1000m + memory: 1024Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: ztp_serverservice + labels: + app: ztp_serverservice +spec: + type: ClusterIP + selector: + app: ztp_serverservice + ports: + - name: http + protocol: TCP + port: 8005 + targetPort: 8005 + - name: grpc + protocol: TCP + port: 5051 + targetPort: 5051 + - name: metrics + protocol: TCP + port: 9192 + targetPort: +--- diff --git a/proto/ztp_server.proto b/proto/ztp_server.proto index 6c575df11..807751084 100755 --- a/proto/ztp_server.proto +++ b/proto/ztp_server.proto @@ -25,11 +25,11 @@ service ZtpServerService { // Define the request message for both methods message ProvisioningScriptName { - string input = 1; + string scriptname = 1; } message ZtpFileName { - string input = 1; + string filename = 1; } message ProvisioningScript { diff --git a/src/common/Constants.py b/src/common/Constants.py index 660e99f04..50b792c65 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -122,8 +122,9 @@ DEFAULT_SERVICE_GRPC_PORTS = { # Default HTTP/REST-API service ports DEFAULT_SERVICE_HTTP_PORTS = { - ServiceNameEnum.NBI .value : 8080, - ServiceNameEnum.WEBUI.value : 8004, + ServiceNameEnum.NBI .value : 8080, + ServiceNameEnum.WEBUI.value : 8004, + ServiceNameEnum.ZTP_SERVER.value : 8005, } # Default HTTP/REST-API service base URLs diff --git a/src/ztp_server/Dockerfile b/src/ztp_server/Dockerfile index a9be06d37..bbcc282bd 100755 --- a/src/ztp_server/Dockerfile +++ b/src/ztp_server/Dockerfile @@ -19,21 +19,6 @@ RUN apt-get --yes --quiet --quiet update && \ apt-get --yes --quiet --quiet install wget g++ git build-essential cmake libpcre2-dev python3-dev python3-cffi && \ rm -rf /var/lib/apt/lists/* -# Download, build and install libyang. Note that APT package is outdated -# - Ref: https://github.com/CESNET/libyang -# - Ref: https://github.com/CESNET/libyang-python/ -RUN mkdir -p /var/libyang -RUN git clone https://github.com/CESNET/libyang.git /var/libyang -WORKDIR /var/libyang -RUN git fetch -RUN git checkout v2.1.148 -RUN mkdir -p /var/libyang/build -WORKDIR /var/libyang/build -RUN cmake -D CMAKE_BUILD_TYPE:String="Release" .. -RUN make -RUN make install -RUN ldconfig - # Set Python to show logs as they occur ENV PYTHONUNBUFFERED=0 @@ -69,29 +54,19 @@ RUN rm *.proto RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; # Create component sub-folders, get specific Python packages -RUN mkdir -p /var/teraflow/nbi -WORKDIR /var/teraflow/nbi -COPY src/nbi/requirements.in requirements.in +RUN mkdir -p /var/teraflow/ztp_server +WORKDIR /var/teraflow/ztp_server +COPY src/ztp_server/requirements.in requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN python3 -m pip install -r requirements.txt # Add component files into working directory WORKDIR /var/teraflow -COPY src/nbi/. nbi/ -COPY src/context/__init__.py context/__init__.py -COPY src/context/client/. context/client/ -COPY src/device/__init__.py device/__init__.py -COPY src/device/client/. device/client/ -COPY src/service/__init__.py service/__init__.py -COPY src/service/client/. service/client/ -COPY src/slice/__init__.py slice/__init__.py -COPY src/slice/client/. slice/client/ -COPY src/qkd_app/__init__.py qkd_app/__init__.py -COPY src/qkd_app/client/. qkd_app/client/ -COPY src/vnt_manager/__init__.py vnt_manager/__init__.py -COPY src/vnt_manager/client/. vnt_manager/client/ -RUN mkdir -p /var/teraflow/tests/tools -COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ +COPY src/ztp_server/. ztp_server/ + +#ToDo Implement Test +#RUN mkdir -p /var/teraflow/tests/tools +#COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ # Start the service -ENTRYPOINT ["python", "-m", "nbi.service"] +ENTRYPOINT ["python", "-m", "ztp_server.service"] diff --git a/src/ztp_server/README.md b/src/ztp_server/README.md deleted file mode 100755 index 32902a0b3..000000000 --- a/src/ztp_server/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# NBI Component - -The NBI component uses libyang to validate and process messages. Follow instructions below to install it. - -## Install libyang -- Ref: https://github.com/CESNET/libyang -- Ref: https://github.com/CESNET/libyang-python/ - -__NOTE__: APT package is extremely outdated and does not work for our purposes. - -### Build Requisites -```bash -sudo apt-get install build-essential cmake libpcre2-dev -sudo apt-get install python3-dev gcc python3-cffi -``` - -### Build from source -```bash -mkdir ~/tfs-ctrl/libyang -git clone https://github.com/CESNET/libyang.git ~/tfs-ctrl/libyang -cd ~/tfs-ctrl/libyang -git fetch -git checkout v2.1.148 -mkdir ~/tfs-ctrl/libyang/build -cd ~/tfs-ctrl/libyang/build -cmake -D CMAKE_BUILD_TYPE:String="Release" .. -make -sudo make install -sudo ldconfig -``` - -### Install Python bindings -```bash -pip install libyang==2.8.0 -``` diff --git a/src/ztp_server/client/ZtpClient.py b/src/ztp_server/client/ZtpClient.py index 5e5737857..9e14bd694 100755 --- a/src/ztp_server/client/ZtpClient.py +++ b/src/ztp_server/client/ZtpClient.py @@ -15,9 +15,8 @@ import grpc, logging from common.Constants import ServiceNameEnum from common.Settings import get_service_host, get_service_port_grpc -from common.proto.ztp_server_pb2_grpc import ztpServerServiceStub -from common.proto.context_pb2 import ( - ZtpFileName, ZtpFile, ProvisioningScriptName, ProvisioningScript) +from common.proto.ztp_server_pb2_grpc import ZtpServerServiceStub +from common.proto.ztp_server_pb2 import ProvisioningScriptName, ProvisioningScript, ZtpFileName, ZtpFile from common.tools.client.RetryDecorator import retry, delay_exponential from common.tools.grpc.Tools import grpc_message_to_json_string @@ -39,7 +38,7 @@ class ZtpClient: def connect(self): self.channel = grpc.insecure_channel(self.endpoint) - self.stub = ztpServerServiceStub(self.channel) + self.stub = ZtpServerServiceStub(self.channel) def close(self): if self.channel is not None: self.channel.close() diff --git a/src/ztp_server/data/nso_client.proto b/src/ztp_server/data/nso_client.proto deleted file mode 100644 index d5983c62c..000000000 --- a/src/ztp_server/data/nso_client.proto +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package nos_client; - -message NOS_SW { - string ztp_device_sw_url = 1; - bytes ztp_device_sw_file = 2; -} - -// For ONIE Requests -message NOS_SW_REQ { - string serial_number = 1; - string eth_addr = 2; - string vendor_id = 3; - string machine = 4; - string machine_rev = 5; - string arch = 6; - string security_key = 7; - string operation = 8; -} - -message Config_Script { - string config_script_url = 1; - bytes config_script_file = 2; -} - -message Config_Script_REQ { - string agent = 1; - string machine = 2; - string serial_number = 3; - string eth_addr = 4; - string version = 5; -} - -message Status_Notification { - string status = 1; - string serial_number = 2; - string eth_addr = 3; -} - -message Empty{} - -service nos_client { - rpc GetNOSFile (NOS_SW_REQ) returns (NOS_SW) {} - rpc GetConfigScriptFile (Config_Script_REQ) returns (Config_Script) {} - rpc NotifyStatus (Status_Notification) returns (Empty) {} -} diff --git a/src/ztp_server/requirements.in b/src/ztp_server/requirements.in index 0d7804836..ba715494d 100755 --- a/src/ztp_server/requirements.in +++ b/src/ztp_server/requirements.in @@ -18,10 +18,7 @@ Flask==2.1.3 Flask-HTTPAuth==4.5.0 Flask-RESTful==0.3.9 jsonschema==4.4.0 -libyang==2.8.0 netaddr==0.9.0 -pyang==2.6.0 -git+https://github.com/robshakir/pyangbind.git pydantic==2.6.3 requests==2.27.1 werkzeug==2.3.7 diff --git a/src/ztp_server/service/ZtpServerService.py b/src/ztp_server/service/ZtpServerService.py index aba4aee94..c099cf7f6 100755 --- a/src/ztp_server/service/ZtpServerService.py +++ b/src/ztp_server/service/ZtpServerService.py @@ -14,7 +14,7 @@ from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc -from common.proto.ztp_server_pb2_grpc import add_Ztp_ServerServiceServicer_to_server +from common.proto.ztp_server_pb2_grpc import add_ZtpServerServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from ztp_server.service.ZtpServerServiceServicerImpl import ZtpServerServiceServicerImpl @@ -25,4 +25,4 @@ class ZtpServerService(GenericGrpcService): self.ztp_servicer = ZtpServerServiceServicerImpl() def install_servicers(self): - add_Ztp_ServerServiceServicer_to_server(self.ztp_servicer, self.server) + add_ZtpServerServiceServicer_to_server(self.ztp_servicer, self.server) diff --git a/src/ztp_server/service/ZtpServerServiceServicerImpl.py b/src/ztp_server/service/ZtpServerServiceServicerImpl.py index 015f958f4..410db6cb3 100755 --- a/src/ztp_server/service/ZtpServerServiceServicerImpl.py +++ b/src/ztp_server/service/ZtpServerServiceServicerImpl.py @@ -12,17 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -import grpc, logging, json +import grpc, logging, json, os from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method -from common.proto.context_pb2 import ( - ZtpFileName, ZtpFile, ProvisioningScriptName, ProvisioningScript) -from common.proto.ztp_server_pb2_grpc import ztpServerServiceServicer +from common.proto.ztp_server_pb2 import ProvisioningScriptName, ProvisioningScript, ZtpFileName, ZtpFile +from common.proto.ztp_server_pb2_grpc import ZtpServerServiceServicer LOGGER = logging.getLogger(__name__) METRICS_POOL = MetricsPool('ZTP_SERVER', 'RPC') -class ZtpServerServiceServicerImpl(ztpServerServiceServicer): + +class ZtpServerServiceServicerImpl(ZtpServerServiceServicer): def __init__(self): LOGGER.info('Creating Servicer...') LOGGER.info('Servicer Created') @@ -30,24 +30,24 @@ class ZtpServerServiceServicerImpl(ztpServerServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetZtpProvisioning(self, request : ProvisioningScriptName, context : grpc.ServicerContext) -> ProvisioningScript: try: - filePath = '../data/' + ProvisioningScriptName - with open(filePath, 'r') as provisioning_file: + provisioningPath = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', 'data', request.scriptname) + with open(provisioningPath, 'r') as provisioning_file: provisioning_content = provisioning_file.read() - return ztpServerServiceServicer.ProvisioningScript(script=provisioning_content) + return ProvisioningScript(script=provisioning_content) except FileNotFoundError: context.set_code(grpc.StatusCode.NOT_FOUND) context.set_details('File not found') - return ztpServerServiceServicer.ProvisioningScript() + return ProvisioningScript() @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetZtpProvisioning(self, request : ZtpFileName, context : grpc.ServicerContext) -> ZtpFile: try: - filePath = '../data/' + ZtpFileName - with open(filePath, 'r') as json_file: + ztpPath = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', 'data', request.filename) + with open(ztpPath, 'r') as json_file: json_content = json_file.read() - return ztpServerServiceServicer.ZtpFile(json=json_content) + return ZtpFile(json=json_content) except FileNotFoundError: context.set_code(grpc.StatusCode.NOT_FOUND) context.set_details('File not found') - return ztpServerServiceServicer.ZtpFile(json=json_content) \ No newline at end of file + return ZtpFile() \ No newline at end of file diff --git a/src/ztp_server/service/context_subscription/__init__.py b/src/ztp_server/service/context_subscription/__init__.py deleted file mode 100755 index 758f3d82c..000000000 --- a/src/ztp_server/service/context_subscription/__init__.py +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 websockets.sync.server import serve -from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest -from common.Settings import get_setting -from context.client.ContextClient import ContextClient -from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME -from common.tools.object_factory.Topology import json_topology_id -from common.tools.object_factory.Context import json_context_id -from common.proto.context_pb2 import ContextId, TopologyId -import json -import os -from vnt_manager.client.VNTManagerClient import VNTManagerClient - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) -ADMIN_TOPOLOGY_ID = TopologyId(**json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id=JSON_ADMIN_CONTEXT_ID)) - -vnt_manager_client: VNTManagerClient = VNTManagerClient() -context_client: ContextClient = ContextClient() - -ALL_HOSTS = "0.0.0.0" -WS_E2E_PORT = int(get_setting('WS_E2E_PORT', default='8762')) - -LOGGER = logging.getLogger(__name__) - - -def register_context_subscription(): - with serve(subcript_to_vnt_manager, ALL_HOSTS, WS_E2E_PORT, logger=LOGGER) as server: - LOGGER.info("Running subscription server...: {}:{}".format(ALL_HOSTS, str(WS_E2E_PORT))) - server.serve_forever() - LOGGER.info("Exiting subscription server...") - - -def subcript_to_vnt_manager(websocket): - for message in websocket: - LOGGER.debug("Message received: {}".format(message)) - message_json = json.loads(message) - request = VNTSubscriptionRequest() - request.host = message_json['host'] - request.port = message_json['port'] - LOGGER.debug("Received gRPC from ws: {}".format(request)) - - try: - vntm_reply = vnt_manager_client.VNTSubscript(request) - LOGGER.debug("Received gRPC from vntm: {}".format(vntm_reply)) - except Exception as e: - LOGGER.error('Could not subscript to VTNManager: {}'.format(e)) - - websocket.send(vntm_reply.subscription) diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py index c1b8c3733..43b7b79b6 100755 --- a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py @@ -16,32 +16,22 @@ import json import logging from flask.json import jsonify from flask_restful import Resource, request -from werkzeug.exceptions import BadRequest -from common.proto.context_pb2 import Empty, LinkTypeEnum from common.tools.grpc.Tools import grpc_message_to_json -from context.client.ContextClient import ContextClient -from device.client.DeviceClient import DeviceClient -from service.client.ServiceClient import ServiceClient -from slice.client.SliceClient import SliceClient -from vnt_manager.client.VNTManagerClient import VNTManagerClient +from ztp_server.service.rest_server.ztpServer_plugins.tools.Authentication import HTTP_AUTH from .Tools import ( - format_grpc_to_json, returnConfigFile + returnConfigFile ) LOGGER = logging.getLogger(__name__) - class _Resource(Resource): def __init__(self) -> None: super().__init__() - self.context_client = ContextClient() - self.device_client = DeviceClient() - self.service_client = ServiceClient() - self.vntmanager_client = VNTManagerClient() - self.slice_client = SliceClient() - class config(_Resource): + @HTTP_AUTH.login_required def get(self, config_db : str): - return returnConfigFile(config_db) #TODO define how to return configFile.json + #if returnConfigFile(config_db) + + return diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py index 6665dd4ce..7d05816ee 100755 --- a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py @@ -12,30 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Dict -from flask.json import jsonify -from common.proto.context_pb2 import ( - ConnectionId, returnConfigFile -) -from common.proto.policy_pb2 import PolicyRule, PolicyRuleId -from common.tools.grpc.Tools import grpc_message_to_json -from common.tools.object_factory.Connection import json_connection_id -from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Device import json_device_id -from common.tools.object_factory.Link import json_link_id -from common.tools.object_factory.PolicyRule import json_policyrule_id -from common.tools.object_factory.Service import json_service_id -from common.tools.object_factory.Slice import json_slice_id -from common.tools.object_factory.Topology import json_topology_id - - -def format_grpc_to_json(grpc_reply): - return jsonify(grpc_message_to_json(grpc_reply)) +import os def returnConfigFile(config_db): - path = config_db - - with open(path, 'r', encoding='utf-8') as configFile: - content = configFile.read() + try: + configFilePath = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..','..','..','..','..', 'data', config_db) + with open(configFilePath, 'r', encoding='utf-8') as configFile: + content = configFile.read() + except FileNotFoundError: + return "File not Found" return content \ No newline at end of file diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py deleted file mode 100755 index 66b607c8b..000000000 --- a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from typing import List -from flask.json import jsonify -from jsonschema import _utils -from jsonschema.validators import validator_for -from jsonschema.protocols import Validator -from jsonschema.exceptions import ValidationError -from werkzeug.exceptions import BadRequest -from .HttpStatusCodes import HTTP_BADREQUEST - -def validate_message(schema, message): - validator_class = validator_for(schema) - validator : Validator = validator_class(schema) - errors : List[ValidationError] = sorted(validator.iter_errors(message), key=str) - if len(errors) == 0: return - response = jsonify([ - {'message': str(error.message), 'schema': str(error.schema), 'validator': str(error.validator), - 'where': str(_utils.format_as_index(container='message', indices=error.relative_path))} - for error in errors - ]) - response.status_code = HTTP_BADREQUEST - raise BadRequest(response=response) diff --git a/src/ztp_server/tests/Constants.py b/src/ztp_server/tests/Constants.py deleted file mode 100755 index 886ddcafa..000000000 --- a/src/ztp_server/tests/Constants.py +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -USERNAME = 'admin' -PASSWORD = 'admin' - -# Ref: https://osm.etsi.org/wikipub/index.php/WIM -WIM_MAPPING = [ - { - 'device-id' : 'dev-1', # pop_switch_dpid - #'device_interface_id' : ??, # pop_switch_port - 'service_endpoint_id' : 'ep-1', # wan_service_endpoint_id - 'service_mapping_info': { # wan_service_mapping_info, other extra info - 'bearer': {'bearer-reference': 'R1-EMU:13/1/2'}, - 'site-id': '1', - }, - #'switch_dpid' : ??, # wan_switch_dpid - #'switch_port' : ??, # wan_switch_port - #'datacenter_id' : ??, # vim_account - }, - { - 'device-id' : 'dev-2', # pop_switch_dpid - #'device_interface_id' : ??, # pop_switch_port - 'service_endpoint_id' : 'ep-2', # wan_service_endpoint_id - 'service_mapping_info': { # wan_service_mapping_info, other extra info - 'bearer': {'bearer-reference': 'R2-EMU:13/1/2'}, - 'site-id': '2', - }, - #'switch_dpid' : ??, # wan_switch_dpid - #'switch_port' : ??, # wan_switch_port - #'datacenter_id' : ??, # vim_account - }, - { - 'device-id' : 'dev-3', # pop_switch_dpid - #'device_interface_id' : ??, # pop_switch_port - 'service_endpoint_id' : 'ep-3', # wan_service_endpoint_id - 'service_mapping_info': { # wan_service_mapping_info, other extra info - 'bearer': {'bearer-reference': 'R3-EMU:13/1/2'}, - 'site-id': '3', - }, - #'switch_dpid' : ??, # wan_switch_dpid - #'switch_port' : ??, # wan_switch_port - #'datacenter_id' : ??, # vim_account - }, - { - 'device-id' : 'dev-4', # pop_switch_dpid - #'device_interface_id' : ??, # pop_switch_port - 'service_endpoint_id' : 'ep-4', # wan_service_endpoint_id - 'service_mapping_info': { # wan_service_mapping_info, other extra info - 'bearer': {'bearer-reference': 'R4-EMU:13/1/2'}, - 'site-id': '4', - }, - #'switch_dpid' : ??, # wan_switch_dpid - #'switch_port' : ??, # wan_switch_port - #'datacenter_id' : ??, # vim_account - }, -] - -SERVICE_TYPE = 'ELINE' - -SERVICE_CONNECTION_POINTS_1 = [ - {'service_endpoint_id': 'ep-1', - 'service_endpoint_encapsulation_type': 'dot1q', - 'service_endpoint_encapsulation_info': {'vlan': 1234}}, - {'service_endpoint_id': 'ep-2', - 'service_endpoint_encapsulation_type': 'dot1q', - 'service_endpoint_encapsulation_info': {'vlan': 1234}}, -] - -SERVICE_CONNECTION_POINTS_2 = [ - {'service_endpoint_id': 'ep-3', - 'service_endpoint_encapsulation_type': 'dot1q', - 'service_endpoint_encapsulation_info': {'vlan': 1234}}, -] \ No newline at end of file diff --git a/src/ztp_server/tests/MockService_Dependencies.py b/src/ztp_server/tests/MockService_Dependencies.py deleted file mode 100755 index 322441367..000000000 --- a/src/ztp_server/tests/MockService_Dependencies.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 os -from typing import Union -from common.Constants import ServiceNameEnum -from common.Settings import ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name -from common.proto.context_pb2_grpc import add_ContextServiceServicer_to_server -from common.proto.service_pb2_grpc import add_ServiceServiceServicer_to_server -from common.proto.slice_pb2_grpc import add_SliceServiceServicer_to_server -from common.tests.MockServicerImpl_Context import MockServicerImpl_Context -from common.tests.MockServicerImpl_Service import MockServicerImpl_Service -from common.tests.MockServicerImpl_Slice import MockServicerImpl_Slice -from common.tools.service.GenericGrpcService import GenericGrpcService - -LOCAL_HOST = '127.0.0.1' - -SERVICE_CONTEXT = ServiceNameEnum.CONTEXT -SERVICE_SERVICE = ServiceNameEnum.SERVICE -SERVICE_SLICE = ServiceNameEnum.SLICE - -class MockService_Dependencies(GenericGrpcService): - # Mock Service implementing Context, Service and Slice to simplify unitary tests of NBI - - def __init__(self, bind_port: Union[str, int]) -> None: - super().__init__(bind_port, LOCAL_HOST, enable_health_servicer=False, cls_name='MockService') - - # pylint: disable=attribute-defined-outside-init - def install_servicers(self): - self.context_servicer = MockServicerImpl_Context() - add_ContextServiceServicer_to_server(self.context_servicer, self.server) - - self.service_servicer = MockServicerImpl_Service() - add_ServiceServiceServicer_to_server(self.service_servicer, self.server) - - self.slice_servicer = MockServicerImpl_Slice() - add_SliceServiceServicer_to_server(self.slice_servicer, self.server) - - def configure_env_vars(self): - os.environ[get_env_var_name(SERVICE_CONTEXT, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) - os.environ[get_env_var_name(SERVICE_CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) - - os.environ[get_env_var_name(SERVICE_SERVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) - os.environ[get_env_var_name(SERVICE_SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) - - os.environ[get_env_var_name(SERVICE_SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) - os.environ[get_env_var_name(SERVICE_SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) diff --git a/src/ztp_server/tests/PrepareTestScenario.py b/src/ztp_server/tests/PrepareTestScenario.py deleted file mode 100755 index a574f086b..000000000 --- a/src/ztp_server/tests/PrepareTestScenario.py +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 enum, logging, os, pytest, requests, time -from typing import Any, Dict, List, Optional, Set, Union -from common.Constants import ServiceNameEnum -from common.Settings import ( - ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_HTTP, - get_env_var_name, get_service_baseurl_http, get_service_port_http -) -from context.client.ContextClient import ContextClient -from nbi.service.rest_server.RestServer import RestServer -from nbi.service.rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api -from nbi.service.rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn -from nbi.service.rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn -from nbi.service.rest_server.nbi_plugins.ietf_network import register_ietf_network -from nbi.service.rest_server.nbi_plugins.tfs_api import register_tfs_api -from nbi.tests.MockService_Dependencies import MockService_Dependencies -from service.client.ServiceClient import ServiceClient -from slice.client.SliceClient import SliceClient -from tests.tools.mock_osm.MockOSM import MockOSM -from .Constants import USERNAME, PASSWORD, WIM_MAPPING - -LOCAL_HOST = '127.0.0.1' -MOCKSERVICE_PORT = 10000 -NBI_SERVICE_PORT = MOCKSERVICE_PORT + get_service_port_http(ServiceNameEnum.NBI) # avoid privileged ports -os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) -os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(NBI_SERVICE_PORT) - -@pytest.fixture(scope='session') -def mock_service(): - _service = MockService_Dependencies(MOCKSERVICE_PORT) - _service.configure_env_vars() - _service.start() - yield _service - _service.stop() - -@pytest.fixture(scope='session') -def nbi_service_rest(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument - _rest_server = RestServer() - register_etsi_bwm_api(_rest_server) - register_ietf_l2vpn(_rest_server) - register_ietf_l3vpn(_rest_server) - register_ietf_network(_rest_server) - register_tfs_api(_rest_server) - _rest_server.start() - time.sleep(1) # bring time for the server to start - yield _rest_server - _rest_server.shutdown() - _rest_server.join() - -@pytest.fixture(scope='session') -def osm_wim(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - wim_url = 'http://{:s}:{:d}'.format(LOCAL_HOST, NBI_SERVICE_PORT) - return MockOSM(wim_url, WIM_MAPPING, USERNAME, PASSWORD) - -@pytest.fixture(scope='session') -def context_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument - _client = ContextClient() - yield _client - _client.close() - -@pytest.fixture(scope='session') -def service_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument - _client = ServiceClient() - yield _client - _client.close() - -@pytest.fixture(scope='session') -def slice_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument - _client = SliceClient() - yield _client - _client.close() - -class RestRequestMethod(enum.Enum): - GET = 'get' - POST = 'post' - PUT = 'put' - PATCH = 'patch' - DELETE = 'delete' - -EXPECTED_STATUS_CODES : Set[int] = { - requests.codes['OK' ], - requests.codes['CREATED' ], - requests.codes['ACCEPTED' ], - requests.codes['NO_CONTENT'], -} - -def do_rest_request( - method : RestRequestMethod, url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - base_url = get_service_baseurl_http(ServiceNameEnum.NBI) or '' - request_url = 'http://{:s}:{:s}@{:s}:{:d}{:s}{:s}'.format( - USERNAME, PASSWORD, LOCAL_HOST, NBI_SERVICE_PORT, str(base_url), url - ) - if logger is not None: - msg = 'Request: {:s} {:s}'.format(str(method.value).upper(), str(request_url)) - if body is not None: msg += ' body={:s}'.format(str(body)) - logger.warning(msg) - reply = requests.request(method.value, request_url, timeout=timeout, json=body, allow_redirects=allow_redirects) - if logger is not None: - logger.warning('Reply: {:s}'.format(str(reply.text))) - assert reply.status_code in expected_status_codes, 'Reply failed with status code {:d}'.format(reply.status_code) - - if reply.content and len(reply.content) > 0: return reply.json() - return None - -def do_rest_get_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.GET, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) - -def do_rest_post_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.POST, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) - -def do_rest_put_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.PUT, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) - -def do_rest_patch_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.PATCH, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) - -def do_rest_delete_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.DELETE, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) diff --git a/src/ztp_server/tests/__init__.py b/src/ztp_server/tests/__init__.py deleted file mode 100755 index 53d5157f7..000000000 --- a/src/ztp_server/tests/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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/ztp_server/tests/data/ietf_acl.json b/src/ztp_server/tests/data/ietf_acl.json deleted file mode 100755 index 072df6d01..000000000 --- a/src/ztp_server/tests/data/ietf_acl.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "ietf-access-control-list": { - "acls": { - "acl": [ - { - "name": "sample-ipv4-acl", - "type": "ipv4-acl-type", - "aces": { - "ace": [ - { - "name": "rule1", - "matches": { - "ipv4": { - "dscp": 18, - "source-ipv4-network": "128.32.10.6/24", - "destination-ipv4-network": "172.10.33.0/24" - }, - "tcp": { - "flags": "syn", - "source-port": { - "port": 1444, - "operator": "eq" - }, - "destination-port": { - "port": 1333, - "operator": "eq" - } - } - }, - "actions": { - "forwarding": "drop" - } - } - ] - } - } - ], - "attachment-points": { - "interface": [ - { - "interface-id": "200", - "ingress": { - "acl-sets": { - "acl-set": [ - { - "name": "sample-ipv4-acl" - } - ] - } - } - } - ] - } - } - } -} diff --git a/src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json b/src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json deleted file mode 100755 index bfeb93fb7..000000000 --- a/src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json +++ /dev/null @@ -1,231 +0,0 @@ -{ - "ietf-l3vpn-svc:l3vpn-svc": { - "vpn-services": { - "vpn-service": [ - { - "vpn-id": "vpn1" - } - ] - }, - "sites": { - "site": [ - { - "site-id": "site_OLT", - "management": { - "type": "ietf-l3vpn-svc:provider-managed" - }, - "locations": { - "location": [ - { - "location-id": "OLT" - } - ] - }, - "devices": { - "device": [ - { - "device-id": "128.32.33.5", - "location": "OLT" - } - ] - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "128.32.10.1/24", - "lan-tag": "vlan21", - "next-hop": "128.32.33.2" - }, - { - "lan": "128.32.20.1/24", - "lan-tag": "vlan21", - "next-hop": "128.32.33.2" - } - ] - } - } - } - ] - }, - "site-network-accesses": { - "site-network-access": [ - { - "site-network-access-id": "500", - "site-network-access-type": "ietf-l3vpn-svc:multipoint", - "device-reference": "128.32.33.5", - "vpn-attachment": { - "vpn-id": "vpn1", - "site-role": "ietf-l3vpn-svc:spoke-role" - }, - "ip-connection": { - "ipv4": { - "address-allocation-type": "ietf-l3vpn-svc:static-address", - "addresses": { - "provider-address": "128.32.33.254", - "customer-address": "128.32.33.2", - "prefix-length": 24 - } - } - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "172.1.101.1/24", - "lan-tag": "vlan21", - "next-hop": "128.32.33.254" - } - ] - } - } - } - ] - }, - "service": { - "svc-mtu": 1500, - "svc-input-bandwidth": 1000000000, - "svc-output-bandwidth": 1000000000, - "qos": { - "qos-profile": { - "classes": { - "class": [ - { - "class-id": "qos-realtime", - "direction": "ietf-l3vpn-svc:both", - "latency": { - "latency-boundary": 10 - }, - "bandwidth": { - "guaranteed-bw-percent": 100 - } - } - ] - } - } - } - } - } - ] - } - }, - { - "site-id": "site_POP", - "management": { - "type": "ietf-l3vpn-svc:provider-managed" - }, - "locations": { - "location": [ - { - "location-id": "POP" - } - ] - }, - "devices": { - "device": [ - { - "device-id": "172.10.33.5", - "location": "POP" - } - ] - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "172.1.101.1/24", - "lan-tag": "vlan101", - "next-hop": "172.10.33.2" - } - ] - } - } - } - ] - }, - "site-network-accesses": { - "site-network-access": [ - { - "site-network-access-id": "500", - "site-network-access-type": "ietf-l3vpn-svc:multipoint", - "device-reference": "172.10.33.5", - "vpn-attachment": { - "vpn-id": "vpn1", - "site-role": "ietf-l3vpn-svc:hub-role" - }, - "ip-connection": { - "ipv4": { - "address-allocation-type": "ietf-l3vpn-svc:static-address", - "addresses": { - "provider-address": "172.10.33.254", - "customer-address": "172.10.33.2", - "prefix-length": 24 - } - } - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "128.32.10.1/24", - "lan-tag": "vlan101", - "next-hop": "172.10.33.254" - }, - { - "lan": "128.32.20.1/24", - "lan-tag": "vlan101", - "next-hop": "172.10.33.254" - } - ] - } - } - } - ] - }, - "service": { - "svc-mtu": 1500, - "svc-input-bandwidth": 1000000000, - "svc-output-bandwidth": 1000000000, - "qos": { - "qos-profile": { - "classes": { - "class": [ - { - "class-id": "qos-realtime", - "direction": "ietf-l3vpn-svc:both", - "latency": { - "latency-boundary": 10 - }, - "bandwidth": { - "guaranteed-bw-percent": 100 - } - } - ] - } - } - } - } - } - ] - } - } - ] - } - } -} \ No newline at end of file diff --git a/src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json b/src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json deleted file mode 100755 index 2cc512e59..000000000 --- a/src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json +++ /dev/null @@ -1,231 +0,0 @@ -{ - "ietf-l3vpn-svc:l3vpn-svc": { - "vpn-services": { - "vpn-service": [ - { - "vpn-id": "vpn2" - } - ] - }, - "sites": { - "site": [ - { - "site-id": "site_OLT", - "management": { - "type": "ietf-l3vpn-svc:provider-managed" - }, - "locations": { - "location": [ - { - "location-id": "OLT" - } - ] - }, - "devices": { - "device": [ - { - "device-id": "128.32.33.5", - "location": "OLT" - } - ] - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "128.32.10.1/24", - "lan-tag": "vlan31", - "next-hop": "128.32.33.2" - }, - { - "lan": "128.32.20.1/24", - "lan-tag": "vlan31", - "next-hop": "128.32.33.2" - } - ] - } - } - } - ] - }, - "site-network-accesses": { - "site-network-access": [ - { - "site-network-access-id": "500", - "site-network-access-type": "ietf-l3vpn-svc:multipoint", - "device-reference": "128.32.33.5", - "vpn-attachment": { - "vpn-id": "vpn2", - "site-role": "ietf-l3vpn-svc:spoke-role" - }, - "ip-connection": { - "ipv4": { - "address-allocation-type": "ietf-l3vpn-svc:static-address", - "addresses": { - "provider-address": "128.32.33.254", - "customer-address": "128.32.33.2", - "prefix-length": 24 - } - } - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "172.1.201.1/24", - "lan-tag": "vlan31", - "next-hop": "128.32.33.254" - } - ] - } - } - } - ] - }, - "service": { - "svc-mtu": 1500, - "svc-input-bandwidth": 1000000000, - "svc-output-bandwidth": 1000000000, - "qos": { - "qos-profile": { - "classes": { - "class": [ - { - "class-id": "qos-realtime", - "direction": "ietf-l3vpn-svc:both", - "latency": { - "latency-boundary": 10 - }, - "bandwidth": { - "guaranteed-bw-percent": 100 - } - } - ] - } - } - } - } - } - ] - } - }, - { - "site-id": "site_POP", - "management": { - "type": "ietf-l3vpn-svc:provider-managed" - }, - "locations": { - "location": [ - { - "location-id": "POP" - } - ] - }, - "devices": { - "device": [ - { - "device-id": "172.10.33.5", - "location": "POP" - } - ] - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "172.1.201.1/24", - "lan-tag": "vlan201", - "next-hop": "172.10.33.2" - } - ] - } - } - } - ] - }, - "site-network-accesses": { - "site-network-access": [ - { - "site-network-access-id": "500", - "site-network-access-type": "ietf-l3vpn-svc:multipoint", - "device-reference": "172.10.33.5", - "vpn-attachment": { - "vpn-id": "vpn2", - "site-role": "ietf-l3vpn-svc:hub-role" - }, - "ip-connection": { - "ipv4": { - "address-allocation-type": "ietf-l3vpn-svc:static-address", - "addresses": { - "provider-address": "172.10.33.254", - "customer-address": "172.10.33.2", - "prefix-length": 24 - } - } - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "128.32.10.1/24", - "lan-tag": "vlan201", - "next-hop": "172.10.33.254" - }, - { - "lan": "128.32.20.1/24", - "lan-tag": "vlan201", - "next-hop": "172.10.33.254" - } - ] - } - } - } - ] - }, - "service": { - "svc-mtu": 1500, - "svc-input-bandwidth": 1000000000, - "svc-output-bandwidth": 1000000000, - "qos": { - "qos-profile": { - "classes": { - "class": [ - { - "class-id": "qos-realtime", - "direction": "ietf-l3vpn-svc:both", - "latency": { - "latency-boundary": 10 - }, - "bandwidth": { - "guaranteed-bw-percent": 100 - } - } - ] - } - } - } - } - } - ] - } - } - ] - } - } -} \ No newline at end of file diff --git a/src/ztp_server/tests/data/test-ietf-network.json b/src/ztp_server/tests/data/test-ietf-network.json deleted file mode 100755 index 7643ef53a..000000000 --- a/src/ztp_server/tests/data/test-ietf-network.json +++ /dev/null @@ -1,1962 +0,0 @@ -{ - "ietf-network:networks": { - "network": [ - { - "network-id": "providerId-10-clientId-0-topologyId-1", - "ietf-te-topology:te": { - "name": "Huawei-Network" - }, - "ietf-te-topology:te-topology-identifier": { - "provider-id": 10, - "client-id": 0, - "topology-id": "1" - }, - "network-types": { - "ietf-te-topology:te-topology": { - "ietf-otn-topology:otn-topology": {} - } - }, - "node": [ - { - "node-id": "10.0.10.1", - "ietf-te-topology:te-node-id": "10.0.10.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - }, - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "OA" - }, - "tunnel-termination-point": [ - { - "tunnel-tp-id": "NTAx", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "501" - } - ] - } - }, - { - "tunnel-tp-id": "NTAw", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "500" - } - ] - } - } - ] - } - }, - { - "node-id": "10.0.20.1", - "ietf-te-topology:te-node-id": "10.0.20.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - }, - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "P" - }, - "tunnel-termination-point": [ - { - "tunnel-tp-id": "NTAx", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "501" - } - ] - } - }, - { - "tunnel-tp-id": "NTAw", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "500" - } - ] - } - } - ] - } - }, - { - "node-id": "10.0.40.1", - "ietf-te-topology:te-node-id": "10.0.40.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - }, - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "P" - }, - "tunnel-termination-point": [ - { - "tunnel-tp-id": "NTAw", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "500" - } - ] - } - }, - { - "tunnel-tp-id": "NTAx", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "501" - } - ] - } - } - ] - } - }, - { - "node-id": "10.0.30.1", - "ietf-te-topology:te-node-id": "10.0.30.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - }, - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "OE" - }, - "tunnel-termination-point": [ - { - "tunnel-tp-id": "NTAw", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "500" - } - ] - } - }, - { - "tunnel-tp-id": "NTAx", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "501" - } - ] - } - } - ] - } - } - ], - "ietf-network-topology:link": [ - { - "link-id": "10.0.10.1-501", - "source": { - "source-node": "10.0.10.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.20.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.10.1-501", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.10.1-500", - "source": { - "source-node": "10.0.10.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.40.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.10.1-500", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.20.1-501", - "source": { - "source-node": "10.0.20.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.10.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.20.1-501", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.20.1-500", - "source": { - "source-node": "10.0.20.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.30.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.20.1-500", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.40.1-500", - "source": { - "source-node": "10.0.40.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.10.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.40.1-500", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.40.1-501", - "source": { - "source-node": "10.0.40.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.30.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.40.1-501", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.30.1-500", - "source": { - "source-node": "10.0.30.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.20.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.30.1-500", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.30.1-501", - "source": { - "source-node": "10.0.30.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.40.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.30.1-501", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - } - ] - }, - { - "network-id": "providerId-10-clientId-0-topologyId-2", - "ietf-te-topology:te": { - "name": "Huawei-Network" - }, - "ietf-te-topology:te-topology-identifier": { - "provider-id": 10, - "client-id": 0, - "topology-id": "2" - }, - "network-types": { - "ietf-te-topology:te-topology": { - "ietf-eth-te-topology:eth-tran-topology": {} - } - }, - "node": [ - { - "node-id": "10.0.10.1", - "ietf-te-topology:te-node-id": "10.0.10.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "200", - "ietf-te-topology:te-tp-id": "128.32.33.254", - "ietf-eth-te-topology:eth-svc": { - "client-facing": true, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "OA" - } - } - }, - { - "node-id": "10.0.20.1", - "ietf-te-topology:te-node-id": "10.0.20.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "P" - } - } - }, - { - "node-id": "10.0.40.1", - "ietf-te-topology:te-node-id": "10.0.40.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "P" - } - } - }, - { - "node-id": "10.0.30.1", - "ietf-te-topology:te-node-id": "10.0.30.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "200", - "ietf-te-topology:te-tp-id": "172.10.33.254", - "ietf-eth-te-topology:eth-svc": { - "client-facing": true, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "OE" - } - } - }, - { - "node-id": "128.32.33.5", - "ietf-te-topology:te-node-id": "128.32.33.5", - "ietf-network-topology:termination-point": [ - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": "128.32.33.2", - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "200", - "ietf-te-topology:te-tp-id": 200, - "ietf-eth-te-topology:eth-svc": { - "client-facing": true, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - } - }, - { - "tp-id": "201", - "ietf-te-topology:te-tp-id": 201, - "ietf-eth-te-topology:eth-svc": { - "client-facing": true, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "OLT", - "connectivity-matrices": { - "label-restrictions": { - "label-restriction": [ - { - "index": 0, - "label-start": { - "te-label": { - "ietf-eth-te-topology:vlanid": 21 - } - }, - "label-end": { - "te-label": { - "ietf-eth-te-topology:vlanid": 21 - } - } - }, - { - "index": 1, - "label-start": { - "te-label": { - "ietf-eth-te-topology:vlanid": 31 - } - }, - "label-end": { - "te-label": { - "ietf-eth-te-topology:vlanid": 31 - } - } - } - ] - } - } - } - } - }, - { - "node-id": "128.32.10.1", - "ietf-te-topology:te-node-id": "128.32.10.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - } - }, - { - "tp-id": "200", - "ietf-te-topology:te-tp-id": 200, - "ietf-eth-te-topology:eth-svc": { - "client-facing": true, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "ONT1" - } - } - }, - { - "node-id": "128.32.20.1", - "ietf-te-topology:te-node-id": "128.32.20.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - } - }, - { - "tp-id": "200", - "ietf-te-topology:te-tp-id": 200, - "ietf-eth-te-topology:eth-svc": { - "client-facing": true, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "ONT2" - } - } - } - ], - "ietf-network-topology:link": [ - { - "link-id": "10.0.10.1-200", - "source": { - "source-node": "10.0.10.1", - "source-tp": "200" - }, - "destination": { - "dest-node": "128.32.33.5", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.10.1-200", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "128.32.33.5-500", - "source": { - "source-node": "128.32.33.5", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.10.1", - "dest-tp": "200" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "128.32.33.5-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.10.1-501", - "source": { - "source-node": "10.0.10.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.20.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.10.1-501", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.10.1-500", - "source": { - "source-node": "10.0.10.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.40.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.10.1-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.20.1-501", - "source": { - "source-node": "10.0.20.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.10.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.20.1-501", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.20.1-500", - "source": { - "source-node": "10.0.20.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.30.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.20.1-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.40.1-501", - "source": { - "source-node": "10.0.40.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.30.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.40.1-501", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.40.1-500", - "source": { - "source-node": "10.0.40.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.10.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.40.1-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.30.1-501", - "source": { - "source-node": "10.0.30.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.40.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.30.1-501", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.30.1-500", - "source": { - "source-node": "10.0.30.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.20.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.30.1-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "128.32.33.5-200", - "source": { - "source-node": "128.32.33.5", - "source-tp": "200" - }, - "destination": { - "dest-node": "128.32.10.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "128.32.33.5-200", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "128.32.10.1-500", - "source": { - "source-node": "128.32.10.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "128.32.33.5", - "dest-tp": "200" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "128.32.10.1-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "128.32.33.5-201", - "source": { - "source-node": "128.32.33.5", - "source-tp": "201" - }, - "destination": { - "dest-node": "128.32.20.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "128.32.33.5-201", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "128.32.20.1-500", - "source": { - "source-node": "128.32.20.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "128.32.33.5", - "dest-tp": "201" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "128.32.20.1-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - } - ] - } - ] - } -} \ No newline at end of file diff --git a/src/ztp_server/tests/data/tfs_api_dummy.json b/src/ztp_server/tests/data/tfs_api_dummy.json deleted file mode 100755 index d8f513757..000000000 --- a/src/ztp_server/tests/data/tfs_api_dummy.json +++ /dev/null @@ -1,442 +0,0 @@ -{ - "dummy_mode": true, - "contexts": [ - { - "context_id": {"context_uuid": {"uuid": "admin"}}, - "name": "admin", - "topology_ids": [ - {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - ], - "service_ids": [ - {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, - {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, - {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}} - ], - "slice_ids": [ - {"context_id": {"context_uuid": {"uuid": "admin"}}, "slice_uuid": {"uuid": "SLC:R1-R2-R3"}} - ] - } - ], - "topologies": [ - { - "device_ids": [ - {"device_uuid": {"uuid": "R1"}}, - {"device_uuid": {"uuid": "R2"}}, - {"device_uuid": {"uuid": "R3"}} - ], - "link_ids": [ - {"link_uuid": {"uuid": "R1/502==R2/501"}}, - {"link_uuid": {"uuid": "R1/503==R3/501"}}, - {"link_uuid": {"uuid": "R2/501==R1/502"}}, - {"link_uuid": {"uuid": "R2/503==R3/502"}}, - {"link_uuid": {"uuid": "R3/501==R1/503"}}, - {"link_uuid": {"uuid": "R3/502==R2/503"}} - ], - "name": "admin", - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "devices": [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "name": "R1", "device_type": "emu-packet-router", - "device_drivers": [0], "device_operational_status": 2, - "device_endpoints": [ - {"name": "200", "endpoint_type": "copper", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"name": "502", "endpoint_type": "optical", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"name": "503", "endpoint_type": "optical", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }} - ], - "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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "502", "name": "502", "type": "optical"}, - {"uuid": "503", "name": "503", "type": "optical"} - ]}}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { - "uuid": "200", "name": "200", "type": "copper" - }}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[502]", "resource_value": { - "uuid": "502", "name": "502", "type": "optical" - }}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { - "uuid": "503", "name": "503", "type": "optical" - }}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "name": "R2", "device_type": "emu-packet-router", - "device_drivers": [0], "device_operational_status": 2, - "device_endpoints": [ - {"name": "200", "endpoint_type": "copper", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"name": "501", "endpoint_type": "optical", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"name": "503", "endpoint_type": "optical", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }} - ], - "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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "501", "name": "501", "type": "optical"}, - {"uuid": "503", "name": "503", "type": "optical"} - ]}}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { - "uuid": "200", "name": "200", "type": "copper" - }}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[501]", "resource_value": { - "uuid": "501", "name": "501", "type": "optical" - }}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { - "uuid": "503", "name": "503", "type": "optical" - }}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "name": "R3", "device_type": "emu-packet-router", - "device_drivers": [0], "device_operational_status": 2, - "device_endpoints": [ - {"name": "200", "endpoint_type": "copper", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"name": "502", "endpoint_type": "optical", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"name": "503", "endpoint_type": "optical", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }} - ], - "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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "502", "name": "502", "type": "optical"}, - {"uuid": "503", "name": "503", "type": "optical"} - ]}}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { - "uuid": "200", "name": "200", "type": "copper" - }}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[502]", "resource_value": { - "uuid": "502", "name": "502", "type": "optical" - }}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { - "uuid": "503", "name": "503", "type": "optical" - }}} - ]} - } - ], - "links": [ - { - "link_id": {"link_uuid": {"uuid": "R1/502==R2/501"}}, "name": "R1/502==R2/501", - "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, - "link_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ] - }, - { - "link_id": {"link_uuid": {"uuid": "R1/503==R3/501"}}, "name": "R1/503==R3/501", - "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, - "link_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ] - }, - { - "link_id": {"link_uuid": {"uuid": "R2/501==R1/502"}}, "name": "R2/501==R1/502", - "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, - "link_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ] - }, - { - "link_id": {"link_uuid": {"uuid": "R2/503==R3/502"}}, "name": "R2/503==R3/502", - "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, - "link_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ] - }, - { - "link_id": {"link_uuid": {"uuid": "R3/501==R1/503"}}, "name": "R3/501==R1/503", - "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, - "link_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ] - }, - { - "link_id": {"link_uuid": {"uuid": "R3/502==R2/503"}}, "name": "R3/502==R2/503", - "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, - "link_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ] - } - ], - "services": [ - { - "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, - "name": "SVC:R1/200==R2/200", "service_type": 1, "service_status": {"service_status": 1}, - "service_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "service_constraints": [ - {"action": 1, "sla_capacity": {"capacity_gbps": 40.0}}, - {"action": 1, "sla_latency": {"e2e_latency_ms": 10.0}}, - {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.99}} - ], - "service_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 - }}}, - {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 - }}} - ]} - }, - { - "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, - "name": "SVC:R1/200==R3/200", "service_type": 1, "service_status": {"service_status": 1}, - "service_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "service_constraints": [ - {"action": 1, "sla_capacity": {"capacity_gbps": 50.0}}, - {"action": 1, "sla_latency": {"e2e_latency_ms": 8.0}}, - {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.9}} - ], - "service_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 - }}}, - {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 - }}} - ]} - }, - { - "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}}, - "name": "SVC:R2/200==R3/200", "service_type": 1, "service_status": {"service_status": 1}, - "service_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "service_constraints": [ - {"action": 1, "sla_capacity": {"capacity_gbps": 10.0}}, - {"action": 1, "sla_latency": {"e2e_latency_ms": 3.0}}, - {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.9999}} - ], - "service_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 - }}}, - {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 - }}} - ]} - } - ], - "slices": [ - { - "slice_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "slice_uuid": {"uuid": "SLC:R1-R2-R3"}}, - "name": "SLC:R1-R2-R3", - "slice_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "slice_constraints": [ - {"action": 1, "sla_capacity": {"capacity_gbps": 40.0}}, - {"action": 1, "sla_latency": {"e2e_latency_ms": 10.0}}, - {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.99}} - ], - "slice_service_ids": [ - {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, - {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, - {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}} - ], - "slice_subslice_ids": [], - "slice_status": {"slice_status" : 1}, - "slice_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 - }}}, - {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 - }}}, - {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 - }}} - ]}, - "slice_owner": {"owner_uuid": {"uuid": "TFS"}, "owner_string": "TFS:SLC:R1-R2-R3"} - } - ], - "connections": [ - { - "connection_id": {"connection_uuid": {"uuid": "CON:R1/200==R2/200:1"}}, - "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, - "path_hops_endpoint_ids" : [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "sub_service_ids": [], - "settings": { - "l3": {"src_ip_address": "10.0.1.10", "dst_ip_address": "10.0.2.10", "ttl": 20} - } - }, - { - "connection_id": {"connection_uuid": {"uuid": "CON:R1/200==R3/200:1"}}, - "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, - "path_hops_endpoint_ids" : [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "sub_service_ids": [], - "settings": { - "l3": {"src_ip_address": "10.0.1.10", "dst_ip_address": "10.0.3.10", "ttl": 20} - } - }, - { - "connection_id": {"connection_uuid": {"uuid": "CON:R2/200==R3/200:1"}}, - "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}}, - "path_hops_endpoint_ids" : [ - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "sub_service_ids": [], - "settings": { - "l3": {"src_ip_address": "10.0.2.10", "dst_ip_address": "10.0.3.10", "ttl": 20} - } - } - ] -} diff --git a/src/ztp_server/tests/data/topology-7router-emu-dummy.json b/src/ztp_server/tests/data/topology-7router-emu-dummy.json deleted file mode 100755 index 3bb622626..000000000 --- a/src/ztp_server/tests/data/topology-7router-emu-dummy.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "dummy_mode": true, - "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": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, - {"uuid": "1/3", "type": "copper"}, {"uuid": "2/1", "type": "copper"}, - {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"}, - {"uuid": "2/4", "type": "copper"}, {"uuid": "2/5", "type": "copper"}, - {"uuid": "2/6", "type": "copper"} - ]}}} - ]}} - ], - "links": [ - {"link_id": {"link_uuid": {"uuid": "R1==R2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R1==R6"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R1==R7"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R2==R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R2==R3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R3==R2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R3==R4"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R3==R7"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R4==R3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R4==R5"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R5==R4"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R5==R6"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R5==R7"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R6==R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R6==R5"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R7==R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R7==R3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R7==R5"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]} - ] -} diff --git a/src/ztp_server/tests/data/topology-7router-emu.json b/src/ztp_server/tests/data/topology-7router-emu.json deleted file mode 100755 index 4174f4fb4..000000000 --- a/src/ztp_server/tests/data/topology-7router-emu.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "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": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, - {"uuid": "1/3", "type": "copper"}, {"uuid": "2/1", "type": "copper"}, - {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"}, - {"uuid": "2/4", "type": "copper"}, {"uuid": "2/5", "type": "copper"}, - {"uuid": "2/6", "type": "copper"} - ]}}} - ]}} - ], - "links": [ - {"link_id": {"link_uuid": {"uuid": "R1==R2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R1==R6"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R1==R7"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R2==R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R2==R3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R3==R2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R3==R4"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R3==R7"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R4==R3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R4==R5"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R5==R4"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R5==R6"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R5==R7"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R6==R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R6==R5"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R7==R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R7==R3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R7==R5"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]} - ] -} diff --git a/src/ztp_server/tests/data/topology-dummy.json b/src/ztp_server/tests/data/topology-dummy.json deleted file mode 100755 index f066051ee..000000000 --- a/src/ztp_server/tests/data/topology-dummy.json +++ /dev/null @@ -1,3134 +0,0 @@ -{ - "contexts": [ - { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "name": "admin", - "service_ids": [], - "slice_ids": [], - "topology_ids": [ - { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - ] - } - ], - "devices": [ - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - }, - { - "name": "200", - "type": "copper", - "uuid": "200" - }, - { - "name": "500", - "type": "optical", - "uuid": "500" - }, - { - "name": "501", - "type": "optical", - "uuid": "501" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[mgmt]", - "resource_value": { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[200]", - "resource_value": { - "name": "200", - "type": "copper", - "uuid": "200" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "optical", - "uuid": "500" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[501]", - "resource_value": { - "name": "501", - "type": "optical", - "uuid": "501" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "200" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "501" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "b72983bd-57d8-5cf8-8ec7-da9084382d7a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "mgmt", - "kpi_sample_types": [], - "name": "mgmt" - } - ], - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "device_operational_status": 2, - "device_type": "emu-packet-router", - "name": "10.0.30.1" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "200", - "type": "copper", - "uuid": "200" - }, - { - "name": "500", - "type": "copper", - "uuid": "500" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[200]", - "resource_value": { - "name": "200", - "type": "copper", - "uuid": "200" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "copper", - "uuid": "500" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "endpoint_uuid": { - "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "200" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "endpoint_uuid": { - "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "500" - } - ], - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "device_operational_status": 2, - "device_type": "emu-packet-router", - "name": "128.32.10.1" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "200", - "type": "copper", - "uuid": "200" - }, - { - "name": "201", - "type": "copper", - "uuid": "201" - }, - { - "name": "500", - "type": "copper", - "uuid": "500" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[200]", - "resource_value": { - "name": "200", - "type": "copper", - "uuid": "200" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[201]", - "resource_value": { - "name": "201", - "type": "copper", - "uuid": "201" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "copper", - "uuid": "500" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - "endpoint_uuid": { - "uuid": "227b6bb2-dacf-5b3d-84e9-c1d0c107bcd8" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "201" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - "endpoint_uuid": { - "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - "endpoint_uuid": { - "uuid": "d8528b70-9215-59ed-851d-b9590ab0c94b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "200" - } - ], - "device_id": { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - "device_operational_status": 2, - "device_type": "emu-datacenter", - "name": "172.10.33.5" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - }, - { - "name": "500", - "type": "optical", - "uuid": "500" - }, - { - "name": "501", - "type": "optical", - "uuid": "501" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[mgmt]", - "resource_value": { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "optical", - "uuid": "500" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[501]", - "resource_value": { - "name": "501", - "type": "optical", - "uuid": "501" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "501" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "ede34dea-6b51-5787-88d2-553fe548f540" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "mgmt", - "kpi_sample_types": [], - "name": "mgmt" - } - ], - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "device_operational_status": 2, - "device_type": "emu-packet-router", - "name": "10.0.40.1" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "200", - "type": "copper", - "uuid": "200" - }, - { - "name": "201", - "type": "copper", - "uuid": "201" - }, - { - "name": "500", - "type": "copper", - "uuid": "500" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[200]", - "resource_value": { - "name": "200", - "type": "copper", - "uuid": "200" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[201]", - "resource_value": { - "name": "201", - "type": "copper", - "uuid": "201" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "copper", - "uuid": "500" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "201" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "c6435612-3aca-590f-89ba-e606f54df474" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "200" - } - ], - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "device_operational_status": 2, - "device_type": "emu-optical-transponder", - "name": "128.32.33.5" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - }, - { - "name": "200", - "type": "copper", - "uuid": "200" - }, - { - "name": "500", - "type": "optical", - "uuid": "500" - }, - { - "name": "501", - "type": "optical", - "uuid": "501" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[mgmt]", - "resource_value": { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[200]", - "resource_value": { - "name": "200", - "type": "copper", - "uuid": "200" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "optical", - "uuid": "500" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[501]", - "resource_value": { - "name": "501", - "type": "optical", - "uuid": "501" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "59e1e30f-ea65-5e04-8a91-760a648a02c6" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "mgmt", - "kpi_sample_types": [], - "name": "mgmt" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "70cbb732-8149-59ee-939b-011828e4292b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "200" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "501" - } - ], - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "device_operational_status": 2, - "device_type": "emu-packet-router", - "name": "10.0.10.1" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - }, - { - "name": "500", - "type": "optical", - "uuid": "500" - }, - { - "name": "501", - "type": "optical", - "uuid": "501" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[mgmt]", - "resource_value": { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "optical", - "uuid": "500" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[501]", - "resource_value": { - "name": "501", - "type": "optical", - "uuid": "501" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "501" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "356378dd-952b-5032-912d-37fc21284b4c" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "da826790-a4b0-5317-b30b-e1370918a644" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "mgmt", - "kpi_sample_types": [], - "name": "mgmt" - } - ], - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "device_operational_status": 2, - "device_type": "emu-packet-router", - "name": "10.0.20.1" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "eth1", - "type": "copper", - "uuid": "eth1" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[eth1]", - "resource_value": { - "name": "eth1", - "type": "copper", - "uuid": "eth1" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" - } - }, - "endpoint_uuid": { - "uuid": "0701f406-633f-53e7-a44d-c93384745df8" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "eth1" - } - ], - "device_id": { - "device_uuid": { - "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" - } - }, - "device_operational_status": 2, - "device_type": "emu-client", - "name": "128.32.20.5" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "200", - "type": "copper", - "uuid": "200" - }, - { - "name": "500", - "type": "copper", - "uuid": "500" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[200]", - "resource_value": { - "name": "200", - "type": "copper", - "uuid": "200" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "copper", - "uuid": "500" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "endpoint_uuid": { - "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "endpoint_uuid": { - "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "200" - } - ], - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "device_operational_status": 2, - "device_type": "emu-packet-router", - "name": "128.32.20.1" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "eth1", - "type": "copper", - "uuid": "eth1" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[eth1]", - "resource_value": { - "name": "eth1", - "type": "copper", - "uuid": "eth1" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" - } - }, - "endpoint_uuid": { - "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "eth1" - } - ], - "device_id": { - "device_uuid": { - "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" - } - }, - "device_operational_status": 2, - "device_type": "emu-client", - "name": "128.32.10.5" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[mgmt]", - "resource_value": { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - }, - "endpoint_uuid": { - "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "mgmt", - "kpi_sample_types": [], - "name": "mgmt" - } - ], - "device_id": { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - }, - "device_operational_status": 2, - "device_type": "emu-open-line-system", - "name": "nce-t" - } - ], - "dummy_mode": true, - "links": [ - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "70cbb732-8149-59ee-939b-011828e4292b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "0b3d5943-c2bf-595f-a805-dc29c2be2f52" - } - }, - "name": "10.0.10.1-200" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "1490e70f-472c-5e4c-8280-21c48ed03477" - } - }, - "name": "10.0.40.1-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "endpoint_uuid": { - "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "c6435612-3aca-590f-89ba-e606f54df474" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "18ba8eb2-342b-5a73-aeae-7288ea9bb28b" - } - }, - "name": "128.32.10.1-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "endpoint_uuid": { - "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" - } - }, - "endpoint_uuid": { - "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "1901b0dc-1b5e-5fdf-b9ac-9168787464c1" - } - }, - "name": "128.32.10.1-200" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "70cbb732-8149-59ee-939b-011828e4292b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "1afdae8b-a281-53aa-99c2-205afb8f4ee7" - } - }, - "name": "128.32.33.5-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "356378dd-952b-5032-912d-37fc21284b4c" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "30ca0f8f-b150-57f2-ae5e-8a6844944783" - } - }, - "name": "10.0.20.1-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "34c9c6c3-0dcf-54e5-ba67-da33eb2d3c1a" - } - }, - "name": "10.0.20.1-501" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "356378dd-952b-5032-912d-37fc21284b4c" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "35801e61-45f3-564e-ad5c-09baf4aae906" - } - }, - "name": "10.0.30.1-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - "endpoint_uuid": { - "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "36643dba-e8fa-5fb7-952d-dff313db957b" - } - }, - "name": "172.10.33.5-500" - }, - { - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - }, - "endpoint_uuid": { - "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "ede34dea-6b51-5787-88d2-553fe548f540" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "36856920-3387-5384-b1b1-dbc9e54da226" - } - }, - "name": "nce-t/mgmt==10.0.40.1/mgmt" - }, - { - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - }, - "endpoint_uuid": { - "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "b72983bd-57d8-5cf8-8ec7-da9084382d7a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "46ba12f9-dd17-5f2a-9558-e4611515a6b9" - } - }, - "name": "nce-t/mgmt==10.0.30.1/mgmt" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "4dfe28dd-ac28-53d5-b330-1707e350d772" - } - }, - "name": "10.0.30.1-501" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "endpoint_uuid": { - "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "644ab377-572c-53a4-8ab5-f5cf45591d88" - } - }, - "name": "128.32.20.1-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "c6435612-3aca-590f-89ba-e606f54df474" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "endpoint_uuid": { - "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "661ac531-4309-58cc-b70e-2a79492c2488" - } - }, - "name": "128.32.33.5-200" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "endpoint_uuid": { - "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "6a236e01-853c-51d0-8915-2d09b45923b0" - } - }, - "name": "128.32.33.5-201" - }, - { - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - }, - "endpoint_uuid": { - "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "da826790-a4b0-5317-b30b-e1370918a644" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "6c802ae7-59d1-55e7-9498-146c465bcab5" - } - }, - "name": "nce-t/mgmt==10.0.20.1/mgmt" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "endpoint_uuid": { - "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" - } - }, - "endpoint_uuid": { - "uuid": "0701f406-633f-53e7-a44d-c93384745df8" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "6fa77ad9-e4d7-5830-bf84-ab206eff613a" - } - }, - "name": "128.32.20.1-200" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - "endpoint_uuid": { - "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "808b54e8-3d5a-5e03-a42e-d6c2a57cf6f3" - } - }, - "name": "10.0.30.1-200" - }, - { - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - }, - "endpoint_uuid": { - "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "59e1e30f-ea65-5e04-8a91-760a648a02c6" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "85a18715-3ce0-57f9-8025-5634fe622a06" - } - }, - "name": "nce-t/mgmt==10.0.10.1/mgmt" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "8e8d1a2b-beae-5624-8826-9235bd73a3a8" - } - }, - "name": "10.0.40.1-501" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "e9c5b57e-de50-509c-9f5a-0107ff233703" - } - }, - "name": "10.0.10.1-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" - } - }, - "endpoint_uuid": { - "uuid": "0701f406-633f-53e7-a44d-c93384745df8" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "endpoint_uuid": { - "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "effca6e0-acf3-5c02-ba9a-d82c17a3f006" - } - }, - "name": "128.32.20.5-eth1" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "f45b4432-4ae2-5719-b4e8-a5e8baa1ccd2" - } - }, - "name": "10.0.10.1-501" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" - } - }, - "endpoint_uuid": { - "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "endpoint_uuid": { - "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "fd005f34-39f5-550e-b2c0-c6e6f8c16325" - } - }, - "name": "128.32.10.5-eth1" - } - ], - "topologies": [ - { - "device_ids": [ - { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - { - "device_uuid": { - "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" - } - }, - { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - { - "device_uuid": { - "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" - } - }, - { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - } - ], - "link_ids": [ - { - "link_uuid": { - "uuid": "0b3d5943-c2bf-595f-a805-dc29c2be2f52" - } - }, - { - "link_uuid": { - "uuid": "1490e70f-472c-5e4c-8280-21c48ed03477" - } - }, - { - "link_uuid": { - "uuid": "18ba8eb2-342b-5a73-aeae-7288ea9bb28b" - } - }, - { - "link_uuid": { - "uuid": "1901b0dc-1b5e-5fdf-b9ac-9168787464c1" - } - }, - { - "link_uuid": { - "uuid": "1afdae8b-a281-53aa-99c2-205afb8f4ee7" - } - }, - { - "link_uuid": { - "uuid": "30ca0f8f-b150-57f2-ae5e-8a6844944783" - } - }, - { - "link_uuid": { - "uuid": "34c9c6c3-0dcf-54e5-ba67-da33eb2d3c1a" - } - }, - { - "link_uuid": { - "uuid": "35801e61-45f3-564e-ad5c-09baf4aae906" - } - }, - { - "link_uuid": { - "uuid": "36643dba-e8fa-5fb7-952d-dff313db957b" - } - }, - { - "link_uuid": { - "uuid": "36856920-3387-5384-b1b1-dbc9e54da226" - } - }, - { - "link_uuid": { - "uuid": "46ba12f9-dd17-5f2a-9558-e4611515a6b9" - } - }, - { - "link_uuid": { - "uuid": "4dfe28dd-ac28-53d5-b330-1707e350d772" - } - }, - { - "link_uuid": { - "uuid": "644ab377-572c-53a4-8ab5-f5cf45591d88" - } - }, - { - "link_uuid": { - "uuid": "661ac531-4309-58cc-b70e-2a79492c2488" - } - }, - { - "link_uuid": { - "uuid": "6a236e01-853c-51d0-8915-2d09b45923b0" - } - }, - { - "link_uuid": { - "uuid": "6c802ae7-59d1-55e7-9498-146c465bcab5" - } - }, - { - "link_uuid": { - "uuid": "6fa77ad9-e4d7-5830-bf84-ab206eff613a" - } - }, - { - "link_uuid": { - "uuid": "808b54e8-3d5a-5e03-a42e-d6c2a57cf6f3" - } - }, - { - "link_uuid": { - "uuid": "85a18715-3ce0-57f9-8025-5634fe622a06" - } - }, - { - "link_uuid": { - "uuid": "8e8d1a2b-beae-5624-8826-9235bd73a3a8" - } - }, - { - "link_uuid": { - "uuid": "e9c5b57e-de50-509c-9f5a-0107ff233703" - } - }, - { - "link_uuid": { - "uuid": "effca6e0-acf3-5c02-ba9a-d82c17a3f006" - } - }, - { - "link_uuid": { - "uuid": "f45b4432-4ae2-5719-b4e8-a5e8baa1ccd2" - } - }, - { - "link_uuid": { - "uuid": "fd005f34-39f5-550e-b2c0-c6e6f8c16325" - } - } - ], - "name": "admin", - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ] -} \ No newline at end of file diff --git a/src/ztp_server/tests/data/topology-real.json b/src/ztp_server/tests/data/topology-real.json deleted file mode 100755 index bb158d920..000000000 --- a/src/ztp_server/tests/data/topology-real.json +++ /dev/null @@ -1,259 +0,0 @@ -{ - "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": "nce-t"}}, "name": "nce-t", "device_type": "emu-open-line-system", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "mgmt", "name": "mgmt", "type": "mgmt"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "name": "10.0.10.1", "device_type": "emu-packet-router", - "controller_id": {"device_uuid": {"uuid": "nce-t"}}, - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, - {"uuid": "200", "name": "200", "type": "copper" }, - {"uuid": "500", "name": "500", "type": "optical"}, - {"uuid": "501", "name": "501", "type": "optical"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "name": "10.0.20.1", "device_type": "emu-packet-router", - "controller_id": {"device_uuid": {"uuid": "nce-t"}}, - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, - {"uuid": "500", "name": "500", "type": "optical"}, - {"uuid": "501", "name": "501", "type": "optical"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "name": "10.0.30.1", "device_type": "emu-packet-router", - "controller_id": {"device_uuid": {"uuid": "nce-t"}}, - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, - {"uuid": "200", "name": "200", "type": "copper" }, - {"uuid": "500", "name": "500", "type": "optical"}, - {"uuid": "501", "name": "501", "type": "optical"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "name": "10.0.40.1", "device_type": "emu-packet-router", - "controller_id": {"device_uuid": {"uuid": "nce-t"}}, - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, - {"uuid": "500", "name": "500", "type": "optical"}, - {"uuid": "501", "name": "501", "type": "optical"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "name": "128.32.10.5", "device_type": "emu-client", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "eth1", "name": "eth1", "type": "copper"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "name": "128.32.10.1", "device_type": "emu-packet-router", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "500", "name": "500", "type": "copper"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "name": "128.32.20.5", "device_type": "emu-client", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "eth1", "name": "eth1", "type": "copper"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "name": "128.32.20.1", "device_type": "emu-packet-router", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "500", "name": "500", "type": "copper"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "name": "128.32.33.5", "device_type": "emu-optical-transponder", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "201", "name": "201", "type": "copper"}, - {"uuid": "500", "name": "500", "type": "copper"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "name": "172.10.33.5", "device_type": "emu-datacenter", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "201", "name": "201", "type": "copper"}, - {"uuid": "500", "name": "500", "type": "copper"} - ]}}} - ]}} - ], - - "links": [ - {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.10.1/mgmt"}}, "name": "nce-t/mgmt==10.0.10.1/mgmt", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.20.1/mgmt"}}, "name": "nce-t/mgmt==10.0.20.1/mgmt", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.30.1/mgmt"}}, "name": "nce-t/mgmt==10.0.30.1/mgmt", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.40.1/mgmt"}}, "name": "nce-t/mgmt==10.0.40.1/mgmt", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "10.0.10.1-501"}}, "name": "10.0.10.1-501", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "501"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "501"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "10.0.20.1-501"}}, "name": "10.0.20.1-501", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "501"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "501"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "10.0.10.1-500"}}, "name": "10.0.10.1-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "10.0.40.1-500"}}, "name": "10.0.40.1-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "10.0.20.1-500"}}, "name": "10.0.20.1-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "10.0.30.1-500"}}, "name": "10.0.30.1-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "10.0.40.1-501"}}, "name": "10.0.40.1-501", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "501"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "501"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "10.0.30.1-501"}}, "name": "10.0.30.1-501", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "501"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "501"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "128.32.10.5-eth1"}}, "name": "128.32.10.5-eth1", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "200" }} - ]}, - {"link_id": {"link_uuid": {"uuid": "128.32.10.1-200"}}, "name": "128.32.10.1-200", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "200" }}, - {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "endpoint_uuid": {"uuid": "eth1"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "128.32.10.1-500"}}, "name": "128.32.10.1-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "200"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "128.32.33.5-200"}}, "name": "128.32.33.5-200", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "200"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "128.32.20.5-eth1"}}, "name": "128.32.20.5-eth1", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "200" }} - ]}, - {"link_id": {"link_uuid": {"uuid": "128.32.20.1-200"}}, "name": "128.32.20.1-200", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "200" }}, - {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "endpoint_uuid": {"uuid": "eth1"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "128.32.20.1-500"}}, "name": "128.32.20.1-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "201"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "128.32.33.5-201"}}, "name": "128.32.33.5-201", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "201"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "128.32.33.5-500"}}, "name": "128.32.33.5-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "200"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "10.0.10.1-200"}}, "name": "10.0.10.1-200", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "200"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "172.10.33.5-500"}}, "name": "172.10.33.5-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "200"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "10.0.30.1-200"}}, "name": "10.0.30.1-200", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "200"}}, - {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "endpoint_uuid": {"uuid": "500"}} - ]} - ] -} diff --git a/src/ztp_server/tests/ietf_acl_client.py b/src/ztp_server/tests/ietf_acl_client.py deleted file mode 100755 index 20887f1a8..000000000 --- a/src/ztp_server/tests/ietf_acl_client.py +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 requests, time -from typing import Optional -from requests.auth import HTTPBasicAuth - -BASE_URL = '{:s}://{:s}:{:d}/restconf/data' -ACLS_URL = '{:s}/device={:s}/ietf-access-control-list:acls' -ACL_URL = '{:s}/device={:s}/ietf-access-control-list:acl={:s}' - -CSG1_DEVICE_UUID = '118295c8-318a-52ec-a394-529fc4b70f2f' # router: 128.32.10.1 -ACL_NAME = 'sample-ipv4-acl' -ACL_RULE = {"ietf-access-control-list:acls": { - "acl": [{ - "name": "sample-ipv4-acl", "type": "ipv4-acl-type", - "aces": {"ace": [{ - "name": "rule1", - "matches": { - "ipv4": { - "source-ipv4-network": "128.32.10.6/24", - "destination-ipv4-network": "172.10.33.0/24", - "dscp": 18 - }, - "tcp": { - "source-port": {"operator": "eq", "port": 1444}, - "destination-port": {"operator": "eq", "port": 1333}, - "flags": "syn" - } - }, - "actions": {"forwarding": "drop"} - }]} - }], - "attachment-points": {"interface": [{ - "interface-id": "200", - "ingress": {"acl-sets": {"acl-set": [{"name": "sample-ipv4-acl"}]}} - }] -}}} - -class TfsIetfAclClient: - def __init__( - self, host : str = 'localhost', port : int = 80, schema : str = 'http', - username : Optional[str] = 'admin', password : Optional[str] = 'admin', - timeout : int = 10, allow_redirects : bool = True, verify : bool = False - ) -> None: - self._base_url = BASE_URL.format(schema, host, port) - auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None - self._settings = dict(auth=auth, timeout=timeout, allow_redirects=allow_redirects, verify=verify) - - def post(self, device_uuid : str, ietf_acl_data : dict) -> str: - request_url = ACLS_URL.format(self._base_url, device_uuid) - reply = requests.post(request_url, json=ietf_acl_data, **(self._settings)) - return reply.text - - def get(self, device_uuid : str, acl_name : str) -> str: - request_url = ACL_URL.format(self._base_url, device_uuid, acl_name) - reply = requests.get(request_url, **(self._settings)) - return reply.text - - def delete(self, device_uuid : str, acl_name : str) -> str: - request_url = ACL_URL.format(self._base_url, device_uuid, acl_name) - reply = requests.delete(request_url, **(self._settings)) - return reply.text - -def main(): - client = TfsIetfAclClient() - print(f'ACL rule: {ACL_RULE}') - post_response = client.post(CSG1_DEVICE_UUID, ACL_RULE) - print(f'post response: {post_response}') - time.sleep(.5) - get_response = client.get(CSG1_DEVICE_UUID, ACL_NAME) - print(f'get response: {get_response}') - time.sleep(.5) - delete_response = client.delete(CSG1_DEVICE_UUID, ACL_NAME) - print(f'delete response: {delete_response}') - -if __name__ == '__main__': - main() diff --git a/src/ztp_server/tests/test_etsi_bwm.py b/src/ztp_server/tests/test_etsi_bwm.py deleted file mode 100755 index 9400de00f..000000000 --- a/src/ztp_server/tests/test_etsi_bwm.py +++ /dev/null @@ -1,240 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 deepdiff, json, logging, pytest -from typing import Dict -from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME -from common.proto.context_pb2 import ContextId, TopologyId -from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario -from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Topology import json_topology_id -from context.client.ContextClient import ContextClient -from nbi.service.rest_server import RestServer -from .PrepareTestScenario import ( # pylint: disable=unused-import - # be careful, order of symbols is important here! - do_rest_delete_request, do_rest_get_request, do_rest_patch_request, do_rest_post_request, do_rest_put_request, - mock_service, nbi_service_rest, context_client -) - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) -ADMIN_TOPOLOGY_ID = TopologyId(**json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id=JSON_ADMIN_CONTEXT_ID)) -BASE_URL = '/restconf/bwm/v1' - -@pytest.fixture(scope='session') -def storage() -> Dict: - yield dict() - -#def compare_dicts(dict1, dict2): -# # Function to recursively sort dictionaries -# def recursively_sort(d): -# if isinstance(d, dict): -# return {k: recursively_sort(v) for k, v in sorted(d.items())} -# if isinstance(d, list): -# return [recursively_sort(item) for item in d] -# return d -# -# # Sort dictionaries to ignore the order of fields -# sorted_dict1 = recursively_sort(dict1) -# sorted_dict2 = recursively_sort(dict2) -# -# if sorted_dict1 != sorted_dict2: -# LOGGER.error(sorted_dict1) -# LOGGER.error(sorted_dict2) -# -# return sorted_dict1 != sorted_dict2 - -def check_timestamps(bwm_service): - assert 'timeStamp' in bwm_service - assert 'seconds' in bwm_service['timeStamp'] - assert 'nanoseconds' in bwm_service['timeStamp'] - -def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - validate_empty_scenario(context_client) - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - results = descriptor_loader.process() - check_descriptor_load_results(results, descriptor_loader) - descriptor_loader.validate() - - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - -def test_get_allocations_empty(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - URL = BASE_URL + '/bw_allocations' - retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) - assert len(retrieved_data) == 0 - -def test_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - URL = BASE_URL + '/bw_allocations' - data = { - "appInsId" : "service_uuid_01", - "allocationDirection" : "00", - "fixedAllocation" : "123000.0", - "fixedBWPriority" : "SEE_DESCRIPTION", - "requestType" : 0, - "sessionFilter" : [{ - "sourceIp" : "192.168.1.2", - "sourcePort" : ["a"], - "protocol" : "string", - "dstAddress" : "192.168.3.2", - "dstPort" : ["b"], - }] - } - retrieved_data = do_rest_post_request(URL, body=data, logger=LOGGER, expected_status_codes={200}) - LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) - storage['service_uuid_01'] = 'service_uuid_01' - - -def test_get_allocations(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - assert 'service_uuid_01' in storage - URL = BASE_URL + '/bw_allocations' - retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) - assert len(retrieved_data) == 1 - good_result = [ - { - "appInsId" : "service_uuid_01", - "fixedAllocation" : "123000.0", - "allocationDirection" : "00", - "fixedBWPriority" : "SEE_DESCRIPTION", - "requestType" : "0", - "sessionFilter" : [{ - "sourceIp" : "192.168.1.2", - "sourcePort" : ["a"], - "protocol" : "string", - "dstAddress" : "192.168.3.2", - "dstPort" : ["b"], - }], - } - ] - check_timestamps(retrieved_data[0]) - del retrieved_data[0]['timeStamp'] - diff_data = deepdiff.DeepDiff(good_result, retrieved_data) - LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) - assert len(diff_data) == 0 - - -def test_get_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - assert 'service_uuid_01' in storage - URL = BASE_URL + '/bw_allocations/service_uuid_01' - retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) - good_result = { - "appInsId" : "service_uuid_01", - "fixedAllocation" : "123000.0", - "allocationDirection": "00", - "fixedBWPriority" : "SEE_DESCRIPTION", - "requestType" : "0", - "sessionFilter" : [{ - "sourceIp" : "192.168.1.2", - "sourcePort" : ["a"], - "protocol" : "string", - "dstAddress" : "192.168.3.2", - "dstPort" : ["b"], - }] - } - check_timestamps(retrieved_data) - del retrieved_data['timeStamp'] - diff_data = deepdiff.DeepDiff(good_result, retrieved_data) - LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) - assert len(diff_data) == 0 - - -def test_put_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - assert 'service_uuid_01' in storage - URL = BASE_URL + '/bw_allocations/service_uuid_01' - changed_allocation = { - "appInsId" : "service_uuid_01", - "fixedAllocation" : "200.0", - "allocationDirection": "00", - "fixedBWPriority" : "NOPRIORITY", - "requestType" : "0", - "sessionFilter" : [{ - "sourceIp" : "192.168.1.2", - "sourcePort" : ["a"], - "protocol" : "string", - "dstAddress" : "192.168.3.2", - "dstPort" : ["b"], - }] - } - retrieved_data = do_rest_put_request(URL, body=json.dumps(changed_allocation), logger=LOGGER, expected_status_codes={200}) - check_timestamps(retrieved_data) - del retrieved_data['timeStamp'] - diff_data = deepdiff.DeepDiff(changed_allocation, retrieved_data) - LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) - assert len(diff_data) == 0 - - -def test_patch_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - assert 'service_uuid_01' in storage - URL = BASE_URL + '/bw_allocations/service_uuid_01' - difference = { - "fixedBWPriority":"FULLPRIORITY", - } - changed_allocation = { - "appInsId" : "service_uuid_01", - "fixedAllocation" : "200.0", - "allocationDirection": "00", - "fixedBWPriority" : "FULLPRIORITY", - "requestType" : "0", - "sessionFilter" : [{ - "sourceIp" : "192.168.1.2", - "sourcePort" : ["a"], - "protocol" : "string", - "dstAddress" : "192.168.3.2", - "dstPort" : ["b"], - }] - } - retrieved_data = do_rest_patch_request(URL, body=difference, logger=LOGGER, expected_status_codes={200}) - check_timestamps(retrieved_data) - del retrieved_data['timeStamp'] - diff_data = deepdiff.DeepDiff(changed_allocation, retrieved_data) - LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) - assert len(diff_data) == 0 - - -def test_delete_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - assert 'service_uuid_01' in storage - URL = BASE_URL + '/bw_allocations/service_uuid_01' - do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={200}) - - -def test_get_allocations_empty_final(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - URL = BASE_URL + '/bw_allocations' - retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) - assert len(retrieved_data) == 0 - - -def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - - # Load descriptors and validate the base scenario - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - descriptor_loader.validate() - descriptor_loader.unload() - validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_ietf_l2vpn.py b/src/ztp_server/tests/test_ietf_l2vpn.py deleted file mode 100755 index 7bed8ff5d..000000000 --- a/src/ztp_server/tests/test_ietf_l2vpn.py +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId -from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario -from common.tools.object_factory.Context import json_context_id -from context.client.ContextClient import ContextClient -from tests.tools.mock_osm.MockOSM import MockOSM -from .Constants import SERVICE_CONNECTION_POINTS_1, SERVICE_CONNECTION_POINTS_2, SERVICE_TYPE -from .PrepareTestScenario import ( # pylint: disable=unused-import - # be careful, order of symbols is important here! - mock_service, nbi_service_rest, osm_wim, context_client -) - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -DESCRIPTOR_FILE = 'nbi/tests/data/topology-7router-emu-dummy.json' - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) - -def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - validate_empty_scenario(context_client) - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - results = descriptor_loader.process() - check_descriptor_load_results(results, descriptor_loader) - descriptor_loader.validate() - - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - -def test_create_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name - osm_wim.create_connectivity_service(SERVICE_TYPE, SERVICE_CONNECTION_POINTS_1) - -def test_get_service_status(osm_wim : MockOSM): # pylint: disable=redefined-outer-name - service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service - osm_wim.get_connectivity_service_status(service_uuid) - -def test_edit_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name - service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service - osm_wim.edit_connectivity_service(service_uuid, SERVICE_CONNECTION_POINTS_2) - -def test_delete_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name - service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service - osm_wim.delete_connectivity_service(service_uuid) - -def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - - # Load descriptors and validate the base scenario - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - descriptor_loader.validate() - descriptor_loader.unload() - validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_ietf_l3vpn.py b/src/ztp_server/tests/test_ietf_l3vpn.py deleted file mode 100755 index 0f214661f..000000000 --- a/src/ztp_server/tests/test_ietf_l3vpn.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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, pytest -from typing import Dict -from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId -from common.tools.descriptor.Loader import ( - DescriptorLoader, check_descriptor_load_results, validate_empty_scenario -) -from common.tools.object_factory.Context import json_context_id -from context.client.ContextClient import ContextClient -from nbi.service.rest_server.RestServer import RestServer -from .PrepareTestScenario import ( # pylint: disable=unused-import - # be careful, order of symbols is important here! - do_rest_delete_request, do_rest_get_request, do_rest_post_request, - mock_service, nbi_service_rest, osm_wim, context_client -) - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' -SVC1_DATA_FILE = 'nbi/tests/data/ietf_l3vpn_req_svc1.json' -SVC2_DATA_FILE = 'nbi/tests/data/ietf_l3vpn_req_svc2.json' - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) - -@pytest.fixture(scope='session') -def storage() -> Dict: - yield dict() - -def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - validate_empty_scenario(context_client) - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - results = descriptor_loader.process() - check_descriptor_load_results(results, descriptor_loader) - descriptor_loader.validate() - - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - -# pylint: disable=redefined-outer-name, unused-argument -def test_create_svc1(nbi_service_rest : RestServer, storage : Dict): - with open(SVC1_DATA_FILE, 'r', encoding='UTF-8') as f: - svc1_data = json.load(f) - URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' - do_rest_post_request(URL, body=svc1_data, logger=LOGGER, expected_status_codes={201}) - storage['svc1-uuid'] = svc1_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] - -# pylint: disable=redefined-outer-name, unused-argument -def test_create_svc2(nbi_service_rest : RestServer, storage : Dict): - with open(SVC2_DATA_FILE, 'r', encoding='UTF-8') as f: - svc2_data = json.load(f) - URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' - do_rest_post_request(URL, body=svc2_data, logger=LOGGER, expected_status_codes={201}) - storage['svc2-uuid'] = svc2_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] - -# pylint: disable=redefined-outer-name, unused-argument -def test_get_state_svc1(nbi_service_rest : RestServer, storage : Dict): - assert 'svc1-uuid' in storage - service_uuid = storage['svc1-uuid'] - URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) - do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - -# pylint: disable=redefined-outer-name, unused-argument -def test_get_state_svc2(nbi_service_rest : RestServer, storage : Dict): - assert 'svc2-uuid' in storage - service_uuid = storage['svc2-uuid'] - URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) - do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - -# pylint: disable=redefined-outer-name, unused-argument -def test_delete_svc1(nbi_service_rest : RestServer, storage : Dict): - assert 'svc1-uuid' in storage - service_uuid = storage['svc1-uuid'] - URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) - do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={204}) - -# pylint: disable=redefined-outer-name, unused-argument -def test_delete_svc2(nbi_service_rest : RestServer, storage : Dict): - assert 'svc2-uuid' in storage - service_uuid = storage['svc2-uuid'] - URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) - do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={204}) - -def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - - # Load descriptors and validate the base scenario - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - descriptor_loader.validate() - descriptor_loader.unload() - validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_ietf_network.py b/src/ztp_server/tests/test_ietf_network.py deleted file mode 100755 index 68337d0a8..000000000 --- a/src/ztp_server/tests/test_ietf_network.py +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 deepdiff, json, logging, operator, os -from typing import Dict -from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId -from common.tools.descriptor.Loader import ( - DescriptorLoader, check_descriptor_load_results, validate_empty_scenario -) -from common.tools.object_factory.Context import json_context_id -from context.client.ContextClient import ContextClient -from nbi.service.rest_server import RestServer - -# Explicitly state NBI to use PyangBind Renderer for this test -os.environ['IETF_NETWORK_RENDERER'] = 'PYANGBIND' - -from .PrepareTestScenario import ( # pylint: disable=unused-import - # be careful, order of symbols is important here! - do_rest_get_request, mock_service, nbi_service_rest, osm_wim, context_client -) - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' -TARGET_DATA_FILE = 'nbi/tests/data/test-ietf-network.json' - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) - -def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - validate_empty_scenario(context_client) - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - results = descriptor_loader.process() - check_descriptor_load_results(results, descriptor_loader) - descriptor_loader.validate() - - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - -def sort_data(data : Dict) -> None: - if 'ietf-network:networks' not in data: return - if 'network' not in data['ietf-network:networks']: return - data['ietf-network:networks']['network'] = sorted( - data['ietf-network:networks']['network'], - key=operator.itemgetter('network-id') - ) - for network in data['ietf-network:networks']['network']: - if 'node' in network: - network['node'] = sorted( - network['node'], - key=operator.itemgetter('node-id') - ) - - for node in network['node']: - if 'ietf-network-topology:termination-point' in node: - node['ietf-network-topology:termination-point'] = sorted( - node['ietf-network-topology:termination-point'], - key=operator.itemgetter('tp-id') - ) - - if 'ietf-network-topology:link' in network: - network['ietf-network-topology:link'] = sorted( - network['ietf-network-topology:link'], - key=operator.itemgetter('link-id') - ) - -def test_rest_get_networks(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - with open(TARGET_DATA_FILE, 'r', encoding='UTF-8') as f: - target_data = json.load(f) - URL = '/restconf/data/ietf-network:networks' - retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - sort_data(retrieved_data) - sort_data(target_data) - diff_data = deepdiff.DeepDiff(target_data, retrieved_data) - LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) - assert len(diff_data) == 0 - -def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - - # Load descriptors and validate the base scenario - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - descriptor_loader.validate() - descriptor_loader.unload() - validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_slice.py b/src/ztp_server/tests/test_slice.py deleted file mode 100755 index fe112e6fc..000000000 --- a/src/ztp_server/tests/test_slice.py +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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, random, uuid -from typing import Dict, Tuple -from nbi.service.rest_server.nbi_plugins.ietf_network_slice.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) -> Tuple[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__": - request = generate_request(123) - print(json.dumps(request[0], sort_keys=True, indent=4)) diff --git a/src/ztp_server/tests/test_tfs_api.py b/src/ztp_server/tests/test_tfs_api.py deleted file mode 100755 index eab2f8d9b..000000000 --- a/src/ztp_server/tests/test_tfs_api.py +++ /dev/null @@ -1,217 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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, urllib -from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME -from common.proto.context_pb2 import ContextId -from common.tools.descriptor.Loader import ( - DescriptorLoader, check_descriptor_load_results, validate_empty_scenario -) -from common.tools.object_factory.Context import json_context_id -from common.type_checkers.Assertions import ( - validate_connection, validate_connection_ids, validate_connections, - validate_context, validate_context_ids, validate_contexts, - validate_device, validate_device_ids, validate_devices, - validate_link, validate_link_ids, validate_links, - validate_service, validate_service_ids, validate_services, - validate_slice, validate_slice_ids, validate_slices, - validate_topologies, validate_topology, validate_topology_ids -) -from context.client.ContextClient import ContextClient -from nbi.service.rest_server.RestServer import RestServer -from .PrepareTestScenario import ( # pylint: disable=unused-import - # be careful, order of symbols is important here! - mock_service, nbi_service_rest, context_client, - do_rest_get_request -) - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -DESCRIPTOR_FILE = 'nbi/tests/data/tfs_api_dummy.json' - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) - - -# ----- Prepare Environment -------------------------------------------------------------------------------------------- - -def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - validate_empty_scenario(context_client) - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - results = descriptor_loader.process() - check_descriptor_load_results(results, descriptor_loader) - descriptor_loader.validate() - - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 3 - assert len(response.slice_ids ) == 1 - - -# ----- Context -------------------------------------------------------------------------------------------------------- - -def test_rest_get_context_ids(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument - reply = do_rest_get_request('/tfs-api/context_ids') - validate_context_ids(reply) - -def test_rest_get_contexts(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - reply = do_rest_get_request('/tfs-api/contexts') - validate_contexts(reply) - -def test_rest_get_context(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}'.format(context_uuid)) - validate_context(reply) - - -# ----- Topology ------------------------------------------------------------------------------------------------------- - -def test_rest_get_topology_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/topology_ids'.format(context_uuid)) - validate_topology_ids(reply) - -def test_rest_get_topologies(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/topologies'.format(context_uuid)) - validate_topologies(reply) - -def test_rest_get_topology(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - topology_uuid = urllib.parse.quote(DEFAULT_TOPOLOGY_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/topology/{:s}'.format(context_uuid, topology_uuid)) - validate_topology(reply, num_devices=3, num_links=6) - - -# ----- Device --------------------------------------------------------------------------------------------------------- - -def test_rest_get_device_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - reply = do_rest_get_request('/tfs-api/device_ids') - validate_device_ids(reply) - -def test_rest_get_devices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - reply = do_rest_get_request('/tfs-api/devices') - validate_devices(reply) - -def test_rest_get_device(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - device_uuid = urllib.parse.quote('R1', safe='') - reply = do_rest_get_request('/tfs-api/device/{:s}'.format(device_uuid)) - validate_device(reply) - - -# ----- Link ----------------------------------------------------------------------------------------------------------- - -def test_rest_get_link_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - reply = do_rest_get_request('/tfs-api/link_ids') - validate_link_ids(reply) - -def test_rest_get_links(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - reply = do_rest_get_request('/tfs-api/links') - validate_links(reply) - -def test_rest_get_link(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - link_uuid = urllib.parse.quote('R1/502==R2/501', safe='') - reply = do_rest_get_request('/tfs-api/link/{:s}'.format(link_uuid)) - validate_link(reply) - - -# ----- Service -------------------------------------------------------------------------------------------------------- - -def test_rest_get_service_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/service_ids'.format(context_uuid)) - validate_service_ids(reply) - -def test_rest_get_services(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/services'.format(context_uuid)) - validate_services(reply) - -def test_rest_get_service(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') - reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}'.format(context_uuid, service_uuid)) - validate_service(reply) - - -# ----- Slice ---------------------------------------------------------------------------------------------------------- - -def test_rest_get_slice_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/slice_ids'.format(context_uuid)) - validate_slice_ids(reply) - -def test_rest_get_slices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/slices'.format(context_uuid)) - validate_slices(reply) - -def test_rest_get_slice(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - slice_uuid = urllib.parse.quote('SLC:R1-R2-R3', safe='') - reply = do_rest_get_request('/tfs-api/context/{:s}/slice/{:s}'.format(context_uuid, slice_uuid)) - validate_slice(reply) - - -# ----- Connection ----------------------------------------------------------------------------------------------------- - -def test_rest_get_connection_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') - reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connection_ids'.format(context_uuid, service_uuid)) - validate_connection_ids(reply) - -def test_rest_get_connections(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') - reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connections'.format(context_uuid, service_uuid)) - validate_connections(reply) - -def test_rest_get_connection(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - connection_uuid = urllib.parse.quote('CON:R1/200==R2/200:1', safe='') - reply = do_rest_get_request('/tfs-api/connection/{:s}'.format(connection_uuid)) - validate_connection(reply) - -# ----- Policy --------------------------------------------------------------------------------------------------------- - -#def test_rest_get_policyrule_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument -# reply = do_rest_get_request('/tfs-api/policyrule_ids') -# validate_policyrule_ids(reply) - -#def test_rest_get_policyrules(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument -# reply = do_rest_get_request('/tfs-api/policyrules') -# validate_policyrules(reply) - -#def test_rest_get_policyrule(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument -# policyrule_uuid_quoted = urllib.parse.quote(policyrule_uuid, safe='') -# reply = do_rest_get_request('/tfs-api/policyrule/{:s}'.format(policyrule_uuid_quoted)) -# validate_policyrule(reply) - - -# ----- Cleanup Environment -------------------------------------------------------------------------------------------- - -def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 3 - assert len(response.slice_ids ) == 1 - - # Load descriptors and validate the base scenario - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - descriptor_loader.validate() - descriptor_loader.unload() - validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_yang_acl.py b/src/ztp_server/tests/test_yang_acl.py deleted file mode 100755 index 2f45c50bc..000000000 --- a/src/ztp_server/tests/test_yang_acl.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 copy, json, libyang, logging, os -from typing import Dict, List, Optional - -LOGGER = logging.getLogger(__name__) - -YANG_DIR = os.path.join(os.path.dirname(__file__), 'yang') -YANG_MODULES = [ - 'ietf-yang-types', - 'ietf-interfaces', - 'iana-if-type', - 'ietf-access-control-list', -] - -class YangValidator: - def __init__(self) -> None: - self._yang_context = libyang.Context(YANG_DIR) - for module_name in YANG_MODULES: - LOGGER.info('Loading module: {:s}'.format(str(module_name))) - yang_module = self._yang_context.load_module(module_name) - yang_module.feature_enable_all() - yang_module_prefix = yang_module.prefix() - LOGGER.info(' Prefix: {:s}'.format(str(yang_module_prefix))) - - def parse_to_dict(self, message : Dict, interface_names : List[str]) -> Dict: - interfaces = self._yang_context.create_data_path('/ietf-interfaces:interfaces') - for if_index,interface_name in enumerate(interface_names): - if_path = 'interface[name="{:s}"]'.format(str(interface_name)) - interface = interfaces.create_path(if_path) - interface.create_path('if-index', if_index + 1) - interface.create_path('type', 'iana-if-type:ethernetCsmacd') - interface.create_path('admin-status', 'up') - interface.create_path('oper-status', 'up') - statistics = interface.create_path('statistics') - statistics.create_path('discontinuity-time', '2024-07-11T10:00:00.000000Z') - - message = copy.deepcopy(message) - message['ietf-interfaces:interfaces'] = interfaces.print_dict()['interfaces'] - - dnode : Optional[libyang.DNode] = self._yang_context.parse_data_mem( - json.dumps(message), 'json', validate_present=True, strict=True - ) - if dnode is None: raise Exception('Unable to parse Message({:s})'.format(str(message))) - message = dnode.print_dict() - dnode.free() - interfaces.free() - return message - - def destroy(self) -> None: - self._yang_context.destroy() - self._yang_context = None - -def main() -> None: - import uuid # pylint: disable=import-outside-toplevel - logging.basicConfig(level=logging.DEBUG) - - interface_names = {'200', '500', str(uuid.uuid4()), str(uuid.uuid4())} - ACL_RULE = {"ietf-access-control-list:acls": { - "acl": [{ - "name": "sample-ipv4-acl", "type": "ipv4-acl-type", - "aces": {"ace": [{ - "name": "rule1", - "matches": { - "ipv4": { - "source-ipv4-network": "128.32.10.6/24", - "destination-ipv4-network": "172.10.33.0/24", - "dscp": 18 - }, - "tcp": { - "source-port": {"operator": "eq", "port": 1444}, - "destination-port": {"operator": "eq", "port": 1333}, - "flags": "syn" - } - }, - "actions": {"forwarding": "drop"} - }]} - }], - "attachment-points": {"interface": [{ - "interface-id": "200", - "ingress": {"acl-sets": {"acl-set": [{"name": "sample-ipv4-acl"}]}} - }] - }}} - - yang_validator = YangValidator() - request_data = yang_validator.parse_to_dict(ACL_RULE, list(interface_names)) - yang_validator.destroy() - - LOGGER.info('request_data = {:s}'.format(str(request_data))) - -if __name__ == '__main__': - main() -- GitLab From e9bcc55c3ac5d7d6fdb2b6e4c7f9c77cdb2e0b8d Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Mon, 27 Jan 2025 15:33:41 +0000 Subject: [PATCH 212/463] NBI component - IETF L3VPN: - Reverting unneeded changes --- .../nbi_plugins/ietf_l3vpn/Handlers.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py index b76bf0cec..0e8b8013e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py @@ -15,7 +15,7 @@ import logging, netaddr from typing import Dict, List, Optional, Tuple from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import Service, ServiceStatusEnum, ServiceTypeEnum, Empty +from common.proto.context_pb2 import Service, ServiceStatusEnum, ServiceTypeEnum from common.tools.context_queries.Service import get_service_by_uuid from common.tools.grpc.ConfigRules import update_config_rule_custom from common.tools.grpc.Constraints import ( @@ -97,11 +97,8 @@ def update_service_endpoint( endpoint_settings_key = ENDPOINT_SETTINGS_KEY.format(device_uuid, endpoint_uuid) field_updates = {} if vlan_tag is not None: field_updates['vlan_tag' ] = (vlan_tag, True) - # if ipv4_address is not None: field_updates['ip_address' ] = (ipv4_address, True) - # if neighbor_ipv4_address is not None: field_updates['neighbor_address'] = (neighbor_ipv4_address, True) - #! neighbor_ipv4_address and ipv4_address' field swapped to manage the PE. Fix it later - if ipv4_address is not None: field_updates['ip_address' ] = (neighbor_ipv4_address, True) - if neighbor_ipv4_address is not None: field_updates['neighbor_address'] = (ipv4_address, True) + if ipv4_address is not None: field_updates['ip_address' ] = (ipv4_address, True) + if neighbor_ipv4_address is not None: field_updates['neighbor_address'] = (neighbor_ipv4_address, True) if ipv4_prefix_length is not None: field_updates['prefix_length' ] = (ipv4_prefix_length, True) update_config_rule_custom(config_rules, endpoint_settings_key, field_updates) @@ -116,8 +113,6 @@ def update_service_endpoint( def process_site_network_access( site_id : str, network_access : Dict, site_static_routing : Dict[Tuple[str, str], str], errors : List[Dict] ) -> None: - # client = ContextClient() - # devices = client.ListDevices(Empty()).devices endpoint_uuid = network_access['site-network-access-id'] if network_access['site-network-access-type'] != 'ietf-l3vpn-svc:multipoint': @@ -125,12 +120,6 @@ def process_site_network_access( raise NotImplementedError(MSG.format(str(network_access['site-network-access-type']))) device_uuid = network_access['device-reference'] - - # location = network_access['location-reference'] - # for device in devices: - # for cr in device.device_config.config_rules: - # if cr.WhichOneof('config_rule') != 'custom': - # continue service_uuid = network_access['vpn-attachment']['vpn-id'] access_role : str = network_access['vpn-attachment']['site-role'] -- GitLab From 7f30dddcd8ff6b292720cc8b38fd2420cbb44af3 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Mon, 27 Jan 2025 15:51:05 +0000 Subject: [PATCH 213/463] NBI component - IETF Network Slice: - Add missing header --- .../ietf_network_slice/ietf_slice_handler.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py index 6c52a4398..80ce4c6b7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 uuid -- GitLab From eaabe3ba703c335b39b8dd26af2c8e5ee668cf16 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Mon, 27 Jan 2025 16:28:29 +0000 Subject: [PATCH 214/463] Pre-merge code cleanup --- src/common/DeviceTypes.py | 5 ++--- src/common/tools/context_queries/Slice.py | 13 +------------ src/service/service/service_handlers/__init__.py | 6 ++++++ 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/common/DeviceTypes.py b/src/common/DeviceTypes.py index 30bbd0b15..9a982d1eb 100644 --- a/src/common/DeviceTypes.py +++ b/src/common/DeviceTypes.py @@ -38,6 +38,7 @@ class DeviceTypeEnum(Enum): CLIENT = 'client' DATACENTER = 'datacenter' IP_SDN_CONTROLLER = 'ip-sdn-controller' + NCE = 'nce' MICROWAVE_RADIO_SYSTEM = 'microwave-radio-system' OPEN_LINE_SYSTEM = 'open-line-system' OPTICAL_ROADM = 'optical-roadm' @@ -52,6 +53,4 @@ class DeviceTypeEnum(Enum): # ETSI TeraFlowSDN controller TERAFLOWSDN_CONTROLLER = 'teraflowsdn' - IETF_SLICE = 'ietf-slice' - - NCE = 'nce' \ No newline at end of file + IETF_SLICE = 'ietf-slice' diff --git a/src/common/tools/context_queries/Slice.py b/src/common/tools/context_queries/Slice.py index 03453862e..12bd8c03c 100644 --- a/src/common/tools/context_queries/Slice.py +++ b/src/common/tools/context_queries/Slice.py @@ -13,17 +13,9 @@ # limitations under the License. import logging -from typing import Optional, Tuple, Union -from uuid import UUID, uuid5 - import grpc - -import logging from typing import Optional, Tuple, Union from uuid import UUID, uuid5 - -import grpc - from common.Constants import DEFAULT_CONTEXT_NAME from common.method_wrappers.ServiceExceptions import InvalidArgumentsException from common.proto.context_pb2 import ContextId, Slice, SliceFilter, SliceId @@ -32,9 +24,6 @@ from common.proto.context_pb2 import ContextId, Slice, SliceFilter, SliceId from context.client.ContextClient import ContextClient -NAMESPACE_TFS = UUID("200e3a1f-2223-534f-a100-758e29c37f40") - - NAMESPACE_TFS = UUID("200e3a1f-2223-534f-a100-758e29c37f40") LOGGER = logging.getLogger(__name__) @@ -170,4 +159,4 @@ def get_slice_by_defualt_name( return get_slice_by_id( context_client, slice_id, rw_copy=rw_copy, include_endpoint_ids=include_endpoint_ids, include_constraints=include_constraints, include_service_ids=include_service_ids, - include_subslice_ids=include_subslice_ids, include_config_rules=include_config_rules) \ No newline at end of file + include_subslice_ids=include_subslice_ids, include_config_rules=include_config_rules) diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index ef9888361..1bfeff84a 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -69,6 +69,12 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN, } ]), + (L3NM_IETFL3VPN_ServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L3NM, + FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_IETF_L3VPN], + } + ]), (L3NMNCEServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L3NM, -- GitLab From b09b6ca2be948b1c7516ed4e71d2416c18a43fb8 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Mon, 27 Jan 2025 16:30:59 +0000 Subject: [PATCH 215/463] Pre-merge code cleanup --- src/service/service/service_handlers/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index 1bfeff84a..85545d238 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -72,7 +72,7 @@ SERVICE_HANDLERS = [ (L3NM_IETFL3VPN_ServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L3NM, - FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_IETF_L3VPN], + FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_IETF_L3VPN, } ]), (L3NMNCEServiceHandler, [ -- GitLab From 734ea2fda145e7382eb6687e122766267720f438 Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 28 Jan 2025 09:47:18 +0100 Subject: [PATCH 216/463] debug & refactoring: - ofc25-camara tests added to .gitlab-cy.yml - redundant .xml test reports removed - minor changes in ofc25-camara-agg-net-controller .gitlab-ci.yml --- src/tests/.gitlab-ci.yml | 3 ++- src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml | 9 +++++---- .../report_e2e_ietf_l3vpn_operations.xml | 1 - .../report_e2e_ietf_slice_operations.xml | 1 - .../report_onboarding.xml | 1 - 5 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_l3vpn_operations.xml delete mode 100644 src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_slice_operations.xml delete mode 100644 src/tests/ofc25-camara-agg-net-controller/report_onboarding.xml diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index cd3c3cc21..b49d40c11 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -21,5 +21,6 @@ include: #- local: '/src/tests/ofc23/.gitlab-ci.yml' - local: '/src/tests/ofc24/.gitlab-ci.yml' - local: '/src/tests/eucnc24/.gitlab-ci.yml' - - local: '/src/tests/ofc25/.gitlab-ci.yml' + - local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml' + - local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml' #- local: '/src/tests/ecoc24/.gitlab-ci.yml' diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index 9469568ca..08c22b2c8 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -15,7 +15,7 @@ # Build, tag, and push the Docker images to the GitLab Docker registry build ofc25: variables: - TEST_NAME: 'ofc25_camara_agg_net' + TEST_NAME: 'ofc25-camara-agg-net-controller' IP_NAME: 'ip' IP_PORT: '9090' stage: build @@ -28,7 +28,7 @@ build ofc25: - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - - docker buildx build -t "${IP_NAME}:latest" -f ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile . + - docker buildx build -t "${IP_NAME}:latest" -f ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl - docker tag "${IP_NAME}:latest" "$CI_REGISTRY_IMAGE/${IP_NAME}:latest" - docker push "$CI_REGISTRY_IMAGE/${IP_NAME}:latest" after_script: @@ -46,7 +46,7 @@ build ofc25: # Deploy TeraFlowSDN and Execute end-2-end test end2end_test ofc25_camara_agg_net: variables: - TEST_NAME: 'ofc25_camara_agg_net' + TEST_NAME: 'ofc25-camara-agg-net-controller' IP_NAME: 'ip' IP_PORT: '9090' stage: end2end_test @@ -89,13 +89,14 @@ end2end_test ofc25_camara_agg_net: docker run -t --rm --name ${TEST_NAME} --network=host --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" - $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-e2e-ietf-slice-operations.sh + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-agg-net-ietf-slice-operations.sh after_script: - kubectl --namespace tfs logs deployment/contextservice -c server - kubectl --namespace tfs logs deployment/deviceservice -c server - kubectl --namespace tfs logs deployment/pathcompservice -c frontend - kubectl --namespace tfs logs deployment/serviceservice -c server + - kubectl --namespace tfs logs deployment/sliceservice -c server - kubectl --namespace tfs logs deployment/nbiservice -c server # Destroy Scenario diff --git a/src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_l3vpn_operations.xml b/src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_l3vpn_operations.xml deleted file mode 100644 index 8b0d3b207..000000000 --- a/src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_l3vpn_operations.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_slice_operations.xml b/src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_slice_operations.xml deleted file mode 100644 index f567a4429..000000000 --- a/src/tests/ofc25-camara-agg-net-controller/report_e2e_ietf_slice_operations.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/tests/ofc25-camara-agg-net-controller/report_onboarding.xml b/src/tests/ofc25-camara-agg-net-controller/report_onboarding.xml deleted file mode 100644 index b7922065e..000000000 --- a/src/tests/ofc25-camara-agg-net-controller/report_onboarding.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file -- GitLab From 38ce6ab70027bfa5f41d82abaddfc3593517d4ff Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 28 Jan 2025 10:17:24 +0100 Subject: [PATCH 217/463] debug: ofc25-camara .gitlab-ci.yml operations debugged --- src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml index 388a28434..41db35f22 100644 --- a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml @@ -15,7 +15,7 @@ # Build, tag, and push the Docker images to the GitLab Docker registry build ofc25: variables: - TEST_NAME: 'ofc25_camara_e2e' + TEST_NAME: 'ofc25-camara-e2e-controller' NCE_NAME: 'nce' AGG_NET_NAME: 'agg_net' NCE_PORT: '9090' @@ -32,10 +32,10 @@ build ofc25: - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - - docker buildx build -t "${NCE_NAME}:latest" -f ./src/tests/tools/mock_nce_ctrl/Dockerfile . + - docker buildx build -t "${NCE_NAME}:latest" -f ./src/tests/tools/mock_nce_ctrl/Dockerfile ./src/tests/tools/mock_nce_ctrl - docker tag "${NCE_NAME}:latest" "$CI_REGISTRY_IMAGE/${NCE_NAME}:latest" - docker push "$CI_REGISTRY_IMAGE/${NCE_NAME}:latest" - - docker buildx build -t "${AGG_NET_NAME}:latest" -f ./src/tests/tools/mock_ietf_network_slice_sdn_ctrl/Dockerfile . + - docker buildx build -t "${AGG_NET_NAME}:latest" -f ./src/tests/tools/mock_ietf_network_slice_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_network_slice_sdn_ctrl - docker tag "${AGG_NET_NAME}:latest" "$CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest" - docker push "$CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest" after_script: @@ -53,7 +53,7 @@ build ofc25: # Deploy TeraFlowSDN and Execute end-2-end test end2end_test ofc25_camara_e2e: variables: - TEST_NAME: 'ofc25_camara_e2e' + TEST_NAME: 'ofc25-camara-e2e-controller' NCE_NAME: 'nce' AGG_NET_NAME: 'agg_net' NCE_PORT: '9090' @@ -107,6 +107,7 @@ end2end_test ofc25_camara_e2e: - kubectl --namespace tfs logs deployment/deviceservice -c server - kubectl --namespace tfs logs deployment/pathcompservice -c frontend - kubectl --namespace tfs logs deployment/serviceservice -c server + - kubectl --namespace tfs logs deployment/sliceservice -c server - kubectl --namespace tfs logs deployment/nbiservice -c server # Destroy Scenario -- GitLab From 34b2017948c51f91be70c39cf06a70582fc87f8b Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 28 Jan 2025 10:23:54 +0100 Subject: [PATCH 218/463] refactoring: ofc25-camara e2e test names differentiated in .gitlab-ci.yml files --- src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml | 2 +- src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index 08c22b2c8..b4c380b85 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -13,7 +13,7 @@ # limitations under the License. # Build, tag, and push the Docker images to the GitLab Docker registry -build ofc25: +build ofc25_camara_agg_net: variables: TEST_NAME: 'ofc25-camara-agg-net-controller' IP_NAME: 'ip' diff --git a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml index 41db35f22..42cef05aa 100644 --- a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml @@ -13,7 +13,7 @@ # limitations under the License. # Build, tag, and push the Docker images to the GitLab Docker registry -build ofc25: +build ofc25_camara_e2e: variables: TEST_NAME: 'ofc25-camara-e2e-controller' NCE_NAME: 'nce' -- GitLab From ebd836d300a7e67d6ee51dccfd94cb988b092a28 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 30 Jan 2025 18:33:55 +0000 Subject: [PATCH 219/463] NBI component: - Updated to use gunicorn as WGSI HTTP server - Removed gRPC client/server as it was unused - Added WebSocket Flask-SocketIO - Implemented Heartbeat endpoint based on WebSocket - Other minor framework and WebUI fixes --- manifests/nbiservice.yaml | 33 +++--- proto/nbi.proto | 28 ----- src/common/Constants.py | 1 - src/nbi/.gitlab-ci.yml | 2 +- src/nbi/Dockerfile | 17 +-- src/nbi/client/NbiClient.py | 96 ----------------- src/nbi/requirements.in | 21 +++- src/nbi/service/NbiApplication.py | 63 +++++++++++ src/nbi/service/NbiService.py | 28 ----- src/nbi/service/NbiServiceServicerImpl.py | 63 ----------- src/nbi/service/{__main__.py => app.py} | 102 ++++++++---------- .../websocket_namespaces}/__init__.py | 0 .../hearthbeat/HeartbeatNamespace.py | 41 +++++++ .../hearthbeat/__init__.py} | 14 ++- src/webui/service/__init__.py | 2 +- 15 files changed, 193 insertions(+), 318 deletions(-) delete mode 100644 proto/nbi.proto delete mode 100644 src/nbi/client/NbiClient.py create mode 100644 src/nbi/service/NbiApplication.py delete mode 100644 src/nbi/service/NbiService.py delete mode 100644 src/nbi/service/NbiServiceServicerImpl.py rename src/nbi/service/{__main__.py => app.py} (53%) rename src/nbi/{client => service/websocket_namespaces}/__init__.py (100%) create mode 100644 src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py rename src/nbi/service/{rest_server/RestServer.py => websocket_namespaces/hearthbeat/__init__.py} (56%) diff --git a/manifests/nbiservice.yaml b/manifests/nbiservice.yaml index 5c954d1bb..108195d37 100644 --- a/manifests/nbiservice.yaml +++ b/manifests/nbiservice.yaml @@ -23,9 +23,6 @@ spec: replicas: 1 template: metadata: - annotations: - config.linkerd.io/skip-inbound-ports: "8762" - config.linkerd.io/skip-outbound-ports: "8762" labels: app: nbiservice spec: @@ -36,22 +33,28 @@ spec: imagePullPolicy: Always ports: - containerPort: 8080 - - containerPort: 9090 - containerPort: 9192 - - containerPort: 8761 env: - name: LOG_LEVEL value: "INFO" + - name: FLASK_ENV + value: "production" # change to "development" if developing - name: IETF_NETWORK_RENDERER value: "LIBYANG" - - name: WS_IP_PORT - value: "8761" readinessProbe: - exec: - command: ["/bin/grpc_health_probe", "-addr=:9090"] + httpGet: + path: /healthz + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 10 + failureThreshold: 3 livenessProbe: - exec: - command: ["/bin/grpc_health_probe", "-addr=:9090"] + httpGet: + path: /healthz + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 10 + failureThreshold: 3 resources: requests: cpu: 50m @@ -75,15 +78,7 @@ spec: protocol: TCP port: 8080 targetPort: 8080 - - name: grpc - protocol: TCP - port: 9090 - targetPort: 9090 - name: metrics protocol: TCP port: 9192 targetPort: 9192 - - name: websocket - protocol: TCP - port: 8761 - targetPort: 8761 diff --git a/proto/nbi.proto b/proto/nbi.proto deleted file mode 100644 index a81df70ef..000000000 --- a/proto/nbi.proto +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package nbi; - -import "context.proto"; - -service NbiService { - rpc CheckCredentials (context.TeraFlowController) returns (context.AuthenticationResult) {} - rpc GetConnectivityServiceStatus (context.ServiceId ) returns (context.ServiceStatus ) {} - rpc CreateConnectivityService (context.Service ) returns (context.ServiceId ) {} - rpc EditConnectivityService (context.Service ) returns (context.ServiceId ) {} - rpc DeleteConnectivityService (context.Service ) returns (context.Empty ) {} - rpc GetAllActiveConnectivityServices (context.Empty ) returns (context.ServiceIdList ) {} - rpc ClearAllConnectivityServices (context.Empty ) returns (context.Empty ) {} -} diff --git a/src/common/Constants.py b/src/common/Constants.py index 682007646..6508ac151 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -87,7 +87,6 @@ DEFAULT_SERVICE_GRPC_PORTS = { ServiceNameEnum.POLICY .value : 6060, ServiceNameEnum.MONITORING .value : 7070, ServiceNameEnum.DLT .value : 8080, - ServiceNameEnum.NBI .value : 9090, ServiceNameEnum.L3_CAD .value : 10001, ServiceNameEnum.L3_AM .value : 10002, ServiceNameEnum.DBSCANSERVING .value : 10008, diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 71bf223ba..d97fab701 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -62,7 +62,7 @@ unit_test nbi: fi script: - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" - - docker run --name $IMAGE_NAME -d -p 9090:9090 -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG + - docker run --name $IMAGE_NAME -d -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - sleep 5 - docker ps -a - docker logs $IMAGE_NAME diff --git a/src/nbi/Dockerfile b/src/nbi/Dockerfile index a9be06d37..5f5aef914 100644 --- a/src/nbi/Dockerfile +++ b/src/nbi/Dockerfile @@ -16,7 +16,7 @@ FROM python:3.9-slim # Install dependencies RUN apt-get --yes --quiet --quiet update && \ - apt-get --yes --quiet --quiet install wget g++ git build-essential cmake libpcre2-dev python3-dev python3-cffi && \ + apt-get --yes --quiet --quiet install g++ git build-essential cmake libpcre2-dev python3-dev python3-cffi && \ rm -rf /var/lib/apt/lists/* # Download, build and install libyang. Note that APT package is outdated @@ -37,23 +37,11 @@ RUN ldconfig # Set Python to show logs as they occur ENV PYTHONUNBUFFERED=0 -# Download the gRPC health probe -RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ - wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ - chmod +x /bin/grpc_health_probe - # 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 -# Get common Python packages -# Note: this step enables sharing the previous Docker build steps among all the Python components -WORKDIR /var/teraflow -COPY common_requirements.in common_requirements.in -RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in -RUN python3 -m pip install -r common_requirements.txt - # Add common files into working directory WORKDIR /var/teraflow/common COPY src/common/. ./ @@ -94,4 +82,5 @@ RUN mkdir -p /var/teraflow/tests/tools COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ # Start the service -ENTRYPOINT ["python", "-m", "nbi.service"] +#ENTRYPOINT ["gunicorn", "-w", "4", "--worker-class", "eventlet", "-b", "0.0.0.0:8080", "nbi.service:nbi_app"] +ENTRYPOINT ["gunicorn", "-w", "4", "--worker-class", "geventwebsocket.gunicorn.workers.GeventWebSocketWorker", "-b", "0.0.0.0:8080", "nbi.service.app:nbi_app"] diff --git a/src/nbi/client/NbiClient.py b/src/nbi/client/NbiClient.py deleted file mode 100644 index 043035c5a..000000000 --- a/src/nbi/client/NbiClient.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 grpc, logging -from common.Constants import ServiceNameEnum -from common.Settings import get_service_host, get_service_port_grpc -from common.proto.nbi_pb2_grpc import NbiServiceStub -from common.proto.context_pb2 import ( - AuthenticationResult, Empty, Service, ServiceId, ServiceIdList, ServiceStatus, TeraFlowController) -from common.tools.client.RetryDecorator import retry, delay_exponential -from common.tools.grpc.Tools import grpc_message_to_json_string - -LOGGER = logging.getLogger(__name__) -MAX_RETRIES = 15 -DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) -RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') - -class NbiClient: - def __init__(self, host=None, port=None): - if not host: host = get_service_host(ServiceNameEnum.NBI) - if not port: port = get_service_port_grpc(ServiceNameEnum.NBI) - self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) - LOGGER.debug('Creating channel to {:s}...'.format(str(self.endpoint))) - self.channel = None - self.stub = None - self.connect() - LOGGER.debug('Channel created') - - def connect(self): - self.channel = grpc.insecure_channel(self.endpoint) - self.stub = NbiServiceStub(self.channel) - - def close(self): - if self.channel is not None: self.channel.close() - self.channel = None - self.stub = None - - @RETRY_DECORATOR - def CheckCredentials(self, request : TeraFlowController) -> AuthenticationResult: - LOGGER.debug('CheckCredentials request: {:s}'.format(grpc_message_to_json_string(request))) - response = self.stub.CheckCredentials(request) - LOGGER.debug('CheckCredentials result: {:s}'.format(grpc_message_to_json_string(response))) - return response - - @RETRY_DECORATOR - def GetConnectivityServiceStatus(self, request : ServiceId) -> ServiceStatus: - LOGGER.debug('GetConnectivityServiceStatus request: {:s}'.format(grpc_message_to_json_string(request))) - response = self.stub.GetConnectivityServiceStatus(request) - LOGGER.debug('GetConnectivityServiceStatus result: {:s}'.format(grpc_message_to_json_string(response))) - return response - - @RETRY_DECORATOR - def CreateConnectivityService(self, request : Service) -> ServiceId: - LOGGER.debug('CreateConnectivityService request: {:s}'.format(grpc_message_to_json_string(request))) - response = self.stub.CreateConnectivityService(request) - LOGGER.debug('CreateConnectivityService result: {:s}'.format(grpc_message_to_json_string(response))) - return response - - @RETRY_DECORATOR - def EditConnectivityService(self, request : Service) -> ServiceId: - LOGGER.debug('EditConnectivityService request: {:s}'.format(grpc_message_to_json_string(request))) - response = self.stub.EditConnectivityService(request) - LOGGER.debug('EditConnectivityService result: {:s}'.format(grpc_message_to_json_string(response))) - return response - - @RETRY_DECORATOR - def DeleteConnectivityService(self, request : Service) -> Empty: - LOGGER.debug('DeleteConnectivityService request: {:s}'.format(grpc_message_to_json_string(request))) - response = self.stub.DeleteConnectivityService(request) - LOGGER.debug('DeleteConnectivityService result: {:s}'.format(grpc_message_to_json_string(response))) - return response - - @RETRY_DECORATOR - def GetAllActiveConnectivityServices(self, request : Empty) -> ServiceIdList: - LOGGER.debug('GetAllActiveConnectivityServices request: {:s}'.format(grpc_message_to_json_string(request))) - response = self.stub.GetAllActiveConnectivityServices(request) - LOGGER.debug('GetAllActiveConnectivityServices result: {:s}'.format(grpc_message_to_json_string(response))) - return response - - @RETRY_DECORATOR - def ClearAllConnectivityServices(self, request : Empty) -> Empty: - LOGGER.debug('ClearAllConnectivityServices request: {:s}'.format(grpc_message_to_json_string(request))) - response = self.stub.ClearAllConnectivityServices(request) - LOGGER.debug('ClearAllConnectivityServices result: {:s}'.format(grpc_message_to_json_string(response))) - return response diff --git a/src/nbi/requirements.in b/src/nbi/requirements.in index d56ee821b..431dbf2d2 100644 --- a/src/nbi/requirements.in +++ b/src/nbi/requirements.in @@ -14,10 +14,14 @@ deepdiff==6.7.* deepmerge==1.1.* +eventlet Flask==2.1.3 Flask-HTTPAuth==4.5.0 Flask-RESTful==0.3.9 +flask-socketio jsonschema==4.4.0 +gevent +gunicorn libyang==2.8.4 netaddr==0.9.0 pyang==2.6.0 @@ -25,4 +29,19 @@ git+https://github.com/robshakir/pyangbind.git pydantic==2.6.3 requests==2.27.1 werkzeug==2.3.7 -websockets==12.0 +#websockets==12.0 + +# from common_requirements; take required ones +#coverage==6.3 +#grpcio==1.47.* +#grpcio-health-checking==1.47.* +#grpcio-reflection==1.47.* +#grpcio-tools==1.47.* +#grpclib==0.4.4 +#prettytable==3.5.0 +#prometheus-client==0.13.0 +#protobuf==3.20.* +#pytest==6.2.5 +#pytest-benchmark==3.4.1 +#python-dateutil==2.8.2 +#pytest-depends==1.0.1 diff --git a/src/nbi/service/NbiApplication.py b/src/nbi/service/NbiApplication.py new file mode 100644 index 000000000..5c2c00eac --- /dev/null +++ b/src/nbi/service/NbiApplication.py @@ -0,0 +1,63 @@ +import logging, time +from typing import Any, Optional +from flask import Flask, request +from flask_restful import Api, Resource +from flask_socketio import Namespace, SocketIO + + +LOGGER = logging.getLogger(__name__) + +def log_request(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 NbiApplication: + def __init__(self, base_url : Optional[str] = None) -> None: + if base_url is None: base_url = '' + self.base_url = base_url + + self.app = Flask(__name__) + self.app.after_request(log_request) + self.api = Api(self.app, prefix=base_url) + #websocket_path = '/'.join([base_url.rstrip('/'), 'websocket']) + self.sio = SocketIO(self.app, path=base_url, cors_allowed_origins="*") + + def add_rest_api_resource(self, resource_class : Resource, *urls, **kwargs) -> None: + self.api.add_resource(resource_class, *urls, **kwargs) + + def add_websocket_namespace(self, namespace_class : Namespace, namespace_url : str) -> None: + self.sio.on_namespace(namespace_class(namespace=namespace_url)) + + def websocket_emit_message( + self, event : str, *args : Any, namespace : str = "/", to : Optional[str] = None + ) -> None: + self.sio.emit(event, *args, namespace=namespace, to=to) + + def dump_configuration(self) -> None: + LOGGER.debug('Configured Resources:') + for resource in self.api.resources: + LOGGER.debug(' - {:s}'.format(str(resource))) + + LOGGER.debug('Configured Rules:') + for rule in self.app.url_map.iter_rules(): + LOGGER.debug(' - {:s}'.format(str(rule))) + + def run_standalone( + self, bind_address : Optional[str] = None, bind_port : Optional[int] = None + ) -> None: + # Run method used when started in a standalone mode, i.e., outside gunicorn or + # similar WSGI HTTP servers. Otherwise, use mechanism defined by the used + # WSGI HTTP server. + + #logging.getLogger('werkzeug').setLevel(logging.WARNING) + + endpoint = 'http://{:s}:{:s}'.format(str(bind_address), str(bind_port)) + if self.base_url is not None: + endpoint = '/'.join([endpoint.rstrip('/'), self.base_url]) + + LOGGER.info('Listening on {:s}...'.format(endpoint)) + self.sio.run(self.app, host=bind_address, port=bind_port) diff --git a/src/nbi/service/NbiService.py b/src/nbi/service/NbiService.py deleted file mode 100644 index fe7bf2e7b..000000000 --- a/src/nbi/service/NbiService.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES 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.Constants import ServiceNameEnum -from common.Settings import get_service_port_grpc -from common.proto.nbi_pb2_grpc import add_NbiServiceServicer_to_server -from common.tools.service.GenericGrpcService import GenericGrpcService -from nbi.service.NbiServiceServicerImpl import NbiServiceServicerImpl - -class NbiService(GenericGrpcService): - def __init__(self, cls_name: str = __name__) -> None: - port = get_service_port_grpc(ServiceNameEnum.NBI) - super().__init__(port, cls_name=cls_name) - self.nbi_servicer = NbiServiceServicerImpl() - - def install_servicers(self): - add_NbiServiceServicer_to_server(self.nbi_servicer, self.server) diff --git a/src/nbi/service/NbiServiceServicerImpl.py b/src/nbi/service/NbiServiceServicerImpl.py deleted file mode 100644 index 5719b67e4..000000000 --- a/src/nbi/service/NbiServiceServicerImpl.py +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 grpc, logging -from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method -from common.proto.context_pb2 import ( - AuthenticationResult, Empty, Service, ServiceId, ServiceIdList, ServiceStatus, TeraFlowController) -from common.proto.nbi_pb2_grpc import NbiServiceServicer - -LOGGER = logging.getLogger(__name__) - -METRICS_POOL = MetricsPool('NBI', 'RPC') - -class NbiServiceServicerImpl(NbiServiceServicer): - def __init__(self): - LOGGER.info('Creating Servicer...') - LOGGER.info('Servicer Created') - - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def CheckCredentials(self, request : TeraFlowController, context : grpc.ServicerContext) -> AuthenticationResult: - LOGGER.warning('NOT IMPLEMENTED') - return AuthenticationResult() - - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def GetConnectivityServiceStatus(self, request : ServiceId, context : grpc.ServicerContext) -> ServiceStatus: - LOGGER.warning('NOT IMPLEMENTED') - return ServiceStatus() - - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def CreateConnectivityService(self, request : Service, context : grpc.ServicerContext) -> ServiceId: - LOGGER.warning('NOT IMPLEMENTED') - return ServiceId() - - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def EditConnectivityService(self, request : Service, context : grpc.ServicerContext) -> ServiceId: - LOGGER.warning('NOT IMPLEMENTED') - return ServiceId() - - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def DeleteConnectivityService(self, request : Service, context : grpc.ServicerContext) -> Empty: - LOGGER.warning('NOT IMPLEMENTED') - return Empty() - - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def GetAllActiveConnectivityServices(self, request : Empty, context : grpc.ServicerContext) -> ServiceIdList: - LOGGER.warning('NOT IMPLEMENTED') - return ServiceIdList() - - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def ClearAllConnectivityServices(self, request : Empty, context : grpc.ServicerContext) -> Empty: - LOGGER.warning('NOT IMPLEMENTED') - return Empty() diff --git a/src/nbi/service/__main__.py b/src/nbi/service/app.py similarity index 53% rename from src/nbi/service/__main__.py rename to src/nbi/service/app.py index 1d470f4ea..023f1500b 100644 --- a/src/nbi/service/__main__.py +++ b/src/nbi/service/app.py @@ -12,16 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, signal, sys, threading +import logging +from typing import Optional from prometheus_client import start_http_server from common.Constants import ServiceNameEnum from common.Settings import ( ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, - get_env_var_name, get_log_level, get_metrics_port, + get_env_var_name, get_http_bind_address, get_log_level, + get_metrics_port, get_service_baseurl_http, get_service_port_http, wait_for_environment_variables ) -from .NbiService import NbiService -from .rest_server.RestServer import RestServer +from .NbiApplication import NbiApplication from .rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api from .rest_server.nbi_plugins.ietf_hardware import register_ietf_hardware from .rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn @@ -32,22 +33,34 @@ from .rest_server.nbi_plugins.ietf_acl import register_ietf_acl from .rest_server.nbi_plugins.qkd_app import register_qkd_app from .rest_server.nbi_plugins.tfs_api import register_tfs_api from .rest_server.nbi_plugins import register_restconf -from .context_subscription import register_context_subscription - -terminate = threading.Event() -LOGGER = None - -def signal_handler(signal, frame): # pylint: disable=redefined-outer-name, unused-argument - LOGGER.warning('Terminate signal received') - terminate.set() - -def main(): - global LOGGER # pylint: disable=global-statement - - log_level = get_log_level() - logging.basicConfig(level=log_level) - LOGGER = logging.getLogger(__name__) - +from .websocket_namespaces.hearthbeat import register_heartbeat + + +LOG_LEVEL = get_log_level() +logging.basicConfig(level=LOG_LEVEL) +LOGGER = logging.getLogger(__name__) + +BIND_ADDRESS = get_http_bind_address() +BIND_PORT = get_service_port_http(ServiceNameEnum.NBI) +BASE_URL = get_service_baseurl_http(ServiceNameEnum.NBI) or '' + +REGISTER_METHODS = [ + register_etsi_bwm_api, + register_ietf_hardware, + register_ietf_l2vpn, + register_ietf_l3vpn, + register_ietf_network, + register_ietf_nss, + register_ietf_acl, + register_qkd_app, + register_tfs_api, + register_restconf, + register_heartbeat, +] + +def configure_nbi( + base_url : Optional[str] = None +) -> NbiApplication: wait_for_environment_variables([ get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST ), get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC), @@ -57,52 +70,25 @@ def main(): get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), ]) - signal.signal(signal.SIGINT, signal_handler) - signal.signal(signal.SIGTERM, signal_handler) - LOGGER.info('Starting...') # Start metrics server metrics_port = get_metrics_port() start_http_server(metrics_port) - # Starting NBI service - grpc_service = NbiService() - grpc_service.start() - - rest_server = RestServer() - register_etsi_bwm_api(rest_server) - register_ietf_hardware(rest_server) - register_ietf_l2vpn(rest_server) # Registering L2VPN entrypoint - register_ietf_l3vpn(rest_server) # Registering L3VPN entrypoint - register_ietf_network(rest_server) - register_ietf_nss(rest_server) # Registering NSS entrypoint - register_ietf_acl(rest_server) - register_qkd_app(rest_server) - register_tfs_api(rest_server) - register_restconf(rest_server) - rest_server.start() - - register_context_subscription() - - LOGGER.debug('Configured Resources:') - for resource in rest_server.api.resources: - LOGGER.debug(' - {:s}'.format(str(resource))) - - LOGGER.debug('Configured Rules:') - for rule in rest_server.app.url_map.iter_rules(): - LOGGER.debug(' - {:s}'.format(str(rule))) + nbi_app = NbiApplication(base_url=base_url) - # Wait for Ctrl+C or termination signal - while not terminate.wait(timeout=1.0): pass + for register_method in REGISTER_METHODS: + register_method(nbi_app) - LOGGER.info('Terminating...') - grpc_service.stop() - rest_server.shutdown() - rest_server.join() + nbi_app.dump_configuration() - LOGGER.info('Bye') - return 0 + return nbi_app if __name__ == '__main__': - sys.exit(main()) + # Only used to run it locally during development stage; + # otherwise, app is directly launched by gunicorn. + _nbi_app = configure_nbi(base_url=BASE_URL) + _nbi_app.run_standalone( + bind_address=BIND_ADDRESS, bind_port=BIND_PORT + ) diff --git a/src/nbi/client/__init__.py b/src/nbi/service/websocket_namespaces/__init__.py similarity index 100% rename from src/nbi/client/__init__.py rename to src/nbi/service/websocket_namespaces/__init__.py diff --git a/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py b/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py new file mode 100644 index 000000000..b9b8b0be2 --- /dev/null +++ b/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py @@ -0,0 +1,41 @@ +import logging, threading, time +from flask import request +from flask_socketio import Namespace, join_room, leave_room +from nbi.service.NbiApplication import NbiApplication + +LOGGER = logging.getLogger(__name__) + +NAMESPACE_NAME = 'heartbeat' +NAMESPACE_URL = '/heartbeat' + +# WebSocket Heartbeat Namespace for debugging purposes +class DebugHeartbeatHandler(Namespace): + def on_connect(self): + LOGGER.debug('Client {:s} connected'.format(str(request.sid))) + join_room(NAMESPACE_NAME) + + def on_disconnect(self, reason): + LOGGER.debug('Client {:s} disconnected: reason={:s}'.format( + str(request.sid), str(reason) + )) + leave_room(NAMESPACE_NAME) + +class DebugHeartbeatThread(threading.Thread): + INTERVAL = 1 # second + + def __init__(self, nbi_app : NbiApplication): + super().__init__(daemon=True) + self.nbi_app = nbi_app + + def run(self): + interval = DebugHeartbeatThread.INTERVAL + start_time = time.time() + while True: + time.sleep(interval) + uptime = time.time() - start_time + self.nbi_app.websocket_emit_message( + 'uptime', {'uptime_seconds': uptime}, + namespace=NAMESPACE_URL, to=NAMESPACE_NAME + ) + +NAMESPACE_DESCRIPTOR = (NAMESPACE_NAME, DebugHeartbeatHandler, NAMESPACE_URL) diff --git a/src/nbi/service/rest_server/RestServer.py b/src/nbi/service/websocket_namespaces/hearthbeat/__init__.py similarity index 56% rename from src/nbi/service/rest_server/RestServer.py rename to src/nbi/service/websocket_namespaces/hearthbeat/__init__.py index 521de2735..435a425b4 100644 --- a/src/nbi/service/rest_server/RestServer.py +++ b/src/nbi/service/websocket_namespaces/hearthbeat/__init__.py @@ -12,12 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -from common.Constants import ServiceNameEnum -from common.Settings import get_service_baseurl_http, get_service_port_http -from common.tools.service.GenericRestServer import GenericRestServer -class RestServer(GenericRestServer): - def __init__(self, cls_name: str = __name__) -> None: - bind_port = get_service_port_http(ServiceNameEnum.NBI) - base_url = get_service_baseurl_http(ServiceNameEnum.NBI) - super().__init__(bind_port, base_url, cls_name=cls_name) +from nbi.service.NbiApplication import NbiApplication +from .HeartbeatNamespace import NAMESPACE_DESCRIPTOR + +def register_heartbeat(nbi_app : NbiApplication): + _, namespace_class, namespace_url = NAMESPACE_DESCRIPTOR + nbi_app.add_websocket_namespace(namespace_class, namespace_url) diff --git a/src/webui/service/__init__.py b/src/webui/service/__init__.py index f64ecca3b..d33e2118e 100644 --- a/src/webui/service/__init__.py +++ b/src/webui/service/__init__.py @@ -137,6 +137,6 @@ def create_app(use_config=None, web_app_root=None): 'is_deployed_slice' : is_deployed_slice, }) - if web_app_root is not None: + if web_app_root is not None and len(web_app_root) > 0: app.wsgi_app = SetSubAppMiddleware(app.wsgi_app, web_app_root) return app -- GitLab From 9e2b1dc75c46eada7f637d543b9c4463a3913f55 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 31 Jan 2025 08:28:01 +0000 Subject: [PATCH 220/463] Reactivate specific tests to validate NBI changes --- .gitlab-ci.yml | 2 +- src/tests/.gitlab-ci.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ce9084631..b3c19dbab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ stages: include: # #- local: '/manifests/.gitlab-ci.yml' # - local: '/src/monitoring/.gitlab-ci.yml' -# - local: '/src/nbi/.gitlab-ci.yml' + - local: '/src/nbi/.gitlab-ci.yml' # - local: '/src/context/.gitlab-ci.yml' # - local: '/src/device/.gitlab-ci.yml' # - local: '/src/service/.gitlab-ci.yml' diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index ec8ab77d9..41b855416 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -14,11 +14,11 @@ # include the individual .gitlab-ci.yml of each end-to-end integration test include: -# - local: '/src/tests/ofc22/.gitlab-ci.yml' + - local: '/src/tests/ofc22/.gitlab-ci.yml' # #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' # - local: '/src/tests/ecoc22/.gitlab-ci.yml' # #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' # #- local: '/src/tests/ofc23/.gitlab-ci.yml' # - local: '/src/tests/ofc24/.gitlab-ci.yml' -# - local: '/src/tests/eucnc24/.gitlab-ci.yml' + - local: '/src/tests/eucnc24/.gitlab-ci.yml' # - local: '/src/tests/ecoc24/.gitlab-ci.yml' -- GitLab From 5c617273862aef232a909c2225a4543309138486 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 31 Jan 2025 13:22:24 +0000 Subject: [PATCH 221/463] NBI component: - Re-added installation of common requirements - Updated specific requirements --- src/nbi/Dockerfile | 7 +++++++ src/nbi/requirements.in | 15 --------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/nbi/Dockerfile b/src/nbi/Dockerfile index 5f5aef914..5cddaf117 100644 --- a/src/nbi/Dockerfile +++ b/src/nbi/Dockerfile @@ -42,6 +42,13 @@ RUN python3 -m pip install --upgrade pip RUN python3 -m pip install --upgrade setuptools wheel RUN python3 -m pip install --upgrade pip-tools +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + # Add common files into working directory WORKDIR /var/teraflow/common COPY src/common/. ./ diff --git a/src/nbi/requirements.in b/src/nbi/requirements.in index 431dbf2d2..fc617a5cc 100644 --- a/src/nbi/requirements.in +++ b/src/nbi/requirements.in @@ -30,18 +30,3 @@ pydantic==2.6.3 requests==2.27.1 werkzeug==2.3.7 #websockets==12.0 - -# from common_requirements; take required ones -#coverage==6.3 -#grpcio==1.47.* -#grpcio-health-checking==1.47.* -#grpcio-reflection==1.47.* -#grpcio-tools==1.47.* -#grpclib==0.4.4 -#prettytable==3.5.0 -#prometheus-client==0.13.0 -#protobuf==3.20.* -#pytest==6.2.5 -#pytest-benchmark==3.4.1 -#python-dateutil==2.8.2 -#pytest-depends==1.0.1 -- GitLab From 177ec6aed1f574705faa1e96ab3c8b1a49d862ab Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 31 Jan 2025 13:24:46 +0000 Subject: [PATCH 222/463] NBI component: - Added missing headers --- src/nbi/service/NbiApplication.py | 15 +++++++++++++++ .../hearthbeat/HeartbeatNamespace.py | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/nbi/service/NbiApplication.py b/src/nbi/service/NbiApplication.py index 5c2c00eac..16e699810 100644 --- a/src/nbi/service/NbiApplication.py +++ b/src/nbi/service/NbiApplication.py @@ -1,3 +1,18 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, time from typing import Any, Optional from flask import Flask, request diff --git a/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py b/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py index b9b8b0be2..06a9569c7 100644 --- a/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py +++ b/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py @@ -1,3 +1,18 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, threading, time from flask import request from flask_socketio import Namespace, join_room, leave_room -- GitLab From c0836ec59b95c8cffd2c0b9733207e0e288e0392 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 31 Jan 2025 13:51:47 +0000 Subject: [PATCH 223/463] NBI component: - Added missing requirement --- src/nbi/requirements.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nbi/requirements.in b/src/nbi/requirements.in index fc617a5cc..02b5f39e7 100644 --- a/src/nbi/requirements.in +++ b/src/nbi/requirements.in @@ -21,6 +21,7 @@ Flask-RESTful==0.3.9 flask-socketio jsonschema==4.4.0 gevent +gevent-websocket gunicorn libyang==2.8.4 netaddr==0.9.0 -- GitLab From 1af896e77d7cb377d88158bec7b181746a0006d7 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 31 Jan 2025 15:54:21 +0000 Subject: [PATCH 224/463] NBI comopnent: - Add well-known/host-meta resource --- src/nbi/service/restapi_resources/__init__.py | 14 +++++++++++++ .../well_known_meta/Resources.py | 20 ++++++++++++++++++ .../well_known_meta/__init__.py | 21 +++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 src/nbi/service/restapi_resources/__init__.py create mode 100644 src/nbi/service/restapi_resources/well_known_meta/Resources.py create mode 100644 src/nbi/service/restapi_resources/well_known_meta/__init__.py diff --git a/src/nbi/service/restapi_resources/__init__.py b/src/nbi/service/restapi_resources/__init__.py new file mode 100644 index 000000000..53d5157f7 --- /dev/null +++ b/src/nbi/service/restapi_resources/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/nbi/service/restapi_resources/well_known_meta/Resources.py b/src/nbi/service/restapi_resources/well_known_meta/Resources.py new file mode 100644 index 000000000..8eab56f6b --- /dev/null +++ b/src/nbi/service/restapi_resources/well_known_meta/Resources.py @@ -0,0 +1,20 @@ +# RESTCONF .well-known endpoint (RFC 8040) +class WellKnownHostMeta(Resource): + def get(self): + response = { + "restconf": { + "capabilities": [ + "urn:ietf:params:restconf:capability:defaults:1.0", + "urn:ietf:params:restconf:capability:depth:1.0", + "urn:ietf:params:restconf:capability:with-defaults:1.0" + ], + "media-types": [ + "application/yang-data+json", + "application/yang-data+xml" + ] + } + } + return jsonify(response) + +# Register the RESTCONF .well-known endpoint +api.add_resource(WellKnownHostMeta, "/.well-known/host-meta") \ No newline at end of file diff --git a/src/nbi/service/restapi_resources/well_known_meta/__init__.py b/src/nbi/service/restapi_resources/well_known_meta/__init__.py new file mode 100644 index 000000000..d93bbd1ef --- /dev/null +++ b/src/nbi/service/restapi_resources/well_known_meta/__init__.py @@ -0,0 +1,21 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from nbi.service.NbiApplication import NbiApplication +from .WellKnownResource import RESOURCE_DESCRIPTOR + +def register_well_known(nbi_app : NbiApplication): + endpoint_name, resource_class, resource_url = RESOURCE_DESCRIPTOR + nbi_app.add_rest_api_resource(resource_class, resource_url, endpoint=endpoint_name) -- GitLab From 1f20c6f81be02ece263b6ee0ce082903640cfcf6 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 31 Jan 2025 15:56:55 +0000 Subject: [PATCH 225/463] NBI component: - fixed requirement versions --- src/nbi/requirements.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/nbi/requirements.in b/src/nbi/requirements.in index 02b5f39e7..8a4d1a1b9 100644 --- a/src/nbi/requirements.in +++ b/src/nbi/requirements.in @@ -14,15 +14,16 @@ deepdiff==6.7.* deepmerge==1.1.* -eventlet +eventlet==0.39.0 Flask==2.1.3 Flask-HTTPAuth==4.5.0 Flask-RESTful==0.3.9 -flask-socketio +flask-socketio==5.5.1 jsonschema==4.4.0 -gevent -gevent-websocket -gunicorn +gevent==24.11.1 +gevent-websocket==0.10.1 +greenlet==3.1.1 +gunicorn==23.0.0 libyang==2.8.4 netaddr==0.9.0 pyang==2.6.0 -- GitLab From ac416063a5939201608ac660ec6594ea2c2451a2 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Fri, 31 Jan 2025 15:58:15 +0000 Subject: [PATCH 226/463] NBI component: - temporarily disabled resources --- src/nbi/service/app.py | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/nbi/service/app.py b/src/nbi/service/app.py index 023f1500b..e20a83691 100644 --- a/src/nbi/service/app.py +++ b/src/nbi/service/app.py @@ -23,16 +23,16 @@ from common.Settings import ( wait_for_environment_variables ) from .NbiApplication import NbiApplication -from .rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api -from .rest_server.nbi_plugins.ietf_hardware import register_ietf_hardware -from .rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn -from .rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn -from .rest_server.nbi_plugins.ietf_network import register_ietf_network -from .rest_server.nbi_plugins.ietf_network_slice import register_ietf_nss -from .rest_server.nbi_plugins.ietf_acl import register_ietf_acl -from .rest_server.nbi_plugins.qkd_app import register_qkd_app -from .rest_server.nbi_plugins.tfs_api import register_tfs_api -from .rest_server.nbi_plugins import register_restconf +#from .rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api +#from .rest_server.nbi_plugins.ietf_hardware import register_ietf_hardware +#from .rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn +#from .rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn +#from .rest_server.nbi_plugins.ietf_network import register_ietf_network +#from .rest_server.nbi_plugins.ietf_network_slice import register_ietf_nss +#from .rest_server.nbi_plugins.ietf_acl import register_ietf_acl +#from .rest_server.nbi_plugins.qkd_app import register_qkd_app +#from .rest_server.nbi_plugins.tfs_api import register_tfs_api +#from .rest_server.nbi_plugins import register_restconf from .websocket_namespaces.hearthbeat import register_heartbeat @@ -45,16 +45,16 @@ BIND_PORT = get_service_port_http(ServiceNameEnum.NBI) BASE_URL = get_service_baseurl_http(ServiceNameEnum.NBI) or '' REGISTER_METHODS = [ - register_etsi_bwm_api, - register_ietf_hardware, - register_ietf_l2vpn, - register_ietf_l3vpn, - register_ietf_network, - register_ietf_nss, - register_ietf_acl, - register_qkd_app, - register_tfs_api, - register_restconf, + #register_etsi_bwm_api, + #register_ietf_hardware, + #register_ietf_l2vpn, + #register_ietf_l3vpn, + #register_ietf_network, + #register_ietf_nss, + #register_ietf_acl, + #register_qkd_app, + #register_tfs_api, + #register_restconf, register_heartbeat, ] -- GitLab From 686b4086579ceea71d1d5af1e8a2b3a6cf85ad99 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 31 Jan 2025 19:19:55 +0000 Subject: [PATCH 227/463] NBI component: - Corrected initalization script --- src/nbi/service/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nbi/service/app.py b/src/nbi/service/app.py index e20a83691..b37a90a3c 100644 --- a/src/nbi/service/app.py +++ b/src/nbi/service/app.py @@ -85,10 +85,11 @@ def configure_nbi( return nbi_app +nbi_app = configure_nbi(base_url=BASE_URL) + if __name__ == '__main__': # Only used to run it locally during development stage; # otherwise, app is directly launched by gunicorn. - _nbi_app = configure_nbi(base_url=BASE_URL) _nbi_app.run_standalone( bind_address=BIND_ADDRESS, bind_port=BIND_PORT ) -- GitLab From 3c252d35d4e11b747bd583b94a53db22a10222c6 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 16:59:23 +0100 Subject: [PATCH 228/463] debug: IP domain controller port changed in agg-net test of ofc25 --- src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml | 8 ++++++-- src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml | 8 ++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index b4c380b85..67530bbec 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -17,14 +17,16 @@ build ofc25_camara_agg_net: variables: TEST_NAME: 'ofc25-camara-agg-net-controller' IP_NAME: 'ip' - IP_PORT: '9090' + IP_PORT: '9092' stage: build before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') + - echo "HOST_IP: $HOST_IP" - sed -i "s/IP_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json - sed -i "s/IP_NET_PORT/${IP_PORT}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json + - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" @@ -48,7 +50,7 @@ end2end_test ofc25_camara_agg_net: variables: TEST_NAME: 'ofc25-camara-agg-net-controller' IP_NAME: 'ip' - IP_PORT: '9090' + IP_PORT: '9092' stage: end2end_test # Disable to force running it after all other tasks before_script: @@ -98,6 +100,8 @@ end2end_test ofc25_camara_agg_net: - kubectl --namespace tfs logs deployment/serviceservice -c server - kubectl --namespace tfs logs deployment/sliceservice -c server - kubectl --namespace tfs logs deployment/nbiservice -c server + - echo "L3VPN SDN Controller logs:" + - docker logs ${IP_NAME} # Destroy Scenario - kubectl delete namespaces tfs || true diff --git a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml index 42cef05aa..bf1326ad2 100644 --- a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml @@ -25,10 +25,12 @@ build ofc25_camara_e2e: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') + - echo "HOST_IP: $HOST_IP" - sed -i "s/AGG_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - sed -i "s/NCE_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - sed -i "s/AGG_NET_PORT/${AGG_NET_PORT}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - sed -i "s/NCE_PORT/${NCE_PORT}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json + - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" @@ -110,6 +112,12 @@ end2end_test ofc25_camara_e2e: - kubectl --namespace tfs logs deployment/sliceservice -c server - kubectl --namespace tfs logs deployment/nbiservice -c server + - echo "NCE logs:" + - docker logs ${NCE_NAME} + + - echo "Aggregation controller logs:" + - docker logs ${AGG_NET_NAME} + # Destroy Scenario - kubectl delete namespaces tfs || true -- GitLab From c5319aad9f0bf6947833c941df06285c7dba9157 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 17:09:48 +0100 Subject: [PATCH 229/463] debug: double quotes converted to single quote in .gitlab-ci.yml files of ofc25 e2e tests --- src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml | 5 ++--- src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index 67530bbec..dc6015241 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -23,10 +23,9 @@ build ofc25_camara_agg_net: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') - - echo "HOST_IP: $HOST_IP" + - echo 'HOST_IP: $HOST_IP' - sed -i "s/IP_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json - sed -i "s/IP_NET_PORT/${IP_PORT}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json - - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" @@ -100,7 +99,7 @@ end2end_test ofc25_camara_agg_net: - kubectl --namespace tfs logs deployment/serviceservice -c server - kubectl --namespace tfs logs deployment/sliceservice -c server - kubectl --namespace tfs logs deployment/nbiservice -c server - - echo "L3VPN SDN Controller logs:" + - echo 'L3VPN SDN Controller logs:' - docker logs ${IP_NAME} # Destroy Scenario diff --git a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml index bf1326ad2..860b92a55 100644 --- a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml @@ -25,12 +25,11 @@ build ofc25_camara_e2e: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') - - echo "HOST_IP: $HOST_IP" + - echo 'HOST_IP: $HOST_IP' - sed -i "s/AGG_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - sed -i "s/NCE_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - sed -i "s/AGG_NET_PORT/${AGG_NET_PORT}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - sed -i "s/NCE_PORT/${NCE_PORT}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" @@ -112,10 +111,10 @@ end2end_test ofc25_camara_e2e: - kubectl --namespace tfs logs deployment/sliceservice -c server - kubectl --namespace tfs logs deployment/nbiservice -c server - - echo "NCE logs:" + - echo 'NCE logs:' - docker logs ${NCE_NAME} - - echo "Aggregation controller logs:" + - echo 'Aggregation controller logs:' - docker logs ${AGG_NET_NAME} # Destroy Scenario -- GitLab From 3bd6568cd00569339da0517d1595783419f27e39 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 17:36:16 +0100 Subject: [PATCH 230/463] debug: echoes removed from ofc25 gitlab-ci files --- src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml | 2 -- src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index dc6015241..9027b088d 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -23,7 +23,6 @@ build ofc25_camara_agg_net: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') - - echo 'HOST_IP: $HOST_IP' - sed -i "s/IP_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json - sed -i "s/IP_NET_PORT/${IP_PORT}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . @@ -99,7 +98,6 @@ end2end_test ofc25_camara_agg_net: - kubectl --namespace tfs logs deployment/serviceservice -c server - kubectl --namespace tfs logs deployment/sliceservice -c server - kubectl --namespace tfs logs deployment/nbiservice -c server - - echo 'L3VPN SDN Controller logs:' - docker logs ${IP_NAME} # Destroy Scenario diff --git a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml index 860b92a55..d2ef998ec 100644 --- a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml @@ -25,7 +25,6 @@ build ofc25_camara_e2e: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') - - echo 'HOST_IP: $HOST_IP' - sed -i "s/AGG_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - sed -i "s/NCE_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - sed -i "s/AGG_NET_PORT/${AGG_NET_PORT}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json @@ -111,10 +110,8 @@ end2end_test ofc25_camara_e2e: - kubectl --namespace tfs logs deployment/sliceservice -c server - kubectl --namespace tfs logs deployment/nbiservice -c server - - echo 'NCE logs:' - docker logs ${NCE_NAME} - - echo 'Aggregation controller logs:' - docker logs ${AGG_NET_NAME} # Destroy Scenario -- GitLab From d54776419b4a25d63fda8386608a7068e8c756c4 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 18:28:25 +0100 Subject: [PATCH 231/463] debug: placeholders added to ofc25 camara agg net topology --- .../data/agg-net-descriptor.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/ofc25-camara-agg-net-controller/data/agg-net-descriptor.json b/src/tests/ofc25-camara-agg-net-controller/data/agg-net-descriptor.json index 5874fd3b4..5e0e612dd 100644 --- a/src/tests/ofc25-camara-agg-net-controller/data/agg-net-descriptor.json +++ b/src/tests/ofc25-camara-agg-net-controller/data/agg-net-descriptor.json @@ -41,14 +41,14 @@ "action": 1, "custom": { "resource_key": "_connect/address", - "resource_value": "192.168.1.27" + "resource_value": "IP_NET_IP" } }, { "action": 1, "custom": { "resource_key": "_connect/port", - "resource_value": "9090" + "resource_value": "IP_NET_PORT" } }, { -- GitLab From 1e85875dfdb44518e012ae5a2805dc434602c97c Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 19:51:03 +0100 Subject: [PATCH 232/463] debug: image building moved to the actual ofc25 tests --- .../.gitlab-ci.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index 9027b088d..34161f461 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -21,16 +21,6 @@ build ofc25_camara_agg_net: stage: build before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') - - sed -i "s/IP_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json - - sed -i "s/IP_NET_PORT/${IP_PORT}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json - - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . - - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - - docker buildx build -t "${IP_NAME}:latest" -f ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl - - docker tag "${IP_NAME}:latest" "$CI_REGISTRY_IMAGE/${IP_NAME}:latest" - - docker push "$CI_REGISTRY_IMAGE/${IP_NAME}:latest" after_script: - docker images --filter="dangling=true" --quiet | xargs -r docker rmi rules: @@ -52,6 +42,15 @@ end2end_test ofc25_camara_agg_net: stage: end2end_test # Disable to force running it after all other tasks before_script: + - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') + - sed -i "s/IP_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json + - sed -i "s/IP_NET_PORT/${IP_PORT}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json + - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . + - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + - docker buildx build -t "${IP_NAME}:latest" -f ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl + - docker tag "${IP_NAME}:latest" "$CI_REGISTRY_IMAGE/${IP_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${IP_NAME}:latest" - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker rm -f ${TEST_NAME} || true - docker pull "${CI_REGISTRY_IMAGE}/${IP_NAME}:latest" -- GitLab From 776c61b7fcd2c87490223fd47903ed623ac187d4 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 19:52:15 +0100 Subject: [PATCH 233/463] debug: script added to ofc25 tests --- src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index 34161f461..aa402b016 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -21,6 +21,7 @@ build ofc25_camara_agg_net: stage: build before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: after_script: - docker images --filter="dangling=true" --quiet | xargs -r docker rmi rules: -- GitLab From d8f6da4336a459fa808a3f39385984c383f3211c Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 19:53:23 +0100 Subject: [PATCH 234/463] after script removed from ofc25 e2e tests --- src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index aa402b016..7f6a76a76 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -22,7 +22,6 @@ build ofc25_camara_agg_net: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - after_script: - docker images --filter="dangling=true" --quiet | xargs -r docker rmi rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' -- GitLab From 4d86039f6dd2876142dff41d1e1ae32c6a60ed03 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 20:11:23 +0100 Subject: [PATCH 235/463] debug --- .../.gitlab-ci.yml | 2 +- .../.gitlab-ci.yml | 29 +++++++++---------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index 7f6a76a76..1a14f9717 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -42,6 +42,7 @@ end2end_test ofc25_camara_agg_net: stage: end2end_test # Disable to force running it after all other tasks before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') - sed -i "s/IP_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json - sed -i "s/IP_NET_PORT/${IP_PORT}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json @@ -51,7 +52,6 @@ end2end_test ofc25_camara_agg_net: - docker buildx build -t "${IP_NAME}:latest" -f ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl - docker tag "${IP_NAME}:latest" "$CI_REGISTRY_IMAGE/${IP_NAME}:latest" - docker push "$CI_REGISTRY_IMAGE/${IP_NAME}:latest" - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker rm -f ${TEST_NAME} || true - docker pull "${CI_REGISTRY_IMAGE}/${IP_NAME}:latest" - docker run -d --name ${IP_NAME} -p ${IP_PORT}:8443 $CI_REGISTRY_IMAGE/${IP_NAME}:latest diff --git a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml index d2ef998ec..89cf55f27 100644 --- a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml @@ -24,21 +24,6 @@ build ofc25_camara_e2e: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') - - sed -i "s/AGG_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - - sed -i "s/NCE_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - - sed -i "s/AGG_NET_PORT/${AGG_NET_PORT}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - - sed -i "s/NCE_PORT/${NCE_PORT}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . - - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - - docker buildx build -t "${NCE_NAME}:latest" -f ./src/tests/tools/mock_nce_ctrl/Dockerfile ./src/tests/tools/mock_nce_ctrl - - docker tag "${NCE_NAME}:latest" "$CI_REGISTRY_IMAGE/${NCE_NAME}:latest" - - docker push "$CI_REGISTRY_IMAGE/${NCE_NAME}:latest" - - docker buildx build -t "${AGG_NET_NAME}:latest" -f ./src/tests/tools/mock_ietf_network_slice_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_network_slice_sdn_ctrl - - docker tag "${AGG_NET_NAME}:latest" "$CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest" - - docker push "$CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest" - after_script: - docker images --filter="dangling=true" --quiet | xargs -r docker rmi rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' @@ -62,6 +47,20 @@ end2end_test ofc25_camara_e2e: # Disable to force running it after all other tasks before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - HOST_IP=$(kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP") | .address') + - sed -i "s/AGG_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json + - sed -i "s/NCE_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json + - sed -i "s/AGG_NET_PORT/${AGG_NET_PORT}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json + - sed -i "s/NCE_PORT/${NCE_PORT}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json + - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . + - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + - docker buildx build -t "${NCE_NAME}:latest" -f ./src/tests/tools/mock_nce_ctrl/Dockerfile ./src/tests/tools/mock_nce_ctrl + - docker tag "${NCE_NAME}:latest" "$CI_REGISTRY_IMAGE/${NCE_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${NCE_NAME}:latest" + - docker buildx build -t "${AGG_NET_NAME}:latest" -f ./src/tests/tools/mock_ietf_network_slice_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_network_slice_sdn_ctrl + - docker tag "${AGG_NET_NAME}:latest" "$CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest" - docker rm -f ${TEST_NAME} || true - docker pull "${CI_REGISTRY_IMAGE}/${NCE_NAME}:latest" - docker run -d --name ${NCE_NAME} -p ${NCE_PORT}:8443 $CI_REGISTRY_IMAGE/${NCE_NAME}:latest -- GitLab From 41efb8cd40f3806541bc75afc35c2c36c7239a87 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 20:23:04 +0100 Subject: [PATCH 236/463] debug: kpi gitlab-ci process deactivated --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2fe405733..5b3b3ba3c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,11 +46,11 @@ include: #- local: '/src/dlt/.gitlab-ci.yml' - local: '/src/load_generator/.gitlab-ci.yml' - local: '/src/bgpls_speaker/.gitlab-ci.yml' - - local: '/src/kpi_manager/.gitlab-ci.yml' - - local: '/src/kpi_value_api/.gitlab-ci.yml' - - local: '/src/kpi_value_writer/.gitlab-ci.yml' - - local: '/src/telemetry/.gitlab-ci.yml' - - local: '/src/analytics/.gitlab-ci.yml' + # - local: '/src/kpi_manager/.gitlab-ci.yml' + # - local: '/src/kpi_value_api/.gitlab-ci.yml' + # - local: '/src/kpi_value_writer/.gitlab-ci.yml' + # - local: '/src/telemetry/.gitlab-ci.yml' + # - local: '/src/analytics/.gitlab-ci.yml' - local: '/src/qos_profile/.gitlab-ci.yml' - local: '/src/vnt_manager/.gitlab-ci.yml' - local: '/src/e2e_orchestrator/.gitlab-ci.yml' -- GitLab From 3e1f3b8fd26d4c056e02c38eaf4adecb1253b503 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 20:28:36 +0100 Subject: [PATCH 237/463] debug: tests commented in main gitlab-ci --- .gitlab-ci.yml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5b3b3ba3c..d7430da38 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,38 +22,38 @@ stages: # include the individual .gitlab-ci.yml of each micro-service and tests include: #- local: '/manifests/.gitlab-ci.yml' - - local: '/src/monitoring/.gitlab-ci.yml' - - local: '/src/nbi/.gitlab-ci.yml' - - local: '/src/context/.gitlab-ci.yml' - - local: '/src/device/.gitlab-ci.yml' - - local: '/src/service/.gitlab-ci.yml' - - local: '/src/dbscanserving/.gitlab-ci.yml' - - local: '/src/opticalattackmitigator/.gitlab-ci.yml' - - local: '/src/opticalattackdetector/.gitlab-ci.yml' - - local: '/src/opticalattackmanager/.gitlab-ci.yml' - - local: '/src/opticalcontroller/.gitlab-ci.yml' - - local: '/src/ztp/.gitlab-ci.yml' - - local: '/src/policy/.gitlab-ci.yml' - - local: '/src/automation/.gitlab-ci.yml' - - local: '/src/forecaster/.gitlab-ci.yml' + # - local: '/src/monitoring/.gitlab-ci.yml' + # - local: '/src/nbi/.gitlab-ci.yml' + # - local: '/src/context/.gitlab-ci.yml' + # - local: '/src/device/.gitlab-ci.yml' + # - local: '/src/service/.gitlab-ci.yml' + # - local: '/src/dbscanserving/.gitlab-ci.yml' + # - local: '/src/opticalattackmitigator/.gitlab-ci.yml' + # - local: '/src/opticalattackdetector/.gitlab-ci.yml' + # - local: '/src/opticalattackmanager/.gitlab-ci.yml' + # - local: '/src/opticalcontroller/.gitlab-ci.yml' + # - local: '/src/ztp/.gitlab-ci.yml' + # - local: '/src/policy/.gitlab-ci.yml' + # - local: '/src/automation/.gitlab-ci.yml' + # - local: '/src/forecaster/.gitlab-ci.yml' #- local: '/src/webui/.gitlab-ci.yml' #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' - - local: '/src/slice/.gitlab-ci.yml' + # - local: '/src/slice/.gitlab-ci.yml' #- local: '/src/interdomain/.gitlab-ci.yml' - - local: '/src/pathcomp/.gitlab-ci.yml' + # - local: '/src/pathcomp/.gitlab-ci.yml' #- local: '/src/dlt/.gitlab-ci.yml' - - local: '/src/load_generator/.gitlab-ci.yml' - - local: '/src/bgpls_speaker/.gitlab-ci.yml' + # - local: '/src/load_generator/.gitlab-ci.yml' + # - local: '/src/bgpls_speaker/.gitlab-ci.yml' # - local: '/src/kpi_manager/.gitlab-ci.yml' # - local: '/src/kpi_value_api/.gitlab-ci.yml' # - local: '/src/kpi_value_writer/.gitlab-ci.yml' # - local: '/src/telemetry/.gitlab-ci.yml' # - local: '/src/analytics/.gitlab-ci.yml' - - local: '/src/qos_profile/.gitlab-ci.yml' - - local: '/src/vnt_manager/.gitlab-ci.yml' - - local: '/src/e2e_orchestrator/.gitlab-ci.yml' + # - local: '/src/qos_profile/.gitlab-ci.yml' + # - local: '/src/vnt_manager/.gitlab-ci.yml' + # - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' -- GitLab From e7a85c0792235327710905599fe73fc67a6b694a Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 20:36:20 +0100 Subject: [PATCH 238/463] ofc25 gitlab-ci change --- .../ofc25-camara-agg-net-controller/.gitlab-ci.yml | 8 -------- src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml | 11 ----------- 2 files changed, 19 deletions(-) diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index 1a14f9717..8c6ed1d2c 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -47,19 +47,11 @@ end2end_test ofc25_camara_agg_net: - sed -i "s/IP_NET_IP/${HOST_IP}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json - sed -i "s/IP_NET_PORT/${IP_PORT}/g" src/tests/${TEST_NAME}/data/agg-net-descriptor.json - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . - - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - docker buildx build -t "${IP_NAME}:latest" -f ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl - - docker tag "${IP_NAME}:latest" "$CI_REGISTRY_IMAGE/${IP_NAME}:latest" - - docker push "$CI_REGISTRY_IMAGE/${IP_NAME}:latest" - docker rm -f ${TEST_NAME} || true - - docker pull "${CI_REGISTRY_IMAGE}/${IP_NAME}:latest" - docker run -d --name ${IP_NAME} -p ${IP_PORT}:8443 $CI_REGISTRY_IMAGE/${IP_NAME}:latest script: - # Download Docker image to run the test - - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}:latest" - # Check MicroK8s is ready - microk8s status --wait-ready - kubectl get pods --all-namespaces diff --git a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml index 89cf55f27..e8b646dc3 100644 --- a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml @@ -53,24 +53,13 @@ end2end_test ofc25_camara_e2e: - sed -i "s/AGG_NET_PORT/${AGG_NET_PORT}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - sed -i "s/NCE_PORT/${NCE_PORT}/g" src/tests/${TEST_NAME}/data/camara-e2e-topology.json - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . - - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" - docker buildx build -t "${NCE_NAME}:latest" -f ./src/tests/tools/mock_nce_ctrl/Dockerfile ./src/tests/tools/mock_nce_ctrl - - docker tag "${NCE_NAME}:latest" "$CI_REGISTRY_IMAGE/${NCE_NAME}:latest" - - docker push "$CI_REGISTRY_IMAGE/${NCE_NAME}:latest" - docker buildx build -t "${AGG_NET_NAME}:latest" -f ./src/tests/tools/mock_ietf_network_slice_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_network_slice_sdn_ctrl - - docker tag "${AGG_NET_NAME}:latest" "$CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest" - - docker push "$CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest" - docker rm -f ${TEST_NAME} || true - - docker pull "${CI_REGISTRY_IMAGE}/${NCE_NAME}:latest" - docker run -d --name ${NCE_NAME} -p ${NCE_PORT}:8443 $CI_REGISTRY_IMAGE/${NCE_NAME}:latest - - docker pull "${CI_REGISTRY_IMAGE}/${AGG_NET_NAME}:latest" - docker run -d --name ${AGG_NET_NAME} -p ${AGG_NET_PORT}:8443 $CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest script: - # Download Docker image to run the test - - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}:latest" - # Check MicroK8s is ready - microk8s status --wait-ready - kubectl get pods --all-namespaces -- GitLab From 66363117c3eacb963960eb01359ef32ad75474ed Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 20:38:59 +0100 Subject: [PATCH 239/463] ofc25 gitlab-ci change --- .../.gitlab-ci.yml | 21 ----------------- .../.gitlab-ci.yml | 23 ------------------- 2 files changed, 44 deletions(-) diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index 8c6ed1d2c..e20717651 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -12,27 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Build, tag, and push the Docker images to the GitLab Docker registry -build ofc25_camara_agg_net: - variables: - TEST_NAME: 'ofc25-camara-agg-net-controller' - IP_NAME: 'ip' - IP_PORT: '9092' - stage: build - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - docker images --filter="dangling=true" --quiet | xargs -r docker rmi - rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' - - changes: - - src/common/**/*.py - - proto/*.proto - - src/tests/${TEST_NAME}/**/*.{py,in,sh,yml} - - src/tests/${TEST_NAME}/Dockerfile - - .gitlab-ci.yml - # Deploy TeraFlowSDN and Execute end-2-end test end2end_test ofc25_camara_agg_net: variables: diff --git a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml index e8b646dc3..9b07bd021 100644 --- a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml @@ -12,29 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Build, tag, and push the Docker images to the GitLab Docker registry -build ofc25_camara_e2e: - variables: - TEST_NAME: 'ofc25-camara-e2e-controller' - NCE_NAME: 'nce' - AGG_NET_NAME: 'agg_net' - NCE_PORT: '9090' - AGG_NET_PORT: '9091' - stage: build - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - docker images --filter="dangling=true" --quiet | xargs -r docker rmi - rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' - - changes: - - src/common/**/*.py - - proto/*.proto - - src/tests/${TEST_NAME}/**/*.{py,in,sh,yml} - - src/tests/${TEST_NAME}/Dockerfile - - .gitlab-ci.yml - # Deploy TeraFlowSDN and Execute end-2-end test end2end_test ofc25_camara_e2e: variables: -- GitLab From a74ee4bf6842251c69f1a3f105bbd6a1706a7733 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 20:43:09 +0100 Subject: [PATCH 240/463] debug: agg-net and nce containers removed before and after the test --- src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml | 4 ++++ src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index e20717651..b757e184f 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -28,6 +28,7 @@ end2end_test ofc25_camara_agg_net: - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . - docker buildx build -t "${IP_NAME}:latest" -f ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl - docker rm -f ${TEST_NAME} || true + - docker rm -f ${IP_NAME} || true - docker run -d --name ${IP_NAME} -p ${IP_PORT}:8443 $CI_REGISTRY_IMAGE/${IP_NAME}:latest script: @@ -73,6 +74,9 @@ end2end_test ofc25_camara_agg_net: # Destroy Scenario - kubectl delete namespaces tfs || true + - docker rm -f ${TEST_NAME} || true + - docker rm -f ${IP_NAME} || true + # Clean old docker images - docker images --filter="dangling=true" --quiet | xargs -r docker rmi diff --git a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml index 9b07bd021..571d3ddea 100644 --- a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml @@ -33,6 +33,8 @@ end2end_test ofc25_camara_e2e: - docker buildx build -t "${NCE_NAME}:latest" -f ./src/tests/tools/mock_nce_ctrl/Dockerfile ./src/tests/tools/mock_nce_ctrl - docker buildx build -t "${AGG_NET_NAME}:latest" -f ./src/tests/tools/mock_ietf_network_slice_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_network_slice_sdn_ctrl - docker rm -f ${TEST_NAME} || true + - docker rm -f ${AGG_NET_NAME} || true + - docker rm -f ${NCE_NAME} || true - docker run -d --name ${NCE_NAME} -p ${NCE_PORT}:8443 $CI_REGISTRY_IMAGE/${NCE_NAME}:latest - docker run -d --name ${AGG_NET_NAME} -p ${AGG_NET_PORT}:8443 $CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest @@ -82,6 +84,10 @@ end2end_test ofc25_camara_e2e: # Destroy Scenario - kubectl delete namespaces tfs || true + - docker rm -f ${TEST_NAME} || true + - docker rm -f ${AGG_NET_NAME} || true + - docker rm -f ${NCE_NAME} || true + # Clean old docker images - docker images --filter="dangling=true" --quiet | xargs -r docker rmi -- GitLab From ec61adb1a02f481d8229a257516371bae88bfa16 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 20:53:11 +0100 Subject: [PATCH 241/463] debug: port changed to 9092 in agg-net e2e test --- .../tests/test_agg_net_ietf_slice_operations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ofc25-camara-agg-net-controller/tests/test_agg_net_ietf_slice_operations.py b/src/tests/ofc25-camara-agg-net-controller/tests/test_agg_net_ietf_slice_operations.py index b2c086fd0..d15a8bbb6 100644 --- a/src/tests/ofc25-camara-agg-net-controller/tests/test_agg_net_ietf_slice_operations.py +++ b/src/tests/ofc25-camara-agg-net-controller/tests/test_agg_net_ietf_slice_operations.py @@ -84,7 +84,7 @@ NBI_USERNAME = "admin" NBI_PASSWORD = "admin" IP_ADDRESS = "localhost" -IP_PORT = 9090 +IP_PORT = 9092 BASE_IETF_SLICE_URL = f"http://{NBI_ADDRESS}:{NBI_PORT}/restconf/data/ietf-network-slice-service:network-slice-services" IP_L3VPN_URL = f"http://{IP_ADDRESS}:{IP_PORT}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" -- GitLab From 6bbcee430bd26785965f88d472f1f58a1dacf71f Mon Sep 17 00:00:00 2001 From: hajipour Date: Sat, 1 Feb 2025 21:15:26 +0100 Subject: [PATCH 242/463] debug: pulling from registry removed for ofc25 e2e tests --- src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml | 6 +++--- src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml index b757e184f..f69c37b38 100644 --- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml @@ -29,7 +29,7 @@ end2end_test ofc25_camara_agg_net: - docker buildx build -t "${IP_NAME}:latest" -f ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/Dockerfile ./src/tests/tools/mock_ietf_l3vpn_sdn_ctrl - docker rm -f ${TEST_NAME} || true - docker rm -f ${IP_NAME} || true - - docker run -d --name ${IP_NAME} -p ${IP_PORT}:8443 $CI_REGISTRY_IMAGE/${IP_NAME}:latest + - docker run -d --name ${IP_NAME} -p ${IP_PORT}:8443 ${IP_NAME}:latest script: # Check MicroK8s is ready @@ -53,14 +53,14 @@ end2end_test ofc25_camara_agg_net: docker run -t --rm --name ${TEST_NAME} --network=host --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" - $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-onboarding.sh + ${TEST_NAME}:latest /var/teraflow/run-onboarding.sh # Run end-to-end test: configure service TFS - > docker run -t --rm --name ${TEST_NAME} --network=host --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" - $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-agg-net-ietf-slice-operations.sh + ${TEST_NAME}:latest /var/teraflow/run-agg-net-ietf-slice-operations.sh after_script: - kubectl --namespace tfs logs deployment/contextservice -c server diff --git a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml index 571d3ddea..c78468180 100644 --- a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml +++ b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml @@ -35,8 +35,8 @@ end2end_test ofc25_camara_e2e: - docker rm -f ${TEST_NAME} || true - docker rm -f ${AGG_NET_NAME} || true - docker rm -f ${NCE_NAME} || true - - docker run -d --name ${NCE_NAME} -p ${NCE_PORT}:8443 $CI_REGISTRY_IMAGE/${NCE_NAME}:latest - - docker run -d --name ${AGG_NET_NAME} -p ${AGG_NET_PORT}:8443 $CI_REGISTRY_IMAGE/${AGG_NET_NAME}:latest + - docker run -d --name ${NCE_NAME} -p ${NCE_PORT}:8443 ${NCE_NAME}:latest + - docker run -d --name ${AGG_NET_NAME} -p ${AGG_NET_PORT}:8443 ${AGG_NET_NAME}:latest script: # Check MicroK8s is ready @@ -60,14 +60,14 @@ end2end_test ofc25_camara_e2e: docker run -t --rm --name ${TEST_NAME} --network=host --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" - $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-onboarding.sh + ${TEST_NAME}:latest /var/teraflow/run-onboarding.sh # Run end-to-end test: configure service TFS - > docker run -t --rm --name ${TEST_NAME} --network=host --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" - $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-e2e-ietf-slice-operations.sh + ${TEST_NAME}:latest /var/teraflow/run-e2e-ietf-slice-operations.sh after_script: - kubectl --namespace tfs logs deployment/contextservice -c server -- GitLab From ebfe46cf16bab1f32d5fedd116b6df3aa7edc911 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 3 Feb 2025 07:46:40 +0000 Subject: [PATCH 243/463] NBI component: - Deactivated metrics as no endpoint uses them and they cause "address already in use" when launching multiple `gunicorn` workers. --- manifests/nbiservice.yaml | 16 +++++++++++----- src/nbi/service/app.py | 24 +++++++++++++++++++----- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/manifests/nbiservice.yaml b/manifests/nbiservice.yaml index 108195d37..7725cb501 100644 --- a/manifests/nbiservice.yaml +++ b/manifests/nbiservice.yaml @@ -33,7 +33,10 @@ spec: imagePullPolicy: Always ports: - containerPort: 8080 - - containerPort: 9192 + # Metrics disabled for now. No NBI endpoint uses it and + # causes "address already in use" when deploying multiple + # gunicorn workers. + #- containerPort: 9192 env: - name: LOG_LEVEL value: "INFO" @@ -78,7 +81,10 @@ spec: protocol: TCP port: 8080 targetPort: 8080 - - name: metrics - protocol: TCP - port: 9192 - targetPort: 9192 + # Metrics disabled for now. No NBI endpoint uses it and + # causes "address already in use" when deploying multiple + # gunicorn workers. + #- name: metrics + # protocol: TCP + # port: 9192 + # targetPort: 9192 diff --git a/src/nbi/service/app.py b/src/nbi/service/app.py index b37a90a3c..f45b87b2c 100644 --- a/src/nbi/service/app.py +++ b/src/nbi/service/app.py @@ -14,12 +14,23 @@ import logging from typing import Optional -from prometheus_client import start_http_server + +# NOTE: Metrics disabled for now. No NBI endpoint uses it and +# causes "address already in use" when deploying multiple +# gunicorn workers. +#from prometheus_client import start_http_server + from common.Constants import ServiceNameEnum from common.Settings import ( ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, get_http_bind_address, get_log_level, - get_metrics_port, get_service_baseurl_http, get_service_port_http, + + # NOTE: Metrics disabled for now. No NBI endpoint uses it and + # causes "address already in use" when deploying multiple + # gunicorn workers. + #get_metrics_port, + + get_service_baseurl_http, get_service_port_http, wait_for_environment_variables ) from .NbiApplication import NbiApplication @@ -73,8 +84,11 @@ def configure_nbi( LOGGER.info('Starting...') # Start metrics server - metrics_port = get_metrics_port() - start_http_server(metrics_port) + # NOTE: Metrics disabled for now. No NBI endpoint uses it and + # causes "address already in use" when deploying multiple + # gunicorn workers. + #metrics_port = get_metrics_port() + #start_http_server(metrics_port) nbi_app = NbiApplication(base_url=base_url) @@ -85,7 +99,7 @@ def configure_nbi( return nbi_app -nbi_app = configure_nbi(base_url=BASE_URL) +_nbi_app = configure_nbi(base_url=BASE_URL) if __name__ == '__main__': # Only used to run it locally during development stage; -- GitLab From 9c366d8b01240c4e2cbf996d75d5e5f1fcbb3039 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 3 Feb 2025 07:58:06 +0000 Subject: [PATCH 244/463] NBI component: - Renamed symbol `_nbi_app` to `nbi_app` --- src/nbi/service/app.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nbi/service/app.py b/src/nbi/service/app.py index f45b87b2c..db696efd6 100644 --- a/src/nbi/service/app.py +++ b/src/nbi/service/app.py @@ -90,20 +90,20 @@ def configure_nbi( #metrics_port = get_metrics_port() #start_http_server(metrics_port) - nbi_app = NbiApplication(base_url=base_url) + _nbi_app = NbiApplication(base_url=base_url) for register_method in REGISTER_METHODS: - register_method(nbi_app) + register_method(_nbi_app) - nbi_app.dump_configuration() + _nbi_app.dump_configuration() - return nbi_app + return _nbi_app -_nbi_app = configure_nbi(base_url=BASE_URL) +nbi_app = configure_nbi(base_url=BASE_URL) if __name__ == '__main__': # Only used to run it locally during development stage; # otherwise, app is directly launched by gunicorn. - _nbi_app.run_standalone( + nbi_app.run_standalone( bind_address=BIND_ADDRESS, bind_port=BIND_PORT ) -- GitLab From 3cbdaf3d67d20985d0c238942e93bfa3f2cd4e47 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 3 Feb 2025 08:20:36 +0000 Subject: [PATCH 245/463] NBI component: - Corrected gunicorn-consumed symbol - Extended dump_configuration() to dump configured websocket namespaces - Added missing environment variables in unitary test - Minor code polishing --- src/nbi/.gitlab-ci.yml | 8 +++++++- src/nbi/Dockerfile | 2 +- src/nbi/service/NbiApplication.py | 31 +++++++++++++++++++------------ src/nbi/service/app.py | 2 ++ 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index d97fab701..0bcf058fb 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -62,7 +62,13 @@ unit_test nbi: fi script: - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" - - docker run --name $IMAGE_NAME -d -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG + - > + docker run --name $IMAGE_NAME -d -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" + --network=teraflowbridge + --env LOG_LEVEL=DEBUG + --env FLASK_ENV=development + --env IETF_NETWORK_RENDERER=LIBYANG + $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - sleep 5 - docker ps -a - docker logs $IMAGE_NAME diff --git a/src/nbi/Dockerfile b/src/nbi/Dockerfile index 5cddaf117..bd6ce77c7 100644 --- a/src/nbi/Dockerfile +++ b/src/nbi/Dockerfile @@ -90,4 +90,4 @@ COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ # Start the service #ENTRYPOINT ["gunicorn", "-w", "4", "--worker-class", "eventlet", "-b", "0.0.0.0:8080", "nbi.service:nbi_app"] -ENTRYPOINT ["gunicorn", "-w", "4", "--worker-class", "geventwebsocket.gunicorn.workers.GeventWebSocketWorker", "-b", "0.0.0.0:8080", "nbi.service.app:nbi_app"] +ENTRYPOINT ["gunicorn", "-w", "4", "--worker-class", "geventwebsocket.gunicorn.workers.GeventWebSocketWorker", "-b", "0.0.0.0:8080", "nbi.service.app:app"] diff --git a/src/nbi/service/NbiApplication.py b/src/nbi/service/NbiApplication.py index 16e699810..9d17b8831 100644 --- a/src/nbi/service/NbiApplication.py +++ b/src/nbi/service/NbiApplication.py @@ -35,32 +35,39 @@ class NbiApplication: if base_url is None: base_url = '' self.base_url = base_url - self.app = Flask(__name__) - self.app.after_request(log_request) - self.api = Api(self.app, prefix=base_url) + self._app = Flask(__name__) + self._app.after_request(log_request) + self._api = Api(self._app, prefix=base_url) #websocket_path = '/'.join([base_url.rstrip('/'), 'websocket']) - self.sio = SocketIO(self.app, path=base_url, cors_allowed_origins="*") + self._sio = SocketIO(self._app, path=base_url, cors_allowed_origins="*") def add_rest_api_resource(self, resource_class : Resource, *urls, **kwargs) -> None: - self.api.add_resource(resource_class, *urls, **kwargs) + self._api.add_resource(resource_class, *urls, **kwargs) def add_websocket_namespace(self, namespace_class : Namespace, namespace_url : str) -> None: - self.sio.on_namespace(namespace_class(namespace=namespace_url)) + self._sio.on_namespace(namespace_class(namespace=namespace_url)) def websocket_emit_message( self, event : str, *args : Any, namespace : str = "/", to : Optional[str] = None ) -> None: - self.sio.emit(event, *args, namespace=namespace, to=to) + self._sio.emit(event, *args, namespace=namespace, to=to) + + def get_flask_app(self) -> Flask: + return self._app def dump_configuration(self) -> None: - LOGGER.debug('Configured Resources:') - for resource in self.api.resources: + LOGGER.debug('Configured REST-API Resources:') + for resource in self._api.resources: LOGGER.debug(' - {:s}'.format(str(resource))) - LOGGER.debug('Configured Rules:') - for rule in self.app.url_map.iter_rules(): + LOGGER.debug('Configured Flask Rules:') + for rule in self._app.url_map.iter_rules(): LOGGER.debug(' - {:s}'.format(str(rule))) + LOGGER.debug('Configured WebSocket Namespaces:') + for namespace in self._sio.server.handlers.keys(): + LOGGER.debug(' - {:s}'.format(str(namespace))) + def run_standalone( self, bind_address : Optional[str] = None, bind_port : Optional[int] = None ) -> None: @@ -75,4 +82,4 @@ class NbiApplication: endpoint = '/'.join([endpoint.rstrip('/'), self.base_url]) LOGGER.info('Listening on {:s}...'.format(endpoint)) - self.sio.run(self.app, host=bind_address, port=bind_port) + self._sio.run(self._app, host=bind_address, port=bind_port) diff --git a/src/nbi/service/app.py b/src/nbi/service/app.py index db696efd6..320e7b344 100644 --- a/src/nbi/service/app.py +++ b/src/nbi/service/app.py @@ -107,3 +107,5 @@ if __name__ == '__main__': nbi_app.run_standalone( bind_address=BIND_ADDRESS, bind_port=BIND_PORT ) +else: + app = nbi_app.get_flask_app() -- GitLab From 3c7cfb5909647afff65869d6461a2c8f1c4e65e7 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Mon, 3 Feb 2025 15:33:07 +0000 Subject: [PATCH 246/463] Corrected README files and recovered GitLab CI/CD pipeline --- .gitlab-ci.yml | 52 +++++++++---------- .../ofc25-camara-agg-net-controller/README.md | 13 ----- .../ofc25-camara-e2e-controller/README.md | 18 ------- .../tools/mock_ietf_l3vpn_sdn_ctrl/README.md | 2 +- .../README.md | 2 +- 5 files changed, 28 insertions(+), 59 deletions(-) delete mode 100644 src/tests/ofc25-camara-agg-net-controller/README.md delete mode 100644 src/tests/ofc25-camara-e2e-controller/README.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d7430da38..2fe405733 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,38 +22,38 @@ stages: # include the individual .gitlab-ci.yml of each micro-service and tests include: #- local: '/manifests/.gitlab-ci.yml' - # - local: '/src/monitoring/.gitlab-ci.yml' - # - local: '/src/nbi/.gitlab-ci.yml' - # - local: '/src/context/.gitlab-ci.yml' - # - local: '/src/device/.gitlab-ci.yml' - # - local: '/src/service/.gitlab-ci.yml' - # - local: '/src/dbscanserving/.gitlab-ci.yml' - # - local: '/src/opticalattackmitigator/.gitlab-ci.yml' - # - local: '/src/opticalattackdetector/.gitlab-ci.yml' - # - local: '/src/opticalattackmanager/.gitlab-ci.yml' - # - local: '/src/opticalcontroller/.gitlab-ci.yml' - # - local: '/src/ztp/.gitlab-ci.yml' - # - local: '/src/policy/.gitlab-ci.yml' - # - local: '/src/automation/.gitlab-ci.yml' - # - local: '/src/forecaster/.gitlab-ci.yml' + - local: '/src/monitoring/.gitlab-ci.yml' + - local: '/src/nbi/.gitlab-ci.yml' + - local: '/src/context/.gitlab-ci.yml' + - local: '/src/device/.gitlab-ci.yml' + - local: '/src/service/.gitlab-ci.yml' + - local: '/src/dbscanserving/.gitlab-ci.yml' + - local: '/src/opticalattackmitigator/.gitlab-ci.yml' + - local: '/src/opticalattackdetector/.gitlab-ci.yml' + - local: '/src/opticalattackmanager/.gitlab-ci.yml' + - local: '/src/opticalcontroller/.gitlab-ci.yml' + - local: '/src/ztp/.gitlab-ci.yml' + - local: '/src/policy/.gitlab-ci.yml' + - local: '/src/automation/.gitlab-ci.yml' + - local: '/src/forecaster/.gitlab-ci.yml' #- local: '/src/webui/.gitlab-ci.yml' #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' - # - local: '/src/slice/.gitlab-ci.yml' + - local: '/src/slice/.gitlab-ci.yml' #- local: '/src/interdomain/.gitlab-ci.yml' - # - local: '/src/pathcomp/.gitlab-ci.yml' + - local: '/src/pathcomp/.gitlab-ci.yml' #- local: '/src/dlt/.gitlab-ci.yml' - # - local: '/src/load_generator/.gitlab-ci.yml' - # - local: '/src/bgpls_speaker/.gitlab-ci.yml' - # - local: '/src/kpi_manager/.gitlab-ci.yml' - # - local: '/src/kpi_value_api/.gitlab-ci.yml' - # - local: '/src/kpi_value_writer/.gitlab-ci.yml' - # - local: '/src/telemetry/.gitlab-ci.yml' - # - local: '/src/analytics/.gitlab-ci.yml' - # - local: '/src/qos_profile/.gitlab-ci.yml' - # - local: '/src/vnt_manager/.gitlab-ci.yml' - # - local: '/src/e2e_orchestrator/.gitlab-ci.yml' + - local: '/src/load_generator/.gitlab-ci.yml' + - local: '/src/bgpls_speaker/.gitlab-ci.yml' + - local: '/src/kpi_manager/.gitlab-ci.yml' + - local: '/src/kpi_value_api/.gitlab-ci.yml' + - local: '/src/kpi_value_writer/.gitlab-ci.yml' + - local: '/src/telemetry/.gitlab-ci.yml' + - local: '/src/analytics/.gitlab-ci.yml' + - local: '/src/qos_profile/.gitlab-ci.yml' + - local: '/src/vnt_manager/.gitlab-ci.yml' + - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' diff --git a/src/tests/ofc25-camara-agg-net-controller/README.md b/src/tests/ofc25-camara-agg-net-controller/README.md deleted file mode 100644 index a60c6f2bc..000000000 --- a/src/tests/ofc25-camara-agg-net-controller/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# DataPlane-in-a-Box - Control an Emulated DataPlane through TeraFlowSDN - -## Emulated DataPlane Deployment -- Scenario -- Descriptor - -## TeraFlowSDN Deployment -```bash -cd ~/tfs-ctrl -source ~/tfs-ctrl/src/tests/ofc25-camara-agg-net-controller/deploy_specs.sh -./deploy/all.sh -``` - diff --git a/src/tests/ofc25-camara-e2e-controller/README.md b/src/tests/ofc25-camara-e2e-controller/README.md deleted file mode 100644 index 9c200ce4e..000000000 --- a/src/tests/ofc25-camara-e2e-controller/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# DataPlane-in-a-Box - Control an Emulated DataPlane through TeraFlowSDN - -## Emulated DataPlane Deployment -- Scenario -- Descriptor - -## TeraFlowSDN Deployment -```bash -cd ~/tfs-ctrl -source ~/tfs-ctrl/src/tests/ofc25-camara-e2e-controller/deploy_specs.sh -./deploy/all.sh -``` - -## Deploy scenario -```bash -cd ~/tfs-ctrl/src/tests/ofc25-camara-e2e-controller/ -sudo containerlab deploy --topo eucnc24.clab.yml -``` diff --git a/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/README.md b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/README.md index a999f9e9f..ed9d744f7 100644 --- a/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/README.md +++ b/src/tests/tools/mock_ietf_l3vpn_sdn_ctrl/README.md @@ -1,4 +1,4 @@ -# Mock IETF ACTN SDN Controller +# Mock IETF L3VPN SDN Controller This REST server implements very basic support for the following YANG data models: - YANG Data Model for L3VPN Service Delivery diff --git a/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/README.md b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/README.md index e547f719a..493fe3736 100644 --- a/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/README.md +++ b/src/tests/tools/mock_ietf_network_slice_sdn_ctrl/README.md @@ -1,4 +1,4 @@ -# Mock IETF ACTN SDN Controller +# Mock IETF Network Slice SDN Controller This REST server implements very basic support for the following YANG data models: - IETF YANG Data Model for Transport Network Client Signals (draft-ietf-ccamp-client-signal-yang-10) -- GitLab From 4c4d91e133ef97df12cec048a8daa358c74e75ce Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 3 Feb 2025 18:38:27 +0000 Subject: [PATCH 247/463] NBI component: - Added new test resources and namespaces - Added standalone test --- run_test_nbi.sh | 20 ++++ src/nbi/Dockerfile | 4 +- src/nbi/mytest/pytest_code.py | 105 ++++++++++++++++++ src/nbi/mytest/requirements.in | 20 ++++ src/nbi/requirements.in | 6 +- src/nbi/service/NbiApplication.py | 46 +++++++- .../rest_server/nbi_plugins/__init__.py | 20 ++-- .../health_probes/Resources.py | 15 +++ .../health_probes/__init__.py | 21 ++++ .../hearthbeat/HeartbeatNamespace.py | 10 +- .../hearthbeat/__init__.py | 5 +- .../hearthbeat/example_code.txt | 33 ++++++ src/nbi/tests/PrepareTestScenario.py | 27 ++++- 13 files changed, 299 insertions(+), 33 deletions(-) create mode 100755 run_test_nbi.sh create mode 100644 src/nbi/mytest/pytest_code.py create mode 100644 src/nbi/mytest/requirements.in create mode 100644 src/nbi/service/restapi_resources/health_probes/Resources.py create mode 100644 src/nbi/service/restapi_resources/health_probes/__init__.py create mode 100644 src/nbi/service/websocket_namespaces/hearthbeat/example_code.txt diff --git a/run_test_nbi.sh b/run_test_nbi.sh new file mode 100755 index 000000000..b34f4c956 --- /dev/null +++ b/run_test_nbi.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +export PYTHON_PATH=./src +export LOG_LEVEL=DEBUG +export FLASK_ENV=development + +python -m pytest --log-level=DEBUG -o log_cli=true --verbose src/nbi/mytest/pytest_code.py diff --git a/src/nbi/Dockerfile b/src/nbi/Dockerfile index bd6ce77c7..c56dff12b 100644 --- a/src/nbi/Dockerfile +++ b/src/nbi/Dockerfile @@ -89,5 +89,5 @@ RUN mkdir -p /var/teraflow/tests/tools COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ # Start the service -#ENTRYPOINT ["gunicorn", "-w", "4", "--worker-class", "eventlet", "-b", "0.0.0.0:8080", "nbi.service:nbi_app"] -ENTRYPOINT ["gunicorn", "-w", "4", "--worker-class", "geventwebsocket.gunicorn.workers.GeventWebSocketWorker", "-b", "0.0.0.0:8080", "nbi.service.app:app"] +ENTRYPOINT ["gunicorn", "-w", "4", "--worker-class", "eventlet", "-b", "0.0.0.0:8080", "nbi.service.app:app"] +#ENTRYPOINT ["gunicorn", "-w", "4", "--worker-class", "geventwebsocket.gunicorn.workers.GeventWebSocketWorker", "-b", "0.0.0.0:8080", "nbi.service.app:app"] diff --git a/src/nbi/mytest/pytest_code.py b/src/nbi/mytest/pytest_code.py new file mode 100644 index 000000000..be0376b88 --- /dev/null +++ b/src/nbi/mytest/pytest_code.py @@ -0,0 +1,105 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 eventlet, eventlet.wsgi, json, logging, os, pytest, requests, threading, time +import websockets.sync.client # Import synchronous WebSocket client +from nbi.service.NbiApplication import NbiApplication +from nbi.service.rest_server.nbi_plugins import register_restconf +from nbi.service.restapi_resources.health_probes import register_health_probes +from nbi.service.websocket_namespaces.hearthbeat import register_heartbeat + + + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +LOCAL_HOST = '127.0.0.1' +NBI_SERVICE_PORT = 18080 +NBI_SERVICE_PREFIX_URL = '' +NBI_SERVICE_BASE_URL = '{:s}:{:d}{:s}'.format(LOCAL_HOST, NBI_SERVICE_PORT, NBI_SERVICE_PREFIX_URL) + +class ServerThread(threading.Thread): + def __init__(self): + super().__init__(daemon=True) + + self.nbi_app = NbiApplication(base_url=NBI_SERVICE_PREFIX_URL) + register_health_probes(self.nbi_app) + register_heartbeat (self.nbi_app) + register_restconf (self.nbi_app) + self.nbi_app.dump_configuration() + + def run(self): + try: + #eventlet.wsgi.server( + # eventlet.listen((LOCAL_HOST, NBI_SERVICE_PORT)), + # self.nbi_app.get_flask_app(), + # debug=True, log_output=True + #) + #thread = eventlet.spawn( + # self.nbi_app._sio.run, self.nbi_app.get_flask_app(), + # host=LOCAL_HOST, port=NBI_SERVICE_PORT, + # debug=True, use_reloader=False + #) + #thread.wait() + self.nbi_app._sio.run( + self.nbi_app.get_flask_app(), + host=LOCAL_HOST, port=NBI_SERVICE_PORT, + debug=True, use_reloader=False + ) + except: + LOGGER.exception('unhandled') + +@pytest.fixture(scope='session') +def nbi_application() -> NbiApplication: + thread = ServerThread() + thread.start() + time.sleep(1) + yield thread.nbi_app + thread.join(timeout=1) + +def test_restapi_get_healthz( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name, unused-argument +) -> None: + request_url = 'http://' + NBI_SERVICE_BASE_URL + '/healthz' + LOGGER.warning('Request: GET {:s}'.format(str(request_url))) + reply = requests.request('get', request_url, timeout=10, allow_redirects=True) + LOGGER.warning('Reply: {:s}'.format(str(reply.text))) + assert reply.status_code == requests.codes['OK'], 'Reply failed with status code {:d}'.format(reply.status_code) + if reply.content and len(reply.content) > 0: return reply.json() + +def test_websocket_get_heartbeat( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name, unused-argument +) -> None: + nbi_application.dump_configuration() + request_url = 'ws://' + NBI_SERVICE_BASE_URL + '/heartbeat' + LOGGER.warning('Request: WS {:s}'.format(str(request_url))) + + heartbeat_count = 0 + with websockets.sync.client.connect(request_url) as ws: + while heartbeat_count < 5: + message = ws.recv() + LOGGER.warning('Received message: {:s}'.format(str(message))) + + data = json.loads(message) + + # Validate uptime response + assert "uptime_seconds" in data, "Missing 'uptime_seconds' in response" + assert isinstance(data["uptime_seconds"], (int, float)), "'uptime_seconds' is not a number" + + heartbeat_count += 1 + LOGGER.warning('--> Heartbeat #{:d}: {:s}'.format(heartbeat_count, str(data))) + + LOGGER.warning('Test completed') + raise Exception() diff --git a/src/nbi/mytest/requirements.in b/src/nbi/mytest/requirements.in new file mode 100644 index 000000000..6a27a260f --- /dev/null +++ b/src/nbi/mytest/requirements.in @@ -0,0 +1,20 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +eventlet==0.39.0 +Flask==2.1.3 +Flask-HTTPAuth==4.5.0 +Flask-RESTful==0.3.9 +flask-socketio==5.5.1 +gunicorn==23.0.0 diff --git a/src/nbi/requirements.in b/src/nbi/requirements.in index 8a4d1a1b9..401a6de30 100644 --- a/src/nbi/requirements.in +++ b/src/nbi/requirements.in @@ -20,9 +20,9 @@ Flask-HTTPAuth==4.5.0 Flask-RESTful==0.3.9 flask-socketio==5.5.1 jsonschema==4.4.0 -gevent==24.11.1 -gevent-websocket==0.10.1 -greenlet==3.1.1 +#gevent==24.11.1 +#gevent-websocket==0.10.1 +#greenlet==3.1.1 gunicorn==23.0.0 libyang==2.8.4 netaddr==0.9.0 diff --git a/src/nbi/service/NbiApplication.py b/src/nbi/service/NbiApplication.py index 9d17b8831..17d0507ec 100644 --- a/src/nbi/service/NbiApplication.py +++ b/src/nbi/service/NbiApplication.py @@ -36,16 +36,28 @@ class NbiApplication: self.base_url = base_url self._app = Flask(__name__) + self._app.config['SECRET_KEY'] = 'secret!' self._app.after_request(log_request) self._api = Api(self._app, prefix=base_url) #websocket_path = '/'.join([base_url.rstrip('/'), 'websocket']) - self._sio = SocketIO(self._app, path=base_url, cors_allowed_origins="*") + #self._sio = SocketIO(self._app, path=base_url, cors_allowed_origins="*", logger=True, engineio_logger=True) + self._sio = SocketIO(self._app, cors_allowed_origins="*", logger=True, engineio_logger=True) + + @self._sio.on_error_default # handles all namespaces without an explicit error handler + def default_error_handler(e): + LOGGER.error('[default_error_handler] e={:s}'.format(str(e))) def add_rest_api_resource(self, resource_class : Resource, *urls, **kwargs) -> None: self._api.add_resource(resource_class, *urls, **kwargs) def add_websocket_namespace(self, namespace_class : Namespace, namespace_url : str) -> None: - self._sio.on_namespace(namespace_class(namespace=namespace_url)) + LOGGER.warning('[add_websocket_namespace] (before) self._sio.server={:s}'.format(str(self._sio.server))) + LOGGER.warning('[add_websocket_namespace] (before) self._sio.server.namespace_handlers={:s}'.format(str(self._sio.server.namespace_handlers))) + LOGGER.warning('[add_websocket_namespace] (before) self._sio.namespace_handlers={:s}'.format(str(self._sio.namespace_handlers))) + self._sio.on_namespace(namespace_class(namespace_url)) + LOGGER.warning('[add_websocket_namespace] (after) self._sio.server={:s}'.format(str(self._sio.server))) + LOGGER.warning('[add_websocket_namespace] (after) self._sio.server.namespace_handlers={:s}'.format(str(self._sio.server.namespace_handlers))) + LOGGER.warning('[add_websocket_namespace] (after) self._sio.namespace_handlers={:s}'.format(str(self._sio.namespace_handlers))) def websocket_emit_message( self, event : str, *args : Any, namespace : str = "/", to : Optional[str] = None @@ -66,10 +78,14 @@ class NbiApplication: LOGGER.debug('Configured WebSocket Namespaces:') for namespace in self._sio.server.handlers.keys(): - LOGGER.debug(' - {:s}'.format(str(namespace))) + LOGGER.debug(' (server) - {:s}'.format(str(namespace))) + + for namespace in self._sio.namespace_handlers: + LOGGER.debug(' (ns_hdls) - {:s}'.format(str(namespace))) def run_standalone( - self, bind_address : Optional[str] = None, bind_port : Optional[int] = None + self, bind_address : Optional[str] = None, bind_port : Optional[int] = None, + debug : bool = False, use_reloader : bool = False ) -> None: # Run method used when started in a standalone mode, i.e., outside gunicorn or # similar WSGI HTTP servers. Otherwise, use mechanism defined by the used @@ -82,4 +98,24 @@ class NbiApplication: endpoint = '/'.join([endpoint.rstrip('/'), self.base_url]) LOGGER.info('Listening on {:s}...'.format(endpoint)) - self._sio.run(self._app, host=bind_address, port=bind_port) + self._sio.run( + self._app, host=bind_address, port=bind_port, + debug=debug, use_reloader=use_reloader + ) + + def start_test_thread( + self, bind_address : Optional[str] = None, bind_port : Optional[int] = None, + debug : bool = False, use_reloader : bool = False + ) -> None: + # NOTE: To be used for testing purposes with pytest + # Stop the thread through nbi_app.stop_test_thread() + self._thread = self._sio.start_background_task( + self._sio.run, self._app, host=bind_address, port=bind_port, + debug=debug, use_reloader=use_reloader + ) + + def stop_test_thread(self): + # NOTE: To be used for testing purposes with pytest + # Start the thread through nbi_app.start_test_thread(...) + if self._thread is None: return + self._thread.join() diff --git a/src/nbi/service/rest_server/nbi_plugins/__init__.py b/src/nbi/service/rest_server/nbi_plugins/__init__.py index 9b5d7920d..c5fce5bd3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/__init__.py @@ -14,25 +14,21 @@ from flask.json import jsonify from flask_restful import Resource - -from nbi.service.rest_server.RestServer import RestServer - -from .tools.HttpStatusCodes import HTTP_CREATED +from nbi.service.NbiApplication import NbiApplication +from .tools.HttpStatusCodes import HTTP_CREATED, HTTP_OK URL_PREFIX = "/restconf/data" - class BaseServer(Resource): def post(self): response = jsonify({}) response.status_code = HTTP_CREATED return response + def get(self): + response = jsonify({}) + response.status_code = HTTP_OK + return response -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_restconf(rest_server: RestServer): - _add_resource(rest_server, BaseServer, "") +def register_restconf(nbi_app : NbiApplication): + nbi_app.add_rest_api_resource(BaseServer, URL_PREFIX) diff --git a/src/nbi/service/restapi_resources/health_probes/Resources.py b/src/nbi/service/restapi_resources/health_probes/Resources.py new file mode 100644 index 000000000..27c00d6bc --- /dev/null +++ b/src/nbi/service/restapi_resources/health_probes/Resources.py @@ -0,0 +1,15 @@ +import time +from flask_restful import Resource + +START_TIME = time.time() + +class HealthProbe(Resource): + def get(self): + uptime = time.time() - START_TIME + return {'status': 'ready', 'uptime': uptime}, 200 + #return {'status': 'not ready'}, 503 + +RESOURCE_DESCRIPTORS = [ + # endpoint_name, resource_class, resource_url + ('sys.probe.healthz', HealthProbe, '/healthz'), +] diff --git a/src/nbi/service/restapi_resources/health_probes/__init__.py b/src/nbi/service/restapi_resources/health_probes/__init__.py new file mode 100644 index 000000000..c1251e769 --- /dev/null +++ b/src/nbi/service/restapi_resources/health_probes/__init__.py @@ -0,0 +1,21 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from nbi.service.NbiApplication import NbiApplication +from .Resources import RESOURCE_DESCRIPTORS + +def register_health_probes(nbi_app : NbiApplication): + for endpoint_name, resource_class, resource_url in RESOURCE_DESCRIPTORS: + nbi_app.add_rest_api_resource(resource_class, resource_url, endpoint=endpoint_name) diff --git a/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py b/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py index 06a9569c7..21cf43a6f 100644 --- a/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py +++ b/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py @@ -24,7 +24,7 @@ NAMESPACE_NAME = 'heartbeat' NAMESPACE_URL = '/heartbeat' # WebSocket Heartbeat Namespace for debugging purposes -class DebugHeartbeatHandler(Namespace): +class HeartbeatHandler(Namespace): def on_connect(self): LOGGER.debug('Client {:s} connected'.format(str(request.sid))) join_room(NAMESPACE_NAME) @@ -35,22 +35,24 @@ class DebugHeartbeatHandler(Namespace): )) leave_room(NAMESPACE_NAME) -class DebugHeartbeatThread(threading.Thread): +class HeartbeatThread(threading.Thread): INTERVAL = 1 # second def __init__(self, nbi_app : NbiApplication): super().__init__(daemon=True) self.nbi_app = nbi_app + self.nbi_app.heartbeat_thread = self def run(self): - interval = DebugHeartbeatThread.INTERVAL + interval = HeartbeatThread.INTERVAL start_time = time.time() while True: time.sleep(interval) uptime = time.time() - start_time + LOGGER.warning('emitting...') self.nbi_app.websocket_emit_message( 'uptime', {'uptime_seconds': uptime}, namespace=NAMESPACE_URL, to=NAMESPACE_NAME ) -NAMESPACE_DESCRIPTOR = (NAMESPACE_NAME, DebugHeartbeatHandler, NAMESPACE_URL) +NAMESPACE_DESCRIPTOR = (NAMESPACE_NAME, HeartbeatHandler, NAMESPACE_URL) diff --git a/src/nbi/service/websocket_namespaces/hearthbeat/__init__.py b/src/nbi/service/websocket_namespaces/hearthbeat/__init__.py index 435a425b4..842023ba1 100644 --- a/src/nbi/service/websocket_namespaces/hearthbeat/__init__.py +++ b/src/nbi/service/websocket_namespaces/hearthbeat/__init__.py @@ -14,8 +14,11 @@ from nbi.service.NbiApplication import NbiApplication -from .HeartbeatNamespace import NAMESPACE_DESCRIPTOR +from .HeartbeatNamespace import NAMESPACE_DESCRIPTOR, HeartbeatThread def register_heartbeat(nbi_app : NbiApplication): + heartbeat_thread = HeartbeatThread(nbi_app) + heartbeat_thread.start() + _, namespace_class, namespace_url = NAMESPACE_DESCRIPTOR nbi_app.add_websocket_namespace(namespace_class, namespace_url) diff --git a/src/nbi/service/websocket_namespaces/hearthbeat/example_code.txt b/src/nbi/service/websocket_namespaces/hearthbeat/example_code.txt new file mode 100644 index 000000000..2384841d3 --- /dev/null +++ b/src/nbi/service/websocket_namespaces/hearthbeat/example_code.txt @@ -0,0 +1,33 @@ +thread_event = Event() + +# ... + +@socketio.on('collectLiveData') +def collectLiveData(): + global thread + with thread_lock: + if thread is None: + thread_event.set() + thread = socketio.start_background_task(background_thread, thread_event) + +def background_thread(event): + """Example of how to send server generated events to clients.""" + global thread + count = 0 + try: + while event.is_set(): + socketio.sleep(1) + count += 1 + socketio.emit('my_response', {'count': count}) + finally: + event.clear() + thread = None + +@socketio.on("stopCollectingLiveData") +def stopCollectingLiveData(): + global thread + thread_event.clear() + with thread_lock: + if thread is not None: + thread.join() + thread = None \ No newline at end of file diff --git a/src/nbi/tests/PrepareTestScenario.py b/src/nbi/tests/PrepareTestScenario.py index a574f086b..c0c4d41c8 100644 --- a/src/nbi/tests/PrepareTestScenario.py +++ b/src/nbi/tests/PrepareTestScenario.py @@ -20,21 +20,26 @@ from common.Settings import ( get_env_var_name, get_service_baseurl_http, get_service_port_http ) from context.client.ContextClient import ContextClient -from nbi.service.rest_server.RestServer import RestServer +from nbi.service.NbiApplication import NbiApplication +from nbi.service.rest_server.nbi_plugins import register_restconf from nbi.service.rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api from nbi.service.rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn from nbi.service.rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn from nbi.service.rest_server.nbi_plugins.ietf_network import register_ietf_network from nbi.service.rest_server.nbi_plugins.tfs_api import register_tfs_api +from nbi.service.websocket_namespaces.hearthbeat import register_heartbeat from nbi.tests.MockService_Dependencies import MockService_Dependencies from service.client.ServiceClient import ServiceClient from slice.client.SliceClient import SliceClient from tests.tools.mock_osm.MockOSM import MockOSM from .Constants import USERNAME, PASSWORD, WIM_MAPPING + LOCAL_HOST = '127.0.0.1' MOCKSERVICE_PORT = 10000 NBI_SERVICE_PORT = MOCKSERVICE_PORT + get_service_port_http(ServiceNameEnum.NBI) # avoid privileged ports +NBI_SERVICE_BASE_URL = get_service_baseurl_http(ServiceNameEnum.NBI) or '' + os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(NBI_SERVICE_PORT) @@ -48,12 +53,22 @@ def mock_service(): @pytest.fixture(scope='session') def nbi_service_rest(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument + _nbi_app = NbiApplication(base_url=NBI_SERVICE_BASE_URL) + register_etsi_bwm_api (_nbi_app) + #register_ietf_hardware(_nbi_app) + register_ietf_l2vpn (_nbi_app) + register_ietf_l3vpn (_nbi_app) + register_ietf_network (_nbi_app) + #register_ietf_nss (_nbi_app) + #register_ietf_acl (_nbi_app) + #register_qkd_app (_nbi_app) + register_tfs_api (_nbi_app) + register_restconf (_nbi_app) + register_heartbeat (_nbi_app) + _nbi_app.dump_configuration() + + _rest_server = RestServer() - register_etsi_bwm_api(_rest_server) - register_ietf_l2vpn(_rest_server) - register_ietf_l3vpn(_rest_server) - register_ietf_network(_rest_server) - register_tfs_api(_rest_server) _rest_server.start() time.sleep(1) # bring time for the server to start yield _rest_server -- GitLab From e3fc9f2c8a77dd0755f4ced5a0f8b539b6899a12 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 5 Feb 2025 10:17:10 +0000 Subject: [PATCH 248/463] NBI component: - Stabilized support for SocketIO-based websockets next to REST-API endpoints on same server and port - Added REST-based probe and SocketIO-based heartbeat - Migrated all NBI plugins to new framework - Updated existing unitary tests --- src/nbi/mytest/pytest_code.py | 105 ---------------- .../tools/__init__.py => run_gunicorn.sh} | 3 + run_test_nbi.sh => src/nbi/run_test.sh | 5 +- src/nbi/service/NbiApplication.py | 83 ++++-------- .../tools => _tools}/Authentication.py | 0 .../tools => _tools}/HttpStatusCodes.py | 0 .../nbi_plugins/tools => _tools}/Validator.py | 0 .../{rest_server => _tools}/__init__.py | 0 src/nbi/service/app.py | 118 +++++++----------- .../nbi_plugins => }/etsi_bwm/Resources.py | 0 .../nbi_plugins => }/etsi_bwm/Tools.py | 0 src/nbi/service/etsi_bwm/__init__.py | 30 +++++ .../etsi_bwm/tests_etsi_bwm.txt | 0 .../Constants.py} | 9 ++ .../service/health_probes/HeartbeatThread.py | 40 ++++++ src/nbi/service/health_probes/Namespaces.py | 37 ++++++ .../health_probes/Resources.py} | 16 ++- .../health_probes/__init__.py | 7 +- .../nbi_plugins => }/ietf_acl/Acl.py | 2 +- .../nbi_plugins => }/ietf_acl/Acls.py | 2 +- .../ietf_acl/YangValidator.py | 0 src/nbi/service/ietf_acl/__init__.py | 31 +++++ .../ietf_acl/ietf_acl_parser.py | 0 .../yang/iana-if-type@2014-05-08.yang | 0 .../ietf-access-control-list@2019-03-04.yang | 0 .../yang/ietf-ethertypes@2019-03-04.yang | 0 .../yang/ietf-inet-types@2013-07-15.yang | 0 .../yang/ietf-interfaces@2018-02-20.yang | 0 .../yang/ietf-packet-fields@2019-03-04.yang | 0 .../yang/ietf-yang-types@2013-07-15.yang | 0 .../ietf_hardware/Hardware.py | 4 +- .../ietf_hardware/HardwareMultipleDevices.py | 4 +- .../ietf_hardware/YangHandler.py | 0 src/nbi/service/ietf_hardware/__init__.py | 29 +++++ .../yang/iana-hardware@2018-03-13.yang | 0 .../yang/ietf-hardware@2018-03-13.yang | 0 .../yang/ietf-inet-types@2013-07-15.yang | 0 ...network-hardware-inventory@2023-03-09.yang | 0 .../yang/ietf-yang-types@2013-07-15.yang | 0 .../nbi_plugins => }/ietf_l2vpn/Constants.py | 0 .../ietf_l2vpn/L2VPN_Service.py | 6 +- .../ietf_l2vpn/L2VPN_Services.py | 6 +- .../ietf_l2vpn/L2VPN_SiteNetworkAccesses.py | 6 +- .../nbi_plugins => }/ietf_l2vpn/__init__.py | 29 +++-- .../ietf_l2vpn/schemas/Common.py | 0 .../ietf_l2vpn/schemas/__init__.py | 0 .../ietf_l2vpn/schemas/site_network_access.py | 0 .../ietf_l2vpn/schemas/vpn_service.py | 0 .../nbi_plugins => }/ietf_l3vpn/Handlers.py | 0 .../ietf_l3vpn/L3VPN_Service.py | 4 +- .../ietf_l3vpn/L3VPN_Services.py | 4 +- .../ietf_l3vpn/L3VPN_SiteNetworkAccesses.py | 4 +- .../ietf_l3vpn/YangValidator.py | 0 .../nbi_plugins => }/ietf_l3vpn/__init__.py | 29 +++-- .../yang/ietf-inet-types@2013-07-15.yang | 0 .../yang/ietf-l3vpn-svc@2018-01-19.yang | 0 .../yang/ietf-netconf-acm@2018-02-14.yang | 0 .../yang/ietf-yang-types@2013-07-15.yang | 0 .../ietf_l3vpn/yang/ietf_l3vpn_tree.txt | 0 .../ietf_network/ComposeLink.py | 0 .../ietf_network/ComposeNetwork.py | 0 .../ietf_network/ComposeNode.py | 0 .../ietf_network/ComposeTermPoint.py | 0 .../ietf_network/ManualFixes.py | 0 .../ietf_network/NameMapping.py | 0 .../ietf_network/NetworkTypeEnum.py | 0 .../nbi_plugins => }/ietf_network/Networks.py | 4 +- .../nbi_plugins => }/ietf_network/README.md | 0 .../ietf_network/YangHandler.py | 0 .../nbi_plugins => }/ietf_network/__init__.py | 12 +- .../ietf_network/_docs/test_commands.txt | 2 +- .../ietf_network/bindings/__init__.py | 0 .../bindings/networks/__init__.py | 0 .../bindings/networks/network/__init__.py | 0 .../networks/network/link/__init__.py | 0 .../network/link/destination/__init__.py | 0 .../networks/network/link/source/__init__.py | 0 .../network/link/supporting_link/__init__.py | 0 .../networks/network/link/te/__init__.py | 0 .../network/link/te/bundled_links/__init__.py | 0 .../te/bundled_links/bundled_link/__init__.py | 0 .../link/te/component_links/__init__.py | 0 .../component_link/__init__.py | 0 .../te/information_source_entry/__init__.py | 0 .../information_source_state/__init__.py | 0 .../topology/__init__.py | 0 .../__init__.py | 0 .../max_lsp_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../ethernet_label_range/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/otn/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../label_start/te_label/otn/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/otn/__init__.py | 0 .../otn_label_range/__init__.py | 0 .../max_link_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../max_resv_link_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../te_nsrlgs/__init__.py | 0 .../te_srlgs/__init__.py | 0 .../unreserved_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../te/information_source_state/__init__.py | 0 .../topology/__init__.py | 0 .../network/link/te/recovery/__init__.py | 0 .../network/link/te/statistics/__init__.py | 0 .../link/te/te_link_attributes/__init__.py | 0 .../te_link_attributes/client_svc/__init__.py | 0 .../external_domain/__init__.py | 0 .../__init__.py | 0 .../max_lsp_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../ethernet_label_range/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/otn/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../label_start/te_label/otn/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/otn/__init__.py | 0 .../otn_label_range/__init__.py | 0 .../max_link_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../max_resv_link_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../te_link_attributes/otn_link/__init__.py | 0 .../te_link_attributes/te_nsrlgs/__init__.py | 0 .../te_link_attributes/te_srlgs/__init__.py | 0 .../te_link_attributes/underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../unreserved_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../network/link/te/underlay/__init__.py | 0 .../network/network_types/__init__.py | 0 .../network_types/te_topology/__init__.py | 0 .../networks/network/node/__init__.py | 0 .../network/node/supporting_node/__init__.py | 0 .../networks/network/node/te/__init__.py | 0 .../network/node/te/geolocation/__init__.py | 0 .../te/information_source_entry/__init__.py | 0 .../connectivity_matrices/__init__.py | 0 .../connectivity_matrix/__init__.py | 0 .../connectivity_matrix/from_/__init__.py | 0 .../from_/label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../ethernet_label_range/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/otn/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../label_start/te_label/otn/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/otn/__init__.py | 0 .../otn_label_range/__init__.py | 0 .../optimizations/__init__.py | 0 .../objective_function/__init__.py | 0 .../optimization_metric/__init__.py | 0 .../__init__.py | 0 .../route_object_exclude_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../srlg/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../__init__.py | 0 .../route_object_include_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../optimizations/tiebreakers/__init__.py | 0 .../tiebreakers/tiebreaker/__init__.py | 0 .../path_constraints/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_metric_bounds/__init__.py | 0 .../path_metric_bound/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../path_constraints/te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../path_properties/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_properties/path_metric/__init__.py | 0 .../path_route_objects/__init__.py | 0 .../path_route_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../path_route_object/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../connectivity_matrix/to/__init__.py | 0 .../to/label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../ethernet_label_range/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/otn/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../label_start/te_label/otn/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/otn/__init__.py | 0 .../otn_label_range/__init__.py | 0 .../connectivity_matrix/underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../ethernet_label_range/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/otn/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../label_start/te_label/otn/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/otn/__init__.py | 0 .../otn_label_range/__init__.py | 0 .../optimizations/__init__.py | 0 .../objective_function/__init__.py | 0 .../optimization_metric/__init__.py | 0 .../__init__.py | 0 .../route_object_exclude_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../srlg/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../__init__.py | 0 .../route_object_include_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../optimizations/tiebreakers/__init__.py | 0 .../tiebreakers/tiebreaker/__init__.py | 0 .../path_constraints/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_metric_bounds/__init__.py | 0 .../path_metric_bound/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../path_constraints/te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../path_properties/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_properties/path_metric/__init__.py | 0 .../path_route_objects/__init__.py | 0 .../path_route_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../path_route_object/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../information_source_state/__init__.py | 0 .../topology/__init__.py | 0 .../underlay_topology/__init__.py | 0 .../te/information_source_state/__init__.py | 0 .../topology/__init__.py | 0 .../network/node/te/statistics/__init__.py | 0 .../connectivity_matrix_entry/__init__.py | 0 .../node/te/statistics/node/__init__.py | 0 .../node/te/te_node_attributes/__init__.py | 0 .../connectivity_matrices/__init__.py | 0 .../connectivity_matrix/__init__.py | 0 .../connectivity_matrix/from_/__init__.py | 0 .../from_/label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../ethernet_label_range/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/otn/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../label_start/te_label/otn/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/otn/__init__.py | 0 .../otn_label_range/__init__.py | 0 .../optimizations/__init__.py | 0 .../objective_function/__init__.py | 0 .../optimization_metric/__init__.py | 0 .../__init__.py | 0 .../route_object_exclude_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../srlg/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../__init__.py | 0 .../route_object_include_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../optimizations/tiebreakers/__init__.py | 0 .../tiebreakers/tiebreaker/__init__.py | 0 .../path_constraints/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_metric_bounds/__init__.py | 0 .../path_metric_bound/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../path_constraints/te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../path_properties/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_properties/path_metric/__init__.py | 0 .../path_route_objects/__init__.py | 0 .../path_route_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../path_route_object/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../connectivity_matrix/to/__init__.py | 0 .../to/label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../ethernet_label_range/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/otn/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../label_start/te_label/otn/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/otn/__init__.py | 0 .../otn_label_range/__init__.py | 0 .../connectivity_matrix/underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../ethernet_label_range/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/otn/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../label_start/te_label/otn/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/otn/__init__.py | 0 .../otn_label_range/__init__.py | 0 .../optimizations/__init__.py | 0 .../objective_function/__init__.py | 0 .../optimization_metric/__init__.py | 0 .../__init__.py | 0 .../route_object_exclude_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../srlg/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../__init__.py | 0 .../route_object_include_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../optimizations/tiebreakers/__init__.py | 0 .../tiebreakers/tiebreaker/__init__.py | 0 .../path_constraints/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_metric_bounds/__init__.py | 0 .../path_metric_bound/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../path_constraints/te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../path_properties/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_properties/path_metric/__init__.py | 0 .../path_route_objects/__init__.py | 0 .../path_route_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../path_route_object/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../underlay_topology/__init__.py | 0 .../te/tunnel_termination_point/__init__.py | 0 .../client_layer_adaptation/__init__.py | 0 .../switching_capability/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../geolocation/__init__.py | 0 .../local_link_connectivities/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../ethernet_label_range/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/otn/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../label_start/te_label/otn/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/otn/__init__.py | 0 .../otn_label_range/__init__.py | 0 .../local_link_connectivity/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../ethernet_label_range/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/otn/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../label_start/te_label/otn/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/otn/__init__.py | 0 .../otn_label_range/__init__.py | 0 .../optimizations/__init__.py | 0 .../objective_function/__init__.py | 0 .../optimization_metric/__init__.py | 0 .../__init__.py | 0 .../route_object_exclude_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../srlg/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../__init__.py | 0 .../route_object_include_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../optimizations/tiebreakers/__init__.py | 0 .../tiebreakers/tiebreaker/__init__.py | 0 .../path_constraints/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_metric_bounds/__init__.py | 0 .../path_metric_bound/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../path_constraints/te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../path_properties/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_properties/path_metric/__init__.py | 0 .../path_route_objects/__init__.py | 0 .../path_route_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../path_route_object/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../optimizations/__init__.py | 0 .../objective_function/__init__.py | 0 .../optimization_metric/__init__.py | 0 .../__init__.py | 0 .../route_object_exclude_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../srlg/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../__init__.py | 0 .../route_object_include_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../optimizations/tiebreakers/__init__.py | 0 .../tiebreakers/tiebreaker/__init__.py | 0 .../path_constraints/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_metric_bounds/__init__.py | 0 .../path_metric_bound/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../path_constraints/te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../path_properties/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_properties/path_metric/__init__.py | 0 .../path_route_objects/__init__.py | 0 .../path_route_object/__init__.py | 0 .../as_number_hop/__init__.py | 0 .../path_route_object/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../statistics/__init__.py | 0 .../local_link_connectivity/__init__.py | 0 .../tunnel_termination_point/__init__.py | 0 .../__init__.py | 0 .../node/termination_point/__init__.py | 0 .../termination_point/eth_link_tp/__init__.py | 0 .../egress_bandwidth_profile/__init__.py | 0 .../ingress_bandwidth_profile/__init__.py | 0 .../__init__.py | 0 .../termination_point/eth_svc/__init__.py | 0 .../supported_classification/__init__.py | 0 .../vlan_classification/__init__.py | 0 .../vlan_classification/outer_tag/__init__.py | 0 .../second_tag/__init__.py | 0 .../supported_vlan_operations/__init__.py | 0 .../vlan_pop/__init__.py | 0 .../vlan_push/__init__.py | 0 .../vlan_push/outer_tag/__init__.py | 0 .../vlan_push/second_tag/__init__.py | 0 .../supporting_termination_point/__init__.py | 0 .../node/termination_point/te/__init__.py | 0 .../te/client_svc/__init__.py | 0 .../te/geolocation/__init__.py | 0 .../__init__.py | 0 .../max_lsp_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../termination_point/te/otn_ltp/__init__.py | 0 .../network/supporting_network/__init__.py | 0 .../bindings/networks/network/te/__init__.py | 0 .../network/te/geolocation/__init__.py | 0 .../networks/network/te/nsrlg/__init__.py | 0 .../te_topology_identifier/__init__.py | 0 .../bindings/networks/te/__init__.py | 0 .../networks/te/templates/__init__.py | 0 .../te/templates/link_template/__init__.py | 0 .../te_link_attributes/__init__.py | 0 .../external_domain/__init__.py | 0 .../__init__.py | 0 .../max_lsp_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../ethernet_label_range/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/otn/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../label_start/te_label/otn/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/otn/__init__.py | 0 .../otn_label_range/__init__.py | 0 .../max_link_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../max_resv_link_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../te_link_attributes/te_nsrlgs/__init__.py | 0 .../te_link_attributes/te_srlgs/__init__.py | 0 .../te_link_attributes/underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/as_number_hop/__init__.py | 0 .../path_element/label_hop/__init__.py | 0 .../label_hop/te_label/__init__.py | 0 .../label_hop/te_label/otn/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../unreserved_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/otn/__init__.py | 0 .../te_bandwidth/otn/odulist/__init__.py | 0 .../te/templates/node_template/__init__.py | 0 .../te_node_attributes/__init__.py | 0 .../underlay_topology/__init__.py | 0 .../ietf_network/build-yang-bindings.sh | 2 +- .../yang/iana-routing-types@2017-12-04.yang | 0 .../yang/ietf-eth-te-topology@2023-09-28.yang | 0 .../ietf-eth-tran-service@2023-10-23.yang | 0 .../yang/ietf-eth-tran-types@2023-10-23.yang | 0 .../yang/ietf-inet-types@2013-07-15.yang | 0 .../ietf-l3-unicast-topology@2018-02-26.yang | 0 .../yang/ietf-layer1-types@2022-10-14.yang | 0 .../ietf-network-topology@2018-02-26.yang | 0 .../yang/ietf-network@2018-02-26.yang | 0 .../yang/ietf-otn-topology@2023-07-06.yang | 0 .../yang/ietf-routing-types@2017-12-04.yang | 0 .../yang/ietf-te-packet-types@2020-06-10.yang | 0 .../yang/ietf-te-topology@2020-08-06.yang | 0 .../yang/ietf-te-types@2020-06-10.yang | 0 .../ietf-trans-client-service@2023-10-23.yang | 0 ...etf-trans-client-svc-types@2023-10-23.yang | 0 .../yang/ietf-yang-types@2013-07-15.yang | 0 .../ietf_network_slice/NSS_Service.py | 4 +- .../NSS_Service_Match_Criteria.py | 4 +- .../NSS_Service_Match_Criterion.py | 4 +- .../ietf_network_slice/NSS_Services.py | 2 +- .../NSS_Services_Connection_Group.py | 4 +- .../NSS_Services_Connection_Groups.py | 4 +- .../ietf_network_slice/NSS_Services_SDP.py | 2 +- .../ietf_network_slice/NSS_Services_SDPs.py | 2 +- .../ietf_network_slice/YangValidator.py | 0 .../ietf_network_slice/__init__.py | 55 ++++---- .../ietf_network_slice/bindings/__init__.py | 0 .../bindings/nacm/__init__.py | 0 .../bindings/nacm/groups/__init__.py | 0 .../bindings/nacm/groups/group/__init__.py | 0 .../bindings/nacm/rule_list/__init__.py | 0 .../bindings/nacm/rule_list/rule/__init__.py | 0 .../nacm/rule_list/rule/rule_type/__init__.py | 0 .../rule/rule_type/data_node/__init__.py | 0 .../rule/rule_type/notification/__init__.py | 0 .../rule_type/protocol_operation/__init__.py | 0 .../network_slice_services/__init__.py | 0 .../slice_service/__init__.py | 0 .../connection_groups/__init__.py | 0 .../connection_group/__init__.py | 0 .../connection_group_monitoring/__init__.py | 0 .../connectivity_construct/__init__.py | 0 .../__init__.py | 0 .../connectivity_construct_type/__init__.py | 0 .../a2a/__init__.py | 0 .../a2a/a2a_sdp/__init__.py | 0 .../a2a/a2a_sdp/slo_sle_policy/__init__.py | 0 .../a2a_sdp/slo_sle_policy/custom/__init__.py | 0 .../custom/service_slo_sle_policy/__init__.py | 0 .../metric_bounds/__init__.py | 0 .../metric_bounds/metric_bound/__init__.py | 0 .../steering_constraints/__init__.py | 0 .../path_constraints/__init__.py | 0 .../service_function/__init__.py | 0 .../slo_sle_policy/standard/__init__.py | 0 .../p2mp/__init__.py | 0 .../p2p/__init__.py | 0 .../slo_sle_policy/__init__.py | 0 .../slo_sle_policy/custom/__init__.py | 0 .../custom/service_slo_sle_policy/__init__.py | 0 .../metric_bounds/__init__.py | 0 .../metric_bounds/metric_bound/__init__.py | 0 .../steering_constraints/__init__.py | 0 .../path_constraints/__init__.py | 0 .../service_function/__init__.py | 0 .../slo_sle_policy/standard/__init__.py | 0 .../slo_sle_policy/__init__.py | 0 .../slo_sle_policy/custom/__init__.py | 0 .../custom/service_slo_sle_policy/__init__.py | 0 .../metric_bounds/__init__.py | 0 .../metric_bounds/metric_bound/__init__.py | 0 .../steering_constraints/__init__.py | 0 .../path_constraints/__init__.py | 0 .../service_function/__init__.py | 0 .../slo_sle_policy/standard/__init__.py | 0 .../slice_service/sdps/__init__.py | 0 .../slice_service/sdps/sdp/__init__.py | 0 .../sdps/sdp/attachment_circuits/__init__.py | 0 .../attachment_circuit/__init__.py | 0 .../attachment_circuit/ac_tags/__init__.py | 0 .../ac_tags/ac_tag_opaque/__init__.py | 0 .../ac_tags/ac_tags/__init__.py | 0 .../incoming_qos_policy/__init__.py | 0 .../rate_limits/__init__.py | 0 .../outgoing_qos_policy/__init__.py | 0 .../rate_limits/__init__.py | 0 .../sdp_peering/__init__.py | 0 .../sdp_peering/opaque/__init__.py | 0 .../sdp_peering/protocol/__init__.py | 0 .../protocol/attribute/__init__.py | 0 .../sdps/sdp/incoming_qos_policy/__init__.py | 0 .../rate_limits/__init__.py | 0 .../sdps/sdp/location/__init__.py | 0 .../sdps/sdp/outgoing_qos_policy/__init__.py | 0 .../rate_limits/__init__.py | 0 .../sdps/sdp/sdp_monitoring/__init__.py | 0 .../sdps/sdp/sdp_peering/__init__.py | 0 .../sdps/sdp/sdp_peering/opaque/__init__.py | 0 .../sdps/sdp/sdp_peering/protocol/__init__.py | 0 .../protocol/attribute/__init__.py | 0 .../sdp/service_match_criteria/__init__.py | 0 .../match_criterion/__init__.py | 0 .../slice_service/sdps/sdp/status/__init__.py | 0 .../sdps/sdp/status/admin_status/__init__.py | 0 .../sdps/sdp/status/oper_status/__init__.py | 0 .../slice_service/service_tags/__init__.py | 0 .../service_tags/tag_opaque/__init__.py | 0 .../service_tags/tag_type/__init__.py | 0 .../slice_service/slo_sle_policy/__init__.py | 0 .../slo_sle_policy/custom/__init__.py | 0 .../custom/service_slo_sle_policy/__init__.py | 0 .../metric_bounds/__init__.py | 0 .../metric_bounds/metric_bound/__init__.py | 0 .../steering_constraints/__init__.py | 0 .../path_constraints/__init__.py | 0 .../service_function/__init__.py | 0 .../slo_sle_policy/standard/__init__.py | 0 .../slice_service/status/__init__.py | 0 .../status/admin_status/__init__.py | 0 .../status/oper_status/__init__.py | 0 .../te_topology_identifier/__init__.py | 0 .../slo_sle_templates/__init__.py | 0 .../slo_sle_template/__init__.py | 0 .../service_slo_sle_policy/__init__.py | 0 .../metric_bounds/__init__.py | 0 .../metric_bounds/metric_bound/__init__.py | 0 .../steering_constraints/__init__.py | 0 .../path_constraints/__init__.py | 0 .../service_function/__init__.py | 0 .../bindings/networks/__init__.py | 0 .../bindings/networks/network/__init__.py | 0 .../networks/network/link/__init__.py | 0 .../network/link/destination/__init__.py | 0 .../networks/network/link/source/__init__.py | 0 .../network/link/supporting_link/__init__.py | 0 .../networks/network/link/te/__init__.py | 0 .../link/te/bundle_stack_level/__init__.py | 0 .../te/bundle_stack_level/bundle/__init__.py | 0 .../bundle/bundled_links/__init__.py | 0 .../bundled_links/bundled_link/__init__.py | 0 .../bundle_stack_level/component/__init__.py | 0 .../component/component_links/__init__.py | 0 .../component_link/__init__.py | 0 .../te/information_source_entry/__init__.py | 0 .../information_source_state/__init__.py | 0 .../topology/__init__.py | 0 .../__init__.py | 0 .../max_lsp_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/technology/__init__.py | 0 .../label_step/technology/generic/__init__.py | 0 .../max_link_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../max_resv_link_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../te_nsrlgs/__init__.py | 0 .../te_srlgs/__init__.py | 0 .../unreserved_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../te/information_source_state/__init__.py | 0 .../topology/__init__.py | 0 .../network/link/te/recovery/__init__.py | 0 .../network/link/te/statistics/__init__.py | 0 .../link/te/te_link_attributes/__init__.py | 0 .../external_domain/__init__.py | 0 .../__init__.py | 0 .../max_lsp_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/technology/__init__.py | 0 .../label_step/technology/generic/__init__.py | 0 .../max_link_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../max_resv_link_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../te_link_attributes/te_nsrlgs/__init__.py | 0 .../te_link_attributes/te_srlgs/__init__.py | 0 .../te_link_attributes/underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../backup_path/path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../unreserved_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../network/link/te/underlay/__init__.py | 0 .../network/network_types/__init__.py | 0 .../network_types/te_topology/__init__.py | 0 .../networks/network/node/__init__.py | 0 .../network/node/supporting_node/__init__.py | 0 .../networks/network/node/te/__init__.py | 0 .../network/node/te/geolocation/__init__.py | 0 .../te/information_source_entry/__init__.py | 0 .../connectivity_matrices/__init__.py | 0 .../connectivity_matrix/__init__.py | 0 .../connectivity_matrix/from/__init__.py | 0 .../from/label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/technology/__init__.py | 0 .../label_step/technology/generic/__init__.py | 0 .../optimizations/__init__.py | 0 .../optimizations/algorithm/__init__.py | 0 .../algorithm/metric/__init__.py | 0 .../metric/optimization_metric/__init__.py | 0 .../__init__.py | 0 .../route_object_exclude_object/__init__.py | 0 .../type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/srlg/__init__.py | 0 .../type/srlg/srlg/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../__init__.py | 0 .../route_object_include_object/__init__.py | 0 .../type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../algorithm/metric/tiebreakers/__init__.py | 0 .../metric/tiebreakers/tiebreaker/__init__.py | 0 .../algorithm/objective_function/__init__.py | 0 .../objective_function/__init__.py | 0 .../path_constraints/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_metric_bounds/__init__.py | 0 .../path_metric_bound/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../path_constraints/te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../path_properties/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_properties/path_metric/__init__.py | 0 .../path_route_objects/__init__.py | 0 .../path_route_object/__init__.py | 0 .../path_route_object/type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_route_object/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../connectivity_matrix/to/__init__.py | 0 .../to/label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/technology/__init__.py | 0 .../label_step/technology/generic/__init__.py | 0 .../connectivity_matrix/underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../backup_path/path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/technology/__init__.py | 0 .../label_step/technology/generic/__init__.py | 0 .../optimizations/__init__.py | 0 .../optimizations/algorithm/__init__.py | 0 .../algorithm/metric/__init__.py | 0 .../metric/optimization_metric/__init__.py | 0 .../__init__.py | 0 .../route_object_exclude_object/__init__.py | 0 .../type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/srlg/__init__.py | 0 .../type/srlg/srlg/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../__init__.py | 0 .../route_object_include_object/__init__.py | 0 .../type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../algorithm/metric/tiebreakers/__init__.py | 0 .../metric/tiebreakers/tiebreaker/__init__.py | 0 .../algorithm/objective_function/__init__.py | 0 .../objective_function/__init__.py | 0 .../path_constraints/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_metric_bounds/__init__.py | 0 .../path_metric_bound/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../path_constraints/te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../path_properties/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_properties/path_metric/__init__.py | 0 .../path_route_objects/__init__.py | 0 .../path_route_object/__init__.py | 0 .../path_route_object/type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_route_object/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../backup_path/path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../information_source_state/__init__.py | 0 .../topology/__init__.py | 0 .../underlay_topology/__init__.py | 0 .../te/information_source_state/__init__.py | 0 .../topology/__init__.py | 0 .../network/node/te/statistics/__init__.py | 0 .../connectivity_matrix_entry/__init__.py | 0 .../node/te/statistics/node/__init__.py | 0 .../node/te/te_node_attributes/__init__.py | 0 .../connectivity_matrices/__init__.py | 0 .../connectivity_matrix/__init__.py | 0 .../connectivity_matrix/from/__init__.py | 0 .../from/label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/technology/__init__.py | 0 .../label_step/technology/generic/__init__.py | 0 .../optimizations/__init__.py | 0 .../optimizations/algorithm/__init__.py | 0 .../algorithm/metric/__init__.py | 0 .../metric/optimization_metric/__init__.py | 0 .../__init__.py | 0 .../route_object_exclude_object/__init__.py | 0 .../type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/srlg/__init__.py | 0 .../type/srlg/srlg/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../__init__.py | 0 .../route_object_include_object/__init__.py | 0 .../type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../algorithm/metric/tiebreakers/__init__.py | 0 .../metric/tiebreakers/tiebreaker/__init__.py | 0 .../algorithm/objective_function/__init__.py | 0 .../objective_function/__init__.py | 0 .../path_constraints/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_metric_bounds/__init__.py | 0 .../path_metric_bound/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../path_constraints/te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../path_properties/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_properties/path_metric/__init__.py | 0 .../path_route_objects/__init__.py | 0 .../path_route_object/__init__.py | 0 .../path_route_object/type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_route_object/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../connectivity_matrix/to/__init__.py | 0 .../to/label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/technology/__init__.py | 0 .../label_step/technology/generic/__init__.py | 0 .../connectivity_matrix/underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../backup_path/path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/technology/__init__.py | 0 .../label_step/technology/generic/__init__.py | 0 .../optimizations/__init__.py | 0 .../optimizations/algorithm/__init__.py | 0 .../algorithm/metric/__init__.py | 0 .../metric/optimization_metric/__init__.py | 0 .../__init__.py | 0 .../route_object_exclude_object/__init__.py | 0 .../type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/srlg/__init__.py | 0 .../type/srlg/srlg/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../__init__.py | 0 .../route_object_include_object/__init__.py | 0 .../type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../algorithm/metric/tiebreakers/__init__.py | 0 .../metric/tiebreakers/tiebreaker/__init__.py | 0 .../algorithm/objective_function/__init__.py | 0 .../objective_function/__init__.py | 0 .../path_constraints/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_metric_bounds/__init__.py | 0 .../path_metric_bound/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../path_constraints/te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../path_properties/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_properties/path_metric/__init__.py | 0 .../path_route_objects/__init__.py | 0 .../path_route_object/__init__.py | 0 .../path_route_object/type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_route_object/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../backup_path/path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../underlay_topology/__init__.py | 0 .../te/tunnel_termination_point/__init__.py | 0 .../client_layer_adaptation/__init__.py | 0 .../switching_capability/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../geolocation/__init__.py | 0 .../local_link_connectivities/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/technology/__init__.py | 0 .../label_step/technology/generic/__init__.py | 0 .../local_link_connectivity/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/technology/__init__.py | 0 .../label_step/technology/generic/__init__.py | 0 .../optimizations/__init__.py | 0 .../optimizations/algorithm/__init__.py | 0 .../algorithm/metric/__init__.py | 0 .../metric/optimization_metric/__init__.py | 0 .../__init__.py | 0 .../route_object_exclude_object/__init__.py | 0 .../type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/srlg/__init__.py | 0 .../type/srlg/srlg/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../__init__.py | 0 .../route_object_include_object/__init__.py | 0 .../type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../algorithm/metric/tiebreakers/__init__.py | 0 .../metric/tiebreakers/tiebreaker/__init__.py | 0 .../algorithm/objective_function/__init__.py | 0 .../objective_function/__init__.py | 0 .../path_constraints/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_metric_bounds/__init__.py | 0 .../path_metric_bound/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../path_constraints/te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../path_properties/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_properties/path_metric/__init__.py | 0 .../path_route_objects/__init__.py | 0 .../path_route_object/__init__.py | 0 .../path_route_object/type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_route_object/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../backup_path/path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../optimizations/__init__.py | 0 .../optimizations/algorithm/__init__.py | 0 .../algorithm/metric/__init__.py | 0 .../metric/optimization_metric/__init__.py | 0 .../__init__.py | 0 .../route_object_exclude_object/__init__.py | 0 .../type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/srlg/__init__.py | 0 .../type/srlg/srlg/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../__init__.py | 0 .../route_object_include_object/__init__.py | 0 .../type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../algorithm/metric/tiebreakers/__init__.py | 0 .../metric/tiebreakers/tiebreaker/__init__.py | 0 .../algorithm/objective_function/__init__.py | 0 .../objective_function/__init__.py | 0 .../path_constraints/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_metric_bounds/__init__.py | 0 .../path_metric_bound/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../path_constraints/te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../path_properties/__init__.py | 0 .../path_affinities_values/__init__.py | 0 .../path_affinities_value/__init__.py | 0 .../path_affinity_names/__init__.py | 0 .../path_affinity_name/__init__.py | 0 .../affinity_name/__init__.py | 0 .../path_properties/path_metric/__init__.py | 0 .../path_route_objects/__init__.py | 0 .../path_route_object/__init__.py | 0 .../path_route_object/type/__init__.py | 0 .../type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_route_object/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../path_srlgs_lists/__init__.py | 0 .../path_srlgs_list/__init__.py | 0 .../path_srlgs_names/__init__.py | 0 .../path_srlgs_name/__init__.py | 0 .../underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../backup_path/path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../statistics/__init__.py | 0 .../local_link_connectivity/__init__.py | 0 .../tunnel_termination_point/__init__.py | 0 .../__init__.py | 0 .../node/termination_point/__init__.py | 0 .../supporting_termination_point/__init__.py | 0 .../node/termination_point/te/__init__.py | 0 .../te/geolocation/__init__.py | 0 .../__init__.py | 0 .../max_lsp_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../network/supporting_network/__init__.py | 0 .../bindings/networks/network/te/__init__.py | 0 .../network/te/geolocation/__init__.py | 0 .../networks/network/te/nsrlg/__init__.py | 0 .../te_topology_identifier/__init__.py | 0 .../bindings/networks/te/__init__.py | 0 .../networks/te/templates/__init__.py | 0 .../te/templates/link_template/__init__.py | 0 .../te_link_attributes/__init__.py | 0 .../external_domain/__init__.py | 0 .../__init__.py | 0 .../max_lsp_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../label_restrictions/__init__.py | 0 .../label_restriction/__init__.py | 0 .../label_restriction/label_end/__init__.py | 0 .../label_end/te_label/__init__.py | 0 .../label_end/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_start/__init__.py | 0 .../label_start/te_label/__init__.py | 0 .../te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../label_restriction/label_step/__init__.py | 0 .../label_step/technology/__init__.py | 0 .../label_step/technology/generic/__init__.py | 0 .../max_link_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../max_resv_link_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../te_link_attributes/te_nsrlgs/__init__.py | 0 .../te_link_attributes/te_srlgs/__init__.py | 0 .../te_link_attributes/underlay/__init__.py | 0 .../underlay/backup_path/__init__.py | 0 .../backup_path/path_element/__init__.py | 0 .../backup_path/path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../underlay/primary_path/__init__.py | 0 .../primary_path/path_element/__init__.py | 0 .../path_element/type/__init__.py | 0 .../path_element/type/as_number/__init__.py | 0 .../type/as_number/as_number_hop/__init__.py | 0 .../path_element/type/label/__init__.py | 0 .../type/label/label_hop/__init__.py | 0 .../type/label/label_hop/te_label/__init__.py | 0 .../label_hop/te_label/technology/__init__.py | 0 .../te_label/technology/generic/__init__.py | 0 .../type/numbered_link_hop/__init__.py | 0 .../numbered_link_hop/__init__.py | 0 .../type/numbered_node_hop/__init__.py | 0 .../numbered_node_hop/__init__.py | 0 .../type/unnumbered_link_hop/__init__.py | 0 .../unnumbered_link_hop/__init__.py | 0 .../tunnel_termination_points/__init__.py | 0 .../underlay/tunnels/__init__.py | 0 .../underlay/tunnels/tunnel/__init__.py | 0 .../unreserved_bandwidth/__init__.py | 0 .../te_bandwidth/__init__.py | 0 .../te_bandwidth/technology/__init__.py | 0 .../technology/generic/__init__.py | 0 .../te/templates/node_template/__init__.py | 0 .../te_node_attributes/__init__.py | 0 .../underlay_topology/__init__.py | 0 .../ietf_network_slice/ietf_slice_handler.py | 0 .../ietf_network_slice/ofc23_batch_slices.py | 0 .../yang/ietf-ac-common@2023-11-13.yang | 0 .../yang/ietf-ac-svc@2024-08-06.yang | 0 .../yang/ietf-ethertypes@2019-03-04.yang | 0 .../yang/ietf-geo-location@2022-02-11.yang | 0 .../yang/ietf-inet-types@2024-10-21.yang | 0 .../yang/ietf-key-chain@2017-06-15.yang | 0 .../yang/ietf-netconf-acm@2018-02-14.yang | 0 .../yang/ietf-network-slice-service.txt | 0 ...ietf-network-slice-service@2024-08-28.yang | 0 .../yang/ietf-network-slice@2022-03-04.yang | 0 .../ietf-network-topology@2018-02-26.yang | 0 .../yang/ietf-network@2018-02-26.yang | 0 .../yang/ietf-packet-fields@2019-03-04.yang | 0 .../yang/ietf-routing-types@2017-12-04.yang | 0 .../yang/ietf-te-packet-types@2024-10-30.yang | 0 .../yang/ietf-te-types@2024-10-30.yang | 0 .../yang/ietf-vpn-common@2021-09-10.yang | 0 .../nbi_plugins => }/qkd_app/Resources.py | 0 .../hearthbeat => qkd_app}/__init__.py | 20 +-- .../nbi_plugins/etsi_bwm/__init__.py | 29 ----- .../nbi_plugins/ietf_acl/__init__.py | 38 ------ .../nbi_plugins/ietf_hardware/__init__.py | 24 ---- .../nbi_plugins/qkd_app/__init__.py | 29 ----- .../health_probes/Resources.py | 15 --- .../well_known_meta/Resources.py | 20 --- .../Resources.py} | 15 +-- .../__init__.py | 5 + .../nbi_plugins => }/tfs_api/Resources.py | 0 .../nbi_plugins => }/tfs_api/Tools.py | 0 .../nbi_plugins => }/tfs_api/__init__.py | 14 ++- .../hearthbeat/HeartbeatNamespace.py | 58 --------- .../hearthbeat/example_code.txt | 33 ----- src/nbi/service/well_known_meta/Resources.py | 35 ++++++ .../well_known_meta/__init__.py | 7 +- src/nbi/tests/Constants.py | 79 ++---------- src/nbi/tests/HeartbeatClientNamespace.py | 45 +++++++ src/nbi/tests/MockService_Dependencies.py | 2 +- src/nbi/tests/MockWebServer.py | 58 +++++++++ src/nbi/tests/OSM_Constants.py | 83 ++++++++++++ src/nbi/tests/PrepareTestScenario.py | 73 +++++------ src/nbi/tests/test__nbi_core.py | 61 +++++++++ src/nbi/tests/test_etsi_bwm.py | 53 ++++++-- src/nbi/tests/test_ietf_l2vpn.py | 11 +- src/nbi/tests/test_ietf_l3vpn.py | 49 +++++--- src/nbi/tests/test_ietf_network.py | 16 ++- src/nbi/tests/test_slice.py | 2 +- src/nbi/tests/test_slice_2.py | 12 +- src/nbi/tests/test_tfs_api.py | 107 ++++++++++++---- 2143 files changed, 905 insertions(+), 802 deletions(-) delete mode 100644 src/nbi/mytest/pytest_code.py rename src/nbi/{service/rest_server/nbi_plugins/tools/__init__.py => run_gunicorn.sh} (82%) mode change 100644 => 100755 rename run_test_nbi.sh => src/nbi/run_test.sh (82%) rename src/nbi/service/{rest_server/nbi_plugins/tools => _tools}/Authentication.py (100%) rename src/nbi/service/{rest_server/nbi_plugins/tools => _tools}/HttpStatusCodes.py (100%) rename src/nbi/service/{rest_server/nbi_plugins/tools => _tools}/Validator.py (100%) rename src/nbi/service/{rest_server => _tools}/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/etsi_bwm/Resources.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/etsi_bwm/Tools.py (100%) create mode 100644 src/nbi/service/etsi_bwm/__init__.py rename src/nbi/service/{rest_server/nbi_plugins => }/etsi_bwm/tests_etsi_bwm.txt (100%) rename src/nbi/service/{websocket_namespaces/__init__.py => health_probes/Constants.py} (82%) create mode 100644 src/nbi/service/health_probes/HeartbeatThread.py create mode 100644 src/nbi/service/health_probes/Namespaces.py rename src/nbi/{mytest/requirements.in => service/health_probes/Resources.py} (69%) rename src/nbi/service/{restapi_resources => }/health_probes/__init__.py (75%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_acl/Acl.py (97%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_acl/Acls.py (98%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_acl/YangValidator.py (100%) create mode 100644 src/nbi/service/ietf_acl/__init__.py rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_acl/ietf_acl_parser.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_acl/yang/iana-if-type@2014-05-08.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_acl/yang/ietf-access-control-list@2019-03-04.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_acl/yang/ietf-ethertypes@2019-03-04.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_acl/yang/ietf-inet-types@2013-07-15.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_acl/yang/ietf-interfaces@2018-02-20.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_acl/yang/ietf-packet-fields@2019-03-04.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_acl/yang/ietf-yang-types@2013-07-15.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_hardware/Hardware.py (94%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_hardware/HardwareMultipleDevices.py (93%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_hardware/YangHandler.py (100%) create mode 100644 src/nbi/service/ietf_hardware/__init__.py rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_hardware/yang/iana-hardware@2018-03-13.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_hardware/yang/ietf-hardware@2018-03-13.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_hardware/yang/ietf-inet-types@2013-07-15.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_hardware/yang/ietf-network-hardware-inventory@2023-03-09.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_hardware/yang/ietf-yang-types@2013-07-15.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l2vpn/Constants.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l2vpn/L2VPN_Service.py (95%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l2vpn/L2VPN_Services.py (90%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py (96%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l2vpn/__init__.py (56%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l2vpn/schemas/Common.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l2vpn/schemas/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l2vpn/schemas/site_network_access.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l2vpn/schemas/vpn_service.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l3vpn/Handlers.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l3vpn/L3VPN_Service.py (95%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l3vpn/L3VPN_Services.py (94%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py (92%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l3vpn/YangValidator.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l3vpn/__init__.py (57%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l3vpn/yang/ietf-inet-types@2013-07-15.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l3vpn/yang/ietf-l3vpn-svc@2018-01-19.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l3vpn/yang/ietf-netconf-acm@2018-02-14.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l3vpn/yang/ietf-yang-types@2013-07-15.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_l3vpn/yang/ietf_l3vpn_tree.txt (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/ComposeLink.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/ComposeNetwork.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/ComposeNode.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/ComposeTermPoint.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/ManualFixes.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/NameMapping.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/NetworkTypeEnum.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/Networks.py (96%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/README.md (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/YangHandler.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/__init__.py (79%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/_docs/test_commands.txt (92%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/destination/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/source/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/supporting_link/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/bundled_links/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/bundled_links/bundled_link/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/component_links/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/component_links/component_link/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_state/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/information_source_state/topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/recovery/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/statistics/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/client_svc/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/otn_link/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/link/te/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/network_types/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/network_types/te_topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/supporting_node/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/geolocation/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_state/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/information_source_state/topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/statistics/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/statistics/node/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_svc/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/te/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/te/client_svc/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/te/geolocation/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/node/termination_point/te/otn_ltp/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/supporting_network/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/te/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/te/geolocation/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/te/nsrlg/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/network/te_topology_identifier/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/node_template/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/build-yang-bindings.sh (96%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/iana-routing-types@2017-12-04.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-eth-te-topology@2023-09-28.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-eth-tran-service@2023-10-23.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-eth-tran-types@2023-10-23.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-inet-types@2013-07-15.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-l3-unicast-topology@2018-02-26.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-layer1-types@2022-10-14.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-network-topology@2018-02-26.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-network@2018-02-26.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-otn-topology@2023-07-06.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-routing-types@2017-12-04.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-te-packet-types@2020-06-10.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-te-topology@2020-08-06.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-te-types@2020-06-10.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-trans-client-service@2023-10-23.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-trans-client-svc-types@2023-10-23.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network/yang/ietf-yang-types@2013-07-15.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/NSS_Service.py (97%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/NSS_Service_Match_Criteria.py (95%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/NSS_Service_Match_Criterion.py (93%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/NSS_Services.py (96%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/NSS_Services_Connection_Group.py (95%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/NSS_Services_Connection_Groups.py (93%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/NSS_Services_SDP.py (96%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/NSS_Services_SDPs.py (96%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/YangValidator.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/__init__.py (51%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/nacm/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/nacm/groups/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/nacm/groups/group/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/nacm/rule_list/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/destination/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/source/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/network_types/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/te/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py (100%) rename src/nbi/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 (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/ietf_slice_handler.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/ofc23_batch_slices.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-ac-common@2023-11-13.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-ac-svc@2024-08-06.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-ethertypes@2019-03-04.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-geo-location@2022-02-11.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-inet-types@2024-10-21.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-key-chain@2017-06-15.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-netconf-acm@2018-02-14.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-network-slice-service.txt (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-network-slice-service@2024-08-28.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-network-slice@2022-03-04.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-network-topology@2018-02-26.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-network@2018-02-26.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-packet-fields@2019-03-04.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-routing-types@2017-12-04.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-te-packet-types@2024-10-30.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-te-types@2024-10-30.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/ietf_network_slice/yang/ietf-vpn-common@2021-09-10.yang (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/qkd_app/Resources.py (100%) rename src/nbi/service/{websocket_namespaces/hearthbeat => qkd_app}/__init__.py (64%) delete mode 100644 src/nbi/service/rest_server/nbi_plugins/etsi_bwm/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_acl/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/ietf_hardware/__init__.py delete mode 100644 src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py delete mode 100644 src/nbi/service/restapi_resources/health_probes/Resources.py delete mode 100644 src/nbi/service/restapi_resources/well_known_meta/Resources.py rename src/nbi/service/{rest_server/nbi_plugins/__init__.py => restconf_root/Resources.py} (67%) rename src/nbi/service/{restapi_resources => restconf_root}/__init__.py (75%) rename src/nbi/service/{rest_server/nbi_plugins => }/tfs_api/Resources.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/tfs_api/Tools.py (100%) rename src/nbi/service/{rest_server/nbi_plugins => }/tfs_api/__init__.py (90%) delete mode 100644 src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py delete mode 100644 src/nbi/service/websocket_namespaces/hearthbeat/example_code.txt create mode 100644 src/nbi/service/well_known_meta/Resources.py rename src/nbi/service/{restapi_resources => }/well_known_meta/__init__.py (71%) create mode 100644 src/nbi/tests/HeartbeatClientNamespace.py create mode 100644 src/nbi/tests/MockWebServer.py create mode 100644 src/nbi/tests/OSM_Constants.py create mode 100644 src/nbi/tests/test__nbi_core.py diff --git a/src/nbi/mytest/pytest_code.py b/src/nbi/mytest/pytest_code.py deleted file mode 100644 index be0376b88..000000000 --- a/src/nbi/mytest/pytest_code.py +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 eventlet, eventlet.wsgi, json, logging, os, pytest, requests, threading, time -import websockets.sync.client # Import synchronous WebSocket client -from nbi.service.NbiApplication import NbiApplication -from nbi.service.rest_server.nbi_plugins import register_restconf -from nbi.service.restapi_resources.health_probes import register_health_probes -from nbi.service.websocket_namespaces.hearthbeat import register_heartbeat - - - -logging.basicConfig(level=logging.DEBUG) -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -LOCAL_HOST = '127.0.0.1' -NBI_SERVICE_PORT = 18080 -NBI_SERVICE_PREFIX_URL = '' -NBI_SERVICE_BASE_URL = '{:s}:{:d}{:s}'.format(LOCAL_HOST, NBI_SERVICE_PORT, NBI_SERVICE_PREFIX_URL) - -class ServerThread(threading.Thread): - def __init__(self): - super().__init__(daemon=True) - - self.nbi_app = NbiApplication(base_url=NBI_SERVICE_PREFIX_URL) - register_health_probes(self.nbi_app) - register_heartbeat (self.nbi_app) - register_restconf (self.nbi_app) - self.nbi_app.dump_configuration() - - def run(self): - try: - #eventlet.wsgi.server( - # eventlet.listen((LOCAL_HOST, NBI_SERVICE_PORT)), - # self.nbi_app.get_flask_app(), - # debug=True, log_output=True - #) - #thread = eventlet.spawn( - # self.nbi_app._sio.run, self.nbi_app.get_flask_app(), - # host=LOCAL_HOST, port=NBI_SERVICE_PORT, - # debug=True, use_reloader=False - #) - #thread.wait() - self.nbi_app._sio.run( - self.nbi_app.get_flask_app(), - host=LOCAL_HOST, port=NBI_SERVICE_PORT, - debug=True, use_reloader=False - ) - except: - LOGGER.exception('unhandled') - -@pytest.fixture(scope='session') -def nbi_application() -> NbiApplication: - thread = ServerThread() - thread.start() - time.sleep(1) - yield thread.nbi_app - thread.join(timeout=1) - -def test_restapi_get_healthz( - nbi_application : NbiApplication # pylint: disable=redefined-outer-name, unused-argument -) -> None: - request_url = 'http://' + NBI_SERVICE_BASE_URL + '/healthz' - LOGGER.warning('Request: GET {:s}'.format(str(request_url))) - reply = requests.request('get', request_url, timeout=10, allow_redirects=True) - LOGGER.warning('Reply: {:s}'.format(str(reply.text))) - assert reply.status_code == requests.codes['OK'], 'Reply failed with status code {:d}'.format(reply.status_code) - if reply.content and len(reply.content) > 0: return reply.json() - -def test_websocket_get_heartbeat( - nbi_application : NbiApplication # pylint: disable=redefined-outer-name, unused-argument -) -> None: - nbi_application.dump_configuration() - request_url = 'ws://' + NBI_SERVICE_BASE_URL + '/heartbeat' - LOGGER.warning('Request: WS {:s}'.format(str(request_url))) - - heartbeat_count = 0 - with websockets.sync.client.connect(request_url) as ws: - while heartbeat_count < 5: - message = ws.recv() - LOGGER.warning('Received message: {:s}'.format(str(message))) - - data = json.loads(message) - - # Validate uptime response - assert "uptime_seconds" in data, "Missing 'uptime_seconds' in response" - assert isinstance(data["uptime_seconds"], (int, float)), "'uptime_seconds' is not a number" - - heartbeat_count += 1 - LOGGER.warning('--> Heartbeat #{:d}: {:s}'.format(heartbeat_count, str(data))) - - LOGGER.warning('Test completed') - raise Exception() diff --git a/src/nbi/service/rest_server/nbi_plugins/tools/__init__.py b/src/nbi/run_gunicorn.sh old mode 100644 new mode 100755 similarity index 82% rename from src/nbi/service/rest_server/nbi_plugins/tools/__init__.py rename to src/nbi/run_gunicorn.sh index 53d5157f7..220494ef4 --- a/src/nbi/service/rest_server/nbi_plugins/tools/__init__.py +++ b/src/nbi/run_gunicorn.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,3 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. +export FLASK_ENV=development +gunicorn -w 4 --worker-class eventlet -b 0.0.0.0:18080 --log-level DEBUG nbi.service.app:app diff --git a/run_test_nbi.sh b/src/nbi/run_test.sh similarity index 82% rename from run_test_nbi.sh rename to src/nbi/run_test.sh index b34f4c956..07beb9837 100755 --- a/run_test_nbi.sh +++ b/src/nbi/run_test.sh @@ -13,8 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -export PYTHON_PATH=./src -export LOG_LEVEL=DEBUG export FLASK_ENV=development -python -m pytest --log-level=DEBUG -o log_cli=true --verbose src/nbi/mytest/pytest_code.py +# Add live logs with: -o log_cli=true +python -m pytest --log-level=DEBUG --verbose nbi/tests/test_nbi.py diff --git a/src/nbi/service/NbiApplication.py b/src/nbi/service/NbiApplication.py index 17d0507ec..ef2659415 100644 --- a/src/nbi/service/NbiApplication.py +++ b/src/nbi/service/NbiApplication.py @@ -14,7 +14,7 @@ import logging, time -from typing import Any, Optional +from typing import Any, List, Optional, Tuple from flask import Flask, request from flask_restful import Api, Resource from flask_socketio import Namespace, SocketIO @@ -39,28 +39,25 @@ class NbiApplication: self._app.config['SECRET_KEY'] = 'secret!' self._app.after_request(log_request) self._api = Api(self._app, prefix=base_url) - #websocket_path = '/'.join([base_url.rstrip('/'), 'websocket']) - #self._sio = SocketIO(self._app, path=base_url, cors_allowed_origins="*", logger=True, engineio_logger=True) - self._sio = SocketIO(self._app, cors_allowed_origins="*", logger=True, engineio_logger=True) - - @self._sio.on_error_default # handles all namespaces without an explicit error handler - def default_error_handler(e): - LOGGER.error('[default_error_handler] e={:s}'.format(str(e))) + #socketio_path = '/'.join([base_url.rstrip('/'), 'socket.io']) + self._sio = SocketIO( + self._app, cors_allowed_origins='*', async_mode='eventlet', + #path=socketio_path, + logger=True, engineio_logger=True + ) def add_rest_api_resource(self, resource_class : Resource, *urls, **kwargs) -> None: self._api.add_resource(resource_class, *urls, **kwargs) - def add_websocket_namespace(self, namespace_class : Namespace, namespace_url : str) -> None: - LOGGER.warning('[add_websocket_namespace] (before) self._sio.server={:s}'.format(str(self._sio.server))) - LOGGER.warning('[add_websocket_namespace] (before) self._sio.server.namespace_handlers={:s}'.format(str(self._sio.server.namespace_handlers))) - LOGGER.warning('[add_websocket_namespace] (before) self._sio.namespace_handlers={:s}'.format(str(self._sio.namespace_handlers))) - self._sio.on_namespace(namespace_class(namespace_url)) - LOGGER.warning('[add_websocket_namespace] (after) self._sio.server={:s}'.format(str(self._sio.server))) - LOGGER.warning('[add_websocket_namespace] (after) self._sio.server.namespace_handlers={:s}'.format(str(self._sio.server.namespace_handlers))) - LOGGER.warning('[add_websocket_namespace] (after) self._sio.namespace_handlers={:s}'.format(str(self._sio.namespace_handlers))) + def add_rest_api_resources(self, resources : List[Tuple[Resource, str, str]]) -> None: + for endpoint_name, resource_class, resource_url in resources: + self.add_rest_api_resource(resource_class, resource_url, endpoint=endpoint_name) + + def add_websocket_namespace(self, namespace : Namespace) -> None: + self._sio.on_namespace(namespace) def websocket_emit_message( - self, event : str, *args : Any, namespace : str = "/", to : Optional[str] = None + self, event : str, *args : Any, namespace : str = '/', to : Optional[str] = None ) -> None: self._sio.emit(event, *args, namespace=namespace, to=to) @@ -76,46 +73,14 @@ class NbiApplication: for rule in self._app.url_map.iter_rules(): LOGGER.debug(' - {:s}'.format(str(rule))) - LOGGER.debug('Configured WebSocket Namespaces:') - for namespace in self._sio.server.handlers.keys(): - LOGGER.debug(' (server) - {:s}'.format(str(namespace))) - + # TODO: find a way to report configured namespaces, for some reason, + # those data structures become emptied when SocketIO server starts. + LOGGER.debug('Configured SocketIO/WebSocket Namespaces:') + LOGGER.debug(' WARNING: Might report an empty list of namespaces even when') + LOGGER.debug(' they are properly configured. To be fixed.') + for handler in self._sio.handlers: + LOGGER.debug(' - {:s}'.format(str(handler))) for namespace in self._sio.namespace_handlers: - LOGGER.debug(' (ns_hdls) - {:s}'.format(str(namespace))) - - def run_standalone( - self, bind_address : Optional[str] = None, bind_port : Optional[int] = None, - debug : bool = False, use_reloader : bool = False - ) -> None: - # Run method used when started in a standalone mode, i.e., outside gunicorn or - # similar WSGI HTTP servers. Otherwise, use mechanism defined by the used - # WSGI HTTP server. - - #logging.getLogger('werkzeug').setLevel(logging.WARNING) - - endpoint = 'http://{:s}:{:s}'.format(str(bind_address), str(bind_port)) - if self.base_url is not None: - endpoint = '/'.join([endpoint.rstrip('/'), self.base_url]) - - LOGGER.info('Listening on {:s}...'.format(endpoint)) - self._sio.run( - self._app, host=bind_address, port=bind_port, - debug=debug, use_reloader=use_reloader - ) - - def start_test_thread( - self, bind_address : Optional[str] = None, bind_port : Optional[int] = None, - debug : bool = False, use_reloader : bool = False - ) -> None: - # NOTE: To be used for testing purposes with pytest - # Stop the thread through nbi_app.stop_test_thread() - self._thread = self._sio.start_background_task( - self._sio.run, self._app, host=bind_address, port=bind_port, - debug=debug, use_reloader=use_reloader - ) - - def stop_test_thread(self): - # NOTE: To be used for testing purposes with pytest - # Start the thread through nbi_app.start_test_thread(...) - if self._thread is None: return - self._thread.join() + LOGGER.debug(' - {:s}'.format(str(namespace))) + for namespace in self._sio.server.handlers: + LOGGER.debug(' - {:s}'.format(str(namespace))) diff --git a/src/nbi/service/rest_server/nbi_plugins/tools/Authentication.py b/src/nbi/service/_tools/Authentication.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/tools/Authentication.py rename to src/nbi/service/_tools/Authentication.py diff --git a/src/nbi/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py b/src/nbi/service/_tools/HttpStatusCodes.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py rename to src/nbi/service/_tools/HttpStatusCodes.py diff --git a/src/nbi/service/rest_server/nbi_plugins/tools/Validator.py b/src/nbi/service/_tools/Validator.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/tools/Validator.py rename to src/nbi/service/_tools/Validator.py diff --git a/src/nbi/service/rest_server/__init__.py b/src/nbi/service/_tools/__init__.py similarity index 100% rename from src/nbi/service/rest_server/__init__.py rename to src/nbi/service/_tools/__init__.py diff --git a/src/nbi/service/app.py b/src/nbi/service/app.py index 320e7b344..c615584b5 100644 --- a/src/nbi/service/app.py +++ b/src/nbi/service/app.py @@ -12,100 +12,74 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging -from typing import Optional -# NOTE: Metrics disabled for now. No NBI endpoint uses it and -# causes "address already in use" when deploying multiple -# gunicorn workers. -#from prometheus_client import start_http_server +# Enable eventlet for async networking +# NOTE: monkey_patch needs to be executed before importing any other module. +import eventlet +eventlet.monkey_patch() +#pylint: disable=wrong-import-position +import logging from common.Constants import ServiceNameEnum from common.Settings import ( ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, get_http_bind_address, get_log_level, - - # NOTE: Metrics disabled for now. No NBI endpoint uses it and - # causes "address already in use" when deploying multiple - # gunicorn workers. - #get_metrics_port, - get_service_baseurl_http, get_service_port_http, wait_for_environment_variables ) from .NbiApplication import NbiApplication -#from .rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api -#from .rest_server.nbi_plugins.ietf_hardware import register_ietf_hardware -#from .rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn -#from .rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn -#from .rest_server.nbi_plugins.ietf_network import register_ietf_network -#from .rest_server.nbi_plugins.ietf_network_slice import register_ietf_nss -#from .rest_server.nbi_plugins.ietf_acl import register_ietf_acl -#from .rest_server.nbi_plugins.qkd_app import register_qkd_app -#from .rest_server.nbi_plugins.tfs_api import register_tfs_api -#from .rest_server.nbi_plugins import register_restconf -from .websocket_namespaces.hearthbeat import register_heartbeat +from .etsi_bwm import register_etsi_bwm_api +from .health_probes import register_health_probes +from .ietf_acl import register_ietf_acl +from .ietf_hardware import register_ietf_hardware +from .ietf_l2vpn import register_ietf_l2vpn +from .ietf_l3vpn import register_ietf_l3vpn +from .ietf_network import register_ietf_network +from .ietf_network_slice import register_ietf_nss +from .qkd_app import register_qkd_app +from .restconf_root import register_restconf_root +from .tfs_api import register_tfs_api +from .well_known_meta import register_well_known LOG_LEVEL = get_log_level() logging.basicConfig(level=LOG_LEVEL) LOGGER = logging.getLogger(__name__) +wait_for_environment_variables([ + get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), +]) + BIND_ADDRESS = get_http_bind_address() BIND_PORT = get_service_port_http(ServiceNameEnum.NBI) BASE_URL = get_service_baseurl_http(ServiceNameEnum.NBI) or '' -REGISTER_METHODS = [ - #register_etsi_bwm_api, - #register_ietf_hardware, - #register_ietf_l2vpn, - #register_ietf_l3vpn, - #register_ietf_network, - #register_ietf_nss, - #register_ietf_acl, - #register_qkd_app, - #register_tfs_api, - #register_restconf, - register_heartbeat, -] - -def configure_nbi( - base_url : Optional[str] = None -) -> NbiApplication: - wait_for_environment_variables([ - get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST ), - get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC), - get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_HOST ), - get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), - get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_HOST ), - get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), - ]) - - LOGGER.info('Starting...') - - # Start metrics server - # NOTE: Metrics disabled for now. No NBI endpoint uses it and - # causes "address already in use" when deploying multiple - # gunicorn workers. - #metrics_port = get_metrics_port() - #start_http_server(metrics_port) - - _nbi_app = NbiApplication(base_url=base_url) - - for register_method in REGISTER_METHODS: - register_method(_nbi_app) - - _nbi_app.dump_configuration() - - return _nbi_app - -nbi_app = configure_nbi(base_url=BASE_URL) +nbi_app = NbiApplication(base_url=BASE_URL) +register_health_probes(nbi_app) +register_restconf_root(nbi_app) +register_well_known (nbi_app) +register_tfs_api (nbi_app) +register_etsi_bwm_api (nbi_app) +register_ietf_hardware(nbi_app) +register_ietf_l2vpn (nbi_app) +register_ietf_l3vpn (nbi_app) +register_ietf_network (nbi_app) +register_ietf_nss (nbi_app) +register_ietf_acl (nbi_app) +register_qkd_app (nbi_app) + +nbi_app.dump_configuration() +app = nbi_app.get_flask_app() if __name__ == '__main__': # Only used to run it locally during development stage; # otherwise, app is directly launched by gunicorn. - nbi_app.run_standalone( - bind_address=BIND_ADDRESS, bind_port=BIND_PORT + nbi_app._sio.run( + app, host=BIND_ADDRESS, port=BIND_PORT, + debug=True, use_reloader=False ) -else: - app = nbi_app.get_flask_app() diff --git a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Resources.py b/src/nbi/service/etsi_bwm/Resources.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Resources.py rename to src/nbi/service/etsi_bwm/Resources.py diff --git a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Tools.py b/src/nbi/service/etsi_bwm/Tools.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Tools.py rename to src/nbi/service/etsi_bwm/Tools.py diff --git a/src/nbi/service/etsi_bwm/__init__.py b/src/nbi/service/etsi_bwm/__init__.py new file mode 100644 index 000000000..0dbe80bf0 --- /dev/null +++ b/src/nbi/service/etsi_bwm/__init__.py @@ -0,0 +1,30 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from nbi.service.NbiApplication import NbiApplication +from .Resources import BwInfo, BwInfoId + +URL_PREFIX = '/restconf/bwm/v1' + +def register_etsi_bwm_api(nbi_app : NbiApplication): + nbi_app.add_rest_api_resource( + BwInfo, + URL_PREFIX + '/bw_allocations', + endpoint='etsi_bwm.bw_info' + ) + nbi_app.add_rest_api_resource( + BwInfoId, + URL_PREFIX + '/bw_allocations/', + endpoint='etsi_bwm.bw_info_id' + ) diff --git a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/tests_etsi_bwm.txt b/src/nbi/service/etsi_bwm/tests_etsi_bwm.txt similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/etsi_bwm/tests_etsi_bwm.txt rename to src/nbi/service/etsi_bwm/tests_etsi_bwm.txt diff --git a/src/nbi/service/websocket_namespaces/__init__.py b/src/nbi/service/health_probes/Constants.py similarity index 82% rename from src/nbi/service/websocket_namespaces/__init__.py rename to src/nbi/service/health_probes/Constants.py index 53d5157f7..f61e2bce5 100644 --- a/src/nbi/service/websocket_namespaces/__init__.py +++ b/src/nbi/service/health_probes/Constants.py @@ -12,3 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. + +import time + +SIO_NAMESPACE = '/heartbeat' +SIO_ROOM = 'heartbeat' + +START_TIME = time.time() + +HEARTHBEAT_INTERVAL = 1 # second diff --git a/src/nbi/service/health_probes/HeartbeatThread.py b/src/nbi/service/health_probes/HeartbeatThread.py new file mode 100644 index 000000000..0b7158a09 --- /dev/null +++ b/src/nbi/service/health_probes/HeartbeatThread.py @@ -0,0 +1,40 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, socketio, threading, time +from .Constants import HEARTHBEAT_INTERVAL, SIO_NAMESPACE, SIO_ROOM, START_TIME + +LOGGER = logging.getLogger(__name__) + +class HeartbeatThread(threading.Thread): + def __init__(self, namespace : socketio.Namespace): + super().__init__(daemon=True) + self._namespace = namespace + + def run(self): + try: + while True: + time.sleep(HEARTHBEAT_INTERVAL) + uptime = time.time() - START_TIME + LOGGER.info('[HeartbeatThread::run] emitting...') + + server : socketio.Server = self._namespace.server + if server is None: continue + + data = {'uptime_seconds': uptime} + server.emit('uptime', data, namespace=SIO_NAMESPACE, to=SIO_ROOM) + + LOGGER.info('[HeartbeatThread::run] emitted') + except: # pylint: disable=bare-except + LOGGER.exception('[HeartbeatThread::run] thread failed') diff --git a/src/nbi/service/health_probes/Namespaces.py b/src/nbi/service/health_probes/Namespaces.py new file mode 100644 index 000000000..9fba4ba71 --- /dev/null +++ b/src/nbi/service/health_probes/Namespaces.py @@ -0,0 +1,37 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 import request +from flask_socketio import Namespace, join_room, leave_room +from .Constants import SIO_NAMESPACE, SIO_ROOM +from .HeartbeatThread import HeartbeatThread + +LOGGER = logging.getLogger(__name__) + +class HeartbeatServerNamespace(Namespace): + def __init__(self): + super().__init__(namespace=SIO_NAMESPACE) + self._thread = HeartbeatThread(self) + self._thread.start() + + def on_connect(self, auth): + MSG = '[HeartbeatServerNamespace::on_connect] Client connect: sid={:s}, auth={:s}' + LOGGER.info(MSG.format(str(request.sid), str(auth))) + join_room(SIO_ROOM, namespace=SIO_NAMESPACE) + + def on_disconnect(self, reason): + MSG = '[HeartbeatServerNamespace::on_disconnect] Client disconnect: sid={:s}, reason={:s}' + LOGGER.info(MSG.format(str(request.sid), str(reason))) + leave_room(SIO_ROOM, namespace=SIO_NAMESPACE) diff --git a/src/nbi/mytest/requirements.in b/src/nbi/service/health_probes/Resources.py similarity index 69% rename from src/nbi/mytest/requirements.in rename to src/nbi/service/health_probes/Resources.py index 6a27a260f..0e597b149 100644 --- a/src/nbi/mytest/requirements.in +++ b/src/nbi/service/health_probes/Resources.py @@ -12,9 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -eventlet==0.39.0 -Flask==2.1.3 -Flask-HTTPAuth==4.5.0 -Flask-RESTful==0.3.9 -flask-socketio==5.5.1 -gunicorn==23.0.0 + +import time +from flask_restful import Resource +from .Constants import START_TIME + +class HealthProbe(Resource): + def get(self): + uptime = time.time() - START_TIME + return {'status': 'ready', 'uptime': uptime}, 200 + #return {'status': 'not ready'}, 503 diff --git a/src/nbi/service/restapi_resources/health_probes/__init__.py b/src/nbi/service/health_probes/__init__.py similarity index 75% rename from src/nbi/service/restapi_resources/health_probes/__init__.py rename to src/nbi/service/health_probes/__init__.py index c1251e769..a2cb53e5b 100644 --- a/src/nbi/service/restapi_resources/health_probes/__init__.py +++ b/src/nbi/service/health_probes/__init__.py @@ -14,8 +14,9 @@ from nbi.service.NbiApplication import NbiApplication -from .Resources import RESOURCE_DESCRIPTORS +from .Namespaces import HeartbeatServerNamespace +from .Resources import HealthProbe def register_health_probes(nbi_app : NbiApplication): - for endpoint_name, resource_class, resource_url in RESOURCE_DESCRIPTORS: - nbi_app.add_rest_api_resource(resource_class, resource_url, endpoint=endpoint_name) + nbi_app.add_rest_api_resource(HealthProbe, '/healthz', endpoint='sys.probe.healthz') + nbi_app.add_websocket_namespace(HeartbeatServerNamespace()) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acl.py b/src/nbi/service/ietf_acl/Acl.py similarity index 97% rename from src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acl.py rename to src/nbi/service/ietf_acl/Acl.py index c0cbbcff7..f259e36f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acl.py +++ b/src/nbi/service/ietf_acl/Acl.py @@ -19,7 +19,7 @@ from common.proto.context_pb2 import ConfigActionEnum, ConfigRule from common.tools.context_queries.Device import get_device from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient -from nbi.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH +from nbi.service._tools.Authentication import HTTP_AUTH from .ietf_acl_parser import ietf_acl_from_config_rule_resource_value LOGGER = logging.getLogger(__name__) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acls.py b/src/nbi/service/ietf_acl/Acls.py similarity index 98% rename from src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acls.py rename to src/nbi/service/ietf_acl/Acls.py index 816aba138..e26a047d2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acls.py +++ b/src/nbi/service/ietf_acl/Acls.py @@ -22,7 +22,7 @@ from common.tools.context_queries.Device import get_device from common.tools.grpc.Tools import grpc_message_to_json_string from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient -from nbi.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH +from nbi.service._tools.Authentication import HTTP_AUTH from .ietf_acl_parser import AclDirectionEnum, config_rule_from_ietf_acl from .YangValidator import YangValidator diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/YangValidator.py b/src/nbi/service/ietf_acl/YangValidator.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_acl/YangValidator.py rename to src/nbi/service/ietf_acl/YangValidator.py diff --git a/src/nbi/service/ietf_acl/__init__.py b/src/nbi/service/ietf_acl/__init__.py new file mode 100644 index 000000000..11bb2194a --- /dev/null +++ b/src/nbi/service/ietf_acl/__init__.py @@ -0,0 +1,31 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from nbi.service.NbiApplication import NbiApplication +from .Acl import Acl +from .Acls import Acls + +URL_PREFIX = '/restconf/data' + +def register_ietf_acl(nbi_app : NbiApplication): + nbi_app.add_rest_api_resource( + Acls, + URL_PREFIX + '/device=/ietf-access-control-list:acls', + ) + nbi_app.add_rest_api_resource( + Acl, + URL_PREFIX + '/device=/ietf-access-control-list:acl=', + URL_PREFIX + '/device=/ietf-access-control-list:acl=/', + ) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/ietf_acl_parser.py b/src/nbi/service/ietf_acl/ietf_acl_parser.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_acl/ietf_acl_parser.py rename to src/nbi/service/ietf_acl/ietf_acl_parser.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/iana-if-type@2014-05-08.yang b/src/nbi/service/ietf_acl/yang/iana-if-type@2014-05-08.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/iana-if-type@2014-05-08.yang rename to src/nbi/service/ietf_acl/yang/iana-if-type@2014-05-08.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/ietf-access-control-list@2019-03-04.yang b/src/nbi/service/ietf_acl/yang/ietf-access-control-list@2019-03-04.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/ietf-access-control-list@2019-03-04.yang rename to src/nbi/service/ietf_acl/yang/ietf-access-control-list@2019-03-04.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/ietf-ethertypes@2019-03-04.yang b/src/nbi/service/ietf_acl/yang/ietf-ethertypes@2019-03-04.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/ietf-ethertypes@2019-03-04.yang rename to src/nbi/service/ietf_acl/yang/ietf-ethertypes@2019-03-04.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/ietf-inet-types@2013-07-15.yang b/src/nbi/service/ietf_acl/yang/ietf-inet-types@2013-07-15.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/ietf-inet-types@2013-07-15.yang rename to src/nbi/service/ietf_acl/yang/ietf-inet-types@2013-07-15.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/ietf-interfaces@2018-02-20.yang b/src/nbi/service/ietf_acl/yang/ietf-interfaces@2018-02-20.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/ietf-interfaces@2018-02-20.yang rename to src/nbi/service/ietf_acl/yang/ietf-interfaces@2018-02-20.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/ietf-packet-fields@2019-03-04.yang b/src/nbi/service/ietf_acl/yang/ietf-packet-fields@2019-03-04.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/ietf-packet-fields@2019-03-04.yang rename to src/nbi/service/ietf_acl/yang/ietf-packet-fields@2019-03-04.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/ietf-yang-types@2013-07-15.yang b/src/nbi/service/ietf_acl/yang/ietf-yang-types@2013-07-15.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_acl/yang/ietf-yang-types@2013-07-15.yang rename to src/nbi/service/ietf_acl/yang/ietf-yang-types@2013-07-15.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/Hardware.py b/src/nbi/service/ietf_hardware/Hardware.py similarity index 94% rename from src/nbi/service/rest_server/nbi_plugins/ietf_hardware/Hardware.py rename to src/nbi/service/ietf_hardware/Hardware.py index bce1d6d14..4a1f5cc66 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/Hardware.py +++ b/src/nbi/service/ietf_hardware/Hardware.py @@ -18,8 +18,8 @@ from flask.json import jsonify from flask_restful import Resource from common.tools.context_queries.Device import get_device from context.client.ContextClient import ContextClient -from ..tools.Authentication import HTTP_AUTH -from ..tools.HttpStatusCodes import HTTP_OK, HTTP_SERVERERROR +from nbi.service._tools.Authentication import HTTP_AUTH +from nbi.service._tools.HttpStatusCodes import HTTP_OK, HTTP_SERVERERROR from .YangHandler import YangHandler LOGGER = logging.getLogger(__name__) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/HardwareMultipleDevices.py b/src/nbi/service/ietf_hardware/HardwareMultipleDevices.py similarity index 93% rename from src/nbi/service/rest_server/nbi_plugins/ietf_hardware/HardwareMultipleDevices.py rename to src/nbi/service/ietf_hardware/HardwareMultipleDevices.py index 2ac0bf40e..f2f16f8ec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/HardwareMultipleDevices.py +++ b/src/nbi/service/ietf_hardware/HardwareMultipleDevices.py @@ -18,8 +18,8 @@ from flask.json import jsonify from flask_restful import Resource from common.proto.context_pb2 import Empty from context.client.ContextClient import ContextClient -from ..tools.Authentication import HTTP_AUTH -from ..tools.HttpStatusCodes import HTTP_OK, HTTP_SERVERERROR +from nbi.service._tools.Authentication import HTTP_AUTH +from nbi.service._tools.HttpStatusCodes import HTTP_OK, HTTP_SERVERERROR from .YangHandler import YangHandler LOGGER = logging.getLogger(__name__) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/YangHandler.py b/src/nbi/service/ietf_hardware/YangHandler.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_hardware/YangHandler.py rename to src/nbi/service/ietf_hardware/YangHandler.py diff --git a/src/nbi/service/ietf_hardware/__init__.py b/src/nbi/service/ietf_hardware/__init__.py new file mode 100644 index 000000000..2a097a538 --- /dev/null +++ b/src/nbi/service/ietf_hardware/__init__.py @@ -0,0 +1,29 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from nbi.service.NbiApplication import NbiApplication +from .Hardware import Hardware +from .HardwareMultipleDevices import HardwareMultipleDevices + +URL_PREFIX = '/restconf/data' + +def register_ietf_hardware(nbi_app : NbiApplication): + nbi_app.add_rest_api_resource( + Hardware, + URL_PREFIX + '/device=/ietf-network-hardware-inventory:network-hardware-inventory' + ) + nbi_app.add_rest_api_resource( + HardwareMultipleDevices, + URL_PREFIX + '/ietf-network-hardware-inventory:network-hardware-inventory' + ) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/yang/iana-hardware@2018-03-13.yang b/src/nbi/service/ietf_hardware/yang/iana-hardware@2018-03-13.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_hardware/yang/iana-hardware@2018-03-13.yang rename to src/nbi/service/ietf_hardware/yang/iana-hardware@2018-03-13.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/yang/ietf-hardware@2018-03-13.yang b/src/nbi/service/ietf_hardware/yang/ietf-hardware@2018-03-13.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_hardware/yang/ietf-hardware@2018-03-13.yang rename to src/nbi/service/ietf_hardware/yang/ietf-hardware@2018-03-13.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/yang/ietf-inet-types@2013-07-15.yang b/src/nbi/service/ietf_hardware/yang/ietf-inet-types@2013-07-15.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_hardware/yang/ietf-inet-types@2013-07-15.yang rename to src/nbi/service/ietf_hardware/yang/ietf-inet-types@2013-07-15.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/yang/ietf-network-hardware-inventory@2023-03-09.yang b/src/nbi/service/ietf_hardware/yang/ietf-network-hardware-inventory@2023-03-09.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_hardware/yang/ietf-network-hardware-inventory@2023-03-09.yang rename to src/nbi/service/ietf_hardware/yang/ietf-network-hardware-inventory@2023-03-09.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/yang/ietf-yang-types@2013-07-15.yang b/src/nbi/service/ietf_hardware/yang/ietf-yang-types@2013-07-15.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_hardware/yang/ietf-yang-types@2013-07-15.yang rename to src/nbi/service/ietf_hardware/yang/ietf-yang-types@2013-07-15.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py b/src/nbi/service/ietf_l2vpn/Constants.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py rename to src/nbi/service/ietf_l2vpn/Constants.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py b/src/nbi/service/ietf_l2vpn/L2VPN_Service.py similarity index 95% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py rename to src/nbi/service/ietf_l2vpn/L2VPN_Service.py index 288ed2d10..a7d52babe 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py +++ b/src/nbi/service/ietf_l2vpn/L2VPN_Service.py @@ -20,8 +20,10 @@ from common.proto.context_pb2 import SliceStatusEnum from common.tools.context_queries.Slice import get_slice_by_uuid 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 nbi.service._tools.Authentication import HTTP_AUTH +from nbi.service._tools.HttpStatusCodes import ( + HTTP_GATEWAYTIMEOUT, HTTP_NOCONTENT, HTTP_OK, HTTP_SERVERERROR +) LOGGER = logging.getLogger(__name__) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py b/src/nbi/service/ietf_l2vpn/L2VPN_Services.py similarity index 90% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py rename to src/nbi/service/ietf_l2vpn/L2VPN_Services.py index c728b4073..9be45582c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py +++ b/src/nbi/service/ietf_l2vpn/L2VPN_Services.py @@ -21,10 +21,10 @@ from werkzeug.exceptions import UnsupportedMediaType from common.Constants import DEFAULT_CONTEXT_NAME from common.proto.context_pb2 import SliceStatusEnum, Slice from slice.client.SliceClient import SliceClient +from nbi.service._tools.HttpStatusCodes import HTTP_CREATED, HTTP_SERVERERROR +from nbi.service._tools.Validator import validate_message +from nbi.service._tools.Authentication import HTTP_AUTH from .schemas.vpn_service import SCHEMA_VPN_SERVICE -from nbi.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_CREATED, HTTP_SERVERERROR -from nbi.service.rest_server.nbi_plugins.tools.Validator import validate_message -from nbi.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH LOGGER = logging.getLogger(__name__) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py b/src/nbi/service/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py similarity index 96% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py rename to src/nbi/service/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py index 2ae776c20..8397e45f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py +++ b/src/nbi/service/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py @@ -29,10 +29,10 @@ from common.tools.grpc.EndPointIds import update_endpoint_ids from common.tools.grpc.Tools import grpc_message_to_json_string from context.client.ContextClient import ContextClient from slice.client.SliceClient import SliceClient +from nbi.service._tools.Authentication import HTTP_AUTH +from nbi.service._tools.HttpStatusCodes import HTTP_NOCONTENT, HTTP_SERVERERROR +from nbi.service._tools.Validator import validate_message from .schemas.site_network_access import SCHEMA_SITE_NETWORK_ACCESS -from nbi.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH -from nbi.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_NOCONTENT, HTTP_SERVERERROR -from nbi.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/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py b/src/nbi/service/ietf_l2vpn/__init__.py similarity index 56% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py rename to src/nbi/service/ietf_l2vpn/__init__.py index a391040d9..e57984235 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py +++ b/src/nbi/service/ietf_l2vpn/__init__.py @@ -15,22 +15,25 @@ # RFC 8466 - L2VPN Service Model (L2SM) # Ref: https://datatracker.ietf.org/doc/html/rfc8466 -from flask_restful import Resource -from nbi.service.rest_server.RestServer import RestServer +from nbi.service.NbiApplication import NbiApplication from .L2VPN_Services import L2VPN_Services from .L2VPN_Service import L2VPN_Service from .L2VPN_SiteNetworkAccesses import L2VPN_SiteNetworkAccesses URL_PREFIX = '/restconf/data/ietf-l2vpn-svc:l2vpn-svc' -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_l2vpn(rest_server : RestServer): - _add_resource(rest_server, L2VPN_Services, - '/vpn-services') - _add_resource(rest_server, L2VPN_Service, - '/vpn-services/vpn-service=', '/vpn-services/vpn-service=/') - _add_resource(rest_server, L2VPN_SiteNetworkAccesses, - '/sites/site=/site-network-accesses', '/sites/site=/site-network-accesses/') +def register_ietf_l2vpn(nbi_app : NbiApplication): + nbi_app.add_rest_api_resource( + L2VPN_Services, + URL_PREFIX + '/vpn-services' + ) + nbi_app.add_rest_api_resource( + L2VPN_Service, + URL_PREFIX + '/vpn-services/vpn-service=', + URL_PREFIX + '/vpn-services/vpn-service=/' + ) + nbi_app.add_rest_api_resource( + L2VPN_SiteNetworkAccesses, + URL_PREFIX + '/sites/site=/site-network-accesses', + URL_PREFIX + '/sites/site=/site-network-accesses/' + ) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/Common.py b/src/nbi/service/ietf_l2vpn/schemas/Common.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/Common.py rename to src/nbi/service/ietf_l2vpn/schemas/Common.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/__init__.py b/src/nbi/service/ietf_l2vpn/schemas/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/__init__.py rename to src/nbi/service/ietf_l2vpn/schemas/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/site_network_access.py b/src/nbi/service/ietf_l2vpn/schemas/site_network_access.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/site_network_access.py rename to src/nbi/service/ietf_l2vpn/schemas/site_network_access.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/vpn_service.py b/src/nbi/service/ietf_l2vpn/schemas/vpn_service.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/vpn_service.py rename to src/nbi/service/ietf_l2vpn/schemas/vpn_service.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py b/src/nbi/service/ietf_l3vpn/Handlers.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py rename to src/nbi/service/ietf_l3vpn/Handlers.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py b/src/nbi/service/ietf_l3vpn/L3VPN_Service.py similarity index 95% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py rename to src/nbi/service/ietf_l3vpn/L3VPN_Service.py index bf3f8aabc..8d5c536b6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py +++ b/src/nbi/service/ietf_l3vpn/L3VPN_Service.py @@ -20,8 +20,8 @@ from common.proto.context_pb2 import ServiceStatusEnum from common.tools.context_queries.Service import get_service_by_uuid from context.client.ContextClient import ContextClient from service.client.ServiceClient import ServiceClient -from ..tools.Authentication import HTTP_AUTH -from ..tools.HttpStatusCodes import HTTP_GATEWAYTIMEOUT, HTTP_NOCONTENT, HTTP_OK, HTTP_SERVERERROR +from nbi.service._tools.Authentication import HTTP_AUTH +from nbi.service._tools.HttpStatusCodes import HTTP_GATEWAYTIMEOUT, HTTP_NOCONTENT, HTTP_OK, HTTP_SERVERERROR LOGGER = logging.getLogger(__name__) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.py b/src/nbi/service/ietf_l3vpn/L3VPN_Services.py similarity index 94% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.py rename to src/nbi/service/ietf_l3vpn/L3VPN_Services.py index 47f6d5726..f647316c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.py +++ b/src/nbi/service/ietf_l3vpn/L3VPN_Services.py @@ -18,8 +18,8 @@ from flask import request from flask.json import jsonify from flask_restful import Resource from werkzeug.exceptions import UnsupportedMediaType -from nbi.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_CREATED, HTTP_SERVERERROR -from nbi.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH +from nbi.service._tools.HttpStatusCodes import HTTP_CREATED, HTTP_SERVERERROR +from nbi.service._tools.Authentication import HTTP_AUTH from .Handlers import process_site, process_vpn_service from .YangValidator import YangValidator diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py b/src/nbi/service/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py similarity index 92% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py rename to src/nbi/service/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py index 338c7d631..7d528b149 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py +++ b/src/nbi/service/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py @@ -19,8 +19,8 @@ from flask.json import jsonify from flask.wrappers import Response from flask_restful import Resource from werkzeug.exceptions import UnsupportedMediaType -from nbi.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH -from nbi.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_CREATED, HTTP_SERVERERROR +from nbi.service._tools.Authentication import HTTP_AUTH +from nbi.service._tools.HttpStatusCodes import HTTP_CREATED, HTTP_SERVERERROR from .Handlers import process_site_network_access from .YangValidator import YangValidator diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/YangValidator.py b/src/nbi/service/ietf_l3vpn/YangValidator.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/YangValidator.py rename to src/nbi/service/ietf_l3vpn/YangValidator.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/__init__.py b/src/nbi/service/ietf_l3vpn/__init__.py similarity index 57% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/__init__.py rename to src/nbi/service/ietf_l3vpn/__init__.py index 7d18c6929..184bee5e5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/__init__.py +++ b/src/nbi/service/ietf_l3vpn/__init__.py @@ -15,27 +15,26 @@ # RFC 8299 - YANG Data Model for L3VPN Service Delivery # Ref: https://datatracker.ietf.org/doc/rfc8299 -from flask_restful import Resource -from nbi.service.rest_server.RestServer import RestServer + +from nbi.service.NbiApplication import NbiApplication from .L3VPN_Services import L3VPN_Services from .L3VPN_Service import L3VPN_Service from .L3VPN_SiteNetworkAccesses import L3VPN_SiteNetworkAccesses URL_PREFIX = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc' -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_l3vpn(rest_server : RestServer): - _add_resource(rest_server, L3VPN_Services, - '/vpn-services', +def register_ietf_l3vpn(nbi_app : NbiApplication): + nbi_app.add_rest_api_resource( + L3VPN_Services, + URL_PREFIX + '/vpn-services', ) - _add_resource(rest_server, L3VPN_Service, - '/vpn-services/vpn-service=', - '/vpn-services/vpn-service=/', + nbi_app.add_rest_api_resource( + L3VPN_Service, + URL_PREFIX + '/vpn-services/vpn-service=', + URL_PREFIX + '/vpn-services/vpn-service=/', ) - _add_resource(rest_server, L3VPN_SiteNetworkAccesses, - '/sites/site=/site-network-accesses', - '/sites/site=/site-network-accesses/', + nbi_app.add_rest_api_resource( + L3VPN_SiteNetworkAccesses, + URL_PREFIX + '/sites/site=/site-network-accesses', + URL_PREFIX + '/sites/site=/site-network-accesses/', ) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-inet-types@2013-07-15.yang b/src/nbi/service/ietf_l3vpn/yang/ietf-inet-types@2013-07-15.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-inet-types@2013-07-15.yang rename to src/nbi/service/ietf_l3vpn/yang/ietf-inet-types@2013-07-15.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-l3vpn-svc@2018-01-19.yang b/src/nbi/service/ietf_l3vpn/yang/ietf-l3vpn-svc@2018-01-19.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-l3vpn-svc@2018-01-19.yang rename to src/nbi/service/ietf_l3vpn/yang/ietf-l3vpn-svc@2018-01-19.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-netconf-acm@2018-02-14.yang b/src/nbi/service/ietf_l3vpn/yang/ietf-netconf-acm@2018-02-14.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-netconf-acm@2018-02-14.yang rename to src/nbi/service/ietf_l3vpn/yang/ietf-netconf-acm@2018-02-14.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-yang-types@2013-07-15.yang b/src/nbi/service/ietf_l3vpn/yang/ietf-yang-types@2013-07-15.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-yang-types@2013-07-15.yang rename to src/nbi/service/ietf_l3vpn/yang/ietf-yang-types@2013-07-15.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf_l3vpn_tree.txt b/src/nbi/service/ietf_l3vpn/yang/ietf_l3vpn_tree.txt similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf_l3vpn_tree.txt rename to src/nbi/service/ietf_l3vpn/yang/ietf_l3vpn_tree.txt diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeLink.py b/src/nbi/service/ietf_network/ComposeLink.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeLink.py rename to src/nbi/service/ietf_network/ComposeLink.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNetwork.py b/src/nbi/service/ietf_network/ComposeNetwork.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNetwork.py rename to src/nbi/service/ietf_network/ComposeNetwork.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNode.py b/src/nbi/service/ietf_network/ComposeNode.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNode.py rename to src/nbi/service/ietf_network/ComposeNode.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeTermPoint.py b/src/nbi/service/ietf_network/ComposeTermPoint.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeTermPoint.py rename to src/nbi/service/ietf_network/ComposeTermPoint.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ManualFixes.py b/src/nbi/service/ietf_network/ManualFixes.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/ManualFixes.py rename to src/nbi/service/ietf_network/ManualFixes.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/NameMapping.py b/src/nbi/service/ietf_network/NameMapping.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/NameMapping.py rename to src/nbi/service/ietf_network/NameMapping.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/NetworkTypeEnum.py b/src/nbi/service/ietf_network/NetworkTypeEnum.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/NetworkTypeEnum.py rename to src/nbi/service/ietf_network/NetworkTypeEnum.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/Networks.py b/src/nbi/service/ietf_network/Networks.py similarity index 96% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/Networks.py rename to src/nbi/service/ietf_network/Networks.py index e2ac05307..241cf5d9b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/Networks.py +++ b/src/nbi/service/ietf_network/Networks.py @@ -23,8 +23,8 @@ from common.proto.context_pb2 import ContextId, Empty from common.tools.context_queries.Topology import get_topology_details from common.tools.object_factory.Context import json_context_id from context.client.ContextClient import ContextClient -from nbi.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH -from nbi.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_OK, HTTP_SERVERERROR +from nbi.service._tools.Authentication import HTTP_AUTH +from nbi.service._tools.HttpStatusCodes import HTTP_OK, HTTP_SERVERERROR from .bindings import ietf_network from .ComposeNetwork import compose_network from .ManualFixes import manual_fixes diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/README.md b/src/nbi/service/ietf_network/README.md similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/README.md rename to src/nbi/service/ietf_network/README.md diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/YangHandler.py b/src/nbi/service/ietf_network/YangHandler.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/YangHandler.py rename to src/nbi/service/ietf_network/YangHandler.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/__init__.py b/src/nbi/service/ietf_network/__init__.py similarity index 79% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/__init__.py rename to src/nbi/service/ietf_network/__init__.py index 84f3a59ba..4d37d521f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/__init__.py +++ b/src/nbi/service/ietf_network/__init__.py @@ -30,15 +30,11 @@ # RFC draft-ietf-ccamp-client-signal-yang-10 - A YANG Data Model for Transport Network Client Signals # Ref: https://datatracker.ietf.org/doc/draft-ietf-ccamp-client-signal-yang/ -from flask_restful import Resource -from nbi.service.rest_server.RestServer import RestServer + +from nbi.service.NbiApplication import NbiApplication from .Networks import Networks URL_PREFIX = '/restconf/data/ietf-network:networks' -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_network(rest_server : RestServer): - _add_resource(rest_server, Networks, '/') +def register_ietf_network(nbi_app : NbiApplication): + nbi_app.add_rest_api_resource(Networks, URL_PREFIX + '/') diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/_docs/test_commands.txt b/src/nbi/service/ietf_network/_docs/test_commands.txt similarity index 92% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/_docs/test_commands.txt rename to src/nbi/service/ietf_network/_docs/test_commands.txt index 78b2dd246..4a813b52b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/_docs/test_commands.txt +++ b/src/nbi/service/ietf_network/_docs/test_commands.txt @@ -1,4 +1,4 @@ -cd ~/tfs-ctrl/src/nbi/service/rest_server/nbi_plugins/ietf_network +cd ~/tfs-ctrl/src/nbi/service/ietf_network python diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/__init__.py b/src/nbi/service/ietf_network/bindings/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/__init__.py rename to src/nbi/service/ietf_network/bindings/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/__init__.py b/src/nbi/service/ietf_network/bindings/networks/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/destination/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/destination/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/destination/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/destination/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/source/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/source/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/source/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/source/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/supporting_link/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/supporting_link/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/supporting_link/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/supporting_link/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/bundled_links/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/bundled_links/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/bundled_links/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/bundled_links/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/bundled_links/bundled_link/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/bundled_links/bundled_link/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/bundled_links/bundled_link/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/bundled_links/bundled_link/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/component_links/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/component_links/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/component_links/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/component_links/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/component_links/component_link/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/component_links/component_link/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/component_links/component_link/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/component_links/component_link/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_state/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_state/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_state/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_state/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_state/topology/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_state/topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_state/topology/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/information_source_state/topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/recovery/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/recovery/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/recovery/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/recovery/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/statistics/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/statistics/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/statistics/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/statistics/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/client_svc/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/client_svc/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/client_svc/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/client_svc/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/otn_link/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/otn_link/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/otn_link/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/otn_link/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/underlay/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/link/te/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/underlay/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/link/te/underlay/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/network_types/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/network_types/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/network_types/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/network_types/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/network_types/te_topology/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/network_types/te_topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/network_types/te_topology/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/network_types/te_topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/supporting_node/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/supporting_node/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/supporting_node/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/supporting_node/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/geolocation/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/geolocation/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/geolocation/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/geolocation/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_state/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_state/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_state/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_state/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_state/topology/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_state/topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_state/topology/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/information_source_state/topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/statistics/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/statistics/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/node/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/statistics/node/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/node/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/statistics/node/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/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 similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/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 rename to src/nbi/service/ietf_network/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 diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/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 similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/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 rename to src/nbi/service/ietf_network/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 diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/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/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/client_svc/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/client_svc/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/client_svc/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/client_svc/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/geolocation/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/geolocation/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/geolocation/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/geolocation/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/otn_ltp/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/otn_ltp/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/otn_ltp/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/node/termination_point/te/otn_ltp/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/supporting_network/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/supporting_network/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/supporting_network/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/supporting_network/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/te/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/te/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/geolocation/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/te/geolocation/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/geolocation/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/te/geolocation/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/nsrlg/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/te/nsrlg/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/nsrlg/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/te/nsrlg/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te_topology_identifier/__init__.py b/src/nbi/service/ietf_network/bindings/networks/network/te_topology_identifier/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te_topology_identifier/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/network/te_topology_identifier/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/node_template/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/node_template/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py b/src/nbi/service/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py rename to src/nbi/service/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/build-yang-bindings.sh b/src/nbi/service/ietf_network/build-yang-bindings.sh similarity index 96% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/build-yang-bindings.sh rename to src/nbi/service/ietf_network/build-yang-bindings.sh index 2775f80da..f37e2e32a 100755 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/build-yang-bindings.sh +++ b/src/nbi/service/ietf_network/build-yang-bindings.sh @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -BASE_PATH=~/tfs-ctrl/src/nbi/service/rest_server/nbi_plugins/ietf_network +BASE_PATH=~/tfs-ctrl/src/nbi/service/ietf_network IETF_MODELS_PATH=${BASE_PATH}/yang cd ${BASE_PATH} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/iana-routing-types@2017-12-04.yang b/src/nbi/service/ietf_network/yang/iana-routing-types@2017-12-04.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/iana-routing-types@2017-12-04.yang rename to src/nbi/service/ietf_network/yang/iana-routing-types@2017-12-04.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-te-topology@2023-09-28.yang b/src/nbi/service/ietf_network/yang/ietf-eth-te-topology@2023-09-28.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-te-topology@2023-09-28.yang rename to src/nbi/service/ietf_network/yang/ietf-eth-te-topology@2023-09-28.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-tran-service@2023-10-23.yang b/src/nbi/service/ietf_network/yang/ietf-eth-tran-service@2023-10-23.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-tran-service@2023-10-23.yang rename to src/nbi/service/ietf_network/yang/ietf-eth-tran-service@2023-10-23.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-tran-types@2023-10-23.yang b/src/nbi/service/ietf_network/yang/ietf-eth-tran-types@2023-10-23.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-tran-types@2023-10-23.yang rename to src/nbi/service/ietf_network/yang/ietf-eth-tran-types@2023-10-23.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-inet-types@2013-07-15.yang b/src/nbi/service/ietf_network/yang/ietf-inet-types@2013-07-15.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-inet-types@2013-07-15.yang rename to src/nbi/service/ietf_network/yang/ietf-inet-types@2013-07-15.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-l3-unicast-topology@2018-02-26.yang b/src/nbi/service/ietf_network/yang/ietf-l3-unicast-topology@2018-02-26.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-l3-unicast-topology@2018-02-26.yang rename to src/nbi/service/ietf_network/yang/ietf-l3-unicast-topology@2018-02-26.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-layer1-types@2022-10-14.yang b/src/nbi/service/ietf_network/yang/ietf-layer1-types@2022-10-14.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-layer1-types@2022-10-14.yang rename to src/nbi/service/ietf_network/yang/ietf-layer1-types@2022-10-14.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-network-topology@2018-02-26.yang b/src/nbi/service/ietf_network/yang/ietf-network-topology@2018-02-26.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-network-topology@2018-02-26.yang rename to src/nbi/service/ietf_network/yang/ietf-network-topology@2018-02-26.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-network@2018-02-26.yang b/src/nbi/service/ietf_network/yang/ietf-network@2018-02-26.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-network@2018-02-26.yang rename to src/nbi/service/ietf_network/yang/ietf-network@2018-02-26.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-otn-topology@2023-07-06.yang b/src/nbi/service/ietf_network/yang/ietf-otn-topology@2023-07-06.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-otn-topology@2023-07-06.yang rename to src/nbi/service/ietf_network/yang/ietf-otn-topology@2023-07-06.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-routing-types@2017-12-04.yang b/src/nbi/service/ietf_network/yang/ietf-routing-types@2017-12-04.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-routing-types@2017-12-04.yang rename to src/nbi/service/ietf_network/yang/ietf-routing-types@2017-12-04.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-packet-types@2020-06-10.yang b/src/nbi/service/ietf_network/yang/ietf-te-packet-types@2020-06-10.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-packet-types@2020-06-10.yang rename to src/nbi/service/ietf_network/yang/ietf-te-packet-types@2020-06-10.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-topology@2020-08-06.yang b/src/nbi/service/ietf_network/yang/ietf-te-topology@2020-08-06.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-topology@2020-08-06.yang rename to src/nbi/service/ietf_network/yang/ietf-te-topology@2020-08-06.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-types@2020-06-10.yang b/src/nbi/service/ietf_network/yang/ietf-te-types@2020-06-10.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-types@2020-06-10.yang rename to src/nbi/service/ietf_network/yang/ietf-te-types@2020-06-10.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-trans-client-service@2023-10-23.yang b/src/nbi/service/ietf_network/yang/ietf-trans-client-service@2023-10-23.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-trans-client-service@2023-10-23.yang rename to src/nbi/service/ietf_network/yang/ietf-trans-client-service@2023-10-23.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-trans-client-svc-types@2023-10-23.yang b/src/nbi/service/ietf_network/yang/ietf-trans-client-svc-types@2023-10-23.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-trans-client-svc-types@2023-10-23.yang rename to src/nbi/service/ietf_network/yang/ietf-trans-client-svc-types@2023-10-23.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-yang-types@2013-07-15.yang b/src/nbi/service/ietf_network/yang/ietf-yang-types@2013-07-15.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-yang-types@2013-07-15.yang rename to src/nbi/service/ietf_network/yang/ietf-yang-types@2013-07-15.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py b/src/nbi/service/ietf_network_slice/NSS_Service.py similarity index 97% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py rename to src/nbi/service/ietf_network_slice/NSS_Service.py index 8f6dc8660..dd5ac271f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py +++ b/src/nbi/service/ietf_network_slice/NSS_Service.py @@ -23,8 +23,8 @@ 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 ( +from nbi.service._tools.Authentication import HTTP_AUTH +from nbi.service._tools.HttpStatusCodes import ( HTTP_GATEWAYTIMEOUT, HTTP_NOCONTENT, HTTP_OK, diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criteria.py b/src/nbi/service/ietf_network_slice/NSS_Service_Match_Criteria.py similarity index 95% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criteria.py rename to src/nbi/service/ietf_network_slice/NSS_Service_Match_Criteria.py index 3e1c9f73f..f24692af7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criteria.py +++ b/src/nbi/service/ietf_network_slice/NSS_Service_Match_Criteria.py @@ -22,8 +22,8 @@ from werkzeug.exceptions import UnsupportedMediaType from context.client.ContextClient import ContextClient from slice.client.SliceClient import SliceClient -from ..tools.Authentication import HTTP_AUTH -from ..tools.HttpStatusCodes import ( +from nbi.service._tools.Authentication import HTTP_AUTH +from nbi.service._tools.HttpStatusCodes import ( HTTP_CREATED, ) from .ietf_slice_handler import IETFSliceHandler diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criterion.py b/src/nbi/service/ietf_network_slice/NSS_Service_Match_Criterion.py similarity index 93% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criterion.py rename to src/nbi/service/ietf_network_slice/NSS_Service_Match_Criterion.py index 8fb8adfd9..2641797a1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service_Match_Criterion.py +++ b/src/nbi/service/ietf_network_slice/NSS_Service_Match_Criterion.py @@ -18,8 +18,8 @@ from flask_restful import Resource from context.client.ContextClient import ContextClient -from ..tools.Authentication import HTTP_AUTH -from ..tools.HttpStatusCodes import ( +from nbi.service._tools.Authentication import HTTP_AUTH +from nbi.service._tools.HttpStatusCodes import ( HTTP_CREATED, ) from .ietf_slice_handler import IETFSliceHandler diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py b/src/nbi/service/ietf_network_slice/NSS_Services.py similarity index 96% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py rename to src/nbi/service/ietf_network_slice/NSS_Services.py index 8398917a2..a3edc916d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py +++ b/src/nbi/service/ietf_network_slice/NSS_Services.py @@ -22,7 +22,7 @@ from werkzeug.exceptions import UnsupportedMediaType from context.client.ContextClient import ContextClient from slice.client.SliceClient import SliceClient -from ..tools.HttpStatusCodes import HTTP_CREATED, HTTP_OK +from nbi.service._tools.HttpStatusCodes import HTTP_CREATED, HTTP_OK from .ietf_slice_handler import IETFSliceHandler LOGGER = logging.getLogger(__name__) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py b/src/nbi/service/ietf_network_slice/NSS_Services_Connection_Group.py similarity index 95% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py rename to src/nbi/service/ietf_network_slice/NSS_Services_Connection_Group.py index 0309c6ac4..d1067e5a2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Group.py +++ b/src/nbi/service/ietf_network_slice/NSS_Services_Connection_Group.py @@ -22,8 +22,8 @@ from werkzeug.exceptions import UnsupportedMediaType from context.client.ContextClient import ContextClient from slice.client.SliceClient import SliceClient -from ..tools.Authentication import HTTP_AUTH -from ..tools.HttpStatusCodes import HTTP_CREATED +from nbi.service._tools.Authentication import HTTP_AUTH +from nbi.service._tools.HttpStatusCodes import HTTP_CREATED from .ietf_slice_handler import IETFSliceHandler LOGGER = logging.getLogger(__name__) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Groups.py b/src/nbi/service/ietf_network_slice/NSS_Services_Connection_Groups.py similarity index 93% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Groups.py rename to src/nbi/service/ietf_network_slice/NSS_Services_Connection_Groups.py index bee8349ef..7afcbe459 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_Connection_Groups.py +++ b/src/nbi/service/ietf_network_slice/NSS_Services_Connection_Groups.py @@ -21,8 +21,8 @@ from werkzeug.exceptions import UnsupportedMediaType from context.client.ContextClient import ContextClient -from ..tools.Authentication import HTTP_AUTH -from ..tools.HttpStatusCodes import HTTP_CREATED +from nbi.service._tools.Authentication import HTTP_AUTH +from nbi.service._tools.HttpStatusCodes import HTTP_CREATED from .ietf_slice_handler import IETFSliceHandler LOGGER = logging.getLogger(__name__) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDP.py b/src/nbi/service/ietf_network_slice/NSS_Services_SDP.py similarity index 96% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDP.py rename to src/nbi/service/ietf_network_slice/NSS_Services_SDP.py index f1d04a858..6d66fba6a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDP.py +++ b/src/nbi/service/ietf_network_slice/NSS_Services_SDP.py @@ -21,7 +21,7 @@ from werkzeug.exceptions import UnsupportedMediaType from context.client.ContextClient import ContextClient -from ..tools.HttpStatusCodes import HTTP_OK +from nbi.service._tools.HttpStatusCodes import HTTP_OK from .ietf_slice_handler import IETFSliceHandler LOGGER = logging.getLogger(__name__) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDPs.py b/src/nbi/service/ietf_network_slice/NSS_Services_SDPs.py similarity index 96% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDPs.py rename to src/nbi/service/ietf_network_slice/NSS_Services_SDPs.py index 8a3fb8c42..58a789c12 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services_SDPs.py +++ b/src/nbi/service/ietf_network_slice/NSS_Services_SDPs.py @@ -21,7 +21,7 @@ from werkzeug.exceptions import UnsupportedMediaType from context.client.ContextClient import ContextClient -from ..tools.HttpStatusCodes import HTTP_CREATED +from nbi.service._tools.HttpStatusCodes import HTTP_CREATED from .ietf_slice_handler import IETFSliceHandler LOGGER = logging.getLogger(__name__) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/YangValidator.py b/src/nbi/service/ietf_network_slice/YangValidator.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/YangValidator.py rename to src/nbi/service/ietf_network_slice/YangValidator.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py b/src/nbi/service/ietf_network_slice/__init__.py similarity index 51% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py rename to src/nbi/service/ietf_network_slice/__init__.py index db76b3b91..3df979e01 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py +++ b/src/nbi/service/ietf_network_slice/__init__.py @@ -15,10 +15,7 @@ # 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 nbi.service.rest_server.RestServer import RestServer - +from nbi.service.NbiApplication import NbiApplication from .NSS_Service import NSS_Service from .NSS_Service_Match_Criteria import NSS_Service_Match_Criteria from .NSS_Service_Match_Criterion import NSS_Service_Match_Criterion @@ -28,48 +25,38 @@ from .NSS_Services_Connection_Groups import NSS_Service_Connection_Groups from .NSS_Services_SDP import NSS_Service_SDP from .NSS_Services_SDPs import NSS_Service_SDPs -URL_PREFIX = "/restconf/data/ietf-network-slice-service" - +URL_PREFIX = '/restconf/data/ietf-network-slice-service:network-slice-services' -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, +def register_ietf_nss(nbi_app: NbiApplication): + nbi_app.add_rest_api_resource( + NSS_Services, + URL_PREFIX + '/' + ) + nbi_app.add_rest_api_resource( NSS_Service, - ":network-slice-services/slice-service=", + URL_PREFIX + '/slice-service=', ) - _add_resource( - rest_server, + nbi_app.add_rest_api_resource( NSS_Service_SDPs, - ":network-slice-services/slice-service=/sdps", + URL_PREFIX + '/slice-service=/sdps', ) - _add_resource( - rest_server, + nbi_app.add_rest_api_resource( NSS_Service_SDP, - ":network-slice-services/slice-service=/sdps/sdp=", + URL_PREFIX + '/slice-service=/sdps/sdp=', ) - _add_resource( - rest_server, + nbi_app.add_rest_api_resource( NSS_Service_Connection_Groups, - ":network-slice-services/slice-service=/connection-groups", + URL_PREFIX + '/slice-service=/connection-groups', ) - _add_resource( - rest_server, + nbi_app.add_rest_api_resource( NSS_Service_Connection_Group, - ":network-slice-services/slice-service=/connection-groups/connection-group=", + URL_PREFIX + '/slice-service=/connection-groups/connection-group=', ) - _add_resource( - rest_server, + nbi_app.add_rest_api_resource( NSS_Service_Match_Criteria, - ":network-slice-services/slice-service=/sdps/sdp=/service-match-criteria", + URL_PREFIX + '/slice-service=/sdps/sdp=/service-match-criteria', ) - _add_resource( - rest_server, + nbi_app.add_rest_api_resource( NSS_Service_Match_Criterion, - ":network-slice-services/slice-service=/sdps/sdp=/service-match-criteria/match-criterion=", + URL_PREFIX + '/slice-service=/sdps/sdp=/service-match-criteria/match-criterion=', ) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/__init__.py b/src/nbi/service/ietf_network_slice/bindings/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/__init__.py b/src/nbi/service/ietf_network_slice/bindings/nacm/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/nacm/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/__init__.py b/src/nbi/service/ietf_network_slice/bindings/nacm/groups/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/nacm/groups/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/group/__init__.py b/src/nbi/service/ietf_network_slice/bindings/nacm/groups/group/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/group/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/nacm/groups/group/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/__init__.py b/src/nbi/service/ietf_network_slice/bindings/nacm/rule_list/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/nacm/rule_list/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py b/src/nbi/service/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py b/src/nbi/service/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py b/src/nbi/service/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py b/src/nbi/service/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py b/src/nbi/service/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_monitoring/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_monitoring/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2mp/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2mp/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2p/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2p/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/standard/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/standard/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tag_opaque/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tag_opaque/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tags/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tags/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/rate_limits/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/rate_limits/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/rate_limits/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/rate_limits/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/opaque/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/opaque/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/attribute/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/attribute/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py b/src/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/service_function/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/service_function/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/destination/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/destination/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/destination/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/destination/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/source/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/source/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/source/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/source/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/network_types/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/network_types/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/generic/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/objective_function/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/objective_function/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/te/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/te/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py diff --git a/src/nbi/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/nbi/service/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 similarity index 100% rename from src/nbi/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 rename to src/nbi/service/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 diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py diff --git a/src/nbi/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/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py similarity index 100% rename from src/nbi/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 rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py b/src/nbi/service/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py rename to src/nbi/service/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py b/src/nbi/service/ietf_network_slice/ietf_slice_handler.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ietf_slice_handler.py rename to src/nbi/service/ietf_network_slice/ietf_slice_handler.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py b/src/nbi/service/ietf_network_slice/ofc23_batch_slices.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py rename to src/nbi/service/ietf_network_slice/ofc23_batch_slices.py diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ac-common@2023-11-13.yang b/src/nbi/service/ietf_network_slice/yang/ietf-ac-common@2023-11-13.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ac-common@2023-11-13.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-ac-common@2023-11-13.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ac-svc@2024-08-06.yang b/src/nbi/service/ietf_network_slice/yang/ietf-ac-svc@2024-08-06.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ac-svc@2024-08-06.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-ac-svc@2024-08-06.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ethertypes@2019-03-04.yang b/src/nbi/service/ietf_network_slice/yang/ietf-ethertypes@2019-03-04.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-ethertypes@2019-03-04.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-ethertypes@2019-03-04.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-geo-location@2022-02-11.yang b/src/nbi/service/ietf_network_slice/yang/ietf-geo-location@2022-02-11.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-geo-location@2022-02-11.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-geo-location@2022-02-11.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-inet-types@2024-10-21.yang b/src/nbi/service/ietf_network_slice/yang/ietf-inet-types@2024-10-21.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-inet-types@2024-10-21.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-inet-types@2024-10-21.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-key-chain@2017-06-15.yang b/src/nbi/service/ietf_network_slice/yang/ietf-key-chain@2017-06-15.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-key-chain@2017-06-15.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-key-chain@2017-06-15.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-netconf-acm@2018-02-14.yang b/src/nbi/service/ietf_network_slice/yang/ietf-netconf-acm@2018-02-14.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-netconf-acm@2018-02-14.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-netconf-acm@2018-02-14.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice-service.txt b/src/nbi/service/ietf_network_slice/yang/ietf-network-slice-service.txt similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice-service.txt rename to src/nbi/service/ietf_network_slice/yang/ietf-network-slice-service.txt diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice-service@2024-08-28.yang b/src/nbi/service/ietf_network_slice/yang/ietf-network-slice-service@2024-08-28.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice-service@2024-08-28.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-network-slice-service@2024-08-28.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice@2022-03-04.yang b/src/nbi/service/ietf_network_slice/yang/ietf-network-slice@2022-03-04.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-slice@2022-03-04.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-network-slice@2022-03-04.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-topology@2018-02-26.yang b/src/nbi/service/ietf_network_slice/yang/ietf-network-topology@2018-02-26.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network-topology@2018-02-26.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-network-topology@2018-02-26.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network@2018-02-26.yang b/src/nbi/service/ietf_network_slice/yang/ietf-network@2018-02-26.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-network@2018-02-26.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-network@2018-02-26.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-packet-fields@2019-03-04.yang b/src/nbi/service/ietf_network_slice/yang/ietf-packet-fields@2019-03-04.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-packet-fields@2019-03-04.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-packet-fields@2019-03-04.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-routing-types@2017-12-04.yang b/src/nbi/service/ietf_network_slice/yang/ietf-routing-types@2017-12-04.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-routing-types@2017-12-04.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-routing-types@2017-12-04.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-te-packet-types@2024-10-30.yang b/src/nbi/service/ietf_network_slice/yang/ietf-te-packet-types@2024-10-30.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-te-packet-types@2024-10-30.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-te-packet-types@2024-10-30.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-te-types@2024-10-30.yang b/src/nbi/service/ietf_network_slice/yang/ietf-te-types@2024-10-30.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-te-types@2024-10-30.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-te-types@2024-10-30.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-vpn-common@2021-09-10.yang b/src/nbi/service/ietf_network_slice/yang/ietf-vpn-common@2021-09-10.yang similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/yang/ietf-vpn-common@2021-09-10.yang rename to src/nbi/service/ietf_network_slice/yang/ietf-vpn-common@2021-09-10.yang diff --git a/src/nbi/service/rest_server/nbi_plugins/qkd_app/Resources.py b/src/nbi/service/qkd_app/Resources.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/qkd_app/Resources.py rename to src/nbi/service/qkd_app/Resources.py diff --git a/src/nbi/service/websocket_namespaces/hearthbeat/__init__.py b/src/nbi/service/qkd_app/__init__.py similarity index 64% rename from src/nbi/service/websocket_namespaces/hearthbeat/__init__.py rename to src/nbi/service/qkd_app/__init__.py index 842023ba1..4aa123577 100644 --- a/src/nbi/service/websocket_namespaces/hearthbeat/__init__.py +++ b/src/nbi/service/qkd_app/__init__.py @@ -12,13 +12,19 @@ # See the License for the specific language governing permissions and # limitations under the License. - from nbi.service.NbiApplication import NbiApplication -from .HeartbeatNamespace import NAMESPACE_DESCRIPTOR, HeartbeatThread +from .Resources import CreateQKDApp, Index -def register_heartbeat(nbi_app : NbiApplication): - heartbeat_thread = HeartbeatThread(nbi_app) - heartbeat_thread.start() +URL_PREFIX = '/qkd_app' - _, namespace_class, namespace_url = NAMESPACE_DESCRIPTOR - nbi_app.add_websocket_namespace(namespace_class, namespace_url) +def register_qkd_app(nbi_app : NbiApplication): + nbi_app.add_rest_api_resource( + Index, + URL_PREFIX + '/', + endpoint='qkd_app.index' + ) + nbi_app.add_rest_api_resource( + CreateQKDApp, + URL_PREFIX + '/create_qkd_app', + endpoint='qkd_app.register_qkd_app' + ) diff --git a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/__init__.py b/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/__init__.py deleted file mode 100644 index 718c4d6a3..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/__init__.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from nbi.service.rest_server.RestServer import RestServer -from .Resources import BwInfo, BwInfoId - -URL_PREFIX = '/restconf/bwm/v1' - -# Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. -RESOURCES = [ - # (endpoint_name, resource_class, resource_url) - ('api.bw_info', BwInfo, '/bw_allocations'), - ('api.bw_info_id', BwInfoId, '/bw_allocations/'), -] - -def register_etsi_bwm_api(rest_server : RestServer): - for endpoint_name, resource_class, resource_url in RESOURCES: - rest_server.add_resource(resource_class, URL_PREFIX + resource_url, endpoint=endpoint_name) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_acl/__init__.py deleted file mode 100644 index da4fb182e..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/__init__.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from flask_restful import Resource -from nbi.service.rest_server.RestServer import RestServer -from .Acl import Acl -from .Acls import Acls - -URL_PREFIX = '/restconf/data' - -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_acl(rest_server: RestServer): - __add_resource( - rest_server, - Acls, - '/device=/ietf-access-control-list:acls', - ) - - __add_resource( - rest_server, - Acl, - '/device=/ietf-access-control-list:acl=', - '/device=/ietf-access-control-list:acl=/', - ) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/__init__.py deleted file mode 100644 index fe9418b7b..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from nbi.service.rest_server.nbi_plugins.ietf_hardware.Hardware import Hardware -from nbi.service.rest_server.nbi_plugins.ietf_hardware.HardwareMultipleDevices import HardwareMultipleDevices -from nbi.service.rest_server.RestServer import RestServer - -URL_PREFIX_DEVICE = "/restconf/data/device=/ietf-network-hardware-inventory:network-hardware-inventory" -URL_PREFIX_HARDWARE = "/restconf/data/ietf-network-hardware-inventory:network-hardware-inventory" - -def register_ietf_hardware(rest_server: RestServer): - rest_server.add_resource(Hardware, URL_PREFIX_DEVICE) - rest_server.add_resource(HardwareMultipleDevices, URL_PREFIX_HARDWARE) diff --git a/src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py b/src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py deleted file mode 100644 index 0c048f662..000000000 --- a/src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from nbi.service.rest_server.RestServer import RestServer -from .Resources import CreateQKDApp, Index - -URL_PREFIX = '/qkd_app' - -# Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. -RESOURCES = [ - # (endpoint_name, resource_class, resource_url) - ('api.index', Index, '/'), - ('api.register_qkd_app', CreateQKDApp, '/create_qkd_app'), -] - -def register_qkd_app(rest_server : RestServer): - for endpoint_name, resource_class, resource_url in RESOURCES: - rest_server.add_resource(resource_class, URL_PREFIX + resource_url, endpoint=endpoint_name) diff --git a/src/nbi/service/restapi_resources/health_probes/Resources.py b/src/nbi/service/restapi_resources/health_probes/Resources.py deleted file mode 100644 index 27c00d6bc..000000000 --- a/src/nbi/service/restapi_resources/health_probes/Resources.py +++ /dev/null @@ -1,15 +0,0 @@ -import time -from flask_restful import Resource - -START_TIME = time.time() - -class HealthProbe(Resource): - def get(self): - uptime = time.time() - START_TIME - return {'status': 'ready', 'uptime': uptime}, 200 - #return {'status': 'not ready'}, 503 - -RESOURCE_DESCRIPTORS = [ - # endpoint_name, resource_class, resource_url - ('sys.probe.healthz', HealthProbe, '/healthz'), -] diff --git a/src/nbi/service/restapi_resources/well_known_meta/Resources.py b/src/nbi/service/restapi_resources/well_known_meta/Resources.py deleted file mode 100644 index 8eab56f6b..000000000 --- a/src/nbi/service/restapi_resources/well_known_meta/Resources.py +++ /dev/null @@ -1,20 +0,0 @@ -# RESTCONF .well-known endpoint (RFC 8040) -class WellKnownHostMeta(Resource): - def get(self): - response = { - "restconf": { - "capabilities": [ - "urn:ietf:params:restconf:capability:defaults:1.0", - "urn:ietf:params:restconf:capability:depth:1.0", - "urn:ietf:params:restconf:capability:with-defaults:1.0" - ], - "media-types": [ - "application/yang-data+json", - "application/yang-data+xml" - ] - } - } - return jsonify(response) - -# Register the RESTCONF .well-known endpoint -api.add_resource(WellKnownHostMeta, "/.well-known/host-meta") \ No newline at end of file diff --git a/src/nbi/service/rest_server/nbi_plugins/__init__.py b/src/nbi/service/restconf_root/Resources.py similarity index 67% rename from src/nbi/service/rest_server/nbi_plugins/__init__.py rename to src/nbi/service/restconf_root/Resources.py index c5fce5bd3..a6cd020c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/__init__.py +++ b/src/nbi/service/restconf_root/Resources.py @@ -12,23 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -from flask.json import jsonify +from flask import jsonify from flask_restful import Resource -from nbi.service.NbiApplication import NbiApplication -from .tools.HttpStatusCodes import HTTP_CREATED, HTTP_OK -URL_PREFIX = "/restconf/data" - -class BaseServer(Resource): +class RestConfRoot(Resource): def post(self): response = jsonify({}) - response.status_code = HTTP_CREATED + response.status_code = 201 return response def get(self): response = jsonify({}) - response.status_code = HTTP_OK + response.status_code = 200 return response - -def register_restconf(nbi_app : NbiApplication): - nbi_app.add_rest_api_resource(BaseServer, URL_PREFIX) diff --git a/src/nbi/service/restapi_resources/__init__.py b/src/nbi/service/restconf_root/__init__.py similarity index 75% rename from src/nbi/service/restapi_resources/__init__.py rename to src/nbi/service/restconf_root/__init__.py index 53d5157f7..129645284 100644 --- a/src/nbi/service/restapi_resources/__init__.py +++ b/src/nbi/service/restconf_root/__init__.py @@ -12,3 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from ..NbiApplication import NbiApplication +from .Resources import RestConfRoot + +def register_restconf_root(nbi_app : NbiApplication): + nbi_app.add_rest_api_resource(RestConfRoot, '/restconf/data') diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py b/src/nbi/service/tfs_api/Resources.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py rename to src/nbi/service/tfs_api/Resources.py diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Tools.py b/src/nbi/service/tfs_api/Tools.py similarity index 100% rename from src/nbi/service/rest_server/nbi_plugins/tfs_api/Tools.py rename to src/nbi/service/tfs_api/Tools.py diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py b/src/nbi/service/tfs_api/__init__.py similarity index 90% rename from src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py rename to src/nbi/service/tfs_api/__init__.py index 6605557ca..0f6426bc1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py +++ b/src/nbi/service/tfs_api/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from nbi.service.rest_server.RestServer import RestServer +from nbi.service.NbiApplication import NbiApplication from .Resources import ( Connection, ConnectionIds, Connections, Context, ContextIds, Contexts, @@ -25,10 +25,11 @@ from .Resources import ( Topologies, Topology, TopologyDetails, TopologyIds ) +ENDPOINT_PREFIX = 'tfs_api.' URL_PREFIX = '/tfs-api' # Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. -RESOURCES = [ +_RESOURCES = [ # (endpoint_name, resource_class, resource_url) ('api.context_ids', ContextIds, '/context_ids'), ('api.contexts', Contexts, '/contexts'), @@ -64,7 +65,10 @@ RESOURCES = [ ('api.policyrules', PolicyRules, '/policyrules'), ('api.policyrule', PolicyRule, '/policyrule/'), ] +RESOURCES = [ + (ENDPOINT_PREFIX + endpoint_name, resource_class, URL_PREFIX + resource_url) + for endpoint_name, resource_class, resource_url in _RESOURCES +] -def register_tfs_api(rest_server : RestServer): - for endpoint_name, resource_class, resource_url in RESOURCES: - rest_server.add_resource(resource_class, URL_PREFIX + resource_url, endpoint=endpoint_name) +def register_tfs_api(nbi_app : NbiApplication): + nbi_app.add_rest_api_resources(RESOURCES) diff --git a/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py b/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py deleted file mode 100644 index 21cf43a6f..000000000 --- a/src/nbi/service/websocket_namespaces/hearthbeat/HeartbeatNamespace.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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, threading, time -from flask import request -from flask_socketio import Namespace, join_room, leave_room -from nbi.service.NbiApplication import NbiApplication - -LOGGER = logging.getLogger(__name__) - -NAMESPACE_NAME = 'heartbeat' -NAMESPACE_URL = '/heartbeat' - -# WebSocket Heartbeat Namespace for debugging purposes -class HeartbeatHandler(Namespace): - def on_connect(self): - LOGGER.debug('Client {:s} connected'.format(str(request.sid))) - join_room(NAMESPACE_NAME) - - def on_disconnect(self, reason): - LOGGER.debug('Client {:s} disconnected: reason={:s}'.format( - str(request.sid), str(reason) - )) - leave_room(NAMESPACE_NAME) - -class HeartbeatThread(threading.Thread): - INTERVAL = 1 # second - - def __init__(self, nbi_app : NbiApplication): - super().__init__(daemon=True) - self.nbi_app = nbi_app - self.nbi_app.heartbeat_thread = self - - def run(self): - interval = HeartbeatThread.INTERVAL - start_time = time.time() - while True: - time.sleep(interval) - uptime = time.time() - start_time - LOGGER.warning('emitting...') - self.nbi_app.websocket_emit_message( - 'uptime', {'uptime_seconds': uptime}, - namespace=NAMESPACE_URL, to=NAMESPACE_NAME - ) - -NAMESPACE_DESCRIPTOR = (NAMESPACE_NAME, HeartbeatHandler, NAMESPACE_URL) diff --git a/src/nbi/service/websocket_namespaces/hearthbeat/example_code.txt b/src/nbi/service/websocket_namespaces/hearthbeat/example_code.txt deleted file mode 100644 index 2384841d3..000000000 --- a/src/nbi/service/websocket_namespaces/hearthbeat/example_code.txt +++ /dev/null @@ -1,33 +0,0 @@ -thread_event = Event() - -# ... - -@socketio.on('collectLiveData') -def collectLiveData(): - global thread - with thread_lock: - if thread is None: - thread_event.set() - thread = socketio.start_background_task(background_thread, thread_event) - -def background_thread(event): - """Example of how to send server generated events to clients.""" - global thread - count = 0 - try: - while event.is_set(): - socketio.sleep(1) - count += 1 - socketio.emit('my_response', {'count': count}) - finally: - event.clear() - thread = None - -@socketio.on("stopCollectingLiveData") -def stopCollectingLiveData(): - global thread - thread_event.clear() - with thread_lock: - if thread is not None: - thread.join() - thread = None \ No newline at end of file diff --git a/src/nbi/service/well_known_meta/Resources.py b/src/nbi/service/well_known_meta/Resources.py new file mode 100644 index 000000000..78df84451 --- /dev/null +++ b/src/nbi/service/well_known_meta/Resources.py @@ -0,0 +1,35 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# RESTCONF .well-known endpoint (RFC 8040) + +from flask import jsonify +from flask_restful import Resource + +class WellKnownHostMeta(Resource): + def get(self): + response = { + 'restconf': { + 'capabilities': [ + 'urn:ietf:params:restconf:capability:defaults:1.0', + 'urn:ietf:params:restconf:capability:depth:1.0', + 'urn:ietf:params:restconf:capability:with-defaults:1.0' + ], + 'media-types': [ + 'application/yang-data+json', + 'application/yang-data+xml' + ] + } + } + return jsonify(response) diff --git a/src/nbi/service/restapi_resources/well_known_meta/__init__.py b/src/nbi/service/well_known_meta/__init__.py similarity index 71% rename from src/nbi/service/restapi_resources/well_known_meta/__init__.py rename to src/nbi/service/well_known_meta/__init__.py index d93bbd1ef..ddcf2f145 100644 --- a/src/nbi/service/restapi_resources/well_known_meta/__init__.py +++ b/src/nbi/service/well_known_meta/__init__.py @@ -13,9 +13,8 @@ # limitations under the License. -from nbi.service.NbiApplication import NbiApplication -from .WellKnownResource import RESOURCE_DESCRIPTOR +from ..NbiApplication import NbiApplication +from .Resources import WellKnownHostMeta def register_well_known(nbi_app : NbiApplication): - endpoint_name, resource_class, resource_url = RESOURCE_DESCRIPTOR - nbi_app.add_rest_api_resource(resource_class, resource_url, endpoint=endpoint_name) + nbi_app.add_rest_api_resource(WellKnownHostMeta, '/.well-known/host-meta', endpoint='sys.well_known') diff --git a/src/nbi/tests/Constants.py b/src/nbi/tests/Constants.py index 886ddcafa..2b2b0c4ec 100644 --- a/src/nbi/tests/Constants.py +++ b/src/nbi/tests/Constants.py @@ -12,74 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -USERNAME = 'admin' -PASSWORD = 'admin' -# Ref: https://osm.etsi.org/wikipub/index.php/WIM -WIM_MAPPING = [ - { - 'device-id' : 'dev-1', # pop_switch_dpid - #'device_interface_id' : ??, # pop_switch_port - 'service_endpoint_id' : 'ep-1', # wan_service_endpoint_id - 'service_mapping_info': { # wan_service_mapping_info, other extra info - 'bearer': {'bearer-reference': 'R1-EMU:13/1/2'}, - 'site-id': '1', - }, - #'switch_dpid' : ??, # wan_switch_dpid - #'switch_port' : ??, # wan_switch_port - #'datacenter_id' : ??, # vim_account - }, - { - 'device-id' : 'dev-2', # pop_switch_dpid - #'device_interface_id' : ??, # pop_switch_port - 'service_endpoint_id' : 'ep-2', # wan_service_endpoint_id - 'service_mapping_info': { # wan_service_mapping_info, other extra info - 'bearer': {'bearer-reference': 'R2-EMU:13/1/2'}, - 'site-id': '2', - }, - #'switch_dpid' : ??, # wan_switch_dpid - #'switch_port' : ??, # wan_switch_port - #'datacenter_id' : ??, # vim_account - }, - { - 'device-id' : 'dev-3', # pop_switch_dpid - #'device_interface_id' : ??, # pop_switch_port - 'service_endpoint_id' : 'ep-3', # wan_service_endpoint_id - 'service_mapping_info': { # wan_service_mapping_info, other extra info - 'bearer': {'bearer-reference': 'R3-EMU:13/1/2'}, - 'site-id': '3', - }, - #'switch_dpid' : ??, # wan_switch_dpid - #'switch_port' : ??, # wan_switch_port - #'datacenter_id' : ??, # vim_account - }, - { - 'device-id' : 'dev-4', # pop_switch_dpid - #'device_interface_id' : ??, # pop_switch_port - 'service_endpoint_id' : 'ep-4', # wan_service_endpoint_id - 'service_mapping_info': { # wan_service_mapping_info, other extra info - 'bearer': {'bearer-reference': 'R4-EMU:13/1/2'}, - 'site-id': '4', - }, - #'switch_dpid' : ??, # wan_switch_dpid - #'switch_port' : ??, # wan_switch_port - #'datacenter_id' : ??, # vim_account - }, -] +from common.Constants import ServiceNameEnum +from common.Settings import get_service_baseurl_http, get_service_port_http -SERVICE_TYPE = 'ELINE' -SERVICE_CONNECTION_POINTS_1 = [ - {'service_endpoint_id': 'ep-1', - 'service_endpoint_encapsulation_type': 'dot1q', - 'service_endpoint_encapsulation_info': {'vlan': 1234}}, - {'service_endpoint_id': 'ep-2', - 'service_endpoint_encapsulation_type': 'dot1q', - 'service_endpoint_encapsulation_info': {'vlan': 1234}}, -] - -SERVICE_CONNECTION_POINTS_2 = [ - {'service_endpoint_id': 'ep-3', - 'service_endpoint_encapsulation_type': 'dot1q', - 'service_endpoint_encapsulation_info': {'vlan': 1234}}, -] \ No newline at end of file +USERNAME = 'admin' +PASSWORD = 'admin' +LOCAL_HOST = '127.0.0.1' +MOCKSERVICE_PORT = 10000 +NBI_SERVICE_PORT = get_service_port_http(ServiceNameEnum.NBI) + MOCKSERVICE_PORT # avoid privileged ports +NBI_SERVICE_PREFIX_URL = get_service_baseurl_http(ServiceNameEnum.NBI) or '' +NBI_SERVICE_BASE_URL = 'http://{:s}:{:s}@{:s}:{:d}{:s}'.format( + USERNAME, PASSWORD, LOCAL_HOST, NBI_SERVICE_PORT, NBI_SERVICE_PREFIX_URL +) diff --git a/src/nbi/tests/HeartbeatClientNamespace.py b/src/nbi/tests/HeartbeatClientNamespace.py new file mode 100644 index 000000000..ae7ceffc4 --- /dev/null +++ b/src/nbi/tests/HeartbeatClientNamespace.py @@ -0,0 +1,45 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, socketio + +LOGGER = logging.getLogger(__name__) + +class HeartbeatClientNamespace(socketio.ClientNamespace): + def __init__(self): + self._num_heartbeats_received = 0 + super().__init__(namespace='/heartbeat') + + @property + def num_heartbeats_received(self): return self._num_heartbeats_received + + def on_connect(self): + LOGGER.info('[HeartbeatClientNamespace::on_connect] Connected') + + def on_disconnect(self, reason): + MSG = '[HeartbeatClientNamespace::on_disconnect] Disconnected!, reason: {:s}' + LOGGER.info(MSG.format(str(reason))) + + def on_uptime(self, data): + MSG = '[HeartbeatClientNamespace::on_uptime] data={:s}' + LOGGER.info(MSG.format(str(data))) + + assert 'uptime_seconds' in data, 'Missing "uptime_seconds" in response' + uptime = data['uptime_seconds'] + assert isinstance(uptime, (int, float)), '"uptime_seconds" is not a number' + + MSG = '[HeartbeatClientNamespace::on_uptime] Heartbeat: server uptime {:f} sec.' + LOGGER.info(MSG.format(uptime)) + + self._num_heartbeats_received += 1 diff --git a/src/nbi/tests/MockService_Dependencies.py b/src/nbi/tests/MockService_Dependencies.py index 322441367..6d8ad7e83 100644 --- a/src/nbi/tests/MockService_Dependencies.py +++ b/src/nbi/tests/MockService_Dependencies.py @@ -23,8 +23,8 @@ from common.tests.MockServicerImpl_Context import MockServicerImpl_Context from common.tests.MockServicerImpl_Service import MockServicerImpl_Service from common.tests.MockServicerImpl_Slice import MockServicerImpl_Slice from common.tools.service.GenericGrpcService import GenericGrpcService +from .Constants import LOCAL_HOST -LOCAL_HOST = '127.0.0.1' SERVICE_CONTEXT = ServiceNameEnum.CONTEXT SERVICE_SERVICE = ServiceNameEnum.SERVICE diff --git a/src/nbi/tests/MockWebServer.py b/src/nbi/tests/MockWebServer.py new file mode 100644 index 000000000..086b611e4 --- /dev/null +++ b/src/nbi/tests/MockWebServer.py @@ -0,0 +1,58 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, threading +from nbi.service.NbiApplication import NbiApplication +from nbi.service.etsi_bwm import register_etsi_bwm_api +from nbi.service.health_probes import register_health_probes +from nbi.service.ietf_l2vpn import register_ietf_l2vpn +from nbi.service.ietf_l3vpn import register_ietf_l3vpn +from nbi.service.ietf_network import register_ietf_network +from nbi.service.restconf_root import register_restconf_root +from nbi.service.tfs_api import register_tfs_api +from nbi.service.well_known_meta import register_well_known +from .Constants import LOCAL_HOST, NBI_SERVICE_PORT, NBI_SERVICE_PREFIX_URL + + +LOGGER = logging.getLogger(__name__) + +class MockWebServer(threading.Thread): + def __init__(self): + super().__init__(daemon=True) + + self.nbi_app = NbiApplication(base_url=NBI_SERVICE_PREFIX_URL) + register_health_probes(self.nbi_app) + register_well_known (self.nbi_app) + register_restconf_root(self.nbi_app) + register_tfs_api (self.nbi_app) + register_etsi_bwm_api (self.nbi_app) + #register_ietf_hardware(self.nbi_app) + register_ietf_l2vpn (self.nbi_app) + register_ietf_l3vpn (self.nbi_app) + register_ietf_network (self.nbi_app) + #register_ietf_nss (self.nbi_app) + #register_ietf_acl (self.nbi_app) + #register_qkd_app (self.nbi_app) + self.nbi_app.dump_configuration() + + def run(self): + try: + self.nbi_app._sio.run( + self.nbi_app.get_flask_app(), + host=LOCAL_HOST, port=NBI_SERVICE_PORT, + debug=True, use_reloader=False + ) + except: # pylint: disable=bare-except + LOGGER.exception('[MockWebServer::run] Unhandled Exception') diff --git a/src/nbi/tests/OSM_Constants.py b/src/nbi/tests/OSM_Constants.py new file mode 100644 index 000000000..99d0f70bc --- /dev/null +++ b/src/nbi/tests/OSM_Constants.py @@ -0,0 +1,83 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Ref: https://osm.etsi.org/wikipub/index.php/WIM +WIM_MAPPING = [ + { + 'device-id' : 'dev-1', # pop_switch_dpid + #'device_interface_id' : ??, # pop_switch_port + 'service_endpoint_id' : 'ep-1', # wan_service_endpoint_id + 'service_mapping_info': { # wan_service_mapping_info, other extra info + 'bearer': {'bearer-reference': 'R1-EMU:13/1/2'}, + 'site-id': '1', + }, + #'switch_dpid' : ??, # wan_switch_dpid + #'switch_port' : ??, # wan_switch_port + #'datacenter_id' : ??, # vim_account + }, + { + 'device-id' : 'dev-2', # pop_switch_dpid + #'device_interface_id' : ??, # pop_switch_port + 'service_endpoint_id' : 'ep-2', # wan_service_endpoint_id + 'service_mapping_info': { # wan_service_mapping_info, other extra info + 'bearer': {'bearer-reference': 'R2-EMU:13/1/2'}, + 'site-id': '2', + }, + #'switch_dpid' : ??, # wan_switch_dpid + #'switch_port' : ??, # wan_switch_port + #'datacenter_id' : ??, # vim_account + }, + { + 'device-id' : 'dev-3', # pop_switch_dpid + #'device_interface_id' : ??, # pop_switch_port + 'service_endpoint_id' : 'ep-3', # wan_service_endpoint_id + 'service_mapping_info': { # wan_service_mapping_info, other extra info + 'bearer': {'bearer-reference': 'R3-EMU:13/1/2'}, + 'site-id': '3', + }, + #'switch_dpid' : ??, # wan_switch_dpid + #'switch_port' : ??, # wan_switch_port + #'datacenter_id' : ??, # vim_account + }, + { + 'device-id' : 'dev-4', # pop_switch_dpid + #'device_interface_id' : ??, # pop_switch_port + 'service_endpoint_id' : 'ep-4', # wan_service_endpoint_id + 'service_mapping_info': { # wan_service_mapping_info, other extra info + 'bearer': {'bearer-reference': 'R4-EMU:13/1/2'}, + 'site-id': '4', + }, + #'switch_dpid' : ??, # wan_switch_dpid + #'switch_port' : ??, # wan_switch_port + #'datacenter_id' : ??, # vim_account + }, +] + +SERVICE_TYPE = 'ELINE' + +SERVICE_CONNECTION_POINTS_1 = [ + {'service_endpoint_id': 'ep-1', + 'service_endpoint_encapsulation_type': 'dot1q', + 'service_endpoint_encapsulation_info': {'vlan': 1234}}, + {'service_endpoint_id': 'ep-2', + 'service_endpoint_encapsulation_type': 'dot1q', + 'service_endpoint_encapsulation_info': {'vlan': 1234}}, +] + +SERVICE_CONNECTION_POINTS_2 = [ + {'service_endpoint_id': 'ep-3', + 'service_endpoint_encapsulation_type': 'dot1q', + 'service_endpoint_encapsulation_info': {'vlan': 1234}}, +] diff --git a/src/nbi/tests/PrepareTestScenario.py b/src/nbi/tests/PrepareTestScenario.py index c0c4d41c8..dd09db1d8 100644 --- a/src/nbi/tests/PrepareTestScenario.py +++ b/src/nbi/tests/PrepareTestScenario.py @@ -17,28 +17,20 @@ from typing import Any, Dict, List, Optional, Set, Union from common.Constants import ServiceNameEnum from common.Settings import ( ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_HTTP, - get_env_var_name, get_service_baseurl_http, get_service_port_http + get_env_var_name ) from context.client.ContextClient import ContextClient from nbi.service.NbiApplication import NbiApplication -from nbi.service.rest_server.nbi_plugins import register_restconf -from nbi.service.rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api -from nbi.service.rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn -from nbi.service.rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn -from nbi.service.rest_server.nbi_plugins.ietf_network import register_ietf_network -from nbi.service.rest_server.nbi_plugins.tfs_api import register_tfs_api -from nbi.service.websocket_namespaces.hearthbeat import register_heartbeat from nbi.tests.MockService_Dependencies import MockService_Dependencies from service.client.ServiceClient import ServiceClient from slice.client.SliceClient import SliceClient from tests.tools.mock_osm.MockOSM import MockOSM -from .Constants import USERNAME, PASSWORD, WIM_MAPPING - +from .Constants import ( + LOCAL_HOST, MOCKSERVICE_PORT, NBI_SERVICE_BASE_URL, NBI_SERVICE_PORT, USERNAME, PASSWORD +) +from .OSM_Constants import WIM_MAPPING +from .MockWebServer import MockWebServer -LOCAL_HOST = '127.0.0.1' -MOCKSERVICE_PORT = 10000 -NBI_SERVICE_PORT = MOCKSERVICE_PORT + get_service_port_http(ServiceNameEnum.NBI) # avoid privileged ports -NBI_SERVICE_BASE_URL = get_service_baseurl_http(ServiceNameEnum.NBI) or '' os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(NBI_SERVICE_PORT) @@ -51,49 +43,45 @@ def mock_service(): yield _service _service.stop() + @pytest.fixture(scope='session') -def nbi_service_rest(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument - _nbi_app = NbiApplication(base_url=NBI_SERVICE_BASE_URL) - register_etsi_bwm_api (_nbi_app) - #register_ietf_hardware(_nbi_app) - register_ietf_l2vpn (_nbi_app) - register_ietf_l3vpn (_nbi_app) - register_ietf_network (_nbi_app) - #register_ietf_nss (_nbi_app) - #register_ietf_acl (_nbi_app) - #register_qkd_app (_nbi_app) - register_tfs_api (_nbi_app) - register_restconf (_nbi_app) - register_heartbeat (_nbi_app) - _nbi_app.dump_configuration() - - - _rest_server = RestServer() - _rest_server.start() - time.sleep(1) # bring time for the server to start - yield _rest_server - _rest_server.shutdown() - _rest_server.join() +def nbi_application( + mock_service : MockService_Dependencies # pylint: disable=redefined-outer-name, unused-argument +) -> NbiApplication: + mock_web_server = MockWebServer() + mock_web_server.start() + time.sleep(1) # bring time for the server to start + yield mock_web_server.nbi_app + mock_web_server.join(timeout=1) + @pytest.fixture(scope='session') -def osm_wim(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def osm_wim( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name, unused-argument +) -> MockOSM: wim_url = 'http://{:s}:{:d}'.format(LOCAL_HOST, NBI_SERVICE_PORT) return MockOSM(wim_url, WIM_MAPPING, USERNAME, PASSWORD) @pytest.fixture(scope='session') -def context_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument +def context_client( + mock_service : MockService_Dependencies # pylint: disable=redefined-outer-name, unused-argument +) -> ContextClient: _client = ContextClient() yield _client _client.close() @pytest.fixture(scope='session') -def service_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument +def service_client( + mock_service : MockService_Dependencies # pylint: disable=redefined-outer-name, unused-argument +) -> ServiceClient: _client = ServiceClient() yield _client _client.close() @pytest.fixture(scope='session') -def slice_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument +def slice_client( + mock_service : MockService_Dependencies # pylint: disable=redefined-outer-name, unused-argument +) -> SliceClient: _client = SliceClient() yield _client _client.close() @@ -117,10 +105,7 @@ def do_rest_request( allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, logger : Optional[logging.Logger] = None ) -> Optional[Union[Dict, List]]: - base_url = get_service_baseurl_http(ServiceNameEnum.NBI) or '' - request_url = 'http://{:s}:{:s}@{:s}:{:d}{:s}{:s}'.format( - USERNAME, PASSWORD, LOCAL_HOST, NBI_SERVICE_PORT, str(base_url), url - ) + request_url = NBI_SERVICE_BASE_URL + url if logger is not None: msg = 'Request: {:s} {:s}'.format(str(method.value).upper(), str(request_url)) if body is not None: msg += ' body={:s}'.format(str(body)) diff --git a/src/nbi/tests/test__nbi_core.py b/src/nbi/tests/test__nbi_core.py new file mode 100644 index 000000000..80a3d4b10 --- /dev/null +++ b/src/nbi/tests/test__nbi_core.py @@ -0,0 +1,61 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Enable eventlet for async networking +# NOTE: monkey_patch needs to be executed before importing any other module. +import eventlet +eventlet.monkey_patch() + +#pylint: disable=wrong-import-position +import logging, requests, socketio +from nbi.service.NbiApplication import NbiApplication +from .Constants import NBI_SERVICE_BASE_URL +from .HeartbeatClientNamespace import HeartbeatClientNamespace +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + mock_service, nbi_application, do_rest_get_request +) + + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + + +def test_restapi_get_healthz( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: + nbi_application.dump_configuration() + do_rest_get_request('/healthz', expected_status_codes={requests.codes['OK']}) + + +def test_websocket_get_heartbeat( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: + nbi_application.dump_configuration() + + heartbeat_client_namespace = HeartbeatClientNamespace() + + sio = socketio.Client(logger=True) + sio.register_namespace(heartbeat_client_namespace) + sio.connect(NBI_SERVICE_BASE_URL) + #sio.send('Hello WebSocket!', namespace='/heartbeat') + #sio.emit('message', 'Hello WebSocket!', namespace='/heartbeat') + sio.sleep(10) + #sio.wait() + sio.shutdown() + + # Ensure we get ~1 heartbeat/second + num_heartbeats_received = heartbeat_client_namespace.num_heartbeats_received + assert num_heartbeats_received >= 9 and num_heartbeats_received <= 11 diff --git a/src/nbi/tests/test_etsi_bwm.py b/src/nbi/tests/test_etsi_bwm.py index 9400de00f..568ab2ff7 100644 --- a/src/nbi/tests/test_etsi_bwm.py +++ b/src/nbi/tests/test_etsi_bwm.py @@ -12,6 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Enable eventlet for async networking +# NOTE: monkey_patch needs to be executed before importing any other module. +import eventlet +eventlet.monkey_patch() + +#pylint: disable=wrong-import-position import deepdiff, json, logging, pytest from typing import Dict from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME @@ -20,13 +26,14 @@ from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_lo from common.tools.object_factory.Context import json_context_id from common.tools.object_factory.Topology import json_topology_id from context.client.ContextClient import ContextClient -from nbi.service.rest_server import RestServer +from nbi.service.NbiApplication import NbiApplication from .PrepareTestScenario import ( # pylint: disable=unused-import # be careful, order of symbols is important here! - do_rest_delete_request, do_rest_get_request, do_rest_patch_request, do_rest_post_request, do_rest_put_request, - mock_service, nbi_service_rest, context_client + mock_service, nbi_application, context_client, + do_rest_delete_request, do_rest_get_request, do_rest_patch_request, do_rest_post_request, do_rest_put_request ) + LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -78,13 +85,19 @@ def test_prepare_environment(context_client : ContextClient) -> None: # pylint: assert len(response.service_ids ) == 0 assert len(response.slice_ids ) == 0 -def test_get_allocations_empty(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument +def test_get_allocations_empty( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name, unused-argument +) -> None: URL = BASE_URL + '/bw_allocations' retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) assert len(retrieved_data) == 0 -def test_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument +def test_allocation( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name +) -> None: URL = BASE_URL + '/bw_allocations' data = { "appInsId" : "service_uuid_01", @@ -105,7 +118,10 @@ def test_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: di storage['service_uuid_01'] = 'service_uuid_01' -def test_get_allocations(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument +def test_get_allocations( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name +) -> None: assert 'service_uuid_01' in storage URL = BASE_URL + '/bw_allocations' retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) @@ -134,7 +150,10 @@ def test_get_allocations(nbi_service_rest : RestServer, storage : Dict): # pylin assert len(diff_data) == 0 -def test_get_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument +def test_get_allocation( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name +) -> None: assert 'service_uuid_01' in storage URL = BASE_URL + '/bw_allocations/service_uuid_01' retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) @@ -160,7 +179,10 @@ def test_get_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint assert len(diff_data) == 0 -def test_put_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument +def test_put_allocation( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name +) -> None: assert 'service_uuid_01' in storage URL = BASE_URL + '/bw_allocations/service_uuid_01' changed_allocation = { @@ -185,7 +207,10 @@ def test_put_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint assert len(diff_data) == 0 -def test_patch_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument +def test_patch_allocation( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name +) -> None: assert 'service_uuid_01' in storage URL = BASE_URL + '/bw_allocations/service_uuid_01' difference = { @@ -213,13 +238,19 @@ def test_patch_allocation(nbi_service_rest : RestServer, storage : Dict): # pyli assert len(diff_data) == 0 -def test_delete_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument +def test_delete_allocation( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name +) -> None: assert 'service_uuid_01' in storage URL = BASE_URL + '/bw_allocations/service_uuid_01' do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={200}) -def test_get_allocations_empty_final(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument +def test_get_allocations_empty_final( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name, unused-argument +) -> None: URL = BASE_URL + '/bw_allocations' retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) diff --git a/src/nbi/tests/test_ietf_l2vpn.py b/src/nbi/tests/test_ietf_l2vpn.py index 7bed8ff5d..37b7d60b0 100644 --- a/src/nbi/tests/test_ietf_l2vpn.py +++ b/src/nbi/tests/test_ietf_l2vpn.py @@ -12,6 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Enable eventlet for async networking +# NOTE: monkey_patch needs to be executed before importing any other module. +import eventlet +eventlet.monkey_patch() + +#pylint: disable=wrong-import-position import logging from common.Constants import DEFAULT_CONTEXT_NAME from common.proto.context_pb2 import ContextId @@ -19,12 +25,13 @@ from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_lo from common.tools.object_factory.Context import json_context_id from context.client.ContextClient import ContextClient from tests.tools.mock_osm.MockOSM import MockOSM -from .Constants import SERVICE_CONNECTION_POINTS_1, SERVICE_CONNECTION_POINTS_2, SERVICE_TYPE +from .OSM_Constants import SERVICE_CONNECTION_POINTS_1, SERVICE_CONNECTION_POINTS_2, SERVICE_TYPE from .PrepareTestScenario import ( # pylint: disable=unused-import # be careful, order of symbols is important here! - mock_service, nbi_service_rest, osm_wim, context_client + mock_service, nbi_application, osm_wim, context_client ) + LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/nbi/tests/test_ietf_l3vpn.py b/src/nbi/tests/test_ietf_l3vpn.py index 0f214661f..b526611c6 100644 --- a/src/nbi/tests/test_ietf_l3vpn.py +++ b/src/nbi/tests/test_ietf_l3vpn.py @@ -12,6 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Enable eventlet for async networking +# NOTE: monkey_patch needs to be executed before importing any other module. +import eventlet +eventlet.monkey_patch() + +#pylint: disable=wrong-import-position import json, logging, pytest from typing import Dict from common.Constants import DEFAULT_CONTEXT_NAME @@ -21,13 +27,14 @@ from common.tools.descriptor.Loader import ( ) from common.tools.object_factory.Context import json_context_id from context.client.ContextClient import ContextClient -from nbi.service.rest_server.RestServer import RestServer +from nbi.service.NbiApplication import NbiApplication from .PrepareTestScenario import ( # pylint: disable=unused-import # be careful, order of symbols is important here! - do_rest_delete_request, do_rest_get_request, do_rest_post_request, - mock_service, nbi_service_rest, osm_wim, context_client + mock_service, nbi_application, context_client, + do_rest_delete_request, do_rest_get_request, do_rest_post_request ) + LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -55,45 +62,57 @@ def test_prepare_environment(context_client : ContextClient) -> None: # pylint: assert len(response.service_ids ) == 0 assert len(response.slice_ids ) == 0 -# pylint: disable=redefined-outer-name, unused-argument -def test_create_svc1(nbi_service_rest : RestServer, storage : Dict): +def test_create_svc1( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name, unused-argument +) -> None: with open(SVC1_DATA_FILE, 'r', encoding='UTF-8') as f: svc1_data = json.load(f) URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' do_rest_post_request(URL, body=svc1_data, logger=LOGGER, expected_status_codes={201}) storage['svc1-uuid'] = svc1_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] -# pylint: disable=redefined-outer-name, unused-argument -def test_create_svc2(nbi_service_rest : RestServer, storage : Dict): +def test_create_svc2( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name, unused-argument +) -> None: with open(SVC2_DATA_FILE, 'r', encoding='UTF-8') as f: svc2_data = json.load(f) URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' do_rest_post_request(URL, body=svc2_data, logger=LOGGER, expected_status_codes={201}) storage['svc2-uuid'] = svc2_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] -# pylint: disable=redefined-outer-name, unused-argument -def test_get_state_svc1(nbi_service_rest : RestServer, storage : Dict): +def test_get_state_svc1( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name, unused-argument +) -> None: assert 'svc1-uuid' in storage service_uuid = storage['svc1-uuid'] URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) -# pylint: disable=redefined-outer-name, unused-argument -def test_get_state_svc2(nbi_service_rest : RestServer, storage : Dict): +def test_get_state_svc2( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name, unused-argument +) -> None: assert 'svc2-uuid' in storage service_uuid = storage['svc2-uuid'] URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) -# pylint: disable=redefined-outer-name, unused-argument -def test_delete_svc1(nbi_service_rest : RestServer, storage : Dict): +def test_delete_svc1( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name, unused-argument +) -> None: assert 'svc1-uuid' in storage service_uuid = storage['svc1-uuid'] URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={204}) -# pylint: disable=redefined-outer-name, unused-argument -def test_delete_svc2(nbi_service_rest : RestServer, storage : Dict): +def test_delete_svc2( + nbi_application : NbiApplication, # pylint: disable=redefined-outer-name, unused-argument + storage : Dict # pylint: disable=redefined-outer-name, unused-argument +) -> None: assert 'svc2-uuid' in storage service_uuid = storage['svc2-uuid'] URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) diff --git a/src/nbi/tests/test_ietf_network.py b/src/nbi/tests/test_ietf_network.py index 68337d0a8..182f0ecf7 100644 --- a/src/nbi/tests/test_ietf_network.py +++ b/src/nbi/tests/test_ietf_network.py @@ -12,6 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Enable eventlet for async networking +# NOTE: monkey_patch needs to be executed before importing any other module. +import eventlet +eventlet.monkey_patch() + +#pylint: disable=wrong-import-position import deepdiff, json, logging, operator, os from typing import Dict from common.Constants import DEFAULT_CONTEXT_NAME @@ -21,16 +27,18 @@ from common.tools.descriptor.Loader import ( ) from common.tools.object_factory.Context import json_context_id from context.client.ContextClient import ContextClient -from nbi.service.rest_server import RestServer +from nbi.service.NbiApplication import NbiApplication # Explicitly state NBI to use PyangBind Renderer for this test os.environ['IETF_NETWORK_RENDERER'] = 'PYANGBIND' from .PrepareTestScenario import ( # pylint: disable=unused-import # be careful, order of symbols is important here! - do_rest_get_request, mock_service, nbi_service_rest, osm_wim, context_client + mock_service, nbi_application, context_client, + do_rest_get_request ) + LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -80,7 +88,9 @@ def sort_data(data : Dict) -> None: key=operator.itemgetter('link-id') ) -def test_rest_get_networks(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_networks( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: with open(TARGET_DATA_FILE, 'r', encoding='UTF-8') as f: target_data = json.load(f) URL = '/restconf/data/ietf-network:networks' diff --git a/src/nbi/tests/test_slice.py b/src/nbi/tests/test_slice.py index fe112e6fc..fab693d7e 100644 --- a/src/nbi/tests/test_slice.py +++ b/src/nbi/tests/test_slice.py @@ -14,7 +14,7 @@ import json, random, uuid from typing import Dict, Tuple -from nbi.service.rest_server.nbi_plugins.ietf_network_slice.bindings.network_slice_services import ( +from nbi.service.ietf_network_slice.bindings.network_slice_services import ( NetworkSliceServices ) diff --git a/src/nbi/tests/test_slice_2.py b/src/nbi/tests/test_slice_2.py index 5722e3d92..398b3be57 100644 --- a/src/nbi/tests/test_slice_2.py +++ b/src/nbi/tests/test_slice_2.py @@ -1,10 +1,10 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -12,12 +12,18 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Enable eventlet for async networking +# NOTE: monkey_patch needs to be executed before importing any other module. +import eventlet +eventlet.monkey_patch() + +#pylint: disable=wrong-import-position import json from typing import Optional from common.proto.context_pb2 import ConfigRule, ServiceConfig, SliceList from context.client.ContextClient import ContextClient -from nbi.service.rest_server.nbi_plugins.ietf_network_slice.ietf_slice_handler import ( +from nbi.service.ietf_network_slice.ietf_slice_handler import ( IETFSliceHandler, ) diff --git a/src/nbi/tests/test_tfs_api.py b/src/nbi/tests/test_tfs_api.py index eab2f8d9b..77eb7fadb 100644 --- a/src/nbi/tests/test_tfs_api.py +++ b/src/nbi/tests/test_tfs_api.py @@ -12,6 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Enable eventlet for async networking +# NOTE: monkey_patch needs to be executed before importing any other module. +import eventlet +eventlet.monkey_patch() + +#pylint: disable=wrong-import-position import logging, urllib from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME from common.proto.context_pb2 import ContextId @@ -29,13 +35,14 @@ from common.type_checkers.Assertions import ( validate_topologies, validate_topology, validate_topology_ids ) from context.client.ContextClient import ContextClient -from nbi.service.rest_server.RestServer import RestServer +from nbi.service.NbiApplication import NbiApplication from .PrepareTestScenario import ( # pylint: disable=unused-import # be careful, order of symbols is important here! - mock_service, nbi_service_rest, context_client, + mock_service, nbi_application, context_client, do_rest_get_request ) + LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -63,15 +70,21 @@ def test_prepare_environment(context_client : ContextClient) -> None: # pylint: # ----- Context -------------------------------------------------------------------------------------------------------- -def test_rest_get_context_ids(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_context_ids( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: reply = do_rest_get_request('/tfs-api/context_ids') validate_context_ids(reply) -def test_rest_get_contexts(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_contexts( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: reply = do_rest_get_request('/tfs-api/contexts') validate_contexts(reply) -def test_rest_get_context(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_context( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) reply = do_rest_get_request('/tfs-api/context/{:s}'.format(context_uuid)) validate_context(reply) @@ -79,17 +92,23 @@ def test_rest_get_context(nbi_service_rest : RestServer): # pylint: disable=rede # ----- Topology ------------------------------------------------------------------------------------------------------- -def test_rest_get_topology_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_topology_ids( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) reply = do_rest_get_request('/tfs-api/context/{:s}/topology_ids'.format(context_uuid)) validate_topology_ids(reply) -def test_rest_get_topologies(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_topologies( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) reply = do_rest_get_request('/tfs-api/context/{:s}/topologies'.format(context_uuid)) validate_topologies(reply) -def test_rest_get_topology(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_topology( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) topology_uuid = urllib.parse.quote(DEFAULT_TOPOLOGY_NAME) reply = do_rest_get_request('/tfs-api/context/{:s}/topology/{:s}'.format(context_uuid, topology_uuid)) @@ -98,15 +117,21 @@ def test_rest_get_topology(nbi_service_rest : RestServer): # pylint: disable=red # ----- Device --------------------------------------------------------------------------------------------------------- -def test_rest_get_device_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_device_ids( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: reply = do_rest_get_request('/tfs-api/device_ids') validate_device_ids(reply) -def test_rest_get_devices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_devices( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: reply = do_rest_get_request('/tfs-api/devices') validate_devices(reply) -def test_rest_get_device(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_device( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: device_uuid = urllib.parse.quote('R1', safe='') reply = do_rest_get_request('/tfs-api/device/{:s}'.format(device_uuid)) validate_device(reply) @@ -114,15 +139,21 @@ def test_rest_get_device(nbi_service_rest : RestServer): # pylint: disable=redef # ----- Link ----------------------------------------------------------------------------------------------------------- -def test_rest_get_link_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_link_ids( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: reply = do_rest_get_request('/tfs-api/link_ids') validate_link_ids(reply) -def test_rest_get_links(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_links( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: reply = do_rest_get_request('/tfs-api/links') validate_links(reply) -def test_rest_get_link(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_link( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: link_uuid = urllib.parse.quote('R1/502==R2/501', safe='') reply = do_rest_get_request('/tfs-api/link/{:s}'.format(link_uuid)) validate_link(reply) @@ -130,17 +161,23 @@ def test_rest_get_link(nbi_service_rest : RestServer): # pylint: disable=redefin # ----- Service -------------------------------------------------------------------------------------------------------- -def test_rest_get_service_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_service_ids( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) reply = do_rest_get_request('/tfs-api/context/{:s}/service_ids'.format(context_uuid)) validate_service_ids(reply) -def test_rest_get_services(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_services( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) reply = do_rest_get_request('/tfs-api/context/{:s}/services'.format(context_uuid)) validate_services(reply) -def test_rest_get_service(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_service( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}'.format(context_uuid, service_uuid)) @@ -149,17 +186,23 @@ def test_rest_get_service(nbi_service_rest : RestServer): # pylint: disable=rede # ----- Slice ---------------------------------------------------------------------------------------------------------- -def test_rest_get_slice_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_slice_ids( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) reply = do_rest_get_request('/tfs-api/context/{:s}/slice_ids'.format(context_uuid)) validate_slice_ids(reply) -def test_rest_get_slices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_slices( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) reply = do_rest_get_request('/tfs-api/context/{:s}/slices'.format(context_uuid)) validate_slices(reply) -def test_rest_get_slice(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_slice( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) slice_uuid = urllib.parse.quote('SLC:R1-R2-R3', safe='') reply = do_rest_get_request('/tfs-api/context/{:s}/slice/{:s}'.format(context_uuid, slice_uuid)) @@ -168,34 +211,46 @@ def test_rest_get_slice(nbi_service_rest : RestServer): # pylint: disable=redefi # ----- Connection ----------------------------------------------------------------------------------------------------- -def test_rest_get_connection_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_connection_ids( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connection_ids'.format(context_uuid, service_uuid)) validate_connection_ids(reply) -def test_rest_get_connections(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_connections( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connections'.format(context_uuid, service_uuid)) validate_connections(reply) -def test_rest_get_connection(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +def test_rest_get_connection( + nbi_application : NbiApplication # pylint: disable=redefined-outer-name +) -> None: connection_uuid = urllib.parse.quote('CON:R1/200==R2/200:1', safe='') reply = do_rest_get_request('/tfs-api/connection/{:s}'.format(connection_uuid)) validate_connection(reply) # ----- Policy --------------------------------------------------------------------------------------------------------- -#def test_rest_get_policyrule_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +#def test_rest_get_policyrule_ids( +# nbi_application : NbiApplication # pylint: disable=redefined-outer-name +#) -> None: # reply = do_rest_get_request('/tfs-api/policyrule_ids') # validate_policyrule_ids(reply) -#def test_rest_get_policyrules(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +#def test_rest_get_policyrules( +# nbi_application : NbiApplication # pylint: disable=redefined-outer-name +#) -> None: # reply = do_rest_get_request('/tfs-api/policyrules') # validate_policyrules(reply) -#def test_rest_get_policyrule(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +#def test_rest_get_policyrule( +# nbi_application : NbiApplication # pylint: disable=redefined-outer-name +#) -> None: # policyrule_uuid_quoted = urllib.parse.quote(policyrule_uuid, safe='') # reply = do_rest_get_request('/tfs-api/policyrule/{:s}'.format(policyrule_uuid_quoted)) # validate_policyrule(reply) -- GitLab From 8b95682e0915342b39e3594bb99d8fe253f16f49 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 5 Feb 2025 10:46:15 +0000 Subject: [PATCH 249/463] NBI component: - Enabled live logs and increased verbosity in CI/CD unit tests --- src/nbi/.gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 0bcf058fb..b1ad62fcf 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -72,11 +72,11 @@ unit_test nbi: - sleep 5 - docker ps -a - docker logs $IMAGE_NAME - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: -- GitLab From 27b4a679825b7cd368891bfb92a556cc0cba97e7 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Wed, 5 Feb 2025 13:59:31 +0000 Subject: [PATCH 250/463] NBI component: - Added missing unitary test --- src/nbi/.gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index b1ad62fcf..163835f75 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -72,6 +72,7 @@ unit_test nbi: - sleep 5 - docker ps -a - docker logs $IMAGE_NAME + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test__nbi_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_nbi_core.xml" - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" -- GitLab From f4e6ea6d37148a1926ea8f28e53462cd2e13751e Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 6 Feb 2025 08:56:06 +0000 Subject: [PATCH 251/463] NBI component: - Reorganized test bash and python scripts - Updated CI/CD unit test --- .../run_tests_locally-nbi-core.sh | 12 +++++++++--- src/nbi/.gitlab-ci.yml | 2 +- src/nbi/tests/{test__nbi_core.py => test_core.py} | 0 3 files changed, 10 insertions(+), 4 deletions(-) rename src/nbi/run_test.sh => scripts/run_tests_locally-nbi-core.sh (65%) rename src/nbi/tests/{test__nbi_core.py => test_core.py} (100%) diff --git a/src/nbi/run_test.sh b/scripts/run_tests_locally-nbi-core.sh similarity index 65% rename from src/nbi/run_test.sh rename to scripts/run_tests_locally-nbi-core.sh index 07beb9837..e6eb06a62 100755 --- a/src/nbi/run_test.sh +++ b/scripts/run_tests_locally-nbi-core.sh @@ -13,7 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -export FLASK_ENV=development -# Add live logs with: -o log_cli=true -python -m pytest --log-level=DEBUG --verbose nbi/tests/test_nbi.py +PROJECTDIR=`pwd` + +cd $PROJECTDIR/src +RCFILE=$PROJECTDIR/coverage/.coveragerc + +# Run unitary tests and analyze coverage of code at same time +# helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0 +coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ + nbi/tests/test_core.py diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 163835f75..10e695d11 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -72,7 +72,7 @@ unit_test nbi: - sleep 5 - docker ps -a - docker logs $IMAGE_NAME - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test__nbi_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_nbi_core.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml" - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" diff --git a/src/nbi/tests/test__nbi_core.py b/src/nbi/tests/test_core.py similarity index 100% rename from src/nbi/tests/test__nbi_core.py rename to src/nbi/tests/test_core.py -- GitLab From 216ddc4e6f39fbdcec04ef7d3089bc7ddb3cd329 Mon Sep 17 00:00:00 2001 From: hajipour Date: Thu, 6 Feb 2025 10:19:24 +0100 Subject: [PATCH 252/463] ietf-slice NBI and nce controllers icons added --- .../static/topology_icons/ietf-slice.png | Bin 0 -> 8751 bytes src/webui/service/static/topology_icons/nce.png | Bin 0 -> 19438 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/webui/service/static/topology_icons/ietf-slice.png create mode 100644 src/webui/service/static/topology_icons/nce.png diff --git a/src/webui/service/static/topology_icons/ietf-slice.png b/src/webui/service/static/topology_icons/ietf-slice.png new file mode 100644 index 0000000000000000000000000000000000000000..ed2232e8223a39eb0d829e0e50975a697b0660fc GIT binary patch literal 8751 zcmeAS@N?(olHy`uVBq!ia0y~yU}#}rVCdmsV_;y|E6#X|fq}6#)7d$|)7e>}peR2r zGbfdSL1SX=L|c!;0V1vb!LAd%*o`|ZQdanhxwx{3uS^ounX=7kHJ_UP-)1#l&#vyp z526Y_q;Gun;L)1Z&8rnS{x$5_Wudvtqw~9JtC*qPjy?UK?^)g{msc>+^4YxW7^Cm@ zvmrKWsl}^<&TF%Da0H({b;d~O(_0WYW8=3()nLqzpl>lXX_<@t<~ObDnVu)Ud7l zvTgq@hBQ0R_1m|e5EQt_rnm0)tWE4O?--i>+j35=6Imj}#roiH&pu6do;ysn+4t^5 zJ-4W3Ffv*FRQkaK0SVopZ@bR#uC{*u?fu+qf9e=EhZY^=tYfTXU|?WN@^*J&_z!{$ z_AZ~yz`(#+;1OBOz#!!V!i+LHmU9>w7}!fZeO=j~Gl}p^s9C0XtY%&H%ktI3_8JAogL>NmG>vw4-IcvUJx2vJ!h0=~4 zyB<8^QgRhz&GZs9+tR?OvQR=u$crm;$(bdBX==gmp8s}Nuon!O!oYdw`)gBur=s}u zcc15+xBYH&KC__<6`bmIjLBwv`t<2qy?<|>KcBvI*Oz0L6#ncle(q=Y{Z8?o$9>i- zu4ZX^3aNS~Wn^f$_evf0xBolk=+UF8S*5Y^+w$+96OXHCoH%h}=|6EN0~M7PWw)LO zU833%K|zyhob#T||Nlq*@ZrPyJ3IAacWsE>U3TSV$rP2&ef##+e7Wd8bM|cSt-oH~ z|DTwccqPMx<-mmt0cG#*%nS?+oTAdnaAS$5u-%Ub&1cS>*|YE8|Lgnzxq430IBj%$ zOXlI!)6)#i_4}WSit3m~?;;)-WyBzMK+ zMV-4jGu!U`=BH-2Wc7C4$*cSG@i-43-!g%w`ro(jhXh_>?(FQ$xx33WHS(Eqzs;dF zYkai2W-0H6cM^Yn1NuGc${8|NQ^)xIdWV;O_VPX3v~C zGeo5IzMSqO?)kD$AKdJev3;*#e{gU6D`JlxYFPuN$ zukJr@Pu73$@Z!MC%$Kife}8LKnOFVJ(#6Fk;d!C)y{OrZPu_6d$hvc4`;8CtWi5Xs zc&l-6E6Kwz7^_Q5Y#UwWKf@3i%9 zZ%nuB{C5`3=Y`H4Sjl1Y>4fr&J3Ea}oj$#>=;^7||K!eIjY-*jQ|{c!la2ua0>8ez zWj}4n9`@#Jvy+pucfpQq))y}oAJ2AnmAIiNP`K9j#r^&AV!BZ+vAfF>A0O)t5n-LA zvU2Nh=?N;F?tL-`XXo$h+_A&r$dMxpwya{y<`Z+$_Eunc&icPPL-mjTQW57{>jUqlcH*p@)atUxy2*JS^HNAS%k5pP&CE{OW@zH?t}-Qg(>`d$H?Q{bsKb&)Y_%!zr zWBDUTjybKqdMI!E_4Nv`^sZ$ncrtBb$uJeVllPP>QqL)nW5S9RD;O9oWcVU<#5feM zNd1%DaX0V8CLXP=|E9J6xY@I4k-#Jd5!c4Ae<~;JU;Dc(v}r=BWL#Vv$mKT=IhkY& zHm+McE1`Usq@4JywNaV^c2&H)wtj6s{PMub$?6L)W*F4{sW>y++&}d2`;_nR?(TU$ zuX@7FnVp}yyiC6GyS+|e_F5$)ARg7$y@lh8i^~M@H)Ym-b1WFApKd*H;K1s7*VwbJ zY|RTxb8>W6tzNw`?QB%VYmAo;u-X9O!MO4(( zoR(i!G&2iZdo_DO{{4N6DnCE-@b^D{PWJZ2Bi`NiUpbmJ4+xhn|Ly*7y1}k!2_Hwc zC(oZhzOc|)q4VG0-`D^9{(Y)nzfi?9=jtj^emNVD?YEC!^0E%En|?a-wegRG(=MOU zSh3`GtTcDOq;Z=Q$F{t?vzGhK4LW=-`$@0)y#)eIb#--TPMuO(c_AkC@u$7%KhFK) z*|-0ti1DY@FG_ZLPFn2Vug1{U+8Qf=fBEv|n|)`SO-Y@3cX#>ob91dDBO^VRUv`{+ z8AQ%Ldu+10|Hq@8!YeLjym&mWUb>K)$fgqe_qdUC2Q*(>+*N+KmC9I>ZiD!fB&frrB*XW=Pn4zf=6;#>U5{uA*YyPiLMwb;@6_Bbh|oFz32%TG>D z29=3%b&H)AxcAG=u&=i>k>X8>+_&ug#n)dm?(X`k`fd8usk}N`T3zfPW*gVor@p?n zw&Lm3a0O2x5!anM7pG5~*0y5B3byC7??kzvpiW)7I$_0Q5e)bS6CYoJ2Qj-*x#8NMgap2byf)?i^` zV$%CvTUu&bR9yV9Xy>|!iTkhi#h2`HyR5)^@xif0?L3l2M-_`Arx{j!NDvVhKVP`} z?xXK@*Vf1LPYPdSFiD~F-rnlRQTqhp{4udnAno zgoQ6FEN+y(lqV`CwrSBKrg`(`b#!$6aCP63dD(5rk|hNf7rA!y_ph(M??20gb8q$c zeQD}(+4mo0aq{rg?A@{B$IQIDyMC^X-7OXx8k%u$kLA3|XOcaV#?My0J#pfMf~SkS zyZO6z^-hY|e{{$S|9oUjOsybQyyLhF&*iUN+{vd-h03NuAo5e7xxVJlkG< z<~>PAxwhrspXbDJYSWozzOy%#zP`r8$+<9WwJL*~yL<7)MXn*NAOBkxJYaC|lkwae z=dZ|8TU&c`RjBs1jEhZHbNd)xJbrxmdVKxfk394_9`+P^g0N9{P@virq7hrng9O%t9iTi`i|V&|7T1p z>bWoP^JrD*YRjxED|Q7wNj%(kcgNMp{nNK*U%!-La_REr$&20lmmLjq+kV@3_hHxQ z-tKMOugzAiUj6gM;{KrZ*M%9j=ifhfJ5r#svhvNv#q6e1ytlXIo^ENe4H0QIJr}h< zGCQVZ*PRlpxqrUz|L-d=FVCfDQTgdf+ikBYQ>XIodB5-Xt7~~ro;=xb?BSz-lhgKn zKg;R&*QmEXe*VFh$4g6g-O?xUa1yw&PB+ASWu{`zLm$!d4D ziGBI~!W2)ph9R=JdF4M5`g?gXdHT$^lU19{d0$5B(4Mt3H(1>%*lc#}?&QRSulZdTl~1vsSNkneMNLgf zRh9Mkx3|Ap4mjOuTNAyVuWYyM`aPe-?-ZZ6^*C+czWrL-f(3W@raN&kR2!YKh)p`$ z;wUI#oW`>)?{3%K-R1w6nTnf-2%J25(qQ)4j_z*f>FdfBmtX1n|K>#F)xg=6S7JD3 zX`Qn+EdQLjCHtP>T&q&2-DPhl%$U)Ue7tYrmMtY)1s2_#wk1CM+@t4<8mhdRJTHBl zHEY(76DK@={QjN%WyZw~)}lEcdM#tXJr#*M2-IE@M+sP^+h2;TtG& zBgf3e-Cfy2h2@%*x!*in{=IH(v!}1CEY#!@@}H`_u2gtN)RqRf#f@jve*3=G%bTHa zC$BuWHQPi$TqHL8oM>DjQ^5`n&q)fNLLQ4YY!LYQ^XJzheJ2hM#Rb=2KP<3#bvAP8 z(xo1L>;CusJu0$YMMa?H@>+)u?Hzp#8hRTy9!%3(ym+yqr_iR&n*vJLNuB-s<%4lX zU~c)}BWg+)RyeOt(2vj&OG!(OjoAEyZC>rSo9p!?e(#QxR*7b1Wwrfu&iZ}9t1BzN zzT40})u8N6gihR^2oX`yz{MBO>}>nADJv_>F7x&_-A$V}2gbzk1iMIY$$Hf~CrCTR z^Fh*MEryH~&bi7x1)4`@-ifi8>-XYoRYgUGiH+ltBS#Kom?#+<3fjxqHodd0denJO zP3O+c=Fg^i90E%k9Q7aX{HH6J^Tol*N$XNj@WZE1TVK4$U}0so4U+%9=xWybX!Z|D zr3X64?esgU5ZMwfUU1BxabM3cD(05xMIzkLz7g!1EQk3IyyMMyt=wtX1iwcv7W~EcJ{RWzxBSo zzu#}|>$d0j@r*zF=jmQhJ;Z(usGtPq_gVY4CeFx#8k+xaJ{JnXOklYH3p z&1wDpOSW$}HAuLi*xlRmUN2CeSFz~cXVtG(w=Ao^WEdtMVyXLfGyTVl#r+eeO>49N z|FiJOkz)r=UluksHT5`u;=rWyc8B|9trJY7KK}W9KKaRsiQB*KI=^9q!N#huS^NHc zIt^-6et3BJH@4MOY^z?McNh)7nU*|VYJ9FUDQg7*P zg=w2BzunncEGZ)sV=f^qDS7hS+uO!kT3x=gOcWV@{r>&=Zu$Mx$jF-qe(h^NcFid! z(4w2JVUVaIxJNjg; zi>|H;y&lSOJ-6x1(N?SU^YfmboU9%g5z&!$c9x=&5|i3wPf#hRHU0Br4{c4&&YwSj ze)#gmB_l(_s^o>jx^neTyUx$x;^htf-uh#1$=h3B+kX4q{ov^;+R~-PAsQ;6wMro* zPu6kDv}x<~G&Mc<1qQ#AVp3IAJ<0o4qI34H0~d14&i{MVtsfV?HB0o@*VpU}0!}qX zMNdxnAM2HFU+CO^uSoIr$H&KiUUZjF{QvK7>F&d&udZ|!78cI1D177_f3fs3%f`CD zRo~v;7GJq?=PJvmA&MWm(LfOXWRXrU&f)P#%5d2&89<#oZj5sJ-z&XZTVtR*SI)2 zb-y_sQ?}#M-@g|+(CnqNQczQnES^WG((N2#^e9I@Nrl#K6RjM7`)-KGjyX57e`$jvrF6>R+ z^Xt{>D;XvxQoVBwli9erxih!lepz;%FY|UznV5)3(YH4@zkK_)ti7Fme%-H^vyCcB zovo*WVxU`G-_6yPwd(7u*2>S%6xGzk(zHK(U8tmUXJT(l33tpS^>>mc9IwrD8cwD- z6%`q!ot^bHD!GP1NLYAh)z_>YF?v4pY$Su1`838m2n2DTd;Ix*(Z-Z=zMxO%4_~(z zSikR=*1wPa^$ZN4-tyY$?e_`-?_3CX%gV}nZd?6rf#+nkitl&JFPd10?7plUAuzw! zI8D3a;f~fFW_2?P^0ki~JN9Vh@?(kD*6e@0di_49v^2H)UAzI#>8GdZo;Z2Zad+8U zgUU}SA=VwLyU!^%^_)uc`Z}tp!hlCdw6gjxKoLpU5 z`DCq1LhlzBviK~09^eX@^rZ#ykny3{dH zdYQaM0Rvkz<3+=bD>hkAoD&*XUBg(fm6UXPViHe|c!%}79n4a_Y*VLB-4LO(y=;o& zX``B6Hw}hWZ@2n?^8fxpfZ^PAje?z=`TYD6JogkjCruI(5f{Jz<+_8btLxoJh5c;; zOmT5>7cx=;80Wm}7JFp0crD*|)pG^A@9tk|npM)o!Nb#X`>mUwAD_u2hl&Z;TetEZ z=|7)TsL6G!MdCsFg#$q`txZie6%`c;cXkxMxVZTE`Dy+_QESC!o97>UKEJ*$Hb=lI z;lY8%ijPOd10y4UcDuVxJaT1aFsS%>^(yOyZAy#T#e;9d9xR-ym#KP(OF;4!vnR)t z>C>G9MP8IxN$|8qhYJ)I7DntU(KO4u)4?gMzG&}B@z`kdgXNN9FKnOOdRy1hprc|V zbX{g2o9wr_7L1#3^2p1}_ehy?F|+afxa#+`b;IXfoJvMULWkS=_pdtl_Hn=cxzy9s z9Xh>&c&dZ>Rtd9M6uCpE9-J*0Qygeb_Hj1qx>CXZVo|h6muU=*8L~ddc z>t?-p@nX1YTbtYee}5moecOB9?l;fLlP5cPjg!vJh`4k07XQJ0RV>n9e>i)``$!9R zKKnP%!`JudG~MV08eE`^E2bND=a%s~J+;hPrrF1)YKL!Hwyf>>8op<<&KvK3BEx-p z&6>g;8Jllf)cz`|s;&-Rf4%tfGT-pOSIn0j2`MWx12v-+SwKyR7goT7mIdT5{^IfH{H{{$jTC!}}wYPtDS{g299O)2L{%|9?|E|&M zU2XjGdVMmMho)+WKl*&${`kww%L_j}@#Iic@DyrlYBH$$k^vfS?C9>^ooRM|%ft8b z@+y<&%{zCvo&Rv!=7ZO-i`V}8VtHjt=4HLt*Vpe~`pbW=Rq3kDmH+?!-BZz%R8nG6 z_3e%3z54&Ppy6QiuX55y`0n)9O}}>E@%y{G(o4?1n&SnnV?!KQtY``dWL>z3%L!ch zcFaD|YgOk7s)sv{xp{he7DYu##psD|+O(^ zSTOV3G=Tb3qDOMw932^#`_J#|>FL>}`Bf#+Y_?(UEfbSne-%OSZy^XEy`U*F51|AuU z0MR3FU2bp7Eqp$=+$m5bV{6ojO)=j&xw#MD*qEHJU7wLx?%2}O(&60Bw{g`fuFTBL z0;{q-KcYowSm7cOpf^#6Z1i4K1yv<;&F{J$jVaxwa?7@sHoD z&oh*^^1}lI)Dqdg>!7$$!1c!=F`)vz6P7Gd(dc68KHBu;NlK|3s2jOwj}4!cNk{N9 zA4Z0h^z_Bm-{1ZCaF{vMCh55FyoH_E^Cwruf^9TNBJey?5Ca(iX#ij^xXcWl`3p=)x6=c6YlC$AF9Q+LcT zkz!$CiTRlC#4*E1EtGTnWCbTDry~~@IxBh#r9`g#9lrXilEQ*A?Zm0K*98B3wR-)d zb-Uj+-G1A)NTc+3qW=s7#%4C&pvgkpgO>}fxVv=Of&~q)udhG;@$qp`mw}O)E#brj z#Z?k{?v4yQ-rQKUv-tTct{t)QlAzXDh-1vWqv=}VU`HPqDPR4M%RC3DI0P)DbSVa4T_H@0Sn%UKq+gx|i^BX2*?ZSh1W4yj(Zve(yonc4ZC+%3Owoxiqsg@NFy%oT5 z@VH#{8*%M-v-9^YyqK|M`EvE;zO&uBm-g^2@2-57C3ni?^Oc)kQE&Zj<(RFD*a#X# zzVfo9=Jnd`A&z%+bi_^@JGb#H6liK@=YKZSI6b4>VrNyo-0?HkClcSkef(kPZ_Cn9 zsn5D$w{p$S%{K36kPs6)7Jp0e*`ZA9KcDCS_gQ`Q)T+;AdiSQD4V14rpIDrAdhW+i ztMk*MUzS)|*8i*FQoOM#)q9?8^|rw7MHk&9BO@c{%h*=&WIaXig zat(a&@@40R3uzh}+ZQj{^lZ~>j|09+*K=AguU(LQ+;2jv>(4p$>hulpD{u1r&p{joz-X-lWv#D#VNBCPFvSD!80RsMb**P}E6 zIk~&Sc7d$^rH`FNk~ zhmRi}V`A=zo_>36tuzx8(}by0TVr>ZIZiVD5q$pH3z3T~e9MEP^LnKj?V@b%?Pi_z z^X0@@v$}F`Z*yFJ`Qg9c@57xB%s%>h{eC|N9xkp&+wa$T2Q9q&@X@@-OJlZ~PtWET zGq|6mDr)ZS?QL1|B7iC3c%SS~@5j=~$NN+n%<}Kev9z>Q5e-U#czxCYd zx4b(vG}On->(OC;dmny&{$Ia-75)75^v~9!-KDSH6j^-Lgu~ZF9DMXB>6(R1$T>Sc6KxDYOUhxem;%gT77+8>>P_iB~Sz9zyXJn7dHfL ztG|Id(WkPmw?4YC(D}sa)6EAH4phJ2+y3$K@ztM=rI~i_+zFa~)@)J8Vm@-(F8B7f zr_avLuD>i?^XiJ`x0jcnr=MmyFk^a^y%oQ&z@~sv0_Es{5zXAZECEn{C$`2DFXw8JZLRIrH-DSUhv*Ei%>yP?jQNT YUQe!cnBB}^U|?YIboFyt=akR{09ic(9RL6T literal 0 HcmV?d00001 diff --git a/src/webui/service/static/topology_icons/nce.png b/src/webui/service/static/topology_icons/nce.png new file mode 100644 index 0000000000000000000000000000000000000000..0c9af8f37fbb7249fbe570a920e0bcd281582655 GIT binary patch literal 19438 zcmeAS@N?(olHy`uVBq!ia0y~yVE)O#z_g8nje&td)Fy_Jfq{XsILO_JVcj{ImkbOH zEa{HEjtmSN`?>!lvNA9*a29w(7Besy9ROiQjg+X{3=H1Qo-U3d6>)FxR^RzsJoo+o z_?HU%79G2>TXQmxX7oZQqh4n|Q%=iw`9AP`5mNTb$sI7!7bOQGA&pm^Ss{SUk+sjNKe zR=h6%E_>Rk7wOYJ8BI~~oFtX?#rPM)=7-iMGCj=OmStTZ`D(GQ#2-CaHJ^Wk2QNxv*vrgEuon z!>uAUU0sM-5mF2cSEd7 z>6b1+4PMH~;E-!MdD=9HBXxKg7_v^!+_DAYo`g&WhJfgEOO}pWJsRMn$xMG3Wv(mV zPsjh;wENR3?cLn^dp7(&lWuo;ZowhWySMLs+m?6U_WPT%+qv7{ZCziRyZ!C9+hw!! z_f>xH3g5Hnc0x1nuF`9f%cHB`ZrxpaJ$C!;ipRaXea-J~xt+Co?XI7npP&C*TmS!i z{r$b~Yu~^2v-|nv-5KNaZ}j&4c=Ybs?EG{3yas|O+3E0(Z@02{>(_nkzWedG{QbQj zd-LZ+pP3$=xAR@6f6b!|kG0ocyk5KGQP0eX)a`$I%1JJm zggC>gJD=PMu*otxad{bk?F;9<_U6vt z>i?bpe^S}tpxgTEFZN%MFT0U=S8aBVQMvw;Y^$@juOrXDD!Ws7{N0pbzn67?9?L&J zoX+#_b^YJ$IAwDJR)8eBv6GZdJPfBJ10i<@S4b zf4^7#*~7=s``;U>TB*Ok@Bjbzu2sJ#@qOu~ztVp*F26A5IA{O=PmNUM37wx>Cnxb= zn6Zb!JKJ^N#jAPC=a!vPHax2HbMy1f^Z(|2e-*xe*Y{g1)?D2FMZWUM#A5qv2M(p9 zx;IZ|Zq=)ml{(9&sMeePc_hAn#_zH}sna5teV_GWqIvzlKku^Re@EHfwc$c@?Xin5 zF8|2i`E;6%RPc#O_qR#s@7ZYmpn-YS|9!tAU#sd@p1h;}<@1ZkPoa}k(_o!H8!Q!8DTb*S!_JuX-M=Fa-s)6Zib zXRqCQ?bW_dQ`bN7KI**T$!ZmEJBQ>?Ogd{tf4Z5!i~DtH`ZK|qO4I(lEPpmLy=?Wm zU0LsUUVF0T_q*NY_WysL|Ge}uV+5*iX1DO!|M_5}7JO)u{oZxE-|gCY{@97<5tDBQ z&;NC0=l{JQFQ7${uh;!w*S3FJ;lt?tujJQ_<9651&Ng5F{ZG~>>A&4GU$5V97avr2 ze$x6$IzJhDPjYYA681#;?vgF1v{pX}oXIrp&&yAs!sT{iyKL3@)yr0^+y6XS_w-&f zx@SE1{ydw1?y=EBou8K0jmr`{rA}-4gu$b^L#;_*XO2(1Puf)%!i4 zKb`O~@cvg~@#8^r_4%c@UhF(yoA>=}ew}grro{`7zAjc8G~Qg_>pq`SG>?@l|OekkIT`uW6m z*=yDJOrqCrzgKk^RQml{Y$%K#6Ge;XtEO#={G@*Rg?Y%6Vl!{sXNLVR=lwXMe(vtg z#qq}9cO17}_x<`AFa3&x+`B+g^S{FcBWlVIajHLYPH2kwq<%ba_uFgL`=VZ~^smkO zZeIV{{O-Hm@9)W0y;ykHQ+@80xs}gm7SGqHf4lX1+4lQ&)#cY?%WYrG@2!5nxBT7u zpZ))T^uK$xdi}e7|Np)(zyITy`Lntu57*|`W`nAUbGk~-TQxZ=l%Qh^X^4=`Mb3bx#M5deVRP~ ziL>k#|N38--*w0Td35K~{&QBZznnAg?X5d{Pv@_At@l2!O;4Cj)btNrikg^Ta{0oG z{f`W1>im3MdcXF2seb*>)79rMZ`pFj=yb{LoXx)Fk2=-Q{T2V_Y5a??QEb{jQ0Bb) zzxCt}^!zdnlwWEzd>Fj{Rpf3wDz^7|#wBUpZ|m#-zJ5OKd8YBNYu~@`d2W06)#~;4 zs$(YK%UZqm+TEhlx<4n(GVW8Y|Nr;Knd{fGL-i|i)b&P?*}MyX4REM{(V+ppAfGV$d4{4bv${@mjeb-w1A@$)+4 zV{7)tE#~LGlQP-2>iqE~rAGwapIn@scyhTbYMnX9CwZ~stdj{R*T0^T-1pK}eexAh z&AIon?E4wN9S%f(+q%AX?d_V+XF;C*y3)T^tN$*Gx1H`Or0xbNY^17>8PA)@-)*?@ z$@SuUmCwJ<>-Wt1lKa5?PJy#r^|HCO-)`RJ(q40+dY#(Bqhir(c0cOU{&XVvJQgoq zE4x?uye6ZkQFVV`_WHeL?}A@`{yC#%-rqOrN}6KzWfS0{`Gpi{ddNSpHf%yu7-x6UF<80nKqYfo%emu^QX>f4%7a$ zLQ?s&!mk(m>rDEOAK3SK?)x);vo6%=W|^N|zgKm>7*e-;OW2cwOG%6GJNwE``_uaT zT6F%~XJ=<$uRinm#oqU|`EvbU=WM^WR-t?B)? z-(J|>D|{0C<@kG0gK@9kR_lL19)FGqK8TrcGPkDNJeK@uGdhq);(ySooV&I&-3TI&*H)oVyEA3I<5Ef1E?LxeO%=am+AhtqEBn~e!I2z z`pUHUf1jp*_7KLB`6M?zw|Q>4_kZ-;Wq+?b`dWGaTWrpGf7ae7lf299|2*XXoY8Z0 z>GZf;)oZiN>i_+*xpZVRW-4iWb9H@P>Gv(mZP$LUUw`vO^BIXg)&CczYokl-&fS_@ zcucZVN9~C9{h#OVy$;>{|40A-6Ux3On4y<)!p-}i?e{yEfA7DZ*R8wl#PY`0Ba{BW zsQEN`{u|q4w`7Y>C|2sIow4}udSUndzwd0$xnOfm&S~B4bAHcKpHtxU{(tyxVSgLL z`CMX5-v1VFzLmB5t6cKgYZ1x4HbTNLHXP=Ay|-*@RQB4fpDcv2ln9cW>~(%BKmMa1 zSpQ;Lbl%SU#RnIspR9l4XZ!Way~nHXwu;BiIG*H`yXB(W-s|hb!sBa8< zZCAshd*5c;2fSXl``zDjhr!0g{Wv84O)mZ{pT&a)8zJF0+VMZV-kYwuy79Q&?Bg>d zFr)e8gr}40f4yA({okxxvV}(kzgr9U_o@D$X!&-_<*NR*Y1-@e6v=gJegJg=zeiom z*!%U`>BT-e*n)c7y{gxLKHX)L&bjdWb=LR&|E~W(mHd$-@{|0`!vF6NEPv_0-1xlB z=I>G0vZCx#?_(xd$xZB0pWHvKUw!w*XT}H%ouB;oK?TXZ$E$9t&CZ$Rp47Ew$D^*j z*SEOM|MzA2XAR+#Sj~w3bl(2|pL_AqyZ?T>t>1rCIpJjek8d}U`#}cn|8si(lZi8w zK*d${`pn+4`?cR~PPuHtk_K~T=WaWx|Nno^_Pb?!_wOr<|NAQZbA*l0v_I|7!}tFR z{r=;){l4!zvbJ9Kvwk{ph7qWudSANsqL=pCDef~pu!Xhll}YxK>TBOli!HlpBg8*h z_5VZ5XETzk`d6lf$Cif5b!u+;_v`idxZ6^(<#$Ufr*tM`7Q#F?x82U09sjRRZ}*!` z_wEPpjxD>X+JE$L!pZsyxA|G~`&WkTezz-Iu3fYAQK$O1xcgFbi%x0cGHZU+CwFk` z;ePn;i|dUaPu%!qy7c$-z#nUc-b!5G{-)o~Kj{*-<#7r}FbB z50Onzrr$0;Z(H5JJnVM<{#vCJpKq*SnD)p1EpL8>^ZUXpr`X?ZeLMGkP5OIN`CV7T<8Av5v3jw3iT6K` zf19(mzgo5W*+j4rxj&yye{b6-_0#yyzRP~rYrpT}zq_RV&^~No-T$n-xc-^({Fi?} zXMLZxeUECt>xL)xTTbikUh`cdtMtdi_UDBeXUg||o_p_g++xo(Y#Cy45frk1Yw5>$XoiS)Tz)K-K*V!|Z-A?1;ltPpkL&xs zZTTYUf;*820Q z{}d?y{+8M*t-Dnx;beWn;$pjR8~Z`FEuUXkCC8qIJz%O&%12hcTv{E!yzKI(jB8+> z@q1^aufO`@`l^F#uol>$0Ve(bEB=02ZvVD+?k!LUyK>FU)RXlI$7PCr-oG)eI>;S2 z!M$;261G$%;QjB!!*=<5zoWKRf8Tw7?(tck)BdoV{rda3@|)D#t=Ho!MP_JXi;A~< zKA-#fRD70bSj58bU$e?D`Zuq22ko#h3l8b^Do&k77%4iqrpG+%!FY zJ$OV%F8f);r{8&dzh1kyGyCgf`TrLE%-FSo3jO_moI;v`p%HK)F z)_%Q;ThAx=Pp_}9TWYVqROjdS@~ffYU(dxXuKfJ$X<&jHwi+y~`sDr(hq$ZLSKOTz zoj3D%)-2Wk|Ni})|9@xsGpV(Ezul@7nc<1edEhp5-Oq!$`~QC1TYTl6@cbVxa;qb! z{rPSE@rZDB`nrpJ)^9+`3`-Y^=cdK9KNIio-`Kk~GV$d8{mlF}8_J(a{YtNe>-<&+5SII^*=}W zZhUh8{*HfV{=WbJcmHP%gUQ$`Jn8R~>R+$j{_R}I?yF(Zy8Ty0y#F!n|9$s;)$_F% zFL~?Fb#I)RiY@oOj{pDb&!?+11D9?|)3`^D5Kc z?=iLdaDe%PF}Ywk{-|L2L#rI5`}^bMl6 zecogG>xsJkOmKitSFLxn1kW#nhs@fXw>_U%{cO7Y?!sE{ukzcUPK$oFaoIH0`bKAd z+b!kyq(GxBpg@~e6ZuJe3Urcqt?17*i&YbVPuK%St@7mm`TsxHe>)ew8`M|tH!aoq$qjCkf4=tOR`&X{iw~UH^yKuU z{R?1|*K1FhA6A_GM72JpUAFAS+?{2hj+jT?|&yi12NY1 zZ}WCMY_qv`Wb+gK4cDTwzn+U;T>XBpId(U{@y)LauKU^f_4EAyd&>Xavi&^s{F!85 z8}ENitJm+VdcVi?*Z%+C|Km!6mnYd5J(=kKP0sl(xKDM>1zZ^RCxU`3zVhkR>gQ_( zH#DfmPy53PTULN&ui1%Y-zks#?e~>G11EA&6Lao%H_(_p4%gQG zemgzB?p4m-uh;e-58d5g`zE<^O(!Tt#?*&_hKh0I1hHvvucu zMYiWmn*QhQ_WS$F?@7hh{d|g}jL5G%9sTLF|I%)~T`Rud$lCtv)#~RP)tXf68$sm* z$hWia|4EZ$O}l0>?GLEPvHtyLv#H}&HI(wSeX?S9>Ph*Vx!dnn^{+2;m#a*X%YI|` zp^^W~IZIF+%a>em1R2I1|HBDt7-&AFk|$yX+9+V?b@mkhknKd(!{fS+f4iVtHImz_Jeq*`H6( zzqC5;>#BRn>+im}zP-0u_5VM!yCs)FjjMM%pW|vGnQ43fJF%!+?^gAnt z_bJZ)qFR66_WPT;JKf}e9AN*1qmfkoI{N;s_+@|KxSjQR2VDj!Q2Y_@*C$GG2A!u#Lf*qV<=_ZnY+q5toZKFGz# z3fZGSNk*YfhB%vbd;c@v|MTp<&jGuiPK(xqXzu;T>OF5~*!Fu>*>db@eb{W>yyHp# zo2}R5_C8-!wzV!~(YNyp{C`cd-}I+nu7*_jYE7{QfMFAcU=DZ+6=IUw_?~#UO2}(_@VKw_e!$-1hy;+PjLg z+f@I925IN+cH8}STeKW24ma<4(!b|zZvJaq^{ux{ug89l;GU|w|2=5g!uva>RTsPC zrnooG#5y{+M*pXB_S&ss?<-f{eIb0m9b7B!yEno2@TB^ypiW8bYU_79lyP+IjJ)fv z->v)ocJK348Q!Cl{vQA>Hu-ukZZW9h$JGIi{Ph3w?|a|(-75|TEyywH-x{#z_ucpJ zYS${xo~ByA_v^LSbN9Nn%T;B_v8G`i@tXFB)eO|*`W(D_^Lab#{;w+{Kgr*4WS6~S zUEK>BTCw3eBZ94<(fRrP`;6l@%f8E8%}cDlzWd(Q-%`$?CP-xZ+^g2ry<*Wh8}aG= z*k8W~q_@}f+KFUat!aPQ%RZkq|9&oRHMsC_e!OnSqpo-C_CF5BOpmXtoT@ezTN0c0 zXJ792yW76oTz#i3|I;F8qIpwke%h2x`P{4nhvi!@u)wk}J->)$on6&_47H!Rp&$B&ilG1{pm)ziHG^^_k2Guw<$B~)BlI^{}z`2i@IBK z*|$do$$ogH=3#X{~)Lz_}VsptMuRSAMU3o{eR$QFF*JB`m5@8 zA3JUMdT&*|UR%BX|An<%uSHe%bYhvM<(aAae<7&y+WUM>nf>3F{+}cGyH)=$w0&-Q z{-tf36llJ?Qbfx1m%-VZzwO|)I>|mf*rS|3H%5NO*W;j}%gQzFPr-wP^DR>@Z+r57 z_xpW&j|Z&2oxk6<-?@2OWZKMo+4d#iq?eq8Z9FsWh;yVpo#Tof!IgUru{Kmy>?sF`<<)rrcRHYc3kUIU-_QJ z-_J{J%8dTx4oZUe9+8Hwfgm9@n;K@6j0Y-?=$D^m%Ox}8e$)mp7y6b{ch>? zx3=wDe}9_3f6nnLk7%k(X7PyV8L`{#H5n2^BPp=m=-BYQu?2bj9T>TZ$ zN*ec>8rTL)B0tIREc|P$7P%Us{F*Be6qd*v^?-$@~W$oy!CG0t$aSWQf1j0Q1@x) zb))$EQg&HDYG&sFEM-_H9qW%-kh|K>aMSuXj0o&V+*{h$B;z5jo& z+Q;;B{O9HO-R*x}y!Se4vG|?`td&zbv5jfXRIPtlaT&DqEib$L03-X8jn5)J$?pTL z4gJ0&>+6lyx(`8f17vz*54QI_NS81 z?mhPNI&UPm_rK@%|9^re@!suzKhHhMtLCxv{TF-ZZQb=^QTHbcth0ee-v17Lp8LLL z`S(A4i&IY4r?~CksURPH)~$Zt47>Q5d%J7(wYTKV1TS{7*h{xSBcQP84;9d&Zw`+rZb z|2h4Cxt#YuW#cND|4;Y-nSSr_>YJYGbEh0nYU-_Xuie+SRqAiY$t~E+l>Hw-6N7u7 zSIYc7c#vKG&hP)ck)VcXpu6nV>KfDNl8dg8hSE`%U7t>ASFev>3!ZDlKCgXdl6_Bd zpXIXeG1uQc)vy0~CsOBU{~gfEn7=>g|F3*+cr6DsX`XD@=w`1rd423!xBF|2eX%v$ zH$UM|-;(nDbL?)=qL{m&hQsgu{E^R z7WS(A;hnb+xPq3JJ7PV_l4KqMc@AwCfCck@#V7F-{RIs?R}G~ zfBLbH4fZHJZ1wZWU_w#68dM&5O@lRvz@w>7Kur2XG7m#h0rWqS9mZa8W1E8s{?ZPvF&{u+gT z6H)A;d)@FC!=9RV(QB`&);|edUlscPW8dP7+dGWo9{)4@3!Y1?`+fWVvyID|um@^Y z-2Y$Kzt8(GmR)&r|CdYN)&1o$z56yde6;v}r?`5(`&&@uWOMBb_GA}-{nKgv`_;Tr ztDmaYKWSj*dtv*m@at3kddvRf2mbxN|9>xNfpyh-*R!C?_FcOD??}1aEbQ5P{p;27 zf3x13W~{w7{m=bB&&=;`p7(Xly~lFy{uPIWcYQu*t>1sb!EL`-@zv1qw|n^@lQHhI zwXm1?udP2EV6I;8?7em0lm0)K?f(Y9FYMoJe9l6-|AbQ+Xg%QU+-;HXcdoztBHqB) z8hbiyzNPU&aRis_C8O%qr3afrn}GWzVEcrVpV$^f2YUp@M0|Mu1-#f{B->N zlF5Fr_Uc`}qoen8``xnW?{CuWcYlxZaRLpwm!G%&{$ye$!}ZwmyGLpc+>^h4YWvIo zjo4H1$qh%vqQAt=&dden!~ELU(R-gK1w|De72REY-qyVTjQr07>~Eq0GhPW+<13$#A(-fQFDv#%!Ef9mwFS@gZeCkWJdDL*P2{$ykNt)t@cch>HH zw`=e7ETO8S+Hn()=iCqKUQuiy3kmrwHMJx}_3{+Ulbe{#v!XXg8N{{DHsexCb$ z&BgK?EnX~Wt~!5q321Su$?u1q*b}w->2uca?^O3LTN@ew$=z-LF}?ZIJ+r^eRc@Cl z@+d#dYyRZp?6T9k+t1Vn{S}`7sVO+sOOh6YzS5>bc7_z5mtE zvahduzjNl5xZk&~LuMKjO;W$;8-s?r@+P{9y|n%3`Fg`)zSED*aWo>ISb|y)>o1#t zhH0m+uStFXbLNwOzt;b+ddK|2ZU3!}tmXG>%gaw`E-wKu$L%i-0xb>soM?h=Lej|l zU&^iW`?b~UuWkViz#Rlo^(5H zcJ8N#CYdtc{|b-GUax&_egC3J=~>h3PvqxzBJYd?t(Bb+`APkH{qOw$Yrj|dI#2ua z`}fWBb=UTS28nI`FJIAGz2*{V|H+$k7LR-0U5m~?+ip>|*#Ct6qYh=YZ^56uqd+S+ z5=}wVKg-tFe!Hpu|Ao&Ml(mgDi={!~3~G#2t-o%Pa`HWB{n2h-vl|P($M|N0Iw;#8 z_gR;{uRLG<%ueB5yZxU;yC;r+-j(lv4Vtrm2bz?>!(La$>r~MJ}(oGDRBJ0HotcD?k|_TcY{`Uy*thT8Uuze?mk~z{qDu#|Da_v zrSpH^dAuJt&X9 zkUnMFpO*%|rhKk>t7ht5H}m58&CiRM-^}>3TJ-&%&*%Oq8yaH?sH#72@Bhnv|8@2e zou5z7+5LW#w{q#USGMh0+d*qa|4W>a@kU)t?wodVzT9Gd&Dm}Df9Ia8uUNP1)vCO= zTd%*f?ax}z%x9qx|8Hgr+HQaoIzKO`ep!9^lj)o-IzRi*=!Aodb%X#WV{8qZYf^< z@dn}s1R2`PSccI!=UD5mBq2iB6#n0F7F1I^A>kgmR?auityS=(KM2`TcGAU-TpQ z{XCoh%-cy3GiBr-e(}BFdA9XBou8$(-*?}C3o1ds#j)%DDZ5ws{M{sPy_3@$+R-3>y_4~cMSFhWpHNQv>o292g z+u!bG$5?y+tN8mS-TpObE+%j7)@!f!nrY>KQ8ob04}PD0|Bu@IBsoQz@i~jdzwf@Uo9-{ojK0w)W!fLJ-p|3;b$?FI z|8nvVXjW(!cy;jge6e4v_y1bG^Su5K&<@1Ezpn2;x4gX(Gac5=22Iu4^YCBY{KS7c zXjNGC{onV@zh^%Lt)9L2`lgeA^{vahKudkzrN3Ff=hLYgt`%pHQ_7v{_j|7{irxSB zZT@kg%Ws#>&Uh+p;51RSkfz||q3k2T#lka(HuQmC;m{Waz&8DSwOizDL_~HN> z`}^shz6fbWw+VyTzS;TvcJBUghX`h4>#olK z|8su%>h=46-RWN@Q*=V{E@&^oJJ1SlejuiajD|Np=5yVuu!U43`u@_Dyp zi_aL|ZDg0b0qTC<1x8Io_`b6AS&*rVO z@yOXq@EI?>rNy9ic(cs&?^*H}2!fA&F_~3f%*K{+O~_m4E{kG=vH6a zQ~7yaWy5LE(J!-JxfQ?5xObLOVnHUz#I#C9kapfJk>~a?7$=r6{?h+7NyRg3;r;Vl z#cC3s*=Bw*_TK;Bz;6C7ea}ftGG9Hre}3cQ`3Jx2{$dyfqai^55HNo9pM7)cq?#Qs Rx;KDq_jL7hS?83{1OOkDbQb^s literal 0 HcmV?d00001 -- GitLab From d48cfb7ba339414468ce5dc0bccce93d61714101 Mon Sep 17 00:00:00 2001 From: hajipour Date: Thu, 6 Feb 2025 10:52:40 +0100 Subject: [PATCH 253/463] enhancement: - agg-net and ip-transport controllers added to e2e descriptor of CAMARA ofc25 demo to have both in the e2e topology - agg-net descriptor synced with the latest tests --- src/nbi/tests/data/agg-net-descriptor.json | 288 ++++++++++++++++-- src/nbi/tests/data/camara-e2e-topology.json | 119 ++++++-- .../data/camara-e2e-topology.json | 119 ++++++-- 3 files changed, 461 insertions(+), 65 deletions(-) diff --git a/src/nbi/tests/data/agg-net-descriptor.json b/src/nbi/tests/data/agg-net-descriptor.json index bde4db628..bb27d6f25 100644 --- a/src/nbi/tests/data/agg-net-descriptor.json +++ b/src/nbi/tests/data/agg-net-descriptor.json @@ -41,7 +41,7 @@ "action": 1, "custom": { "resource_key": "_connect/address", - "resource_value": "10.10.10.10" + "resource_value": "10.0.58.29" } }, { @@ -56,7 +56,13 @@ "custom": { "resource_key": "_connect/settings", "resource_value": { - "endpoints": [], + "endpoints": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + } + ], "scheme": "http", "username": "admin", "password": "admin", @@ -85,7 +91,7 @@ }, "device_operational_status": 1, "device_drivers": [ - 0 + 13 ], "device_config": { "config_rules": [ @@ -118,21 +124,9 @@ "uuid": "200", "name": "200", "type": "optical", - "ce-ip": "128.32.33.2", "address_ip": "128.32.33.254", "address_prefix": "24", - "site_location": "access", - "mtu": "1500", - "ipv4_lan_prefixes": [ - { - "lan": "128.32.10.0/24", - "lan_tag": "10" - }, - { - "lan": "128.32.20.0/24", - "lan_tag": "20" - } - ] + "site_location": "access" }, { "uuid": "500", @@ -166,7 +160,7 @@ }, "device_operational_status": 1, "device_drivers": [ - 0 + 13 ], "device_config": { "config_rules": [ @@ -227,7 +221,7 @@ }, "device_operational_status": 1, "device_drivers": [ - 0 + 13 ], "device_config": { "config_rules": [ @@ -288,7 +282,7 @@ }, "device_operational_status": 1, "device_drivers": [ - 0 + 13 ], "device_config": { "config_rules": [ @@ -321,17 +315,9 @@ "uuid": "200", "name": "200", "type": "optical", - "ce-ip": "172.10.33.2", "address_ip": "172.10.33.254", "address_prefix": "24", - "site_location": "cloud", - "mtu": "1500", - "ipv4_lan_prefixes": [ - { - "lan": "172.1.101.0/24", - "lan_tag": "101" - } - ] + "site_location": "cloud" }, { "uuid": "500", @@ -349,9 +335,185 @@ } ] } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "device_type": "emu-datacenter", + "device_drivers": [ + 0 + ], + "device_endpoints": [], + "device_operational_status": 1, + "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", + "uuid": "500" + }, + { + "sample_types": [], + "type": "optical", + "uuid": "200" + }, + { + "sample_types": [], + "type": "optical", + "uuid": "201" + } + ] + } + } + } + ] + } } ], "links": [ + { + "link_id": { + "link_uuid": { + "uuid": "ip-net-controller/mgmt==172.16.182.25/mgmt" + } + }, + "name": "ip-net-controller/mgmt==172.16.182.25/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.182.25" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "ip-net-controller/mgmt==172.16.185.31/mgmt" + } + }, + "name": "ip-net-controller/mgmt==172.16.185.31/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.31" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "ip-net-controller/mgmt==172.16.185.33/mgmt" + } + }, + "name": "ip-net-controller/mgmt==172.16.185.33/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.33" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "ip-net-controller/mgmt==172.16.185.32/mgmt" + } + }, + "name": "ip-net-controller/mgmt==172.16.185.32/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "ip-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, { "link_id": { "link_uuid": { @@ -623,6 +785,74 @@ } } ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.185.32-200" + } + }, + "name": "172.16.185.32-200", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "172.16.204.220-500" + } + }, + "name": "172.16.204.220-500", + "attributes": { + "total_capacity_gbps": 10, + "used_capacity_gbps": 0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "172.16.204.220" + } + }, + "endpoint_uuid": { + "uuid": "500" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "172.16.185.32" + } + }, + "endpoint_uuid": { + "uuid": "200" + } + } + ] } ] -} \ No newline at end of file +} diff --git a/src/nbi/tests/data/camara-e2e-topology.json b/src/nbi/tests/data/camara-e2e-topology.json index 0b314e104..02a21e691 100644 --- a/src/nbi/tests/data/camara-e2e-topology.json +++ b/src/nbi/tests/data/camara-e2e-topology.json @@ -23,6 +23,59 @@ } ], "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "ip-transport-controller" + } + }, + "name": "ip-transport-controller", + "device_type": "ietf-slice", + "device_operational_status": 1, + "device_drivers": [ + 14 + ], + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "10.0.58.9" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "80" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + } + ], + "scheme": "http", + "username": "admin", + "password": "admin", + "base_url": "/restconf/v2/data", + "timeout": 120, + "verify": false + } + } + } + ] + }, + "device_endpoints": [] + }, { "device_id": { "device_uuid": { @@ -94,7 +147,7 @@ "action": 1, "custom": { "resource_key": "_connect/address", - "resource_value": "10.10.10.10" + "resource_value": "1.1.1.1" } }, { @@ -139,7 +192,7 @@ "device_type": "emu-packet-router", "controller_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "device_operational_status": 1, @@ -210,7 +263,7 @@ "device_type": "emu-packet-router", "controller_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "device_operational_status": 1, @@ -272,7 +325,7 @@ "device_type": "emu-packet-router", "controller_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "device_operational_status": 1, @@ -334,7 +387,7 @@ "device_type": "emu-packet-router", "controller_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "device_operational_status": 1, @@ -748,6 +801,36 @@ } ], "links": [ + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==ip-transport-controller/mgmt" + } + }, + "name": "agg-net-controller/mgmt==ip-transport-controller/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "ip-transport-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, { "link_id": { "link_uuid": { @@ -841,15 +924,15 @@ { "link_id": { "link_uuid": { - "uuid": "agg-net-controller/mgmt==172.16.185.33/mgmt" + "uuid": "ip-transport-controller/mgmt==172.16.185.33/mgmt" } }, - "name": "agg-net-controller/mgmt==172.16.185.33/mgmt", + "name": "ip-transport-controller/mgmt==172.16.185.33/mgmt", "link_endpoint_ids": [ { "device_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "endpoint_uuid": { @@ -871,15 +954,15 @@ { "link_id": { "link_uuid": { - "uuid": "agg-net-controller/mgmt==172.16.185.31/mgmt" + "uuid": "ip-transport-controller/mgmt==172.16.185.31/mgmt" } }, - "name": "agg-net-controller/mgmt==172.16.185.31/mgmt", + "name": "ip-transport-controller/mgmt==172.16.185.31/mgmt", "link_endpoint_ids": [ { "device_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "endpoint_uuid": { @@ -901,15 +984,15 @@ { "link_id": { "link_uuid": { - "uuid": "agg-net-controller/mgmt==172.16.182.25/mgmt" + "uuid": "ip-transport-controller/mgmt==172.16.185.32/mgmt" } }, - "name": "agg-net-controller/mgmt==172.16.182.25/mgmt", + "name": "ip-transport-controller/mgmt==172.16.185.32/mgmt", "link_endpoint_ids": [ { "device_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "endpoint_uuid": { @@ -919,7 +1002,7 @@ { "device_id": { "device_uuid": { - "uuid": "172.16.182.25" + "uuid": "172.16.185.32" } }, "endpoint_uuid": { @@ -931,15 +1014,15 @@ { "link_id": { "link_uuid": { - "uuid": "agg-net-controller/mgmt==172.16.182.25/mgmt" + "uuid": "ip-transport-controller/mgmt==172.16.182.25/mgmt" } }, - "name": "agg-net-controller/mgmt==172.16.182.25/mgmt", + "name": "ip-transport-controller/mgmt==172.16.182.25/mgmt", "link_endpoint_ids": [ { "device_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "endpoint_uuid": { diff --git a/src/tests/ofc25-camara-e2e-controller/data/camara-e2e-topology.json b/src/tests/ofc25-camara-e2e-controller/data/camara-e2e-topology.json index 7ae2da79c..4cc5645a0 100644 --- a/src/tests/ofc25-camara-e2e-controller/data/camara-e2e-topology.json +++ b/src/tests/ofc25-camara-e2e-controller/data/camara-e2e-topology.json @@ -23,6 +23,59 @@ } ], "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "ip-transport-controller" + } + }, + "name": "ip-transport-controller", + "device_type": "ietf-slice", + "device_operational_status": 1, + "device_drivers": [ + 14 + ], + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "AGG_NET_IP" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "AGG_NET_PORT" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "uuid": "mgmt", + "name": "mgmt", + "type": "mgmt" + } + ], + "scheme": "http", + "username": "admin", + "password": "admin", + "base_url": "/restconf/v2/data", + "timeout": 120, + "verify": false + } + } + } + ] + }, + "device_endpoints": [] + }, { "device_id": { "device_uuid": { @@ -101,7 +154,7 @@ "action": 1, "custom": { "resource_key": "_connect/port", - "resource_value": "NCE_PORT" + "resource_value": "NCE_IP" } }, { @@ -139,7 +192,7 @@ "device_type": "emu-packet-router", "controller_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "device_operational_status": 1, @@ -210,7 +263,7 @@ "device_type": "emu-packet-router", "controller_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "device_operational_status": 1, @@ -272,7 +325,7 @@ "device_type": "emu-packet-router", "controller_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "device_operational_status": 1, @@ -334,7 +387,7 @@ "device_type": "emu-packet-router", "controller_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "device_operational_status": 1, @@ -748,6 +801,36 @@ } ], "links": [ + { + "link_id": { + "link_uuid": { + "uuid": "agg-net-controller/mgmt==ip-transport-controller/mgmt" + } + }, + "name": "agg-net-controller/mgmt==ip-transport-controller/mgmt", + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "agg-net-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "ip-transport-controller" + } + }, + "endpoint_uuid": { + "uuid": "mgmt" + } + } + ] + }, { "link_id": { "link_uuid": { @@ -841,15 +924,15 @@ { "link_id": { "link_uuid": { - "uuid": "agg-net-controller/mgmt==172.16.185.33/mgmt" + "uuid": "ip-transport-controller/mgmt==172.16.185.33/mgmt" } }, - "name": "agg-net-controller/mgmt==172.16.185.33/mgmt", + "name": "ip-transport-controller/mgmt==172.16.185.33/mgmt", "link_endpoint_ids": [ { "device_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "endpoint_uuid": { @@ -871,15 +954,15 @@ { "link_id": { "link_uuid": { - "uuid": "agg-net-controller/mgmt==172.16.185.31/mgmt" + "uuid": "ip-transport-controller/mgmt==172.16.185.31/mgmt" } }, - "name": "agg-net-controller/mgmt==172.16.185.31/mgmt", + "name": "ip-transport-controller/mgmt==172.16.185.31/mgmt", "link_endpoint_ids": [ { "device_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "endpoint_uuid": { @@ -901,15 +984,15 @@ { "link_id": { "link_uuid": { - "uuid": "agg-net-controller/mgmt==172.16.182.25/mgmt" + "uuid": "ip-transport-controller/mgmt==172.16.185.32/mgmt" } }, - "name": "agg-net-controller/mgmt==172.16.182.25/mgmt", + "name": "ip-transport-controller/mgmt==172.16.185.32/mgmt", "link_endpoint_ids": [ { "device_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "endpoint_uuid": { @@ -919,7 +1002,7 @@ { "device_id": { "device_uuid": { - "uuid": "172.16.182.25" + "uuid": "172.16.185.32" } }, "endpoint_uuid": { @@ -931,15 +1014,15 @@ { "link_id": { "link_uuid": { - "uuid": "agg-net-controller/mgmt==172.16.182.25/mgmt" + "uuid": "ip-transport-controller/mgmt==172.16.182.25/mgmt" } }, - "name": "agg-net-controller/mgmt==172.16.182.25/mgmt", + "name": "ip-transport-controller/mgmt==172.16.182.25/mgmt", "link_endpoint_ids": [ { "device_id": { "device_uuid": { - "uuid": "agg-net-controller" + "uuid": "ip-transport-controller" } }, "endpoint_uuid": { -- GitLab From 0e64c58bf464fcb0a445b9803176d4befc3bf3cc Mon Sep 17 00:00:00 2001 From: hajipour Date: Thu, 6 Feb 2025 11:11:20 +0100 Subject: [PATCH 254/463] enhancement: agg-net-descriptor.json renamed to agg-net-topology.json in nbi tests --- .../tests/data/{agg-net-descriptor.json => agg-net-topology.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/nbi/tests/data/{agg-net-descriptor.json => agg-net-topology.json} (100%) diff --git a/src/nbi/tests/data/agg-net-descriptor.json b/src/nbi/tests/data/agg-net-topology.json similarity index 100% rename from src/nbi/tests/data/agg-net-descriptor.json rename to src/nbi/tests/data/agg-net-topology.json -- GitLab From 32ec651fe9a648843b145d49da870b0b310c39af Mon Sep 17 00:00:00 2001 From: hajipour Date: Thu, 6 Feb 2025 11:44:46 +0100 Subject: [PATCH 255/463] debug: NCE_IP changed to NCE_PORT in ofc25 e2e test descriptor --- .../ofc25-camara-e2e-controller/data/camara-e2e-topology.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ofc25-camara-e2e-controller/data/camara-e2e-topology.json b/src/tests/ofc25-camara-e2e-controller/data/camara-e2e-topology.json index 4cc5645a0..b2a8617e2 100644 --- a/src/tests/ofc25-camara-e2e-controller/data/camara-e2e-topology.json +++ b/src/tests/ofc25-camara-e2e-controller/data/camara-e2e-topology.json @@ -154,7 +154,7 @@ "action": 1, "custom": { "resource_key": "_connect/port", - "resource_value": "NCE_IP" + "resource_value": "NCE_PORT" } }, { -- GitLab From 80fdd42004c28d201d14c5884757e97bf2a21848 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 6 Feb 2025 12:14:27 +0000 Subject: [PATCH 256/463] NBI Component: - Fixed Heartbeat Thread - Added termination conditions to Heartbeat Namespace - Fixed issue reporting configured namespaces - Separated tests/MockService to run in a completely isolated process to prevent collisions with eventlet - Fixed SECRET_KEY for Flask --- src/nbi/Config.py | 3 + src/nbi/service/NbiApplication.py | 17 +++-- .../service/health_probes/HeartbeatThread.py | 22 ++++-- src/nbi/service/health_probes/Namespaces.py | 3 + src/nbi/tests/MockService_Dependencies.py | 50 +++++++----- src/nbi/tests/PrepareTestScenario.py | 76 ++++++++++++++----- src/nbi/tests/test_core.py | 2 +- 7 files changed, 126 insertions(+), 47 deletions(-) diff --git a/src/nbi/Config.py b/src/nbi/Config.py index 83a350058..7fffa2428 100644 --- a/src/nbi/Config.py +++ b/src/nbi/Config.py @@ -18,3 +18,6 @@ from werkzeug.security import generate_password_hash RESTAPI_USERS = { # TODO: implement a database of credentials and permissions 'admin': generate_password_hash('admin'), } + +# Rebuild using: "python -c 'import secrets; print(secrets.token_hex())'" +SECRET_KEY = '2b8ab76763d81f7bced786de8ba40bd67eea6ff79217a711eb5f8d1f19c145c1' diff --git a/src/nbi/service/NbiApplication.py b/src/nbi/service/NbiApplication.py index ef2659415..2216177ff 100644 --- a/src/nbi/service/NbiApplication.py +++ b/src/nbi/service/NbiApplication.py @@ -13,11 +13,12 @@ # limitations under the License. -import logging, time +import logging, socketio, time from typing import Any, List, Optional, Tuple from flask import Flask, request from flask_restful import Api, Resource from flask_socketio import Namespace, SocketIO +from nbi.Config import SECRET_KEY LOGGER = logging.getLogger(__name__) @@ -36,7 +37,7 @@ class NbiApplication: self.base_url = base_url self._app = Flask(__name__) - self._app.config['SECRET_KEY'] = 'secret!' + self._app.config['SECRET_KEY'] = SECRET_KEY self._app.after_request(log_request) self._api = Api(self._app, prefix=base_url) #socketio_path = '/'.join([base_url.rstrip('/'), 'socket.io']) @@ -64,6 +65,12 @@ class NbiApplication: def get_flask_app(self) -> Flask: return self._app + def get_flask_api(self) -> Api: + return self._api + + def get_socketio_server(self) -> Optional[socketio.Server]: + return self._sio.server + def dump_configuration(self) -> None: LOGGER.debug('Configured REST-API Resources:') for resource in self._api.resources: @@ -73,14 +80,12 @@ class NbiApplication: for rule in self._app.url_map.iter_rules(): LOGGER.debug(' - {:s}'.format(str(rule))) - # TODO: find a way to report configured namespaces, for some reason, - # those data structures become emptied when SocketIO server starts. LOGGER.debug('Configured SocketIO/WebSocket Namespaces:') - LOGGER.debug(' WARNING: Might report an empty list of namespaces even when') - LOGGER.debug(' they are properly configured. To be fixed.') for handler in self._sio.handlers: LOGGER.debug(' - {:s}'.format(str(handler))) for namespace in self._sio.namespace_handlers: LOGGER.debug(' - {:s}'.format(str(namespace))) for namespace in self._sio.server.handlers: LOGGER.debug(' - {:s}'.format(str(namespace))) + for namespace in self._sio.server.namespace_handlers: + LOGGER.debug(' - {:s}'.format(str(namespace))) diff --git a/src/nbi/service/health_probes/HeartbeatThread.py b/src/nbi/service/health_probes/HeartbeatThread.py index 0b7158a09..c49f4ab49 100644 --- a/src/nbi/service/health_probes/HeartbeatThread.py +++ b/src/nbi/service/health_probes/HeartbeatThread.py @@ -20,21 +20,31 @@ LOGGER = logging.getLogger(__name__) class HeartbeatThread(threading.Thread): def __init__(self, namespace : socketio.Namespace): super().__init__(daemon=True) + self._terminate = threading.Event() self._namespace = namespace + def start(self): + self._terminate.clear() + return super().start() + + def stop(self) -> None: + self._terminate.set() + def run(self): + LOGGER.debug('[HeartbeatThread::run] begin') try: - while True: + while not self._terminate.is_set(): + LOGGER.debug('[HeartbeatThread::run] Running...') time.sleep(HEARTHBEAT_INTERVAL) - uptime = time.time() - START_TIME - LOGGER.info('[HeartbeatThread::run] emitting...') + LOGGER.debug('[HeartbeatThread::run] Interval elapsed') server : socketio.Server = self._namespace.server if server is None: continue - data = {'uptime_seconds': uptime} + LOGGER.debug('[HeartbeatThread::run] emitting...') + data = {'uptime_seconds': time.time() - START_TIME} server.emit('uptime', data, namespace=SIO_NAMESPACE, to=SIO_ROOM) - - LOGGER.info('[HeartbeatThread::run] emitted') + LOGGER.debug('[HeartbeatThread::run] emitted') except: # pylint: disable=bare-except LOGGER.exception('[HeartbeatThread::run] thread failed') + LOGGER.debug('[HeartbeatThread::run] end') diff --git a/src/nbi/service/health_probes/Namespaces.py b/src/nbi/service/health_probes/Namespaces.py index 9fba4ba71..9f7517d9b 100644 --- a/src/nbi/service/health_probes/Namespaces.py +++ b/src/nbi/service/health_probes/Namespaces.py @@ -26,6 +26,9 @@ class HeartbeatServerNamespace(Namespace): self._thread = HeartbeatThread(self) self._thread.start() + def stop_thread(self) -> None: + self._thread.stop() + def on_connect(self, auth): MSG = '[HeartbeatServerNamespace::on_connect] Client connect: sid={:s}, auth={:s}' LOGGER.info(MSG.format(str(request.sid), str(auth))) diff --git a/src/nbi/tests/MockService_Dependencies.py b/src/nbi/tests/MockService_Dependencies.py index 6d8ad7e83..8535fd56d 100644 --- a/src/nbi/tests/MockService_Dependencies.py +++ b/src/nbi/tests/MockService_Dependencies.py @@ -12,10 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os -from typing import Union -from common.Constants import ServiceNameEnum -from common.Settings import ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name +import logging, signal, sys, threading from common.proto.context_pb2_grpc import add_ContextServiceServicer_to_server from common.proto.service_pb2_grpc import add_ServiceServiceServicer_to_server from common.proto.slice_pb2_grpc import add_SliceServiceServicer_to_server @@ -23,18 +20,21 @@ from common.tests.MockServicerImpl_Context import MockServicerImpl_Context from common.tests.MockServicerImpl_Service import MockServicerImpl_Service from common.tests.MockServicerImpl_Slice import MockServicerImpl_Slice from common.tools.service.GenericGrpcService import GenericGrpcService -from .Constants import LOCAL_HOST +from .Constants import LOCAL_HOST, MOCKSERVICE_PORT -SERVICE_CONTEXT = ServiceNameEnum.CONTEXT -SERVICE_SERVICE = ServiceNameEnum.SERVICE -SERVICE_SLICE = ServiceNameEnum.SLICE +logging.basicConfig(level=logging.DEBUG, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") +LOGGER = logging.getLogger(__name__) class MockService_Dependencies(GenericGrpcService): # Mock Service implementing Context, Service and Slice to simplify unitary tests of NBI - def __init__(self, bind_port: Union[str, int]) -> None: - super().__init__(bind_port, LOCAL_HOST, enable_health_servicer=False, cls_name='MockService') + def __init__(self) -> None: + super().__init__( + MOCKSERVICE_PORT, LOCAL_HOST, + enable_health_servicer=False, + cls_name='MockService' + ) # pylint: disable=attribute-defined-outside-init def install_servicers(self): @@ -47,12 +47,28 @@ class MockService_Dependencies(GenericGrpcService): self.slice_servicer = MockServicerImpl_Slice() add_SliceServiceServicer_to_server(self.slice_servicer, self.server) - def configure_env_vars(self): - os.environ[get_env_var_name(SERVICE_CONTEXT, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) - os.environ[get_env_var_name(SERVICE_CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) +TERMINATE = threading.Event() - os.environ[get_env_var_name(SERVICE_SERVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) - os.environ[get_env_var_name(SERVICE_SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) +def signal_handler(signal, frame): # pylint: disable=redefined-outer-name,unused-argument + LOGGER.warning('Terminate signal received') + TERMINATE.set() - os.environ[get_env_var_name(SERVICE_SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) - os.environ[get_env_var_name(SERVICE_SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) +def main(): + LOGGER.info('Starting...') + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + + grpc_service = MockService_Dependencies() + grpc_service.start() + + # Wait for Ctrl+C or termination signal + while not TERMINATE.wait(timeout=1.0): pass + + LOGGER.info('Terminating...') + grpc_service.stop() + + LOGGER.info('Bye') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/nbi/tests/PrepareTestScenario.py b/src/nbi/tests/PrepareTestScenario.py index dd09db1d8..8852aa2c4 100644 --- a/src/nbi/tests/PrepareTestScenario.py +++ b/src/nbi/tests/PrepareTestScenario.py @@ -12,46 +12,88 @@ # See the License for the specific language governing permissions and # limitations under the License. -import enum, logging, os, pytest, requests, time +import enum, logging, os, pytest, requests, subprocess, time from typing import Any, Dict, List, Optional, Set, Union +from socketio import Namespace from common.Constants import ServiceNameEnum from common.Settings import ( - ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_HTTP, - get_env_var_name + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, + ENVVAR_SUFIX_SERVICE_PORT_HTTP, get_env_var_name ) from context.client.ContextClient import ContextClient from nbi.service.NbiApplication import NbiApplication -from nbi.tests.MockService_Dependencies import MockService_Dependencies +from nbi.service.health_probes.Constants import SIO_NAMESPACE as HEARTBEAT_NAMESPACE +from nbi.service.health_probes.Namespaces import HeartbeatServerNamespace from service.client.ServiceClient import ServiceClient from slice.client.SliceClient import SliceClient from tests.tools.mock_osm.MockOSM import MockOSM from .Constants import ( - LOCAL_HOST, MOCKSERVICE_PORT, NBI_SERVICE_BASE_URL, NBI_SERVICE_PORT, USERNAME, PASSWORD + LOCAL_HOST, MOCKSERVICE_PORT, NBI_SERVICE_BASE_URL, NBI_SERVICE_PORT, + USERNAME, PASSWORD ) from .OSM_Constants import WIM_MAPPING from .MockWebServer import MockWebServer -os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) -os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(NBI_SERVICE_PORT) +os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(NBI_SERVICE_PORT) +os.environ[get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) +os.environ[get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) +os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) + @pytest.fixture(scope='session') def mock_service(): - _service = MockService_Dependencies(MOCKSERVICE_PORT) - _service.configure_env_vars() - _service.start() - yield _service - _service.stop() + # NOTE: Starting MockServer in a separate process to prevent + # issues with eventlet monkey-patched libraries. + + cmd = ['python', '-m', 'nbi.tests.MockService_Dependencies'] + custom_env = os.environ.copy() + mock_service_process = subprocess.Popen( + cmd, + env=custom_env, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + stdin=subprocess.DEVNULL, + text=True + ) + + yield True + + # Check if process is still running + if mock_service_process.poll() is None: + mock_service_process.terminate() # Try to terminate gracefully + time.sleep(2) # Give it time to exit + if mock_service_process.poll() is None: + mock_service_process.kill() # Force kill if still running + + # Capture final output after process terminates + stdout, stderr = mock_service_process.communicate() + LOGGER = logging.getLogger('MockService_Dependencies') + if stdout: LOGGER.info('STDOUT:\n{:s}'.format(str(stdout.strip()))) + if stderr: LOGGER.error('STDERR:\n{:s}'.format(str(stderr.strip()))) + LOGGER.info('Terminated') @pytest.fixture(scope='session') def nbi_application( - mock_service : MockService_Dependencies # pylint: disable=redefined-outer-name, unused-argument + mock_service # pylint: disable=redefined-outer-name, unused-argument ) -> NbiApplication: mock_web_server = MockWebServer() mock_web_server.start() time.sleep(1) # bring time for the server to start - yield mock_web_server.nbi_app + + nbi_app = mock_web_server.nbi_app + yield nbi_app + + sio_server = nbi_app.get_socketio_server() + sio_namespaces : Dict[str, Namespace] = sio_server.namespace_handlers + heartbeat_namespace : HeartbeatServerNamespace = sio_namespaces.get(HEARTBEAT_NAMESPACE) + heartbeat_namespace.stop_thread() + mock_web_server.join(timeout=1) @@ -64,7 +106,7 @@ def osm_wim( @pytest.fixture(scope='session') def context_client( - mock_service : MockService_Dependencies # pylint: disable=redefined-outer-name, unused-argument + mock_service # pylint: disable=redefined-outer-name, unused-argument ) -> ContextClient: _client = ContextClient() yield _client @@ -72,7 +114,7 @@ def context_client( @pytest.fixture(scope='session') def service_client( - mock_service : MockService_Dependencies # pylint: disable=redefined-outer-name, unused-argument + mock_service # pylint: disable=redefined-outer-name, unused-argument ) -> ServiceClient: _client = ServiceClient() yield _client @@ -80,7 +122,7 @@ def service_client( @pytest.fixture(scope='session') def slice_client( - mock_service : MockService_Dependencies # pylint: disable=redefined-outer-name, unused-argument + mock_service # pylint: disable=redefined-outer-name, unused-argument ) -> SliceClient: _client = SliceClient() yield _client diff --git a/src/nbi/tests/test_core.py b/src/nbi/tests/test_core.py index 80a3d4b10..f41c26f5d 100644 --- a/src/nbi/tests/test_core.py +++ b/src/nbi/tests/test_core.py @@ -47,7 +47,7 @@ def test_websocket_get_heartbeat( heartbeat_client_namespace = HeartbeatClientNamespace() - sio = socketio.Client(logger=True) + sio = socketio.Client(logger=True, engineio_logger=True) sio.register_namespace(heartbeat_client_namespace) sio.connect(NBI_SERVICE_BASE_URL) #sio.send('Hello WebSocket!', namespace='/heartbeat') -- GitLab From f154b297e8fe87abce766c31b798f6be78bdfdbf Mon Sep 17 00:00:00 2001 From: hajipour Date: Sun, 9 Feb 2025 18:16:42 +0100 Subject: [PATCH 257/463] enhancement: list of slice endpoints retrieved in webui depended on config rules. If the slice is related to CAMARA OFC25, retrieve the list of endpoints based on SDPs, otherwise, return the slice object's list of endpoints. --- src/webui/service/slice/routes.py | 72 +++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 4 deletions(-) diff --git a/src/webui/service/slice/routes.py b/src/webui/service/slice/routes.py index 922f8af96..11ed8dad7 100644 --- a/src/webui/service/slice/routes.py +++ b/src/webui/service/slice/routes.py @@ -14,10 +14,11 @@ import grpc from flask import current_app, redirect, render_template, Blueprint, flash, session, url_for -from common.proto.context_pb2 import IsolationLevelEnum, Slice, SliceId, SliceStatusEnum +from common.proto.context_pb2 import IsolationLevelEnum, Slice, SliceId, SliceStatusEnum, EndPointId from common.tools.context_queries.Context import get_context from common.tools.context_queries.EndPoint import get_endpoint_names from common.tools.context_queries.Slice import get_slice_by_uuid +from common.Constants import DEFAULT_CONTEXT_NAME from context.client.ContextClient import ContextClient from slice.client.SliceClient import SliceClient @@ -26,6 +27,67 @@ slice = Blueprint('slice', __name__, url_prefix='/slice') context_client = ContextClient() slice_client = SliceClient() + +RUNNING_RESOURCE_KEY = "running_ietf_slice" +CANDIDATE_RESOURCE_KEY = "candidate_ietf_slice" + + +class ConfigRuleNotFoundError(Exception): + ... + +def get_custom_config_rule( + service_config: ServiceConfig, resource_key: str +) -> Optional[ConfigRule]: + """ + Retrieve the custom config rule with the given resource_key from a ServiceConfig. + """ + for cr in service_config.config_rules: + if ( + cr.WhichOneof("config_rule") == "custom" + and cr.custom.resource_key == resource_key + ): + return cr + return None + + +def get_ietf_data_from_config(slice_request: Slice, resource_key: str) -> Dict: + """ + Retrieve the IETF data (as a Python dict) from a slice's config rule for the specified resource_key. + Raises an exception if not found. + """ + config_rule = get_custom_config_rule(slice_request.slice_config, resource_key) + if not config_rule: + raise ConfigRuleNotFoundError(f"IETF data not found for resource_key: {resource_key}") + return json.loads(config_rule.custom.resource_value) + + +def get_slice_endpoints(slice_obj: Slice) -> list[EndPointId]: + ''' + Get the list of endpoint ids for a slice. + If the slice has a `running_ietf_slice` config rule, return the list of endpoint ids from the config rule, + otherwise return the slice's list of endpoint ids. + ''' + try: + running_ietf_data = get_ietf_data_from_config(slice_obj, RUNNING_RESOURCE_KEY) + slice_service = running_ietf_data["network-slice-services"]["slice-service"][0] + slice_sdps = slice_service["sdps"]["sdp"] + list_endpoint_ids = [] + for sdp in slice_sdps: + endpoint = EndPointId() + endpoint.topology_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + device_uuid = sdp["node-id"] + endpoint.device_id.device_uuid.uuid = device_uuid + attachment_circuits = sdp["attachment-circuits"]["attachment-circuit"] + endpoint_uuid = attachment_circuits[0]["ac-tp-id"] + endpoint.endpoint_uuid.uuid = endpoint_uuid + list_endpoint_ids.append(endpoint) + + except ConfigRuleNotFoundError: + # The slice does not have `running_ietf_slice` config rule, return slice's list of endpoint ids + list_endpoint_ids = slice_obj.slice_endpoint_ids + + return list_endpoint_ids + @slice.get('/') def home(): if 'context_uuid' not in session or 'topology_uuid' not in session: @@ -50,7 +112,8 @@ def home(): else: endpoint_ids = list() for slice_ in slices: - endpoint_ids.extend(slice_.slice_endpoint_ids) + slice_endpoint_ids = get_slice_endpoints(slice_) + endpoint_ids.extend(slice_endpoint_ids) device_names, endpoints_data = get_endpoint_names(context_client, endpoint_ids) context_client.close() @@ -81,7 +144,8 @@ def detail(slice_uuid: str): flash('Context({:s})/Slice({:s}) not found'.format(str(context_uuid), str(slice_uuid)), 'danger') slice_obj = Slice() else: - device_names, endpoints_data = get_endpoint_names(context_client, slice_obj.slice_endpoint_ids) + slice_endpoint_ids = get_slice_endpoints(slice_obj) + device_names, endpoints_data = get_endpoint_names(context_client, slice_endpoint_ids) context_client.close() @@ -111,5 +175,5 @@ def delete(slice_uuid: str): flash('Slice "{:s}" deleted successfully!'.format(slice_uuid), 'success') except Exception as e: flash('Problem deleting slice "{:s}": {:s}'.format(slice_uuid, str(e.details())), 'danger') - current_app.logger.exception(e) + current_app.logger.exception(e) return redirect(url_for('slice.home')) -- GitLab From 38f0e5aa39ebb85c682bf4fec046bc74c0458b60 Mon Sep 17 00:00:00 2001 From: hajipour Date: Sun, 9 Feb 2025 18:34:31 +0100 Subject: [PATCH 258/463] debug: - missing imports added to slice webui router - service names changed to slice --- src/webui/service/slice/routes.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/webui/service/slice/routes.py b/src/webui/service/slice/routes.py index 11ed8dad7..dd23e6469 100644 --- a/src/webui/service/slice/routes.py +++ b/src/webui/service/slice/routes.py @@ -12,9 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +import json +from typing import Dict, Optional import grpc from flask import current_app, redirect, render_template, Blueprint, flash, session, url_for -from common.proto.context_pb2 import IsolationLevelEnum, Slice, SliceId, SliceStatusEnum, EndPointId +from common.proto.context_pb2 import IsolationLevelEnum, Slice, SliceId, SliceStatusEnum, EndPointId, SliceConfig, ConfigRule from common.tools.context_queries.Context import get_context from common.tools.context_queries.EndPoint import get_endpoint_names from common.tools.context_queries.Slice import get_slice_by_uuid @@ -36,12 +38,12 @@ class ConfigRuleNotFoundError(Exception): ... def get_custom_config_rule( - service_config: ServiceConfig, resource_key: str + slice_config: SliceConfig, resource_key: str ) -> Optional[ConfigRule]: """ Retrieve the custom config rule with the given resource_key from a ServiceConfig. """ - for cr in service_config.config_rules: + for cr in slice_config.config_rules: if ( cr.WhichOneof("config_rule") == "custom" and cr.custom.resource_key == resource_key -- GitLab From 71b7936a8ca53a69635323d9c4ab8a7a23831bfe Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 10 Feb 2025 10:32:19 +0100 Subject: [PATCH 259/463] debug: - mutliple endpoint list shown in webui of OFC25 CAMARA demo --- src/webui/service/slice/routes.py | 38 +++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/src/webui/service/slice/routes.py b/src/webui/service/slice/routes.py index dd23e6469..f56c50f46 100644 --- a/src/webui/service/slice/routes.py +++ b/src/webui/service/slice/routes.py @@ -13,13 +13,14 @@ # limitations under the License. import json -from typing import Dict, Optional +from typing import Dict, Optional, Tuple import grpc from flask import current_app, redirect, render_template, Blueprint, flash, session, url_for +from common.method_wrappers.ServiceExceptions import InvalidArgumentsException from common.proto.context_pb2 import IsolationLevelEnum, Slice, SliceId, SliceStatusEnum, EndPointId, SliceConfig, ConfigRule from common.tools.context_queries.Context import get_context from common.tools.context_queries.EndPoint import get_endpoint_names -from common.tools.context_queries.Slice import get_slice_by_uuid +from common.tools.context_queries.Slice import get_slice_by_uuid, get_uuid_from_string from common.Constants import DEFAULT_CONTEXT_NAME from context.client.ContextClient import ContextClient from slice.client.SliceClient import SliceClient @@ -63,6 +64,25 @@ def get_ietf_data_from_config(slice_request: Slice, resource_key: str) -> Dict: return json.loads(config_rule.custom.resource_value) +def endpoint_get_uuid( + endpoint_id : EndPointId, endpoint_name : str = '', allow_random : bool = False +) -> Tuple[str, str, str]: + device_uuid = endpoint_id.device_id.device_uuid.uuid + topology_uuid = endpoint_id.topology_id.topology_uuid.uuid + raw_endpoint_uuid = endpoint_id.endpoint_uuid.uuid + + if len(raw_endpoint_uuid) > 0: + prefix_for_name = '{:s}/{:s}'.format(topology_uuid, device_uuid) + return topology_uuid, device_uuid, get_uuid_from_string(raw_endpoint_uuid, prefix_for_name=prefix_for_name) + if len(endpoint_name) > 0: + prefix_for_name = '{:s}/{:s}'.format(topology_uuid, device_uuid) + return topology_uuid, device_uuid, get_uuid_from_string(endpoint_name, prefix_for_name=prefix_for_name) + + raise InvalidArgumentsException([ + ('endpoint_id.endpoint_uuid.uuid', raw_endpoint_uuid), + ('name', endpoint_name), + ], extra_details=['At least one is required to produce a EndPoint UUID']) + def get_slice_endpoints(slice_obj: Slice) -> list[EndPointId]: ''' Get the list of endpoint ids for a slice. @@ -70,19 +90,27 @@ def get_slice_endpoints(slice_obj: Slice) -> list[EndPointId]: otherwise return the slice's list of endpoint ids. ''' try: + first_slice_endpoint_id = slice_obj.slice_endpoint_ids[0] + topology_uuid = first_slice_endpoint_id.topology_id.topology_uuid.uuid + context_uuid = slice_obj.slice_id.context_id.context_uuid.uuid running_ietf_data = get_ietf_data_from_config(slice_obj, RUNNING_RESOURCE_KEY) slice_service = running_ietf_data["network-slice-services"]["slice-service"][0] slice_sdps = slice_service["sdps"]["sdp"] list_endpoint_ids = [] for sdp in slice_sdps: endpoint = EndPointId() - endpoint.topology_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME - device_uuid = sdp["node-id"] + endpoint.topology_id.context_id.context_uuid.uuid = context_uuid + endpoint.topology_id.topology_uuid.uuid = topology_uuid + device_uuid = get_uuid_from_string(sdp["node-id"]) endpoint.device_id.device_uuid.uuid = device_uuid attachment_circuits = sdp["attachment-circuits"]["attachment-circuit"] - endpoint_uuid = attachment_circuits[0]["ac-tp-id"] + endpoint_name = attachment_circuits[0]["ac-tp-id"] + endpoint.endpoint_uuid.uuid = endpoint_name + _, _, endpoint_uuid = endpoint_get_uuid(endpoint) endpoint.endpoint_uuid.uuid = endpoint_uuid list_endpoint_ids.append(endpoint) + del slice_obj.slice_endpoint_ids[:] + slice_obj.slice_endpoint_ids.extend(list_endpoint_ids) except ConfigRuleNotFoundError: # The slice does not have `running_ietf_slice` config rule, return slice's list of endpoint ids -- GitLab From 8dd17fe3fd848052815109f6535a6ad19c49897a Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Wed, 12 Feb 2025 07:53:30 +0000 Subject: [PATCH 260/463] Minor bug fixes and code formating --- src/common/tools/descriptor/Tools.py | 2 ++ src/nbi/tests/test_tfs_api.py | 1 + 2 files changed, 3 insertions(+) diff --git a/src/common/tools/descriptor/Tools.py b/src/common/tools/descriptor/Tools.py index 2ecd38ae1..a6e39e95d 100644 --- a/src/common/tools/descriptor/Tools.py +++ b/src/common/tools/descriptor/Tools.py @@ -22,6 +22,7 @@ def get_descriptors_add_contexts(contexts : List[Dict]) -> List[Dict]: for context in contexts_add: context['topology_ids'] = [] context['service_ids'] = [] + context['slice_ids'] = [] return contexts_add def get_descriptors_add_topologies(topologies : List[Dict]) -> List[Dict]: @@ -29,6 +30,7 @@ def get_descriptors_add_topologies(topologies : List[Dict]) -> List[Dict]: for topology in topologies_add: topology['device_ids'] = [] topology['link_ids'] = [] + topology['optical_link_ids'] = [] return topologies_add def get_descriptors_add_services(services : List[Dict]) -> List[Dict]: diff --git a/src/nbi/tests/test_tfs_api.py b/src/nbi/tests/test_tfs_api.py index 77eb7fadb..d8009530f 100644 --- a/src/nbi/tests/test_tfs_api.py +++ b/src/nbi/tests/test_tfs_api.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + # Enable eventlet for async networking # NOTE: monkey_patch needs to be executed before importing any other module. import eventlet -- GitLab From 324cd085bbac39a18f09a379fd626117dc31fd06 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Feb 2025 09:47:25 +0000 Subject: [PATCH 261/463] NBI component: - Added mock service dependency log file generation - Added mock service dependency log file as CI/CD pipeline artifact --- src/nbi/.gitlab-ci.yml | 2 ++ src/nbi/tests/MockService_Dependencies.py | 13 +++++++-- src/nbi/tests/PrepareTestScenario.py | 34 ++++++++++++++++------- 3 files changed, 37 insertions(+), 12 deletions(-) diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 10e695d11..51f80581d 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -99,6 +99,8 @@ unit_test nbi: when: always reports: junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report_*.xml + paths: + - src/$IMAGE_NAME/tests/mock_service_dependencies.log ## Deployment of the service in Kubernetes Cluster #deploy nbi: diff --git a/src/nbi/tests/MockService_Dependencies.py b/src/nbi/tests/MockService_Dependencies.py index 8535fd56d..e3515afac 100644 --- a/src/nbi/tests/MockService_Dependencies.py +++ b/src/nbi/tests/MockService_Dependencies.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, signal, sys, threading +import logging, os, signal, sys, threading from common.proto.context_pb2_grpc import add_ContextServiceServicer_to_server from common.proto.service_pb2_grpc import add_ServiceServiceServicer_to_server from common.proto.slice_pb2_grpc import add_SliceServiceServicer_to_server @@ -23,7 +23,16 @@ from common.tools.service.GenericGrpcService import GenericGrpcService from .Constants import LOCAL_HOST, MOCKSERVICE_PORT -logging.basicConfig(level=logging.DEBUG, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") +if 'GITLAB_CI' in os.environ: + log_path = '/opt/results/mock_service_dependencies.log' +else: + log_path = 'mock_service_dependencies.log' + +logging.basicConfig( + level=logging.DEBUG, + format='[%(asctime)s] %(levelname)s:%(name)s:%(message)s', + filename=log_path, +) LOGGER = logging.getLogger(__name__) class MockService_Dependencies(GenericGrpcService): diff --git a/src/nbi/tests/PrepareTestScenario.py b/src/nbi/tests/PrepareTestScenario.py index 8852aa2c4..ae3c2a5b6 100644 --- a/src/nbi/tests/PrepareTestScenario.py +++ b/src/nbi/tests/PrepareTestScenario.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import enum, logging, os, pytest, requests, subprocess, time +import enum, logging, os, pytest, requests, subprocess, threading, time from typing import Any, Dict, List, Optional, Set, Union from socketio import Namespace from common.Constants import ServiceNameEnum @@ -56,11 +56,29 @@ def mock_service(): cmd, env=custom_env, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + stderr=subprocess.STDOUT, stdin=subprocess.DEVNULL, - text=True + text=True, + bufsize=1 ) + mock_service_logger = logging.getLogger('MockService_Dependencies') + mock_service_logger.info('Started') + + def stream_stdout(): + for line in iter(mock_service_process.stdout.readline, ''): + mock_service_logger.info(line.strip()) + + def stream_stderr(): + for line in iter(mock_service_process.stderr.readline, ''): + mock_service_logger.error(line.strip()) + + stream_stdout_thread = threading.Thread(target=stream_stdout, daemon=True) + stream_stdout_thread.start() + + stream_stderr_thread = threading.Thread(target=stream_stderr, daemon=True) + stream_stderr_thread.start() + yield True # Check if process is still running @@ -70,13 +88,9 @@ def mock_service(): if mock_service_process.poll() is None: mock_service_process.kill() # Force kill if still running - # Capture final output after process terminates - stdout, stderr = mock_service_process.communicate() - LOGGER = logging.getLogger('MockService_Dependencies') - if stdout: LOGGER.info('STDOUT:\n{:s}'.format(str(stdout.strip()))) - if stderr: LOGGER.error('STDERR:\n{:s}'.format(str(stderr.strip()))) - LOGGER.info('Terminated') - + mock_service_logger.info('Terminated') + stream_stdout_thread.join() + stream_stderr_thread.join() @pytest.fixture(scope='session') def nbi_application( -- GitLab From 26c5c7da12f2b978dc84e84b9ed72b3b2cc8fdc0 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Feb 2025 09:50:22 +0000 Subject: [PATCH 262/463] Disabled Gitlab CI/CD integration tests --- .gitlab-ci.yml | 6 +++--- src/tests/.gitlab-ci.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b3c19dbab..2588fb513 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,6 +54,6 @@ include: # - local: '/src/qos_profile/.gitlab-ci.yml' # - local: '/src/vnt_manager/.gitlab-ci.yml' # - local: '/src/e2e_orchestrator/.gitlab-ci.yml' - - # This should be last one: end-to-end integration tests - - local: '/src/tests/.gitlab-ci.yml' +# +# # This should be last one: end-to-end integration tests +# - local: '/src/tests/.gitlab-ci.yml' diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index 41b855416..ec8ab77d9 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -14,11 +14,11 @@ # include the individual .gitlab-ci.yml of each end-to-end integration test include: - - local: '/src/tests/ofc22/.gitlab-ci.yml' +# - local: '/src/tests/ofc22/.gitlab-ci.yml' # #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' # - local: '/src/tests/ecoc22/.gitlab-ci.yml' # #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' # #- local: '/src/tests/ofc23/.gitlab-ci.yml' # - local: '/src/tests/ofc24/.gitlab-ci.yml' - - local: '/src/tests/eucnc24/.gitlab-ci.yml' +# - local: '/src/tests/eucnc24/.gitlab-ci.yml' # - local: '/src/tests/ecoc24/.gitlab-ci.yml' -- GitLab From 9a698003e89d5f10e8a87fa3c2cfe0836a446120 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Feb 2025 10:11:19 +0000 Subject: [PATCH 263/463] NBI component: - Corrected stderr processing of mock service dependency subprocess --- src/nbi/tests/PrepareTestScenario.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/nbi/tests/PrepareTestScenario.py b/src/nbi/tests/PrepareTestScenario.py index ae3c2a5b6..5c4c39d5d 100644 --- a/src/nbi/tests/PrepareTestScenario.py +++ b/src/nbi/tests/PrepareTestScenario.py @@ -69,16 +69,9 @@ def mock_service(): for line in iter(mock_service_process.stdout.readline, ''): mock_service_logger.info(line.strip()) - def stream_stderr(): - for line in iter(mock_service_process.stderr.readline, ''): - mock_service_logger.error(line.strip()) - stream_stdout_thread = threading.Thread(target=stream_stdout, daemon=True) stream_stdout_thread.start() - stream_stderr_thread = threading.Thread(target=stream_stderr, daemon=True) - stream_stderr_thread.start() - yield True # Check if process is still running @@ -90,7 +83,6 @@ def mock_service(): mock_service_logger.info('Terminated') stream_stdout_thread.join() - stream_stderr_thread.join() @pytest.fixture(scope='session') def nbi_application( -- GitLab From c21f87ea1d110bec2e3ffd77d09de82041b45ba6 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Feb 2025 10:16:45 +0000 Subject: [PATCH 264/463] NBI component: - Fixed CI/CD pipeline --- src/nbi/.gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 51f80581d..4f5b4d885 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -79,6 +79,8 @@ unit_test nbi: - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" + - ls -la $PWD/src/$IMAGE_NAME/tests + - cat $PWD/src/$IMAGE_NAME/tests/mock_service_dependencies.log coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: - docker rm -f $IMAGE_NAME -- GitLab From 274c3cdb29bd023be331d8fc685d28a9c4906067 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Feb 2025 10:34:18 +0000 Subject: [PATCH 265/463] NBI component: - Fixing CI/CD pipeline --- src/nbi/tests/MockService_Dependencies.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nbi/tests/MockService_Dependencies.py b/src/nbi/tests/MockService_Dependencies.py index e3515afac..9f7a4f9ae 100644 --- a/src/nbi/tests/MockService_Dependencies.py +++ b/src/nbi/tests/MockService_Dependencies.py @@ -31,9 +31,12 @@ else: logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s] %(levelname)s:%(name)s:%(message)s', - filename=log_path, + #filename=log_path, ) LOGGER = logging.getLogger(__name__) +LOGGER.warning('environ={:s}'.format(str(os.environ))) +LOGGER.warning('GITLAB_CI={:s}'.format(str(os.environ.get('GITLAB_CI')))) +LOGGER.warning('log_path={:s}'.format(str(log_path))) class MockService_Dependencies(GenericGrpcService): # Mock Service implementing Context, Service and Slice to simplify unitary tests of NBI -- GitLab From 536786b542ee3e1d29cc54691d506e019bae8a7e Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Feb 2025 10:43:29 +0000 Subject: [PATCH 266/463] NBI component: - Fixing CI/CD pipeline --- src/nbi/.gitlab-ci.yml | 4 ---- src/nbi/tests/MockService_Dependencies.py | 11 +---------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 4f5b4d885..10e695d11 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -79,8 +79,6 @@ unit_test nbi: - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" - - ls -la $PWD/src/$IMAGE_NAME/tests - - cat $PWD/src/$IMAGE_NAME/tests/mock_service_dependencies.log coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: - docker rm -f $IMAGE_NAME @@ -101,8 +99,6 @@ unit_test nbi: when: always reports: junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report_*.xml - paths: - - src/$IMAGE_NAME/tests/mock_service_dependencies.log ## Deployment of the service in Kubernetes Cluster #deploy nbi: diff --git a/src/nbi/tests/MockService_Dependencies.py b/src/nbi/tests/MockService_Dependencies.py index 9f7a4f9ae..69a8a0b24 100644 --- a/src/nbi/tests/MockService_Dependencies.py +++ b/src/nbi/tests/MockService_Dependencies.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, os, signal, sys, threading +import logging, signal, sys, threading from common.proto.context_pb2_grpc import add_ContextServiceServicer_to_server from common.proto.service_pb2_grpc import add_ServiceServiceServicer_to_server from common.proto.slice_pb2_grpc import add_SliceServiceServicer_to_server @@ -23,20 +23,11 @@ from common.tools.service.GenericGrpcService import GenericGrpcService from .Constants import LOCAL_HOST, MOCKSERVICE_PORT -if 'GITLAB_CI' in os.environ: - log_path = '/opt/results/mock_service_dependencies.log' -else: - log_path = 'mock_service_dependencies.log' - logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s] %(levelname)s:%(name)s:%(message)s', - #filename=log_path, ) LOGGER = logging.getLogger(__name__) -LOGGER.warning('environ={:s}'.format(str(os.environ))) -LOGGER.warning('GITLAB_CI={:s}'.format(str(os.environ.get('GITLAB_CI')))) -LOGGER.warning('log_path={:s}'.format(str(log_path))) class MockService_Dependencies(GenericGrpcService): # Mock Service implementing Context, Service and Slice to simplify unitary tests of NBI -- GitLab From 655d6a0f5334c14a4d86859dc8c9ac2083522494 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Feb 2025 12:10:35 +0000 Subject: [PATCH 267/463] Common > tests > InMem Obj DB: - Reduce log messages --- src/common/tests/InMemoryObjectDatabase.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/common/tests/InMemoryObjectDatabase.py b/src/common/tests/InMemoryObjectDatabase.py index 072867147..b3f649e05 100644 --- a/src/common/tests/InMemoryObjectDatabase.py +++ b/src/common/tests/InMemoryObjectDatabase.py @@ -12,10 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import grpc, logging +import grpc #, logging from typing import Any, Dict, List, Set -LOGGER = logging.getLogger(__name__) +#LOGGER = logging.getLogger(__name__) class InMemoryObjectDatabase: def __init__(self) -> None: @@ -29,12 +29,12 @@ class InMemoryObjectDatabase: return [container[entry_uuid] for entry_uuid in sorted(container.keys())] def has_entry(self, container_name : str, entry_uuid : str) -> Any: - LOGGER.debug('[has_entry] BEFORE database={:s}'.format(str(self._database))) + #LOGGER.debug('[has_entry] BEFORE database={:s}'.format(str(self._database))) container = self._get_container(container_name) return entry_uuid in container def get_entry(self, container_name : str, entry_uuid : str, context : grpc.ServicerContext) -> Any: - LOGGER.debug('[get_entry] BEFORE database={:s}'.format(str(self._database))) + #LOGGER.debug('[get_entry] BEFORE database={:s}'.format(str(self._database))) container = self._get_container(container_name) if entry_uuid not in container: MSG = '{:s}({:s}) not found; available({:s})' @@ -44,18 +44,18 @@ class InMemoryObjectDatabase: def set_entry(self, container_name : str, entry_uuid : str, entry : Any) -> Any: container = self._get_container(container_name) - LOGGER.debug('[set_entry] BEFORE database={:s}'.format(str(self._database))) + #LOGGER.debug('[set_entry] BEFORE database={:s}'.format(str(self._database))) container[entry_uuid] = entry - LOGGER.debug('[set_entry] AFTER database={:s}'.format(str(self._database))) + #LOGGER.debug('[set_entry] AFTER database={:s}'.format(str(self._database))) return entry def del_entry(self, container_name : str, entry_uuid : str, context : grpc.ServicerContext) -> None: container = self._get_container(container_name) - LOGGER.debug('[del_entry] BEFORE database={:s}'.format(str(self._database))) + #LOGGER.debug('[del_entry] BEFORE database={:s}'.format(str(self._database))) if entry_uuid not in container: context.abort(grpc.StatusCode.NOT_FOUND, str('{:s}({:s}) not found'.format(container_name, entry_uuid))) del container[entry_uuid] - LOGGER.debug('[del_entry] AFTER database={:s}'.format(str(self._database))) + #LOGGER.debug('[del_entry] AFTER database={:s}'.format(str(self._database))) def select_entries(self, container_name : str, entry_uuids : Set[str]) -> List[Any]: if len(entry_uuids) == 0: return self.get_entries(container_name) -- GitLab From 4e42a364de790091115c8e499ce1bc99a2fc53dc Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Feb 2025 14:11:50 +0000 Subject: [PATCH 268/463] NBI component: - Fixing CI/CD pipeline --- src/nbi/.gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 10e695d11..2c1057f95 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -72,12 +72,19 @@ unit_test nbi: - sleep 5 - docker ps -a - docker logs $IMAGE_NAME + - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml" + - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" + - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" + - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" + - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" + - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" + - date - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: -- GitLab From 56089f19701eaad593aa573c88ec33e691993890 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Sat, 15 Feb 2025 14:34:46 +0000 Subject: [PATCH 269/463] Changes in Kpi_value_api and added new monitoring namespace - Added Prometheus monitoring deployment and update test configurations - Updated KPI VALUE API (writer and promWriter) --- deploy/all.sh | 3 ++ deploy/monitoring.sh | 53 +++++++++++++++++++ manifests/kpi_value_writerservice.yaml | 2 + manifests/prometheus/prometheus.yaml | 52 ++++++++++++++++++ scripts/run_tests_locally-kpi-value-writer.sh | 1 + .../run_tests_locally-telemetry-backend.sh | 2 +- .../run_tests_locally-telemetry-frontend.sh | 5 +- src/common/tools/client/RetryDecorator.py | 2 +- src/kpi_manager/tests/test_messages.py | 2 +- .../service/KpiValueWriter.py | 35 ++++-------- .../service/MetricWriterToPrometheus.py | 42 +++++++++------ src/kpi_value_writer/service/__main__.py | 3 -- .../tests/test_kpi_value_writer.py | 39 ++++++++++++-- src/kpi_value_writer/tests/test_messages.py | 3 +- 14 files changed, 190 insertions(+), 54 deletions(-) create mode 100644 deploy/monitoring.sh create mode 100644 manifests/prometheus/prometheus.yaml diff --git a/deploy/all.sh b/deploy/all.sh index 97f4db37d..f3075949e 100755 --- a/deploy/all.sh +++ b/deploy/all.sh @@ -215,6 +215,9 @@ export GRAF_EXT_PORT_HTTP=${GRAF_EXT_PORT_HTTP:-"3000"} # Deploy Apache Kafka ./deploy/kafka.sh +#Deploy Monitoring (Prometheus, Mimir, Grafana) +./deploy/monitoring.sh + # Expose Dashboard ./deploy/expose_dashboard.sh diff --git a/deploy/monitoring.sh b/deploy/monitoring.sh new file mode 100644 index 000000000..18992501a --- /dev/null +++ b/deploy/monitoring.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +RELEASE_NAME="mon-prometheus" +NAMESPACE="monitoring" +CHART_REPO_NAME="prometheus-community" +CHART_REPO_URL="https://prometheus-community.github.io/helm-charts" +CHART_NAME="prometheus" # Chart name within the repo +VALUES_FILE="manifests/prometheus/prometheus.yaml" + +echo ">>> Deploying Prometheus with the following configuration:" +echo "Adding/updating Helm repo: $CHART_REPO_NAME -> $CHART_REPO_URL" +helm repo add "$CHART_REPO_NAME" "$CHART_REPO_URL" || true +helm repo update + +echo "Creating namespace '$NAMESPACE' if it doesn't exist..." +kubectl get namespace "$NAMESPACE" >/dev/null 2>&1 || kubectl create namespace "$NAMESPACE" + +#------------------------------------------------------------------------------ +# 3. Install or upgrade the Prometheus chart +# - If 'VALUES_FILE' is set, it will use it for custom configuration. +# - Otherwise, it will deploy with the chart defaults. +#------------------------------------------------------------------------------ +if [ -n "$VALUES_FILE" ] && [ -f "$VALUES_FILE" ]; then + echo "Installing/Upgrading Prometheus with custom values from $VALUES_FILE..." + helm upgrade --install "$RELEASE_NAME" "$CHART_REPO_NAME/$CHART_NAME" \ + --namespace "$NAMESPACE" \ + --values "$VALUES_FILE" +else + echo "Installing/Upgrading Prometheus with default chart values..." + helm upgrade --install "$RELEASE_NAME" "$CHART_REPO_NAME/$CHART_NAME" \ + --namespace "$NAMESPACE" +fi + +echo "Waiting for Prometheus pods to be ready..." +kubectl rollout status deployment/"$RELEASE_NAME"-server -n "$NAMESPACE" || true + +# echo "Listing deployed resources in namespace '$NAMESPACE':" +# kubectl get all -n "$NAMESPACE" + +echo "<<< Prometheus deployment completed successfully!" diff --git a/manifests/kpi_value_writerservice.yaml b/manifests/kpi_value_writerservice.yaml index f98be4629..27c61c933 100644 --- a/manifests/kpi_value_writerservice.yaml +++ b/manifests/kpi_value_writerservice.yaml @@ -39,6 +39,8 @@ spec: env: - name: LOG_LEVEL value: "INFO" + - name: PUSHGATEWAY_URL + value: "http://mon-prometheus-prometheus-pushgateway.monitoring.svc.cluster.local:9091" envFrom: - secretRef: name: kfk-kpi-data diff --git a/manifests/prometheus/prometheus.yaml b/manifests/prometheus/prometheus.yaml new file mode 100644 index 000000000..fabc97c4a --- /dev/null +++ b/manifests/prometheus/prometheus.yaml @@ -0,0 +1,52 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Configuration for Prometheus components and server settings +# Global Prometheus configuration +alertmanager: + enabled: false # Default is true +kube-state-metrics: + enabled: false # Default is true +prometheus-node-exporter: + enabled: false # Default is true +prometheus-pushgateway: + enabled: true # Default is true + +# Prometheus server-specific configuration +server: + retention: "30d" + logLevel: "debug" + resources: + requests: + cpu: "250m" + memory: "256Mi" + limits: + cpu: "1" + memory: "1Gi" + + # Expose the Prometheus server via a Kubernetes service + service: + type: NodePort + nodePort: 30090 + + extraScrapeConfigs: + - job_name: 'pushgateway' + static_configs: + - targets: + - 'prometheus-pushgateway.monitoring.svc.cluster.local:9091' # Push Gateway endpoint + + # Global Prometheus settings: + global: + scrape_interval: 10s + evaluation_interval: 10s diff --git a/scripts/run_tests_locally-kpi-value-writer.sh b/scripts/run_tests_locally-kpi-value-writer.sh index cbeed3b78..e3d9c7c6a 100755 --- a/scripts/run_tests_locally-kpi-value-writer.sh +++ b/scripts/run_tests_locally-kpi-value-writer.sh @@ -19,6 +19,7 @@ PROJECTDIR=`pwd` cd $PROJECTDIR/src export KFK_SERVER_ADDRESS='127.0.0.1:9092' + RCFILE=$PROJECTDIR/coverage/.coveragerc python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG --verbose \ kpi_value_writer/tests/test_kpi_value_writer.py diff --git a/scripts/run_tests_locally-telemetry-backend.sh b/scripts/run_tests_locally-telemetry-backend.sh index f648a6252..1b4915d74 100755 --- a/scripts/run_tests_locally-telemetry-backend.sh +++ b/scripts/run_tests_locally-telemetry-backend.sh @@ -25,5 +25,5 @@ export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_telemetr RCFILE=$PROJECTDIR/coverage/.coveragerc -python3 -m pytest --log-level=debug --log-cli-level=debug --verbose \ +python3 -m pytest --log-level=INFO --log-cli-level=INFO --verbose \ telemetry/backend/tests/test_backend.py diff --git a/scripts/run_tests_locally-telemetry-frontend.sh b/scripts/run_tests_locally-telemetry-frontend.sh index 38822330e..e70818377 100755 --- a/scripts/run_tests_locally-telemetry-frontend.sh +++ b/scripts/run_tests_locally-telemetry-frontend.sh @@ -18,10 +18,11 @@ PROJECTDIR=`pwd` cd $PROJECTDIR/src -# python3 kpi_manager/tests/test_unitary.py export KFK_SERVER_ADDRESS='127.0.0.1:9092' CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}') + export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_telemetry?sslmode=require" RCFILE=$PROJECTDIR/coverage/.coveragerc -python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG --verbose \ + +python3 -m pytest --log-level=INFO --log-cli-level=INFO --verbose \ telemetry/frontend/tests/test_frontend.py diff --git a/src/common/tools/client/RetryDecorator.py b/src/common/tools/client/RetryDecorator.py index 4750ff73a..efc8b5234 100644 --- a/src/common/tools/client/RetryDecorator.py +++ b/src/common/tools/client/RetryDecorator.py @@ -56,7 +56,7 @@ def delay_linear(initial=0, increment=0, maximum=None): return delay return compute -def delay_exponential(initial=1, increment=1, maximum=None): +def delay_exponential(initial=1.0, increment=1.0, maximum=None): def compute(num_try): delay = initial * pow(increment, (num_try - 1)) if maximum is not None: diff --git a/src/kpi_manager/tests/test_messages.py b/src/kpi_manager/tests/test_messages.py index 5f55c2cfc..ebe13b661 100644 --- a/src/kpi_manager/tests/test_messages.py +++ b/src/kpi_manager/tests/test_messages.py @@ -77,4 +77,4 @@ def create_kpi_filter_request(): _create_kpi_filter_request.connection_id.append(connection_id_obj) _create_kpi_filter_request.link_id.append(link_id_obj) - return _create_kpi_filter_request \ No newline at end of file + return _create_kpi_filter_request diff --git a/src/kpi_value_writer/service/KpiValueWriter.py b/src/kpi_value_writer/service/KpiValueWriter.py index 0bc95355e..25b8ca2e8 100644 --- a/src/kpi_value_writer/service/KpiValueWriter.py +++ b/src/kpi_value_writer/service/KpiValueWriter.py @@ -15,25 +15,21 @@ import json import logging import threading + +from confluent_kafka import KafkaError +from confluent_kafka import Consumer as KafkaConsumer + from common.tools.kafka.Variables import KafkaConfig, KafkaTopic -from common.proto.kpi_value_api_pb2 import KpiValue from common.proto.kpi_manager_pb2 import KpiDescriptor, KpiId from common.Settings import get_service_port_grpc from common.Constants import ServiceNameEnum from common.tools.service.GenericGrpcService import GenericGrpcService - -from confluent_kafka import KafkaError -from confluent_kafka import Consumer as KafkaConsumer - from kpi_manager.client.KpiManagerClient import KpiManagerClient -# -- test import -- -# from kpi_value_writer.tests.test_messages import create_kpi_descriptor_request from .MetricWriterToPrometheus import MetricWriterToPrometheus -LOGGER = logging.getLogger(__name__) -ACTIVE_CONSUMERS = [] +LOGGER = logging.getLogger(__name__) class KpiValueWriter(GenericGrpcService): def __init__(self, cls_name : str = __name__) -> None: @@ -43,9 +39,8 @@ class KpiValueWriter(GenericGrpcService): 'group.id' : 'KpiValueWriter', 'auto.offset.reset' : 'latest'}) - def RunKafkaConsumer(self): + def install_servicers(self): thread = threading.Thread(target=self.KafkaKpiConsumer, args=()) - ACTIVE_CONSUMERS.append(thread) thread.start() def KafkaKpiConsumer(self): @@ -55,7 +50,6 @@ class KpiValueWriter(GenericGrpcService): consumer = self.kafka_consumer consumer.subscribe([KafkaTopic.VALUE.value]) LOGGER.debug("Kafka Consumer start listenng on topic: {:}".format(KafkaTopic.VALUE.value)) - print("Kafka Consumer start listenng on topic: {:}".format(KafkaTopic.VALUE.value)) while True: raw_kpi = consumer.poll(1.0) if raw_kpi is None: @@ -69,30 +63,21 @@ class KpiValueWriter(GenericGrpcService): try: kpi_value = json.loads(raw_kpi.value().decode('utf-8')) LOGGER.info("Received KPI : {:}".format(kpi_value)) - print("Received KPI : {:}".format(kpi_value)) self.get_kpi_descriptor(kpi_value, kpi_manager_client, metric_writer) - except Exception as e: - print("Error detail: {:}".format(e)) + except: + LOGGER.exception("Error detail: ") continue def get_kpi_descriptor(self, kpi_value: str, kpi_manager_client, metric_writer): - print("--- START -----") - kpi_id = KpiId() - kpi_id.kpi_id.uuid = kpi_value['kpi_uuid'] - print("KpiId generated: {:}".format(kpi_id)) - # print("Kpi manger client created: {:}".format(kpi_manager_client)) + kpi_id.kpi_id.uuid = kpi_value['kpi_id'] # type: ignore try: kpi_descriptor_object = KpiDescriptor() kpi_descriptor_object = kpi_manager_client.GetKpiDescriptor(kpi_id) - # TODO: why kpi_descriptor_object recevies a KpiDescriptor type object not Empty type object??? if kpi_descriptor_object.kpi_id.kpi_id.uuid == kpi_id.kpi_id.uuid: LOGGER.info("Extracted KpiDescriptor: {:}".format(kpi_descriptor_object)) - print("Extracted KpiDescriptor: {:}".format(kpi_descriptor_object)) metric_writer.create_and_expose_cooked_kpi(kpi_descriptor_object, kpi_value) else: - LOGGER.info("No KPI Descriptor found in DB for Kpi ID: {:}".format(kpi_id)) - print("No KPI Descriptor found in DB for Kpi ID: {:}".format(kpi_id)) + LOGGER.info("No KPI Descriptor found in Database for Kpi ID: {:}".format(kpi_id)) except Exception as e: LOGGER.info("Unable to get KpiDescriptor. Error: {:}".format(e)) - print ("Unable to get KpiDescriptor. Error: {:}".format(e)) diff --git a/src/kpi_value_writer/service/MetricWriterToPrometheus.py b/src/kpi_value_writer/service/MetricWriterToPrometheus.py index bfbb6e3ba..3238516c9 100644 --- a/src/kpi_value_writer/service/MetricWriterToPrometheus.py +++ b/src/kpi_value_writer/service/MetricWriterToPrometheus.py @@ -14,15 +14,20 @@ # read Kafka stream from Kafka topic +import os import logging -from prometheus_client import Gauge -from common.proto.kpi_sample_types_pb2 import KpiSampleType -from common.proto.kpi_value_api_pb2 import KpiValue -from common.proto.kpi_manager_pb2 import KpiDescriptor +from prometheus_client import Gauge +from prometheus_client.exposition import push_to_gateway +from prometheus_client.registry import CollectorRegistry + +from common.proto.kpi_sample_types_pb2 import KpiSampleType +from common.proto.kpi_value_api_pb2 import KpiValue +from common.proto.kpi_manager_pb2 import KpiDescriptor -LOGGER = logging.getLogger(__name__) -PROM_METRICS = {} +LOGGER = logging.getLogger(__name__) +PROM_METRICS = {} +GATEWAY_URL = os.getenv('PUSHGATEWAY_URL', 'prometheus-pushgateway.monitoring.svc.cluster.local:9091') class MetricWriterToPrometheus: ''' @@ -30,7 +35,9 @@ class MetricWriterToPrometheus: cooked KPI value = KpiDescriptor (gRPC message) + KpiValue (gRPC message) ''' def __init__(self): - pass + self.job_name = 'kpivaluewriter' + self.registry = CollectorRegistry() + self.gateway_url = GATEWAY_URL def merge_kpi_descriptor_and_kpi_value(self, kpi_descriptor, kpi_value): # Creating a dictionary from the kpi_descriptor's attributes @@ -44,26 +51,27 @@ class MetricWriterToPrometheus: 'slice_id' : kpi_descriptor.slice_id.slice_uuid.uuid, 'connection_id' : kpi_descriptor.connection_id.connection_uuid.uuid, 'link_id' : kpi_descriptor.link_id.link_uuid.uuid, - 'time_stamp' : kpi_value.timestamp.timestamp, - 'kpi_value' : kpi_value.kpi_value_type.floatVal + 'time_stamp' : kpi_value["time_stamp"], + 'kpi_value' : kpi_value["kpi_value"] } LOGGER.debug("Cooked Kpi: {:}".format(cooked_kpi)) return cooked_kpi def create_and_expose_cooked_kpi(self, kpi_descriptor: KpiDescriptor, kpi_value: KpiValue): # merge both gRPC messages into single varible. - cooked_kpi = self.merge_kpi_descriptor_and_kpi_value(kpi_descriptor, kpi_value) + cooked_kpi = self.merge_kpi_descriptor_and_kpi_value(kpi_descriptor, kpi_value) tags_to_exclude = {'kpi_description', 'kpi_sample_type', 'kpi_value'} - metric_tags = [tag for tag in cooked_kpi.keys() if tag not in tags_to_exclude] # These values will be used as metric tags - metric_name = cooked_kpi['kpi_sample_type'] + metric_tags = [tag for tag in cooked_kpi.keys() if tag not in tags_to_exclude] # These values will be used as metric tags + metric_name = cooked_kpi['kpi_sample_type'] try: if metric_name not in PROM_METRICS: # Only register the metric, when it doesn't exists PROM_METRICS[metric_name] = Gauge ( metric_name, cooked_kpi['kpi_description'], - metric_tags + metric_tags, + registry=self.registry ) - LOGGER.debug("Metric is created with labels: {:}".format(metric_tags)) + LOGGER.debug("Metric is created with labels: {:}".format(metric_tags)) PROM_METRICS[metric_name].labels( kpi_id = cooked_kpi['kpi_id'], device_id = cooked_kpi['device_id'], @@ -74,7 +82,11 @@ class MetricWriterToPrometheus: link_id = cooked_kpi['link_id'], time_stamp = cooked_kpi['time_stamp'], ).set(float(cooked_kpi['kpi_value'])) - LOGGER.debug("Metric pushed to the endpoints: {:}".format(PROM_METRICS[metric_name])) + LOGGER.debug("Metric is being pushed to the Gateway ... : {:}".format(PROM_METRICS[metric_name])) + + # Push to the Prometheus Gateway, Prometheus is preconfigured to scrap the metrics from the gateway + push_to_gateway(self.gateway_url, job=self.job_name, registry=self.registry) + LOGGER.debug("Metric pushed to Prometheus Gateway.") except ValueError as e: if 'Duplicated timeseries' in str(e): diff --git a/src/kpi_value_writer/service/__main__.py b/src/kpi_value_writer/service/__main__.py index 28ba2ac90..56fc6100d 100644 --- a/src/kpi_value_writer/service/__main__.py +++ b/src/kpi_value_writer/service/__main__.py @@ -13,7 +13,6 @@ # limitations under the License. import logging, signal, sys, threading -from prometheus_client import start_http_server from kpi_value_writer.service.KpiValueWriter import KpiValueWriter from common.Settings import get_log_level @@ -39,8 +38,6 @@ def main(): grpc_service = KpiValueWriter() grpc_service.start() - start_http_server(10808) - LOGGER.debug("Prometheus client is started on port 10808") # Wait for Ctrl+C or termination signal while not terminate.wait(timeout=1.0): pass diff --git a/src/kpi_value_writer/tests/test_kpi_value_writer.py b/src/kpi_value_writer/tests/test_kpi_value_writer.py index 0d3f9e683..29e81d28a 100755 --- a/src/kpi_value_writer/tests/test_kpi_value_writer.py +++ b/src/kpi_value_writer/tests/test_kpi_value_writer.py @@ -12,14 +12,35 @@ # See the License for the specific language governing permissions and # limitations under the License. +import pytest +import time import logging from kpi_value_writer.service.KpiValueWriter import KpiValueWriter +from kpi_manager.client.KpiManagerClient import KpiManagerClient from common.tools.kafka.Variables import KafkaTopic +from test_messages import create_kpi_descriptor_request +LOGGER = logging.getLogger(__name__) +# -------- Fixtures ---------------- + +@pytest.fixture(autouse=True) +def log_all_methods(request): + ''' + This fixture logs messages before and after each test function runs, indicating the start and end of the test. + The autouse=True parameter ensures that this logging happens automatically for all tests in the module. + ''' + LOGGER.info(f" >>>>> Starting test: {request.node.name} ") + yield + LOGGER.info(f" <<<<< Finished test: {request.node.name} ") + +# @pytest.fixture(scope='module') +# def kpi_manager_client(): +# LOGGER.debug("Yielding KpiManagerClient ...") +# yield KpiManagerClient(host="10.152.183.203") +# LOGGER.debug("KpiManagerClient is terminated.") -LOGGER = logging.getLogger(__name__) # -------- Initial Test ---------------- def test_validate_kafka_topics(): @@ -27,7 +48,15 @@ def test_validate_kafka_topics(): response = KafkaTopic.create_all_topics() assert isinstance(response, bool) -def test_KafkaConsumer(): - LOGGER.debug(" --->>> test_kafka_consumer: START <<<--- ") - # kpi_value_writer = KpiValueWriter() - # kpi_value_writer.RunKafkaConsumer() +# -------------- +# NOT FOR GITHUB PIPELINE (Local testing only) +# -------------- +# def test_KafkaConsumer(kpi_manager_client): + +# # kpidescriptor = create_kpi_descriptor_request() +# # kpi_manager_client.SetKpiDescriptor(kpidescriptor) + +# kpi_value_writer = KpiValueWriter() +# kpi_value_writer.KafkaKpiConsumer() +# LOGGER.debug(" waiting for timer to finish ") +# time.sleep(300) diff --git a/src/kpi_value_writer/tests/test_messages.py b/src/kpi_value_writer/tests/test_messages.py index ffc6b398c..4cd901b2c 100755 --- a/src/kpi_value_writer/tests/test_messages.py +++ b/src/kpi_value_writer/tests/test_messages.py @@ -25,7 +25,8 @@ def create_kpi_id_request(): def create_kpi_descriptor_request(description: str = "Test Description"): _create_kpi_request = kpi_manager_pb2.KpiDescriptor() - _create_kpi_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) + # _create_kpi_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _create_kpi_request.kpi_id.kpi_id.uuid = "efef4d95-1cf1-43c4-9742-95c283dddddd" _create_kpi_request.kpi_description = description _create_kpi_request.kpi_sample_type = KpiSampleType.KPISAMPLETYPE_PACKETS_RECEIVED _create_kpi_request.device_id.device_uuid.uuid = 'DEV4' -- GitLab From 0bf11c591df49987de4172f3c21e7fa00ba4336a Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Feb 2025 11:17:22 +0000 Subject: [PATCH 270/463] NBI component: - Added Mock NBI Dependencies service as a separate continer for testing - Fixed unitary tests - Fixed CI/CD pipeline --- .gitlab-ci.yml | 4 +- src/nbi/.gitlab-ci.yml | 9 ++ src/nbi/tests/PrepareTestScenario.py | 99 +++++++++++-------- src/nbi/tests/test_core.py | 3 +- src/nbi/tests/test_etsi_bwm.py | 3 +- src/nbi/tests/test_ietf_l2vpn.py | 3 +- src/nbi/tests/test_ietf_l3vpn.py | 3 +- src/nbi/tests/test_ietf_network.py | 3 +- src/nbi/tests/test_tfs_api.py | 3 +- src/tests/.gitlab-ci.yml | 2 + .../mock_nbi_dependencies/.gitlab-ci.yml | 37 +++++++ .../tools/mock_nbi_dependencies/Config.py | 19 ++++ .../tools/mock_nbi_dependencies/Dockerfile | 37 +++++++ .../MockNbiDependencies.py | 48 +++++++++ .../MockService_Dependencies.py | 55 +++++++++++ .../tools/mock_nbi_dependencies/README.md | 21 ++++ .../tools/mock_nbi_dependencies/__init__.py | 14 +++ .../tools/mock_nbi_dependencies/build.sh | 21 ++++ .../tools/mock_nbi_dependencies/deploy.sh | 17 ++++ .../mock-nbi-dependencies.yaml | 76 ++++++++++++++ .../mock_nbi_dependencies/requirements.in | 19 ++++ src/tests/tools/mock_nbi_dependencies/run.sh | 19 ++++ 22 files changed, 464 insertions(+), 51 deletions(-) create mode 100644 src/tests/tools/mock_nbi_dependencies/.gitlab-ci.yml create mode 100644 src/tests/tools/mock_nbi_dependencies/Config.py create mode 100644 src/tests/tools/mock_nbi_dependencies/Dockerfile create mode 100644 src/tests/tools/mock_nbi_dependencies/MockNbiDependencies.py create mode 100644 src/tests/tools/mock_nbi_dependencies/MockService_Dependencies.py create mode 100644 src/tests/tools/mock_nbi_dependencies/README.md create mode 100644 src/tests/tools/mock_nbi_dependencies/__init__.py create mode 100755 src/tests/tools/mock_nbi_dependencies/build.sh create mode 100755 src/tests/tools/mock_nbi_dependencies/deploy.sh create mode 100644 src/tests/tools/mock_nbi_dependencies/mock-nbi-dependencies.yaml create mode 100644 src/tests/tools/mock_nbi_dependencies/requirements.in create mode 100755 src/tests/tools/mock_nbi_dependencies/run.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2588fb513..d12b12939 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,5 +55,5 @@ include: # - local: '/src/vnt_manager/.gitlab-ci.yml' # - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # -# # This should be last one: end-to-end integration tests -# - local: '/src/tests/.gitlab-ci.yml' + # This should be last one: end-to-end integration tests + - local: '/src/tests/.gitlab-ci.yml' diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 2c1057f95..2aad65dc4 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -46,6 +46,7 @@ unit_test nbi: stage: unit_test needs: - build nbi + - build mock_nbi_dependencies before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - > @@ -62,6 +63,14 @@ unit_test nbi: fi script: - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + - docker pull "$CI_REGISTRY_IMAGE/mock_nbi_dependencies:test" + - > + docker run --name mock_nbi_dependencies -d + --network=teraflowbridge + --env BIND_ADDRESS=0.0.0.0 + --env BIND_PORT=10000 + --env LOG_LEVEL=DEBUG + $CI_REGISTRY_IMAGE/mock_nbi_dependencies:test - > docker run --name $IMAGE_NAME -d -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge diff --git a/src/nbi/tests/PrepareTestScenario.py b/src/nbi/tests/PrepareTestScenario.py index 5c4c39d5d..a9922de1b 100644 --- a/src/nbi/tests/PrepareTestScenario.py +++ b/src/nbi/tests/PrepareTestScenario.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import enum, logging, os, pytest, requests, subprocess, threading, time +import enum, logging, os, pytest, requests, time # subprocess, threading from typing import Any, Dict, List, Optional, Set, Union from socketio import Namespace from common.Constants import ServiceNameEnum @@ -21,6 +21,7 @@ from common.Settings import ( ENVVAR_SUFIX_SERVICE_PORT_HTTP, get_env_var_name ) from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient from nbi.service.NbiApplication import NbiApplication from nbi.service.health_probes.Constants import SIO_NAMESPACE as HEARTBEAT_NAMESPACE from nbi.service.health_probes.Namespaces import HeartbeatServerNamespace @@ -39,54 +40,58 @@ os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_HOST os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(NBI_SERVICE_PORT) os.environ[get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) os.environ[get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) +os.environ[get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) os.environ[get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) os.environ[get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) -@pytest.fixture(scope='session') -def mock_service(): - # NOTE: Starting MockServer in a separate process to prevent - # issues with eventlet monkey-patched libraries. - - cmd = ['python', '-m', 'nbi.tests.MockService_Dependencies'] - custom_env = os.environ.copy() - mock_service_process = subprocess.Popen( - cmd, - env=custom_env, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - stdin=subprocess.DEVNULL, - text=True, - bufsize=1 - ) - - mock_service_logger = logging.getLogger('MockService_Dependencies') - mock_service_logger.info('Started') - - def stream_stdout(): - for line in iter(mock_service_process.stdout.readline, ''): - mock_service_logger.info(line.strip()) - - stream_stdout_thread = threading.Thread(target=stream_stdout, daemon=True) - stream_stdout_thread.start() - - yield True - - # Check if process is still running - if mock_service_process.poll() is None: - mock_service_process.terminate() # Try to terminate gracefully - time.sleep(2) # Give it time to exit - if mock_service_process.poll() is None: - mock_service_process.kill() # Force kill if still running - - mock_service_logger.info('Terminated') - stream_stdout_thread.join() +## MockService_Dependencies executed as a standalone container during +# tests to prevent apparent dead locks and issues. +#@pytest.fixture(scope='session') +#def mock_service(): +# # NOTE: Starting MockServer in a separate process to prevent +# # issues with eventlet monkey-patched libraries. +# +# cmd = ['python', '-m', 'nbi.tests.MockService_Dependencies'] +# custom_env = os.environ.copy() +# mock_service_process = subprocess.Popen( +# cmd, +# env=custom_env, +# stdout=subprocess.PIPE, +# stderr=subprocess.STDOUT, +# stdin=subprocess.DEVNULL, +# text=True, +# bufsize=1 +# ) +# +# mock_service_logger = logging.getLogger('MockService_Dependencies') +# mock_service_logger.info('Started') +# +# def stream_stdout(): +# for line in iter(mock_service_process.stdout.readline, ''): +# mock_service_logger.info(line.strip()) +# +# stream_stdout_thread = threading.Thread(target=stream_stdout, daemon=True) +# stream_stdout_thread.start() +# +# yield True +# +# # Check if process is still running +# if mock_service_process.poll() is None: +# mock_service_process.terminate() # Try to terminate gracefully +# time.sleep(2) # Give it time to exit +# if mock_service_process.poll() is None: +# mock_service_process.kill() # Force kill if still running +# +# mock_service_logger.info('Terminated') +# stream_stdout_thread.join() @pytest.fixture(scope='session') def nbi_application( - mock_service # pylint: disable=redefined-outer-name, unused-argument +# mock_service # pylint: disable=redefined-outer-name, unused-argument ) -> NbiApplication: mock_web_server = MockWebServer() mock_web_server.start() @@ -112,15 +117,23 @@ def osm_wim( @pytest.fixture(scope='session') def context_client( - mock_service # pylint: disable=redefined-outer-name, unused-argument +# mock_service # pylint: disable=redefined-outer-name, unused-argument ) -> ContextClient: _client = ContextClient() yield _client _client.close() +@pytest.fixture(scope='session') +def device_client( +# mock_service # pylint: disable=redefined-outer-name, unused-argument +) -> DeviceClient: + _client = DeviceClient() + yield _client + _client.close() + @pytest.fixture(scope='session') def service_client( - mock_service # pylint: disable=redefined-outer-name, unused-argument +# mock_service # pylint: disable=redefined-outer-name, unused-argument ) -> ServiceClient: _client = ServiceClient() yield _client @@ -128,7 +141,7 @@ def service_client( @pytest.fixture(scope='session') def slice_client( - mock_service # pylint: disable=redefined-outer-name, unused-argument +# mock_service # pylint: disable=redefined-outer-name, unused-argument ) -> SliceClient: _client = SliceClient() yield _client diff --git a/src/nbi/tests/test_core.py b/src/nbi/tests/test_core.py index f41c26f5d..39db882c0 100644 --- a/src/nbi/tests/test_core.py +++ b/src/nbi/tests/test_core.py @@ -25,7 +25,8 @@ from .Constants import NBI_SERVICE_BASE_URL from .HeartbeatClientNamespace import HeartbeatClientNamespace from .PrepareTestScenario import ( # pylint: disable=unused-import # be careful, order of symbols is important here! - mock_service, nbi_application, do_rest_get_request + #mock_service, + nbi_application, do_rest_get_request ) diff --git a/src/nbi/tests/test_etsi_bwm.py b/src/nbi/tests/test_etsi_bwm.py index 568ab2ff7..29666ffad 100644 --- a/src/nbi/tests/test_etsi_bwm.py +++ b/src/nbi/tests/test_etsi_bwm.py @@ -29,7 +29,8 @@ from context.client.ContextClient import ContextClient from nbi.service.NbiApplication import NbiApplication from .PrepareTestScenario import ( # pylint: disable=unused-import # be careful, order of symbols is important here! - mock_service, nbi_application, context_client, + #mock_service, + nbi_application, context_client, do_rest_delete_request, do_rest_get_request, do_rest_patch_request, do_rest_post_request, do_rest_put_request ) diff --git a/src/nbi/tests/test_ietf_l2vpn.py b/src/nbi/tests/test_ietf_l2vpn.py index 37b7d60b0..f620040e1 100644 --- a/src/nbi/tests/test_ietf_l2vpn.py +++ b/src/nbi/tests/test_ietf_l2vpn.py @@ -28,7 +28,8 @@ from tests.tools.mock_osm.MockOSM import MockOSM from .OSM_Constants import SERVICE_CONNECTION_POINTS_1, SERVICE_CONNECTION_POINTS_2, SERVICE_TYPE from .PrepareTestScenario import ( # pylint: disable=unused-import # be careful, order of symbols is important here! - mock_service, nbi_application, osm_wim, context_client + #mock_service, + nbi_application, osm_wim, context_client ) diff --git a/src/nbi/tests/test_ietf_l3vpn.py b/src/nbi/tests/test_ietf_l3vpn.py index b526611c6..c3176c25a 100644 --- a/src/nbi/tests/test_ietf_l3vpn.py +++ b/src/nbi/tests/test_ietf_l3vpn.py @@ -30,7 +30,8 @@ from context.client.ContextClient import ContextClient from nbi.service.NbiApplication import NbiApplication from .PrepareTestScenario import ( # pylint: disable=unused-import # be careful, order of symbols is important here! - mock_service, nbi_application, context_client, + #mock_service, + nbi_application, context_client, do_rest_delete_request, do_rest_get_request, do_rest_post_request ) diff --git a/src/nbi/tests/test_ietf_network.py b/src/nbi/tests/test_ietf_network.py index 182f0ecf7..ceb61aac3 100644 --- a/src/nbi/tests/test_ietf_network.py +++ b/src/nbi/tests/test_ietf_network.py @@ -34,7 +34,8 @@ os.environ['IETF_NETWORK_RENDERER'] = 'PYANGBIND' from .PrepareTestScenario import ( # pylint: disable=unused-import # be careful, order of symbols is important here! - mock_service, nbi_application, context_client, + #mock_service, + nbi_application, context_client, do_rest_get_request ) diff --git a/src/nbi/tests/test_tfs_api.py b/src/nbi/tests/test_tfs_api.py index d8009530f..ed5630a9b 100644 --- a/src/nbi/tests/test_tfs_api.py +++ b/src/nbi/tests/test_tfs_api.py @@ -39,7 +39,8 @@ from context.client.ContextClient import ContextClient from nbi.service.NbiApplication import NbiApplication from .PrepareTestScenario import ( # pylint: disable=unused-import # be careful, order of symbols is important here! - mock_service, nbi_application, context_client, + #mock_service, + nbi_application, context_client, do_rest_get_request ) diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index ec8ab77d9..26a97416f 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -22,3 +22,5 @@ include: # - local: '/src/tests/ofc24/.gitlab-ci.yml' # - local: '/src/tests/eucnc24/.gitlab-ci.yml' # - local: '/src/tests/ecoc24/.gitlab-ci.yml' + + - local: '/src/tools/mock_nbi_dependencies/.gitlab-ci.yml' diff --git a/src/tests/tools/mock_nbi_dependencies/.gitlab-ci.yml b/src/tests/tools/mock_nbi_dependencies/.gitlab-ci.yml new file mode 100644 index 000000000..d84b3ade5 --- /dev/null +++ b/src/tests/tools/mock_nbi_dependencies/.gitlab-ci.yml @@ -0,0 +1,37 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Build, tag, and push the Docker image to the GitLab Docker registry +build mock_nbi_dependencies: + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - docker buildx build -t "$CI_REGISTRY_IMAGE/mock_nbi_dependencies:test" -f ./src/tests/tools/mock_nbi_dependencies/Dockerfile . + - docker push "$CI_REGISTRY_IMAGE/mock_nbi_dependencies:test" + after_script: + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/src/tests/tools/mock_nbi_dependencies/**/*.{py,in,yml,yaml} + - src/src/tests/tools/mock_nbi_dependencies/Dockerfile + - src/nbi/**/*.{py,in,yml} + - src/nbi/Dockerfile + - src/nbi/tests/*.py + - manifests/nbiservice.yaml + - .gitlab-ci.yml diff --git a/src/tests/tools/mock_nbi_dependencies/Config.py b/src/tests/tools/mock_nbi_dependencies/Config.py new file mode 100644 index 000000000..516a58d15 --- /dev/null +++ b/src/tests/tools/mock_nbi_dependencies/Config.py @@ -0,0 +1,19 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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.Settings import get_log_level, get_setting + +BIND_ADDRESS = str(get_setting('BIND_ADDRESS', default='0.0.0.0')) +BIND_PORT = int(get_setting('BIND_PORT', default=10000 )) +LOG_LEVEL = str(get_log_level()) diff --git a/src/tests/tools/mock_nbi_dependencies/Dockerfile b/src/tests/tools/mock_nbi_dependencies/Dockerfile new file mode 100644 index 000000000..206faa69c --- /dev/null +++ b/src/tests/tools/mock_nbi_dependencies/Dockerfile @@ -0,0 +1,37 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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-folders, and copy content +RUN mkdir -p /var/teraflow/mock_nbi_dependencies +WORKDIR /var/teraflow/mock_nbi_dependencies +COPY . . + +# Get specific Python packages +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +RUN python3 -m pip list + +# Start the service +ENTRYPOINT ["python", "MockNbiDependencies.py"] diff --git a/src/tests/tools/mock_nbi_dependencies/MockNbiDependencies.py b/src/tests/tools/mock_nbi_dependencies/MockNbiDependencies.py new file mode 100644 index 000000000..dd121961d --- /dev/null +++ b/src/tests/tools/mock_nbi_dependencies/MockNbiDependencies.py @@ -0,0 +1,48 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, signal, sys, threading +from .MockService_Dependencies import MockService_Dependencies +from .Config import BIND_ADDRESS, BIND_PORT, LOG_LEVEL + +logging.basicConfig( + level=LOG_LEVEL, + format='[%(asctime)s] %(levelname)s:%(name)s:%(message)s', +) +LOGGER = logging.getLogger(__name__) +TERMINATE = threading.Event() + +def signal_handler(signal, frame): # pylint: disable=redefined-outer-name,unused-argument + LOGGER.warning('Terminate signal received') + TERMINATE.set() + +def main(): + LOGGER.info('Starting...') + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + + grpc_service = MockService_Dependencies(BIND_PORT, bind_address=BIND_ADDRESS) + grpc_service.start() + + # Wait for Ctrl+C or termination signal + while not TERMINATE.wait(timeout=1.0): pass + + LOGGER.info('Terminating...') + grpc_service.stop() + + LOGGER.info('Bye') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/tests/tools/mock_nbi_dependencies/MockService_Dependencies.py b/src/tests/tools/mock_nbi_dependencies/MockService_Dependencies.py new file mode 100644 index 000000000..74ef6bdad --- /dev/null +++ b/src/tests/tools/mock_nbi_dependencies/MockService_Dependencies.py @@ -0,0 +1,55 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Optional, Union +from common.proto.context_pb2_grpc import add_ContextServiceServicer_to_server +from common.proto.device_pb2_grpc import add_DeviceServiceServicer_to_server +from common.proto.service_pb2_grpc import add_ServiceServiceServicer_to_server +from common.proto.slice_pb2_grpc import add_SliceServiceServicer_to_server +from common.tests.MockServicerImpl_Context import MockServicerImpl_Context +from common.tests.MockServicerImpl_Device import MockServicerImpl_Device +from common.tests.MockServicerImpl_Service import MockServicerImpl_Service +from common.tests.MockServicerImpl_Slice import MockServicerImpl_Slice +from common.tools.service.GenericGrpcService import GenericGrpcService + + +class MockService_Dependencies(GenericGrpcService): + # Mock Service implementing Mock Context, Device, Service and Slice to + # simplify unitary tests of the NBI component. + + def __init__( + self, bind_port : Union[str, int], bind_address : Optional[str] = None, + max_workers : Optional[int] = None, grace_period : Optional[int] = None, + enable_health_servicer : bool = True, enable_reflection : bool = False, + cls_name : str = 'MockService' + ) -> None: + super().__init__( + bind_port, bind_address=bind_address, max_workers=max_workers, + grace_period=grace_period, enable_health_servicer=enable_health_servicer, + enable_reflection=enable_reflection, cls_name=cls_name + ) + + # pylint: disable=attribute-defined-outside-init + def install_servicers(self): + self.context_servicer = MockServicerImpl_Context() + add_ContextServiceServicer_to_server(self.context_servicer, self.server) + + self.device_servicer = MockServicerImpl_Device() + add_DeviceServiceServicer_to_server(self.device_servicer, self.server) + + self.service_servicer = MockServicerImpl_Service() + add_ServiceServiceServicer_to_server(self.service_servicer, self.server) + + self.slice_servicer = MockServicerImpl_Slice() + add_SliceServiceServicer_to_server(self.slice_servicer, self.server) diff --git a/src/tests/tools/mock_nbi_dependencies/README.md b/src/tests/tools/mock_nbi_dependencies/README.md new file mode 100644 index 000000000..0f3228b1c --- /dev/null +++ b/src/tests/tools/mock_nbi_dependencies/README.md @@ -0,0 +1,21 @@ +# Mock NBI Dependencies + +This gRPC Mock NBI Dependencies server implements very basic support for the testing of the NBI component. + + +## 1. Install requirements for the Mock NBI Dependencies +__NOTE__: if you run the Mock NBI Dependencies from the PyEnv used for developing on the TeraFlowSDN +framework and you followed the official steps in +[Development Guide > Configure Environment > Python](https://tfs.etsi.org/documentation/latest/development_guide/#211-python), +all the requirements are already in place. Install them only if you execute it in a separate/standalone environment. + +Install the required dependencies as follows: +```bash +pip install -r src/tests/tools/mock_nbi_dependencies/requirements.in +``` + +## 2. Run the Mock NBI Dependencies +Run the Mock NBI Dependencies as follows: +```bash +python src/tests/tools/mock_nbi_dependencies/MockNbiDependencies.py +``` diff --git a/src/tests/tools/mock_nbi_dependencies/__init__.py b/src/tests/tools/mock_nbi_dependencies/__init__.py new file mode 100644 index 000000000..53d5157f7 --- /dev/null +++ b/src/tests/tools/mock_nbi_dependencies/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/tools/mock_nbi_dependencies/build.sh b/src/tests/tools/mock_nbi_dependencies/build.sh new file mode 100755 index 000000000..e284de000 --- /dev/null +++ b/src/tests/tools/mock_nbi_dependencies/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Make folder containing the script the root folder for its execution +cd $(dirname $0) + +docker build -t mock-nbi-dependencies:test -f Dockerfile . +docker tag mock-nbi-dependencies:test localhost:32000/tfs/mock-nbi-dependencies:test +docker push localhost:32000/tfs/mock-nbi-dependencies:test diff --git a/src/tests/tools/mock_nbi_dependencies/deploy.sh b/src/tests/tools/mock_nbi_dependencies/deploy.sh new file mode 100755 index 000000000..8e876a7d3 --- /dev/null +++ b/src/tests/tools/mock_nbi_dependencies/deploy.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 mocks +kubectl --namespace mocks apply -f mock-nbi-dependencies.yaml diff --git a/src/tests/tools/mock_nbi_dependencies/mock-nbi-dependencies.yaml b/src/tests/tools/mock_nbi_dependencies/mock-nbi-dependencies.yaml new file mode 100644 index 000000000..770dbf742 --- /dev/null +++ b/src/tests/tools/mock_nbi_dependencies/mock-nbi-dependencies.yaml @@ -0,0 +1,76 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +kind: Namespace +apiVersion: v1 +metadata: + name: mocks +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mock-nbi-dependencies +spec: + selector: + matchLabels: + app: mock-nbi-dependencies + replicas: 1 + template: + metadata: + labels: + app: mock-nbi-dependencies + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: server + image: localhost:32000/tfs/mock-nbi-dependencies:test + imagePullPolicy: IfNotPresent + ports: + - containerPort: 10000 + env: + - name: BIND_ADDRESS + value: "0.0.0.0" + - name: BIND_PORT + value: "10000" + - name: LOG_LEVEL + value: "DEBUG" + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:10000"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:10000"] + resources: + requests: + cpu: 250m + memory: 128Mi + limits: + cpu: 700m + memory: 1024Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: mock-nbi-dependencies + labels: + app: mock-nbi-dependencies +spec: + type: ClusterIP + selector: + app: mock-nbi-dependencies + ports: + - name: grpc + protocol: TCP + port: 10000 + targetPort: 10000 diff --git a/src/tests/tools/mock_nbi_dependencies/requirements.in b/src/tests/tools/mock_nbi_dependencies/requirements.in new file mode 100644 index 000000000..39d8525f2 --- /dev/null +++ b/src/tests/tools/mock_nbi_dependencies/requirements.in @@ -0,0 +1,19 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +grpcio==1.47.* +grpcio-health-checking==1.47.* +grpcio-reflection==1.47.* +grpcio-tools==1.47.* +protobuf==3.20.* diff --git a/src/tests/tools/mock_nbi_dependencies/run.sh b/src/tests/tools/mock_nbi_dependencies/run.sh new file mode 100755 index 000000000..47ea5717a --- /dev/null +++ b/src/tests/tools/mock_nbi_dependencies/run.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Make folder containing the script the root folder for its execution +cd $(dirname $0) + +python MockIetfActnSdnCtrl.py -- GitLab From 1f345a50c0a3e5ce3238a1a5d634952fb5481c7f Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Feb 2025 11:24:18 +0000 Subject: [PATCH 271/463] NBI component: - Fixed unitary tests - Fixed CI/CD pipeline --- src/nbi/.gitlab-ci.yml | 6 ++++-- src/nbi/tests/PrepareTestScenario.py | 8 ++++---- src/tests/.gitlab-ci.yml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 2aad65dc4..5c24202ba 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -65,7 +65,7 @@ unit_test nbi: - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" - docker pull "$CI_REGISTRY_IMAGE/mock_nbi_dependencies:test" - > - docker run --name mock_nbi_dependencies -d + docker run --name mock_nbi_dependencies -d -p 10000:10000 --network=teraflowbridge --env BIND_ADDRESS=0.0.0.0 --env BIND_PORT=10000 @@ -80,6 +80,7 @@ unit_test nbi: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - sleep 5 - docker ps -a + - docker logs mock_nbi_dependencies - docker logs $IMAGE_NAME - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml" @@ -97,7 +98,8 @@ unit_test nbi: - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: - - docker rm -f $IMAGE_NAME + - docker logs mock_nbi_dependencies + - docker rm -f mock_nbi_dependencies $IMAGE_NAME - docker network rm teraflowbridge rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' diff --git a/src/nbi/tests/PrepareTestScenario.py b/src/nbi/tests/PrepareTestScenario.py index a9922de1b..113440e32 100644 --- a/src/nbi/tests/PrepareTestScenario.py +++ b/src/nbi/tests/PrepareTestScenario.py @@ -38,13 +38,13 @@ from .MockWebServer import MockWebServer os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(NBI_SERVICE_PORT) -os.environ[get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST )] = str('mock_nbi_dependencies') os.environ[get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) -os.environ[get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str('mock_nbi_dependencies') os.environ[get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) -os.environ[get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str('mock_nbi_dependencies') os.environ[get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) -os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str('mock_nbi_dependencies') os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index 26a97416f..01d38f47d 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -23,4 +23,4 @@ include: # - local: '/src/tests/eucnc24/.gitlab-ci.yml' # - local: '/src/tests/ecoc24/.gitlab-ci.yml' - - local: '/src/tools/mock_nbi_dependencies/.gitlab-ci.yml' + - local: '/src/tests/tools/mock_nbi_dependencies/.gitlab-ci.yml' -- GitLab From b74430e6f6185f7912c3aa4d5b1d6084faae7511 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Feb 2025 11:27:09 +0000 Subject: [PATCH 272/463] NBI component: - Fixed unitary tests - Fixed CI/CD pipeline --- src/tests/tools/mock_nbi_dependencies/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/tools/mock_nbi_dependencies/Dockerfile b/src/tests/tools/mock_nbi_dependencies/Dockerfile index 206faa69c..3b4443b82 100644 --- a/src/tests/tools/mock_nbi_dependencies/Dockerfile +++ b/src/tests/tools/mock_nbi_dependencies/Dockerfile @@ -28,6 +28,7 @@ WORKDIR /var/teraflow/mock_nbi_dependencies COPY . . # Get specific Python packages +RUN ls -la RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN python3 -m pip install -r requirements.txt -- GitLab From ce0401b1d839f92d08600bb2f860cd28aea16871 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Feb 2025 11:35:24 +0000 Subject: [PATCH 273/463] NBI component: - Fixed unitary tests - Fixed CI/CD pipeline --- .../tools/mock_nbi_dependencies/Dockerfile | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/src/tests/tools/mock_nbi_dependencies/Dockerfile b/src/tests/tools/mock_nbi_dependencies/Dockerfile index 3b4443b82..d4cd864f3 100644 --- a/src/tests/tools/mock_nbi_dependencies/Dockerfile +++ b/src/tests/tools/mock_nbi_dependencies/Dockerfile @@ -14,25 +14,54 @@ FROM python:3.9-slim +# Install dependencies +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install wget g++ git && \ + rm -rf /var/lib/apt/lists/* + # Set Python to show logs as they occur ENV PYTHONUNBUFFERED=0 +# Download the gRPC health probe +RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ + wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ + chmod +x /bin/grpc_health_probe + # 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-folders, and copy content +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + +# Add common files into working directory +WORKDIR /var/teraflow/common +COPY src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto +RUN touch __init__.py +COPY proto/*.proto ./ +RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto +RUN rm *.proto +RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; + +# Create component sub-folders, get specific Python packages RUN mkdir -p /var/teraflow/mock_nbi_dependencies WORKDIR /var/teraflow/mock_nbi_dependencies -COPY . . - -# Get specific Python packages -RUN ls -la +COPY src/mock_nbi_dependencies/requirements.in requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN python3 -m pip install -r requirements.txt -RUN python3 -m pip list +# Add component files into working directory +COPY src/tests/tools/mock_nbi_dependencies/. ./ # Start the service ENTRYPOINT ["python", "MockNbiDependencies.py"] -- GitLab From ac2572c863ad77bbb359a30ffab5fc9f520fb0b8 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Feb 2025 11:42:52 +0000 Subject: [PATCH 274/463] NBI component: - Fixed unitary tests - Fixed CI/CD pipeline --- src/tests/tools/mock_nbi_dependencies/Dockerfile | 2 +- src/tests/tools/mock_nbi_dependencies/requirements.in | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/tests/tools/mock_nbi_dependencies/Dockerfile b/src/tests/tools/mock_nbi_dependencies/Dockerfile index d4cd864f3..2e0bc7b5b 100644 --- a/src/tests/tools/mock_nbi_dependencies/Dockerfile +++ b/src/tests/tools/mock_nbi_dependencies/Dockerfile @@ -56,7 +56,7 @@ RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; # Create component sub-folders, get specific Python packages RUN mkdir -p /var/teraflow/mock_nbi_dependencies WORKDIR /var/teraflow/mock_nbi_dependencies -COPY src/mock_nbi_dependencies/requirements.in requirements.in +COPY src/tests/tools/mock_nbi_dependencies/requirements.in requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN python3 -m pip install -r requirements.txt diff --git a/src/tests/tools/mock_nbi_dependencies/requirements.in b/src/tests/tools/mock_nbi_dependencies/requirements.in index 39d8525f2..53d5157f7 100644 --- a/src/tests/tools/mock_nbi_dependencies/requirements.in +++ b/src/tests/tools/mock_nbi_dependencies/requirements.in @@ -12,8 +12,3 @@ # See the License for the specific language governing permissions and # limitations under the License. -grpcio==1.47.* -grpcio-health-checking==1.47.* -grpcio-reflection==1.47.* -grpcio-tools==1.47.* -protobuf==3.20.* -- GitLab From 51bfdca9fa3c54304abe2cfe1c415125b9d0fe2f Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Feb 2025 12:01:34 +0000 Subject: [PATCH 275/463] NBI component: - Fixed mock_nbi_dependencies tool --- src/tests/tools/mock_nbi_dependencies/Dockerfile | 5 +++-- src/tests/tools/mock_nbi_dependencies/README.md | 2 +- .../{MockNbiDependencies.py => __main__.py} | 0 3 files changed, 4 insertions(+), 3 deletions(-) rename src/tests/tools/mock_nbi_dependencies/{MockNbiDependencies.py => __main__.py} (100%) diff --git a/src/tests/tools/mock_nbi_dependencies/Dockerfile b/src/tests/tools/mock_nbi_dependencies/Dockerfile index 2e0bc7b5b..3a3a5e854 100644 --- a/src/tests/tools/mock_nbi_dependencies/Dockerfile +++ b/src/tests/tools/mock_nbi_dependencies/Dockerfile @@ -61,7 +61,8 @@ RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN python3 -m pip install -r requirements.txt # Add component files into working directory -COPY src/tests/tools/mock_nbi_dependencies/. ./ +WORKDIR /var/teraflow +COPY src/tests/tools/mock_nbi_dependencies/. mock_nbi_dependencies/ # Start the service -ENTRYPOINT ["python", "MockNbiDependencies.py"] +ENTRYPOINT ["python", "-m", "tests.tools.mock_nbi_dependencies"] diff --git a/src/tests/tools/mock_nbi_dependencies/README.md b/src/tests/tools/mock_nbi_dependencies/README.md index 0f3228b1c..a6d69fdf9 100644 --- a/src/tests/tools/mock_nbi_dependencies/README.md +++ b/src/tests/tools/mock_nbi_dependencies/README.md @@ -17,5 +17,5 @@ pip install -r src/tests/tools/mock_nbi_dependencies/requirements.in ## 2. Run the Mock NBI Dependencies Run the Mock NBI Dependencies as follows: ```bash -python src/tests/tools/mock_nbi_dependencies/MockNbiDependencies.py +PYTHONPATH=./src python -m tests.tools.mock_nbi_dependencies ``` diff --git a/src/tests/tools/mock_nbi_dependencies/MockNbiDependencies.py b/src/tests/tools/mock_nbi_dependencies/__main__.py similarity index 100% rename from src/tests/tools/mock_nbi_dependencies/MockNbiDependencies.py rename to src/tests/tools/mock_nbi_dependencies/__main__.py -- GitLab From bde896caa557a01a308877456544d7d66f066ed1 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Feb 2025 12:10:22 +0000 Subject: [PATCH 276/463] NBI component: - Fixed mock_nbi_dependencies tool --- src/tests/tools/mock_nbi_dependencies/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/tools/mock_nbi_dependencies/Dockerfile b/src/tests/tools/mock_nbi_dependencies/Dockerfile index 3a3a5e854..fef6bd962 100644 --- a/src/tests/tools/mock_nbi_dependencies/Dockerfile +++ b/src/tests/tools/mock_nbi_dependencies/Dockerfile @@ -65,4 +65,4 @@ WORKDIR /var/teraflow COPY src/tests/tools/mock_nbi_dependencies/. mock_nbi_dependencies/ # Start the service -ENTRYPOINT ["python", "-m", "tests.tools.mock_nbi_dependencies"] +ENTRYPOINT ["python", "-m", "mock_nbi_dependencies"] -- GitLab From cd2f8ca6bf4cd802077301a941eb5e55b0923e83 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Feb 2025 12:22:30 +0000 Subject: [PATCH 277/463] NBI component: - Reduced log level of passing unitary tests - Fixed mock_nbi_dependencies tool --- src/nbi/.gitlab-ci.yml | 2 +- src/tests/tools/mock_nbi_dependencies/Dockerfile | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 5c24202ba..cb47d6683 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -83,7 +83,7 @@ unit_test nbi: - docker logs mock_nbi_dependencies - docker logs $IMAGE_NAME - date - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml" - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" - date diff --git a/src/tests/tools/mock_nbi_dependencies/Dockerfile b/src/tests/tools/mock_nbi_dependencies/Dockerfile index fef6bd962..b4d2b57d5 100644 --- a/src/tests/tools/mock_nbi_dependencies/Dockerfile +++ b/src/tests/tools/mock_nbi_dependencies/Dockerfile @@ -62,6 +62,14 @@ RUN python3 -m pip install -r requirements.txt # Add component files into working directory WORKDIR /var/teraflow +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ +COPY src/service/__init__.py service/__init__.py +COPY src/service/client/. service/client/ +COPY src/slice/__init__.py slice/__init__.py +COPY src/slice/client/. slice/client/ COPY src/tests/tools/mock_nbi_dependencies/. mock_nbi_dependencies/ # Start the service -- GitLab From e73f1e607087ee83545b8e5c5aa22efa2ef03f98 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Feb 2025 16:06:20 +0000 Subject: [PATCH 278/463] NBI component: - Fixed mock_nbi_dependencies tool --- .../tools/mock_nbi_dependencies/Config.py | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/tests/tools/mock_nbi_dependencies/Config.py b/src/tests/tools/mock_nbi_dependencies/Config.py index 516a58d15..621bc3187 100644 --- a/src/tests/tools/mock_nbi_dependencies/Config.py +++ b/src/tests/tools/mock_nbi_dependencies/Config.py @@ -12,8 +12,26 @@ # See the License for the specific language governing permissions and # limitations under the License. -from common.Settings import get_log_level, get_setting +import os +from common.Constants import ServiceNameEnum +from common.Settings import ( + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, + get_env_var_name, get_log_level, get_setting +) + +LOCAL_HOST = '127.0.0.1' +MOCK_PORT = 10000 BIND_ADDRESS = str(get_setting('BIND_ADDRESS', default='0.0.0.0')) -BIND_PORT = int(get_setting('BIND_PORT', default=10000 )) +BIND_PORT = int(get_setting('BIND_PORT', default=MOCK_PORT)) LOG_LEVEL = str(get_log_level()) + +MOCKED_SERVICES = [ + ServiceNameEnum.CONTEXT, + ServiceNameEnum.DEVICE, + ServiceNameEnum.SERVICE, + ServiceNameEnum.SLICE, +] +for mocked_service in MOCKED_SERVICES: + os.environ[get_env_var_name(mocked_service, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) + os.environ[get_env_var_name(mocked_service, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(BIND_PORT ) -- GitLab From b352ccce3b26d4b53969f1a562dfe98d1177c23c Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Feb 2025 16:17:35 +0000 Subject: [PATCH 279/463] NBI component: - Code cleanup --- src/nbi/.gitlab-ci.yml | 10 ++++----- .../tools/mock_nbi_dependencies/build.sh | 21 ------------------- .../tools/mock_nbi_dependencies/deploy.sh | 17 --------------- src/tests/tools/mock_nbi_dependencies/run.sh | 19 ----------------- 4 files changed, 5 insertions(+), 62 deletions(-) delete mode 100755 src/tests/tools/mock_nbi_dependencies/build.sh delete mode 100755 src/tests/tools/mock_nbi_dependencies/deploy.sh delete mode 100755 src/tests/tools/mock_nbi_dependencies/run.sh diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index cb47d6683..1f0857415 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -85,15 +85,15 @@ unit_test nbi: - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml" - date - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" - date - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" - date - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" - date - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" - date - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" - date - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' diff --git a/src/tests/tools/mock_nbi_dependencies/build.sh b/src/tests/tools/mock_nbi_dependencies/build.sh deleted file mode 100755 index e284de000..000000000 --- a/src/tests/tools/mock_nbi_dependencies/build.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Make folder containing the script the root folder for its execution -cd $(dirname $0) - -docker build -t mock-nbi-dependencies:test -f Dockerfile . -docker tag mock-nbi-dependencies:test localhost:32000/tfs/mock-nbi-dependencies:test -docker push localhost:32000/tfs/mock-nbi-dependencies:test diff --git a/src/tests/tools/mock_nbi_dependencies/deploy.sh b/src/tests/tools/mock_nbi_dependencies/deploy.sh deleted file mode 100755 index 8e876a7d3..000000000 --- a/src/tests/tools/mock_nbi_dependencies/deploy.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 mocks -kubectl --namespace mocks apply -f mock-nbi-dependencies.yaml diff --git a/src/tests/tools/mock_nbi_dependencies/run.sh b/src/tests/tools/mock_nbi_dependencies/run.sh deleted file mode 100755 index 47ea5717a..000000000 --- a/src/tests/tools/mock_nbi_dependencies/run.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Make folder containing the script the root folder for its execution -cd $(dirname $0) - -python MockIetfActnSdnCtrl.py -- GitLab From 6539424892442bf0b2885b1b6bb7f96178293e65 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Feb 2025 16:23:18 +0000 Subject: [PATCH 280/463] NBI component: - Code cleanup --- src/nbi/.gitlab-ci.yml | 16 ++++++++-------- src/nbi/tests/PrepareTestScenario.py | 8 ++++---- src/tests/.gitlab-ci.yml | 2 +- .../tools/mock_nbi_dependencies/.gitlab-ci.yml | 10 +++++----- src/tests/tools/mock_nbi_dependencies/Dockerfile | 10 +++++----- src/tests/tools/mock_nbi_dependencies/README.md | 16 ++++++++-------- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 1f0857415..52f9d856b 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -46,7 +46,7 @@ unit_test nbi: stage: unit_test needs: - build nbi - - build mock_nbi_dependencies + - build mock_tfs_nbi_dependencies before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - > @@ -63,14 +63,14 @@ unit_test nbi: fi script: - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" - - docker pull "$CI_REGISTRY_IMAGE/mock_nbi_dependencies:test" + - docker pull "$CI_REGISTRY_IMAGE/mock_tfs_nbi_dependencies:test" - > - docker run --name mock_nbi_dependencies -d -p 10000:10000 + docker run --name mock_tfs_nbi_dependencies -d -p 10000:10000 --network=teraflowbridge --env BIND_ADDRESS=0.0.0.0 --env BIND_PORT=10000 - --env LOG_LEVEL=DEBUG - $CI_REGISTRY_IMAGE/mock_nbi_dependencies:test + --env LOG_LEVEL=INFO + $CI_REGISTRY_IMAGE/mock_tfs_nbi_dependencies:test - > docker run --name $IMAGE_NAME -d -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge @@ -80,7 +80,7 @@ unit_test nbi: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - sleep 5 - docker ps -a - - docker logs mock_nbi_dependencies + - docker logs mock_tfs_nbi_dependencies - docker logs $IMAGE_NAME - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml" @@ -98,8 +98,8 @@ unit_test nbi: - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: - - docker logs mock_nbi_dependencies - - docker rm -f mock_nbi_dependencies $IMAGE_NAME + - docker logs mock_tfs_nbi_dependencies + - docker rm -f mock_tfs_nbi_dependencies $IMAGE_NAME - docker network rm teraflowbridge rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' diff --git a/src/nbi/tests/PrepareTestScenario.py b/src/nbi/tests/PrepareTestScenario.py index 113440e32..1510dd298 100644 --- a/src/nbi/tests/PrepareTestScenario.py +++ b/src/nbi/tests/PrepareTestScenario.py @@ -38,13 +38,13 @@ from .MockWebServer import MockWebServer os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(NBI_SERVICE_PORT) -os.environ[get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST )] = str('mock_nbi_dependencies') +os.environ[get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST )] = str('mock_tfs_nbi_dependencies') os.environ[get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) -os.environ[get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str('mock_nbi_dependencies') +os.environ[get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str('mock_tfs_nbi_dependencies') os.environ[get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) -os.environ[get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str('mock_nbi_dependencies') +os.environ[get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str('mock_tfs_nbi_dependencies') os.environ[get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) -os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str('mock_nbi_dependencies') +os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str('mock_tfs_nbi_dependencies') os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(MOCKSERVICE_PORT) diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index 01d38f47d..20951c298 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -23,4 +23,4 @@ include: # - local: '/src/tests/eucnc24/.gitlab-ci.yml' # - local: '/src/tests/ecoc24/.gitlab-ci.yml' - - local: '/src/tests/tools/mock_nbi_dependencies/.gitlab-ci.yml' + - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml' diff --git a/src/tests/tools/mock_nbi_dependencies/.gitlab-ci.yml b/src/tests/tools/mock_nbi_dependencies/.gitlab-ci.yml index d84b3ade5..911554988 100644 --- a/src/tests/tools/mock_nbi_dependencies/.gitlab-ci.yml +++ b/src/tests/tools/mock_nbi_dependencies/.gitlab-ci.yml @@ -13,13 +13,13 @@ # limitations under the License. # Build, tag, and push the Docker image to the GitLab Docker registry -build mock_nbi_dependencies: +build mock_tfs_nbi_dependencies: stage: build before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker buildx build -t "$CI_REGISTRY_IMAGE/mock_nbi_dependencies:test" -f ./src/tests/tools/mock_nbi_dependencies/Dockerfile . - - docker push "$CI_REGISTRY_IMAGE/mock_nbi_dependencies:test" + - docker buildx build -t "$CI_REGISTRY_IMAGE/mock_tfs_nbi_dependencies:test" -f ./src/tests/tools/mock_tfs_nbi_dependencies/Dockerfile . + - docker push "$CI_REGISTRY_IMAGE/mock_tfs_nbi_dependencies:test" after_script: - docker images --filter="dangling=true" --quiet | xargs -r docker rmi rules: @@ -28,8 +28,8 @@ build mock_nbi_dependencies: - changes: - src/common/**/*.py - proto/*.proto - - src/src/tests/tools/mock_nbi_dependencies/**/*.{py,in,yml,yaml} - - src/src/tests/tools/mock_nbi_dependencies/Dockerfile + - src/src/tests/tools/mock_tfs_nbi_dependencies/**/*.{py,in,yml,yaml} + - src/src/tests/tools/mock_tfs_nbi_dependencies/Dockerfile - src/nbi/**/*.{py,in,yml} - src/nbi/Dockerfile - src/nbi/tests/*.py diff --git a/src/tests/tools/mock_nbi_dependencies/Dockerfile b/src/tests/tools/mock_nbi_dependencies/Dockerfile index b4d2b57d5..9e79fa1e4 100644 --- a/src/tests/tools/mock_nbi_dependencies/Dockerfile +++ b/src/tests/tools/mock_nbi_dependencies/Dockerfile @@ -54,9 +54,9 @@ RUN rm *.proto RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; # Create component sub-folders, get specific Python packages -RUN mkdir -p /var/teraflow/mock_nbi_dependencies -WORKDIR /var/teraflow/mock_nbi_dependencies -COPY src/tests/tools/mock_nbi_dependencies/requirements.in requirements.in +RUN mkdir -p /var/teraflow/mock_tfs_nbi_dependencies +WORKDIR /var/teraflow/mock_tfs_nbi_dependencies +COPY src/tests/tools/mock_tfs_nbi_dependencies/requirements.in requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN python3 -m pip install -r requirements.txt @@ -70,7 +70,7 @@ COPY src/service/__init__.py service/__init__.py COPY src/service/client/. service/client/ COPY src/slice/__init__.py slice/__init__.py COPY src/slice/client/. slice/client/ -COPY src/tests/tools/mock_nbi_dependencies/. mock_nbi_dependencies/ +COPY src/tests/tools/mock_tfs_nbi_dependencies/. mock_tfs_nbi_dependencies/ # Start the service -ENTRYPOINT ["python", "-m", "mock_nbi_dependencies"] +ENTRYPOINT ["python", "-m", "mock_tfs_nbi_dependencies"] diff --git a/src/tests/tools/mock_nbi_dependencies/README.md b/src/tests/tools/mock_nbi_dependencies/README.md index a6d69fdf9..2de7204f4 100644 --- a/src/tests/tools/mock_nbi_dependencies/README.md +++ b/src/tests/tools/mock_nbi_dependencies/README.md @@ -1,21 +1,21 @@ -# Mock NBI Dependencies +# Mock TFS NBI Dependencies -This gRPC Mock NBI Dependencies server implements very basic support for the testing of the NBI component. +This gRPC Mock TFS NBI Dependencies server implements very basic support for the testing of the NBI component. -## 1. Install requirements for the Mock NBI Dependencies -__NOTE__: if you run the Mock NBI Dependencies from the PyEnv used for developing on the TeraFlowSDN +## 1. Install requirements for the Mock TFS NBI Dependencies +__NOTE__: if you run the Mock TFS NBI Dependencies from the PyEnv used for developing on the TeraFlowSDN framework and you followed the official steps in [Development Guide > Configure Environment > Python](https://tfs.etsi.org/documentation/latest/development_guide/#211-python), all the requirements are already in place. Install them only if you execute it in a separate/standalone environment. Install the required dependencies as follows: ```bash -pip install -r src/tests/tools/mock_nbi_dependencies/requirements.in +pip install -r src/tests/tools/mock_tfs_nbi_dependencies/requirements.in ``` -## 2. Run the Mock NBI Dependencies -Run the Mock NBI Dependencies as follows: +## 2. Run the Mock TFS NBI Dependencies +Run the Mock TFS NBI Dependencies as follows: ```bash -PYTHONPATH=./src python -m tests.tools.mock_nbi_dependencies +PYTHONPATH=./src python -m tests.tools.mock_tfs_nbi_dependencies ``` -- GitLab From ea34a7daec9cbe4234d3cea1f9a7dca7b0bc531b Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Feb 2025 16:24:23 +0000 Subject: [PATCH 281/463] NBI component: - Code cleanup --- .../.gitlab-ci.yml | 0 .../Config.py | 0 .../Dockerfile | 0 .../MockService_Dependencies.py | 0 .../README.md | 0 .../__init__.py | 0 .../__main__.py | 0 .../mock-nbi-dependencies.yaml | 0 .../requirements.in | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename src/tests/tools/{mock_nbi_dependencies => mock_tfs_nbi_dependencies}/.gitlab-ci.yml (100%) rename src/tests/tools/{mock_nbi_dependencies => mock_tfs_nbi_dependencies}/Config.py (100%) rename src/tests/tools/{mock_nbi_dependencies => mock_tfs_nbi_dependencies}/Dockerfile (100%) rename src/tests/tools/{mock_nbi_dependencies => mock_tfs_nbi_dependencies}/MockService_Dependencies.py (100%) rename src/tests/tools/{mock_nbi_dependencies => mock_tfs_nbi_dependencies}/README.md (100%) rename src/tests/tools/{mock_nbi_dependencies => mock_tfs_nbi_dependencies}/__init__.py (100%) rename src/tests/tools/{mock_nbi_dependencies => mock_tfs_nbi_dependencies}/__main__.py (100%) rename src/tests/tools/{mock_nbi_dependencies => mock_tfs_nbi_dependencies}/mock-nbi-dependencies.yaml (100%) rename src/tests/tools/{mock_nbi_dependencies => mock_tfs_nbi_dependencies}/requirements.in (100%) diff --git a/src/tests/tools/mock_nbi_dependencies/.gitlab-ci.yml b/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml similarity index 100% rename from src/tests/tools/mock_nbi_dependencies/.gitlab-ci.yml rename to src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml diff --git a/src/tests/tools/mock_nbi_dependencies/Config.py b/src/tests/tools/mock_tfs_nbi_dependencies/Config.py similarity index 100% rename from src/tests/tools/mock_nbi_dependencies/Config.py rename to src/tests/tools/mock_tfs_nbi_dependencies/Config.py diff --git a/src/tests/tools/mock_nbi_dependencies/Dockerfile b/src/tests/tools/mock_tfs_nbi_dependencies/Dockerfile similarity index 100% rename from src/tests/tools/mock_nbi_dependencies/Dockerfile rename to src/tests/tools/mock_tfs_nbi_dependencies/Dockerfile diff --git a/src/tests/tools/mock_nbi_dependencies/MockService_Dependencies.py b/src/tests/tools/mock_tfs_nbi_dependencies/MockService_Dependencies.py similarity index 100% rename from src/tests/tools/mock_nbi_dependencies/MockService_Dependencies.py rename to src/tests/tools/mock_tfs_nbi_dependencies/MockService_Dependencies.py diff --git a/src/tests/tools/mock_nbi_dependencies/README.md b/src/tests/tools/mock_tfs_nbi_dependencies/README.md similarity index 100% rename from src/tests/tools/mock_nbi_dependencies/README.md rename to src/tests/tools/mock_tfs_nbi_dependencies/README.md diff --git a/src/tests/tools/mock_nbi_dependencies/__init__.py b/src/tests/tools/mock_tfs_nbi_dependencies/__init__.py similarity index 100% rename from src/tests/tools/mock_nbi_dependencies/__init__.py rename to src/tests/tools/mock_tfs_nbi_dependencies/__init__.py diff --git a/src/tests/tools/mock_nbi_dependencies/__main__.py b/src/tests/tools/mock_tfs_nbi_dependencies/__main__.py similarity index 100% rename from src/tests/tools/mock_nbi_dependencies/__main__.py rename to src/tests/tools/mock_tfs_nbi_dependencies/__main__.py diff --git a/src/tests/tools/mock_nbi_dependencies/mock-nbi-dependencies.yaml b/src/tests/tools/mock_tfs_nbi_dependencies/mock-nbi-dependencies.yaml similarity index 100% rename from src/tests/tools/mock_nbi_dependencies/mock-nbi-dependencies.yaml rename to src/tests/tools/mock_tfs_nbi_dependencies/mock-nbi-dependencies.yaml diff --git a/src/tests/tools/mock_nbi_dependencies/requirements.in b/src/tests/tools/mock_tfs_nbi_dependencies/requirements.in similarity index 100% rename from src/tests/tools/mock_nbi_dependencies/requirements.in rename to src/tests/tools/mock_tfs_nbi_dependencies/requirements.in -- GitLab From 6b4421d8e0331fdaf673951a8b2f4691246f1a3f Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Feb 2025 17:16:06 +0000 Subject: [PATCH 282/463] Reactivated all CI/CD tests --- .gitlab-ci.yml | 66 +++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d12b12939..769ccd80e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,39 +21,39 @@ stages: # include the individual .gitlab-ci.yml of each micro-service and tests include: -# #- local: '/manifests/.gitlab-ci.yml' -# - local: '/src/monitoring/.gitlab-ci.yml' + #- local: '/manifests/.gitlab-ci.yml' + - local: '/src/monitoring/.gitlab-ci.yml' - local: '/src/nbi/.gitlab-ci.yml' -# - local: '/src/context/.gitlab-ci.yml' -# - local: '/src/device/.gitlab-ci.yml' -# - local: '/src/service/.gitlab-ci.yml' -# - local: '/src/dbscanserving/.gitlab-ci.yml' -# - local: '/src/opticalattackmitigator/.gitlab-ci.yml' -# - local: '/src/opticalattackdetector/.gitlab-ci.yml' -# - local: '/src/opticalattackmanager/.gitlab-ci.yml' -# - local: '/src/opticalcontroller/.gitlab-ci.yml' -# - local: '/src/ztp/.gitlab-ci.yml' -# - local: '/src/policy/.gitlab-ci.yml' -# #- local: '/src/automation/.gitlab-ci.yml' -# - local: '/src/forecaster/.gitlab-ci.yml' -# #- local: '/src/webui/.gitlab-ci.yml' -# #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' -# #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' -# #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' -# - local: '/src/slice/.gitlab-ci.yml' -# #- local: '/src/interdomain/.gitlab-ci.yml' -# - local: '/src/pathcomp/.gitlab-ci.yml' -# #- local: '/src/dlt/.gitlab-ci.yml' -# - local: '/src/load_generator/.gitlab-ci.yml' -# - local: '/src/bgpls_speaker/.gitlab-ci.yml' -# - local: '/src/kpi_manager/.gitlab-ci.yml' -# - local: '/src/kpi_value_api/.gitlab-ci.yml' -# - local: '/src/kpi_value_writer/.gitlab-ci.yml' -# - local: '/src/telemetry/.gitlab-ci.yml' -# - local: '/src/analytics/.gitlab-ci.yml' -# - local: '/src/qos_profile/.gitlab-ci.yml' -# - local: '/src/vnt_manager/.gitlab-ci.yml' -# - local: '/src/e2e_orchestrator/.gitlab-ci.yml' -# + - local: '/src/context/.gitlab-ci.yml' + - local: '/src/device/.gitlab-ci.yml' + - local: '/src/service/.gitlab-ci.yml' + - local: '/src/dbscanserving/.gitlab-ci.yml' + - local: '/src/opticalattackmitigator/.gitlab-ci.yml' + - local: '/src/opticalattackdetector/.gitlab-ci.yml' + - local: '/src/opticalattackmanager/.gitlab-ci.yml' + - local: '/src/opticalcontroller/.gitlab-ci.yml' + - local: '/src/ztp/.gitlab-ci.yml' + - local: '/src/policy/.gitlab-ci.yml' + #- local: '/src/automation/.gitlab-ci.yml' + - local: '/src/forecaster/.gitlab-ci.yml' + #- local: '/src/webui/.gitlab-ci.yml' + #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' + #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' + #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' + - local: '/src/slice/.gitlab-ci.yml' + #- local: '/src/interdomain/.gitlab-ci.yml' + - local: '/src/pathcomp/.gitlab-ci.yml' + #- local: '/src/dlt/.gitlab-ci.yml' + - local: '/src/load_generator/.gitlab-ci.yml' + - local: '/src/bgpls_speaker/.gitlab-ci.yml' + - local: '/src/kpi_manager/.gitlab-ci.yml' + - local: '/src/kpi_value_api/.gitlab-ci.yml' + - local: '/src/kpi_value_writer/.gitlab-ci.yml' + - local: '/src/telemetry/.gitlab-ci.yml' + - local: '/src/analytics/.gitlab-ci.yml' + - local: '/src/qos_profile/.gitlab-ci.yml' + - local: '/src/vnt_manager/.gitlab-ci.yml' + - local: '/src/e2e_orchestrator/.gitlab-ci.yml' + # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' -- GitLab From 4192ee019ab9b993816166ad149e2df790d58ba3 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Feb 2025 12:04:24 +0000 Subject: [PATCH 283/463] NBI component: - Fix CI/CD pipeline --- manifests/nbiservice.yaml | 2 +- src/nbi/service/app.py | 6 +++--- src/tests/ofc22/tests/test_functional_create_service.py | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/manifests/nbiservice.yaml b/manifests/nbiservice.yaml index 7725cb501..4fcbb81d0 100644 --- a/manifests/nbiservice.yaml +++ b/manifests/nbiservice.yaml @@ -39,7 +39,7 @@ spec: #- containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" + value: "DEBUG" - name: FLASK_ENV value: "production" # change to "development" if developing - name: IETF_NETWORK_RENDERER diff --git a/src/nbi/service/app.py b/src/nbi/service/app.py index c615584b5..94a267bc6 100644 --- a/src/nbi/service/app.py +++ b/src/nbi/service/app.py @@ -55,9 +55,7 @@ wait_for_environment_variables([ get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), ]) -BIND_ADDRESS = get_http_bind_address() -BIND_PORT = get_service_port_http(ServiceNameEnum.NBI) -BASE_URL = get_service_baseurl_http(ServiceNameEnum.NBI) or '' +BASE_URL = get_service_baseurl_http(ServiceNameEnum.NBI) or '' nbi_app = NbiApplication(base_url=BASE_URL) register_health_probes(nbi_app) @@ -79,6 +77,8 @@ app = nbi_app.get_flask_app() if __name__ == '__main__': # Only used to run it locally during development stage; # otherwise, app is directly launched by gunicorn. + BIND_ADDRESS = get_http_bind_address() + BIND_PORT = get_service_port_http(ServiceNameEnum.NBI) nbi_app._sio.run( app, host=BIND_ADDRESS, port=BIND_PORT, debug=True, use_reloader=False diff --git a/src/tests/ofc22/tests/test_functional_create_service.py b/src/tests/ofc22/tests/test_functional_create_service.py index e0874a22d..143f662f1 100644 --- a/src/tests/ofc22/tests/test_functional_create_service.py +++ b/src/tests/ofc22/tests/test_functional_create_service.py @@ -78,6 +78,7 @@ def test_scenario_kpi_values_created( We short k KPI descriptors to test. """ response = monitoring_client.GetKpiDescriptorList(Empty()) + assert len(response.kpi_descriptor_list) >= 2 kpi_descriptors = random.choices(response.kpi_descriptor_list, k=2) for kpi_descriptor in kpi_descriptors: -- GitLab From 9c67ff65f9c2b4f21586ea2313118dae37ff0b58 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Feb 2025 17:10:02 +0000 Subject: [PATCH 284/463] Manifests: - NATS: recovered to single-node standalone node by default - NBI: corrected/recovered manifest values --- manifests/nats/cluster.yaml | 6 ++++-- manifests/nbiservice.yaml | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/manifests/nats/cluster.yaml b/manifests/nats/cluster.yaml index 913520f22..bc8014bb5 100644 --- a/manifests/nats/cluster.yaml +++ b/manifests/nats/cluster.yaml @@ -31,8 +31,10 @@ container: config: cluster: - enabled: true - replicas: 3 + #enabled: true + enabled: false + #replicas: 3 + replicas: 1 jetstream: enabled: true fileStore: diff --git a/manifests/nbiservice.yaml b/manifests/nbiservice.yaml index 4fcbb81d0..d2d65c719 100644 --- a/manifests/nbiservice.yaml +++ b/manifests/nbiservice.yaml @@ -39,7 +39,7 @@ spec: #- containerPort: 9192 env: - name: LOG_LEVEL - value: "DEBUG" + value: "INFO" - name: FLASK_ENV value: "production" # change to "development" if developing - name: IETF_NETWORK_RENDERER @@ -60,11 +60,11 @@ spec: failureThreshold: 3 resources: requests: - cpu: 50m - memory: 64Mi - limits: - cpu: 500m + cpu: 150m memory: 512Mi + limits: + cpu: 1000m + memory: 2048Mi --- apiVersion: v1 kind: Service -- GitLab From 5bcdeff8d9262dfb2b621e2956cbb9529b2205be Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Feb 2025 17:10:29 +0000 Subject: [PATCH 285/463] NBI component: - removed unneeded INFO log messages from socketio server --- src/nbi/service/app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nbi/service/app.py b/src/nbi/service/app.py index 94a267bc6..a413c6db8 100644 --- a/src/nbi/service/app.py +++ b/src/nbi/service/app.py @@ -44,6 +44,7 @@ from .well_known_meta import register_well_known LOG_LEVEL = get_log_level() logging.basicConfig(level=LOG_LEVEL) +logging.getLogger('socketio.server').setLevel(logging.WARNING) LOGGER = logging.getLogger(__name__) wait_for_environment_variables([ -- GitLab From a4cac8f238fe3f9a7baf2b3e905078d769bfa2ff Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 19 Feb 2025 07:08:06 +0000 Subject: [PATCH 286/463] OFC22 test: - activated as single test - enabled debug log in monitoring --- .gitlab-ci.yml | 66 ++++++++++++++++---------------- manifests/monitoringservice.yaml | 2 +- src/tests/.gitlab-ci.yml | 22 +++++------ src/tests/ofc22/.gitlab-ci.yml | 2 +- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 769ccd80e..ce9084631 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,39 +21,39 @@ stages: # include the individual .gitlab-ci.yml of each micro-service and tests include: - #- local: '/manifests/.gitlab-ci.yml' - - local: '/src/monitoring/.gitlab-ci.yml' - - local: '/src/nbi/.gitlab-ci.yml' - - local: '/src/context/.gitlab-ci.yml' - - local: '/src/device/.gitlab-ci.yml' - - local: '/src/service/.gitlab-ci.yml' - - local: '/src/dbscanserving/.gitlab-ci.yml' - - local: '/src/opticalattackmitigator/.gitlab-ci.yml' - - local: '/src/opticalattackdetector/.gitlab-ci.yml' - - local: '/src/opticalattackmanager/.gitlab-ci.yml' - - local: '/src/opticalcontroller/.gitlab-ci.yml' - - local: '/src/ztp/.gitlab-ci.yml' - - local: '/src/policy/.gitlab-ci.yml' - #- local: '/src/automation/.gitlab-ci.yml' - - local: '/src/forecaster/.gitlab-ci.yml' - #- local: '/src/webui/.gitlab-ci.yml' - #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' - #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' - - local: '/src/slice/.gitlab-ci.yml' - #- local: '/src/interdomain/.gitlab-ci.yml' - - local: '/src/pathcomp/.gitlab-ci.yml' - #- local: '/src/dlt/.gitlab-ci.yml' - - local: '/src/load_generator/.gitlab-ci.yml' - - local: '/src/bgpls_speaker/.gitlab-ci.yml' - - local: '/src/kpi_manager/.gitlab-ci.yml' - - local: '/src/kpi_value_api/.gitlab-ci.yml' - - local: '/src/kpi_value_writer/.gitlab-ci.yml' - - local: '/src/telemetry/.gitlab-ci.yml' - - local: '/src/analytics/.gitlab-ci.yml' - - local: '/src/qos_profile/.gitlab-ci.yml' - - local: '/src/vnt_manager/.gitlab-ci.yml' - - local: '/src/e2e_orchestrator/.gitlab-ci.yml' +# #- local: '/manifests/.gitlab-ci.yml' +# - local: '/src/monitoring/.gitlab-ci.yml' +# - local: '/src/nbi/.gitlab-ci.yml' +# - local: '/src/context/.gitlab-ci.yml' +# - local: '/src/device/.gitlab-ci.yml' +# - local: '/src/service/.gitlab-ci.yml' +# - local: '/src/dbscanserving/.gitlab-ci.yml' +# - local: '/src/opticalattackmitigator/.gitlab-ci.yml' +# - local: '/src/opticalattackdetector/.gitlab-ci.yml' +# - local: '/src/opticalattackmanager/.gitlab-ci.yml' +# - local: '/src/opticalcontroller/.gitlab-ci.yml' +# - local: '/src/ztp/.gitlab-ci.yml' +# - local: '/src/policy/.gitlab-ci.yml' +# #- local: '/src/automation/.gitlab-ci.yml' +# - local: '/src/forecaster/.gitlab-ci.yml' +# #- local: '/src/webui/.gitlab-ci.yml' +# #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' +# #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' +# #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' +# - local: '/src/slice/.gitlab-ci.yml' +# #- local: '/src/interdomain/.gitlab-ci.yml' +# - local: '/src/pathcomp/.gitlab-ci.yml' +# #- local: '/src/dlt/.gitlab-ci.yml' +# - local: '/src/load_generator/.gitlab-ci.yml' +# - local: '/src/bgpls_speaker/.gitlab-ci.yml' +# - local: '/src/kpi_manager/.gitlab-ci.yml' +# - local: '/src/kpi_value_api/.gitlab-ci.yml' +# - local: '/src/kpi_value_writer/.gitlab-ci.yml' +# - local: '/src/telemetry/.gitlab-ci.yml' +# - local: '/src/analytics/.gitlab-ci.yml' +# - local: '/src/qos_profile/.gitlab-ci.yml' +# - local: '/src/vnt_manager/.gitlab-ci.yml' +# - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' diff --git a/manifests/monitoringservice.yaml b/manifests/monitoringservice.yaml index 3178b487e..5b44f91be 100644 --- a/manifests/monitoringservice.yaml +++ b/manifests/monitoringservice.yaml @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" + value: "DEBUG" envFrom: - secretRef: name: qdb-data diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index 06578bea8..3abdc0ed4 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -15,14 +15,14 @@ # include the individual .gitlab-ci.yml of each end-to-end integration test include: - local: '/src/tests/ofc22/.gitlab-ci.yml' - #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' - - local: '/src/tests/ecoc22/.gitlab-ci.yml' - #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' - #- local: '/src/tests/ofc23/.gitlab-ci.yml' - - local: '/src/tests/ofc24/.gitlab-ci.yml' - - local: '/src/tests/eucnc24/.gitlab-ci.yml' - - local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml' - - local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml' - #- local: '/src/tests/ecoc24/.gitlab-ci.yml' - - - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml' +# #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' +# - local: '/src/tests/ecoc22/.gitlab-ci.yml' +# #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' +# #- local: '/src/tests/ofc23/.gitlab-ci.yml' +# - local: '/src/tests/ofc24/.gitlab-ci.yml' +# - local: '/src/tests/eucnc24/.gitlab-ci.yml' +# - local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml' +# - local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml' +# #- local: '/src/tests/ecoc24/.gitlab-ci.yml' +# +# - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml' diff --git a/src/tests/ofc22/.gitlab-ci.yml b/src/tests/ofc22/.gitlab-ci.yml index 0fbe2375a..851089657 100644 --- a/src/tests/ofc22/.gitlab-ci.yml +++ b/src/tests/ofc22/.gitlab-ci.yml @@ -61,7 +61,7 @@ end2end_test ofc22: #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/sliceservice.yaml #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml - #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml + - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml - source src/tests/${TEST_NAME}/deploy_specs.sh #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" #- export TFS_SKIP_BUILD="YES" -- GitLab From ea556848a855de6c5d4371658152694b997a2bc7 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 19 Feb 2025 07:31:25 +0000 Subject: [PATCH 287/463] OFC22 test: - recovered all integration tests - disabled debug log in monitoring - enlarged wait times for enabling devices and creating KPIs --- .gitlab-ci.yml | 66 +++++++++---------- manifests/monitoringservice.yaml | 2 +- src/tests/.gitlab-ci.yml | 22 +++---- src/tests/ofc22/.gitlab-ci.yml | 2 +- .../ofc22/tests/test_functional_bootstrap.py | 8 +-- 5 files changed, 50 insertions(+), 50 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ce9084631..769ccd80e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,39 +21,39 @@ stages: # include the individual .gitlab-ci.yml of each micro-service and tests include: -# #- local: '/manifests/.gitlab-ci.yml' -# - local: '/src/monitoring/.gitlab-ci.yml' -# - local: '/src/nbi/.gitlab-ci.yml' -# - local: '/src/context/.gitlab-ci.yml' -# - local: '/src/device/.gitlab-ci.yml' -# - local: '/src/service/.gitlab-ci.yml' -# - local: '/src/dbscanserving/.gitlab-ci.yml' -# - local: '/src/opticalattackmitigator/.gitlab-ci.yml' -# - local: '/src/opticalattackdetector/.gitlab-ci.yml' -# - local: '/src/opticalattackmanager/.gitlab-ci.yml' -# - local: '/src/opticalcontroller/.gitlab-ci.yml' -# - local: '/src/ztp/.gitlab-ci.yml' -# - local: '/src/policy/.gitlab-ci.yml' -# #- local: '/src/automation/.gitlab-ci.yml' -# - local: '/src/forecaster/.gitlab-ci.yml' -# #- local: '/src/webui/.gitlab-ci.yml' -# #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' -# #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' -# #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' -# - local: '/src/slice/.gitlab-ci.yml' -# #- local: '/src/interdomain/.gitlab-ci.yml' -# - local: '/src/pathcomp/.gitlab-ci.yml' -# #- local: '/src/dlt/.gitlab-ci.yml' -# - local: '/src/load_generator/.gitlab-ci.yml' -# - local: '/src/bgpls_speaker/.gitlab-ci.yml' -# - local: '/src/kpi_manager/.gitlab-ci.yml' -# - local: '/src/kpi_value_api/.gitlab-ci.yml' -# - local: '/src/kpi_value_writer/.gitlab-ci.yml' -# - local: '/src/telemetry/.gitlab-ci.yml' -# - local: '/src/analytics/.gitlab-ci.yml' -# - local: '/src/qos_profile/.gitlab-ci.yml' -# - local: '/src/vnt_manager/.gitlab-ci.yml' -# - local: '/src/e2e_orchestrator/.gitlab-ci.yml' + #- local: '/manifests/.gitlab-ci.yml' + - local: '/src/monitoring/.gitlab-ci.yml' + - local: '/src/nbi/.gitlab-ci.yml' + - local: '/src/context/.gitlab-ci.yml' + - local: '/src/device/.gitlab-ci.yml' + - local: '/src/service/.gitlab-ci.yml' + - local: '/src/dbscanserving/.gitlab-ci.yml' + - local: '/src/opticalattackmitigator/.gitlab-ci.yml' + - local: '/src/opticalattackdetector/.gitlab-ci.yml' + - local: '/src/opticalattackmanager/.gitlab-ci.yml' + - local: '/src/opticalcontroller/.gitlab-ci.yml' + - local: '/src/ztp/.gitlab-ci.yml' + - local: '/src/policy/.gitlab-ci.yml' + #- local: '/src/automation/.gitlab-ci.yml' + - local: '/src/forecaster/.gitlab-ci.yml' + #- local: '/src/webui/.gitlab-ci.yml' + #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' + #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' + #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' + - local: '/src/slice/.gitlab-ci.yml' + #- local: '/src/interdomain/.gitlab-ci.yml' + - local: '/src/pathcomp/.gitlab-ci.yml' + #- local: '/src/dlt/.gitlab-ci.yml' + - local: '/src/load_generator/.gitlab-ci.yml' + - local: '/src/bgpls_speaker/.gitlab-ci.yml' + - local: '/src/kpi_manager/.gitlab-ci.yml' + - local: '/src/kpi_value_api/.gitlab-ci.yml' + - local: '/src/kpi_value_writer/.gitlab-ci.yml' + - local: '/src/telemetry/.gitlab-ci.yml' + - local: '/src/analytics/.gitlab-ci.yml' + - local: '/src/qos_profile/.gitlab-ci.yml' + - local: '/src/vnt_manager/.gitlab-ci.yml' + - local: '/src/e2e_orchestrator/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' diff --git a/manifests/monitoringservice.yaml b/manifests/monitoringservice.yaml index 5b44f91be..3178b487e 100644 --- a/manifests/monitoringservice.yaml +++ b/manifests/monitoringservice.yaml @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "DEBUG" + value: "INFO" envFrom: - secretRef: name: qdb-data diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index 3abdc0ed4..06578bea8 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -15,14 +15,14 @@ # include the individual .gitlab-ci.yml of each end-to-end integration test include: - local: '/src/tests/ofc22/.gitlab-ci.yml' -# #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' -# - local: '/src/tests/ecoc22/.gitlab-ci.yml' -# #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' -# #- local: '/src/tests/ofc23/.gitlab-ci.yml' -# - local: '/src/tests/ofc24/.gitlab-ci.yml' -# - local: '/src/tests/eucnc24/.gitlab-ci.yml' -# - local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml' -# - local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml' -# #- local: '/src/tests/ecoc24/.gitlab-ci.yml' -# -# - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml' + #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' + - local: '/src/tests/ecoc22/.gitlab-ci.yml' + #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' + #- local: '/src/tests/ofc23/.gitlab-ci.yml' + - local: '/src/tests/ofc24/.gitlab-ci.yml' + - local: '/src/tests/eucnc24/.gitlab-ci.yml' + - local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml' + - local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml' + #- local: '/src/tests/ecoc24/.gitlab-ci.yml' + + - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml' diff --git a/src/tests/ofc22/.gitlab-ci.yml b/src/tests/ofc22/.gitlab-ci.yml index 851089657..0fbe2375a 100644 --- a/src/tests/ofc22/.gitlab-ci.yml +++ b/src/tests/ofc22/.gitlab-ci.yml @@ -61,7 +61,7 @@ end2end_test ofc22: #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/sliceservice.yaml #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml - - yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml - source src/tests/${TEST_NAME}/deploy_specs.sh #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" #- export TFS_SKIP_BUILD="YES" diff --git a/src/tests/ofc22/tests/test_functional_bootstrap.py b/src/tests/ofc22/tests/test_functional_bootstrap.py index c8a4803ed..9318c1378 100644 --- a/src/tests/ofc22/tests/test_functional_bootstrap.py +++ b/src/tests/ofc22/tests/test_functional_bootstrap.py @@ -56,8 +56,8 @@ def test_scenario_devices_enabled( num_devices = -1 num_devices_enabled, num_retry = 0, 0 - while (num_devices != num_devices_enabled) and (num_retry < 10): - time.sleep(1.0) + while (num_devices != num_devices_enabled) and (num_retry < 30): + time.sleep(2.0) response = context_client.ListDevices(Empty()) num_devices = len(response.devices) num_devices_enabled = 0 @@ -88,10 +88,10 @@ def test_scenario_kpis_created( LOGGER.info('Num KPIs expected: {:d}'.format(num_kpis_expected)) num_kpis_created, num_retry = 0, 0 - while (num_kpis_created != num_kpis_expected) and (num_retry < 10): + while (num_kpis_created != num_kpis_expected) and (num_retry < 30): + time.sleep(2.0) response: KpiDescriptorList = monitoring_client.GetKpiDescriptorList(Empty()) num_kpis_created = len(response.kpi_descriptor_list) LOGGER.info('Num KPIs created: {:d}'.format(num_kpis_created)) - time.sleep(0.5) num_retry += 1 assert num_kpis_created == num_kpis_expected -- GitLab From 6573fa12c74acc0292df100d0e47aa683b9c8670 Mon Sep 17 00:00:00 2001 From: Lluis Gifre Renom Date: Sat, 1 Mar 2025 17:50:29 +0000 Subject: [PATCH 288/463] Fix CI/CD pipeline --- src/tests/eucnc24/.gitlab-ci.yml | 66 ++++++++++++++++---------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/tests/eucnc24/.gitlab-ci.yml b/src/tests/eucnc24/.gitlab-ci.yml index 02c4cced3..1ae05f274 100644 --- a/src/tests/eucnc24/.gitlab-ci.yml +++ b/src/tests/eucnc24/.gitlab-ci.yml @@ -46,7 +46,7 @@ end2end_test eucnc24: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker rm -f ${TEST_NAME} || true - - sudo containerlab destroy --all --cleanup || true + - containerlab destroy --all --cleanup || true script: # Download Docker image to run the test @@ -63,7 +63,7 @@ end2end_test eucnc24: - cp -R src/tests/${TEST_NAME}/clab/* /tmp/clab/${TEST_NAME} - tree -la /tmp/clab/${TEST_NAME} - cd /tmp/clab/${TEST_NAME} - - sudo containerlab deploy --reconfigure --topo eucnc24.clab.yml + - containerlab deploy --reconfigure --topo eucnc24.clab.yml - cd $RUNNER_PATH # Wait for initialization of Device NOSes @@ -71,9 +71,9 @@ end2end_test eucnc24: - docker ps -a # Dump configuration of the routers (before any configuration) - - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" # Configure TeraFlowSDN deployment # Uncomment if DEBUG log level is needed for the components @@ -132,27 +132,27 @@ end2end_test eucnc24: $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-tfs-create.sh # Dump configuration of the routers (after configure TFS service) - - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" # Run end-to-end test: test connectivity with ping - - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.10' --format json) + - export TEST1_10=$(containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.10' --format json) - echo $TEST1_10 - echo $TEST1_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.1' --format json) + - export TEST1_1=$(containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.1' --format json) - echo $TEST1_1 - echo $TEST1_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.1' --format json) + - export TEST2_1=$(containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.1' --format json) - echo $TEST2_1 - echo $TEST2_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.10' --format json) + - export TEST2_10=$(containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.10' --format json) - echo $TEST2_10 - echo $TEST2_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.1' --format json) + - export TEST3_1=$(containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.1' --format json) - echo $TEST3_1 - echo $TEST3_1 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' - - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.10' --format json) + - export TEST3_10=$(containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.10' --format json) - echo $TEST3_10 - echo $TEST3_10 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' @@ -164,9 +164,9 @@ end2end_test eucnc24: $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-tfs-remove.sh # Dump configuration of the routers (after deconfigure TFS service) - - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" # Run end-to-end test: configure service IETF - > @@ -176,27 +176,27 @@ end2end_test eucnc24: $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-create.sh # Dump configuration of the routers (after configure IETF service) - - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" # Run end-to-end test: test connectivity with ping - - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.10' --format json) + - export TEST1_10=$(containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.10' --format json) - echo $TEST1_10 - echo $TEST1_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.1' --format json) + - export TEST1_1=$(containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.1' --format json) - echo $TEST1_1 - echo $TEST1_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.1' --format json) + - export TEST2_1=$(containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.1' --format json) - echo $TEST2_1 - echo $TEST2_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.10' --format json) + - export TEST2_10=$(containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.10' --format json) - echo $TEST2_10 - echo $TEST2_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' - - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.1' --format json) + - export TEST3_1=$(containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.1' --format json) - echo $TEST3_1 - echo $TEST3_1 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' - - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.10' --format json) + - export TEST3_10=$(containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.10' --format json) - echo $TEST3_10 - echo $TEST3_10 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' @@ -208,9 +208,9 @@ end2end_test eucnc24: $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-remove.sh # Dump configuration of the routers (after deconfigure IETF service) - - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" # Run end-to-end test: cleanup scenario - > @@ -221,9 +221,9 @@ end2end_test eucnc24: after_script: # Dump configuration of the routers (on after_script) - - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" - - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" # Dump TeraFlowSDN component logs - source src/tests/${TEST_NAME}/deploy_specs.sh @@ -239,7 +239,7 @@ end2end_test eucnc24: - RUNNER_PATH=`pwd` #- cd $PWD/src/tests/${TEST_NAME} - cd /tmp/clab/${TEST_NAME} - - sudo containerlab destroy --topo eucnc24.clab.yml --cleanup || true + - containerlab destroy --topo eucnc24.clab.yml --cleanup || true - sudo rm -rf clab-eucnc24/ .eucnc24.clab.yml.bak || true - cd $RUNNER_PATH - kubectl delete namespaces tfs || true -- GitLab From cdf65bba37a2c374e05119cccd62ab059bcfc004 Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Sun, 2 Mar 2025 07:30:37 +0000 Subject: [PATCH 289/463] Changes in Analytics, DB, KPI Enums, KPI Manager and Telemetery - Create Kafka topic added in main method of services - KPI sample types added in ENUM class - Methods are commented in _Collector class. - In Telemetry backend, logic is added get device ID, enpoint ID and devicec type from Context and KPI DB. --- src/analytics/backend/service/__main__.py | 5 + src/analytics/frontend/service/__main__.py | 5 + src/common/tools/database/GenericEngine.py | 4 +- .../database/models/enums/KpiSampleType.py | 17 +- src/kpi_manager/tests/test_messages.py | 10 +- src/telemetry/backend/Dockerfile | 4 + .../backend/collector_api/_Collector.py | 126 +++++++-------- .../service/TelemetryBackendService.py | 80 ++++++---- src/telemetry/backend/service/__main__.py | 3 + src/telemetry/backend/tests/Fixtures.py | 58 +++++++ src/telemetry/backend/tests/add_devices.py | 78 +++++++++ src/telemetry/backend/tests/messages.py | 23 ++- src/telemetry/backend/tests/test_backend.py | 137 ++++++++++++++-- src/telemetry/backend/tests/topology.json | 148 ++++++++++++++++++ .../TelemetryFrontendServiceServicerImpl.py | 54 +------ src/telemetry/frontend/service/__main__.py | 4 + src/telemetry/frontend/tests/Messages.py | 9 +- src/telemetry/frontend/tests/test_frontend.py | 22 +-- 18 files changed, 591 insertions(+), 196 deletions(-) create mode 100644 src/telemetry/backend/tests/Fixtures.py create mode 100644 src/telemetry/backend/tests/add_devices.py create mode 100644 src/telemetry/backend/tests/topology.json diff --git a/src/analytics/backend/service/__main__.py b/src/analytics/backend/service/__main__.py index 533761bab..55bcb53e4 100644 --- a/src/analytics/backend/service/__main__.py +++ b/src/analytics/backend/service/__main__.py @@ -16,8 +16,11 @@ import logging, signal, sys, threading from prometheus_client import start_http_server from common.Settings import get_log_level, get_metrics_port from .AnalyticsBackendService import AnalyticsBackendService +from common.tools.kafka.Variables import KafkaTopic + terminate = threading.Event() +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') LOGGER = None def signal_handler(signal, frame): # pylint: disable=redefined-outer-name @@ -36,6 +39,8 @@ def main(): LOGGER.info('Starting...') + KafkaTopic.create_all_topics() + # Start metrics server metrics_port = get_metrics_port() start_http_server(metrics_port) diff --git a/src/analytics/frontend/service/__main__.py b/src/analytics/frontend/service/__main__.py index edf94c4fd..a79b2bbc6 100644 --- a/src/analytics/frontend/service/__main__.py +++ b/src/analytics/frontend/service/__main__.py @@ -18,8 +18,11 @@ from common.Settings import get_log_level, get_metrics_port from .AnalyticsFrontendService import AnalyticsFrontendService from analytics.database.AnalyzerModel import Analyzer as Model from common.tools.database.GenericDatabase import Database +from common.tools.kafka.Variables import KafkaTopic + terminate = threading.Event() +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') LOGGER = None def signal_handler(signal, frame): # pylint: disable=redefined-outer-name @@ -43,6 +46,8 @@ def main(): kpiDBobj.create_database() kpiDBobj.create_tables() + KafkaTopic.create_all_topics() + # Start metrics server metrics_port = get_metrics_port() start_http_server(metrics_port) diff --git a/src/common/tools/database/GenericEngine.py b/src/common/tools/database/GenericEngine.py index 1d38a1f44..89b6c2b6d 100644 --- a/src/common/tools/database/GenericEngine.py +++ b/src/common/tools/database/GenericEngine.py @@ -33,8 +33,8 @@ class Engine: CRDB_USERNAME, CRDB_PASSWORD, CRDB_NAMESPACE, CRDB_SQL_PORT, CRDB_DATABASE, CRDB_SSLMODE) try: engine = sqlalchemy.create_engine(crdb_uri, echo=False) - LOGGER.info(' AnalyzerDB initalized with DB URL: {:}'.format(crdb_uri)) + LOGGER.info(' Database initalized with DB URL: {:}'.format(crdb_uri)) + return engine except: # pylint: disable=bare-except # pragma: no cover LOGGER.exception('Failed to connect to database: {:s}'.format(str(crdb_uri))) return None # type: ignore - return engine diff --git a/src/context/service/database/models/enums/KpiSampleType.py b/src/context/service/database/models/enums/KpiSampleType.py index 77b568dcf..66afdb710 100644 --- a/src/context/service/database/models/enums/KpiSampleType.py +++ b/src/context/service/database/models/enums/KpiSampleType.py @@ -22,13 +22,16 @@ from ._GrpcToEnum import grpc_to_enum # BYTES_RECEIVED. If item name does not match, automatic mapping of # proto enums to database enums will fail. class ORM_KpiSampleTypeEnum(enum.Enum): - UNKNOWN = KpiSampleType.KPISAMPLETYPE_UNKNOWN - PACKETS_TRANSMITTED = KpiSampleType.KPISAMPLETYPE_PACKETS_TRANSMITTED - PACKETS_RECEIVED = KpiSampleType.KPISAMPLETYPE_PACKETS_RECEIVED - BYTES_TRANSMITTED = KpiSampleType.KPISAMPLETYPE_BYTES_TRANSMITTED - BYTES_RECEIVED = KpiSampleType.KPISAMPLETYPE_BYTES_RECEIVED - LINK_TOTAL_CAPACITY_GBPS = KpiSampleType.KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS - LINK_USED_CAPACITY_GBPS = KpiSampleType.KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS + UNKNOWN = KpiSampleType.KPISAMPLETYPE_UNKNOWN # 0 + PACKETS_TRANSMITTED = KpiSampleType.KPISAMPLETYPE_PACKETS_TRANSMITTED # 101 + PACKETS_RECEIVED = KpiSampleType.KPISAMPLETYPE_PACKETS_RECEIVED # 102 + PACKETS_DROPPED = KpiSampleType.KPISAMPLETYPE_PACKETS_DROPPED # 103 + BYTES_TRANSMITTED = KpiSampleType.KPISAMPLETYPE_BYTES_TRANSMITTED # 201 + BYTES_RECEIVED = KpiSampleType.KPISAMPLETYPE_BYTES_RECEIVED # 202 + BYTES_DROPPED = KpiSampleType.KPISAMPLETYPE_BYTES_DROPPED # 203 + LINK_TOTAL_CAPACITY_GBPS = KpiSampleType.KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS # 301 + LINK_USED_CAPACITY_GBPS = KpiSampleType.KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS # 302 + grpc_to_enum__kpi_sample_type = functools.partial( grpc_to_enum, KpiSampleType, ORM_KpiSampleTypeEnum) diff --git a/src/kpi_manager/tests/test_messages.py b/src/kpi_manager/tests/test_messages.py index ebe13b661..811661a4e 100644 --- a/src/kpi_manager/tests/test_messages.py +++ b/src/kpi_manager/tests/test_messages.py @@ -26,15 +26,15 @@ def create_kpi_id_request(): def create_kpi_descriptor_request(descriptor_name: str = "Test_name"): _create_kpi_request = kpi_manager_pb2.KpiDescriptor() - _create_kpi_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) + # _create_kpi_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) # _create_kpi_request.kpi_id.kpi_id.uuid = "6e22f180-ba28-4641-b190-2287bf448888" - # _create_kpi_request.kpi_id.kpi_id.uuid = "1e22f180-ba28-4641-b190-2287bf446666" + _create_kpi_request.kpi_id.kpi_id.uuid = "f974b6cc-095f-4767-b8c1-3457b383fb99" _create_kpi_request.kpi_description = descriptor_name _create_kpi_request.kpi_sample_type = KpiSampleType.KPISAMPLETYPE_PACKETS_RECEIVED - _create_kpi_request.device_id.device_uuid.uuid = 'DEV2' + _create_kpi_request.device_id.device_uuid.uuid = str(uuid.uuid4()) _create_kpi_request.service_id.service_uuid.uuid = 'SERV2' - _create_kpi_request.slice_id.slice_uuid.uuid = 'SLC1' - _create_kpi_request.endpoint_id.endpoint_uuid.uuid = 'END1' + _create_kpi_request.slice_id.slice_uuid.uuid = 'SLC1' + _create_kpi_request.endpoint_id.endpoint_uuid.uuid = str(uuid.uuid4()) _create_kpi_request.connection_id.connection_uuid.uuid = 'CON1' _create_kpi_request.link_id.link_uuid.uuid = 'LNK1' return _create_kpi_request diff --git a/src/telemetry/backend/Dockerfile b/src/telemetry/backend/Dockerfile index 4bc5605d5..7448f1ebc 100644 --- a/src/telemetry/backend/Dockerfile +++ b/src/telemetry/backend/Dockerfile @@ -62,6 +62,10 @@ RUN python3 -m pip install -r requirements.txt # Add component files into working directory WORKDIR /var/teraflow +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/kpi_manager/client/. kpi_manager/client/ +COPY src/kpi_manager/__init__.py kpi_manager/__init__.py COPY src/telemetry/__init__.py telemetry/__init__.py COPY src/telemetry/backend/. telemetry/backend/ diff --git a/src/telemetry/backend/collector_api/_Collector.py b/src/telemetry/backend/collector_api/_Collector.py index d6e711d65..a4bd7f17f 100644 --- a/src/telemetry/backend/collector_api/_Collector.py +++ b/src/telemetry/backend/collector_api/_Collector.py @@ -71,69 +71,69 @@ class _Collector: """ raise NotImplementedError() - def GetInitialConfig(self) -> List[Tuple[str, Any]]: - """ Retrieve initial configuration of entire device. - Returns: - values : List[Tuple[str, Any]] - List of tuples (resource key, resource value) for - resource keys. - """ - raise NotImplementedError() - - def GetConfig(self, resource_keys: List[str] = []) -> \ - List[Tuple[str, Union[Any, None, Exception]]]: - """ Retrieve running configuration of entire device or - selected resource keys. - Parameters: - resource_keys : List[str] - List of keys pointing to the resources to be retrieved. - Returns: - values : List[Tuple[str, Union[Any, None, Exception]]] - List of tuples (resource key, resource value) for - resource keys requested. If a resource is found, - the appropriate value type must be retrieved. - If a resource is not found, None must be retrieved as - value for that resource. In case of Exception, - the Exception must be retrieved as value. - """ - raise NotImplementedError() - - def SetConfig(self, resources: List[Tuple[str, Any]]) -> \ - List[Union[bool, Exception]]: - """ Create/Update configuration for a list of resources. - Parameters: - resources : List[Tuple[str, Any]] - List of tuples, each containing a resource_key pointing the - resource to be modified, and a resource_value containing - the new value to be set. - Returns: - results : List[Union[bool, Exception]] - List of results for resource key changes requested. - Return values must be in the same order as the - resource keys requested. If a resource is properly set, - True must be retrieved; otherwise, the Exception that is - raised during the processing must be retrieved. - """ - raise NotImplementedError() - - def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> \ - List[Union[bool, Exception]]: - """ Delete configuration for a list of resources. - Parameters: - resources : List[Tuple[str, Any]] - List of tuples, each containing a resource_key pointing the - resource to be modified, and a resource_value containing - possible additionally required values to locate - the value to be removed. - Returns: - results : List[Union[bool, Exception]] - List of results for resource key deletions requested. - Return values must be in the same order as the resource keys - requested. If a resource is properly deleted, True must be - retrieved; otherwise, the Exception that is raised during - the processing must be retrieved. - """ - raise NotImplementedError() + # def GetInitialConfig(self) -> List[Tuple[str, Any]]: + # """ Retrieve initial configuration of entire device. + # Returns: + # values : List[Tuple[str, Any]] + # List of tuples (resource key, resource value) for + # resource keys. + # """ + # raise NotImplementedError() + + # def GetConfig(self, resource_keys: List[str] = []) -> \ + # List[Tuple[str, Union[Any, None, Exception]]]: + # """ Retrieve running configuration of entire device or + # selected resource keys. + # Parameters: + # resource_keys : List[str] + # List of keys pointing to the resources to be retrieved. + # Returns: + # values : List[Tuple[str, Union[Any, None, Exception]]] + # List of tuples (resource key, resource value) for + # resource keys requested. If a resource is found, + # the appropriate value type must be retrieved. + # If a resource is not found, None must be retrieved as + # value for that resource. In case of Exception, + # the Exception must be retrieved as value. + # """ + # raise NotImplementedError() + + # def SetConfig(self, resources: List[Tuple[str, Any]]) -> \ + # List[Union[bool, Exception]]: + # """ Create/Update configuration for a list of resources. + # Parameters: + # resources : List[Tuple[str, Any]] + # List of tuples, each containing a resource_key pointing the + # resource to be modified, and a resource_value containing + # the new value to be set. + # Returns: + # results : List[Union[bool, Exception]] + # List of results for resource key changes requested. + # Return values must be in the same order as the + # resource keys requested. If a resource is properly set, + # True must be retrieved; otherwise, the Exception that is + # raised during the processing must be retrieved. + # """ + # raise NotImplementedError() + + # def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> \ + # List[Union[bool, Exception]]: + # """ Delete configuration for a list of resources. + # Parameters: + # resources : List[Tuple[str, Any]] + # List of tuples, each containing a resource_key pointing the + # resource to be modified, and a resource_value containing + # possible additionally required values to locate + # the value to be removed. + # Returns: + # results : List[Union[bool, Exception]] + # List of results for resource key deletions requested. + # Return values must be in the same order as the resource keys + # requested. If a resource is properly deleted, True must be + # retrieved; otherwise, the Exception that is raised during + # the processing must be retrieved. + # """ + # raise NotImplementedError() def SubscribeState(self, subscriptions: List[Tuple[str, dict, float, float]]) -> \ bool: diff --git a/src/telemetry/backend/service/TelemetryBackendService.py b/src/telemetry/backend/service/TelemetryBackendService.py index c392efd1d..40cd1443a 100755 --- a/src/telemetry/backend/service/TelemetryBackendService.py +++ b/src/telemetry/backend/service/TelemetryBackendService.py @@ -16,7 +16,7 @@ import json import time import logging import threading -from typing import Any, Dict +from typing import Any, Dict, Tuple from datetime import datetime, timezone from confluent_kafka import Producer as KafkaProducer from confluent_kafka import Consumer as KafkaConsumer @@ -26,10 +26,15 @@ from common.Settings import get_service_port_grpc from common.method_wrappers.Decorator import MetricsPool from common.tools.kafka.Variables import KafkaConfig, KafkaTopic from common.tools.service.GenericGrpcService import GenericGrpcService +from common.tools.context_queries.Device import get_device +from common.proto.kpi_manager_pb2 import KpiId + +from kpi_manager.client.KpiManagerClient import KpiManagerClient +from context.client.ContextClient import ContextClient from telemetry.backend.collectors.emulated.EmulatedCollector import EmulatedCollector -LOGGER = logging.getLogger(__name__) -METRICS_POOL = MetricsPool('TelemetryBackend', 'backendService') +LOGGER = logging.getLogger(__name__) +METRICS_POOL = MetricsPool('TelemetryBackend', 'backendService') class TelemetryBackendService(GenericGrpcService): """ @@ -44,7 +49,9 @@ class TelemetryBackendService(GenericGrpcService): self.kafka_consumer = KafkaConsumer({'bootstrap.servers' : KafkaConfig.get_kafka_address(), 'group.id' : 'backend', 'auto.offset.reset' : 'latest'}) - self.collector = EmulatedCollector(address="127.0.0.1", port=8000) + self.collector = EmulatedCollector(address="127.0.0.1", port=8000) + self.context_client = ContextClient() + self.kpi_manager_client = KpiManagerClient() self.active_jobs = {} def install_servicers(self): @@ -116,16 +123,13 @@ class TelemetryBackendService(GenericGrpcService): """ Method to handle collector request. """ - end_points : dict = self.get_endpoints_from_kpi_id(kpi_id) - if not end_points: + device_type, end_points = self.get_endpoint_detail(kpi_id) + # end_points : dict = self.get_endpoints_from_kpi_id(kpi_id) + if end_points is None: LOGGER.warning("KPI ID: {:} - Endpoints not found. Skipping...".format(kpi_id)) - - device_type : str = self.get_device_type_from_kpi_id(kpi_id) - - if device_type == "Unknown": - LOGGER.warning("KPI ID: {:} - Device Type not found. Skipping...".format(kpi_id)) - - if device_type == "EMU-Device": + return + # device_type : str = self.get_device_type_from_kpi_id(kpi_id) + if device_type and "emu" in device_type: LOGGER.info("KPI ID: {:} - Device Type: {:} - Endpoints: {:}".format(kpi_id, device_type, end_points)) subscription = [collector_id, end_points, duration, interval] self.EmulatedCollectorHandler(subscription, duration, collector_id, kpi_id, stop_event) @@ -186,28 +190,40 @@ class TelemetryBackendService(GenericGrpcService): except: LOGGER.exception("Error terminating job: {:}".format(job_id)) -# --- Mock Methods --- - def get_endpoints_from_kpi_id(self, kpi_id: str) -> dict: + def get_endpoint_detail(self, kpi_id: str): """ - Method to get endpoints based on kpi_id. + Method to get device_type and endpoint detail based on device_uuid. """ - kpi_endpoints = { - '6e22f180-ba28-4641-b190-2287bf448888': {"uuid": "123e4567-e89b-12d3-a456-42661417ed06", "name": "eth0", "type": "ethernet", "sample_types": [101, 102]}, - '123e4567-e89b-12d3-a456-426614174001': {"uuid": "123e4567-e89b-12d3-a456-42661417ed07", "name": "eth1", "type": "ethernet", "sample_types": []}, - '123e4567-e89b-12d3-a456-426614174002': {"uuid": "123e4567-e89b-12d3-a456-42661417ed08", "name": "13/1/2", "type": "copper", "sample_types": [101, 102, 201, 202]}, - } - return kpi_endpoints.get(kpi_id, {}) if kpi_id in kpi_endpoints else {} + kpi_id_obj = KpiId() + kpi_id_obj.kpi_id.uuid = kpi_id + kpi_descriptor = self.kpi_manager_client.GetKpiDescriptor(kpi_id_obj) + if not kpi_descriptor: + LOGGER.warning(f"KPI ID: {kpi_id} - Descriptor not found. Skipping...") + return (None, None) - def get_device_type_from_kpi_id(self, kpi_id: str) -> str: - """ - Method to get device type based on kpi_id. - """ - kpi_device_types = { - "123e4567-e89b-12d3-a456-42661type003" : {'device_type': "PKT-Device"}, - "123e4567-e89b-12d3-a456-42661type004" : {'device_type': "OPT-Device"}, - "6e22f180-ba28-4641-b190-2287bf448888" : {'device_type': "EMU-Device"}, - } - return kpi_device_types.get(kpi_id, {}).get('device_type', "Unknown") + device_id = kpi_descriptor.device_id.device_uuid.uuid + endpoint_id = kpi_descriptor.endpoint_id.endpoint_uuid.uuid + device = get_device( context_client = self.context_client, + device_uuid = device_id, + include_config_rules = False, + include_components = False, + ) + if device: + for endpoint in device.device_endpoints: + if endpoint.endpoint_id.endpoint_uuid.uuid == endpoint_id: + endpoint_dict = {} + kpi_sample_types = [] + endpoint_dict["uuid"] = endpoint.endpoint_id.endpoint_uuid.uuid + endpoint_dict["name"] = endpoint.name + endpoint_dict["type"] = endpoint.endpoint_type + for sample_type in endpoint.kpi_sample_types: + kpi_sample_types.append(sample_type) + endpoint_dict["sample_types"] = kpi_sample_types + + return (device.device_type, endpoint_dict) + + LOGGER.warning(f"Device ID: {device_id} - Endpoint ID: {endpoint_id} - Not Found") + return (None, None) def delivery_callback(self, err, msg): if err: diff --git a/src/telemetry/backend/service/__main__.py b/src/telemetry/backend/service/__main__.py index 61ff39721..6e77d5d6c 100644 --- a/src/telemetry/backend/service/__main__.py +++ b/src/telemetry/backend/service/__main__.py @@ -16,6 +16,7 @@ import logging, signal, sys, threading from prometheus_client import start_http_server from common.Settings import get_log_level, get_metrics_port from .TelemetryBackendService import TelemetryBackendService +from common.tools.kafka.Variables import KafkaTopic terminate = threading.Event() LOGGER = None @@ -34,6 +35,8 @@ def main(): signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGTERM, signal_handler) + KafkaTopic.create_all_topics() + LOGGER.info('Starting...') # Start metrics server diff --git a/src/telemetry/backend/tests/Fixtures.py b/src/telemetry/backend/tests/Fixtures.py new file mode 100644 index 000000000..59f1b761c --- /dev/null +++ b/src/telemetry/backend/tests/Fixtures.py @@ -0,0 +1,58 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 pytest +import logging + +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from kpi_manager.client.KpiManagerClient import KpiManagerClient + + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + + +@pytest.fixture(scope='session') +def context_client(): + _client = ContextClient(host="10.152.183.234") + _client.connect() + LOGGER.info('Yielding Connected ContextClient...') + yield _client + _client.close() + +@pytest.fixture(scope='session') +def device_client(): + _client = DeviceClient(host="10.152.183.95") + _client.connect() + LOGGER.info('Yielding Connected DeviceClient...') + yield _client + _client.close() + +@pytest.fixture(scope='session') +def service_client(): + _client = ServiceClient(host="10.152.183.47") + _client.connect() + LOGGER.info('Yielding Connected DeviceClient...') + yield _client + _client.close() + +@pytest.fixture(scope='session') +def kpi_manager_client(): + _client = KpiManagerClient(host="10.152.183.118") + LOGGER.info('Yielding Connected KpiManagerClient...') + yield _client + _client.close() + LOGGER.info('Closed KpiManagerClient...') diff --git a/src/telemetry/backend/tests/add_devices.py b/src/telemetry/backend/tests/add_devices.py new file mode 100644 index 000000000..9fe02a953 --- /dev/null +++ b/src/telemetry/backend/tests/add_devices.py @@ -0,0 +1,78 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os, time +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum, Empty +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from .Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'topology.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def load_topology( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + LOGGER.info('Loading Topology...') + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + LOGGER.info('Descriptor Loader Created') + results = descriptor_loader.process() + # LOGGER.info('Descriptor Load Results: {:s}'.format(str(results))) + check_descriptor_load_results(results, descriptor_loader) + # descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + +def test_scenario_devices_enabled( + context_client : ContextClient, # pylint: disable=redefined-outer-name +) -> None: + """ + This test validates that the devices are enabled. + """ + DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + disabled_devices = list() + response = None + num_devices = -1 + num_devices_enabled, num_retry = 0, 0 + while (num_devices != num_devices_enabled) and (num_retry < 10): + time.sleep(1.0) + response = context_client.ListDevices(Empty()) + num_devices = len(response.devices) + num_devices_enabled = 0 + disabled_devices = list() + for device in response.devices: + if device.device_operational_status == DEVICE_OP_STATUS_ENABLED: + num_devices_enabled += 1 + else: + disabled_devices.append(grpc_message_to_json(device)) + LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) + num_retry += 1 + if num_devices_enabled != num_devices: + LOGGER.info('Disabled Devices: {:s}'.format(str(disabled_devices))) + LOGGER.info('Devices: {:s}'.format(grpc_message_to_json_string(response))) + assert num_devices_enabled == num_devices diff --git a/src/telemetry/backend/tests/messages.py b/src/telemetry/backend/tests/messages.py index f6a2bb247..0d31cd15f 100644 --- a/src/telemetry/backend/tests/messages.py +++ b/src/telemetry/backend/tests/messages.py @@ -15,8 +15,8 @@ import uuid import random from common.proto import telemetry_frontend_pb2 -# from common.proto.kpi_sample_types_pb2 import KpiSampleType -# from common.proto.kpi_manager_pb2 import KpiId +from common.proto.kpi_sample_types_pb2 import KpiSampleType +from common.proto.kpi_manager_pb2 import KpiDescriptor, KpiId def create_collector_request(): _create_collector_request = telemetry_frontend_pb2.Collector() @@ -24,8 +24,25 @@ def create_collector_request(): # _create_collector_request.collector_id.collector_id.uuid = "efef4d95-1cf1-43c4-9742-95c283dddddd" _create_collector_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) # _create_collector_request.kpi_id.kpi_id.uuid = "6e22f180-ba28-4641-b190-2287bf448888" - _create_collector_request.duration_s = float(random.randint(8, 16)) + _create_collector_request.duration_s = float(random.randint(30, 50)) # _create_collector_request.duration_s = -1 _create_collector_request.interval_s = float(random.randint(2, 4)) return _create_collector_request +def _create_kpi_descriptor(device_id : str = ""): + _create_kpi_request = KpiDescriptor() + _create_kpi_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _create_kpi_request.kpi_description = "Test Description" + _create_kpi_request.kpi_sample_type = KpiSampleType.KPISAMPLETYPE_PACKETS_RECEIVED + _create_kpi_request.device_id.device_uuid.uuid = device_id + _create_kpi_request.service_id.service_uuid.uuid = 'SERV3' + _create_kpi_request.slice_id.slice_uuid.uuid = 'SLC3' + _create_kpi_request.endpoint_id.endpoint_uuid.uuid = '36571df2-bac1-5909-a27d-5f42491d2ff0' + _create_kpi_request.connection_id.connection_uuid.uuid = 'CON2' + _create_kpi_request.link_id.link_uuid.uuid = 'LNK2' + return _create_kpi_request + +def _create_kpi_id(kpi_id : str = "fc046641-0c9a-4750-b4d9-9f98401714e2"): + _create_kpi_id_request = KpiId() + _create_kpi_id_request.kpi_id.uuid = kpi_id + return _create_kpi_id_request diff --git a/src/telemetry/backend/tests/test_backend.py b/src/telemetry/backend/tests/test_backend.py index 28b92fb29..1329aa969 100644 --- a/src/telemetry/backend/tests/test_backend.py +++ b/src/telemetry/backend/tests/test_backend.py @@ -16,11 +16,19 @@ import pytest import logging import time from telemetry.backend.service.TelemetryBackendService import TelemetryBackendService -from .messages import create_collector_request -from .Fixtures import context_client, device_client +from .messages import create_collector_request, _create_kpi_descriptor, _create_kpi_id +from .Fixtures import context_client, device_client, service_client, kpi_manager_client from .add_devices import load_topology +from common.tools.context_queries.Topology import get_topology +from common.Constants import DEFAULT_CONTEXT_NAME +from common.tools.context_queries.Device import get_device, add_device_to_topology +# from common.tools.context_queries.EndPoint import get_endpoint_names +from .EndPoint import get_endpoint_names # modofied version of get_endpoint_names +from common.proto.context_pb2 import EndPointId, DeviceId, TopologyId, ContextId , Empty +from common.proto.kpi_manager_pb2 import KpiId LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) ########################### @@ -37,6 +45,120 @@ def log_all_methods(request): yield LOGGER.info(f" <<<<< Finished test: {request.node.name} ") +# # ----- Add Topology ----- +# def test_add_to_topology(context_client, device_client, service_client): +# load_topology(context_client, device_client) + +# # ----- Add Device to Topology ------ +# def test_add_device_to_topology(context_client): +# context_id = ContextId() +# context_id.context_uuid.uuid = "43813baf-195e-5da6-af20-b3d0922e71a7" +# topology_uuid = "c76135e3-24a8-5e92-9bed-c3c9139359c8" +# device_uuid = "69a3a3f0-5237-5f9e-bc96-d450d0c6c03a" +# response = add_device_to_topology( context_client = context_client, +# context_id = context_id, +# topology_uuid = topology_uuid, +# device_uuid = device_uuid +# ) +# LOGGER.info(f"Device added to topology: {response}") +# assert response is True + +# # ----- Get Topology ----- +# def test_get_topology(context_client, device_client): +# response = get_topology(context_client = context_client, topology_uuid = "test1", context_uuid = "test1") +# LOGGER.info(f"Topology: {response}") +# assert response is not None + +# def test_set_kpi_descriptor_and_get_device_id(kpi_manager_client): +# kpi_descriptor = _create_kpi_descriptor("1290fb71-bf15-5528-8b69-2d2fabe1fa18") +# kpi_id = kpi_manager_client.SetKpiDescriptor(kpi_descriptor) +# LOGGER.info(f"KPI Descriptor set: {kpi_id}") +# assert kpi_id is not None + +# response = kpi_manager_client.GetKpiDescriptor(kpi_id) +# # response = kpi_manager_client.GetKpiDescriptor(_create_kpi_id()) + +# assert response is not None +# LOGGER.info(f"KPI Descriptor: {response}") +# LOGGER.info(f"Device Id: {response.device_id.device_uuid.uuid}") +# LOGGER.info(f"Endpoint Id: {response.endpoint_id.endpoint_uuid.uuid}") + +# # ----- Get endpoint detail using device ID ----- +# def test_get_device_details(context_client): +# response = get_device(context_client = context_client, device_uuid = "1290fb71-bf15-5528-8b69-2d2fabe1fa18", include_config_rules = False, include_components = False) +# if response: +# LOGGER.info(f"Device type: {response.device_type}") +# for endpoint in response.device_endpoints: +# if endpoint.endpoint_id.endpoint_uuid.uuid == '36571df2-bac1-5909-a27d-5f42491d2ff0': +# endpoint_dict = {} +# kpi_sample_types = [] +# # LOGGER.info(f"Endpoint: {endpoint}") +# # LOGGER.info(f"Enpoint_uuid: {endpoint.endpoint_id.endpoint_uuid.uuid}") +# endpoint_dict["uuid"] = endpoint.endpoint_id.endpoint_uuid.uuid +# # LOGGER.info(f"Enpoint_name: {endpoint.name}") +# endpoint_dict["name"] = endpoint.name +# # LOGGER.info(f"Enpoint_type: {endpoint.endpoint_type}") +# endpoint_dict["type"] = endpoint.endpoint_type +# for sample_type in endpoint.kpi_sample_types: +# # LOGGER.info(f"Enpoint_sample_types: {sample_type}") +# kpi_sample_types.append(sample_type) +# endpoint_dict["sample_types"] = kpi_sample_types +# LOGGER.info(f"Extracted endpoint dict: {endpoint_dict}") +# else: +# LOGGER.info(f"Endpoint not matched") +# LOGGER.info(f"Device Type: {type(response)}") +# assert response is not None + +# # ----- List Conetxts ----- +# def test_list_contextIds(context_client): +# empty = Empty() +# response = context_client.ListContexts(empty) +# LOGGER.info(f"Contexts: {response}") +# assert response + +# # ----- List Devices ----- +# def test_list_devices(context_client): +# empty = Empty() +# response = context_client.ListDeviceIds(empty) +# LOGGER.info(f"Devices: {response}") +# assert response + +# ----- Get Endpoints ----- TODO: get_endpoint_names method doesn't return KPI samples types +# def test_get_endpoints(context_client): +# device_id = DeviceId() +# device_id.device_uuid.uuid = "1290fb71-bf15-5528-8b69-2d2fabe1fa18" +# endpoint_id = EndPointId() +# endpoint_id.endpoint_uuid.uuid = "43b817fa-246f-5e0a-a2e3-2aad0b3e16ca" +# endpoint_id.device_id.CopyFrom(device_id) +# response = get_endpoint_names(context_client = context_client, endpoint_ids = [endpoint_id]) +# LOGGER.info(f"Endpoints: {response}") +# assert response is not None + +# # ----- List Topologies ----- +# def test_list_topologies(context_client): +# context_id = ContextId() +# context_id.context_uuid.uuid = "e7d46baa-d38d-5b72-a082-f344274b63ef" +# respone = context_client.ListTopologies(context_id) +# LOGGER.info(f"Topologies: {respone}") + +# # ----- Remove Topology ----- +# def test_remove_topology(context_client): +# context_id = ContextId() +# context_id.context_uuid.uuid = "e7d46baa-d38d-5b72-a082-f344274b63ef" +# topology_id = TopologyId() +# topology_id.topology_uuid.uuid = "9ef0118c-4bca-5e81-808b-dc8f60e2cda4" +# topology_id.context_id.CopyFrom(context_id) + +# response = context_client.RemoveTopology(topology_id) +# LOGGER.info(f"Topology removed: {response}") + +# # ----- Remove context ----- +# def test_remove_context(context_client): +# context_id = ContextId() +# context_id.context_uuid.uuid = "e7d46baa-d38d-5b72-a082-f344274b63ef" +# response = context_client.RemoveContext(context_id) +# LOGGER.info(f"Context removed: {response}") + @pytest.fixture def telemetryBackend_service(): LOGGER.info('Initializing TelemetryBackendService...') @@ -54,15 +176,6 @@ def telemetryBackend_service(): def test_InitiateCollectorBackend(telemetryBackend_service): LOGGER.info(" Backend Initiated Successfully. Waiting for timer to finish ...") - time.sleep(300) + time.sleep(30) LOGGER.info(" Backend Timer Finished Successfully. ") -# --- "test_validate_kafka_topics" should be run before the functionality tests --- -# def test_validate_kafka_topics(): -# LOGGER.debug(" >>> test_validate_kafka_topics: START <<< ") -# response = KafkaTopic.create_all_topics() -# assert isinstance(response, bool) - -# # Call load_topology from the add_devices.py file -# def test_load_topology(context_client, device_client): -# load_topology(context_client, device_client) diff --git a/src/telemetry/backend/tests/topology.json b/src/telemetry/backend/tests/topology.json new file mode 100644 index 000000000..6416130b9 --- /dev/null +++ b/src/telemetry/backend/tests/topology.json @@ -0,0 +1,148 @@ +{ + "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": "DE1"}}, "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": [101, 102], "type": "copper/internal", "uuid": "1/1"}, + {"sample_types": [103, 102], "type": "copper/internal", "uuid": "1/2"}, + {"sample_types": [201, 202], "type": "copper/internal", "uuid": "2/1"}, + {"sample_types": [202, 203], "type": "copper/internal", "uuid": "2/2"}, + {"sample_types": [201, 203], "type": "copper/internal", "uuid": "2/3"}, + {"sample_types": [101, 103], "type": "copper/internal", "uuid": "2/4"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "DE2"}}, "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": [101, 103], "type": "copper/internal", "uuid": "1/1"}, + {"sample_types": [103, 101], "type": "copper/internal", "uuid": "1/2"}, + {"sample_types": [202, 201], "type": "copper/internal", "uuid": "2/1"}, + {"sample_types": [203, 201], "type": "copper/internal", "uuid": "2/2"}, + {"sample_types": [203, 202], "type": "copper/internal", "uuid": "2/3"}, + {"sample_types": [102 ], "type": "copper/internal", "uuid": "2/4"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "DE3"}}, "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": "DE4"}}, "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": "DE1/2/2==DE2/2/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DE1"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "DE2"}}, "endpoint_uuid": {"uuid": "2/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DE1/2/3==DE3/2/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DE1"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "DE3"}}, "endpoint_uuid": {"uuid": "2/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DE1/2/4==DE4/2/1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DE1"}}, "endpoint_uuid": {"uuid": "2/4"}}, + {"device_id": {"device_uuid": {"uuid": "DE4"}}, "endpoint_uuid": {"uuid": "2/1"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "DE2/2/1==DE1/2/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DE2"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "DE1"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DE2/2/3==DE3/2/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DE2"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "DE3"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DE2/2/4==DE4/2/2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DE2"}}, "endpoint_uuid": {"uuid": "2/4"}}, + {"device_id": {"device_uuid": {"uuid": "DE4"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "DE3/2/1==DE1/2/3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DE3"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "DE1"}}, "endpoint_uuid": {"uuid": "2/3"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DE3/2/2==DE2/2/3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DE3"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "DE2"}}, "endpoint_uuid": {"uuid": "2/3"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DE4/2/2==DE2/2/4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DE4"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "DE2"}}, "endpoint_uuid": {"uuid": "2/4"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "DE4/2/1==DE1/2/4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DE4"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "DE1"}}, "endpoint_uuid": {"uuid": "2/4"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DE4/2/2==DE2/2/4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DE4"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "DE2"}}, "endpoint_uuid": {"uuid": "2/4"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "DE4/2/3==DE3/2/4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DE4"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "DE3"}}, "endpoint_uuid": {"uuid": "2/4"}} + ] + } + ] +} diff --git a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py index 1ef8ed46b..955036495 100644 --- a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py +++ b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py @@ -143,58 +143,6 @@ class TelemetryFrontendServiceServicerImpl(TelemetryFrontendServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def delivery_callback(self, err, msg): - """ - Callback function to handle message delivery status. - Args: - err (KafkaError): Kafka error object. - msg (Message): Kafka message object. - """ if err: LOGGER.debug('Message delivery failed: {:}'.format(err)) - # print('Message delivery failed: {:}'.format(err)) - # else: - # LOGGER.debug('Message delivered to topic {:}'.format(msg.topic())) - # print('Message delivered to topic {:}'.format(msg.topic())) - - # ---------- Independent Method --------------- - # Listener method is independent of any method (same lifetime as service) - # continously listens for responses - def install_servicers(self): - threading.Thread(target=self.ResponseListener).start() - - def ResponseListener(self): - """ - listener for response on Kafka topic. - """ - self.kafka_consumer.subscribe([KafkaTopic.TELEMETRY_RESPONSE.value]) - while True: - receive_msg = self.kafka_consumer.poll(2.0) - if receive_msg is None: - continue - elif receive_msg.error(): - if receive_msg.error().code() == KafkaError._PARTITION_EOF: - continue - else: - # print("Consumer error: {:}".format(receive_msg.error())) - LOGGER.error("Consumer error: {:}".format(receive_msg.error())) - break - try: - collector_id = receive_msg.key().decode('utf-8') - if collector_id in ACTIVE_COLLECTORS: - kpi_value = json.loads(receive_msg.value().decode('utf-8')) - self.process_response(collector_id, kpi_value['kpi_id'], kpi_value['kpi_value']) - else: - # print(f"collector id does not match.\nRespone ID: '{collector_id}' --- Active IDs: '{ACTIVE_COLLECTORS}' ") - LOGGER.info("collector id does not match.\nRespone ID: {:} --- Active IDs: {:}".format(collector_id, ACTIVE_COLLECTORS)) - except Exception as e: - # print(f"Error extarcting msg key or value: {str(e)}") - LOGGER.info("Error extarcting msg key or value: {:}".format(e)) - continue - - def process_response(self, collector_id: str, kpi_id: str, kpi_value: Any): - if kpi_id == "-1" and kpi_value == -1: - # print ("Backend termination confirmation for collector id: ", collector_id) - LOGGER.info("Backend termination confirmation for collector id: {:}".format(collector_id)) - else: - LOGGER.info("Backend termination confirmation for collector id: {:}".format(collector_id)) - # print ("KPI Value: Collector Id:", collector_id, ", Kpi Id:", kpi_id, ", Value:", kpi_value) + diff --git a/src/telemetry/frontend/service/__main__.py b/src/telemetry/frontend/service/__main__.py index e1b9dba4e..874b34b8c 100644 --- a/src/telemetry/frontend/service/__main__.py +++ b/src/telemetry/frontend/service/__main__.py @@ -18,6 +18,8 @@ from common.Settings import get_log_level, get_metrics_port from .TelemetryFrontendService import TelemetryFrontendService from telemetry.database.TelemetryModel import Collector as Model from common.tools.database.GenericDatabase import Database +from common.tools.kafka.Variables import KafkaTopic + terminate = threading.Event() LOGGER = None @@ -43,6 +45,8 @@ def main(): kpiDBobj.create_database() kpiDBobj.create_tables() + KafkaTopic.create_all_topics() + # Start metrics server metrics_port = get_metrics_port() start_http_server(metrics_port) diff --git a/src/telemetry/frontend/tests/Messages.py b/src/telemetry/frontend/tests/Messages.py index 177bcc0b7..d766f68fa 100644 --- a/src/telemetry/frontend/tests/Messages.py +++ b/src/telemetry/frontend/tests/Messages.py @@ -30,16 +30,17 @@ def create_collector_request(): # _create_collector_request.collector_id.collector_id.uuid = str(uuid.uuid4()) _create_collector_request.collector_id.collector_id.uuid = "efef4d95-1cf1-43c4-9742-95c283dddddd" # _create_collector_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) - _create_collector_request.kpi_id.kpi_id.uuid = "6e22f180-ba28-4641-b190-2287bf448888" + # _create_collector_request.kpi_id.kpi_id.uuid = "6e22f180-ba28-4641-b190-2287bf448888" + _create_collector_request.kpi_id.kpi_id.uuid = "8c5ca114-cdc7-4081-b128-b667fd159832" # _create_collector_request.duration_s = float(random.randint(8, 16)) - _create_collector_request.duration_s = -1 - _create_collector_request.interval_s = float(random.randint(3, 5)) + _create_collector_request.duration_s = float(random.randint(40, 60)) + _create_collector_request.interval_s = float(random.randint(5, 7)) return _create_collector_request def create_collector_filter(): _create_collector_filter = telemetry_frontend_pb2.CollectorFilter() kpi_id_obj = KpiId() # kpi_id_obj.kpi_id.uuid = str(uuid.uuid4()) - kpi_id_obj.kpi_id.uuid = "a7237fa3-caf4-479d-84b6-4d9f9738fb7f" + kpi_id_obj.kpi_id.uuid = "8c5ca114-cdc7-4081-b128-b667fd159832" _create_collector_filter.kpi_id.append(kpi_id_obj) return _create_collector_filter diff --git a/src/telemetry/frontend/tests/test_frontend.py b/src/telemetry/frontend/tests/test_frontend.py index 6c6107152..767a1f73f 100644 --- a/src/telemetry/frontend/tests/test_frontend.py +++ b/src/telemetry/frontend/tests/test_frontend.py @@ -90,13 +90,6 @@ def telemetryFrontend_client( # Tests Implementation of Telemetry Frontend ########################### -# ------- Re-structuring Test --------- -# --- "test_validate_kafka_topics" should be run before the functionality tests --- -def test_validate_kafka_topics(): - # LOGGER.debug(" >>> test_validate_kafka_topics: START <<< ") - response = KafkaTopic.create_all_topics() - assert isinstance(response, bool) - # ----- core funtionality test ----- def test_StartCollector(telemetryFrontend_client): # LOGGER.info(' >>> test_StartCollector START: <<< ') @@ -104,18 +97,17 @@ def test_StartCollector(telemetryFrontend_client): LOGGER.debug(str(response)) assert isinstance(response, CollectorId) +def test_SelectCollectors(telemetryFrontend_client): + LOGGER.info(' >>> test_SelectCollectors START: <<< ') + response = telemetryFrontend_client.SelectCollectors(create_collector_filter()) + LOGGER.debug(str(response)) + assert isinstance(response, CollectorList) def test_StopCollector(telemetryFrontend_client): # LOGGER.info(' >>> test_StopCollector START: <<< ') - LOGGER.info("Waiting before termination...") - time.sleep(30) + # LOGGER.info("Waiting before termination...") + # time.sleep(30) response = telemetryFrontend_client.StopCollector(create_collector_id()) LOGGER.debug(str(response)) assert isinstance(response, Empty) -# def test_SelectCollectors(telemetryFrontend_client): -# LOGGER.info(' >>> test_SelectCollectors START: <<< ') -# response = telemetryFrontend_client.SelectCollectors(create_collector_filter()) -# LOGGER.debug(str(response)) -# assert isinstance(response, CollectorList) - -- GitLab From 87685c9c58a468f4da960e80148158d8c390528a Mon Sep 17 00:00:00 2001 From: Waleed Akbar Date: Fri, 7 Mar 2025 05:47:47 +0000 Subject: [PATCH 290/463] Updated Telemetry Backend and add monitoring deployment script - Minor changes in Telmetry backend service - new script added to deploy Prom. Gateway, Prometheus and Mimir - Configuration file for Prometheus to scrape Gateway. --- .gitignore | 2 - deploy/monitoring.sh | 53 ---- deploy/new_monitoring.sh | 132 ++++++++++ manifests/monitoring/grafana_values.yaml | 235 ++++++++++++++++++ .../prometheus_values.yaml} | 0 .../emulated/SyntheticMetricsGenerator.py | 2 +- .../service/TelemetryBackendService.py | 7 +- 7 files changed, 372 insertions(+), 59 deletions(-) delete mode 100644 deploy/monitoring.sh create mode 100755 deploy/new_monitoring.sh create mode 100644 manifests/monitoring/grafana_values.yaml rename manifests/{prometheus/prometheus.yaml => monitoring/prometheus_values.yaml} (100%) diff --git a/.gitignore b/.gitignore index db47387c8..235d7768a 100644 --- a/.gitignore +++ b/.gitignore @@ -179,5 +179,3 @@ libyang/ # Other logs **/logs/*.log.* -# PySpark checkpoints -src/analytics/.spark/* diff --git a/deploy/monitoring.sh b/deploy/monitoring.sh deleted file mode 100644 index 18992501a..000000000 --- a/deploy/monitoring.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -RELEASE_NAME="mon-prometheus" -NAMESPACE="monitoring" -CHART_REPO_NAME="prometheus-community" -CHART_REPO_URL="https://prometheus-community.github.io/helm-charts" -CHART_NAME="prometheus" # Chart name within the repo -VALUES_FILE="manifests/prometheus/prometheus.yaml" - -echo ">>> Deploying Prometheus with the following configuration:" -echo "Adding/updating Helm repo: $CHART_REPO_NAME -> $CHART_REPO_URL" -helm repo add "$CHART_REPO_NAME" "$CHART_REPO_URL" || true -helm repo update - -echo "Creating namespace '$NAMESPACE' if it doesn't exist..." -kubectl get namespace "$NAMESPACE" >/dev/null 2>&1 || kubectl create namespace "$NAMESPACE" - -#------------------------------------------------------------------------------ -# 3. Install or upgrade the Prometheus chart -# - If 'VALUES_FILE' is set, it will use it for custom configuration. -# - Otherwise, it will deploy with the chart defaults. -#------------------------------------------------------------------------------ -if [ -n "$VALUES_FILE" ] && [ -f "$VALUES_FILE" ]; then - echo "Installing/Upgrading Prometheus with custom values from $VALUES_FILE..." - helm upgrade --install "$RELEASE_NAME" "$CHART_REPO_NAME/$CHART_NAME" \ - --namespace "$NAMESPACE" \ - --values "$VALUES_FILE" -else - echo "Installing/Upgrading Prometheus with default chart values..." - helm upgrade --install "$RELEASE_NAME" "$CHART_REPO_NAME/$CHART_NAME" \ - --namespace "$NAMESPACE" -fi - -echo "Waiting for Prometheus pods to be ready..." -kubectl rollout status deployment/"$RELEASE_NAME"-server -n "$NAMESPACE" || true - -# echo "Listing deployed resources in namespace '$NAMESPACE':" -# kubectl get all -n "$NAMESPACE" - -echo "<<< Prometheus deployment completed successfully!" diff --git a/deploy/new_monitoring.sh b/deploy/new_monitoring.sh new file mode 100755 index 000000000..ac1f46723 --- /dev/null +++ b/deploy/new_monitoring.sh @@ -0,0 +1,132 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -euo pipefail + +# ----------------------------------------------------------- +# Global namespace for all deployments +# ----------------------------------------------------------- +NAMESPACE="monitoring" +VALUES_FILE_PATH="manifests/monitoring" + +# ----------------------------------------------------------- +# Prometheus Configuration +# ----------------------------------------------------------- +RELEASE_NAME_PROM="mon-prometheus" +CHART_REPO_NAME_PROM="prometheus-community" +CHART_REPO_URL_PROM="https://prometheus-community.github.io/helm-charts" +CHART_NAME_PROM="prometheus" +VALUES_FILE_PROM="$VALUES_FILE_PATH/prometheus_values.yaml" + +# ----------------------------------------------------------- +# Mimir Configuration +# ----------------------------------------------------------- +RELEASE_NAME_MIMIR="mon-mimir" +CHART_REPO_NAME_MIMIR="grafana" +CHART_REPO_URL_MIMIR="https://grafana.github.io/helm-charts" +CHART_NAME_MIMIR="mimir-distributed" +VALUES_FILE_MIMIR="$VALUES_FILE_PATH/mimir_values.yaml" + +# ----------------------------------------------------------- +# Grafana Configuration +# ----------------------------------------------------------- +# RELEASE_NAME_GRAFANA="mon-grafana" +# CHART_REPO_NAME_GRAFANA="grafana" +# CHART_REPO_URL_GRAFANA="https://grafana.github.io/helm-charts" +# CHART_NAME_GRAFANA="grafana" +# VALUES_FILE_GRAFANA="$VALUES_FILE_PATH/grafana_values.yaml" + + +# ----------------------------------------------------------- +# Function to deploy or upgrade a Helm chart +# ----------------------------------------------------------- +deploy_chart() { + local release_name="$1" + local chart_repo_name="$2" + local chart_repo_url="$3" + local chart_name="$4" + local values_file="$5" + local namespace="$6" + + echo ">>> Deploying [${release_name}] from repo [${chart_repo_name}]..." + + # Add or update the Helm repo + echo "Adding/updating Helm repo: $chart_repo_name -> $chart_repo_url" + helm repo add "$chart_repo_name" "$chart_repo_url" || true + helm repo update + + # Create namespace if needed + echo "Creating namespace '$namespace' if it doesn't exist..." + kubectl get namespace "$namespace" >/dev/null 2>&1 || kubectl create namespace "$namespace" + + # Install or upgrade the chart + if [ -n "$values_file" ] && [ -f "$values_file" ]; then + echo "Installing/Upgrading $release_name using custom values from $values_file..." + helm upgrade --install "$release_name" "$chart_repo_name/$chart_name" \ + --namespace "$namespace" \ + --values "$values_file" + else + echo "Installing/Upgrading $release_name with default chart values..." + helm upgrade --install "$release_name" "$chart_repo_name/$chart_name" \ + --namespace "$namespace" + fi + + echo "<<< Deployment initiated for [$release_name]." + echo +} + + +# ----------------------------------------------------------- +# Actual Deployments +# ----------------------------------------------------------- + +# 1) Deploy Prometheus +deploy_chart "$RELEASE_NAME_PROM" \ + "$CHART_REPO_NAME_PROM" \ + "$CHART_REPO_URL_PROM" \ + "$CHART_NAME_PROM" \ + "$VALUES_FILE_PROM" \ + "$NAMESPACE" + +# Optionally wait for Prometheus server pod to become ready +kubectl rollout status deployment/"$RELEASE_NAME_PROM-server" -n "$NAMESPACE" || true + + +# 2) Deploy Mimir +deploy_chart "$RELEASE_NAME_MIMIR" \ + "$CHART_REPO_NAME_MIMIR" \ + "$CHART_REPO_URL_MIMIR" \ + "$CHART_NAME_MIMIR" \ + "$VALUES_FILE_MIMIR" \ + "$NAMESPACE" + +# Depending on how Mimir runs (StatefulSets, Deployments), you can wait for +# the correct resource to be ready. For example: +# kubectl rollout status statefulset/"$RELEASE_NAME_MIMIR-distributor" -n "$NAMESPACE" || true + + +# 3) Deploy Grafana +# deploy_chart "$RELEASE_NAME_GRAFANA" \ +# "$CHART_REPO_NAME_GRAFANA" \ +# "$CHART_REPO_URL_GRAFANA" \ +# "$CHART_NAME_GRAFANA" \ +# "$VALUES_FILE_GRAFANA" \ +# "$NAMESPACE" + +# kubectl rollout status deployment/"$RELEASE_NAME_GRAFANA" -n "$NAMESPACE" || true + +# ----------------------------------------------------------- +echo "All deployments completed!" + diff --git a/manifests/monitoring/grafana_values.yaml b/manifests/monitoring/grafana_values.yaml new file mode 100644 index 000000000..a2dbd7971 --- /dev/null +++ b/manifests/monitoring/grafana_values.yaml @@ -0,0 +1,235 @@ +rbac: + create: true + ## Use an existing ClusterRole/Role (depending on rbac.namespaced false/true) + # useExistingRole: name-of-some-role + # useExistingClusterRole: name-of-some-clusterRole + pspEnabled: false + pspUseAppArmor: false + namespaced: false + +serviceAccount: + create: true + name: + nameTest: + ## ServiceAccount labels. + automountServiceAccountToken: false + +replicas: 1 + +## Create a headless service for the deployment +headlessService: false + +## Should the service account be auto mounted on the pod +automountServiceAccountToken: true + +## Create HorizontalPodAutoscaler object for deployment type +# +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 3 + targetCPU: "60" + targetMemory: "" + behavior: {} + +deploymentStrategy: + type: RollingUpdate + +readinessProbe: + httpGet: + path: /api/health + port: 3000 + +livenessProbe: + httpGet: + path: /api/health + port: 3000 + initialDelaySeconds: 60 + timeoutSeconds: 30 + failureThreshold: 10 + +image: + registry: docker.io + repository: grafana/grafana + # Overrides the Grafana image tag whose default is the chart appVersion + tag: "" + sha: "" + pullPolicy: IfNotPresent + + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## Can be templated. + ## + pullSecrets: [] + # - myRegistrKeySecretName + +testFramework: + enabled: true + ## The type of Helm hook used to run this test. Defaults to test. + ## ref: https://helm.sh/docs/topics/charts_hooks/#the-available-hooks + ## + # hookType: test + image: + # -- The Docker registry + registry: docker.io + repository: bats/bats + tag: "v1.4.1" + imagePullPolicy: IfNotPresent + +# dns configuration for pod +dnsPolicy: ~ +dnsConfig: {} + # nameservers: + # - 8.8.8.8 + # options: + # - name: ndots + # value: "2" + # - name: edns0 + +securityContext: + runAsNonRoot: true + runAsUser: 472 + runAsGroup: 472 + fsGroup: 472 + +containerSecurityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + seccompProfile: + type: RuntimeDefault + +# Enable creating the grafana configmap +createConfigmap: true + +downloadDashboardsImage: + registry: docker.io + repository: curlimages/curl + tag: 8.9.1 + sha: "" + pullPolicy: IfNotPresent + +downloadDashboards: + env: {} + envFromSecret: "" + resources: {} + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + seccompProfile: + type: RuntimeDefault + envValueFrom: {} + # ENV_NAME: + # configMapKeyRef: + # name: configmap-name + # key: value_key + +## Pod Annotations +# podAnnotations: {} + +## ConfigMap Annotations +# configMapAnnotations: {} + # argocd.argoproj.io/sync-options: Replace=true + +## Pod Labels +# podLabels: {} + +podPortName: grafana +gossipPortName: gossip +## Deployment annotations +# annotations: {} + +service: + enabled: true + type: NodePort + port: 80 + targetPort: 3000 + nodePort: 30080 + portName: service + +## Enable persistence using Persistent Volume Claims +## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/ +## +persistence: + type: pvc + enabled: true + # storageClassName: default + accessModes: + - ReadWriteOnce + size: 10Gi + # annotations: {} + finalizers: + - kubernetes.io/pvc-protection + + disableWarning: false + + ## If 'lookupVolumeName' is set to true, Helm will attempt to retrieve + ## the current value of 'spec.volumeName' and incorporate it into the template. + lookupVolumeName: true + +# Administrator credentials when not using an existing secret (see below) +adminUser: admin +# adminPassword: strongpassword + +# Use an existing secret for the admin user. +admin: + ## Name of the secret. Can be templated. + existingSecret: "" + userKey: admin-user + passwordKey: admin-password + +## Configure grafana datasources +## ref: http://docs.grafana.org/administration/provisioning/#datasources +## +datasources: + datasources.yaml: + apiVersion: 1 + datasources: + - name: Prometheus + type: prometheus + url: http://mon-prometheus-server.monitoring.svc.cluster.local + access: proxy + isDefault: true + - name: Mimir + type: prometheus + url: http://mimir-nginx.mon-mimir.svc:80/prometheus + access: proxy + isDefault: false + +## Grafana's primary configuration +## NOTE: values in map will be converted to ini format +## ref: http://docs.grafana.org/installation/configuration/ +## +grafana.ini: + paths: + data: /var/lib/grafana/ + logs: /var/log/grafana + plugins: /var/lib/grafana/plugins + provisioning: /etc/grafana/provisioning + analytics: + check_for_updates: true + log: + mode: console + grafana_net: + url: https://grafana.net + server: + domain: "{{ if (and .Values.ingress.enabled .Values.ingress.hosts) }}{{ tpl (.Values.ingress.hosts | first) . }}{{ else }}''{{ end }}" + +## Number of old ReplicaSets to retain +## +revisionHistoryLimit: 5 + +# assertNoLeakedSecrets is a helper function defined in _helpers.tpl that checks if secret +# values are not exposed in the rendered grafana.ini configmap. It is enabled by default. +# +# To pass values into grafana.ini without exposing them in a configmap, use variable expansion: +# https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#variable-expansion +# +# Alternatively, if you wish to allow secret values to be exposed in the rendered grafana.ini configmap, +# you can disable this check by setting assertNoLeakedSecrets to false. +assertNoLeakedSecrets: true + diff --git a/manifests/prometheus/prometheus.yaml b/manifests/monitoring/prometheus_values.yaml similarity index 100% rename from manifests/prometheus/prometheus.yaml rename to manifests/monitoring/prometheus_values.yaml diff --git a/src/telemetry/backend/collectors/emulated/SyntheticMetricsGenerator.py b/src/telemetry/backend/collectors/emulated/SyntheticMetricsGenerator.py index a01e2c0e6..77d998432 100644 --- a/src/telemetry/backend/collectors/emulated/SyntheticMetricsGenerator.py +++ b/src/telemetry/backend/collectors/emulated/SyntheticMetricsGenerator.py @@ -98,7 +98,7 @@ class SyntheticMetricsGenerator(): return (time.time(), resource_key, requested_metrics) - def metric_id_mapper(self, sample_type_ids, metric_dict): + def metric_id_mapper(self, sample_type_ids, metric_dict): # TODO: Add a dynamic mappper from kpi_sample_type ID to name... """ Maps the sample type IDs to the corresponding metric names. diff --git a/src/telemetry/backend/service/TelemetryBackendService.py b/src/telemetry/backend/service/TelemetryBackendService.py index 40cd1443a..3aeee8238 100755 --- a/src/telemetry/backend/service/TelemetryBackendService.py +++ b/src/telemetry/backend/service/TelemetryBackendService.py @@ -49,7 +49,7 @@ class TelemetryBackendService(GenericGrpcService): self.kafka_consumer = KafkaConsumer({'bootstrap.servers' : KafkaConfig.get_kafka_address(), 'group.id' : 'backend', 'auto.offset.reset' : 'latest'}) - self.collector = EmulatedCollector(address="127.0.0.1", port=8000) + self.collector = None self.context_client = ContextClient() self.kpi_manager_client = KpiManagerClient() self.active_jobs = {} @@ -124,11 +124,11 @@ class TelemetryBackendService(GenericGrpcService): Method to handle collector request. """ device_type, end_points = self.get_endpoint_detail(kpi_id) - # end_points : dict = self.get_endpoints_from_kpi_id(kpi_id) + if end_points is None: LOGGER.warning("KPI ID: {:} - Endpoints not found. Skipping...".format(kpi_id)) return - # device_type : str = self.get_device_type_from_kpi_id(kpi_id) + if device_type and "emu" in device_type: LOGGER.info("KPI ID: {:} - Device Type: {:} - Endpoints: {:}".format(kpi_id, device_type, end_points)) subscription = [collector_id, end_points, duration, interval] @@ -139,6 +139,7 @@ class TelemetryBackendService(GenericGrpcService): def EmulatedCollectorHandler(self, subscription, duration, collector_id, kpi_id, stop_event): # EmulatedCollector + self.collector = EmulatedCollector(address="127.0.0.1", port=8000) self.collector.Connect() if not self.collector.SubscribeState(subscription): LOGGER.warning("KPI ID: {:} - Subscription failed. Skipping...".format(kpi_id)) -- GitLab From c688687d990fad4bfb8364af58ad05669d00b66c Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 10 Mar 2025 13:25:40 +0000 Subject: [PATCH 291/463] Minor bug fixes --- src/kpi_value_writer/service/KpiValueWriter.py | 10 ++++------ src/telemetry/backend/Dockerfile | 2 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kpi_value_writer/service/KpiValueWriter.py b/src/kpi_value_writer/service/KpiValueWriter.py index 25b8ca2e8..74291bba3 100644 --- a/src/kpi_value_writer/service/KpiValueWriter.py +++ b/src/kpi_value_writer/service/KpiValueWriter.py @@ -55,11 +55,9 @@ class KpiValueWriter(GenericGrpcService): if raw_kpi is None: continue elif raw_kpi.error(): - if raw_kpi.error().code() == KafkaError._PARTITION_EOF: - continue - else: + if raw_kpi.error().code() != KafkaError._PARTITION_EOF: print("Consumer error: {}".format(raw_kpi.error())) - continue + continue try: kpi_value = json.loads(raw_kpi.value().decode('utf-8')) LOGGER.info("Received KPI : {:}".format(kpi_value)) @@ -79,5 +77,5 @@ class KpiValueWriter(GenericGrpcService): metric_writer.create_and_expose_cooked_kpi(kpi_descriptor_object, kpi_value) else: LOGGER.info("No KPI Descriptor found in Database for Kpi ID: {:}".format(kpi_id)) - except Exception as e: - LOGGER.info("Unable to get KpiDescriptor. Error: {:}".format(e)) + except: + LOGGER.exception("Unable to get KpiDescriptor") diff --git a/src/telemetry/backend/Dockerfile b/src/telemetry/backend/Dockerfile index 7448f1ebc..81f8bba4b 100644 --- a/src/telemetry/backend/Dockerfile +++ b/src/telemetry/backend/Dockerfile @@ -64,6 +64,8 @@ RUN python3 -m pip install -r requirements.txt WORKDIR /var/teraflow COPY src/context/__init__.py context/__init__.py COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ COPY src/kpi_manager/client/. kpi_manager/client/ COPY src/kpi_manager/__init__.py kpi_manager/__init__.py COPY src/telemetry/__init__.py telemetry/__init__.py -- GitLab From 2d4b9d8c1ef7978aeb69f287987b2a93f67665bd Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 10 Mar 2025 13:27:15 +0000 Subject: [PATCH 292/463] Renamed new_monitoring.sh to monitoring.sh --- deploy/{new_monitoring.sh => monitoring.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename deploy/{new_monitoring.sh => monitoring.sh} (100%) diff --git a/deploy/new_monitoring.sh b/deploy/monitoring.sh similarity index 100% rename from deploy/new_monitoring.sh rename to deploy/monitoring.sh -- GitLab From cef03c41983bee4d572d018c949ade6bb14886c7 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 10 Mar 2025 13:29:35 +0000 Subject: [PATCH 293/463] Disable for now Mimir --- deploy/monitoring.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/deploy/monitoring.sh b/deploy/monitoring.sh index ac1f46723..6fa633a37 100755 --- a/deploy/monitoring.sh +++ b/deploy/monitoring.sh @@ -33,11 +33,11 @@ VALUES_FILE_PROM="$VALUES_FILE_PATH/prometheus_values.yaml" # ----------------------------------------------------------- # Mimir Configuration # ----------------------------------------------------------- -RELEASE_NAME_MIMIR="mon-mimir" -CHART_REPO_NAME_MIMIR="grafana" -CHART_REPO_URL_MIMIR="https://grafana.github.io/helm-charts" -CHART_NAME_MIMIR="mimir-distributed" -VALUES_FILE_MIMIR="$VALUES_FILE_PATH/mimir_values.yaml" +# RELEASE_NAME_MIMIR="mon-mimir" +# CHART_REPO_NAME_MIMIR="grafana" +# CHART_REPO_URL_MIMIR="https://grafana.github.io/helm-charts" +# CHART_NAME_MIMIR="mimir-distributed" +# VALUES_FILE_MIMIR="$VALUES_FILE_PATH/mimir_values.yaml" # ----------------------------------------------------------- # Grafana Configuration @@ -105,12 +105,12 @@ kubectl rollout status deployment/"$RELEASE_NAME_PROM-server" -n "$NAMESPACE" || # 2) Deploy Mimir -deploy_chart "$RELEASE_NAME_MIMIR" \ - "$CHART_REPO_NAME_MIMIR" \ - "$CHART_REPO_URL_MIMIR" \ - "$CHART_NAME_MIMIR" \ - "$VALUES_FILE_MIMIR" \ - "$NAMESPACE" +# deploy_chart "$RELEASE_NAME_MIMIR" \ +# "$CHART_REPO_NAME_MIMIR" \ +# "$CHART_REPO_URL_MIMIR" \ +# "$CHART_NAME_MIMIR" \ +# "$VALUES_FILE_MIMIR" \ +# "$NAMESPACE" # Depending on how Mimir runs (StatefulSets, Deployments), you can wait for # the correct resource to be ready. For example: -- GitLab From 5c64c58bc6d89d767ed5c894e6ab0585e6beb1f9 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 10 Mar 2025 13:40:46 +0000 Subject: [PATCH 294/463] KPI Manager: - Corrected exception handling --- .../service/KpiManagerServiceServicerImpl.py | 85 ++++++++----------- 1 file changed, 34 insertions(+), 51 deletions(-) diff --git a/src/kpi_manager/service/KpiManagerServiceServicerImpl.py b/src/kpi_manager/service/KpiManagerServiceServicerImpl.py index 1dd214506..38e6a1fe1 100644 --- a/src/kpi_manager/service/KpiManagerServiceServicerImpl.py +++ b/src/kpi_manager/service/KpiManagerServiceServicerImpl.py @@ -18,7 +18,7 @@ from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_m from common.proto.context_pb2 import Empty from common.proto.kpi_manager_pb2_grpc import KpiManagerServiceServicer from common.proto.kpi_manager_pb2 import KpiId, KpiDescriptor, KpiDescriptorFilter, KpiDescriptorList -# from kpi_manager.database.Kpi_DB import KpiDB +from common.method_wrappers.ServiceExceptions import NotFoundException from kpi_manager.database.KpiDB import KpiDB from kpi_manager.database.KpiModel import Kpi as KpiModel @@ -31,65 +31,48 @@ class KpiManagerServiceServicerImpl(KpiManagerServiceServicer): self.kpi_db_obj = KpiDB(KpiModel) @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def SetKpiDescriptor(self, request: KpiDescriptor, grpc_context: grpc.ServicerContext # type: ignore - ) -> KpiId: # type: ignore + def SetKpiDescriptor( + self, request: KpiDescriptor, grpc_context: grpc.ServicerContext # type: ignore + ) -> KpiId: # type: ignore response = KpiId() LOGGER.info("Received gRPC message object: {:}".format(request)) - try: - kpi_to_insert = KpiModel.convert_KpiDescriptor_to_row(request) - if(self.kpi_db_obj.add_row_to_db(kpi_to_insert)): - response.kpi_id.uuid = request.kpi_id.kpi_id.uuid - # LOGGER.info("Added Row: {:}".format(response)) - return response - except Exception as e: - LOGGER.info("Unable to create KpiModel class object. {:}".format(e)) - + kpi_to_insert = KpiModel.convert_KpiDescriptor_to_row(request) + if self.kpi_db_obj.add_row_to_db(kpi_to_insert): + response.kpi_id.uuid = request.kpi_id.kpi_id.uuid + # LOGGER.info("Added Row: {:}".format(response)) + return response + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def GetKpiDescriptor(self, request: KpiId, grpc_context: grpc.ServicerContext # type: ignore - ) -> KpiDescriptor: # type: ignore + def GetKpiDescriptor( + self, request: KpiId, grpc_context: grpc.ServicerContext # type: ignore + ) -> KpiDescriptor: # type: ignore response = KpiDescriptor() - print("--> Received gRPC message object: {:}".format(request)) LOGGER.info("Received gRPC message object: {:}".format(request)) - try: - kpi_id_to_search = request.kpi_id.uuid - row = self.kpi_db_obj.search_db_row_by_id(KpiModel, 'kpi_id', kpi_id_to_search) - if row is None: - print ('No matching row found for kpi id: {:}'.format(kpi_id_to_search)) - LOGGER.info('No matching row found kpi id: {:}'.format(kpi_id_to_search)) - return Empty() - else: - response = KpiModel.convert_row_to_KpiDescriptor(row) - return response - except Exception as e: - print ('Unable to search kpi id. {:}'.format(e)) - LOGGER.info('Unable to search kpi id. {:}'.format(e)) - raise e + kpi_id_to_search = request.kpi_id.uuid + row = self.kpi_db_obj.search_db_row_by_id(KpiModel, 'kpi_id', kpi_id_to_search) + if row is None: + LOGGER.info('No matching row found kpi id: {:}'.format(kpi_id_to_search)) + raise NotFoundException('KpiDescriptor', kpi_id_to_search) + response = KpiModel.convert_row_to_KpiDescriptor(row) + return response @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def DeleteKpiDescriptor(self, request: KpiId, grpc_context: grpc.ServicerContext # type: ignore - ) -> Empty: # type: ignore + def DeleteKpiDescriptor( + self, request: KpiId, grpc_context: grpc.ServicerContext # type: ignore + ) -> Empty: # type: ignore LOGGER.info("Received gRPC message object: {:}".format(request)) - try: - kpi_id_to_search = request.kpi_id.uuid - self.kpi_db_obj.delete_db_row_by_id(KpiModel, 'kpi_id', kpi_id_to_search) - except Exception as e: - LOGGER.info('Unable to search kpi id. {:}'.format(e)) - finally: - return Empty() + kpi_id_to_search = request.kpi_id.uuid + self.kpi_db_obj.delete_db_row_by_id(KpiModel, 'kpi_id', kpi_id_to_search) + return Empty() @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def SelectKpiDescriptor(self, filter: KpiDescriptorFilter, grpc_context: grpc.ServicerContext # type: ignore - ) -> KpiDescriptorList: # type: ignore + def SelectKpiDescriptor( + self, filter: KpiDescriptorFilter, grpc_context: grpc.ServicerContext # type: ignore + ) -> KpiDescriptorList: # type: ignore LOGGER.info("Received gRPC message object: {:}".format(filter)) response = KpiDescriptorList() - try: - rows = self.kpi_db_obj.select_with_filter(KpiModel, filter) - except Exception as e: - LOGGER.info('Unable to apply filter on kpi descriptor. {:}'.format(e)) - try: - for row in rows: - kpiDescriptor_obj = KpiModel.convert_row_to_KpiDescriptor(row) - response.kpi_descriptor_list.append(kpiDescriptor_obj) - return response - except Exception as e: - LOGGER.info('Unable to process filter response {:}'.format(e)) + rows = self.kpi_db_obj.select_with_filter(KpiModel, filter) + for row in rows: + kpiDescriptor_obj = KpiModel.convert_row_to_KpiDescriptor(row) + response.kpi_descriptor_list.append(kpiDescriptor_obj) + return response -- GitLab From f0a69d8f14e1012065ea0d842b71edb9269ecc0a Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 10 Mar 2025 13:42:39 +0000 Subject: [PATCH 295/463] Telemetry Backend: - Added missing Dockerfile dependencies --- src/telemetry/backend/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/telemetry/backend/Dockerfile b/src/telemetry/backend/Dockerfile index 81f8bba4b..a0fa2f803 100644 --- a/src/telemetry/backend/Dockerfile +++ b/src/telemetry/backend/Dockerfile @@ -68,6 +68,8 @@ COPY src/device/__init__.py device/__init__.py COPY src/device/client/. device/client/ COPY src/kpi_manager/client/. kpi_manager/client/ COPY src/kpi_manager/__init__.py kpi_manager/__init__.py +COPY src/service/__init__.py service/__init__.py +COPY src/service/client/. service/client/ COPY src/telemetry/__init__.py telemetry/__init__.py COPY src/telemetry/backend/. telemetry/backend/ -- GitLab From 469032c3e71d7765201155e918fc6ee0d3d65d86 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 10 Mar 2025 13:58:15 +0000 Subject: [PATCH 296/463] CI/CD pipeline code fixes --- src/kpi_manager/tests/test_messages.py | 4 ++-- src/kpi_value_writer/service/MetricWriterToPrometheus.py | 6 ++++-- src/telemetry/backend/Dockerfile | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/kpi_manager/tests/test_messages.py b/src/kpi_manager/tests/test_messages.py index 811661a4e..094c56df8 100644 --- a/src/kpi_manager/tests/test_messages.py +++ b/src/kpi_manager/tests/test_messages.py @@ -26,9 +26,9 @@ def create_kpi_id_request(): def create_kpi_descriptor_request(descriptor_name: str = "Test_name"): _create_kpi_request = kpi_manager_pb2.KpiDescriptor() - # _create_kpi_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _create_kpi_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) # _create_kpi_request.kpi_id.kpi_id.uuid = "6e22f180-ba28-4641-b190-2287bf448888" - _create_kpi_request.kpi_id.kpi_id.uuid = "f974b6cc-095f-4767-b8c1-3457b383fb99" + # _create_kpi_request.kpi_id.kpi_id.uuid = "f974b6cc-095f-4767-b8c1-3457b383fb99" _create_kpi_request.kpi_description = descriptor_name _create_kpi_request.kpi_sample_type = KpiSampleType.KPISAMPLETYPE_PACKETS_RECEIVED _create_kpi_request.device_id.device_uuid.uuid = str(uuid.uuid4()) diff --git a/src/kpi_value_writer/service/MetricWriterToPrometheus.py b/src/kpi_value_writer/service/MetricWriterToPrometheus.py index 3238516c9..595d025b3 100644 --- a/src/kpi_value_writer/service/MetricWriterToPrometheus.py +++ b/src/kpi_value_writer/service/MetricWriterToPrometheus.py @@ -51,8 +51,10 @@ class MetricWriterToPrometheus: 'slice_id' : kpi_descriptor.slice_id.slice_uuid.uuid, 'connection_id' : kpi_descriptor.connection_id.connection_uuid.uuid, 'link_id' : kpi_descriptor.link_id.link_uuid.uuid, - 'time_stamp' : kpi_value["time_stamp"], - 'kpi_value' : kpi_value["kpi_value"] + 'time_stamp' : kpi_value.timestamp.timestamp, + #'time_stamp' : kpi_value["time_stamp"], + 'kpi_value' : kpi_value.kpi_value_type.floatVal + #'kpi_value' : kpi_value["kpi_value"] } LOGGER.debug("Cooked Kpi: {:}".format(cooked_kpi)) return cooked_kpi diff --git a/src/telemetry/backend/Dockerfile b/src/telemetry/backend/Dockerfile index a0fa2f803..07459986d 100644 --- a/src/telemetry/backend/Dockerfile +++ b/src/telemetry/backend/Dockerfile @@ -70,6 +70,8 @@ COPY src/kpi_manager/client/. kpi_manager/client/ COPY src/kpi_manager/__init__.py kpi_manager/__init__.py COPY src/service/__init__.py service/__init__.py COPY src/service/client/. service/client/ +COPY src/slice/__init__.py slice/__init__.py +COPY src/slice/client/. slice/client/ COPY src/telemetry/__init__.py telemetry/__init__.py COPY src/telemetry/backend/. telemetry/backend/ -- GitLab From 17228dd56138c9bdd77c58cd772229315e12b7e0 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 10 Mar 2025 14:16:03 +0000 Subject: [PATCH 297/463] CI/CD pipeline code fixes --- src/kpi_manager/tests/test_kpi_manager.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/kpi_manager/tests/test_kpi_manager.py b/src/kpi_manager/tests/test_kpi_manager.py index fedc3f94c..17a1c8d77 100755 --- a/src/kpi_manager/tests/test_kpi_manager.py +++ b/src/kpi_manager/tests/test_kpi_manager.py @@ -13,6 +13,7 @@ # limitations under the License. +import grpc import os, pytest import logging from typing import Union @@ -109,13 +110,19 @@ def test_DeleteKpiDescriptor(kpi_manager_client): LOGGER.info(" >>> test_DeleteKpiDescriptor: START <<< ") # adding KPI response_id = kpi_manager_client.SetKpiDescriptor(create_kpi_descriptor_request()) + # deleting KPI del_response = kpi_manager_client.DeleteKpiDescriptor(response_id) - # select KPI - kpi_manager_client.GetKpiDescriptor(response_id) LOGGER.info("Response of delete method gRPC message object: {:}".format(del_response)) assert isinstance(del_response, Empty) + # select KPI and check it does not exist + with pytest.raises(grpc.RpcError) as e: + kpi_manager_client.GetKpiDescriptor(response_id) + assert e.value.code() == grpc.StatusCode.NOT_FOUND + MSG = 'KpiDescriptor({:s}) not found' + assert e.value.details() == MSG.format(response_id.kpi_id.uuid) + def test_GetKpiDescriptor(kpi_manager_client): LOGGER.info(" >>> test_GetKpiDescriptor: START <<< ") # adding KPI @@ -123,11 +130,6 @@ def test_GetKpiDescriptor(kpi_manager_client): # get KPI response = kpi_manager_client.GetKpiDescriptor(response_id) LOGGER.info("Response gRPC message object: {:}".format(response)) - - LOGGER.info(" >>> calling GetKpiDescriptor with random ID") - rand_response = kpi_manager_client.GetKpiDescriptor(create_kpi_id_request()) - LOGGER.info("Response gRPC message object: {:}".format(rand_response)) - assert isinstance(response, KpiDescriptor) def test_SelectKpiDescriptor(kpi_manager_client): -- GitLab From 35df1abb2b8910d8fa9a5ce02a6ce4d52046b402 Mon Sep 17 00:00:00 2001 From: Javier Mateos Najari Date: Mon, 3 Mar 2025 10:34:23 +0100 Subject: [PATCH 298/463] feat(drivers): add morpheus driver --- .../drivers/morpheus/MorpheusApiDriver.py | 254 ++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 src/device/service/drivers/morpheus/MorpheusApiDriver.py diff --git a/src/device/service/drivers/morpheus/MorpheusApiDriver.py b/src/device/service/drivers/morpheus/MorpheusApiDriver.py new file mode 100644 index 000000000..f9b033cc3 --- /dev/null +++ b/src/device/service/drivers/morpheus/MorpheusApiDriver.py @@ -0,0 +1,254 @@ +import logging, requests, threading, json +from typing import Any, Iterator, List, Optional, Tuple, Union, Dict +from queue import Queue +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from device.service.driver_api._Driver import _Driver + +LOGGER = logging.getLogger(__name__) + +DRIVER_NAME = 'morpheus' +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) + +class MorpheusApiDriver(_Driver): + def __init__(self, address: str, port: int, **settings) -> None: + super().__init__(DRIVER_NAME, address, port, **settings) + self.__lock = threading.Lock() + self.__started = threading.Event() + self.__terminate = threading.Event() + scheme = self.settings.get('scheme', 'http') + self.__morpheus_root = '{:s}://{:s}:{:d}'.format(scheme, self.address, int(self.port)) + self.__timeout = int(self.settings.get('timeout', 120)) + self.__headers = {'Accept': 'application/yang-data+json', 'Content-Type': 'application/yang-data+json'} + + self.__detection_thread = None + self.__pipeline_error_thread = None + + size = self.settings.get('queue_events_size', 10) + self.__pipeline_error_queue = Queue(maxsize=size) + self.__detection_queue = Queue(maxsize=size) + + def Connect(self) -> bool: + url = self.__morpheus_root + '/restconf/data/naudit-morpheus:morpheus' + with self.__lock: + if self.__started.is_set(): return True + try: + requests.get(url, headers=self.__headers, timeout=self.__timeout, verify=False) + self.__started.set() + return True + except requests.exceptions.Timeout: + LOGGER.exception('Timeout connecting {:s}'.format(str(self.__morpheus_root))) + return False + except Exception: # pylint: disable=broad-except + LOGGER.exception('Exception connecting {:s}'.format(str(self.__morpheus_root))) + return False + + def Disconnect(self) -> bool: + with self.__lock: + try: + if self.__detection_thread and self.__detection_thread.is_alive(): + self.UnsubscribeDetectionEvent() + + if self.__pipeline_thread and self.__pipeline_thread.is_alive(): + self.UnsubscribePipelineError() + except Exception as e: + LOGGER.exception(f'Error during disconnect: {str(e)}') + + self.__terminate.set() + return True + + @metered_subclass_method(METRICS_POOL) + def GetInitialConfig(self) -> List[Tuple[str, Any]]: + url = self.__morpheus_root + '/restconf/data/naudit-morpheus:morpheus/config' + with self.__lock: + try: + response = requests.get(url, headers=self.__headers, timeout=self.__timeout, verify=False) + if response.ok: + config = response.json() + result = [] + + for key, value in config.items(): + result.append((key, value)) + + return result + except Exception as e: + LOGGER.exception('Exception getting initial config {:s}'.format(str(self.__morpheus_root))) + return [] + + @metered_subclass_method(METRICS_POOL) + def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: + url = self.__morpheus_root + '/restconf/data/naudit-morpheus:morpheus/config' + with self.__lock: + try: + response = requests.get(url, headers=self.__headers, timeout=self.__timeout, verify=False) + if response.ok: + config = response.json() + results = [] + + if not resource_keys: + for key, value in config.items(): + results.append((key, value)) + return results + + for key in resource_keys: + try: + results.append(config[key]) + except KeyError: + results.append(None) + except Exception as e: + results.append(e) + + return results + return [(key, None) for key in resource_keys] + except Exception as e: + LOGGER.exception(f'Error getting config: {str(e)}') + return [(key, e) for key in resource_keys] + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + url = self.__morpheus_root + '/restconf/data/naudit-morpheus:morpheus/config' + results = [] + with self.__lock: + config = dict(resources) + try: + response = requests.put(url, + headers=self.__headers, + json=config, + timeout=self.__timeout, + verify=False) + results.append(response.ok) + except Exception as e: + results.append(e) + return results + + def GetState(self) -> List[Tuple[str, Any]]: + url = self.__morpheus_root + '/restconf/data/naudit-morpheus:morpheus/state' + with self.__lock: + try: + response = requests.get(url, headers=self.__headers, timeout=self.__timeout, verify=False) + if response.ok: + state = response.json() + result = [] + for key, value in state.items(): + result.append((key, value)) + return result + return [] + except Exception as e: + LOGGER.exception(f'Error getting state: {str(e)}') + return [] + + def StartPipeline(self) -> Union[bool, Exception]: + url = self.__morpheus_root + '/restconf/data/naudit-morpheus:morpheus/start' + with self.__lock: + try: + response = requests.post(url, headers=self.__headers, timeout=self.__timeout, verify=False) + response.raise_for_status() + return True + except Exception as e: + LOGGER.exception(f'Error starting pipeline: {e}') + return e + + def StopPipeline(self) -> Union[bool, Exception]: + url = self.__morpheus_root + '/restconf/data/naudit-morpheus:morpheus/stop' + with self.__lock: + try: + response = requests.post(url, headers=self.__headers, timeout=self.__timeout, verify=False) + response.raise_for_status() + return True + except Exception as e: + LOGGER.exception(f'Error stopping pipeline: {e}') + return False + + @metered_subclass_method(METRICS_POOL) + def SubscribeDetectionEvent(self) -> Union[bool, Exception]: + url = self.__morpheus_root + '/restconf/streams/naudit-morpheus:morpheus/detection-event' + with self.__lock: + try: + self.__detection_thread = threading.Thread( + target=self.__handle_notification_stream, + args=(url, self.__detection_queue), + daemon=True + ) + self.__detection_thread.start() + return True + except Exception as e: + LOGGER.exception(f'Error subscribing to detection events: {str(e)}') + return e + + @metered_subclass_method(METRICS_POOL) + def UnsubscribeDetectionEvent(self) -> Union[bool, Exception]: + try: + if self.__detection_thread and self.__detection_thread.is_alive(): + self.__detection_thread.join(timeout=5) + return True + except Exception as e: + LOGGER.exception(f'Error unsubscribing from detection events: {str(e)}') + return e + + def GetDetectionEvent(self, blocking=False, terminate : Optional[threading.Event] = None) -> Iterator[Dict]: + while True: + if self.__terminate.is_set(): break + if terminate is not None and terminate.is_set(): break + try: + event = self.__detection_queue.get(block=blocking, timeout=0.1) + if event is not None: + yield event + except queue.Empty: + if blocking: + continue + return + + def SubscribePipelineError(self) -> Union[bool, Exception]: + url = self.__morpheus_root + '/restconf/streams/naudit-morpheus:morpheus/pipeline-error' + with self.__lock: + try: + self.__pipeline_error_thread = threading.Thread( + target=self.__handle_notification_stream, + args=(url, self.__pipeline_error_queue), + daemon=True + ) + self.__pipeline_error_thread.start() + return True + except Exception as e: + LOGGER.exception(f'Error subscribing to pipeline errors: {str(e)}') + return e + + def UnsubscribePipelineError(self) -> Union[bool, Exception]: + try: + if self.__pipeline_error_thread and self.__pipeline_error_thread.is_alive(): + self.__pipeline_error_thread.join(timeout=5) + return True + except Exception as e: + LOGGER.exception(f'Error unsubscribing from pipeline errors: {str(e)}') + return e + + def GetPipelineError(self, blocking=False, terminate: Optional[threading.Event] = None) -> Iterator[Dict]: + while True: + if self.__terminate.is_set(): break + if terminate is not None and terminate.is_set(): break + try: + error = self.__pipeline_error_queue.get(block=blocking, timeout=0.1) + if error is not None: + yield error + except queue.Empty: + if blocking: + continue + return + + def __handle_notification_stream(self, url: str, queue: Queue[Any]) -> None: + try: + with requests.get(url, + headers=self.__headers, + stream=True, + verify=False) as response: + + if not response.ok: + LOGGER.error(f'Error connecting to event stream: {response.status_code}') + return + + try: + event = response.json() + queue.put(event['data']['ietf-restconf:notification']) + except json.JSONDecodeError as e: + LOGGER.error(f'Error parsing event: {e}') + except Exception as e: + LOGGER.exception(f'Error in notification stream handler: {str(e)}') -- GitLab From 54f5199807a18f02d64f30d92485becf762594d8 Mon Sep 17 00:00:00 2001 From: Javier Mateos Najari Date: Tue, 4 Mar 2025 13:35:22 +0100 Subject: [PATCH 299/463] test(device): add morpheus driver tests --- scripts/run_tests_locally-device-morpheus.sh | 10 +++ src/device/tests/test_unitary_morpheus.py | 91 ++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100755 scripts/run_tests_locally-device-morpheus.sh create mode 100644 src/device/tests/test_unitary_morpheus.py diff --git a/scripts/run_tests_locally-device-morpheus.sh b/scripts/run_tests_locally-device-morpheus.sh new file mode 100755 index 000000000..1af88264e --- /dev/null +++ b/scripts/run_tests_locally-device-morpheus.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +PROJECTDIR=`pwd` + +cd $PROJECTDIR/src +RCFILE=$PROJECTDIR/coverage/.coveragerc + +# Run unitary tests and analyze coverage of code at same time +coverage run --rcfile=$RCFILE --append -m pytest -s --log-level=INFO --verbose \ + device/tests/test_unitary_morpheus.py diff --git a/src/device/tests/test_unitary_morpheus.py b/src/device/tests/test_unitary_morpheus.py new file mode 100644 index 000000000..cf754e091 --- /dev/null +++ b/src/device/tests/test_unitary_morpheus.py @@ -0,0 +1,91 @@ +import os +os.environ['DEVICE_EMULATED_ONLY'] = 'YES' + +# pylint: disable=wrong-import-position +import json +import logging, pytest, time +from typing import Dict, List +from device.service.drivers.morpheus.MorpheusApiDriver import MorpheusApiDriver + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + + +##### DRIVER FIXTURE ################################################################################################### + +DRIVER_SETTING_ADDRESS = '127.0.0.1' +DRIVER_SETTING_PORT = 8090 + +@pytest.fixture(scope='session') +def driver() -> MorpheusApiDriver: + _driver = MorpheusApiDriver( + DRIVER_SETTING_ADDRESS, DRIVER_SETTING_PORT, + ) + _driver.Connect() + yield _driver + time.sleep(1) + _driver.Disconnect() + + +##### TEST METHODS ##################################################################################################### + +def print_data(label, data): + print(f"{label}: {json.dumps(data, indent=2)}") + +def test_initial_config_retrieval(driver: MorpheusApiDriver): + config = driver.GetInitialConfig() + + assert isinstance(config, list), "Expected a list for initial config" + assert len(config) > 0, "Initial config should not be empty" + + print_data("Initial Config", config) + +def test_retrieve_config(driver: MorpheusApiDriver): + config = driver.GetConfig(None) + + assert isinstance(config, list), "Expected a list for config" + assert len(config) > 0, "Config should not be empty" + + print_data("Config", config) + +def test_set_config(driver: MorpheusApiDriver): + results = driver.SetConfig([('traffic_type', 'UDP')]) + + assert len(results) == 1, "Expected only one result" + assert results[0] is True, "Expected a succesfull result" + +def test_retrieve_state(driver: MorpheusApiDriver): + state = driver.GetState() + + assert isinstance(state, list), "Expected a a list for initial config" + assert len(state) > 0, " State should not be empty" + + print_data("State", state) + +def test_pipeline(driver: MorpheusApiDriver): + result = driver.StartPipeline() + + assert result is True + + result = driver.StopPipeline() + + assert result is True + +def test_subscription_detection(driver: MorpheusApiDriver): + result = driver.SubscribeDetectionEvent() + + assert result is True + + result = driver.UnsubscribeDetectionEvent() + + assert result is True + +def test_subscription_error(driver: MorpheusApiDriver): + result = driver.SubscribePipelineError() + + assert result is True + + result = driver.UnsubscribePipelineError() + + assert result is True -- GitLab From d531f6aeb87fc68887458b0978569e137daab305 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Mar 2025 13:13:22 +0000 Subject: [PATCH 300/463] OFC25 Test: - Renamed test ECOC24 to OFC25 - Added deploy.sh and undeploy.sh scripts - Corrected test parameters and settings --- ecoc24 | 1 - ofc25 | 1 + src/tests/.gitlab-ci.yml | 2 +- src/tests/ecoc24/dump_logs.sh | 39 ------ src/tests/{ecoc24 => ofc25}/.gitlab-ci.yml | 28 ++--- src/tests/{ecoc24 => ofc25}/Dockerfile | 28 ++--- src/tests/{ecoc24 => ofc25}/__init__.py | 0 src/tests/ofc25/deploy.sh | 117 ++++++++++++++++++ src/tests/{ecoc24 => ofc25}/deploy_e2e.sh | 8 +- src/tests/{ecoc24 => ofc25}/deploy_ip.sh | 8 +- src/tests/{ecoc24 => ofc25}/deploy_opt.sh | 6 +- .../{ecoc24 => ofc25}/deploy_specs_e2e.sh | 6 +- .../{ecoc24 => ofc25}/deploy_specs_ip.sh | 6 +- .../{ecoc24 => ofc25}/deploy_specs_opt.sh | 4 +- .../descriptors/descriptor_e2e.json | 0 .../descriptors/descriptor_ip.json | 0 .../descriptors/descriptor_opt.json | 0 src/tests/ofc25/dump_logs.sh | 51 ++++++++ .../nginx-ingress-controller-e2e.yaml | 0 .../nginx-ingress-controller-ip.yaml | 0 .../nginx-ingress-controller-opt.yaml | 0 src/tests/{ecoc24 => ofc25}/show_deploy.sh | 0 .../{ecoc24 => ofc25}/subscription_ws_e2e.sh | 0 .../{ecoc24 => ofc25}/subscription_ws_ip.sh | 0 src/tests/{ecoc24 => ofc25}/tests/__init__.py | 0 .../{ecoc24 => ofc25}/tests/create_service.py | 0 .../{ecoc24 => ofc25}/tests/delete_service.py | 0 .../tests/test_functional_bootstrap_e2e.py | 0 .../tests/test_functional_bootstrap_ip.py | 0 .../tests/test_functional_bootstrap_opt.py | 0 .../tests/test_functional_cleanup.py | 0 .../tests/test_functional_create_service.py | 0 .../tests/test_functional_delete_service.py | 0 .../{ecoc24 => ofc25}/tfs-ingress-e2e.yaml | 0 .../{ecoc24 => ofc25}/tfs-ingress-ip.yaml | 0 .../{ecoc24 => ofc25}/tfs-ingress-opt.yaml | 0 src/tests/ofc25/undeploy.sh | 38 ++++++ 37 files changed, 255 insertions(+), 88 deletions(-) delete mode 120000 ecoc24 create mode 120000 ofc25 delete mode 100755 src/tests/ecoc24/dump_logs.sh rename src/tests/{ecoc24 => ofc25}/.gitlab-ci.yml (93%) rename src/tests/{ecoc24 => ofc25}/Dockerfile (73%) rename src/tests/{ecoc24 => ofc25}/__init__.py (100%) create mode 100755 src/tests/ofc25/deploy.sh rename src/tests/{ecoc24 => ofc25}/deploy_e2e.sh (84%) rename src/tests/{ecoc24 => ofc25}/deploy_ip.sh (84%) rename src/tests/{ecoc24 => ofc25}/deploy_opt.sh (86%) rename src/tests/{ecoc24 => ofc25}/deploy_specs_e2e.sh (98%) rename src/tests/{ecoc24 => ofc25}/deploy_specs_ip.sh (98%) rename src/tests/{ecoc24 => ofc25}/deploy_specs_opt.sh (98%) rename src/tests/{ecoc24 => ofc25}/descriptors/descriptor_e2e.json (100%) rename src/tests/{ecoc24 => ofc25}/descriptors/descriptor_ip.json (100%) rename src/tests/{ecoc24 => ofc25}/descriptors/descriptor_opt.json (100%) create mode 100755 src/tests/ofc25/dump_logs.sh rename src/tests/{ecoc24 => ofc25}/nginx-ingress-controller-e2e.yaml (100%) rename src/tests/{ecoc24 => ofc25}/nginx-ingress-controller-ip.yaml (100%) rename src/tests/{ecoc24 => ofc25}/nginx-ingress-controller-opt.yaml (100%) rename src/tests/{ecoc24 => ofc25}/show_deploy.sh (100%) rename src/tests/{ecoc24 => ofc25}/subscription_ws_e2e.sh (100%) rename src/tests/{ecoc24 => ofc25}/subscription_ws_ip.sh (100%) rename src/tests/{ecoc24 => ofc25}/tests/__init__.py (100%) rename src/tests/{ecoc24 => ofc25}/tests/create_service.py (100%) rename src/tests/{ecoc24 => ofc25}/tests/delete_service.py (100%) rename src/tests/{ecoc24 => ofc25}/tests/test_functional_bootstrap_e2e.py (100%) rename src/tests/{ecoc24 => ofc25}/tests/test_functional_bootstrap_ip.py (100%) rename src/tests/{ecoc24 => ofc25}/tests/test_functional_bootstrap_opt.py (100%) rename src/tests/{ecoc24 => ofc25}/tests/test_functional_cleanup.py (100%) rename src/tests/{ecoc24 => ofc25}/tests/test_functional_create_service.py (100%) rename src/tests/{ecoc24 => ofc25}/tests/test_functional_delete_service.py (100%) rename src/tests/{ecoc24 => ofc25}/tfs-ingress-e2e.yaml (100%) rename src/tests/{ecoc24 => ofc25}/tfs-ingress-ip.yaml (100%) rename src/tests/{ecoc24 => ofc25}/tfs-ingress-opt.yaml (100%) create mode 100755 src/tests/ofc25/undeploy.sh diff --git a/ecoc24 b/ecoc24 deleted file mode 120000 index 37c97d3a7..000000000 --- a/ecoc24 +++ /dev/null @@ -1 +0,0 @@ -src/tests/ecoc24/ \ No newline at end of file diff --git a/ofc25 b/ofc25 new file mode 120000 index 000000000..346ba6d2c --- /dev/null +++ b/ofc25 @@ -0,0 +1 @@ +src/tests/ofc25/ \ No newline at end of file diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index 06578bea8..787b25ee1 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -23,6 +23,6 @@ include: - local: '/src/tests/eucnc24/.gitlab-ci.yml' - local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml' - local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml' - #- local: '/src/tests/ecoc24/.gitlab-ci.yml' + #- local: '/src/tests/ofc25/.gitlab-ci.yml' - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml' diff --git a/src/tests/ecoc24/dump_logs.sh b/src/tests/ecoc24/dump_logs.sh deleted file mode 100755 index 48ac8e9a0..000000000 --- a/src/tests/ecoc24/dump_logs.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 E2E..." -mkdir -p tmp/exec/e2e -kubectl --namespace tfs-e2e logs deployments/contextservice server > tmp/exec/e2e/context.log -kubectl --namespace tfs-e2e logs deployments/deviceservice server > tmp/exec/e2e/device.log -kubectl --namespace tfs-e2e logs deployments/serviceservice server > tmp/exec/e2e/service.log -kubectl --namespace tfs-e2e logs deployments/pathcompservice frontend > tmp/exec/e2e/pathcomp-frontend.log -kubectl --namespace tfs-e2e logs deployments/pathcompservice backend > tmp/exec/e2e/pathcomp-backend.log -kubectl --namespace tfs-e2e logs deployments/sliceservice server > tmp/exec/e2e/slice.log -printf "\n" - -echo "Collecting logs for IP..." -mkdir -p tmp/exec/ip -kubectl --namespace tfs-ip logs deployments/contextservice server > tmp/exec/ip/context.log -kubectl --namespace tfs-ip logs deployments/deviceservice server > tmp/exec/ip/device.log -kubectl --namespace tfs-ip logs deployments/serviceservice server > tmp/exec/ip/service.log -kubectl --namespace tfs-ip logs deployments/pathcompservice frontend > tmp/exec/ip/pathcomp-frontend.log -kubectl --namespace tfs-ip logs deployments/pathcompservice backend > tmp/exec/ip/pathcomp-backend.log -kubectl --namespace tfs-ip logs deployments/sliceservice server > tmp/exec/ip/slice.log -printf "\n" - -echo "Done!" diff --git a/src/tests/ecoc24/.gitlab-ci.yml b/src/tests/ofc25/.gitlab-ci.yml similarity index 93% rename from src/tests/ecoc24/.gitlab-ci.yml rename to src/tests/ofc25/.gitlab-ci.yml index 8e3f7e71a..52ea2e3a4 100644 --- a/src/tests/ecoc24/.gitlab-ci.yml +++ b/src/tests/ofc25/.gitlab-ci.yml @@ -13,9 +13,9 @@ # limitations under the License. # Build, tag, and push the Docker image to the GitLab Docker registry -build ecoc24: +build ofc25: variables: - TEST_NAME: 'ecoc24' + TEST_NAME: 'ofc25' stage: build before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY @@ -36,13 +36,13 @@ build ecoc24: - .gitlab-ci.yml # Deploy TeraFlowSDN and Execute end-2-end test -end2end_test ecoc24: +end2end_test ofc25: variables: - TEST_NAME: 'ecoc24' + TEST_NAME: 'ofc25' stage: end2end_test # Disable to force running it after all other tasks #needs: - # - build ecoc24 + # - build ofc25 before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker network rm -f na-br @@ -85,11 +85,11 @@ end2end_test ecoc24: # Delete secondary ingress controllers - - kubectl delete -f src/tests/ecoc24/nginx-ingress-controller-opt.yaml --ignore-not-found + - kubectl delete -f src/tests/ofc25/nginx-ingress-controller-opt.yaml --ignore-not-found # Create secondary ingress controllers - - kubectl apply -f src/tests/ecoc24/nginx-ingress-controller-opt.yaml + - kubectl apply -f src/tests/ofc25/nginx-ingress-controller-opt.yaml # Deploy TFS for OPT - - source src/tests/ecoc24/deploy_specs_opt.sh + - source src/tests/ofc25/deploy_specs_opt.sh # Change the name for the database - cp manifests/contextservice.yaml manifests/contextservice.yaml.bak @@ -115,13 +115,13 @@ end2end_test ecoc24: # Deploy IP TeraFlowSDN # Delete secondary ingress controllers - - kubectl delete -f src/tests/ecoc24/nginx-ingress-controller-ip.yaml --ignore-not-found + - kubectl delete -f src/tests/ofc25/nginx-ingress-controller-ip.yaml --ignore-not-found # Create secondary ingress controllers - - kubectl apply -f src/tests/ecoc24/nginx-ingress-controller-ip.yaml + - kubectl apply -f src/tests/ofc25/nginx-ingress-controller-ip.yaml # Deploy TFS for IP - - source src/tests/ecoc24/deploy_specs_ip.sh + - source src/tests/ofc25/deploy_specs_ip.sh # Change the name for the database - cp manifests/contextservice.yaml manifests/contextservice.yaml.bak @@ -151,10 +151,10 @@ end2end_test ecoc24: # Delete secondary ingress controllers - - kubectl delete -f src/tests/ecoc24/nginx-ingress-controller-e2e.yaml --ignore-not-found + - kubectl delete -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml --ignore-not-found # Create secondary ingress controllers - - kubectl apply -f src/tests/ecoc24/nginx-ingress-controller-e2e.yaml + - kubectl apply -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml # Change the name for the database - cp manifests/contextservice.yaml manifests/contextservice.yaml.bak @@ -175,7 +175,7 @@ end2end_test ecoc24: - mv manifests/contextservice.yaml.bak manifests/contextservice.yaml #Configure Subscription WS - - ./src/tests/ecoc24/subscription_ws_e2e.sh + - ./src/tests/ofc25/subscription_ws_e2e.sh - mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_e2e.sh diff --git a/src/tests/ecoc24/Dockerfile b/src/tests/ofc25/Dockerfile similarity index 73% rename from src/tests/ecoc24/Dockerfile rename to src/tests/ofc25/Dockerfile index 8fca59f57..cebf66695 100644 --- a/src/tests/ecoc24/Dockerfile +++ b/src/tests/ofc25/Dockerfile @@ -49,9 +49,9 @@ RUN rm *.proto RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; # Create component sub-folders, get specific Python packages -RUN mkdir -p /var/teraflow/tests/ecoc24 -WORKDIR /var/teraflow/tests/ecoc24 -COPY src/tests/ofc24/requirements.in requirements.in +RUN mkdir -p /var/teraflow/tests/ofc25 +WORKDIR /var/teraflow/tests/ofc25 +COPY src/tests/ofc25/requirements.in requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN python3 -m pip install -r requirements.txt @@ -74,23 +74,23 @@ COPY src/service/client/. service/client/ COPY src/slice/__init__.py slice/__init__.py COPY src/slice/client/. slice/client/ COPY src/tests/*.py ./tests/ -COPY src/tests/ecoc24/__init__.py ./tests/ecoc24/__init__.py -COPY src/tests/ecoc24/descriptors/descriptor_ip.json ./tests/ecoc24/descriptors/descriptor_ip.json -COPY src/tests/ecoc24/descriptors/descriptor_opt.json ./tests/ecoc24/descriptors/descriptor_opt.json -COPY src/tests/ecoc24/descriptors/descriptor_e2e.json ./tests/ecoc24/descriptors/descriptor_e2e.json -COPY src/tests/ecoc24/tests/. ./tests/ecoc24/tests/ +COPY src/tests/ofc25/__init__.py ./tests/ofc25/__init__.py +COPY src/tests/ofc25/descriptors/descriptor_ip.json ./tests/ofc25/descriptors/descriptor_ip.json +COPY src/tests/ofc25/descriptors/descriptor_opt.json ./tests/ofc25/descriptors/descriptor_opt.json +COPY src/tests/ofc25/descriptors/descriptor_e2e.json ./tests/ofc25/descriptors/descriptor_e2e.json +COPY src/tests/ofc25/tests/. ./tests/ofc25/tests/ RUN tee ./run_tests.sh </dev/null || true +helm3 uninstall --namespace nats-ip nats-ip 2>/dev/null || true +helm3 uninstall --namespace nats-opt nats-opt 2>/dev/null || true +helm3 uninstall --namespace nats nats 2>/dev/null || true +kubectl delete namespaces tfs tfs-ip tfs-opt tfs-e2e --ignore-not-found +kubectl delete namespaces qdb qdb-e2e qdb-opt qdb-ip --ignore-not-found +kubectl delete namespaces kafka kafka-ip kafka-opt kafka-e2e --ignore-not-found +kubectl delete namespaces nats nats-ip nats-opt nats-e2e --ignore-not-found + +kubectl delete -f src/tests/ofc25/nginx-ingress-controller-opt.yaml --ignore-not-found +kubectl delete -f src/tests/ofc25/nginx-ingress-controller-ip.yaml --ignore-not-found +kubectl delete -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml --ignore-not-found + +sleep 5 + +# ===== Check Microk8s is ready ============================== +microk8s status --wait-ready +kubectl get pods --all-namespaces + +# Configure TeraFlowSDN deployment +# Uncomment if DEBUG log level is needed for the components +#yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml +#yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml +#yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml +#yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml +#yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/sliceservice.yaml +#yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml +#yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/e2eorchestratorservice.yaml +#yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/vntmservice.yaml + +# Create secondary ingress controllers +kubectl apply -f src/tests/ofc25/nginx-ingress-controller-opt.yaml +kubectl apply -f src/tests/ofc25/nginx-ingress-controller-ip.yaml +kubectl apply -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml + +cp manifests/contextservice.yaml manifests/contextservice.yaml.bak + +# ===== Deploy Optical TeraFlowSDN ============================== +source src/tests/ofc25/deploy_specs_opt.sh +cp manifests/contextservice.yaml.bak manifests/contextservice.yaml +sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfs_opt_context"/}' manifests/contextservice.yaml + +./deploy/crdb.sh +./deploy/nats.sh +./deploy/kafka.sh +#./deploy/qdb.sh +#./deploy/expose_dashboard.sh +./deploy/tfs.sh +./deploy/show.sh + +mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_opt.sh + + +## ===== Deploy IP TeraFlowSDN ============================== +#source src/tests/ofc25/deploy_specs_ip.sh +#cp manifests/contextservice.yaml.bak manifests/contextservice.yaml +#sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfs_ip_context"/}' manifests/contextservice.yaml +# +#./deploy/crdb.sh +#./deploy/nats.sh +#./deploy/kafka.sh +##./deploy/qdb.sh +##./deploy/expose_dashboard.sh +#./deploy/tfs.sh +#./deploy/show.sh +# +#mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_ip.sh + + +## ===== Deploy End-to-End TeraFlowSDN ==================== +#source src/tests/ofc25/deploy_specs_e2e.sh +#cp manifests/contextservice.yaml.bak manifests/contextservice.yaml +#sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfs_e2e_context"/}' manifests/contextservice.yaml +# +#./deploy/crdb.sh +#./deploy/nats.sh +#./deploy/kafka.sh +##./deploy/qdb.sh +##./deploy/expose_dashboard.sh +#./deploy/tfs.sh +#./deploy/show.sh +# +#mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_e2e.sh + + +# ===== Recovering files ========================= +mv manifests/contextservice.yaml.bak manifests/contextservice.yaml + +# ===== Onboarding topologies ========================= +# TODO: pending... + +# ===== Configure subscriptions ========================= +# This should not be needed +#./src/tests/ofc25/subscription_ws_ip.sh +#./src/tests/ofc25/subscription_ws_e2e.sh + +echo "Done!" diff --git a/src/tests/ecoc24/deploy_e2e.sh b/src/tests/ofc25/deploy_e2e.sh similarity index 84% rename from src/tests/ecoc24/deploy_e2e.sh rename to src/tests/ofc25/deploy_e2e.sh index cbfcfdc21..943487ae5 100755 --- a/src/tests/ecoc24/deploy_e2e.sh +++ b/src/tests/ofc25/deploy_e2e.sh @@ -18,13 +18,13 @@ kubectl delete namespace tfs-e2e # Delete secondary ingress controllers -kubectl delete -f src/tests/ecoc24/nginx-ingress-controller-e2e.yaml +kubectl delete -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml # Create secondary ingress controllers -kubectl apply -f src/tests/ecoc24/nginx-ingress-controller-e2e.yaml +kubectl apply -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml # Deploy TFS for E2E -source src/tests/ecoc24/deploy_specs_e2e.sh +source src/tests/ofc25/deploy_specs_e2e.sh # Change the name for the database cp manifests/contextservice.yaml manifests/contextservice.yaml.bak @@ -33,6 +33,6 @@ sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfs_e2e_context"/}' manifest mv manifests/contextservice.yaml.bak manifests/contextservice.yaml #Configure Subscription WS -./src/tests/ecoc24/subscription_ws_e2e.sh +./src/tests/ofc25/subscription_ws_e2e.sh mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_e2e.sh diff --git a/src/tests/ecoc24/deploy_ip.sh b/src/tests/ofc25/deploy_ip.sh similarity index 84% rename from src/tests/ecoc24/deploy_ip.sh rename to src/tests/ofc25/deploy_ip.sh index 694b24698..7cd145946 100755 --- a/src/tests/ecoc24/deploy_ip.sh +++ b/src/tests/ofc25/deploy_ip.sh @@ -18,13 +18,13 @@ kubectl delete namespace tfs-ip # Delete secondary ingress controllers -kubectl delete -f src/tests/ecoc24/nginx-ingress-controller-ip.yaml +kubectl delete -f src/tests/ofc25/nginx-ingress-controller-ip.yaml # Create secondary ingress controllers -kubectl apply -f src/tests/ecoc24/nginx-ingress-controller-ip.yaml +kubectl apply -f src/tests/ofc25/nginx-ingress-controller-ip.yaml # Deploy TFS for IP -source src/tests/ecoc24/deploy_specs_ip.sh +source src/tests/ofc25/deploy_specs_ip.sh # Change the name for the database cp manifests/contextservice.yaml manifests/contextservice.yaml.bak @@ -33,6 +33,6 @@ sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfs_ip_context"/}' manifests mv manifests/contextservice.yaml.bak manifests/contextservice.yaml #Configure Subscription WS -./src/tests/ecoc24/subscription_ws_ip.sh +./src/tests/ofc25/subscription_ws_ip.sh mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_ip.sh diff --git a/src/tests/ecoc24/deploy_opt.sh b/src/tests/ofc25/deploy_opt.sh similarity index 86% rename from src/tests/ecoc24/deploy_opt.sh rename to src/tests/ofc25/deploy_opt.sh index c85b6e08b..a38645e41 100755 --- a/src/tests/ecoc24/deploy_opt.sh +++ b/src/tests/ofc25/deploy_opt.sh @@ -18,13 +18,13 @@ kubectl delete namespace tfs-opt # Delete secondary ingress controllers -kubectl delete -f src/tests/ecoc24/nginx-ingress-controller-opt.yaml +kubectl delete -f src/tests/ofc25/nginx-ingress-controller-opt.yaml # Create secondary ingress controllers -kubectl apply -f src/tests/ecoc24/nginx-ingress-controller-opt.yaml +kubectl apply -f src/tests/ofc25/nginx-ingress-controller-opt.yaml # Deploy TFS for OPT -source src/tests/ecoc24/deploy_specs_opt.sh +source src/tests/ofc25/deploy_specs_opt.sh # Change the name for the database cp manifests/contextservice.yaml manifests/contextservice.yaml.bak diff --git a/src/tests/ecoc24/deploy_specs_e2e.sh b/src/tests/ofc25/deploy_specs_e2e.sh similarity index 98% rename from src/tests/ecoc24/deploy_specs_e2e.sh rename to src/tests/ofc25/deploy_specs_e2e.sh index 2792f9fd3..e276410df 100755 --- a/src/tests/ecoc24/deploy_specs_e2e.sh +++ b/src/tests/ofc25/deploy_specs_e2e.sh @@ -97,7 +97,7 @@ export TFS_IMAGE_TAG="dev" export TFS_K8S_NAMESPACE="tfs-e2e" # Set additional manifest files to be applied after the deployment -export TFS_EXTRA_MANIFESTS="src/tests/ecoc24/tfs-ingress-e2e.yaml" +export TFS_EXTRA_MANIFESTS="src/tests/ofc25/tfs-ingress-e2e.yaml" # Uncomment to monitor performance of components #export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" @@ -134,7 +134,7 @@ export CRDB_PASSWORD="tfs123" export CRDB_DEPLOY_MODE="single" # Disable flag for dropping database, if it exists. -export CRDB_DROP_DATABASE_IF_EXISTS="YES" +export CRDB_DROP_DATABASE_IF_EXISTS="" # Disable flag for re-deploying CockroachDB from scratch. export CRDB_REDEPLOY="" @@ -204,7 +204,7 @@ export GRAF_EXT_PORT_HTTP="3000" # ----- Apache Kafka ----------------------------------------------------------- # Set the namespace where Apache Kafka will be deployed. -export KFK_NAMESPACE="kafka" +export KFK_NAMESPACE="kafka-e2e" # Set the port Apache Kafka server will be exposed to. export KFK_SERVER_PORT="9092" diff --git a/src/tests/ecoc24/deploy_specs_ip.sh b/src/tests/ofc25/deploy_specs_ip.sh similarity index 98% rename from src/tests/ecoc24/deploy_specs_ip.sh rename to src/tests/ofc25/deploy_specs_ip.sh index 1e105557b..247b9353c 100755 --- a/src/tests/ecoc24/deploy_specs_ip.sh +++ b/src/tests/ofc25/deploy_specs_ip.sh @@ -97,7 +97,7 @@ export TFS_IMAGE_TAG="dev" export TFS_K8S_NAMESPACE="tfs-ip" # Set additional manifest files to be applied after the deployment -export TFS_EXTRA_MANIFESTS="src/tests/ecoc24/tfs-ingress-ip.yaml" +export TFS_EXTRA_MANIFESTS="src/tests/ofc25/tfs-ingress-ip.yaml" # Uncomment to monitor performance of components #export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" @@ -134,7 +134,7 @@ export CRDB_PASSWORD="tfs123" export CRDB_DEPLOY_MODE="single" # Disable flag for dropping database, if it exists. -export CRDB_DROP_DATABASE_IF_EXISTS="YES" +export CRDB_DROP_DATABASE_IF_EXISTS="" # Disable flag for re-deploying CockroachDB from scratch. export CRDB_REDEPLOY="" @@ -204,7 +204,7 @@ export GRAF_EXT_PORT_HTTP="3000" # ----- Apache Kafka ----------------------------------------------------------- # Set the namespace where Apache Kafka will be deployed. -export KFK_NAMESPACE="kafka" +export KFK_NAMESPACE="kafka-ip" # Set the port Apache Kafka server will be exposed to. export KFK_SERVER_PORT="9092" diff --git a/src/tests/ecoc24/deploy_specs_opt.sh b/src/tests/ofc25/deploy_specs_opt.sh similarity index 98% rename from src/tests/ecoc24/deploy_specs_opt.sh rename to src/tests/ofc25/deploy_specs_opt.sh index 5c2467831..3535f50fe 100755 --- a/src/tests/ecoc24/deploy_specs_opt.sh +++ b/src/tests/ofc25/deploy_specs_opt.sh @@ -97,7 +97,7 @@ export TFS_IMAGE_TAG="dev" export TFS_K8S_NAMESPACE="tfs-opt" # Set additional manifest files to be applied after the deployment -export TFS_EXTRA_MANIFESTS="src/tests/ecoc24/tfs-ingress-opt.yaml" +export TFS_EXTRA_MANIFESTS="src/tests/ofc25/tfs-ingress-opt.yaml" # Uncomment to monitor performance of components #export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" @@ -204,7 +204,7 @@ export GRAF_EXT_PORT_HTTP="3000" # ----- Apache Kafka ----------------------------------------------------------- # Set the namespace where Apache Kafka will be deployed. -export KFK_NAMESPACE="kafka" +export KFK_NAMESPACE="kafka-opt" # Set the port Apache Kafka server will be exposed to. export KFK_SERVER_PORT="9092" diff --git a/src/tests/ecoc24/descriptors/descriptor_e2e.json b/src/tests/ofc25/descriptors/descriptor_e2e.json similarity index 100% rename from src/tests/ecoc24/descriptors/descriptor_e2e.json rename to src/tests/ofc25/descriptors/descriptor_e2e.json diff --git a/src/tests/ecoc24/descriptors/descriptor_ip.json b/src/tests/ofc25/descriptors/descriptor_ip.json similarity index 100% rename from src/tests/ecoc24/descriptors/descriptor_ip.json rename to src/tests/ofc25/descriptors/descriptor_ip.json diff --git a/src/tests/ecoc24/descriptors/descriptor_opt.json b/src/tests/ofc25/descriptors/descriptor_opt.json similarity index 100% rename from src/tests/ecoc24/descriptors/descriptor_opt.json rename to src/tests/ofc25/descriptors/descriptor_opt.json diff --git a/src/tests/ofc25/dump_logs.sh b/src/tests/ofc25/dump_logs.sh new file mode 100755 index 000000000..02b1f524c --- /dev/null +++ b/src/tests/ofc25/dump_logs.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 IP..." +mkdir -p tmp/exec/ip +kubectl --namespace tfs-ip logs deployment/contextservice -c server > tmp/exec/ip/context.log +kubectl --namespace tfs-ip logs deployment/deviceservice -c server > tmp/exec/ip/device.log +kubectl --namespace tfs-ip logs deployment/pathcompservice -c frontend > tmp/exec/ip/pathcomp-frontend.log +kubectl --namespace tfs-ip logs deployment/pathcompservice -c backend > tmp/exec/ip/pathcomp-backend.log +kubectl --namespace tfs-ip logs deployment/serviceservice -c server > tmp/exec/ip/service.log +kubectl --namespace tfs-ip logs deployment/nbiservice -c server > tmp/exec/ip/nbi.log +kubectl --namespace tfs-ip logs deployment/vnt-managerservice -c server > tmp/exec/ip/vntm.log +printf "\n" + +echo "Collecting logs for IP..." +mkdir -p tmp/exec/opt +kubectl --namespace tfs-opt logs deployment/contextservice -c server > tmp/exec/opt/context.log +kubectl --namespace tfs-opt logs deployment/deviceservice -c server > tmp/exec/opt/device.log +kubectl --namespace tfs-opt logs deployment/pathcompservice -c frontend > tmp/exec/opt/pathcomp-frontend.log +kubectl --namespace tfs-opt logs deployment/pathcompservice -c backend > tmp/exec/opt/pathcomp-backend.log +kubectl --namespace tfs-opt logs deployment/serviceservice -c server > tmp/exec/opt/service.log +kubectl --namespace tfs-opt logs deployment/nbiservice -c server > tmp/exec/opt/nbi.log +printf "\n" + +echo "Collecting logs for E2E..." +mkdir -p tmp/exec/e2e +kubectl --namespace tfs-e2e logs deployment/contextservice -c server > tmp/exec/e2e/context.log +kubectl --namespace tfs-e2e logs deployment/deviceservice -c server > tmp/exec/e2e/device.log +kubectl --namespace tfs-e2e logs deployment/pathcompservice -c frontend > tmp/exec/e2e/pathcomp-frontend.log +kubectl --namespace tfs-e2e logs deployment/pathcompservice -c backend > tmp/exec/e2e/pathcomp-backend.log +kubectl --namespace tfs-e2e logs deployment/serviceservice -c server > tmp/exec/e2e/service.log +kubectl --namespace tfs-e2e logs deployment/nbiservice -c server > tmp/exec/e2e/nbi.log +kubectl --namespace tfs-e2e logs deployment/e2e-orchestratorservice -c server > tmp/exec/e2e/e2eorch.log +printf "\n" + +echo "Done!" diff --git a/src/tests/ecoc24/nginx-ingress-controller-e2e.yaml b/src/tests/ofc25/nginx-ingress-controller-e2e.yaml similarity index 100% rename from src/tests/ecoc24/nginx-ingress-controller-e2e.yaml rename to src/tests/ofc25/nginx-ingress-controller-e2e.yaml diff --git a/src/tests/ecoc24/nginx-ingress-controller-ip.yaml b/src/tests/ofc25/nginx-ingress-controller-ip.yaml similarity index 100% rename from src/tests/ecoc24/nginx-ingress-controller-ip.yaml rename to src/tests/ofc25/nginx-ingress-controller-ip.yaml diff --git a/src/tests/ecoc24/nginx-ingress-controller-opt.yaml b/src/tests/ofc25/nginx-ingress-controller-opt.yaml similarity index 100% rename from src/tests/ecoc24/nginx-ingress-controller-opt.yaml rename to src/tests/ofc25/nginx-ingress-controller-opt.yaml diff --git a/src/tests/ecoc24/show_deploy.sh b/src/tests/ofc25/show_deploy.sh similarity index 100% rename from src/tests/ecoc24/show_deploy.sh rename to src/tests/ofc25/show_deploy.sh diff --git a/src/tests/ecoc24/subscription_ws_e2e.sh b/src/tests/ofc25/subscription_ws_e2e.sh similarity index 100% rename from src/tests/ecoc24/subscription_ws_e2e.sh rename to src/tests/ofc25/subscription_ws_e2e.sh diff --git a/src/tests/ecoc24/subscription_ws_ip.sh b/src/tests/ofc25/subscription_ws_ip.sh similarity index 100% rename from src/tests/ecoc24/subscription_ws_ip.sh rename to src/tests/ofc25/subscription_ws_ip.sh diff --git a/src/tests/ecoc24/tests/__init__.py b/src/tests/ofc25/tests/__init__.py similarity index 100% rename from src/tests/ecoc24/tests/__init__.py rename to src/tests/ofc25/tests/__init__.py diff --git a/src/tests/ecoc24/tests/create_service.py b/src/tests/ofc25/tests/create_service.py similarity index 100% rename from src/tests/ecoc24/tests/create_service.py rename to src/tests/ofc25/tests/create_service.py diff --git a/src/tests/ecoc24/tests/delete_service.py b/src/tests/ofc25/tests/delete_service.py similarity index 100% rename from src/tests/ecoc24/tests/delete_service.py rename to src/tests/ofc25/tests/delete_service.py diff --git a/src/tests/ecoc24/tests/test_functional_bootstrap_e2e.py b/src/tests/ofc25/tests/test_functional_bootstrap_e2e.py similarity index 100% rename from src/tests/ecoc24/tests/test_functional_bootstrap_e2e.py rename to src/tests/ofc25/tests/test_functional_bootstrap_e2e.py diff --git a/src/tests/ecoc24/tests/test_functional_bootstrap_ip.py b/src/tests/ofc25/tests/test_functional_bootstrap_ip.py similarity index 100% rename from src/tests/ecoc24/tests/test_functional_bootstrap_ip.py rename to src/tests/ofc25/tests/test_functional_bootstrap_ip.py diff --git a/src/tests/ecoc24/tests/test_functional_bootstrap_opt.py b/src/tests/ofc25/tests/test_functional_bootstrap_opt.py similarity index 100% rename from src/tests/ecoc24/tests/test_functional_bootstrap_opt.py rename to src/tests/ofc25/tests/test_functional_bootstrap_opt.py diff --git a/src/tests/ecoc24/tests/test_functional_cleanup.py b/src/tests/ofc25/tests/test_functional_cleanup.py similarity index 100% rename from src/tests/ecoc24/tests/test_functional_cleanup.py rename to src/tests/ofc25/tests/test_functional_cleanup.py diff --git a/src/tests/ecoc24/tests/test_functional_create_service.py b/src/tests/ofc25/tests/test_functional_create_service.py similarity index 100% rename from src/tests/ecoc24/tests/test_functional_create_service.py rename to src/tests/ofc25/tests/test_functional_create_service.py diff --git a/src/tests/ecoc24/tests/test_functional_delete_service.py b/src/tests/ofc25/tests/test_functional_delete_service.py similarity index 100% rename from src/tests/ecoc24/tests/test_functional_delete_service.py rename to src/tests/ofc25/tests/test_functional_delete_service.py diff --git a/src/tests/ecoc24/tfs-ingress-e2e.yaml b/src/tests/ofc25/tfs-ingress-e2e.yaml similarity index 100% rename from src/tests/ecoc24/tfs-ingress-e2e.yaml rename to src/tests/ofc25/tfs-ingress-e2e.yaml diff --git a/src/tests/ecoc24/tfs-ingress-ip.yaml b/src/tests/ofc25/tfs-ingress-ip.yaml similarity index 100% rename from src/tests/ecoc24/tfs-ingress-ip.yaml rename to src/tests/ofc25/tfs-ingress-ip.yaml diff --git a/src/tests/ecoc24/tfs-ingress-opt.yaml b/src/tests/ofc25/tfs-ingress-opt.yaml similarity index 100% rename from src/tests/ecoc24/tfs-ingress-opt.yaml rename to src/tests/ofc25/tfs-ingress-opt.yaml diff --git a/src/tests/ofc25/undeploy.sh b/src/tests/ofc25/undeploy.sh new file mode 100755 index 000000000..e86fa14b2 --- /dev/null +++ b/src/tests/ofc25/undeploy.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# ===== Check Microk8s is ready ============================== +microk8s status --wait-ready +kubectl get pods --all-namespaces + +# ===== Cleanup old deployments ============================== +helm3 uninstall --namespace nats-e2e nats-e2e 2>/dev/null || true +helm3 uninstall --namespace nats-ip nats-ip 2>/dev/null || true +helm3 uninstall --namespace nats-opt nats-opt 2>/dev/null || true +helm3 uninstall --namespace nats nats 2>/dev/null || true +kubectl delete namespaces tfs tfs-ip tfs-opt tfs-e2e --ignore-not-found +kubectl delete namespaces qdb qdb-e2e qdb-opt qdb-ip --ignore-not-found +kubectl delete namespaces kafka kafka-ip kafka-opt kafka-e2e --ignore-not-found +kubectl delete namespaces nats nats-ip nats-opt nats-e2e --ignore-not-found + +kubectl delete -f src/tests/ofc25/nginx-ingress-controller-opt.yaml --ignore-not-found +kubectl delete -f src/tests/ofc25/nginx-ingress-controller-ip.yaml --ignore-not-found +kubectl delete -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml --ignore-not-found + +# ===== Check Microk8s is ready ============================== +microk8s status --wait-ready +kubectl get pods --all-namespaces + +echo "Done!" -- GitLab From b7e6b6984483409b74ddd90372bf2a78532ba611 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Mar 2025 13:19:40 +0000 Subject: [PATCH 301/463] Deployment: - Corrected deployment of kafka so that it can be deployed multiple times in different namespaces --- deploy/kafka.sh | 9 +++++---- manifests/kafka/01-zookeeper.yaml | 10 ++++------ manifests/kafka/02-kafka.yaml | 7 +++---- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/deploy/kafka.sh b/deploy/kafka.sh index e42606903..4f522df1a 100755 --- a/deploy/kafka.sh +++ b/deploy/kafka.sh @@ -42,7 +42,7 @@ export KFK_REDEPLOY=${KFK_REDEPLOY:-""} mkdir -p ${TMP_MANIFESTS_FOLDER} function kafka_deploy() { - # copy zookeeper and kafka manifest files to temporary manifest location + # copy zookeeper and kafka manifest files to temporary manifest location cp "${KFK_MANIFESTS_PATH}/${KFK_ZOOKEEPER_MANIFEST}" "${TMP_MANIFESTS_FOLDER}/${KFK_ZOOKEEPER_MANIFEST}" cp "${KFK_MANIFESTS_PATH}/${KFK_MANIFEST}" "${TMP_MANIFESTS_FOLDER}/${KFK_MANIFEST}" @@ -57,11 +57,12 @@ function kafka_deploy() { # Kafka zookeeper service should be deployed before the kafka service kubectl --namespace ${KFK_NAMESPACE} apply -f "${TMP_MANIFESTS_FOLDER}/${KFK_ZOOKEEPER_MANIFEST}" - KFK_ZOOKEEPER_SERVICE="zookeeper-service" # this command may be replaced with command to extract service name automatically - KFK_ZOOKEEPER_IP=$(kubectl --namespace ${KFK_NAMESPACE} get service ${KFK_ZOOKEEPER_SERVICE} -o 'jsonpath={.spec.clusterIP}') + #KFK_ZOOKEEPER_SERVICE="zookeeper-service" # this command may be replaced with command to extract service name automatically + #KFK_ZOOKEEPER_IP=$(kubectl --namespace ${KFK_NAMESPACE} get service ${KFK_ZOOKEEPER_SERVICE} -o 'jsonpath={.spec.clusterIP}') # Kafka service should be deployed after the zookeeper service - sed -i "s//${KFK_ZOOKEEPER_IP}/" "${TMP_MANIFESTS_FOLDER}/$KFK_MANIFEST" + #sed -i "s//${KFK_ZOOKEEPER_IP}/" "${TMP_MANIFESTS_FOLDER}/$KFK_MANIFEST" + sed -i "s//${KFK_NAMESPACE}/" "${TMP_MANIFESTS_FOLDER}/$KFK_MANIFEST" # echo ">>> Deploying Apache Kafka Broker" kubectl --namespace ${KFK_NAMESPACE} apply -f "${TMP_MANIFESTS_FOLDER}/$KFK_MANIFEST" diff --git a/manifests/kafka/01-zookeeper.yaml b/manifests/kafka/01-zookeeper.yaml index c0e87ae0c..f2cfb4f38 100644 --- a/manifests/kafka/01-zookeeper.yaml +++ b/manifests/kafka/01-zookeeper.yaml @@ -19,14 +19,13 @@ metadata: labels: app: zookeeper-service name: zookeeper-service - namespace: kafka spec: - type: NodePort + type: ClusterIP ports: - name: zookeeper-port port: 2181 - nodePort: 30181 - targetPort: 2181 + #nodePort: 30181 + #targetPort: 2181 selector: app: zookeeper --- @@ -36,7 +35,6 @@ metadata: labels: app: zookeeper name: zookeeper - namespace: kafka spec: replicas: 1 selector: @@ -52,4 +50,4 @@ spec: imagePullPolicy: IfNotPresent name: zookeeper ports: - - containerPort: 2181 \ No newline at end of file + - containerPort: 2181 diff --git a/manifests/kafka/02-kafka.yaml b/manifests/kafka/02-kafka.yaml index 8400f5944..066f0151a 100644 --- a/manifests/kafka/02-kafka.yaml +++ b/manifests/kafka/02-kafka.yaml @@ -19,7 +19,6 @@ metadata: labels: app: kafka-broker name: kafka-service - namespace: kafka spec: ports: - port: 9092 @@ -32,7 +31,6 @@ metadata: labels: app: kafka-broker name: kafka-broker - namespace: kafka spec: replicas: 1 selector: @@ -49,11 +47,12 @@ spec: - name: KAFKA_BROKER_ID value: "1" - name: KAFKA_ZOOKEEPER_CONNECT - value: :2181 + #value: :2181 + value: zookeeper-service..svc.cluster.local:2181 - name: KAFKA_LISTENERS value: PLAINTEXT://:9092 - name: KAFKA_ADVERTISED_LISTENERS - value: PLAINTEXT://kafka-service.kafka.svc.cluster.local:9092 + value: PLAINTEXT://kafka-service..svc.cluster.local:9092 image: wurstmeister/kafka imagePullPolicy: IfNotPresent name: kafka-broker -- GitLab From 5f7a012b5e1b522514083e4281bdf814fd16444e Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Mar 2025 20:00:34 +0000 Subject: [PATCH 302/463] Common - Kafka Tools: - Corrected logic to create kafka topics --- src/common/tools/kafka/Variables.py | 121 ++++++++++++++++++---------- 1 file changed, 77 insertions(+), 44 deletions(-) diff --git a/src/common/tools/kafka/Variables.py b/src/common/tools/kafka/Variables.py index 5c7501b6c..159d7dac1 100644 --- a/src/common/tools/kafka/Variables.py +++ b/src/common/tools/kafka/Variables.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging +import logging, time from enum import Enum from confluent_kafka.admin import AdminClient, NewTopic from common.Settings import get_setting @@ -21,6 +21,12 @@ from common.Settings import get_setting LOGGER = logging.getLogger(__name__) KFK_SERVER_ADDRESS_TEMPLATE = 'kafka-service.{:s}.svc.cluster.local:{:s}' +KAFKA_TOPIC_NUM_PARTITIONS = 1 +KAFKA_TOPIC_REPLICATION_FACTOR = 1 +KAFKA_TOPIC_LIST_TIMEOUT = 5 +TOPIC_CREATE_WAIT_ITERATIONS = 10 +TOPIC_CREATE_WAIT_TIME = 1 + class KafkaConfig(Enum): @staticmethod @@ -35,59 +41,86 @@ class KafkaConfig(Enum): @staticmethod def get_admin_client(): SERVER_ADDRESS = KafkaConfig.get_kafka_address() - ADMIN_CLIENT = AdminClient({'bootstrap.servers': SERVER_ADDRESS }) + ADMIN_CLIENT = AdminClient({'bootstrap.servers': SERVER_ADDRESS}) return ADMIN_CLIENT class KafkaTopic(Enum): # TODO: Later to be populated from ENV variable. - TELEMETRY_REQUEST = 'topic_telemetry_request' - TELEMETRY_RESPONSE = 'topic_telemetry_response' - RAW = 'topic_raw' - LABELED = 'topic_labeled' - VALUE = 'topic_value' - ALARMS = 'topic_alarms' - ANALYTICS_REQUEST = 'topic_analytics_request' - ANALYTICS_RESPONSE = 'topic_analytics_response' + TELEMETRY_REQUEST = 'topic_telemetry_request' + TELEMETRY_RESPONSE = 'topic_telemetry_response' + RAW = 'topic_raw' + LABELED = 'topic_labeled' + VALUE = 'topic_value' + ALARMS = 'topic_alarms' + ANALYTICS_REQUEST = 'topic_analytics_request' + ANALYTICS_RESPONSE = 'topic_analytics_response' + VNTMANAGER_REQUEST = 'topic_vntmanager_request' + VNTMANAGER_RESPONSE = 'topic_vntmanager_response' @staticmethod def create_all_topics() -> bool: - """ + ''' Method to create Kafka topics defined as class members - """ - all_topics = [member.value for member in KafkaTopic] - LOGGER.debug("Kafka server address is: {:} ".format(KafkaConfig.get_kafka_address())) - if( KafkaTopic.create_new_topic_if_not_exists( all_topics )): - LOGGER.debug("All topics are created sucsessfully or Already Exists") + ''' + LOGGER.debug('Kafka server address: {:s} '.format(str(KafkaConfig.get_kafka_address()))) + kafka_admin_client = KafkaConfig.get_admin_client() + + topic_metadata = kafka_admin_client.list_topics(timeout=KAFKA_TOPIC_LIST_TIMEOUT) + existing_topics = set(topic_metadata.topics.keys()) + LOGGER.debug('Existing Kafka topics: {:s}'.format(str(existing_topics))) + + missing_topics = [ + NewTopic(topic.value, KAFKA_TOPIC_NUM_PARTITIONS, KAFKA_TOPIC_REPLICATION_FACTOR) + for topic in KafkaTopic + if topic.value not in existing_topics + ] + LOGGER.debug('Missing Kafka topics: {:s}'.format(str(missing_topics))) + + if len(missing_topics) == 0: + LOGGER.debug('All topics already existed.') return True - else: - LOGGER.debug("Error creating all topics") - return False - - @staticmethod - def create_new_topic_if_not_exists(new_topics: list) -> bool: - """ - Method to create Kafka topic if it does not exist. - Args: - list of topic: containing the topic name(s) to be created on Kafka - """ - LOGGER.debug("Topics names to be verified and created: {:}".format(new_topics)) - for topic in new_topics: + + create_topic_future_map = kafka_admin_client.create_topics(missing_topics) + LOGGER.debug('create_topic_future_map: {:s}'.format(str(create_topic_future_map))) + failed_topic_creations = set() + for topic, future in create_topic_future_map.items(): try: - topic_metadata = KafkaConfig.get_admin_client().list_topics(timeout=5) - # LOGGER.debug("Existing topic list: {:}".format(topic_metadata.topics)) - if topic not in topic_metadata.topics: - # If the topic does not exist, create a new topic - print("Topic {:} does not exist. Creating...".format(topic)) - LOGGER.debug("Topic {:} does not exist. Creating...".format(topic)) - new_topic = NewTopic(topic, num_partitions=1, replication_factor=1) - KafkaConfig.get_admin_client().create_topics([new_topic]) - else: - print("Topic name already exists: {:}".format(topic)) - LOGGER.debug("Topic name already exists: {:}".format(topic)) - except Exception as e: - LOGGER.debug("Failed to create topic: {:}".format(e)) - return False - return True + LOGGER.info('Waiting for Topic({:s})...'.format(str(topic))) + future.result() # Blocks until topic is created or raises an exception + LOGGER.info('Topic({:s}) successfully created.'.format(str(topic))) + except: # pylint: disable=bare-except + LOGGER.exception('Failed to create Topic({:s})'.format(str(topic))) + failed_topic_creations.add(topic) + + if len(failed_topic_creations) > 0: return False + + LOGGER.debug('All topics created.') + + # Wait until topics appear in metadata + desired_topics = {topic.value for topic in KafkaTopic} + missing_topics = set() + for _ in range(TOPIC_CREATE_WAIT_ITERATIONS): + topic_metadata = kafka_admin_client.list_topics(timeout=KAFKA_TOPIC_LIST_TIMEOUT) + existing_topics = set(topic_metadata.topics.keys()) + missing_topics = desired_topics.difference(existing_topics) + if len(missing_topics) == 0: break + MSG = 'Waiting for Topics({:s}) to appear in metadata...' + LOGGER.debug(MSG.format(str(missing_topics))) + time.sleep(TOPIC_CREATE_WAIT_TIME) + + if len(missing_topics) > 0: + MSG = 'Something went wrong... Topics({:s}) does not appear in metadata' + LOGGER.error(MSG.format(str(missing_topics))) + return False + else: + LOGGER.debug('All topics created and available.') + return True # TODO: create all topics after the deployments (Telemetry and Analytics) + +if __name__ == '__main__': + import os + if 'KFK_SERVER_ADDRESS' not in os.environ: + os.environ['KFK_SERVER_ADDRESS'] = 'kafka-service.kafka.svc.cluster.local:9092' + KafkaTopic.create_all_topics() -- GitLab From e8477b023f7f272a088bd96864d8a92c804a992f Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Mar 2025 20:02:12 +0000 Subject: [PATCH 303/463] NBI component: - Added Kafka secret in manifest file and updated readiness/liveness probes - Corrected logs in health_probes connector - Updated requirements.in / Dockerfile / README.md - Added creation of required Kafka topics - Improved overall logging framework - Added VNT Manager Recommendation endpoint - Added Topology Updates endpoint --- manifests/nbiservice.yaml | 11 ++- src/nbi/Dockerfile | 3 +- src/nbi/README.md | 9 ++ src/nbi/requirements.in | 5 +- src/nbi/service/app.py | 43 ++++++--- .../service/health_probes/HeartbeatThread.py | 12 +-- src/nbi/service/health_probes/Namespaces.py | 4 +- src/nbi/service/topology_updates/Constants.py | 17 ++++ .../service/topology_updates/Namespaces.py | 63 +++++++++++++ .../topology_updates/TopoUpdatesThread.py | 92 +++++++++++++++++++ src/nbi/service/topology_updates/__init__.py | 20 ++++ src/nbi/service/vntm_recommend/Constants.py | 17 ++++ src/nbi/service/vntm_recommend/Namespaces.py | 40 ++++++++ .../service/vntm_recommend/VntRecommThread.py | 86 +++++++++++++++++ src/nbi/service/vntm_recommend/__init__.py | 20 ++++ 15 files changed, 411 insertions(+), 31 deletions(-) create mode 100644 src/nbi/service/topology_updates/Constants.py create mode 100644 src/nbi/service/topology_updates/Namespaces.py create mode 100644 src/nbi/service/topology_updates/TopoUpdatesThread.py create mode 100644 src/nbi/service/topology_updates/__init__.py create mode 100644 src/nbi/service/vntm_recommend/Constants.py create mode 100644 src/nbi/service/vntm_recommend/Namespaces.py create mode 100644 src/nbi/service/vntm_recommend/VntRecommThread.py create mode 100644 src/nbi/service/vntm_recommend/__init__.py diff --git a/manifests/nbiservice.yaml b/manifests/nbiservice.yaml index d2d65c719..3e6d1de84 100644 --- a/manifests/nbiservice.yaml +++ b/manifests/nbiservice.yaml @@ -44,20 +44,23 @@ spec: value: "production" # change to "development" if developing - name: IETF_NETWORK_RENDERER value: "LIBYANG" + envFrom: + - secretRef: + name: kfk-kpi-data readinessProbe: httpGet: path: /healthz port: 8080 - initialDelaySeconds: 5 + initialDelaySeconds: 30 # NBI's gunicorn takes 30~40 seconds to bootstrap periodSeconds: 10 - failureThreshold: 3 + failureThreshold: 6 livenessProbe: httpGet: path: /healthz port: 8080 - initialDelaySeconds: 5 + initialDelaySeconds: 30 # NBI's gunicorn takes 30~40 seconds to bootstrap periodSeconds: 10 - failureThreshold: 3 + failureThreshold: 6 resources: requests: cpu: 150m diff --git a/src/nbi/Dockerfile b/src/nbi/Dockerfile index c56dff12b..6bca1c81a 100644 --- a/src/nbi/Dockerfile +++ b/src/nbi/Dockerfile @@ -89,5 +89,4 @@ RUN mkdir -p /var/teraflow/tests/tools COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ # Start the service -ENTRYPOINT ["gunicorn", "-w", "4", "--worker-class", "eventlet", "-b", "0.0.0.0:8080", "nbi.service.app:app"] -#ENTRYPOINT ["gunicorn", "-w", "4", "--worker-class", "geventwebsocket.gunicorn.workers.GeventWebSocketWorker", "-b", "0.0.0.0:8080", "nbi.service.app:app"] +ENTRYPOINT ["gunicorn", "--workers", "4", "--worker-class", "eventlet", "--bind", "0.0.0.0:8080", "nbi.service.app:app"] diff --git a/src/nbi/README.md b/src/nbi/README.md index f997ce21c..5dc5be29b 100644 --- a/src/nbi/README.md +++ b/src/nbi/README.md @@ -2,6 +2,15 @@ The NBI component uses libyang to validate and process messages. Follow instructions below to install it. + +## IMPORTANT +**TL;DR**: Use kafka-python for consuming from kafka in the NBI component. + +Why: + +`confluent-kafka` is written in C, thus, it bypasses eventlet monkey_patches that convert normal threads into green_threads. +That implies methods such as consumer.poll() become blocking in eventlet scenario used by gunicorn web server. + ## Install libyang - Ref: https://github.com/CESNET/libyang - Ref: https://github.com/CESNET/libyang-python/ diff --git a/src/nbi/requirements.in b/src/nbi/requirements.in index 401a6de30..e21aee4f6 100644 --- a/src/nbi/requirements.in +++ b/src/nbi/requirements.in @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +confluent-kafka==2.3.* # only for creating topics and compatibility deepdiff==6.7.* deepmerge==1.1.* eventlet==0.39.0 @@ -19,16 +20,18 @@ Flask==2.1.3 Flask-HTTPAuth==4.5.0 Flask-RESTful==0.3.9 flask-socketio==5.5.1 -jsonschema==4.4.0 #gevent==24.11.1 #gevent-websocket==0.10.1 #greenlet==3.1.1 gunicorn==23.0.0 +jsonschema==4.4.0 +kafka-python==2.0.6 # for publishing and consuming messages in an eventlet-compatible way libyang==2.8.4 netaddr==0.9.0 pyang==2.6.0 git+https://github.com/robshakir/pyangbind.git pydantic==2.6.3 +python-socketio==5.12.1 requests==2.27.1 werkzeug==2.3.7 #websockets==12.0 diff --git a/src/nbi/service/app.py b/src/nbi/service/app.py index a413c6db8..a0206cdd6 100644 --- a/src/nbi/service/app.py +++ b/src/nbi/service/app.py @@ -20,6 +20,7 @@ eventlet.monkey_patch() #pylint: disable=wrong-import-position import logging +from common.tools.kafka.Variables import KafkaTopic from common.Constants import ServiceNameEnum from common.Settings import ( ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, @@ -39,14 +40,21 @@ from .ietf_network_slice import register_ietf_nss from .qkd_app import register_qkd_app from .restconf_root import register_restconf_root from .tfs_api import register_tfs_api +#from .topology_updates import register_topology_updates +from .vntm_recommend import register_vntm_recommend from .well_known_meta import register_well_known LOG_LEVEL = get_log_level() -logging.basicConfig(level=LOG_LEVEL) +logging.basicConfig( + level=LOG_LEVEL, + format="[Worker-%(process)d][%(asctime)s] %(levelname)s:%(name)s:%(message)s", +) logging.getLogger('socketio.server').setLevel(logging.WARNING) LOGGER = logging.getLogger(__name__) +LOGGER.info('Starting...') + wait_for_environment_variables([ get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST ), get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC), @@ -58,23 +66,32 @@ wait_for_environment_variables([ BASE_URL = get_service_baseurl_http(ServiceNameEnum.NBI) or '' +LOGGER.info('Creating missing Kafka topics...') +KafkaTopic.create_all_topics() +LOGGER.info('Created required Kafka topics') + nbi_app = NbiApplication(base_url=BASE_URL) -register_health_probes(nbi_app) -register_restconf_root(nbi_app) -register_well_known (nbi_app) -register_tfs_api (nbi_app) -register_etsi_bwm_api (nbi_app) -register_ietf_hardware(nbi_app) -register_ietf_l2vpn (nbi_app) -register_ietf_l3vpn (nbi_app) -register_ietf_network (nbi_app) -register_ietf_nss (nbi_app) -register_ietf_acl (nbi_app) -register_qkd_app (nbi_app) +register_health_probes (nbi_app) +register_restconf_root (nbi_app) +register_well_known (nbi_app) +register_tfs_api (nbi_app) +register_etsi_bwm_api (nbi_app) +register_ietf_hardware (nbi_app) +register_ietf_l2vpn (nbi_app) +register_ietf_l3vpn (nbi_app) +register_ietf_network (nbi_app) +register_ietf_nss (nbi_app) +register_ietf_acl (nbi_app) +register_qkd_app (nbi_app) +#register_topology_updates(nbi_app) # does not work; check if eventlet-grpc side effects +register_vntm_recommend (nbi_app) +LOGGER.info('All connectors registered') nbi_app.dump_configuration() app = nbi_app.get_flask_app() +LOGGER.info('Initialization completed!') + if __name__ == '__main__': # Only used to run it locally during development stage; # otherwise, app is directly launched by gunicorn. diff --git a/src/nbi/service/health_probes/HeartbeatThread.py b/src/nbi/service/health_probes/HeartbeatThread.py index c49f4ab49..67da0b55e 100644 --- a/src/nbi/service/health_probes/HeartbeatThread.py +++ b/src/nbi/service/health_probes/HeartbeatThread.py @@ -31,20 +31,14 @@ class HeartbeatThread(threading.Thread): self._terminate.set() def run(self): - LOGGER.debug('[HeartbeatThread::run] begin') try: + LOGGER.info('[run] Running...') while not self._terminate.is_set(): - LOGGER.debug('[HeartbeatThread::run] Running...') time.sleep(HEARTHBEAT_INTERVAL) - LOGGER.debug('[HeartbeatThread::run] Interval elapsed') - server : socketio.Server = self._namespace.server if server is None: continue - - LOGGER.debug('[HeartbeatThread::run] emitting...') data = {'uptime_seconds': time.time() - START_TIME} server.emit('uptime', data, namespace=SIO_NAMESPACE, to=SIO_ROOM) - LOGGER.debug('[HeartbeatThread::run] emitted') except: # pylint: disable=bare-except - LOGGER.exception('[HeartbeatThread::run] thread failed') - LOGGER.debug('[HeartbeatThread::run] end') + LOGGER.exception('[run] Unexpected Thread Exception') + LOGGER.info('[run] Terminated') diff --git a/src/nbi/service/health_probes/Namespaces.py b/src/nbi/service/health_probes/Namespaces.py index 9f7517d9b..8a3f9323c 100644 --- a/src/nbi/service/health_probes/Namespaces.py +++ b/src/nbi/service/health_probes/Namespaces.py @@ -30,11 +30,11 @@ class HeartbeatServerNamespace(Namespace): self._thread.stop() def on_connect(self, auth): - MSG = '[HeartbeatServerNamespace::on_connect] Client connect: sid={:s}, auth={:s}' + MSG = '[on_connect] Client connect: sid={:s}, auth={:s}' LOGGER.info(MSG.format(str(request.sid), str(auth))) join_room(SIO_ROOM, namespace=SIO_NAMESPACE) def on_disconnect(self, reason): - MSG = '[HeartbeatServerNamespace::on_disconnect] Client disconnect: sid={:s}, reason={:s}' + MSG = '[on_disconnect] Client disconnect: sid={:s}, reason={:s}' LOGGER.info(MSG.format(str(request.sid), str(reason))) leave_room(SIO_ROOM, namespace=SIO_NAMESPACE) diff --git a/src/nbi/service/topology_updates/Constants.py b/src/nbi/service/topology_updates/Constants.py new file mode 100644 index 000000000..3e4dada3a --- /dev/null +++ b/src/nbi/service/topology_updates/Constants.py @@ -0,0 +1,17 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +SIO_NAMESPACE = '/topo-updates' +SIO_ROOM = 'topo-updates' diff --git a/src/nbi/service/topology_updates/Namespaces.py b/src/nbi/service/topology_updates/Namespaces.py new file mode 100644 index 000000000..963a1f26c --- /dev/null +++ b/src/nbi/service/topology_updates/Namespaces.py @@ -0,0 +1,63 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 import request +from flask_socketio import Namespace, join_room, leave_room +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.proto.context_pb2 import TopologyId +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Topology import json_topology_id +from context.client.ContextClient import ContextClient +from .Constants import SIO_NAMESPACE, SIO_ROOM +from .TopoUpdatesThread import TopoUpdatesThread + +LOGGER = logging.getLogger(__name__) + +class TopoUpdatesServerNamespace(Namespace): + def __init__(self): + super().__init__(namespace=SIO_NAMESPACE) + self._thread = TopoUpdatesThread(self) + self._thread.start() + + def stop_thread(self) -> None: + self._thread.stop() + + def on_connect(self, auth): + MSG = '[on_connect] Client connect: sid={:s}, auth={:s}' + LOGGER.info(MSG.format(str(request.sid), str(auth))) + join_room(SIO_ROOM, namespace=SIO_NAMESPACE) + + LOGGER.debug('[on_connect] emitting topology snapshot...') + + context_id = json_context_id(DEFAULT_CONTEXT_NAME) + topology_id = json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id) + + try: + context_client = ContextClient() + topology_details = context_client.GetTopologyDetails( + TopologyId(**topology_id) + ) + except: # pylint: disable=bare-except + MSG = 'Unable to retrieve topology snapshot: {:s}' + LOGGER.exception(MSG.format(str(topology_id))) + else: + topology_snapshot = grpc_message_to_json_string(topology_details) + self.emit('topology-snapshot', topology_snapshot) + + def on_disconnect(self, reason): + MSG = '[on_disconnect] Client disconnect: sid={:s}, reason={:s}' + LOGGER.info(MSG.format(str(request.sid), str(reason))) + leave_room(SIO_ROOM, namespace=SIO_NAMESPACE) diff --git a/src/nbi/service/topology_updates/TopoUpdatesThread.py b/src/nbi/service/topology_updates/TopoUpdatesThread.py new file mode 100644 index 000000000..dd9f96cd6 --- /dev/null +++ b/src/nbi/service/topology_updates/TopoUpdatesThread.py @@ -0,0 +1,92 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, socketio, threading +from common.proto.context_pb2 import TopologyId +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Topology import json_topology_id +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from context.client.ContextClient import ContextClient +from context.client.EventsCollector import EventsCollector +from .Constants import SIO_NAMESPACE, SIO_ROOM + +LOGGER = logging.getLogger(__name__) + +ADMIN_TOPOLOGY_ID = TopologyId( + **json_topology_id( + DEFAULT_TOPOLOGY_NAME, + context_id=json_context_id(DEFAULT_CONTEXT_NAME) + ) +) + +GET_EVENT_TIMEOUT = 1.0 + +class TopoUpdatesThread(threading.Thread): + def __init__(self, namespace : socketio.Namespace): + super().__init__(daemon=True) + self._terminate = threading.Event() + self._namespace = namespace + + def start(self): + self._terminate.clear() + return super().start() + + def stop(self) -> None: + self._terminate.set() + + def run(self): + LOGGER.info('[run] Starting...') + try: + context_client = ContextClient() + events_collector = EventsCollector( + context_client, + log_events_received = True, + activate_context_collector = True, + activate_topology_collector = True, + activate_device_collector = True, + activate_link_collector = True, + activate_service_collector = False, + activate_slice_collector = False, + activate_connection_collector = False, + ) + events_collector.start() + + LOGGER.info('[run] Running...') + while not self._terminate.is_set(): + event = events_collector.get_event(block=True, timeout=GET_EVENT_TIMEOUT) + if event is None: continue + MSG = '[run] Event: {:s}' + LOGGER.debug(MSG.format(grpc_message_to_json_string(event))) + + # TODO: ideally, each event should trigger a notification containing + # the type of event and the relevant data for the event. To simplify, + # for now, the entire topology is sent. + + topology_details = context_client.GetTopologyDetails(ADMIN_TOPOLOGY_ID) + topology_update = grpc_message_to_json_string(topology_details) + + LOGGER.debug('[run] checking server namespace...') + server : socketio.Server = self._namespace.server + if server is None: continue + + LOGGER.debug('[run] emitting topology update...') + server.emit('topology-update', topology_update, namespace=SIO_NAMESPACE, to=SIO_ROOM) + LOGGER.debug('[run] emitted') + + LOGGER.info('[run] Exiting') + events_collector.stop() + except: # pylint: disable=bare-except + LOGGER.exception('[run] Unexpected Thread Exception') + LOGGER.info('[run] Terminated') diff --git a/src/nbi/service/topology_updates/__init__.py b/src/nbi/service/topology_updates/__init__.py new file mode 100644 index 000000000..6a3d33228 --- /dev/null +++ b/src/nbi/service/topology_updates/__init__.py @@ -0,0 +1,20 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from nbi.service.NbiApplication import NbiApplication +from .Namespaces import TopoUpdatesServerNamespace + +def register_topology_updates(nbi_app : NbiApplication): + nbi_app.add_websocket_namespace(TopoUpdatesServerNamespace()) diff --git a/src/nbi/service/vntm_recommend/Constants.py b/src/nbi/service/vntm_recommend/Constants.py new file mode 100644 index 000000000..99438dac3 --- /dev/null +++ b/src/nbi/service/vntm_recommend/Constants.py @@ -0,0 +1,17 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +SIO_NAMESPACE = '/vnt-recomm' +SIO_ROOM = 'vnt-recomm' diff --git a/src/nbi/service/vntm_recommend/Namespaces.py b/src/nbi/service/vntm_recommend/Namespaces.py new file mode 100644 index 000000000..c4cb211a6 --- /dev/null +++ b/src/nbi/service/vntm_recommend/Namespaces.py @@ -0,0 +1,40 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 import request +from flask_socketio import Namespace, join_room, leave_room +from .Constants import SIO_NAMESPACE, SIO_ROOM +from .VntRecommThread import VntRecommThread + +LOGGER = logging.getLogger(__name__) + +class VntRecommServerNamespace(Namespace): + def __init__(self): + super().__init__(namespace=SIO_NAMESPACE) + self._thread = VntRecommThread(self) + self._thread.start() + + def stop_thread(self) -> None: + self._thread.stop() + + def on_connect(self, auth): + MSG = '[on_connect] Client connect: sid={:s}, auth={:s}' + LOGGER.info(MSG.format(str(request.sid), str(auth))) + join_room(SIO_ROOM, namespace=SIO_NAMESPACE) + + def on_disconnect(self, reason): + MSG = '[on_disconnect] Client disconnect: sid={:s}, reason={:s}' + LOGGER.info(MSG.format(str(request.sid), str(reason))) + leave_room(SIO_ROOM, namespace=SIO_NAMESPACE) diff --git a/src/nbi/service/vntm_recommend/VntRecommThread.py b/src/nbi/service/vntm_recommend/VntRecommThread.py new file mode 100644 index 000000000..d52487513 --- /dev/null +++ b/src/nbi/service/vntm_recommend/VntRecommThread.py @@ -0,0 +1,86 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, socketio, threading +from common.tools.kafka.Variables import KafkaConfig, KafkaTopic +from kafka import KafkaConsumer +from .Constants import SIO_NAMESPACE, SIO_ROOM + +logging.getLogger('kafka.client').setLevel(logging.WARNING) +logging.getLogger('kafka.cluster').setLevel(logging.WARNING) +logging.getLogger('kafka.conn').setLevel(logging.WARNING) +logging.getLogger('kafka.consumer.fetcher').setLevel(logging.WARNING) +logging.getLogger('kafka.consumer.group').setLevel(logging.WARNING) +logging.getLogger('kafka.consumer.subscription_state').setLevel(logging.WARNING) +logging.getLogger('kafka.metrics.metrics').setLevel(logging.WARNING) +logging.getLogger('kafka.protocol.parser').setLevel(logging.WARNING) + +LOGGER = logging.getLogger(__name__) + +class VntRecommThread(threading.Thread): + def __init__(self, namespace : socketio.Namespace): + super().__init__(daemon=True) + self._terminate = threading.Event() + self._namespace = namespace + + def start(self): + self._terminate.clear() + return super().start() + + def stop(self) -> None: + self._terminate.set() + + def run(self): + LOGGER.info('[run] Starting...') + try: + kafka_consumer = KafkaConsumer( + bootstrap_servers = KafkaConfig.get_kafka_address(), + group_id = None, # consumer dispatch all messages sent to subscribed topics + auto_offset_reset = 'latest', + ) + + LOGGER.info('[run] Subscribing...') + kafka_consumer.subscribe(topics=[KafkaTopic.VNTMANAGER_REQUEST.value]) + LOGGER.info('[run] Subscribed') + + while not self._terminate.is_set(): + records = kafka_consumer.poll(timeout_ms=1000, max_records=1) + if len(records) == 0: continue # no pending messages... continuing + + MSG = '[run] records={:s}' + LOGGER.debug(MSG.format(str(records))) + raise NotImplementedError('parse kafka records and extract recommendation') + + #if vntm_request.error(): + # if vntm_request.error().code() == KafkaError._PARTITION_EOF: continue + # MSG = '[run] Consumer error: {:s}' + # LOGGER.error(MSG.format(str(vntm_request.error()))) + # break + #message_key = vntm_request.key().decode('utf-8') + #message_value = vntm_request.value().decode('utf-8') + #MSG = '[run] Recommendation: key={:s} value={:s}' + #LOGGER.debug(MSG.format(str(message_key), str(message_value))) + # + #LOGGER.debug('[run] checking server namespace...') + #server : socketio.Server = self._namespace.server + #if server is None: continue + #LOGGER.debug('[run] emitting recommendation...') + #server.emit('recommendation', message_value, namespace=SIO_NAMESPACE, to=SIO_ROOM) + #LOGGER.debug('[run] emitted') + + LOGGER.info('[run] Closing...') + kafka_consumer.close() + except: # pylint: disable=bare-except + LOGGER.exception('[run] Unexpected Thread Exception') + LOGGER.info('[run] Terminated') diff --git a/src/nbi/service/vntm_recommend/__init__.py b/src/nbi/service/vntm_recommend/__init__.py new file mode 100644 index 000000000..21deb31f0 --- /dev/null +++ b/src/nbi/service/vntm_recommend/__init__.py @@ -0,0 +1,20 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from nbi.service.NbiApplication import NbiApplication +from .Namespaces import VntRecommServerNamespace + +def register_vntm_recommend(nbi_app : NbiApplication): + nbi_app.add_websocket_namespace(VntRecommServerNamespace()) -- GitLab From 736541ca8411c1d391fd960b02a56626f073ef37 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Mar 2025 20:02:50 +0000 Subject: [PATCH 304/463] OFC25 tests: - Updated descriptor files --- .../ofc25/descriptors/descriptor_e2e.json | 163 ++- .../ofc25/descriptors/descriptor_ip.json | 243 +---- .../ofc25/descriptors/descriptor_opt.json | 985 ++++-------------- 3 files changed, 301 insertions(+), 1090 deletions(-) diff --git a/src/tests/ofc25/descriptors/descriptor_e2e.json b/src/tests/ofc25/descriptors/descriptor_e2e.json index 41649d92e..5f1a843a7 100644 --- a/src/tests/ofc25/descriptors/descriptor_e2e.json +++ b/src/tests/ofc25/descriptors/descriptor_e2e.json @@ -1,86 +1,85 @@ { - "contexts":[ - { - "context_id":{ - "context_uuid":{ - "uuid":"admin" - } - } - } + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} ], - "topologies":[ - { - "topology_id":{ - "context_id":{ - "context_uuid":{ - "uuid":"admin" - } - }, - "topology_uuid":{ - "uuid":"admin" - } - } - } + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} ], - "links":[ - { - "link_id":{ - "link_uuid":{ - "uuid":"CSGW1_CTP1-OTP1" - } - }, - "link_endpoint_ids":[ - { - "device_id":{ - "device_uuid":{ - "uuid":"CSGW1" - } - }, - "endpoint_uuid":{ - "uuid":"PORT-xe5" - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP1.1" - } - }, - "endpoint_uuid":{ - "uuid":"P2" - } - } - ] - }, - { - "link_id":{ - "link_uuid":{ - "uuid":"CSGW2_CTP1-OTP1" - } - }, - "link_endpoint_ids":[ - { - "device_id":{ - "device_uuid":{ - "uuid":"CSGW2" - } - }, - "endpoint_uuid":{ - "uuid":"PORT-xe5" - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP2.1" - } - }, - "endpoint_uuid":{ - "uuid":"P2" - } - } - ] - } + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "TFS-PACKET"}}, "device_type": "teraflowsdn", + "device_drivers": ["DEVICEDRIVER_IETF_L3VPN"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "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": "8002"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http", "username": "admin", "password": "admin" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "TFS-OPTICAL"}}, "device_type": "teraflowsdn", + "device_drivers": ["DEVICEDRIVER_OPTICAL_TFS"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "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": "8003"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http", "username": "admin", "password": "admin" + }}} + ]} + } + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "CSGW1-TP1.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "CSGW1"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"device_id": {"device_uuid": {"uuid": "TP1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "CSGW1-TP1.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "CSGW1"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"device_id": {"device_uuid": {"uuid": "TP1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "CSGW1-TP1.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "CSGW1"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"device_id": {"device_uuid": {"uuid": "TP1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + + {"link_id": {"link_uuid": {"uuid": "CSGW2-TP2.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "CSGW2"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"device_id": {"device_uuid": {"uuid": "TP2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "CSGW2-TP2.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "CSGW2"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"device_id": {"device_uuid": {"uuid": "TP2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "CSGW2-TP2.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "CSGW2"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"device_id": {"device_uuid": {"uuid": "TP2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + + {"link_id": {"link_uuid": {"uuid": "TP1.1-CSGW1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "CSGW1"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP1.2-CSGW1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "CSGW1"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP1.3-CSGW1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "CSGW1"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "TP2.1-CSGW2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "CSGW2"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP2.2-CSGW2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "CSGW2"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP2.3-CSGW2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "CSGW2"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + ]} ] - } - \ No newline at end of file +} diff --git a/src/tests/ofc25/descriptors/descriptor_ip.json b/src/tests/ofc25/descriptors/descriptor_ip.json index 11ad2d5c1..48143f547 100644 --- a/src/tests/ofc25/descriptors/descriptor_ip.json +++ b/src/tests/ofc25/descriptors/descriptor_ip.json @@ -1,213 +1,36 @@ { - "contexts":[ - { - "context_id":{ - "context_uuid":{ - "uuid":"admin" - } - } - } + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} ], - "topologies":[ - { - "topology_id":{ - "context_id":{ - "context_uuid":{ - "uuid":"admin" - } - }, - "topology_uuid":{ - "uuid":"admin" - } - } - } + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} ], - "devices":[ - { - "device_id":{ - "device_uuid":{ - "uuid":"CSGW1" - } - }, - "device_type":"emu-packet-router", - "device_drivers":[ - 0 - ], - - "device_operational_status":2, - - "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":[ - { - "name":"PORT-xe5", - "type":"copper", - "uuid":"PORT-xe5" - } - ] - } - } - }, - { - "action":1, - "custom":{ - "resource_key":"/endpoints/endpoint[PORT-xe5]", - "resource_value":{ - "name":"PORT-xe5", - "type":"copper", - "uuid":"PORT-xe5" - } - } - } - ] - }, - "device_endpoints":[ - { - "endpoint_id":{ - "device_id":{ - "device_uuid":{ - "uuid":"CSGW1" - } - }, - "endpoint_uuid":{ - "uuid":"PORT-xe5" - }, - "topology_id":{ - "context_id":{ - "context_uuid":{ - "uuid":"admin" - } - }, - "topology_uuid":{ - "uuid":"admin" - } - } - }, - "endpoint_location":{ - - }, - "endpoint_type":"optical", - "kpi_sample_types":[ - - ], - "name":"PORT-xe5" - } - ], - - "name":"CSGW1" - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"CSGW2" - } - }, - "device_type":"emu-packet-router", - "device_drivers":[ - 0 - ], - - "device_operational_status":2, - - "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":[ - { - "name":"PORT-xe5", - "type":"copper", - "uuid":"PORT-xe5" - } - ] - } - } - }, - { - "action":1, - "custom":{ - "resource_key":"/endpoints/endpoint[PORT-xe5]", - "resource_value":{ - "name":"PORT-xe5", - "type":"copper", - "uuid":"PORT-xe5" - } - } - } - ] - }, - "device_endpoints":[ - { - "endpoint_id":{ - "device_id":{ - "device_uuid":{ - "uuid":"CSGW2" - } - }, - "endpoint_uuid":{ - "uuid":"PORT-xe5" - }, - "topology_id":{ - "context_id":{ - "context_uuid":{ - "uuid":"admin" - } - }, - "topology_uuid":{ - "uuid":"admin" - } - } - }, - "endpoint_location":{ - - }, - "endpoint_type":"optical", - "kpi_sample_types":[ - - ], - "name":"PORT-xe5" - } - ], - - "name":"CSGW2" - } - ], - "dummy_mode":true - } - \ No newline at end of file + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "CSGW1"}}, "device_type": "emu-packet-router", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "PORT-xe1", "type": "copper"}, + {"uuid": "PORT-xe2", "type": "copper"}, + {"uuid": "PORT-xe3", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "CSGW2"}}, "device_type": "emu-packet-router", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "PORT-xe1", "type": "copper"}, + {"uuid": "PORT-xe2", "type": "copper"}, + {"uuid": "PORT-xe3", "type": "copper"} + ]}}} + ]} + } + ] +} diff --git a/src/tests/ofc25/descriptors/descriptor_opt.json b/src/tests/ofc25/descriptors/descriptor_opt.json index cfb86b966..dffa68ed2 100644 --- a/src/tests/ofc25/descriptors/descriptor_opt.json +++ b/src/tests/ofc25/descriptors/descriptor_opt.json @@ -1,803 +1,192 @@ { - "contexts":[ - { - "context_id":{ - "context_uuid":{ - "uuid":"admin" - } - } - } + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} ], - "topologies":[ - { - "topology_id":{ - "context_id":{ - "context_uuid":{ - "uuid":"admin" - } - }, - "topology_uuid":{ - "uuid":"admin" - } - } - } + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} ], - "devices":[ - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP1.1" - } - }, - "device_type":"emu-optical-transponder", - "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":"P1" - }, - { - "sample_types":[ - - ], - "type":"copper/internal", - "uuid":"P2" - } - ] - } - } - } - ] - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP1.2" - } - }, - "device_type":"emu-optical-transponder", - "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":"P1" - }, - { - "sample_types":[ - - ], - "type":"copper/internal", - "uuid":"P2" - } - ] - } - } - } - ] - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP1.3" - } - }, - "device_type":"emu-optical-transponder", - "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":"P1" - }, - { - "sample_types":[ - - ], - "type":"copper/internal", - "uuid":"P2" - } - ] - } - } - } - ] - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"MG-ON1" - } - }, - "device_type":"emu-optical-roadm", - "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":"OTP1" - }, - { - "sample_types":[ - - ], - "type":"copper/internal", - "uuid":"OTP2" - }, - { - "sample_types":[ - - ], - "type":"copper/internal", - "uuid":"OTP3" - }, - { - "sample_types":[ - - ], - "type":"copper/internal", - "uuid":"2" - } - ] - } - } - } - ] - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"MG-ON2" - } - }, - "device_type":"emu-optical-roadm", - "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" - }, - { - "sample_types":[ - - ], - "type":"copper/internal", - "uuid":"3" - } - ] - } - } - } - ] - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"MG-ON3" - } - }, - "device_type":"emu-optical-roadm", - "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":"OTP1" - }, - { - "sample_types":[ - - ], - "type":"copper/internal", - "uuid":"OTP2" - }, - { - "sample_types":[ - - ], - "type":"copper/internal", - "uuid":"OTP3" - }, - { - "sample_types":[ - - ], - "type":"copper/internal", - "uuid":"2" - } - ] - } - } - } - ] - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP2.1" - } - }, - "device_type":"emu-optical-transponder", - "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":"P1" - }, - { - "sample_types":[ - - ], - "type":"copper/internal", - "uuid":"P2" - } - ] - } - } - } - ] - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP2.2" - } - }, - "device_type":"emu-optical-transponder", - "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":"P1" - }, - { - "sample_types":[ - - ], - "type":"copper/internal", - "uuid":"P2" - } - ] - } - } - } - ] - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP2.3" - } - }, - "device_type":"emu-optical-transponder", - "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":"P1" - }, - { - "sample_types":[ - - ], - "type":"copper/internal", - "uuid":"P2" - } - ] - } - } - } - ] - } - } + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "TP1.1"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "LINE", "type": "optical/channel"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "TP1.2"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "LINE", "type": "optical/channel"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "TP1.3"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "LINE", "type": "optical/channel"} + ]}}} + ]} + }, + + { + "device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "device_type": "emu-optical-roadm", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "ADP1", "type": "optical/add-drop"}, + {"uuid": "ADP2", "type": "optical/add-drop"}, + {"uuid": "ADP3", "type": "optical/add-drop"}, + {"uuid": "LINE2", "type": "optical/line" } + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "device_type": "emu-optical-roadm", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "LINE1", "type": "optical/line"}, + {"uuid": "LINE3", "type": "optical/line"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "device_type": "emu-optical-roadm", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "ADP1", "type": "optical/add-drop"}, + {"uuid": "ADP2", "type": "optical/add-drop"}, + {"uuid": "ADP3", "type": "optical/add-drop"}, + {"uuid": "LINE2", "type": "optical/line" } + ]}}} + ]} + }, + + { + "device_id": {"device_uuid": {"uuid": "TP2.1"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "LINE", "type": "optical/channel"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "TP2.2"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "LINE", "type": "optical/channel"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "TP2.3"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "LINE", "type": "optical/channel"} + ]}}} + ]} + } ], - "links":[ - { - "link_id":{ - "link_uuid":{ - "uuid":"MG-ON1->MG-ON2" - } - }, - "link_endpoint_ids":[ - { - "device_id":{ - "device_uuid":{ - "uuid":"MG-ON1" - } - }, - "endpoint_uuid":{ - "uuid":"2" - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"MG-ON2" - } - }, - "endpoint_uuid":{ - "uuid":"1" - } - } - ] - }, - { - "link_id":{ - "link_uuid":{ - "uuid":"MG-ON2->MG-ON3" - } - }, - "link_endpoint_ids":[ - { - "device_id":{ - "device_uuid":{ - "uuid":"MG-ON2" - } - }, - "endpoint_uuid":{ - "uuid":"3" - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"MG-ON3" - } - }, - "endpoint_uuid":{ - "uuid":"2" - } - } - ] - }, - { - "link_id":{ - "link_uuid":{ - "uuid":"OTP1.1->MG-ON1" - } - }, - "link_endpoint_ids":[ - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP1.1" - } - }, - "endpoint_uuid":{ - "uuid":"P1" - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"MG-ON1" - } - }, - "endpoint_uuid":{ - "uuid":"OTP1" - } - } - ] - }, - { - "link_id":{ - "link_uuid":{ - "uuid":"OTP1.2->MG-ON1" - } - }, - "link_endpoint_ids":[ - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP1.2" - } - }, - "endpoint_uuid":{ - "uuid":"P1" - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"MG-ON1" - } - }, - "endpoint_uuid":{ - "uuid":"OTP2" - } - } - ] - }, - { - "link_id":{ - "link_uuid":{ - "uuid":"OTP1.3->MG-ON1" - } - }, - "link_endpoint_ids":[ - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP1.3" - } - }, - "endpoint_uuid":{ - "uuid":"P1" - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"MG-ON1" - } - }, - "endpoint_uuid":{ - "uuid":"OTP3" - } - } - ] - }, - { - "link_id":{ - "link_uuid":{ - "uuid":"OTP2.1->MG-ON3" - } - }, - "link_endpoint_ids":[ - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP2.1" - } - }, - "endpoint_uuid":{ - "uuid":"P1" - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"MG-ON3" - } - }, - "endpoint_uuid":{ - "uuid":"OTP1" - } - } - ] - }, - { - "link_id":{ - "link_uuid":{ - "uuid":"OTP2.2->MG-ON3" - } - }, - "link_endpoint_ids":[ - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP2.2" - } - }, - "endpoint_uuid":{ - "uuid":"P1" - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"MG-ON3" - } - }, - "endpoint_uuid":{ - "uuid":"OTP2" - } - } - ] - }, - { - "link_id":{ - "link_uuid":{ - "uuid":"OTP2.3->MG-ON3" - } - }, - "link_endpoint_ids":[ - { - "device_id":{ - "device_uuid":{ - "uuid":"OTP2.3" - } - }, - "endpoint_uuid":{ - "uuid":"P1" - } - }, - { - "device_id":{ - "device_uuid":{ - "uuid":"MG-ON3" - } - }, - "endpoint_uuid":{ - "uuid":"OTP3" - } - } - ] - } + "links": [ + {"link_id": {"link_uuid": {"uuid": "MG-ON1->MG-ON2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "LINE2"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "endpoint_uuid": {"uuid": "LINE1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON2->MG-ON1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "endpoint_uuid": {"uuid": "LINE1"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "LINE2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON2->MG-ON3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "endpoint_uuid": {"uuid": "LINE3"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "LINE2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON3->MG-ON2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "LINE2"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "endpoint_uuid": {"uuid": "LINE3"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "TP1.1->MG-ON1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP1.1" }}, "endpoint_uuid": {"uuid": "LINE"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP1.2->MG-ON1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP1.2" }}, "endpoint_uuid": {"uuid": "LINE"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP1.3->MG-ON1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP1.3" }}, "endpoint_uuid": {"uuid": "LINE"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP2.1->MG-ON3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP2.1" }}, "endpoint_uuid": {"uuid": "LINE"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP2.2->MG-ON3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP2.2" }}, "endpoint_uuid": {"uuid": "LINE"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP2.3->MG-ON3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP2.3" }}, "endpoint_uuid": {"uuid": "LINE"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP3"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "MG-ON1->TP1.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP1"}}, + {"device_id": {"device_uuid": {"uuid": "TP1.1" }}, "endpoint_uuid": {"uuid": "LINE"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON1->TP1.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP2"}}, + {"device_id": {"device_uuid": {"uuid": "TP1.2" }}, "endpoint_uuid": {"uuid": "LINE"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON1->TP1.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP3"}}, + {"device_id": {"device_uuid": {"uuid": "TP1.3" }}, "endpoint_uuid": {"uuid": "LINE"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON3->TP2.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP1"}}, + {"device_id": {"device_uuid": {"uuid": "TP2.1" }}, "endpoint_uuid": {"uuid": "LINE"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON3->TP2.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP2"}}, + {"device_id": {"device_uuid": {"uuid": "TP2.2" }}, "endpoint_uuid": {"uuid": "LINE"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON3->TP2.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP3"}}, + {"device_id": {"device_uuid": {"uuid": "TP2.3" }}, "endpoint_uuid": {"uuid": "LINE"}} + ]} ] - } - \ No newline at end of file +} -- GitLab From d3a529f0765b4fd672d3e9ec0a56246bd0e065cd Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Mar 2025 20:29:07 +0000 Subject: [PATCH 305/463] OFC25 tests: - Updated topology descriptor files - Updated test scripts - Moved old files to separate folder --- src/tests/ofc25/{ => _old}/deploy_e2e.sh | 0 src/tests/ofc25/{ => _old}/deploy_ip.sh | 0 src/tests/ofc25/{ => _old}/deploy_opt.sh | 0 .../ofc25/{ => _old}/subscription_ws_e2e.sh | 0 .../ofc25/{ => _old}/subscription_ws_ip.sh | 0 ...{descriptor_e2e.json => topology_e2e.json} | 0 .../{descriptor_ip.json => topology_ip.json} | 0 ...{descriptor_opt.json => topology_opt.json} | 0 .../tests/test_functional_bootstrap_e2e.py | 19 +++++--- .../tests/test_functional_bootstrap_ip.py | 10 ++--- .../tests/test_functional_bootstrap_opt.py | 2 +- .../tests/test_functional_cleanup_e2e.py | 44 +++++++++++++++++++ ...eanup.py => test_functional_cleanup_ip.py} | 2 +- .../tests/test_functional_cleanup_opt.py | 44 +++++++++++++++++++ 14 files changed, 106 insertions(+), 15 deletions(-) rename src/tests/ofc25/{ => _old}/deploy_e2e.sh (100%) rename src/tests/ofc25/{ => _old}/deploy_ip.sh (100%) rename src/tests/ofc25/{ => _old}/deploy_opt.sh (100%) rename src/tests/ofc25/{ => _old}/subscription_ws_e2e.sh (100%) rename src/tests/ofc25/{ => _old}/subscription_ws_ip.sh (100%) rename src/tests/ofc25/descriptors/{descriptor_e2e.json => topology_e2e.json} (100%) rename src/tests/ofc25/descriptors/{descriptor_ip.json => topology_ip.json} (100%) rename src/tests/ofc25/descriptors/{descriptor_opt.json => topology_opt.json} (100%) create mode 100644 src/tests/ofc25/tests/test_functional_cleanup_e2e.py rename src/tests/ofc25/tests/{test_functional_cleanup.py => test_functional_cleanup_ip.py} (97%) create mode 100644 src/tests/ofc25/tests/test_functional_cleanup_opt.py diff --git a/src/tests/ofc25/deploy_e2e.sh b/src/tests/ofc25/_old/deploy_e2e.sh similarity index 100% rename from src/tests/ofc25/deploy_e2e.sh rename to src/tests/ofc25/_old/deploy_e2e.sh diff --git a/src/tests/ofc25/deploy_ip.sh b/src/tests/ofc25/_old/deploy_ip.sh similarity index 100% rename from src/tests/ofc25/deploy_ip.sh rename to src/tests/ofc25/_old/deploy_ip.sh diff --git a/src/tests/ofc25/deploy_opt.sh b/src/tests/ofc25/_old/deploy_opt.sh similarity index 100% rename from src/tests/ofc25/deploy_opt.sh rename to src/tests/ofc25/_old/deploy_opt.sh diff --git a/src/tests/ofc25/subscription_ws_e2e.sh b/src/tests/ofc25/_old/subscription_ws_e2e.sh similarity index 100% rename from src/tests/ofc25/subscription_ws_e2e.sh rename to src/tests/ofc25/_old/subscription_ws_e2e.sh diff --git a/src/tests/ofc25/subscription_ws_ip.sh b/src/tests/ofc25/_old/subscription_ws_ip.sh similarity index 100% rename from src/tests/ofc25/subscription_ws_ip.sh rename to src/tests/ofc25/_old/subscription_ws_ip.sh diff --git a/src/tests/ofc25/descriptors/descriptor_e2e.json b/src/tests/ofc25/descriptors/topology_e2e.json similarity index 100% rename from src/tests/ofc25/descriptors/descriptor_e2e.json rename to src/tests/ofc25/descriptors/topology_e2e.json diff --git a/src/tests/ofc25/descriptors/descriptor_ip.json b/src/tests/ofc25/descriptors/topology_ip.json similarity index 100% rename from src/tests/ofc25/descriptors/descriptor_ip.json rename to src/tests/ofc25/descriptors/topology_ip.json diff --git a/src/tests/ofc25/descriptors/descriptor_opt.json b/src/tests/ofc25/descriptors/topology_opt.json similarity index 100% rename from src/tests/ofc25/descriptors/descriptor_opt.json rename to src/tests/ofc25/descriptors/topology_opt.json diff --git a/src/tests/ofc25/tests/test_functional_bootstrap_e2e.py b/src/tests/ofc25/tests/test_functional_bootstrap_e2e.py index 27648969b..54225ea3f 100644 --- a/src/tests/ofc25/tests/test_functional_bootstrap_e2e.py +++ b/src/tests/ofc25/tests/test_functional_bootstrap_e2e.py @@ -16,6 +16,7 @@ import logging, os, time from common.Constants import DEFAULT_CONTEXT_NAME from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum, Empty from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string from common.tools.object_factory.Context import json_context_id from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient @@ -24,7 +25,7 @@ from tests.Fixtures import context_client, device_client # pylint: disable=unuse LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) -DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'descriptor_e2e.json') +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'topology_e2e.json') ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_scenario_bootstrap( @@ -50,7 +51,7 @@ def test_scenario_devices_enabled( """ This test validates that the devices are enabled. """ - """ DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED num_devices = -1 num_devices_enabled, num_retry = 0, 0 @@ -59,9 +60,15 @@ def test_scenario_devices_enabled( response = context_client.ListDevices(Empty()) num_devices = len(response.devices) num_devices_enabled = 0 + disabled_devices = list() for device in response.devices: - if device.device_operational_status != DEVICE_OP_STATUS_ENABLED: continue - num_devices_enabled += 1 + if device.device_operational_status == DEVICE_OP_STATUS_ENABLED: + num_devices_enabled += 1 + else: + disabled_devices.append(grpc_message_to_json(device)) LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) - num_retry += 1 """ - assert 1 == 1 + num_retry += 1 + if num_devices_enabled != num_devices: + LOGGER.info('Disabled Devices: {:s}'.format(str(disabled_devices))) + LOGGER.info('Devices: {:s}'.format(grpc_message_to_json_string(response))) + assert num_devices_enabled == num_devices diff --git a/src/tests/ofc25/tests/test_functional_bootstrap_ip.py b/src/tests/ofc25/tests/test_functional_bootstrap_ip.py index 668213a56..e4ace756f 100644 --- a/src/tests/ofc25/tests/test_functional_bootstrap_ip.py +++ b/src/tests/ofc25/tests/test_functional_bootstrap_ip.py @@ -24,7 +24,7 @@ from tests.Fixtures import context_client, device_client # pylint: disable=unuse LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) -DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'descriptor_ip.json') +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'topology_ip.json') ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_scenario_bootstrap( @@ -47,10 +47,7 @@ def test_scenario_bootstrap( def test_scenario_devices_enabled( context_client : ContextClient, # pylint: disable=redefined-outer-name ) -> None: - """ - This test validates that the devices are enabled. - """ - """ DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED num_devices = -1 num_devices_enabled, num_retry = 0, 0 @@ -63,5 +60,4 @@ def test_scenario_devices_enabled( if device.device_operational_status != DEVICE_OP_STATUS_ENABLED: continue num_devices_enabled += 1 LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) - num_retry += 1 """ - assert 1 == 1 + num_retry += 1 diff --git a/src/tests/ofc25/tests/test_functional_bootstrap_opt.py b/src/tests/ofc25/tests/test_functional_bootstrap_opt.py index f3097519a..32893e5dd 100644 --- a/src/tests/ofc25/tests/test_functional_bootstrap_opt.py +++ b/src/tests/ofc25/tests/test_functional_bootstrap_opt.py @@ -24,7 +24,7 @@ from tests.Fixtures import context_client, device_client # pylint: disable=unuse LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) -DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'descriptor_opt.json') +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'topology_opt.json') ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_scenario_bootstrap( diff --git a/src/tests/ofc25/tests/test_functional_cleanup_e2e.py b/src/tests/ofc25/tests/test_functional_cleanup_e2e.py new file mode 100644 index 000000000..cd294ae90 --- /dev/null +++ b/src/tests/ofc25/tests/test_functional_cleanup_e2e.py @@ -0,0 +1,44 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import DescriptorLoader, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'topology_e2e.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_scenario_cleanup( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/tests/ofc25/tests/test_functional_cleanup.py b/src/tests/ofc25/tests/test_functional_cleanup_ip.py similarity index 97% rename from src/tests/ofc25/tests/test_functional_cleanup.py rename to src/tests/ofc25/tests/test_functional_cleanup_ip.py index a482c6e46..87c5e2e38 100644 --- a/src/tests/ofc25/tests/test_functional_cleanup.py +++ b/src/tests/ofc25/tests/test_functional_cleanup_ip.py @@ -24,7 +24,7 @@ from tests.Fixtures import context_client, device_client # pylint: disable=un LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) -DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'topology.json') +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'topology_ip.json') ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_scenario_cleanup( diff --git a/src/tests/ofc25/tests/test_functional_cleanup_opt.py b/src/tests/ofc25/tests/test_functional_cleanup_opt.py new file mode 100644 index 000000000..03fa50fff --- /dev/null +++ b/src/tests/ofc25/tests/test_functional_cleanup_opt.py @@ -0,0 +1,44 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import DescriptorLoader, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'topology_opt.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_scenario_cleanup( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) -- GitLab From 40718a4c59bbe96052ca79aa91f51c5a91de0df3 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Fri, 14 Mar 2025 20:32:30 +0000 Subject: [PATCH 306/463] VNT Manager component: - Added creation of Kafka topics - Updated requirements.in - Updated proto file - Updated client script --- proto/vnt_manager.proto | 22 +++++--------------- src/vnt_manager/client/VNTManagerClient.py | 24 +++++----------------- src/vnt_manager/requirements.in | 3 ++- src/vnt_manager/service/__main__.py | 3 +++ 4 files changed, 15 insertions(+), 37 deletions(-) diff --git a/proto/vnt_manager.proto b/proto/vnt_manager.proto index 6442e7b90..14126528c 100644 --- a/proto/vnt_manager.proto +++ b/proto/vnt_manager.proto @@ -12,26 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -// protocol buffers documentation: https://developers.google.com/protocol-buffers/docs/proto3 syntax = "proto3"; package vnt_manager; import "context.proto"; - service VNTManagerService { - rpc VNTSubscript (VNTSubscriptionRequest) returns (VNTSubscriptionReply) {} - rpc ListVirtualLinkIds (context.Empty) returns (context.LinkIdList) {} - rpc ListVirtualLinks (context.Empty) returns (context.LinkList) {} - rpc GetVirtualLink (context.LinkId) returns (context.Link) {} - rpc SetVirtualLink (context.Link) returns (context.LinkId) {} - rpc RemoveVirtualLink (context.LinkId) returns (context.Empty) {} -} - -message VNTSubscriptionRequest { - string host = 1; - string port = 2; -} - -message VNTSubscriptionReply { - string subscription = 1; + rpc ListVirtualLinkIds(context.Empty ) returns (context.LinkIdList) {} + rpc ListVirtualLinks (context.Empty ) returns (context.LinkList ) {} + rpc GetVirtualLink (context.LinkId) returns (context.Link ) {} + rpc SetVirtualLink (context.Link ) returns (context.LinkId ) {} + rpc RemoveVirtualLink (context.LinkId) returns (context.Empty ) {} } diff --git a/src/vnt_manager/client/VNTManagerClient.py b/src/vnt_manager/client/VNTManagerClient.py index b313a590f..4ea5d3db1 100644 --- a/src/vnt_manager/client/VNTManagerClient.py +++ b/src/vnt_manager/client/VNTManagerClient.py @@ -12,22 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging - -import grpc +import grpc, logging from common.Constants import ServiceNameEnum from common.proto.context_pb2 import Empty -from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest, VNTSubscriptionReply from common.proto.vnt_manager_pb2_grpc import VNTManagerServiceStub from common.Settings import get_service_host, get_service_port_grpc +from common.proto.context_pb2 import Link, LinkId, LinkIdList, LinkList from common.tools.client.RetryDecorator import delay_exponential, retry -from common.tools.grpc.Tools import grpc_message_to_json -from common.proto.context_pb2 import ( - Link, LinkId, LinkIdList, LinkList, -) from common.tools.grpc.Tools import grpc_message_to_json_string + LOGGER = logging.getLogger(__name__) MAX_RETRIES = 15 DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) @@ -40,10 +35,8 @@ RETRY_DECORATOR = retry( class VNTManagerClient: def __init__(self, host=None, port=None): - if not host: - host = get_service_host(ServiceNameEnum.VNTMANAGER) - if not port: - port = get_service_port_grpc(ServiceNameEnum.VNTMANAGER) + if not host: host = get_service_host(ServiceNameEnum.VNTMANAGER) + if not port: port = get_service_port_grpc(ServiceNameEnum.VNTMANAGER) self.endpoint = "{:s}:{:s}".format(str(host), str(port)) LOGGER.debug("Creating channel to {:s}...".format(str(self.endpoint))) self.channel = None @@ -61,13 +54,6 @@ class VNTManagerClient: self.channel = None self.stub = None - @RETRY_DECORATOR - def VNTSubscript(self, request: VNTSubscriptionRequest) -> VNTSubscriptionReply: - LOGGER.debug("Subscript request: {:s}".format(str(grpc_message_to_json(request)))) - response = self.stub.VNTSubscript(request) - LOGGER.debug("Subscript result: {:s}".format(str(grpc_message_to_json(response)))) - return response - @RETRY_DECORATOR def ListVirtualLinkIds(self, request: Empty) -> LinkIdList: LOGGER.debug('ListVirtualLinkIds request: {:s}'.format(grpc_message_to_json_string(request))) diff --git a/src/vnt_manager/requirements.in b/src/vnt_manager/requirements.in index 38764add7..d8f9537b4 100644 --- a/src/vnt_manager/requirements.in +++ b/src/vnt_manager/requirements.in @@ -12,4 +12,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -websockets==12.0 +confluent-kafka==2.3.* +#websockets==12.0 diff --git a/src/vnt_manager/service/__main__.py b/src/vnt_manager/service/__main__.py index c36a0ae1f..089a330e1 100644 --- a/src/vnt_manager/service/__main__.py +++ b/src/vnt_manager/service/__main__.py @@ -14,6 +14,7 @@ import logging, signal, sys, threading from prometheus_client import start_http_server +from common.tools.kafka.Variables import KafkaTopic from common.Constants import ServiceNameEnum from common.Settings import ( ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, @@ -49,6 +50,8 @@ def main(): metrics_port = get_metrics_port() start_http_server(metrics_port) + KafkaTopic.create_all_topics() + # Starting VNTManager service grpc_service = VNTManagerService() grpc_service.start() -- GitLab From 32e0c18cc06a3085f151da1f34c311225d25f18a Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sat, 15 Mar 2025 15:03:45 +0000 Subject: [PATCH 307/463] Integration Tests, WebUI, PathComp: - Added new dependency on VNT Manager --- src/pathcomp/frontend/Dockerfile | 2 ++ src/tests/ecoc22/Dockerfile | 2 ++ src/tests/eucnc24/Dockerfile | 2 ++ src/tests/ofc22/Dockerfile | 2 ++ src/tests/ofc24/Dockerfile | 2 ++ src/tests/ofc25/Dockerfile | 2 ++ src/webui/Dockerfile | 2 ++ 7 files changed, 14 insertions(+) diff --git a/src/pathcomp/frontend/Dockerfile b/src/pathcomp/frontend/Dockerfile index c96db7293..baecf8f69 100644 --- a/src/pathcomp/frontend/Dockerfile +++ b/src/pathcomp/frontend/Dockerfile @@ -77,6 +77,8 @@ COPY src/service/__init__.py service/__init__.py COPY src/service/client/. service/client/ COPY src/slice/__init__.py slice/__init__.py COPY src/slice/client/. slice/client/ +COPY src/vnt_manager/__init__.py vnt_manager/__init__.py +COPY src/vnt_manager/client/. vnt_manager/client/ # Start the service ENTRYPOINT ["python", "-m", "pathcomp.frontend.service"] diff --git a/src/tests/ecoc22/Dockerfile b/src/tests/ecoc22/Dockerfile index b0489e023..996d515f3 100644 --- a/src/tests/ecoc22/Dockerfile +++ b/src/tests/ecoc22/Dockerfile @@ -78,6 +78,8 @@ COPY src/service/__init__.py service/__init__.py COPY src/service/client/. service/client/ COPY src/slice/__init__.py slice/__init__.py COPY src/slice/client/. slice/client/ +COPY src/vnt_manager/__init__.py vnt_manager/__init__.py +COPY src/vnt_manager/client/. vnt_manager/client/ COPY src/tests/*.py ./tests/ COPY src/tests/ecoc22/__init__.py ./tests/ecoc22/__init__.py COPY src/tests/ecoc22/descriptors_emulated.json ./tests/ecoc22/descriptors_emulated.json diff --git a/src/tests/eucnc24/Dockerfile b/src/tests/eucnc24/Dockerfile index 3235c74cf..2bf88714e 100644 --- a/src/tests/eucnc24/Dockerfile +++ b/src/tests/eucnc24/Dockerfile @@ -71,6 +71,8 @@ COPY src/service/__init__.py service/__init__.py COPY src/service/client/. service/client/ COPY src/slice/__init__.py slice/__init__.py COPY src/slice/client/. slice/client/ +COPY src/vnt_manager/__init__.py vnt_manager/__init__.py +COPY src/vnt_manager/client/. vnt_manager/client/ COPY src/tests/*.py ./tests/ COPY src/tests/eucnc24/__init__.py ./tests/eucnc24/__init__.py COPY src/tests/eucnc24/data/. ./tests/eucnc24/data/ diff --git a/src/tests/ofc22/Dockerfile b/src/tests/ofc22/Dockerfile index a06f66fd0..6e4ca36ec 100644 --- a/src/tests/ofc22/Dockerfile +++ b/src/tests/ofc22/Dockerfile @@ -78,6 +78,8 @@ COPY src/service/__init__.py service/__init__.py COPY src/service/client/. service/client/ COPY src/slice/__init__.py slice/__init__.py COPY src/slice/client/. slice/client/ +COPY src/vnt_manager/__init__.py vnt_manager/__init__.py +COPY src/vnt_manager/client/. vnt_manager/client/ COPY src/tests/*.py ./tests/ COPY src/tests/ofc22/__init__.py ./tests/ofc22/__init__.py COPY src/tests/ofc22/descriptors_emulated.json ./tests/ofc22/descriptors_emulated.json diff --git a/src/tests/ofc24/Dockerfile b/src/tests/ofc24/Dockerfile index 4e4e9f9e9..f2afcfbb7 100644 --- a/src/tests/ofc24/Dockerfile +++ b/src/tests/ofc24/Dockerfile @@ -78,6 +78,8 @@ COPY src/service/__init__.py service/__init__.py COPY src/service/client/. service/client/ COPY src/slice/__init__.py slice/__init__.py COPY src/slice/client/. slice/client/ +COPY src/vnt_manager/__init__.py vnt_manager/__init__.py +COPY src/vnt_manager/client/. vnt_manager/client/ COPY src/tests/*.py ./tests/ COPY src/tests/ofc24/__init__.py ./tests/ofc24/__init__.py COPY src/tests/ofc24/descriptors/topology.json ./tests/ofc24/descriptors/topology.json diff --git a/src/tests/ofc25/Dockerfile b/src/tests/ofc25/Dockerfile index cebf66695..0439d980b 100644 --- a/src/tests/ofc25/Dockerfile +++ b/src/tests/ofc25/Dockerfile @@ -73,6 +73,8 @@ COPY src/service/__init__.py service/__init__.py COPY src/service/client/. service/client/ COPY src/slice/__init__.py slice/__init__.py COPY src/slice/client/. slice/client/ +COPY src/vnt_manager/__init__.py vnt_manager/__init__.py +COPY src/vnt_manager/client/. vnt_manager/client/ COPY src/tests/*.py ./tests/ COPY src/tests/ofc25/__init__.py ./tests/ofc25/__init__.py COPY src/tests/ofc25/descriptors/descriptor_ip.json ./tests/ofc25/descriptors/descriptor_ip.json diff --git a/src/webui/Dockerfile b/src/webui/Dockerfile index 0327b68ef..d6e21dd17 100644 --- a/src/webui/Dockerfile +++ b/src/webui/Dockerfile @@ -88,6 +88,8 @@ COPY --chown=webui:webui src/qkd_app/__init__.py qkd_app/__init__.py COPY --chown=webui:webui src/qkd_app/client/. qkd_app/client/ COPY --chown=webui:webui src/bgpls_speaker/__init__.py bgpls_speaker/__init__.py COPY --chown=webui:webui src/bgpls_speaker/client/. bgpls_speaker/client/ +COPY --chown=webui:webui src/vnt_manager/__init__.py vnt_manager/__init__.py +COPY --chown=webui:webui src/vnt_manager/client/. vnt_manager/client/ COPY --chown=webui:webui src/webui/. webui/ # Start the service -- GitLab From 6cd569776615ef0715c1112b94a2be635c119c70 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sat, 15 Mar 2025 15:06:00 +0000 Subject: [PATCH 308/463] Device component: - Cosmetic changes in L2/L3 VPN drivers - Upgraded Optical TFS Driver --- src/device/service/drivers/__init__.py | 5 +- .../drivers/ietf_l2vpn/IetfL2VpnDriver.py | 3 +- .../drivers/ietf_l2vpn/TfsApiClient.py | 43 +++- .../drivers/ietf_l3vpn/TfsApiClient.py | 189 +++++++++--------- .../drivers/optical_tfs/OpticalTfsDriver.py | 126 ++++++------ .../drivers/optical_tfs/TfsApiClient.py | 128 ++++++++++++ .../drivers/optical_tfs/TfsOpticalClient.py | 100 +++++++++ .../service/drivers/optical_tfs/Tools.py | 143 ------------- .../service/drivers/optical_tfs/__init__.py | 6 - 9 files changed, 429 insertions(+), 314 deletions(-) create mode 100644 src/device/service/drivers/optical_tfs/TfsApiClient.py create mode 100644 src/device/service/drivers/optical_tfs/TfsOpticalClient.py delete mode 100644 src/device/service/drivers/optical_tfs/Tools.py diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index e3102cdf5..70ca1764f 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -188,7 +188,10 @@ if LOAD_ALL_DEVICE_DRIVERS: DRIVERS.append( (OpticalTfsDriver, [ { - FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.OPEN_LINE_SYSTEM, + FilterFieldEnum.DEVICE_TYPE: [ + DeviceTypeEnum.OPEN_LINE_SYSTEM, + DeviceTypeEnum.TERAFLOWSDN_CONTROLLER, + ], FilterFieldEnum.DRIVER: DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS, } ])) diff --git a/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py b/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py index d756ca89f..ba3cef3d8 100644 --- a/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py +++ b/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py @@ -70,9 +70,10 @@ class IetfL2VpnDriver(_Driver): def Connect(self) -> bool: with self.__lock: + if self.__started.is_set(): return True try: self.wim.check_credentials() - except Exception: # pylint: disable=broad-except + except: # pylint: disable=bare-except LOGGER.exception('Exception checking credentials') return False else: diff --git a/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py b/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py index c51e2d6bf..dd6924de0 100644 --- a/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py +++ b/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py @@ -19,6 +19,7 @@ from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum GET_DEVICES_URL = '{:s}://{:s}:{:d}/tfs-api/devices' GET_LINKS_URL = '{:s}://{:s}:{:d}/tfs-api/links' + TIMEOUT = 30 HTTP_OK_CODES = { @@ -47,6 +48,10 @@ MAPPING_DRIVER = { 'DEVICEDRIVER_OPTICAL_TFS' : 9, 'DEVICEDRIVER_IETF_ACTN' : 10, 'DEVICEDRIVER_OC' : 11, + 'DEVICEDRIVER_QKD' : 12, + 'DEVICEDRIVER_IETF_L3VPN' : 13, + 'DEVICEDRIVER_IETF_SLICE' : 14, + 'DEVICEDRIVER_NCE' : 15, } MSG_ERROR = 'Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}' @@ -59,21 +64,31 @@ class TfsApiClient: username : Optional[str] = None, password : Optional[str] = None ) -> None: self._devices_url = GET_DEVICES_URL.format(scheme, address, port) - self._links_url = GET_LINKS_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, import_topology : ImportTopologyEnum = ImportTopologyEnum.DEVICES) -> List[Dict]: + self._links_url = GET_LINKS_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, import_topology : ImportTopologyEnum = ImportTopologyEnum.DEVICES + ) -> List[Dict]: LOGGER.debug('[get_devices_endpoints] begin') - LOGGER.debug('[get_devices_endpoints] import_topology={:s}'.format(str(import_topology))) + MSG = '[get_devices_endpoints] import_topology={:s}' + LOGGER.debug(MSG.format(str(import_topology))) reply = requests.get(self._devices_url, timeout=TIMEOUT, verify=False, auth=self._auth) if reply.status_code not in HTTP_OK_CODES: - msg = MSG_ERROR.format(str(self._devices_url), str(reply.status_code), str(reply)) + msg = MSG_ERROR.format( + str(self._devices_url), str(reply.status_code), str(reply) + ) LOGGER.error(msg) raise Exception(msg) if import_topology == ImportTopologyEnum.DISABLED: - raise Exception('Unsupported import_topology mode: {:s}'.format(str(import_topology))) + MSG = 'Unsupported import_topology mode: {:s}' + raise Exception(MSG.format(str(import_topology))) result = list() for json_device in reply.json()['devices']: @@ -87,7 +102,10 @@ class TfsApiClient: 'name': json_device['name'], 'type': device_type, 'status': MAPPING_STATUS[device_status], - 'drivers': [MAPPING_DRIVER[driver] for driver in json_device['device_drivers']], + 'drivers': [ + MAPPING_DRIVER[driver] + for driver in json_device['device_drivers'] + ], } result.append((device_url, device_data)) @@ -108,7 +126,9 @@ class TfsApiClient: reply = requests.get(self._links_url, timeout=TIMEOUT, verify=False, auth=self._auth) if reply.status_code not in HTTP_OK_CODES: - msg = MSG_ERROR.format(str(self._links_url), str(reply.status_code), str(reply)) + msg = MSG_ERROR.format( + str(self._links_url), str(reply.status_code), str(reply) + ) LOGGER.error(msg) raise Exception(msg) @@ -116,7 +136,10 @@ class TfsApiClient: link_uuid : str = json_link['link_id']['link_uuid']['uuid'] link_url = '/links/link[{:s}]'.format(link_uuid) link_endpoint_ids = [ - (json_endpoint_id['device_id']['device_uuid']['uuid'], json_endpoint_id['endpoint_uuid']['uuid']) + ( + json_endpoint_id['device_id']['device_uuid']['uuid'], + json_endpoint_id['endpoint_uuid']['uuid'], + ) for json_endpoint_id in json_link['link_endpoint_ids'] ] link_data = { diff --git a/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py index 1ca965f87..2db898059 100644 --- a/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py +++ b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,80 +12,75 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging -from typing import Dict, List, Optional - -import requests +import logging, requests from requests.auth import HTTPBasicAuth - +from typing import Dict, List, Optional from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum -GET_DEVICES_URL = "{:s}://{:s}:{:d}/tfs-api/devices" -GET_LINKS_URL = "{:s}://{:s}:{:d}/tfs-api/links" -L3VPN_URL = "{:s}://{:s}:{:d}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" +GET_DEVICES_URL = '{:s}://{:s}:{:d}/tfs-api/devices' +GET_LINKS_URL = '{:s}://{:s}:{:d}/tfs-api/links' +L3VPN_URL = '{:s}://{:s}:{:d}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' + TIMEOUT = 30 HTTP_OK_CODES = { - 200, # OK - 201, # Created - 202, # Accepted - 204, # No Content + 200, # OK + 201, # Created + 202, # Accepted + 204, # No Content } MAPPING_STATUS = { - "DEVICEOPERATIONALSTATUS_UNDEFINED": 0, - "DEVICEOPERATIONALSTATUS_DISABLED": 1, - "DEVICEOPERATIONALSTATUS_ENABLED": 2, + '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_532": 5, - "DEVICEDRIVER_XR": 6, - "DEVICEDRIVER_IETF_L2VPN": 7, - "DEVICEDRIVER_GNMI_OPENCONFIG": 8, - "DEVICEDRIVER_OPTICAL_TFS": 9, - "DEVICEDRIVER_IETF_ACTN": 10, - "DEVICEDRIVER_OC": 11, + 'DEVICEDRIVER_UNDEFINED' : 0, + 'DEVICEDRIVER_OPENCONFIG' : 1, + 'DEVICEDRIVER_TRANSPORT_API' : 2, + 'DEVICEDRIVER_P4' : 3, + 'DEVICEDRIVER_IETF_NETWORK_TOPOLOGY': 4, + 'DEVICEDRIVER_ONF_TR_532' : 5, + 'DEVICEDRIVER_XR' : 6, + 'DEVICEDRIVER_IETF_L2VPN' : 7, + 'DEVICEDRIVER_GNMI_OPENCONFIG' : 8, + 'DEVICEDRIVER_OPTICAL_TFS' : 9, + 'DEVICEDRIVER_IETF_ACTN' : 10, + 'DEVICEDRIVER_OC' : 11, + 'DEVICEDRIVER_QKD' : 12, + 'DEVICEDRIVER_IETF_L3VPN' : 13, + 'DEVICEDRIVER_IETF_SLICE' : 14, + 'DEVICEDRIVER_NCE' : 15, } -MSG_ERROR = "Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}" +MSG_ERROR = 'Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}' LOGGER = logging.getLogger(__name__) - class TfsApiClient: def __init__( - self, - address: str, - port: int, - scheme: str = "http", - username: Optional[str] = None, - password: Optional[str] = None, + self, address : str, port : int, scheme : str = 'http', + username : Optional[str] = None, password : Optional[str] = None ) -> None: self._devices_url = GET_DEVICES_URL.format(scheme, address, port) - self._links_url = GET_LINKS_URL.format(scheme, address, port) - self._l3vpn_url = L3VPN_URL.format(scheme, address, port) - self._auth = None - # ( - # HTTPBasicAuth(username, password) - # if username is not None and password is not None - # else None - # ) + self._links_url = GET_LINKS_URL.format(scheme, address, port) + self._l3vpn_url = L3VPN_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, import_topology: ImportTopologyEnum = ImportTopologyEnum.DEVICES + self, import_topology : ImportTopologyEnum = ImportTopologyEnum.DEVICES ) -> List[Dict]: - LOGGER.debug("[get_devices_endpoints] begin") - LOGGER.debug( - "[get_devices_endpoints] import_topology={:s}".format(str(import_topology)) - ) + LOGGER.debug('[get_devices_endpoints] begin') + MSG = '[get_devices_endpoints] import_topology={:s}' + LOGGER.debug(MSG.format(str(import_topology))) - reply = requests.get(self._devices_url, timeout=TIMEOUT, auth=self._auth) + reply = requests.get(self._devices_url, timeout=TIMEOUT, verify=False, auth=self._auth) if reply.status_code not in HTTP_OK_CODES: msg = MSG_ERROR.format( str(self._devices_url), str(reply.status_code), str(reply) @@ -94,43 +89,44 @@ class TfsApiClient: raise Exception(msg) if import_topology == ImportTopologyEnum.DISABLED: - raise Exception( - "Unsupported import_topology mode: {:s}".format(str(import_topology)) - ) + MSG = 'Unsupported import_topology mode: {:s}' + raise Exception(MSG.format(str(import_topology))) 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"] - device_status = json_device["device_operational_status"] - device_url = "/devices/device[{:s}]".format(device_uuid) + 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"] + '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) + 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"], + 'device_uuid': device_uuid, + 'uuid': endpoint_uuid, + 'name': json_endpoint['name'], + 'type': json_endpoint['endpoint_type'], } result.append((endpoint_url, endpoint_data)) if import_topology == ImportTopologyEnum.DEVICES: - LOGGER.debug("[get_devices_endpoints] devices only; returning") + LOGGER.debug('[get_devices_endpoints] devices only; returning') return result - reply = requests.get(self._links_url, timeout=TIMEOUT, auth=self._auth) + reply = requests.get(self._links_url, timeout=TIMEOUT, verify=False, auth=self._auth) if reply.status_code not in HTTP_OK_CODES: msg = MSG_ERROR.format( str(self._links_url), str(reply.status_code), str(reply) @@ -138,50 +134,49 @@ class TfsApiClient: LOGGER.error(msg) raise Exception(msg) - for json_link in reply.json()["links"]: - link_uuid: str = json_link["link_id"]["link_uuid"]["uuid"] - link_url = "/links/link[{:s}]".format(link_uuid) + for json_link in reply.json()['links']: + link_uuid : str = json_link['link_id']['link_uuid']['uuid'] + link_url = '/links/link[{:s}]'.format(link_uuid) link_endpoint_ids = [ ( - json_endpoint_id["device_id"]["device_uuid"]["uuid"], - json_endpoint_id["endpoint_uuid"]["uuid"], + json_endpoint_id['device_id']['device_uuid']['uuid'], + json_endpoint_id['endpoint_uuid']['uuid'], ) - for json_endpoint_id in json_link["link_endpoint_ids"] + for json_endpoint_id in json_link['link_endpoint_ids'] ] link_data = { - "uuid": json_link["link_id"]["link_uuid"]["uuid"], - "name": json_link["name"], - "endpoints": link_endpoint_ids, + 'uuid': json_link['link_id']['link_uuid']['uuid'], + 'name': json_link['name'], + 'endpoints': link_endpoint_ids, } result.append((link_url, link_data)) - LOGGER.debug("[get_devices_endpoints] topology; returning") + LOGGER.debug('[get_devices_endpoints] topology; returning') return result def create_connectivity_service(self, l3vpn_data: dict) -> None: try: requests.post(self._l3vpn_url, json=l3vpn_data) - LOGGER.debug( - "[create_connectivity_service] l3vpn_data={:s}".format(str(l3vpn_data)) - ) + MSG = '[create_connectivity_service] l3vpn_data={:s}' + LOGGER.debug(MSG.format(str(l3vpn_data))) except requests.exceptions.ConnectionError: - raise Exception("faild to send post request to TFS L3VPN NBI") + raise Exception('Failed to send POST request to TFS L3VPN NBI') def update_connectivity_service(self, l3vpn_data: dict) -> None: - vpn_id = l3vpn_data['ietf-l3vpn-svc:l3vpn-svc']["vpn-services"]["vpn-service"][0]["vpn-id"] - url = self._l3vpn_url + f"/vpn-service={vpn_id}" + vpn_id = l3vpn_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] + url = self._l3vpn_url + f'/vpn-service={vpn_id}' try: requests.put(url, json=l3vpn_data) - LOGGER.debug( - "[update_connectivity_service] l3vpn_data={:s}".format(str(l3vpn_data)) - ) + MSG = '[update_connectivity_service] l3vpn_data={:s}' + LOGGER.debug(MSG.format(str(l3vpn_data))) except requests.exceptions.ConnectionError: - raise Exception("faild to send post request to TFS L3VPN NBI") + raise Exception('Failed to send PUT request to TFS L3VPN NBI') def delete_connectivity_service(self, service_uuid: str) -> None: - url = self._l3vpn_url + f"/vpn-service={service_uuid}" + url = self._l3vpn_url + f'/vpn-service={service_uuid}' try: - requests.delete(url, auth=self._auth) - LOGGER.debug("[delete_connectivity_service] url={:s}".format(str(url))) + requests.delete(url) + MSG = '[delete_connectivity_service] url={:s}' + LOGGER.debug(MSG.format(str(url))) except requests.exceptions.ConnectionError: - raise Exception("faild to send delete request to TFS L3VPN NBI") + raise Exception('Failed to send DELETE request to TFS L3VPN NBI') diff --git a/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py b/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py index 05c44d2d3..8af800454 100644 --- a/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py +++ b/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py @@ -12,37 +12,43 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json, logging, requests, threading -from requests.auth import HTTPBasicAuth +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.type_checkers.Checkers import chk_string, chk_type -from device.service.driver_api._Driver import _Driver -from . import ALL_RESOURCE_KEYS -from .Tools import find_key, add_lightpath, del_lightpath, get_lightpaths -from device.service.driver_api._Driver import _Driver, RESOURCE_ENDPOINTS -from device.service.drivers.ietf_l2vpn.TfsApiClient import TfsApiClient +from device.service.driver_api._Driver import _Driver, RESOURCE_ENDPOINTS, RESOURCE_SERVICES from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum, get_import_topology +from .TfsApiClient import TfsApiClient +from .TfsOpticalClient import TfsOpticalClient LOGGER = logging.getLogger(__name__) +ALL_RESOURCE_KEYS = [ + RESOURCE_ENDPOINTS, + RESOURCE_SERVICES, +] + DRIVER_NAME = 'optical_tfs' METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) - class OpticalTfsDriver(_Driver): def __init__(self, address: str, port: int, **settings) -> None: super().__init__(DRIVER_NAME, address, port, **settings) self.__lock = threading.Lock() self.__started = threading.Event() self.__terminate = threading.Event() - username = self.settings.get('username') + username = self.settings.get('username') password = self.settings.get('password') - self.__auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None - scheme = self.settings.get('scheme', 'http') - self.tac = TfsApiClient(self.address, int(self.port), scheme=scheme, username=username, password=password) - self.__base_url = '{:s}://{:s}:{:d}'.format(scheme, self.address, int(self.port)) - self.__timeout = int(self.settings.get('timeout', 120)) + scheme = self.settings.get('scheme', 'http') + timeout = int(self.settings.get('timeout', 60)) + self.tac = TfsApiClient( + self.address, int(self.port), scheme=scheme, username=username, + password=password, timeout=timeout + ) + self.toc = TfsOpticalClient( + self.address, int(self.port), scheme=scheme, username=username, + password=password, timeout=timeout + ) # Options are: # disabled --> just import endpoints as usual @@ -51,19 +57,14 @@ class OpticalTfsDriver(_Driver): # topology --> imports sub-devices and links connecting them. # (not supported by XR driver) self.__import_topology = get_import_topology(self.settings, default=ImportTopologyEnum.TOPOLOGY) - def Connect(self) -> bool: - url = self.__base_url + '/OpticalTFS/GetLightpaths' with self.__lock: if self.__started.is_set(): return True try: - requests.get(url, timeout=self.__timeout, verify=False, auth=self.__auth) - except requests.exceptions.Timeout: - LOGGER.exception('Timeout connecting {:s}'.format(str(self.__tapi_root))) - return False - except Exception: # pylint: disable=broad-except - LOGGER.exception('Exception connecting {:s}'.format(str(self.__tapi_root))) + self.toc.check_credentials() + except: # pylint: disable=bare-except + LOGGER.exception('Exception checking credentials') return False else: self.__started.set() @@ -84,68 +85,81 @@ class OpticalTfsDriver(_Driver): chk_type('resources', resource_keys, list) results = [] with self.__lock: + self.toc.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) - chk_string(str_resource_name, resource_key, allow_empty=False) - - if resource_key == RESOURCE_ENDPOINTS: - # return endpoints through TFS NBI API and list-devices method - results.extend(self.tac.get_devices_endpoints(self.__import_topology)) - - # results.extend(get_lightpaths( - # self.__base_url, resource_key, timeout=self.__timeout, auth=self.__auth)) + try: + chk_string(str_resource_name, resource_key, allow_empty=False) + if resource_key == RESOURCE_ENDPOINTS: + # return endpoints through TFS NBI API and list-devices method + results.extend(self.tac.get_devices_endpoints(self.__import_topology)) + elif resource_key == RESOURCE_SERVICES: + # return all services through + results.extend(self.toc.get_lightpaths()) + else: + MSG = 'ResourceKey({:s}) not implemented' + LOGGER.warning(MSG.format(str(resource_key))) + except Exception as e: + 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 + if len(resources) == 0: return results with self.__lock: - for _, resource in resources: + self.toc.check_credentials() + for resource in resources: LOGGER.info('resource = {:s}'.format(str(resource))) - - src_node = find_key(resource, 'src_node') - dst_node = find_key(resource, 'dst_node') - bitrate = find_key(resource, 'bitrate') - - response = add_lightpath(self.__base_url, src_node, dst_node, bitrate, - auth=self.__auth, timeout=self.__timeout) - - results.extend(response) + resource_key,resource_value = resource + try: + resource_value = json.loads(resource_value) + src_node = resource_value['src_node'] + dst_node = resource_value['dst_node'] + bitrate = resource_value['bitrate' ] + results.extend(self.toc.add_lightpath(src_node, dst_node, bitrate)) + results.append((resource_key, True)) + except Exception as e: + 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 + if len(resources) == 0: return results with self.__lock: - for _, resource in resources: + self.toc.check_credentials() + for resource in resources: LOGGER.info('resource = {:s}'.format(str(resource))) - flow_id = find_key(resource, 'flow_id') - src_node = find_key(resource, 'src_node') - dst_node = find_key(resource, 'dst_node') - bitrate = find_key(resource, 'bitrate') - - response = del_lightpath(self.__base_url, flow_id, src_node, dst_node, bitrate) - results.extend(response) - + resource_key,resource_value = resource + try: + resource_value = json.loads(resource_value) + flow_id = resource_value['flow_id' ] + src_node = resource_value['src_node'] + dst_node = resource_value['dst_node'] + bitrate = resource_value['bitrate' ] + self.toc.del_lightpath(flow_id, src_node, dst_node, bitrate) + results.append((resource_key, True)) + except Exception as e: + 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]]: - # Optical TFS does not support monitoring by now + # TODO: Optical TFS does not support monitoring by now return [False for _ in subscriptions] @metered_subclass_method(METRICS_POOL) def UnsubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: - # Optical TFS does not support monitoring by now + # TODO: Optical TFS does not support monitoring by now return [False for _ in subscriptions] def GetState( self, blocking=False, terminate : Optional[threading.Event] = None ) -> Iterator[Tuple[float, str, Any]]: - # Optical TFS does not support monitoring by now + # TODO: Optical TFS does not support monitoring by now return [] diff --git a/src/device/service/drivers/optical_tfs/TfsApiClient.py b/src/device/service/drivers/optical_tfs/TfsApiClient.py new file mode 100644 index 000000000..8df8e5261 --- /dev/null +++ b/src/device/service/drivers/optical_tfs/TfsApiClient.py @@ -0,0 +1,128 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Dict, List, Optional +from common.tools.client.RestClient import RestClient +from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum + +GET_DEVICES_URL = '/tfs-api/devices' +GET_LINKS_URL = '/tfs-api/links' + +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_532' : 5, + 'DEVICEDRIVER_XR' : 6, + 'DEVICEDRIVER_IETF_L2VPN' : 7, + 'DEVICEDRIVER_GNMI_OPENCONFIG' : 8, + 'DEVICEDRIVER_OPTICAL_TFS' : 9, + 'DEVICEDRIVER_IETF_ACTN' : 10, + 'DEVICEDRIVER_OC' : 11, + 'DEVICEDRIVER_QKD' : 12, + 'DEVICEDRIVER_IETF_L3VPN' : 13, + 'DEVICEDRIVER_IETF_SLICE' : 14, + 'DEVICEDRIVER_NCE' : 15, +} + +LOGGER = logging.getLogger(__name__) + +class TfsApiClient(RestClient): + def __init__( + self, address : str, port : int, scheme : str = 'http', + username : Optional[str] = None, password : Optional[str] = None, + timeout : Optional[int] = 30 + ) -> None: + super().__init__( + address, port, scheme=scheme, username=username, password=password, + timeout=timeout, verify_certs=False, allow_redirects=True, logger=LOGGER + ) + + def get_devices_endpoints( + self, import_topology : ImportTopologyEnum = ImportTopologyEnum.DEVICES + ) -> List[Dict]: + LOGGER.debug('[get_devices_endpoints] begin') + MSG = '[get_devices_endpoints] import_topology={:s}' + LOGGER.debug(MSG.format(str(import_topology))) + + if import_topology == ImportTopologyEnum.DISABLED: + MSG = 'Unsupported import_topology mode: {:s}' + raise Exception(MSG.format(str(import_topology))) + + devices = self.get(GET_DEVICES_URL, expected_status_codes={requests.codes['OK']}) + + result = list() + for json_device in devices['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)) + + if import_topology == ImportTopologyEnum.DEVICES: + LOGGER.debug('[get_devices_endpoints] devices only; returning') + return result + + links = self.get(GET_LINKS_URL, expected_status_codes={requests.codes['OK']}) + + for json_link in links['links']: + link_uuid : str = json_link['link_id']['link_uuid']['uuid'] + link_url = '/links/link[{:s}]'.format(link_uuid) + link_endpoint_ids = [ + ( + json_endpoint_id['device_id']['device_uuid']['uuid'], + json_endpoint_id['endpoint_uuid']['uuid'], + ) + for json_endpoint_id in json_link['link_endpoint_ids'] + ] + link_data = { + 'uuid': json_link['link_id']['link_uuid']['uuid'], + 'name': json_link['name'], + 'endpoints': link_endpoint_ids, + } + result.append((link_url, link_data)) + + LOGGER.debug('[get_devices_endpoints] topology; returning') + return result diff --git a/src/device/service/drivers/optical_tfs/TfsOpticalClient.py b/src/device/service/drivers/optical_tfs/TfsOpticalClient.py new file mode 100644 index 000000000..f5749ae56 --- /dev/null +++ b/src/device/service/drivers/optical_tfs/TfsOpticalClient.py @@ -0,0 +1,100 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 typing import Dict, List, Optional, Union +from common.tools.client.RestClient import RestClient + + +LOGGER = logging.getLogger(__name__) + +GET_OPTICAL_LINKS_URL = '/OpticalTFS/GetLinks' +GET_LIGHTPATHS_URL = '/OpticalTFS/GetLightpaths' +ADD_LIGHTPATH_URL = '/OpticalTFS/AddLightpath/{src_node:s}/{dst_node:s}/{bitrate:s}' +DEL_LIGHTPATH_URL = '/OpticalTFS/DelLightpath/{flow_id:s}/{src_node:s}/{dst_node:s}/{bitrate:s}' + + +class TfsOpticalClient(RestClient): + def __init__( + self, address : str, port : int, scheme : str = 'http', + username : Optional[str] = None, password : Optional[str] = None, + timeout : Optional[int] = 30 + ) -> None: + super().__init__( + address, port, scheme=scheme, username=username, password=password, + timeout=timeout, verify_certs=False, allow_redirects=True, logger=LOGGER + ) + + def check_credentials(self) -> None: + self.get(GET_LIGHTPATHS_URL, expected_status_codes={requests.codes['OK']}) + LOGGER.info('Credentials checked') + + def get_optical_links(self) -> Union[List[Dict], Exception]: + try: + return self.get(GET_OPTICAL_LINKS_URL, expected_status_codes={requests.codes['OK']}) + except Exception as e: + LOGGER.exception('Exception retrieving optical links') + return e + + def get_lightpaths(self) -> Union[List[Dict], Exception]: + try: + lightpaths : List[Dict] = self.get( + GET_LIGHTPATHS_URL, expected_status_codes={requests.codes['OK']} + ) + except Exception as e: + LOGGER.exception('Exception retrieving lightpaths') + return e + + result = [] + for lightpath in lightpaths: + assert 'flow_id' in lightpath + assert 'src' in lightpath + assert 'dst' in lightpath + assert 'bitrate' in lightpath + resource_key = '/lightpaths/lightpath[{:s}]'.format(lightpath['flow_id']) + result.append((resource_key, lightpath)) + return result + + def add_lightpath( + self, src_node : str, dst_node : str, bitrate : int + ) -> Union[List[Dict], Exception]: + MSG = 'Add Lightpath: {:s} <-> {:s} with {:d} bitrate' + LOGGER.info(MSG.format(str(src_node), str(dst_node), int(bitrate))) + request_endpoint = ADD_LIGHTPATH_URL.format( + src_node=str(src_node), dst_node=str(dst_node), bitrate=int(bitrate) + ) + expected_status_codes = {requests.codes['CREATED'], requests.codes['NO_CONTENT']} + try: + return self.put(request_endpoint, expected_status_codes=expected_status_codes) + except Exception as e: + MSG = 'Exception requesting Lightpath: {:s} <-> {:s} with {:s} bitrate' + LOGGER.exception(MSG.format(str(src_node), str(dst_node), str(bitrate))) + return e + + def del_lightpath( + self, flow_id : str, src_node : str, dst_node : str, bitrate : int + ) -> Union[List[Dict], Exception]: + MSG = 'Delete Lightpath {:s}: {:s} <-> {:s} with {:d} bitrate' + LOGGER.info(MSG.format(str(flow_id), str(src_node), str(dst_node), int(bitrate))) + request_endpoint = DEL_LIGHTPATH_URL.format( + src_node=str(src_node), dst_node=str(dst_node), bitrate=int(bitrate) + ) + expected_status_codes = {requests.codes['NO_CONTENT']} + try: + return self.delete(request_endpoint, expected_status_codes=expected_status_codes) + except Exception as e: + MSG = 'Exception deleting Lightpath {:s}: {:s} <-> {:s} with {:s} bitrate' + LOGGER.exception(MSG.format(str(flow_id), str(src_node), str(dst_node), str(bitrate))) + return e diff --git a/src/device/service/drivers/optical_tfs/Tools.py b/src/device/service/drivers/optical_tfs/Tools.py deleted file mode 100644 index 3714672f8..000000000 --- a/src/device/service/drivers/optical_tfs/Tools.py +++ /dev/null @@ -1,143 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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, 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 find_key(resource, key): - return json.loads(resource[1])[key] - -def get_lightpaths(root_url : str, resource_key : str,auth : Optional[HTTPBasicAuth] = None, - timeout : Optional[int] = None): - headers = {'accept': 'application/json'} - url = '{:s}/OpticalTFS/GetLightpaths'.format(root_url) - - result = [] - try: - response = requests.get(url, timeout=timeout, headers=headers, verify=False, auth=auth) - except requests.exceptions.Timeout: - LOGGER.exception('Timeout connecting {:s}'.format(url)) - return result - except Exception as e: # pylint: disable=broad-except - LOGGER.exception('Exception retrieving {:s}'.format(resource_key)) - result.append((resource_key, e)) - return result - - try: - flows = json.loads(response.content) - except Exception as e: # pylint: disable=broad-except - LOGGER.warning('Unable to decode reply: {:s}'.format(str(response.content))) - result.append((resource_key, e)) - return result - - for flow in flows: - flow_id = flow.get('flow_id') - source = flow.get('src') - destination = flow.get('dst') - bitrate = flow.get('bitrate') - - endpoint_url = '/flows/flow[{:s}]'.format(flow_id) - endpoint_data = {'flow_id': flow_id, 'src': source, 'dst': destination, 'bitrate': bitrate} - result.append((endpoint_url, endpoint_data)) - - return result - - -def add_lightpath(root_url, src_node, dst_node, bitrate, - auth : Optional[HTTPBasicAuth] = None, timeout : Optional[int] = None): - - headers = {'accept': 'application/json'} - url = '{:s}/OpticalTFS/AddLightpath/{:s}/{:s}/{:s}'.format( - root_url, src_node, dst_node, bitrate) - - results = [] - try: - LOGGER.info('Lightpath request: {:s} <-> {:s} with {:s} bitrate'.format( - str(src_node), str(dst_node), str(bitrate))) - response = requests.put(url=url, timeout=timeout, headers=headers, verify=False, auth=auth) - results.append(response.json()) - LOGGER.info('Response: {:s}'.format(str(response))) - - except Exception as e: # pylint: disable=broad-except - LOGGER.exception('Exception requesting Lightpath: {:s} <-> {:s} with {:s} bitrate'.format( - str(src_node), str(dst_node), str(bitrate))) - results.append(e) - else: - if response.status_code not in HTTP_OK_CODES: - msg = 'Could not create Lightpath(status_code={:s} reply={:s}' - LOGGER.error(msg.format(str(response.status_code), str(response))) - results.append(response.status_code in HTTP_OK_CODES) - - return results - - - -def del_lightpath(root_url, flow_id, src_node, dst_node, bitrate, - auth : Optional[HTTPBasicAuth] = None, timeout : Optional[int] = None): - url = '{:s}/OpticalTFS/DelLightpath/{:s}/{:s}/{:s}/{:s}'.format( - root_url, flow_id, src_node, dst_node, bitrate) - headers = {'accept': 'application/json'} - - results = [] - - try: - response = requests.delete( - url=url, timeout=timeout, headers=headers, verify=False, auth=auth) - except Exception as e: # pylint: disable=broad-except - LOGGER.exception('Exception deleting Lightpath(uuid={:s})'.format(str(flow_id))) - results.append(e) - else: - if response.status_code not in HTTP_OK_CODES: - msg = 'Could not delete Lightpath(flow_id={:s}). status_code={:s} reply={:s}' - LOGGER.error(msg.format(str(flow_id), str(response.status_code), str(response))) - results.append(response.status_code in HTTP_OK_CODES) - - return results - - -def get_topology(root_url : str, resource_key : str,auth : Optional[HTTPBasicAuth] = None, - timeout : Optional[int] = None): - headers = {'accept': 'application/json'} - url = '{:s}/OpticalTFS/GetLinks'.format(root_url) - - result = [] - try: - response = requests.get(url, timeout=timeout, headers=headers, verify=False, auth=auth) - except requests.exceptions.Timeout: - LOGGER.exception('Timeout connecting {:s}'.format(url)) - return result - except Exception as e: # pylint: disable=broad-except - LOGGER.exception('Exception retrieving {:s}'.format(resource_key)) - result.append((resource_key, e)) - return result - - try: - response = json.loads(response.content) - except Exception as e: # pylint: disable=broad-except - LOGGER.warning('Unable to decode reply: {:s}'.format(str(response.content))) - result.append((resource_key, e)) - return result - - result.append(response) - return result diff --git a/src/device/service/drivers/optical_tfs/__init__.py b/src/device/service/drivers/optical_tfs/__init__.py index 97ec0dd42..53d5157f7 100644 --- a/src/device/service/drivers/optical_tfs/__init__.py +++ b/src/device/service/drivers/optical_tfs/__init__.py @@ -12,9 +12,3 @@ # See the License for the specific language governing permissions and # limitations under the License. -from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_SERVICES - -ALL_RESOURCE_KEYS = [ - RESOURCE_ENDPOINTS, - RESOURCE_SERVICES, -] -- GitLab From ba1f72202822a5aab10d5782e7f624cad8ac3ac1 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sat, 15 Mar 2025 15:06:16 +0000 Subject: [PATCH 309/463] Common framework: - Added generic RestClient class --- src/common/tools/client/RestClient.py | 162 ++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 src/common/tools/client/RestClient.py diff --git a/src/common/tools/client/RestClient.py b/src/common/tools/client/RestClient.py new file mode 100644 index 000000000..321f14ed4 --- /dev/null +++ b/src/common/tools/client/RestClient.py @@ -0,0 +1,162 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 enum, logging, requests +from requests.auth import HTTPBasicAuth +from typing import Any, Optional, Set + +class RestRequestMethod(enum.Enum): + GET = 'get' + POST = 'post' + PUT = 'put' + PATCH = 'patch' + DELETE = 'delete' + +EXPECTED_STATUS_CODES : Set[int] = { + requests.codes['OK' ], # 200 - OK + requests.codes['CREATED' ], # 201 - Created + requests.codes['ACCEPTED' ], # 202 - Accepted + requests.codes['NO_CONTENT'], # 204 - No Content +} + +URL_TEMPLATE = '{:s}://{:s}:{:d}/{:s}' + +def compose_basic_auth( + username : Optional[str] = None, password : Optional[str] = None +) -> Optional[HTTPBasicAuth]: + if username is None or password is None: return None + return HTTPBasicAuth(username, password) + +class SchemeEnum(enum.Enum): + HTTP = 'http' + HTTPS = 'https' + +def check_scheme(scheme : str) -> str: + str_scheme = str(scheme).lower() + enm_scheme = SchemeEnum._value2member_map_[str_scheme] + return enm_scheme.value + + +class RestClient: + def __init__( + self, address : str, port : int, scheme : str = 'http', + username : Optional[str] = None, password : Optional[str] = None, + timeout : int = 30, verify_certs : bool = True, allow_redirects : bool = True, + logger : Optional[logging.Logger] = None + ) -> None: + self._address = address + self._port = int(port) + self._scheme = check_scheme(scheme) + self._auth = compose_basic_auth(username=username, password=password) + self._timeout = int(timeout) + self._verify_certs = verify_certs + self._allow_redirects = allow_redirects + self._logger = logger + + def _compose_url(self, endpoint : str) -> str: + endpoint = endpoint.lstrip('/') + return URL_TEMPLATE.format(self._scheme, self._address, self._port, endpoint) + + def _log_msg_request( + self, method : RestRequestMethod, request_url : str, body : Optional[Any], + log_level : int = logging.INFO + ) -> str: + msg = 'Request: {:s} {:s}'.format(str(method.value).upper(), str(request_url)) + if body is not None: msg += ' body={:s}'.format(str(body)) + if self._logger is not None: self._logger.log(log_level, msg) + return msg + + def _log_msg_check_reply( + self, method : RestRequestMethod, request_url : str, body : Optional[Any], + reply : requests.Response, expected_status_codes : Set[int], + log_level : int = logging.INFO + ) -> str: + msg = 'Reply: {:s}'.format(str(reply.text)) + if self._logger is not None: self._logger.log(log_level, msg) + http_status_code = reply.status_code + if http_status_code in expected_status_codes: return msg + MSG = 'Request failed. method={:s} url={:s} body={:s} status_code={:s} reply={:s}' + msg = MSG.format( + str(method.value).upper(), str(request_url), str(body), + str(http_status_code), str(reply.text) + ) + self._logger.error(msg) + raise Exception(msg) + + def _do_rest_request( + self, method : RestRequestMethod, endpoint : str, body : Optional[Any] = None, + expected_status_codes : Set[int] = EXPECTED_STATUS_CODES + ) -> Optional[Any]: + request_url = self._compose_url(endpoint) + self._log_msg_request(method, request_url, body) + try: + headers = {'accept': 'application/json'} + reply = requests.request( + method.value, request_url, headers=headers, json=body, + auth=self._auth, verify=self._verify_certs, timeout=self._timeout, + allow_redirects=self._allow_redirects + ) + except Exception as e: + MSG = 'Request failed. method={:s} url={:s} body={:s}' + msg = MSG.format(str(method.value).upper(), request_url, str(body)) + self._logger.exception(msg) + raise Exception(msg) from e + self._log_msg_check_reply(method, request_url, body, reply, expected_status_codes) + if reply.content and len(reply.content) > 0: return reply.json() + return None + + def get( + self, endpoint : str, + expected_status_codes : Set[int] = EXPECTED_STATUS_CODES + ) -> Optional[Any]: + return self._do_rest_request( + RestRequestMethod.GET, endpoint, + expected_status_codes=expected_status_codes + ) + + def post( + self, endpoint : str, body : Optional[Any] = None, + expected_status_codes : Set[int] = EXPECTED_STATUS_CODES + ) -> Optional[Any]: + return self._do_rest_request( + RestRequestMethod.POST, endpoint, body=body, + expected_status_codes=expected_status_codes + ) + + def put( + self, endpoint : str, body : Optional[Any] = None, + expected_status_codes : Set[int] = EXPECTED_STATUS_CODES + ) -> Optional[Any]: + return self._do_rest_request( + RestRequestMethod.PUT, endpoint, body=body, + expected_status_codes=expected_status_codes + ) + + def patch( + self, endpoint : str, body : Optional[Any] = None, + expected_status_codes : Set[int] = EXPECTED_STATUS_CODES + ) -> Optional[Any]: + return self._do_rest_request( + RestRequestMethod.PATCH, endpoint, body=body, + expected_status_codes=expected_status_codes + ) + + def delete( + self, endpoint : str, body : Optional[Any] = None, + expected_status_codes : Set[int] = EXPECTED_STATUS_CODES + ) -> Optional[Any]: + return self._do_rest_request( + RestRequestMethod.DELETE, endpoint, body=body, + expected_status_codes=expected_status_codes + ) -- GitLab From bd365059fa84b288e44a6a448f3e4ad4ebefae0b Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sat, 15 Mar 2025 19:02:15 +0000 Subject: [PATCH 310/463] OFC25 tests: - Updated topology descriptor files - Added virtual link descriptor files --- src/tests/ofc25/descriptors/create-vlink-01.json | 13 +++++++++++++ src/tests/ofc25/descriptors/create-vlink-02.json | 13 +++++++++++++ src/tests/ofc25/descriptors/create-vlink-03.json | 13 +++++++++++++ src/tests/ofc25/descriptors/topology_e2e.json | 8 ++++---- src/tests/ofc25/descriptors/topology_ip.json | 4 ++-- 5 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 src/tests/ofc25/descriptors/create-vlink-01.json create mode 100644 src/tests/ofc25/descriptors/create-vlink-02.json create mode 100644 src/tests/ofc25/descriptors/create-vlink-03.json diff --git a/src/tests/ofc25/descriptors/create-vlink-01.json b/src/tests/ofc25/descriptors/create-vlink-01.json new file mode 100644 index 000000000..edb9bc61c --- /dev/null +++ b/src/tests/ofc25/descriptors/create-vlink-01.json @@ -0,0 +1,13 @@ +{ + "links": [ + { + "link_id": {"link_uuid": {"uuid": "IP1/PORT-xe1==IP2/PORT-xe1"}}, + "link_type": "LINKTYPE_VIRTUAL", + "attributes": {"total_capacity_gbps": 800.0}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + ] + } + ] +} diff --git a/src/tests/ofc25/descriptors/create-vlink-02.json b/src/tests/ofc25/descriptors/create-vlink-02.json new file mode 100644 index 000000000..63b141a2d --- /dev/null +++ b/src/tests/ofc25/descriptors/create-vlink-02.json @@ -0,0 +1,13 @@ +{ + "links": [ + { + "link_id": {"link_uuid": {"uuid": "IP1/PORT-xe2==IP2/PORT-xe2"}}, + "link_type": "LINKTYPE_VIRTUAL", + "attributes": {"total_capacity_gbps": 800.0}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + ] + } + ] +} diff --git a/src/tests/ofc25/descriptors/create-vlink-03.json b/src/tests/ofc25/descriptors/create-vlink-03.json new file mode 100644 index 000000000..1f57c5ce4 --- /dev/null +++ b/src/tests/ofc25/descriptors/create-vlink-03.json @@ -0,0 +1,13 @@ +{ + "links": [ + { + "link_id": {"link_uuid": {"uuid": "IP1/PORT-xe3==IP2/PORT-xe3"}}, + "link_type": "LINKTYPE_VIRTUAL", + "attributes": {"total_capacity_gbps": 800.0}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + ] + } + ] +} diff --git a/src/tests/ofc25/descriptors/topology_e2e.json b/src/tests/ofc25/descriptors/topology_e2e.json index 5f1a843a7..8c3c1fd40 100644 --- a/src/tests/ofc25/descriptors/topology_e2e.json +++ b/src/tests/ofc25/descriptors/topology_e2e.json @@ -10,10 +10,10 @@ "device_id": {"device_uuid": {"uuid": "TFS-PACKET"}}, "device_type": "teraflowsdn", "device_drivers": ["DEVICEDRIVER_IETF_L3VPN"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"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" + "scheme": "http", "username": "admin", "password": "admin", "import_topology": "topology" }}} ]} }, @@ -21,10 +21,10 @@ "device_id": {"device_uuid": {"uuid": "TFS-OPTICAL"}}, "device_type": "teraflowsdn", "device_drivers": ["DEVICEDRIVER_OPTICAL_TFS"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8003"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { - "scheme": "http", "username": "admin", "password": "admin" + "scheme": "http", "username": "admin", "password": "admin", "import_topology": "topology" }}} ]} } diff --git a/src/tests/ofc25/descriptors/topology_ip.json b/src/tests/ofc25/descriptors/topology_ip.json index 48143f547..b75aeb7b1 100644 --- a/src/tests/ofc25/descriptors/topology_ip.json +++ b/src/tests/ofc25/descriptors/topology_ip.json @@ -7,7 +7,7 @@ ], "devices": [ { - "device_id": {"device_uuid": {"uuid": "CSGW1"}}, "device_type": "emu-packet-router", + "device_id": {"device_uuid": {"uuid": "IP1"}}, "device_type": "emu-packet-router", "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, @@ -20,7 +20,7 @@ ]} }, { - "device_id": {"device_uuid": {"uuid": "CSGW2"}}, "device_type": "emu-packet-router", + "device_id": {"device_uuid": {"uuid": "IP2"}}, "device_type": "emu-packet-router", "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, -- GitLab From 96ab782fe28cf1c7438b6f4caf5da9ecb4f01971 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sat, 15 Mar 2025 19:02:41 +0000 Subject: [PATCH 311/463] Common framework: - Updated Descriptor Loader to support virtual links --- src/common/tools/descriptor/Loader.py | 65 +++++++++++++++++++-------- src/common/tools/descriptor/Tools.py | 30 ++++++++++++- 2 files changed, 76 insertions(+), 19 deletions(-) diff --git a/src/common/tools/descriptor/Loader.py b/src/common/tools/descriptor/Loader.py index 4cdac3674..59d2db6e7 100644 --- a/src/common/tools/descriptor/Loader.py +++ b/src/common/tools/descriptor/Loader.py @@ -45,12 +45,13 @@ from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient from slice.client.SliceClient import SliceClient +from vnt_manager.client.VNTManagerClient import VNTManagerClient from .Tools import ( format_device_custom_config_rules, format_service_custom_config_rules, format_slice_custom_config_rules, get_descriptors_add_contexts, get_descriptors_add_services, get_descriptors_add_slices, get_descriptors_add_topologies, split_controllers_and_network_devices, - split_devices_by_rules + split_devices_by_rules, split_links_by_type ) LOGGER = logging.getLogger(__name__) @@ -112,7 +113,8 @@ class DescriptorLoader: self, descriptors : Optional[Union[str, Dict]] = None, descriptors_file : Optional[str] = None, num_workers : int = 1, context_client : Optional[ContextClient] = None, device_client : Optional[DeviceClient] = None, - service_client : Optional[ServiceClient] = None, slice_client : Optional[SliceClient] = None + service_client : Optional[ServiceClient] = None, slice_client : Optional[SliceClient] = None, + vntm_client : Optional[VNTManagerClient] = None ) -> None: if (descriptors is None) == (descriptors_file is None): # pylint: disable=broad-exception-raised @@ -190,10 +192,11 @@ class DescriptorLoader: self.__services_add = None self.__slices_add = None - self.__ctx_cli = ContextClient() if context_client is None else context_client - self.__dev_cli = DeviceClient() if device_client is None else device_client - self.__svc_cli = ServiceClient() if service_client is None else service_client - self.__slc_cli = SliceClient() if slice_client is None else slice_client + self.__ctx_cli = ContextClient() if context_client is None else context_client + self.__dev_cli = DeviceClient() if device_client is None else device_client + self.__svc_cli = ServiceClient() if service_client is None else service_client + self.__slc_cli = SliceClient() if slice_client is None else slice_client + self.__vnt_cli = VNTManagerClient() if vntm_client is None else vntm_client self.__results : TypeResults = list() @@ -351,22 +354,38 @@ class DescriptorLoader: controllers_add, network_devices_add = split_controllers_and_network_devices(self.__devices_add) + typed_links = split_links_by_type(self.__links) + typed_normal_links = typed_links.get('normal', list()) + typed_optical_links = typed_links.get('optical', list()) + typed_optical_links.extend(self.__optical_links) + typed_virtual_links = typed_links.get('virtual', list()) + self.__ctx_cli.connect() self.__dev_cli.connect() - self.__svc_cli.connect() - self.__slc_cli.connect() + if len(self.__services ) > 0: self.__svc_cli.connect() + if len(self.__slices ) > 0: self.__slc_cli.connect() + if len(typed_virtual_links) > 0: self.__vnt_cli.connect() self._process_descr('context', 'add', self.__ctx_cli.SetContext, Context, self.__contexts_add ) self._process_descr('topology', 'add', self.__ctx_cli.SetTopology, Topology, self.__topologies_add) self._process_descr('controller', 'add', self.__dev_cli.AddDevice, Device, controllers_add ) self._process_descr('device', 'add', self.__dev_cli.AddDevice, Device, network_devices_add ) self._process_descr('device', 'config', self.__dev_cli.ConfigureDevice, Device, self.__devices_config) - self._process_descr('link', 'add', self.__ctx_cli.SetLink, Link, self.__links ) - self._process_descr('link', 'add', self.__ctx_cli.SetOpticalLink, OpticalLink, self.__optical_links ) - self._process_descr('service', 'add', self.__svc_cli.CreateService, Service, self.__services_add ) - self._process_descr('service', 'update', self.__svc_cli.UpdateService, Service, self.__services ) - self._process_descr('slice', 'add', self.__slc_cli.CreateSlice, Slice, self.__slices_add ) - self._process_descr('slice', 'update', self.__slc_cli.UpdateSlice, Slice, self.__slices ) + self._process_descr('link', 'add', self.__ctx_cli.SetLink, Link, typed_normal_links ) + + if len(typed_optical_links) > 0: + self._process_descr('link', 'add', self.__ctx_cli.SetOpticalLink, OpticalLink, typed_optical_links ) + + if len(typed_virtual_links) > 0: + self._process_descr('link', 'add', self.__vnt_cli.SetVirtualLink, Link, typed_virtual_links ) + + if len(self.__services) > 0: + self._process_descr('service','add', self.__svc_cli.CreateService, Service, self.__services_add ) + self._process_descr('service','update', self.__svc_cli.UpdateService, Service, self.__services ) + + if len(self.__slices) > 0: + self._process_descr('slice', 'add', self.__slc_cli.CreateSlice, Slice, self.__slices_add ) + self._process_descr('slice', 'update', self.__slc_cli.UpdateSlice, Slice, self.__slices ) # By default the Context component automatically assigns devices and links to topologies based on their # endpoints, and assigns topologies, services, and slices to contexts based on their identifiers. @@ -467,10 +486,17 @@ class DescriptorLoader: def _unload_normal_mode(self) -> None: # Normal mode: follows the automated workflows in the different components + typed_links = split_links_by_type(self.links) + typed_normal_links = typed_links.get('normal', list()) + typed_optical_links = typed_links.get('optical', list()) + typed_optical_links.extend(self.optical_links) + typed_virtual_links = typed_links.get('virtual', list()) + self.__ctx_cli.connect() self.__dev_cli.connect() - self.__svc_cli.connect() - self.__slc_cli.connect() + if len(self.services ) > 0: self.__svc_cli.connect() + if len(self.slices ) > 0: self.__slc_cli.connect() + if len(typed_virtual_links) > 0: self.__vnt_cli.connect() for _, slice_list in self.slices.items(): for slice_ in slice_list: @@ -480,10 +506,13 @@ class DescriptorLoader: for service in service_list: self.__svc_cli.DeleteService(ServiceId(**service['service_id'])) - for optical_link in self.optical_links: + for virtual_link in typed_virtual_links: + self.__vnt_cli.RemoveVirtualLink(LinkId(**virtual_link['link_id'])) + + for optical_link in typed_optical_links: self.__ctx_cli.DeleteOpticalLink(LinkId(**optical_link['link_id'])) - for link in self.links: + for link in typed_normal_links: self.__ctx_cli.RemoveLink(LinkId(**link['link_id'])) for device in self.devices: diff --git a/src/common/tools/descriptor/Tools.py b/src/common/tools/descriptor/Tools.py index a6e39e95d..07bc18d31 100644 --- a/src/common/tools/descriptor/Tools.py +++ b/src/common/tools/descriptor/Tools.py @@ -12,10 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +import collections import copy, json from typing import Dict, List, Optional, Tuple, Union from common.DeviceTypes import DeviceTypeEnum -from common.proto.context_pb2 import DeviceDriverEnum +from common.proto.context_pb2 import DeviceDriverEnum, LinkTypeEnum def get_descriptors_add_contexts(contexts : List[Dict]) -> List[Dict]: contexts_add = copy.deepcopy(contexts) @@ -131,3 +132,30 @@ def split_controllers_and_network_devices(devices : List[Dict]) -> Tuple[List[Di else: network_devices.append(device) return controllers, network_devices + +def link_type_to_str(link_type : Union[int, str]) -> Optional[str]: + if isinstance(link_type, int): return LinkTypeEnum.Name(link_type) + if isinstance(link_type, str): return LinkTypeEnum.Name(LinkTypeEnum.Value(link_type)) + return None + +def split_links_by_type(links : List[Dict]) -> Dict[str, List[Dict]]: + typed_links = collections.defaultdict(list) + for link in links: + link_type = link.get('link_type', LinkTypeEnum.LINKTYPE_UNKNOWN) + str_link_type = link_type_to_str(link_type) + if str_link_type is None: + MSG = 'Unsupported LinkType in Link({:s})' + raise Exception(MSG.format(str(link))) + + link_type = LinkTypeEnum.Value(str_link_type) + if link_type in {LinkTypeEnum.LINKTYPE_UNKNOWN, LinkTypeEnum.LINKTYPE_COPPER, LinkTypeEnum.LINKTYPE_RADIO}: + typed_links['normal'].append(link) + elif link_type in {LinkTypeEnum.LINKTYPE_FIBER}: + typed_links['optical'].append(link) + elif link_type in {LinkTypeEnum.LINKTYPE_VIRTUAL}: + typed_links['virtual'].append(link) + else: + MSG = 'Unsupported LinkType({:s}) in Link({:s})' + raise Exception(MSG.format(str_link_type, str(link))) + + return typed_links -- GitLab From 886ebcc5ab205aa56232686a0040fd77e1ca6484 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sat, 15 Mar 2025 19:03:25 +0000 Subject: [PATCH 312/463] NBI service - VNT Recommendations: - Updated parsing of incomming kafka messages --- .../service/vntm_recommend/VntRecommThread.py | 54 ++++++++++--------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/src/nbi/service/vntm_recommend/VntRecommThread.py b/src/nbi/service/vntm_recommend/VntRecommThread.py index d52487513..bd9a452f3 100644 --- a/src/nbi/service/vntm_recommend/VntRecommThread.py +++ b/src/nbi/service/vntm_recommend/VntRecommThread.py @@ -13,8 +13,10 @@ # limitations under the License. import logging, socketio, threading +from typing import Dict, List from common.tools.kafka.Variables import KafkaConfig, KafkaTopic -from kafka import KafkaConsumer +from kafka import KafkaConsumer, TopicPartition +from kafka.consumer.fetcher import ConsumerRecord from .Constants import SIO_NAMESPACE, SIO_ROOM logging.getLogger('kafka.client').setLevel(logging.WARNING) @@ -55,32 +57,36 @@ class VntRecommThread(threading.Thread): LOGGER.info('[run] Subscribed') while not self._terminate.is_set(): - records = kafka_consumer.poll(timeout_ms=1000, max_records=1) - if len(records) == 0: continue # no pending messages... continuing + topic_records : Dict[TopicPartition, List[ConsumerRecord]] = \ + kafka_consumer.poll(timeout_ms=1000, max_records=1) + if len(topic_records) == 0: return # no pending records + self.process_topic_records(topic_records) - MSG = '[run] records={:s}' - LOGGER.debug(MSG.format(str(records))) - raise NotImplementedError('parse kafka records and extract recommendation') - - #if vntm_request.error(): - # if vntm_request.error().code() == KafkaError._PARTITION_EOF: continue - # MSG = '[run] Consumer error: {:s}' - # LOGGER.error(MSG.format(str(vntm_request.error()))) - # break - #message_key = vntm_request.key().decode('utf-8') - #message_value = vntm_request.value().decode('utf-8') - #MSG = '[run] Recommendation: key={:s} value={:s}' - #LOGGER.debug(MSG.format(str(message_key), str(message_value))) - # - #LOGGER.debug('[run] checking server namespace...') - #server : socketio.Server = self._namespace.server - #if server is None: continue - #LOGGER.debug('[run] emitting recommendation...') - #server.emit('recommendation', message_value, namespace=SIO_NAMESPACE, to=SIO_ROOM) - #LOGGER.debug('[run] emitted') - LOGGER.info('[run] Closing...') kafka_consumer.close() except: # pylint: disable=bare-except LOGGER.exception('[run] Unexpected Thread Exception') LOGGER.info('[run] Terminated') + + def process_topic_records( + self, topic_records : Dict[TopicPartition, List[ConsumerRecord]] + ) -> None: + MSG = '[process_topic_records] topic_records={:s}' + LOGGER.debug(MSG.format(str(topic_records))) + for topic, records in topic_records.items(): + if topic.topic == KafkaTopic.VNTMANAGER_REQUEST.value: + for record in records: self.emit_recommendation(record) + + def emit_recommendation(self, record : ConsumerRecord) -> None: + message_key = record.key.decode('utf-8') + message_value = record.value.decode('utf-8') + + MSG = '[emit_recommendation] Recommendation: key={:s} value={:s}' + LOGGER.debug(MSG.format(str(message_key), str(message_value))) + + LOGGER.debug('[emit_recommendation] checking server namespace...') + server : socketio.Server = self._namespace.server + if server is None: return + LOGGER.debug('[emit_recommendation] emitting recommendation...') + server.emit('recommendation', message_value, namespace=SIO_NAMESPACE, to=SIO_ROOM) + LOGGER.debug('[emit_recommendation] emitted') -- GitLab From b8e3120d839e9945fd05778174ace3b9c1f81e0c Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sat, 15 Mar 2025 19:04:16 +0000 Subject: [PATCH 313/463] OFC25 tests: - Updated deploy script --- src/tests/ofc25/deploy.sh | 96 +++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 49 deletions(-) diff --git a/src/tests/ofc25/deploy.sh b/src/tests/ofc25/deploy.sh index 0aff24885..d72254191 100755 --- a/src/tests/ofc25/deploy.sh +++ b/src/tests/ofc25/deploy.sh @@ -14,28 +14,26 @@ # limitations under the License. # ===== Check Microk8s is ready ============================== -microk8s status --wait-ready -kubectl get pods --all-namespaces +#microk8s status --wait-ready +#kubectl get pods --all-namespaces # ===== Cleanup old deployments ============================== -helm3 uninstall --namespace nats-e2e nats-e2e 2>/dev/null || true -helm3 uninstall --namespace nats-ip nats-ip 2>/dev/null || true -helm3 uninstall --namespace nats-opt nats-opt 2>/dev/null || true -helm3 uninstall --namespace nats nats 2>/dev/null || true -kubectl delete namespaces tfs tfs-ip tfs-opt tfs-e2e --ignore-not-found -kubectl delete namespaces qdb qdb-e2e qdb-opt qdb-ip --ignore-not-found -kubectl delete namespaces kafka kafka-ip kafka-opt kafka-e2e --ignore-not-found -kubectl delete namespaces nats nats-ip nats-opt nats-e2e --ignore-not-found - -kubectl delete -f src/tests/ofc25/nginx-ingress-controller-opt.yaml --ignore-not-found -kubectl delete -f src/tests/ofc25/nginx-ingress-controller-ip.yaml --ignore-not-found -kubectl delete -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml --ignore-not-found - -sleep 5 +#helm3 uninstall --namespace nats-e2e nats-e2e 2>/dev/null || true +#helm3 uninstall --namespace nats-ip nats-ip 2>/dev/null || true +#helm3 uninstall --namespace nats-opt nats-opt 2>/dev/null || true +#helm3 uninstall --namespace nats nats 2>/dev/null || true +#kubectl delete namespaces tfs tfs-ip tfs-opt tfs-e2e --ignore-not-found +#kubectl delete namespaces qdb qdb-e2e qdb-opt qdb-ip --ignore-not-found +#kubectl delete namespaces kafka kafka-ip kafka-opt kafka-e2e --ignore-not-found +#kubectl delete namespaces nats nats-ip nats-opt nats-e2e --ignore-not-found +#kubectl delete -f src/tests/ofc25/nginx-ingress-controller-opt.yaml --ignore-not-found +#kubectl delete -f src/tests/ofc25/nginx-ingress-controller-ip.yaml --ignore-not-found +#kubectl delete -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml --ignore-not-found +#sleep 5 # ===== Check Microk8s is ready ============================== -microk8s status --wait-ready -kubectl get pods --all-namespaces +#microk8s status --wait-ready +#kubectl get pods --all-namespaces # Configure TeraFlowSDN deployment # Uncomment if DEBUG log level is needed for the components @@ -49,9 +47,9 @@ kubectl get pods --all-namespaces #yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/vntmservice.yaml # Create secondary ingress controllers -kubectl apply -f src/tests/ofc25/nginx-ingress-controller-opt.yaml -kubectl apply -f src/tests/ofc25/nginx-ingress-controller-ip.yaml -kubectl apply -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml +#kubectl apply -f src/tests/ofc25/nginx-ingress-controller-opt.yaml +#kubectl apply -f src/tests/ofc25/nginx-ingress-controller-ip.yaml +#kubectl apply -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml cp manifests/contextservice.yaml manifests/contextservice.yaml.bak @@ -71,36 +69,36 @@ sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfs_opt_context"/}' manifest mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_opt.sh -## ===== Deploy IP TeraFlowSDN ============================== -#source src/tests/ofc25/deploy_specs_ip.sh -#cp manifests/contextservice.yaml.bak manifests/contextservice.yaml -#sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfs_ip_context"/}' manifests/contextservice.yaml -# -#./deploy/crdb.sh -#./deploy/nats.sh -#./deploy/kafka.sh -##./deploy/qdb.sh -##./deploy/expose_dashboard.sh -#./deploy/tfs.sh -#./deploy/show.sh -# -#mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_ip.sh +# ===== Deploy IP TeraFlowSDN ============================== +source src/tests/ofc25/deploy_specs_ip.sh +cp manifests/contextservice.yaml.bak manifests/contextservice.yaml +sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfs_ip_context"/}' manifests/contextservice.yaml +./deploy/crdb.sh +./deploy/nats.sh +./deploy/kafka.sh +#./deploy/qdb.sh +#./deploy/expose_dashboard.sh +./deploy/tfs.sh +./deploy/show.sh -## ===== Deploy End-to-End TeraFlowSDN ==================== -#source src/tests/ofc25/deploy_specs_e2e.sh -#cp manifests/contextservice.yaml.bak manifests/contextservice.yaml -#sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfs_e2e_context"/}' manifests/contextservice.yaml -# -#./deploy/crdb.sh -#./deploy/nats.sh -#./deploy/kafka.sh -##./deploy/qdb.sh -##./deploy/expose_dashboard.sh -#./deploy/tfs.sh -#./deploy/show.sh -# -#mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_e2e.sh +mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_ip.sh + + +# ===== Deploy End-to-End TeraFlowSDN ==================== +source src/tests/ofc25/deploy_specs_e2e.sh +cp manifests/contextservice.yaml.bak manifests/contextservice.yaml +sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfs_e2e_context"/}' manifests/contextservice.yaml + +./deploy/crdb.sh +./deploy/nats.sh +./deploy/kafka.sh +#./deploy/qdb.sh +#./deploy/expose_dashboard.sh +./deploy/tfs.sh +./deploy/show.sh + +mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_e2e.sh # ===== Recovering files ========================= -- GitLab From 0de242d59807a21d6e72ced5d65e767be070db04 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sat, 15 Mar 2025 19:05:42 +0000 Subject: [PATCH 314/463] Device component: - Improved TfsApiClient in L2 VPN, L3 VPN, Optical TFS - Cosmetic changes in L2 VPN, L3 VPN, Optical TFS --- src/device/service/drivers/__init__.py | 2 +- .../drivers/ietf_l2vpn/TfsApiClient.py | 58 ++---- .../{driver.py => IetfL3VpnDriver.py} | 171 +++++++----------- .../drivers/ietf_l3vpn/TfsApiClient.py | 107 +++++------ .../drivers/optical_tfs/OpticalTfsDriver.py | 49 +++-- .../drivers/optical_tfs/TfsApiClient.py | 9 +- src/device/tests/test_unitary_ietf_l3vpn.py | 2 +- 7 files changed, 169 insertions(+), 229 deletions(-) rename src/device/service/drivers/ietf_l3vpn/{driver.py => IetfL3VpnDriver.py} (67%) diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index 70ca1764f..2169881af 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -82,7 +82,7 @@ DRIVERS.append( ])) -from .ietf_l3vpn.driver import IetfL3VpnDriver # pylint: disable=wrong-import-position +from .ietf_l3vpn.IetfL3VpnDriver import IetfL3VpnDriver # pylint: disable=wrong-import-position DRIVERS.append( (IetfL3VpnDriver, [ { diff --git a/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py b/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py index dd6924de0..e9b21f249 100644 --- a/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py +++ b/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py @@ -13,21 +13,13 @@ # limitations under the License. import logging, requests -from requests.auth import HTTPBasicAuth from typing import Dict, List, Optional +from common.tools.client.RestClient import RestClient from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum -GET_DEVICES_URL = '{:s}://{:s}:{:d}/tfs-api/devices' -GET_LINKS_URL = '{:s}://{:s}:{:d}/tfs-api/links' - -TIMEOUT = 30 - -HTTP_OK_CODES = { - 200, # OK - 201, # Created - 202, # Accepted - 204, # No Content -} +GET_CONTEXT_IDS_URL = '/tfs-api/context_ids' +GET_DEVICES_URL = '/tfs-api/devices' +GET_LINKS_URL = '/tfs-api/links' MAPPING_STATUS = { 'DEVICEOPERATIONALSTATUS_UNDEFINED': 0, @@ -54,23 +46,23 @@ MAPPING_DRIVER = { 'DEVICEDRIVER_NCE' : 15, } -MSG_ERROR = 'Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}' - LOGGER = logging.getLogger(__name__) -class TfsApiClient: +class TfsApiClient(RestClient): def __init__( self, address : str, port : int, scheme : str = 'http', - username : Optional[str] = None, password : Optional[str] = None + username : Optional[str] = None, password : Optional[str] = None, + timeout : Optional[int] = 30 ) -> None: - self._devices_url = GET_DEVICES_URL.format(scheme, address, port) - self._links_url = GET_LINKS_URL.format(scheme, address, port) - self._auth = ( - HTTPBasicAuth(username, password) - if username is not None and password is not None - else None + super().__init__( + address, port, scheme=scheme, username=username, password=password, + timeout=timeout, verify_certs=False, allow_redirects=True, logger=LOGGER ) + def check_credentials(self) -> None: + self.get(GET_CONTEXT_IDS_URL, expected_status_codes={requests.codes['OK']}) + LOGGER.info('Credentials checked') + def get_devices_endpoints( self, import_topology : ImportTopologyEnum = ImportTopologyEnum.DEVICES ) -> List[Dict]: @@ -78,20 +70,14 @@ class TfsApiClient: MSG = '[get_devices_endpoints] import_topology={:s}' LOGGER.debug(MSG.format(str(import_topology))) - reply = requests.get(self._devices_url, timeout=TIMEOUT, verify=False, auth=self._auth) - if reply.status_code not in HTTP_OK_CODES: - msg = MSG_ERROR.format( - str(self._devices_url), str(reply.status_code), str(reply) - ) - LOGGER.error(msg) - raise Exception(msg) - if import_topology == ImportTopologyEnum.DISABLED: MSG = 'Unsupported import_topology mode: {:s}' raise Exception(MSG.format(str(import_topology))) + devices = self.get(GET_DEVICES_URL, expected_status_codes={requests.codes['OK']}) + result = list() - for json_device in reply.json()['devices']: + for json_device in devices['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 @@ -124,15 +110,9 @@ class TfsApiClient: LOGGER.debug('[get_devices_endpoints] devices only; returning') return result - reply = requests.get(self._links_url, timeout=TIMEOUT, verify=False, auth=self._auth) - if reply.status_code not in HTTP_OK_CODES: - msg = MSG_ERROR.format( - str(self._links_url), str(reply.status_code), str(reply) - ) - LOGGER.error(msg) - raise Exception(msg) + links = self.get(GET_LINKS_URL, expected_status_codes={requests.codes['OK']}) - for json_link in reply.json()['links']: + for json_link in links['links']: link_uuid : str = json_link['link_id']['link_uuid']['uuid'] link_url = '/links/link[{:s}]'.format(link_uuid) link_endpoint_ids = [ diff --git a/src/device/service/drivers/ietf_l3vpn/driver.py b/src/device/service/drivers/ietf_l3vpn/IetfL3VpnDriver.py similarity index 67% rename from src/device/service/drivers/ietf_l3vpn/driver.py rename to src/device/service/drivers/ietf_l3vpn/IetfL3VpnDriver.py index 2aca83b6a..7a7e33648 100644 --- a/src/device/service/drivers/ietf_l3vpn/driver.py +++ b/src/device/service/drivers/ietf_l3vpn/IetfL3VpnDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,41 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json -import logging -import re -import threading -from typing import Any, Iterator, List, Optional, Tuple, Union - -import anytree -import requests -from requests.auth import HTTPBasicAuth +import anytree, json, logging, re, requests, threading +from typing import Any, Iterator, List, Optional, Tuple, Union from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.type_checkers.Checkers import chk_length, chk_string, chk_type -from device.service.driver_api._Driver import ( - RESOURCE_ENDPOINTS, - RESOURCE_SERVICES, - _Driver, -) -from device.service.driver_api.AnyTreeTools import ( - TreeNode, - dump_subtree, - get_subnode, - set_subnode_value, -) -from device.service.driver_api.ImportTopologyEnum import ( - ImportTopologyEnum, - get_import_topology, -) - +from device.service.driver_api._Driver import _Driver, RESOURCE_ENDPOINTS, RESOURCE_SERVICES +from device.service.driver_api.AnyTreeTools import TreeNode, dump_subtree, get_subnode, set_subnode_value +from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum, get_import_topology from .Constants import SPECIAL_RESOURCE_MAPPINGS from .TfsApiClient import TfsApiClient from .Tools import compose_resource_endpoint LOGGER = logging.getLogger(__name__) - ALL_RESOURCE_KEYS = [ RESOURCE_ENDPOINTS, RESOURCE_SERVICES, @@ -57,40 +36,34 @@ RE_GET_ENDPOINT_FROM_INTERFACE = re.compile(r"^\/interface\[([^\]]+)\].*") RE_IETF_L3VPN_DATA = re.compile(r"^\/service\[[^\]]+\]\/IETFL3VPN$") RE_IETF_L3VPN_OPERATION = re.compile(r"^\/service\[[^\]]+\]\/IETFL3VPN\/operation$") -DRIVER_NAME = "ietf_l3vpn" -METRICS_POOL = MetricsPool("Device", "Driver", labels={"driver": DRIVER_NAME}) - +DRIVER_NAME = 'ietf_l3vpn' +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) class IetfL3VpnDriver(_Driver): - def __init__(self, address: str, port: str, **settings) -> None: + def __init__(self, address : str, port : str, **settings) -> None: super().__init__(DRIVER_NAME, address, int(port), **settings) self.__lock = threading.Lock() self.__started = threading.Event() self.__terminate = threading.Event() - self.__running = TreeNode(".") - scheme = self.settings.get("scheme", "http") - username = self.settings.get("username") - password = self.settings.get("password") + self.__running = TreeNode('.') + username = self.settings.get('username') + password = self.settings.get('password') + scheme = self.settings.get('scheme', 'http') + timeout = int(self.settings.get('timeout', 60)) self.tac = TfsApiClient( - self.address, - self.port, - scheme=scheme, - username=username, - password=password, - ) - self.__auth = None - # ( - # HTTPBasicAuth(username, password) - # if username is not None and password is not None - # else None - # ) - self.__tfs_nbi_root = "{:s}://{:s}:{:d}".format( - scheme, self.address, int(self.port) - ) - self.__timeout = int(self.settings.get("timeout", 120)) - self.__import_topology = get_import_topology( - self.settings, default=ImportTopologyEnum.DEVICES + self.address, self.port, scheme=scheme, username=username, + password=password, timeout=timeout ) + #self.__tfs_nbi_root = "{:s}://{:s}:{:d}".format(scheme, self.address, int(self.port)) + + # 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(self.settings, default=ImportTopologyEnum.DEVICES) + endpoints = self.settings.get("endpoints", []) endpoint_resources = [] for endpoint in endpoints: @@ -139,20 +112,12 @@ class IetfL3VpnDriver(_Driver): return results def Connect(self) -> bool: - url = ( - self.__tfs_nbi_root + "/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services" - ) with self.__lock: - if self.__started.is_set(): - return True + if self.__started.is_set(): return True try: - # requests.get(url, timeout=self.__timeout, auth=self.__auth) - ... - except requests.exceptions.Timeout: - LOGGER.exception("Timeout connecting {:s}".format(url)) - return False - except Exception: # pylint: disable=broad-except - LOGGER.exception("Exception connecting {:s}".format(url)) + self.tac.check_credentials() + except: # pylint: disable=bare-except + LOGGER.exception('Exception checking credentials') return False else: self.__started.set() @@ -170,50 +135,46 @@ class IetfL3VpnDriver(_Driver): @metered_subclass_method(METRICS_POOL) def GetConfig( - self, resource_keys: List[str] = [] + self, resource_keys : List[str] = [] ) -> List[Tuple[str, Union[Any, None, Exception]]]: - chk_type("resources", resource_keys, list) + chk_type('resources', resource_keys, list) + results = [] with self.__lock: - if len(resource_keys) == 0: - return dump_subtree(self.__running) - results = [] - resolver = anytree.Resolver(pathattr="name") + self.tac.check_credentials() + if len(resource_keys) == 0: resource_keys = ALL_RESOURCE_KEYS + #if len(resource_keys) == 0: + # return dump_subtree(self.__running) + resolver = anytree.Resolver(pathattr='name') for i, resource_key in enumerate(resource_keys): - str_resource_name = "resource_key[#{:d}]".format(i) + str_resource_name = 'resource_key[#{:d}]'.format(i) try: chk_string(str_resource_name, resource_key, allow_empty=False) - resource_key = SPECIAL_RESOURCE_MAPPINGS.get( - resource_key, resource_key - ) - resource_path = resource_key.split("/") - except Exception as e: # pylint: disable=broad-except - LOGGER.exception( - "Exception validating {:s}: {:s}".format( - str_resource_name, str(resource_key) + if resource_key == RESOURCE_ENDPOINTS: + # return endpoints through TFS NBI API and list-devices method + results.extend(self.tac.get_devices_endpoints(self.__import_topology)) + else: + resource_key = SPECIAL_RESOURCE_MAPPINGS.get( + resource_key, resource_key ) - ) - results.append( - (resource_key, e) - ) # if validation fails, store the exception - continue - - resource_node = get_subnode( - resolver, self.__running, resource_path, default=None - ) - # if not found, resource_node is None - if resource_node is None: - continue - results.extend(dump_subtree(resource_node)) - return results + resource_path = resource_key.split('/') + resource_node = get_subnode( + resolver, self.__running, resource_path, default=None + ) + # if not found, resource_node is None + if resource_node is None: continue + results.extend(dump_subtree(resource_node)) + except Exception as e: + MSG = 'Unhandled error processing {:s}: resource_key({:s})' + LOGGER.exception(MSG.format(str_resource_name, str(resource_key))) + results.append((resource_key, e)) return results @metered_subclass_method(METRICS_POOL) def SetConfig( - self, resources: List[Tuple[str, Any]] + self, resources : List[Tuple[str, Any]] ) -> List[Union[bool, Exception]]: results = [] - if len(resources) == 0: - return results + if len(resources) == 0: return results with self.__lock: for resource in resources: resource_key, resource_value = resource @@ -224,7 +185,7 @@ class IetfL3VpnDriver(_Driver): else: raise Exception("operation type not found in resources") for resource in resources: - LOGGER.info("resource = {:s}".format(str(resource))) + LOGGER.info('resource = {:s}'.format(str(resource))) resource_key, resource_value = resource if not RE_IETF_L3VPN_DATA.match(resource_key): continue @@ -261,7 +222,7 @@ class IetfL3VpnDriver(_Driver): @metered_subclass_method(METRICS_POOL) def DeleteConfig( - self, resources: List[Tuple[str, Any]] + self, resources : List[Tuple[str, Any]] ) -> List[Union[bool, Exception]]: results = [] if len(resources) == 0: @@ -290,20 +251,20 @@ class IetfL3VpnDriver(_Driver): @metered_subclass_method(METRICS_POOL) def SubscribeState( - self, subscriptions: List[Tuple[str, float, float]] + self, subscriptions : List[Tuple[str, float, float]] ) -> List[Union[bool, Exception]]: - # TODO: IETF L3VPN does not support monitoring by now + # TODO: 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]] + self, subscriptions : List[Tuple[str, float, float]] ) -> List[Union[bool, Exception]]: - # TODO: IETF L3VPN does not support monitoring by now + # TODO: does not support monitoring by now return [False for _ in subscriptions] def GetState( - self, blocking=False, terminate: Optional[threading.Event] = None + self, blocking=False, terminate : Optional[threading.Event] = None ) -> Iterator[Tuple[float, str, Any]]: - # TODO: IETF L3VPN does not support monitoring by now + # TODO: does not support monitoring by now return [] diff --git a/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py index 2db898059..6efe3712f 100644 --- a/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py +++ b/src/device/service/drivers/ietf_l3vpn/TfsApiClient.py @@ -13,22 +13,14 @@ # limitations under the License. import logging, requests -from requests.auth import HTTPBasicAuth from typing import Dict, List, Optional +from common.tools.client.RestClient import RestClient from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum -GET_DEVICES_URL = '{:s}://{:s}:{:d}/tfs-api/devices' -GET_LINKS_URL = '{:s}://{:s}:{:d}/tfs-api/links' -L3VPN_URL = '{:s}://{:s}:{:d}/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' - -TIMEOUT = 30 - -HTTP_OK_CODES = { - 200, # OK - 201, # Created - 202, # Accepted - 204, # No Content -} +GET_CONTEXT_IDS_URL = '/tfs-api/context_ids' +GET_DEVICES_URL = '/tfs-api/devices' +GET_LINKS_URL = '/tfs-api/links' +L3VPN_URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' MAPPING_STATUS = { 'DEVICEOPERATIONALSTATUS_UNDEFINED': 0, @@ -55,24 +47,23 @@ MAPPING_DRIVER = { 'DEVICEDRIVER_NCE' : 15, } -MSG_ERROR = 'Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}' - LOGGER = logging.getLogger(__name__) -class TfsApiClient: +class TfsApiClient(RestClient): def __init__( self, address : str, port : int, scheme : str = 'http', - username : Optional[str] = None, password : Optional[str] = None + username : Optional[str] = None, password : Optional[str] = None, + timeout : Optional[int] = 30 ) -> None: - self._devices_url = GET_DEVICES_URL.format(scheme, address, port) - self._links_url = GET_LINKS_URL.format(scheme, address, port) - self._l3vpn_url = L3VPN_URL.format(scheme, address, port) - self._auth = ( - HTTPBasicAuth(username, password) - if username is not None and password is not None - else None + super().__init__( + address, port, scheme=scheme, username=username, password=password, + timeout=timeout, verify_certs=False, allow_redirects=True, logger=LOGGER ) + def check_credentials(self) -> None: + self.get(GET_CONTEXT_IDS_URL, expected_status_codes={requests.codes['OK']}) + LOGGER.info('Credentials checked') + def get_devices_endpoints( self, import_topology : ImportTopologyEnum = ImportTopologyEnum.DEVICES ) -> List[Dict]: @@ -80,20 +71,14 @@ class TfsApiClient: MSG = '[get_devices_endpoints] import_topology={:s}' LOGGER.debug(MSG.format(str(import_topology))) - reply = requests.get(self._devices_url, timeout=TIMEOUT, verify=False, auth=self._auth) - if reply.status_code not in HTTP_OK_CODES: - msg = MSG_ERROR.format( - str(self._devices_url), str(reply.status_code), str(reply) - ) - LOGGER.error(msg) - raise Exception(msg) - if import_topology == ImportTopologyEnum.DISABLED: MSG = 'Unsupported import_topology mode: {:s}' raise Exception(MSG.format(str(import_topology))) + devices = self.get(GET_DEVICES_URL, expected_status_codes={requests.codes['OK']}) + result = list() - for json_device in reply.json()['devices']: + for json_device in devices['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 @@ -126,15 +111,9 @@ class TfsApiClient: LOGGER.debug('[get_devices_endpoints] devices only; returning') return result - reply = requests.get(self._links_url, timeout=TIMEOUT, verify=False, auth=self._auth) - if reply.status_code not in HTTP_OK_CODES: - msg = MSG_ERROR.format( - str(self._links_url), str(reply.status_code), str(reply) - ) - LOGGER.error(msg) - raise Exception(msg) + links = self.get(GET_LINKS_URL, expected_status_codes={requests.codes['OK']}) - for json_link in reply.json()['links']: + for json_link in links['links']: link_uuid : str = json_link['link_id']['link_uuid']['uuid'] link_url = '/links/link[{:s}]'.format(link_uuid) link_endpoint_ids = [ @@ -154,29 +133,31 @@ class TfsApiClient: LOGGER.debug('[get_devices_endpoints] topology; returning') return result - def create_connectivity_service(self, l3vpn_data: dict) -> None: + def create_connectivity_service(self, l3vpn_data : dict) -> None: + MSG = '[create_connectivity_service] l3vpn_data={:s}' + LOGGER.debug(MSG.format(str(l3vpn_data))) try: - requests.post(self._l3vpn_url, json=l3vpn_data) - MSG = '[create_connectivity_service] l3vpn_data={:s}' - LOGGER.debug(MSG.format(str(l3vpn_data))) - except requests.exceptions.ConnectionError: - raise Exception('Failed to send POST request to TFS L3VPN NBI') - - def update_connectivity_service(self, l3vpn_data: dict) -> None: + self.post(L3VPN_URL, body=l3vpn_data) + except requests.exceptions.ConnectionError as e: + MSG = 'Failed to send POST request to TFS L3VPN NBI' + raise Exception(MSG) from e + + def update_connectivity_service(self, l3vpn_data : dict) -> None: + MSG = '[update_connectivity_service] l3vpn_data={:s}' + LOGGER.debug(MSG.format(str(l3vpn_data))) vpn_id = l3vpn_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] - url = self._l3vpn_url + f'/vpn-service={vpn_id}' try: - requests.put(url, json=l3vpn_data) - MSG = '[update_connectivity_service] l3vpn_data={:s}' - LOGGER.debug(MSG.format(str(l3vpn_data))) - except requests.exceptions.ConnectionError: - raise Exception('Failed to send PUT request to TFS L3VPN NBI') - - def delete_connectivity_service(self, service_uuid: str) -> None: - url = self._l3vpn_url + f'/vpn-service={service_uuid}' + self.put(L3VPN_URL + f'/vpn-service={vpn_id}', body=l3vpn_data) + except requests.exceptions.ConnectionError as e: + MSG = 'Failed to send PUT request to TFS L3VPN NBI' + raise Exception(MSG) from e + + def delete_connectivity_service(self, service_uuid : str) -> None: + url = L3VPN_URL + f'/vpn-service={service_uuid}' + MSG = '[delete_connectivity_service] url={:s}' + LOGGER.debug(MSG.format(str(url))) try: - requests.delete(url) - MSG = '[delete_connectivity_service] url={:s}' - LOGGER.debug(MSG.format(str(url))) - except requests.exceptions.ConnectionError: - raise Exception('Failed to send DELETE request to TFS L3VPN NBI') + self.delete(url) + except requests.exceptions.ConnectionError as e: + MSG = 'Failed to send DELETE request to TFS L3VPN NBI' + raise Exception(MSG) from e diff --git a/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py b/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py index 8af800454..8d7d95251 100644 --- a/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py +++ b/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py @@ -12,6 +12,7 @@ # 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 @@ -32,8 +33,8 @@ DRIVER_NAME = 'optical_tfs' METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) class OpticalTfsDriver(_Driver): - def __init__(self, address: str, port: int, **settings) -> None: - super().__init__(DRIVER_NAME, address, port, **settings) + def __init__(self, address : str, port : str, **settings) -> None: + super().__init__(DRIVER_NAME, address, int(port), **settings) self.__lock = threading.Lock() self.__started = threading.Event() self.__terminate = threading.Event() @@ -42,7 +43,7 @@ class OpticalTfsDriver(_Driver): scheme = self.settings.get('scheme', 'http') timeout = int(self.settings.get('timeout', 60)) self.tac = TfsApiClient( - self.address, int(self.port), scheme=scheme, username=username, + self.address, self.port, scheme=scheme, username=username, password=password, timeout=timeout ) self.toc = TfsOpticalClient( @@ -62,7 +63,7 @@ class OpticalTfsDriver(_Driver): with self.__lock: if self.__started.is_set(): return True try: - self.toc.check_credentials() + self.tac.check_credentials() except: # pylint: disable=bare-except LOGGER.exception('Exception checking credentials') return False @@ -81,11 +82,13 @@ class OpticalTfsDriver(_Driver): return [] @metered_subclass_method(METRICS_POOL) - def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: + 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.toc.check_credentials() + self.tac.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) @@ -96,24 +99,28 @@ class OpticalTfsDriver(_Driver): results.extend(self.tac.get_devices_endpoints(self.__import_topology)) elif resource_key == RESOURCE_SERVICES: # return all services through - results.extend(self.toc.get_lightpaths()) + #results.extend(self.toc.get_lightpaths()) + pass else: MSG = 'ResourceKey({:s}) not implemented' LOGGER.warning(MSG.format(str(resource_key))) except Exception as e: - LOGGER.exception('Unhandled error processing resource_key({:s})'.format(str(resource_key))) + MSG = 'Unhandled error processing {:s}: resource_key({:s})' + LOGGER.exception(MSG.format(str_resource_name, 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]]: + def SetConfig( + self, resources : List[Tuple[str, Any]] + ) -> List[Union[bool, Exception]]: results = [] if len(resources) == 0: return results with self.__lock: - self.toc.check_credentials() + self.tac.check_credentials() for resource in resources: LOGGER.info('resource = {:s}'.format(str(resource))) - resource_key,resource_value = resource + resource_key, resource_value = resource try: resource_value = json.loads(resource_value) src_node = resource_value['src_node'] @@ -127,11 +134,13 @@ class OpticalTfsDriver(_Driver): return results @metered_subclass_method(METRICS_POOL) - def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + def DeleteConfig( + self, resources : List[Tuple[str, Any]] + ) -> List[Union[bool, Exception]]: results = [] if len(resources) == 0: return results with self.__lock: - self.toc.check_credentials() + self.tac.check_credentials() for resource in resources: LOGGER.info('resource = {:s}'.format(str(resource))) resource_key,resource_value = resource @@ -149,17 +158,21 @@ class OpticalTfsDriver(_Driver): return results @metered_subclass_method(METRICS_POOL) - def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: - # TODO: Optical TFS does not support monitoring by now + def SubscribeState( + self, subscriptions : List[Tuple[str, float, float]] + ) -> List[Union[bool, Exception]]: + # TODO: 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: Optical TFS does not support monitoring by now + def UnsubscribeState( + self, subscriptions : List[Tuple[str, float, float]] + ) -> List[Union[bool, Exception]]: + # TODO: 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: Optical TFS does not support monitoring by now + # TODO: does not support monitoring by now return [] diff --git a/src/device/service/drivers/optical_tfs/TfsApiClient.py b/src/device/service/drivers/optical_tfs/TfsApiClient.py index 8df8e5261..e9b21f249 100644 --- a/src/device/service/drivers/optical_tfs/TfsApiClient.py +++ b/src/device/service/drivers/optical_tfs/TfsApiClient.py @@ -17,8 +17,9 @@ from typing import Dict, List, Optional from common.tools.client.RestClient import RestClient from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum -GET_DEVICES_URL = '/tfs-api/devices' -GET_LINKS_URL = '/tfs-api/links' +GET_CONTEXT_IDS_URL = '/tfs-api/context_ids' +GET_DEVICES_URL = '/tfs-api/devices' +GET_LINKS_URL = '/tfs-api/links' MAPPING_STATUS = { 'DEVICEOPERATIONALSTATUS_UNDEFINED': 0, @@ -58,6 +59,10 @@ class TfsApiClient(RestClient): timeout=timeout, verify_certs=False, allow_redirects=True, logger=LOGGER ) + def check_credentials(self) -> None: + self.get(GET_CONTEXT_IDS_URL, expected_status_codes={requests.codes['OK']}) + LOGGER.info('Credentials checked') + def get_devices_endpoints( self, import_topology : ImportTopologyEnum = ImportTopologyEnum.DEVICES ) -> List[Dict]: diff --git a/src/device/tests/test_unitary_ietf_l3vpn.py b/src/device/tests/test_unitary_ietf_l3vpn.py index 728ca6913..f9f7ae990 100644 --- a/src/device/tests/test_unitary_ietf_l3vpn.py +++ b/src/device/tests/test_unitary_ietf_l3vpn.py @@ -3,7 +3,7 @@ from json import dumps import requests -from device.service.drivers.ietf_l3vpn.driver import IetfL3VpnDriver +from device.service.drivers.ietf_l3vpn.IetfL3VpnDriver import IetfL3VpnDriver from device.service.Tools import RESOURCE_ENDPOINTS settings = { -- GitLab From 2f8ef6dd74739d76de8f5856dd6ab1de96ca8a8b Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sat, 15 Mar 2025 19:06:31 +0000 Subject: [PATCH 315/463] End-to-end Orchestrator: - Implemented Subscription to newly discovered controllers --- src/e2e_orchestrator/requirements.in | 5 +- .../E2EOrchestratorServiceServicerImpl.py | 222 ++------------- .../service/SubscriptionServer.py | 162 +++++++++++ src/e2e_orchestrator/service/TopologyTools.py | 37 +++ src/e2e_orchestrator/service/__main__.py | 13 +- .../old_E2EOrchestratorServiceServicerImpl.py | 268 ++++++++++++++++++ .../ControllerDiscovererThread.py | 100 +++++++ .../RecommendationsClientNamespace.py | 40 +++ .../service/subscriptions/Subscription.py | 71 +++++ .../service/subscriptions/Subscriptions.py | 47 +++ .../subscriptions/TFSControllerSettings.py | 72 +++++ .../service/subscriptions/__init__.py | 13 + 12 files changed, 844 insertions(+), 206 deletions(-) create mode 100644 src/e2e_orchestrator/service/SubscriptionServer.py create mode 100644 src/e2e_orchestrator/service/TopologyTools.py create mode 100644 src/e2e_orchestrator/service/old_E2EOrchestratorServiceServicerImpl.py create mode 100644 src/e2e_orchestrator/service/subscriptions/ControllerDiscovererThread.py create mode 100644 src/e2e_orchestrator/service/subscriptions/RecommendationsClientNamespace.py create mode 100644 src/e2e_orchestrator/service/subscriptions/Subscription.py create mode 100644 src/e2e_orchestrator/service/subscriptions/Subscriptions.py create mode 100644 src/e2e_orchestrator/service/subscriptions/TFSControllerSettings.py create mode 100644 src/e2e_orchestrator/service/subscriptions/__init__.py diff --git a/src/e2e_orchestrator/requirements.in b/src/e2e_orchestrator/requirements.in index 53f9028a7..2b34cad18 100644 --- a/src/e2e_orchestrator/requirements.in +++ b/src/e2e_orchestrator/requirements.in @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -networkx -websockets==12.0 +networkx==3.2.1 +python-socketio==5.12.1 requests==2.27.* +#websockets==12.0 diff --git a/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py index 4878d4788..2284abe4c 100644 --- a/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py +++ b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py @@ -12,229 +12,49 @@ # See the License for the specific language governing permissions and # limitations under the License. -import copy, grpc, json, logging, networkx, requests, threading +import copy, grpc, logging, networkx from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.proto.e2eorchestrator_pb2 import E2EOrchestratorRequest, E2EOrchestratorReply -from common.proto.context_pb2 import ( - Empty, Connection, EndPointId, Link, LinkId, TopologyDetails, Topology, Context, Service, ServiceId, - ServiceTypeEnum, ServiceStatusEnum) +from common.proto.context_pb2 import Empty, Connection, EndPointId from common.proto.e2eorchestrator_pb2_grpc import E2EOrchestratorServiceServicer -from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest -from common.tools.grpc.Tools import grpc_message_to_json_string -from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME -from common.Settings import get_setting from context.client.ContextClient import ContextClient from context.service.database.uuids.EndPoint import endpoint_get_uuid -from context.service.database.uuids.Device import device_get_uuid -from service.client.ServiceClient import ServiceClient -from websockets.sync.client import connect -from websockets.sync.server import serve - LOGGER = logging.getLogger(__name__) -logging.getLogger("websockets").propagate = True -logging.getLogger("requests.packages.urllib3").propagate = True METRICS_POOL = MetricsPool("E2EOrchestrator", "RPC") - -context_client: ContextClient = ContextClient() -service_client: ServiceClient = ServiceClient() - -EXT_HOST = str(get_setting('WS_IP_HOST')) -EXT_PORT = int(get_setting('WS_IP_PORT')) -EXT_URL = 'ws://{:s}:{:d}'.format(EXT_HOST, EXT_PORT) - -OWN_HOST = str(get_setting('WS_E2E_HOST')) -OWN_PORT = int(get_setting('WS_E2E_PORT')) - -ALL_HOSTS = '0.0.0.0' - -class SubscriptionServer(threading.Thread): - def run(self): - request = VNTSubscriptionRequest() - request.host = OWN_HOST - request.port = OWN_PORT - try: - LOGGER.debug('Trying to connect to {:s}'.format(EXT_URL)) - websocket = connect(EXT_URL) - except: # pylint: disable=bare-except - LOGGER.exception('Error connecting to {:s}'.format(EXT_URL)) - else: - with websocket: - LOGGER.debug('Connected to {:s}'.format(EXT_URL)) - send = grpc_message_to_json_string(request) - websocket.send(send) - LOGGER.debug('Sent: {:s}'.format(send)) - try: - message = websocket.recv() - LOGGER.debug('Received message from WebSocket: {:s}'.format(message)) - except Exception as ex: - LOGGER.error('Exception receiving from WebSocket: {:s}'.format(ex)) - self._events_server() - - - def _events_server(self): - try: - server = serve(self._event_received, ALL_HOSTS, int(OWN_PORT)) - except: # pylint: disable=bare-except - LOGGER.exception('Error starting server on {:s}:{:d}'.format(ALL_HOSTS, OWN_PORT)) - else: - with server: - LOGGER.info('Running events server...: {:s}:{:d}'.format(ALL_HOSTS, OWN_PORT)) - server.serve_forever() - - - def _event_received(self, connection): - LOGGER.debug('Event received') - for message in connection: - message_json = json.loads(message) - - # Link creation - if 'link_id' in message_json: - LOGGER.debug('Link creation') - link = Link(**message_json) - - service = Service() - service.service_id.service_uuid.uuid = link.link_id.link_uuid.uuid - service.service_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME - service.service_type = ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY - service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED - service_client.CreateService(service) - - a_device_uuid = device_get_uuid(link.link_endpoint_ids[0].device_id) - a_endpoint_uuid = endpoint_get_uuid(link.link_endpoint_ids[0])[2] - z_device_uuid = device_get_uuid(link.link_endpoint_ids[1].device_id) - z_endpoint_uuid = endpoint_get_uuid(link.link_endpoint_ids[1])[2] - - links = context_client.ListLinks(Empty()).links - for _link in links: - for _endpoint_id in _link.link_endpoint_ids: - if _endpoint_id.device_id.device_uuid.uuid == a_device_uuid and \ - _endpoint_id.endpoint_uuid.uuid == a_endpoint_uuid: - a_ep_id = _endpoint_id - elif _endpoint_id.device_id.device_uuid.uuid == z_device_uuid and \ - _endpoint_id.endpoint_uuid.uuid == z_endpoint_uuid: - z_ep_id = _endpoint_id - - if (not 'a_ep_id' in locals()) or (not 'z_ep_id' in locals()): - error_msg = f'Could not get VNT link endpoints\ - \n\ta_endpoint_uuid= {a_endpoint_uuid}\ - \n\tz_endpoint_uuid= {z_device_uuid}' - LOGGER.error(error_msg) - connection.send(error_msg) - return - - service.service_endpoint_ids.append(copy.deepcopy(a_ep_id)) - service.service_endpoint_ids.append(copy.deepcopy(z_ep_id)) - - service_client.UpdateService(service) - re_svc = context_client.GetService(service.service_id) - connection.send(grpc_message_to_json_string(link)) - context_client.SetLink(link) - elif 'link_uuid' in message_json: - LOGGER.debug('Link removal') - link_id = LinkId(**message_json) - - service_id = ServiceId() - service_id.service_uuid.uuid = link_id.link_uuid.uuid - service_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME - service_client.DeleteService(service_id) - connection.send(grpc_message_to_json_string(link_id)) - context_client.RemoveLink(link_id) - else: - LOGGER.debug('Topology received') - topology_details = TopologyDetails(**message_json) - - context = Context() - context.context_id.context_uuid.uuid = topology_details.topology_id.context_id.context_uuid.uuid - context_client.SetContext(context) - - topology = Topology() - topology.topology_id.context_id.CopyFrom(context.context_id) - topology.topology_id.topology_uuid.uuid = topology_details.topology_id.topology_uuid.uuid - context_client.SetTopology(topology) - - for device in topology_details.devices: - context_client.SetDevice(device) - - for link in topology_details.links: - context_client.SetLink(link) - - - class E2EOrchestratorServiceServicerImpl(E2EOrchestratorServiceServicer): def __init__(self): LOGGER.debug('Creating Servicer...') - try: - LOGGER.debug('Requesting subscription') - sub_server = SubscriptionServer() - sub_server.start() - LOGGER.debug('Servicer Created') - self.retrieve_external_topologies() - except: - LOGGER.exception('Unhandled Exception') - - def retrieve_external_topologies(self): - i = 1 - while True: - try: - ADD = str(get_setting(f'EXT_CONTROLLER{i}_ADD')) - PORT = int(get_setting(f'EXT_CONTROLLER{i}_PORT')) - except: # pylint: disable=bare-except - break + LOGGER.debug('Servicer Created') - try: - LOGGER.info('Retrieving external controller #{:d}'.format(i)) - url = 'http://{:s}:{:d}/tfs-api/context/{:s}/topology_details/{:s}'.format( - ADD, PORT, DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME - ) - LOGGER.info('url={:s}'.format(str(url))) - topo = requests.get(url).json() - LOGGER.info('Retrieved external controller #{:d}'.format(i)) - except: # pylint: disable=bare-except - LOGGER.exception('Exception retrieven topology from external controler #{:d}'.format(i)) - - topology_details = TopologyDetails(**topo) - context = Context() - context.context_id.context_uuid.uuid = topology_details.topology_id.context_id.context_uuid.uuid - context_client.SetContext(context) - - topology = Topology() - topology.topology_id.context_id.CopyFrom(context.context_id) - topology.topology_id.topology_uuid.uuid = topology_details.topology_id.topology_uuid.uuid - context_client.SetTopology(topology) - - for device in topology_details.devices: - context_client.SetDevice(device) - - for link in topology_details.links: - context_client.SetLink(link) - - i+=1 - - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def Compute(self, request: E2EOrchestratorRequest, context: grpc.ServicerContext) -> E2EOrchestratorReply: - endpoints_ids = [] - for endpoint_id in request.service.service_endpoint_ids: - endpoints_ids.append(endpoint_get_uuid(endpoint_id)[2]) + def Compute( + self, request: E2EOrchestratorRequest, context: grpc.ServicerContext + ) -> E2EOrchestratorReply: + endpoints_ids = [ + endpoint_get_uuid(endpoint_id)[2] + for endpoint_id in request.service.service_endpoint_ids + ] graph = networkx.Graph() + context_client = ContextClient() devices = context_client.ListDevices(Empty()).devices - for device in devices: - endpoints_uuids = [endpoint.endpoint_id.endpoint_uuid.uuid - for endpoint in device.device_endpoints] + endpoints_uuids = [ + endpoint.endpoint_id.endpoint_uuid.uuid + for endpoint in device.device_endpoints + ] for ep in endpoints_uuids: graph.add_node(ep) - for ep in endpoints_uuids: - for ep_i in endpoints_uuids: - if ep == ep_i: + for ep_i in endpoints_uuids: + for ep_j in endpoints_uuids: + if ep_i == ep_j: continue - graph.add_edge(ep, ep_i) + graph.add_edge(ep_i, ep_j) links = context_client.ListLinks(Empty()).links for link in links: @@ -244,7 +64,9 @@ class E2EOrchestratorServiceServicerImpl(E2EOrchestratorServiceServicer): graph.add_edge(eps[0], eps[1]) - shortest = networkx.shortest_path(graph, endpoints_ids[0], endpoints_ids[1]) + shortest = networkx.shortest_path( + graph, endpoints_ids[0], endpoints_ids[1] + ) path = E2EOrchestratorReply() path.services.append(copy.deepcopy(request.service)) diff --git a/src/e2e_orchestrator/service/SubscriptionServer.py b/src/e2e_orchestrator/service/SubscriptionServer.py new file mode 100644 index 000000000..ab1c37dbd --- /dev/null +++ b/src/e2e_orchestrator/service/SubscriptionServer.py @@ -0,0 +1,162 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 copy, grpc, json, logging, networkx, requests, threading +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.proto.e2eorchestrator_pb2 import E2EOrchestratorRequest, E2EOrchestratorReply +from common.proto.context_pb2 import ( + Empty, Connection, EndPointId, Link, LinkId, TopologyDetails, Topology, Context, Service, ServiceId, + ServiceTypeEnum, ServiceStatusEnum) +from common.proto.e2eorchestrator_pb2_grpc import E2EOrchestratorServiceServicer +from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.Settings import get_setting +from context.client.ContextClient import ContextClient +from context.service.database.uuids.EndPoint import endpoint_get_uuid +from context.service.database.uuids.Device import device_get_uuid +from service.client.ServiceClient import ServiceClient +from websockets.sync.client import connect +from websockets.sync.server import serve + + +LOGGER = logging.getLogger(__name__) +logging.getLogger("websockets").propagate = True +logging.getLogger("requests.packages.urllib3").propagate = True + +METRICS_POOL = MetricsPool("E2EOrchestrator", "RPC") + + +context_client: ContextClient = ContextClient() +service_client: ServiceClient = ServiceClient() + +EXT_HOST = str(get_setting('WS_IP_HOST')) +EXT_PORT = int(get_setting('WS_IP_PORT')) +EXT_URL = 'ws://{:s}:{:d}'.format(EXT_HOST, EXT_PORT) + +OWN_HOST = str(get_setting('WS_E2E_HOST')) +OWN_PORT = int(get_setting('WS_E2E_PORT')) + +ALL_HOSTS = '0.0.0.0' + +class SubscriptionServer(threading.Thread): + def run(self): + request = VNTSubscriptionRequest() + request.host = OWN_HOST + request.port = OWN_PORT + try: + LOGGER.debug('Trying to connect to {:s}'.format(EXT_URL)) + websocket = connect(EXT_URL) + except: # pylint: disable=bare-except + LOGGER.exception('Error connecting to {:s}'.format(EXT_URL)) + else: + with websocket: + LOGGER.debug('Connected to {:s}'.format(EXT_URL)) + send = grpc_message_to_json_string(request) + websocket.send(send) + LOGGER.debug('Sent: {:s}'.format(send)) + try: + message = websocket.recv() + LOGGER.debug('Received message from WebSocket: {:s}'.format(message)) + except Exception as ex: + LOGGER.error('Exception receiving from WebSocket: {:s}'.format(ex)) + self._events_server() + + + def _events_server(self): + try: + server = serve(self._event_received, ALL_HOSTS, int(OWN_PORT)) + except: # pylint: disable=bare-except + LOGGER.exception('Error starting server on {:s}:{:d}'.format(ALL_HOSTS, OWN_PORT)) + else: + with server: + LOGGER.info('Running events server...: {:s}:{:d}'.format(ALL_HOSTS, OWN_PORT)) + server.serve_forever() + + + def _event_received(self, connection): + LOGGER.debug('Event received') + for message in connection: + message_json = json.loads(message) + + # Link creation + if 'link_id' in message_json: + LOGGER.debug('Link creation') + link = Link(**message_json) + + service = Service() + service.service_id.service_uuid.uuid = link.link_id.link_uuid.uuid + service.service_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + service.service_type = ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY + service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED + service_client.CreateService(service) + + a_device_uuid = device_get_uuid(link.link_endpoint_ids[0].device_id) + a_endpoint_uuid = endpoint_get_uuid(link.link_endpoint_ids[0])[2] + z_device_uuid = device_get_uuid(link.link_endpoint_ids[1].device_id) + z_endpoint_uuid = endpoint_get_uuid(link.link_endpoint_ids[1])[2] + + links = context_client.ListLinks(Empty()).links + for _link in links: + for _endpoint_id in _link.link_endpoint_ids: + if _endpoint_id.device_id.device_uuid.uuid == a_device_uuid and \ + _endpoint_id.endpoint_uuid.uuid == a_endpoint_uuid: + a_ep_id = _endpoint_id + elif _endpoint_id.device_id.device_uuid.uuid == z_device_uuid and \ + _endpoint_id.endpoint_uuid.uuid == z_endpoint_uuid: + z_ep_id = _endpoint_id + + if (not 'a_ep_id' in locals()) or (not 'z_ep_id' in locals()): + error_msg = f'Could not get VNT link endpoints\ + \n\ta_endpoint_uuid= {a_endpoint_uuid}\ + \n\tz_endpoint_uuid= {z_device_uuid}' + LOGGER.error(error_msg) + connection.send(error_msg) + return + + service.service_endpoint_ids.append(copy.deepcopy(a_ep_id)) + service.service_endpoint_ids.append(copy.deepcopy(z_ep_id)) + + service_client.UpdateService(service) + re_svc = context_client.GetService(service.service_id) + connection.send(grpc_message_to_json_string(link)) + context_client.SetLink(link) + elif 'link_uuid' in message_json: + LOGGER.debug('Link removal') + link_id = LinkId(**message_json) + + service_id = ServiceId() + service_id.service_uuid.uuid = link_id.link_uuid.uuid + service_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + service_client.DeleteService(service_id) + connection.send(grpc_message_to_json_string(link_id)) + context_client.RemoveLink(link_id) + else: + LOGGER.debug('Topology received') + topology_details = TopologyDetails(**message_json) + + context = Context() + context.context_id.context_uuid.uuid = topology_details.topology_id.context_id.context_uuid.uuid + context_client.SetContext(context) + + topology = Topology() + topology.topology_id.context_id.CopyFrom(context.context_id) + topology.topology_id.topology_uuid.uuid = topology_details.topology_id.topology_uuid.uuid + context_client.SetTopology(topology) + + for device in topology_details.devices: + context_client.SetDevice(device) + + for link in topology_details.links: + context_client.SetLink(link) diff --git a/src/e2e_orchestrator/service/TopologyTools.py b/src/e2e_orchestrator/service/TopologyTools.py new file mode 100644 index 000000000..eaa0e2dbb --- /dev/null +++ b/src/e2e_orchestrator/service/TopologyTools.py @@ -0,0 +1,37 @@ + def retrieve_external_topologies(self): + i = 1 + while True: + try: + ADD = str(get_setting(f'EXT_CONTROLLER{i}_ADD')) + PORT = int(get_setting(f'EXT_CONTROLLER{i}_PORT')) + except: # pylint: disable=bare-except + break + + try: + LOGGER.info('Retrieving external controller #{:d}'.format(i)) + url = 'http://{:s}:{:d}/tfs-api/context/{:s}/topology_details/{:s}'.format( + ADD, PORT, DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME + ) + LOGGER.info('url={:s}'.format(str(url))) + topo = requests.get(url).json() + LOGGER.info('Retrieved external controller #{:d}'.format(i)) + except: # pylint: disable=bare-except + LOGGER.exception('Exception retrieven topology from external controler #{:d}'.format(i)) + + topology_details = TopologyDetails(**topo) + context = Context() + context.context_id.context_uuid.uuid = topology_details.topology_id.context_id.context_uuid.uuid + context_client.SetContext(context) + + topology = Topology() + topology.topology_id.context_id.CopyFrom(context.context_id) + topology.topology_id.topology_uuid.uuid = topology_details.topology_id.topology_uuid.uuid + context_client.SetTopology(topology) + + for device in topology_details.devices: + context_client.SetDevice(device) + + for link in topology_details.links: + context_client.SetLink(link) + + i+=1 diff --git a/src/e2e_orchestrator/service/__main__.py b/src/e2e_orchestrator/service/__main__.py index 4c0a6d471..d984add76 100644 --- a/src/e2e_orchestrator/service/__main__.py +++ b/src/e2e_orchestrator/service/__main__.py @@ -24,6 +24,7 @@ from common.Settings import (ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, get_log_level, get_metrics_port, wait_for_environment_variables) +from e2e_orchestrator.service.subscriptions.ControllerDiscovererThread import ControllerDiscoverer from .E2EOrchestratorService import E2EOrchestratorService @@ -49,17 +50,21 @@ def main(): metrics_port = get_metrics_port() start_http_server(metrics_port) - # Starting CentralizedCybersecurity service grpc_service = E2EOrchestratorService() grpc_service.start() - LOGGER.info("Started...") - # Wait for Ctrl+C or termination signal + controller_discoverer = ControllerDiscoverer( + terminate=terminate + ) + controller_discoverer.start() + + LOGGER.info("Running...") + # Wait for Ctrl+C or termination signal while not terminate.wait(timeout=1): pass - LOGGER.info("Terminating...") + controller_discoverer.stop() grpc_service.stop() LOGGER.info("Bye") diff --git a/src/e2e_orchestrator/service/old_E2EOrchestratorServiceServicerImpl.py b/src/e2e_orchestrator/service/old_E2EOrchestratorServiceServicerImpl.py new file mode 100644 index 000000000..4878d4788 --- /dev/null +++ b/src/e2e_orchestrator/service/old_E2EOrchestratorServiceServicerImpl.py @@ -0,0 +1,268 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 copy, grpc, json, logging, networkx, requests, threading +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.proto.e2eorchestrator_pb2 import E2EOrchestratorRequest, E2EOrchestratorReply +from common.proto.context_pb2 import ( + Empty, Connection, EndPointId, Link, LinkId, TopologyDetails, Topology, Context, Service, ServiceId, + ServiceTypeEnum, ServiceStatusEnum) +from common.proto.e2eorchestrator_pb2_grpc import E2EOrchestratorServiceServicer +from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.Settings import get_setting +from context.client.ContextClient import ContextClient +from context.service.database.uuids.EndPoint import endpoint_get_uuid +from context.service.database.uuids.Device import device_get_uuid +from service.client.ServiceClient import ServiceClient +from websockets.sync.client import connect +from websockets.sync.server import serve + + +LOGGER = logging.getLogger(__name__) +logging.getLogger("websockets").propagate = True +logging.getLogger("requests.packages.urllib3").propagate = True + +METRICS_POOL = MetricsPool("E2EOrchestrator", "RPC") + + +context_client: ContextClient = ContextClient() +service_client: ServiceClient = ServiceClient() + +EXT_HOST = str(get_setting('WS_IP_HOST')) +EXT_PORT = int(get_setting('WS_IP_PORT')) +EXT_URL = 'ws://{:s}:{:d}'.format(EXT_HOST, EXT_PORT) + +OWN_HOST = str(get_setting('WS_E2E_HOST')) +OWN_PORT = int(get_setting('WS_E2E_PORT')) + +ALL_HOSTS = '0.0.0.0' + +class SubscriptionServer(threading.Thread): + def run(self): + request = VNTSubscriptionRequest() + request.host = OWN_HOST + request.port = OWN_PORT + try: + LOGGER.debug('Trying to connect to {:s}'.format(EXT_URL)) + websocket = connect(EXT_URL) + except: # pylint: disable=bare-except + LOGGER.exception('Error connecting to {:s}'.format(EXT_URL)) + else: + with websocket: + LOGGER.debug('Connected to {:s}'.format(EXT_URL)) + send = grpc_message_to_json_string(request) + websocket.send(send) + LOGGER.debug('Sent: {:s}'.format(send)) + try: + message = websocket.recv() + LOGGER.debug('Received message from WebSocket: {:s}'.format(message)) + except Exception as ex: + LOGGER.error('Exception receiving from WebSocket: {:s}'.format(ex)) + self._events_server() + + + def _events_server(self): + try: + server = serve(self._event_received, ALL_HOSTS, int(OWN_PORT)) + except: # pylint: disable=bare-except + LOGGER.exception('Error starting server on {:s}:{:d}'.format(ALL_HOSTS, OWN_PORT)) + else: + with server: + LOGGER.info('Running events server...: {:s}:{:d}'.format(ALL_HOSTS, OWN_PORT)) + server.serve_forever() + + + def _event_received(self, connection): + LOGGER.debug('Event received') + for message in connection: + message_json = json.loads(message) + + # Link creation + if 'link_id' in message_json: + LOGGER.debug('Link creation') + link = Link(**message_json) + + service = Service() + service.service_id.service_uuid.uuid = link.link_id.link_uuid.uuid + service.service_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + service.service_type = ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY + service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED + service_client.CreateService(service) + + a_device_uuid = device_get_uuid(link.link_endpoint_ids[0].device_id) + a_endpoint_uuid = endpoint_get_uuid(link.link_endpoint_ids[0])[2] + z_device_uuid = device_get_uuid(link.link_endpoint_ids[1].device_id) + z_endpoint_uuid = endpoint_get_uuid(link.link_endpoint_ids[1])[2] + + links = context_client.ListLinks(Empty()).links + for _link in links: + for _endpoint_id in _link.link_endpoint_ids: + if _endpoint_id.device_id.device_uuid.uuid == a_device_uuid and \ + _endpoint_id.endpoint_uuid.uuid == a_endpoint_uuid: + a_ep_id = _endpoint_id + elif _endpoint_id.device_id.device_uuid.uuid == z_device_uuid and \ + _endpoint_id.endpoint_uuid.uuid == z_endpoint_uuid: + z_ep_id = _endpoint_id + + if (not 'a_ep_id' in locals()) or (not 'z_ep_id' in locals()): + error_msg = f'Could not get VNT link endpoints\ + \n\ta_endpoint_uuid= {a_endpoint_uuid}\ + \n\tz_endpoint_uuid= {z_device_uuid}' + LOGGER.error(error_msg) + connection.send(error_msg) + return + + service.service_endpoint_ids.append(copy.deepcopy(a_ep_id)) + service.service_endpoint_ids.append(copy.deepcopy(z_ep_id)) + + service_client.UpdateService(service) + re_svc = context_client.GetService(service.service_id) + connection.send(grpc_message_to_json_string(link)) + context_client.SetLink(link) + elif 'link_uuid' in message_json: + LOGGER.debug('Link removal') + link_id = LinkId(**message_json) + + service_id = ServiceId() + service_id.service_uuid.uuid = link_id.link_uuid.uuid + service_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + service_client.DeleteService(service_id) + connection.send(grpc_message_to_json_string(link_id)) + context_client.RemoveLink(link_id) + else: + LOGGER.debug('Topology received') + topology_details = TopologyDetails(**message_json) + + context = Context() + context.context_id.context_uuid.uuid = topology_details.topology_id.context_id.context_uuid.uuid + context_client.SetContext(context) + + topology = Topology() + topology.topology_id.context_id.CopyFrom(context.context_id) + topology.topology_id.topology_uuid.uuid = topology_details.topology_id.topology_uuid.uuid + context_client.SetTopology(topology) + + for device in topology_details.devices: + context_client.SetDevice(device) + + for link in topology_details.links: + context_client.SetLink(link) + + + +class E2EOrchestratorServiceServicerImpl(E2EOrchestratorServiceServicer): + def __init__(self): + LOGGER.debug('Creating Servicer...') + try: + LOGGER.debug('Requesting subscription') + sub_server = SubscriptionServer() + sub_server.start() + LOGGER.debug('Servicer Created') + self.retrieve_external_topologies() + except: + LOGGER.exception('Unhandled Exception') + + def retrieve_external_topologies(self): + i = 1 + while True: + try: + ADD = str(get_setting(f'EXT_CONTROLLER{i}_ADD')) + PORT = int(get_setting(f'EXT_CONTROLLER{i}_PORT')) + except: # pylint: disable=bare-except + break + + try: + LOGGER.info('Retrieving external controller #{:d}'.format(i)) + url = 'http://{:s}:{:d}/tfs-api/context/{:s}/topology_details/{:s}'.format( + ADD, PORT, DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME + ) + LOGGER.info('url={:s}'.format(str(url))) + topo = requests.get(url).json() + LOGGER.info('Retrieved external controller #{:d}'.format(i)) + except: # pylint: disable=bare-except + LOGGER.exception('Exception retrieven topology from external controler #{:d}'.format(i)) + + topology_details = TopologyDetails(**topo) + context = Context() + context.context_id.context_uuid.uuid = topology_details.topology_id.context_id.context_uuid.uuid + context_client.SetContext(context) + + topology = Topology() + topology.topology_id.context_id.CopyFrom(context.context_id) + topology.topology_id.topology_uuid.uuid = topology_details.topology_id.topology_uuid.uuid + context_client.SetTopology(topology) + + for device in topology_details.devices: + context_client.SetDevice(device) + + for link in topology_details.links: + context_client.SetLink(link) + + i+=1 + + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def Compute(self, request: E2EOrchestratorRequest, context: grpc.ServicerContext) -> E2EOrchestratorReply: + endpoints_ids = [] + for endpoint_id in request.service.service_endpoint_ids: + endpoints_ids.append(endpoint_get_uuid(endpoint_id)[2]) + + graph = networkx.Graph() + + devices = context_client.ListDevices(Empty()).devices + + for device in devices: + endpoints_uuids = [endpoint.endpoint_id.endpoint_uuid.uuid + for endpoint in device.device_endpoints] + for ep in endpoints_uuids: + graph.add_node(ep) + + for ep in endpoints_uuids: + for ep_i in endpoints_uuids: + if ep == ep_i: + continue + graph.add_edge(ep, ep_i) + + links = context_client.ListLinks(Empty()).links + for link in links: + eps = [] + for endpoint_id in link.link_endpoint_ids: + eps.append(endpoint_id.endpoint_uuid.uuid) + graph.add_edge(eps[0], eps[1]) + + + shortest = networkx.shortest_path(graph, endpoints_ids[0], endpoints_ids[1]) + + path = E2EOrchestratorReply() + path.services.append(copy.deepcopy(request.service)) + for i in range(0, int(len(shortest)/2)): + conn = Connection() + ep_a_uuid = str(shortest[i*2]) + ep_z_uuid = str(shortest[i*2+1]) + + conn.connection_id.connection_uuid.uuid = str(ep_a_uuid) + '_->_' + str(ep_z_uuid) + + ep_a_id = EndPointId() + ep_a_id.endpoint_uuid.uuid = ep_a_uuid + conn.path_hops_endpoint_ids.append(ep_a_id) + + ep_z_id = EndPointId() + ep_z_id.endpoint_uuid.uuid = ep_z_uuid + conn.path_hops_endpoint_ids.append(ep_z_id) + + path.connections.append(conn) + + return path diff --git a/src/e2e_orchestrator/service/subscriptions/ControllerDiscovererThread.py b/src/e2e_orchestrator/service/subscriptions/ControllerDiscovererThread.py new file mode 100644 index 000000000..e12917f7d --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/ControllerDiscovererThread.py @@ -0,0 +1,100 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, queue, threading +from typing import Any, Optional +from common.proto.context_pb2 import DeviceEvent, Empty +from common.tools.grpc.BaseEventCollector import BaseEventCollector +from common.tools.grpc.BaseEventDispatcher import BaseEventDispatcher +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient +from .Subscriptions import Subscriptions +from .TFSControllerSettings import get_tfs_controller_settings + + +LOGGER = logging.getLogger(__name__) + + +class EventDispatcher(BaseEventDispatcher): + def __init__( + self, events_queue : queue.PriorityQueue, + context_client : ContextClient, + subscriptions : Subscriptions, + terminate : Optional[threading.Event] = None + ) -> None: + super().__init__(events_queue, terminate) + self._context_client = context_client + self._subscriptions = subscriptions + + def dispatch_device_create(self, device_event : DeviceEvent) -> None: + MSG = 'Processing Device Create: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(device_event))) + tfs_ctrl_settings = get_tfs_controller_settings( + self._context_client, device_event + ) + if tfs_ctrl_settings is None: return + self._subscriptions.add_subscription(tfs_ctrl_settings) + + def dispatch_device_update(self, device_event : DeviceEvent) -> None: + MSG = 'Processing Device Update: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(device_event))) + tfs_ctrl_settings = get_tfs_controller_settings( + self._context_client, device_event + ) + if tfs_ctrl_settings is None: return + self._subscriptions.add_subscription(tfs_ctrl_settings) + + def dispatch_device_remove(self, device_event : DeviceEvent) -> None: + MSG = 'Processing Device Remove: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(device_event))) + device_uuid = device_event.device_id.device_uuid.uuid + self._subscriptions.remove_subscription(device_uuid) + + def dispatch(self, event : Any) -> None: + MSG = 'Unexpected Event: {:s}' + LOGGER.warning(MSG.format(grpc_message_to_json_string(event))) + +class ControllerDiscoverer: + def __init__( + self, terminate : Optional[threading.Event] = None + ) -> None: + self._context_client = ContextClient() + + self._event_collector = BaseEventCollector( + terminate=terminate + ) + self._event_collector.install_collector( + self._context_client.GetDeviceEvents, + Empty(), log_events_received=True + ) + + self._subscriptions = Subscriptions() + + self._event_dispatcher = EventDispatcher( + self._event_collector.get_events_queue(), + self._context_client, + self._subscriptions, + terminate=terminate + ) + + def start(self) -> None: + self._context_client.connect() + self._event_dispatcher.start() + self._event_collector.start() + + def stop(self): + self._event_collector.stop() + self._event_dispatcher.stop() + self._context_client.close() diff --git a/src/e2e_orchestrator/service/subscriptions/RecommendationsClientNamespace.py b/src/e2e_orchestrator/service/subscriptions/RecommendationsClientNamespace.py new file mode 100644 index 000000000..590524eea --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/RecommendationsClientNamespace.py @@ -0,0 +1,40 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, queue, socketio + +LOGGER = logging.getLogger(__name__) + +class RecommendationsClientNamespace(socketio.ClientNamespace): + def __init__(self, request_queue : queue.Queue, reply_queue : queue.Queue): + self._request_queue = request_queue + self._reply_queue = reply_queue + super().__init__(namespace='/recommendations') + + def on_connect(self): + LOGGER.info('[on_connect] Connected') + + def on_disconnect(self, reason): + MSG = '[on_disconnect] Disconnected!, reason: {:s}' + LOGGER.info(MSG.format(str(reason))) + + def on_recommendation(self, data): + MSG = '[on_recommendation] data={:s}' + LOGGER.info(MSG.format(str(data))) + + #MSG = '[on_recommendation] Recommendation: {:s}' + #LOGGER.info(MSG.format(str(recommendation))) + + #request = (self._device_uuid, *sample) + #self._request_queue.put_nowait(request) diff --git a/src/e2e_orchestrator/service/subscriptions/Subscription.py b/src/e2e_orchestrator/service/subscriptions/Subscription.py new file mode 100644 index 000000000..8e1866bac --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/Subscription.py @@ -0,0 +1,71 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 queue, socketio, threading +from common.Constants import ServiceNameEnum +from common.Settings import get_service_baseurl_http +from .RecommendationsClientNamespace import RecommendationsClientNamespace +from .TFSControllerSettings import TFSControllerSettings + + +NBI_SERVICE_PREFIX_URL = get_service_baseurl_http(ServiceNameEnum.NBI) or '' +CHILD_SOCKETIO_URL = 'http://{:s}:{:s}@{:s}:{:d}{:s}' + + +class Subscription(threading.Thread): + def __init__( + self, tfs_ctrl_settings : TFSControllerSettings, + terminate : threading.Event + ) -> None: + super().__init__(daemon=True) + self._settings = tfs_ctrl_settings + self._terminate = terminate + self._request_queue = queue.Queue() + self._reply_queue = queue.Queue() + self._is_running = threading.Event() + + @property + def is_running(self): return self._is_running.is_set() + + @property + def request_queue(self): return self._request_queue + + @property + def reply_queue(self): return self._reply_queue + + def run(self) -> None: + child_socketio_url = CHILD_SOCKETIO_URL.format( + self._settings.nbi_username, + self._settings.nbi_password, + self._settings.nbi_address, + self._settings.nbi_port, + NBI_SERVICE_PREFIX_URL + ) + + namespace = RecommendationsClientNamespace( + self._request_queue, self._reply_queue + ) + + sio = socketio.Client(logger=True, engineio_logger=True) + sio.register_namespace(namespace) + sio.connect(child_socketio_url) + + while not self._terminate.is_set(): + sio.sleep(seconds=0.5) + + sio.shutdown() + + def stop(self): + self._terminate.set() diff --git a/src/e2e_orchestrator/service/subscriptions/Subscriptions.py b/src/e2e_orchestrator/service/subscriptions/Subscriptions.py new file mode 100644 index 000000000..f4676ff8d --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/Subscriptions.py @@ -0,0 +1,47 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, queue, threading +from typing import Dict +from .Subscription import Subscription +from .TFSControllerSettings import TFSControllerSettings + +LOGGER = logging.getLogger(__name__) + +class Subscriptions: + def __init__(self) -> None: + self._terminate = threading.Event() + self._lock = threading.Lock() + self._subscriptions : Dict[str, Subscription] = dict() + + def add_subscription(self, tfs_ctrl_settings : TFSControllerSettings) -> None: + device_uuid = tfs_ctrl_settings.device_uuid + with self._lock: + subscription = self._subscriptions.get(device_uuid) + if (subscription is not None) and subscription.is_running: return + subscription = Subscription(tfs_ctrl_settings, self._terminate) + self._subscriptions[device_uuid] = subscription + subscription.start() + + def remove_subscription(self, device_uuid : str) -> None: + with self._lock: + subscription = self._subscriptions.get(device_uuid) + if subscription is None: return + if subscription.is_running: subscription.stop() + self._subscriptions.pop(device_uuid, None) + + def stop(self): + self._terminate.set() + for device_uuid in self._subscriptions: + self.remove_subscription(device_uuid) diff --git a/src/e2e_orchestrator/service/subscriptions/TFSControllerSettings.py b/src/e2e_orchestrator/service/subscriptions/TFSControllerSettings.py new file mode 100644 index 000000000..00613e3d4 --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/TFSControllerSettings.py @@ -0,0 +1,72 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 dataclasses import dataclass +from typing import Optional +from common.DeviceTypes import DeviceTypeEnum +from common.proto.context_pb2 import ConfigActionEnum, DeviceEvent +from common.tools.context_queries.Device import get_device +from context.client.ContextClient import ContextClient + + +@dataclass +class TFSControllerSettings: + device_uuid : str + device_type : DeviceTypeEnum + nbi_address : str + nbi_port : int + nbi_username : str + nbi_password : str + + +SELECTED_DEVICE_TYPES = { + DeviceTypeEnum.TERAFLOWSDN_CONTROLLER.value +} + + +def get_tfs_controller_settings( + context_client : ContextClient, device_event : DeviceEvent +) -> Optional[TFSControllerSettings]: + device_uuid = device_event.device_id.device_uuid.uuid + device = get_device( + context_client, device_uuid, rw_copy=False, + include_endpoints=False, include_config_rules=True, + include_components=False + ) + device_type = device.device_type + if device_type not in SELECTED_DEVICE_TYPES: return None + + connect_rules = dict() + for config_rule in device.device_config.config_rules: + if config_rule.action != ConfigActionEnum.CONFIGACTION_SET: continue + if config_rule.WhichOneof('config_rule') != 'custom': continue + if not config_rule.custom.resource_key.startswith('_connect/'): continue + connect_attribute = config_rule.custom.resource_key.replace('_connect/', '') + if connect_attribute == 'settings': + settings = json.loads(config_rule.custom.resource_value) + for field in ['username', 'password']: + connect_rules[field] = settings[field] + else: + connect_rules[connect_attribute] = config_rule.custom.resource_value + + return TFSControllerSettings( + device_uuid = device_uuid, + device_type = device_type, + nbi_address = str(connect_rules['address' ]), + nbi_port = int(connect_rules['port' ]), + nbi_username = str(connect_rules['username']), + nbi_password = str(connect_rules['password']), + ) diff --git a/src/e2e_orchestrator/service/subscriptions/__init__.py b/src/e2e_orchestrator/service/subscriptions/__init__.py new file mode 100644 index 000000000..023830645 --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. -- GitLab From fc57c66d96a180db9bc06c193141fc6c33d6edcf Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sun, 16 Mar 2025 12:29:27 +0000 Subject: [PATCH 316/463] E2E Orchestrator component: - Added requirement websocket-client to enable upgrade to websocket in socketio --- src/e2e_orchestrator/requirements.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/e2e_orchestrator/requirements.in b/src/e2e_orchestrator/requirements.in index 2b34cad18..c9286e2e1 100644 --- a/src/e2e_orchestrator/requirements.in +++ b/src/e2e_orchestrator/requirements.in @@ -15,4 +15,4 @@ networkx==3.2.1 python-socketio==5.12.1 requests==2.27.* -#websockets==12.0 +websocket-client==1.8.0 # used by socketio to upgrate to websocket -- GitLab From 312f70364b9298636fd6f34e1405c08abc5fcb2a Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sun, 16 Mar 2025 12:31:56 +0000 Subject: [PATCH 317/463] NBI component: - Removed old and unused context subscription module - Grouped log-level adaptations in app - Configured KafkaManager to enable SocketIO Servers in different gunicorn workers to self-coordinate --- src/nbi/service/NbiApplication.py | 8 ++- src/nbi/service/app.py | 11 ++++ .../service/context_subscription/__init__.py | 64 ------------------- .../service/vntm_recommend/VntRecommThread.py | 9 --- 4 files changed, 17 insertions(+), 75 deletions(-) delete mode 100644 src/nbi/service/context_subscription/__init__.py diff --git a/src/nbi/service/NbiApplication.py b/src/nbi/service/NbiApplication.py index 2216177ff..0ee7c58ef 100644 --- a/src/nbi/service/NbiApplication.py +++ b/src/nbi/service/NbiApplication.py @@ -18,6 +18,7 @@ from typing import Any, List, Optional, Tuple from flask import Flask, request from flask_restful import Api, Resource from flask_socketio import Namespace, SocketIO +from common.tools.kafka.Variables import KafkaConfig, KafkaTopic from nbi.Config import SECRET_KEY @@ -40,10 +41,13 @@ class NbiApplication: self._app.config['SECRET_KEY'] = SECRET_KEY self._app.after_request(log_request) self._api = Api(self._app, prefix=base_url) - #socketio_path = '/'.join([base_url.rstrip('/'), 'socket.io']) + self._sio_client_manager = socketio.KafkaManager( + url='kafka://{:s}'.format(KafkaConfig.get_kafka_address()), + channel=KafkaTopic.NBI_SOCKETIO_WORKERS.value + ) self._sio = SocketIO( self._app, cors_allowed_origins='*', async_mode='eventlet', - #path=socketio_path, + client_manager=self._sio_client_manager, logger=True, engineio_logger=True ) diff --git a/src/nbi/service/app.py b/src/nbi/service/app.py index a0206cdd6..99f66a94c 100644 --- a/src/nbi/service/app.py +++ b/src/nbi/service/app.py @@ -50,6 +50,17 @@ logging.basicConfig( level=LOG_LEVEL, format="[Worker-%(process)d][%(asctime)s] %(levelname)s:%(name)s:%(message)s", ) +logging.getLogger('kafka.client').setLevel(logging.WARNING) +logging.getLogger('kafka.cluster').setLevel(logging.WARNING) +logging.getLogger('kafka.conn').setLevel(logging.WARNING) +logging.getLogger('kafka.consumer.fetcher').setLevel(logging.WARNING) +logging.getLogger('kafka.consumer.group').setLevel(logging.WARNING) +logging.getLogger('kafka.consumer.subscription_state').setLevel(logging.WARNING) +logging.getLogger('kafka.metrics.metrics').setLevel(logging.WARNING) +logging.getLogger('kafka.producer.kafka').setLevel(logging.WARNING) +logging.getLogger('kafka.producer.record_accumulator').setLevel(logging.WARNING) +logging.getLogger('kafka.producer.sender').setLevel(logging.WARNING) +logging.getLogger('kafka.protocol.parser').setLevel(logging.WARNING) logging.getLogger('socketio.server').setLevel(logging.WARNING) LOGGER = logging.getLogger(__name__) diff --git a/src/nbi/service/context_subscription/__init__.py b/src/nbi/service/context_subscription/__init__.py deleted file mode 100644 index 1e88a3cd1..000000000 --- a/src/nbi/service/context_subscription/__init__.py +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 websockets.sync.server import serve -from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest -from common.Settings import get_setting -from context.client.ContextClient import ContextClient -from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME -from common.tools.object_factory.Topology import json_topology_id -from common.tools.object_factory.Context import json_context_id -from common.proto.context_pb2 import ContextId, TopologyId -import json -import os -from vnt_manager.client.VNTManagerClient import VNTManagerClient - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) -ADMIN_TOPOLOGY_ID = TopologyId(**json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id=JSON_ADMIN_CONTEXT_ID)) - -vnt_manager_client: VNTManagerClient = VNTManagerClient() -context_client: ContextClient = ContextClient() - -ALL_HOSTS = "0.0.0.0" -WS_IP_PORT = int(get_setting('WS_IP_PORT', default='8761')) - -LOGGER = logging.getLogger(__name__) - - -def register_context_subscription(): - with serve(subcript_to_vnt_manager, ALL_HOSTS, WS_IP_PORT, logger=LOGGER) as server: - LOGGER.info("Running subscription server...: {}:{}".format(ALL_HOSTS, str(WS_IP_PORT))) - server.serve_forever() - LOGGER.info("Exiting subscription server...") - - -def subcript_to_vnt_manager(websocket): - for message in websocket: - LOGGER.debug("Message received: {}".format(message)) - message_json = json.loads(message) - request = VNTSubscriptionRequest() - request.host = message_json['host'] - request.port = message_json['port'] - LOGGER.debug("Received gRPC from ws: {}".format(request)) - - try: - vntm_reply = vnt_manager_client.VNTSubscript(request) - LOGGER.debug("Received gRPC from vntm: {}".format(vntm_reply)) - except Exception as e: - LOGGER.error('Could not subscript to VTNManager: {}'.format(e)) - - websocket.send(vntm_reply.subscription) diff --git a/src/nbi/service/vntm_recommend/VntRecommThread.py b/src/nbi/service/vntm_recommend/VntRecommThread.py index bd9a452f3..f3d74e5ac 100644 --- a/src/nbi/service/vntm_recommend/VntRecommThread.py +++ b/src/nbi/service/vntm_recommend/VntRecommThread.py @@ -19,15 +19,6 @@ from kafka import KafkaConsumer, TopicPartition from kafka.consumer.fetcher import ConsumerRecord from .Constants import SIO_NAMESPACE, SIO_ROOM -logging.getLogger('kafka.client').setLevel(logging.WARNING) -logging.getLogger('kafka.cluster').setLevel(logging.WARNING) -logging.getLogger('kafka.conn').setLevel(logging.WARNING) -logging.getLogger('kafka.consumer.fetcher').setLevel(logging.WARNING) -logging.getLogger('kafka.consumer.group').setLevel(logging.WARNING) -logging.getLogger('kafka.consumer.subscription_state').setLevel(logging.WARNING) -logging.getLogger('kafka.metrics.metrics').setLevel(logging.WARNING) -logging.getLogger('kafka.protocol.parser').setLevel(logging.WARNING) - LOGGER = logging.getLogger(__name__) class VntRecommThread(threading.Thread): -- GitLab From ffd0c1501f56b84272d5ac69ea0dc795d9d8b13f Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sun, 16 Mar 2025 12:32:34 +0000 Subject: [PATCH 318/463] Common - Kafka tools: - Added NBI_SOCKETIO_WORKERS channel --- src/common/tools/kafka/Variables.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/common/tools/kafka/Variables.py b/src/common/tools/kafka/Variables.py index 159d7dac1..432291c6a 100644 --- a/src/common/tools/kafka/Variables.py +++ b/src/common/tools/kafka/Variables.py @@ -47,16 +47,17 @@ class KafkaConfig(Enum): class KafkaTopic(Enum): # TODO: Later to be populated from ENV variable. - TELEMETRY_REQUEST = 'topic_telemetry_request' - TELEMETRY_RESPONSE = 'topic_telemetry_response' - RAW = 'topic_raw' - LABELED = 'topic_labeled' - VALUE = 'topic_value' - ALARMS = 'topic_alarms' - ANALYTICS_REQUEST = 'topic_analytics_request' - ANALYTICS_RESPONSE = 'topic_analytics_response' - VNTMANAGER_REQUEST = 'topic_vntmanager_request' - VNTMANAGER_RESPONSE = 'topic_vntmanager_response' + TELEMETRY_REQUEST = 'topic_telemetry_request' + TELEMETRY_RESPONSE = 'topic_telemetry_response' + RAW = 'topic_raw' + LABELED = 'topic_labeled' + VALUE = 'topic_value' + ALARMS = 'topic_alarms' + ANALYTICS_REQUEST = 'topic_analytics_request' + ANALYTICS_RESPONSE = 'topic_analytics_response' + VNTMANAGER_REQUEST = 'topic_vntmanager_request' + VNTMANAGER_RESPONSE = 'topic_vntmanager_response' + NBI_SOCKETIO_WORKERS = 'tfs-nbi-socketio' @staticmethod def create_all_topics() -> bool: -- GitLab From 33c7b42855e3b32a0054a29a716d33ce12c50336 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sun, 16 Mar 2025 12:32:53 +0000 Subject: [PATCH 319/463] NBI component: - Added missing comment --- src/nbi/service/NbiApplication.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nbi/service/NbiApplication.py b/src/nbi/service/NbiApplication.py index 0ee7c58ef..dee09462c 100644 --- a/src/nbi/service/NbiApplication.py +++ b/src/nbi/service/NbiApplication.py @@ -41,6 +41,9 @@ class NbiApplication: self._app.config['SECRET_KEY'] = SECRET_KEY self._app.after_request(log_request) self._api = Api(self._app, prefix=base_url) + + # Configure KafkaManager to enable SocketIO Servers running in different + # gunicorn workers to self-coordinate and share sessions. self._sio_client_manager = socketio.KafkaManager( url='kafka://{:s}'.format(KafkaConfig.get_kafka_address()), channel=KafkaTopic.NBI_SOCKETIO_WORKERS.value -- GitLab From bfc67573ae24091bd68f0ed2cd1b090a778baf6d Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sun, 16 Mar 2025 12:34:27 +0000 Subject: [PATCH 320/463] Manifests: - Updated NGINX Ingress Controller to support sticky socket.io sessions towards NBI --- manifests/nginx_ingress_http.yaml | 35 +++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/manifests/nginx_ingress_http.yaml b/manifests/nginx_ingress_http.yaml index 5b77ed052..3143a8198 100644 --- a/manifests/nginx_ingress_http.yaml +++ b/manifests/nginx_ingress_http.yaml @@ -17,12 +17,28 @@ kind: Ingress metadata: name: tfs-ingress annotations: - nginx.ingress.kubernetes.io/rewrite-target: /$2 - nginx.ingress.kubernetes.io/limit-rps: "50" - nginx.ingress.kubernetes.io/limit-connections: "50" - nginx.ingress.kubernetes.io/proxy-connect-timeout: "50" - nginx.ingress.kubernetes.io/proxy-send-timeout: "50" - nginx.ingress.kubernetes.io/proxy-read-timeout: "50" + nginx.ingress.kubernetes.io/rewrite-target: "/$2" + + # Enable websocket services and configure sticky cookies (seems not to work) + #nginx.org/websocket-services: "nbiservice" + #nginx.org/sticky-cookie-services: "serviceName=nbiservice tfs-nbi-session expires=1h path=/socket.io" + + # Enable sticky sessions (use same backend for all connections + # originated by a specific client, identified through its cookie) + nginx.ingress.kubernetes.io/affinity: "cookie" + nginx.ingress.kubernetes.io/affinity-mode: "persistent" + nginx.ingress.kubernetes.io/session-cookie-name: "tfs-nbi-session" + nginx.ingress.kubernetes.io/session-cookie-path: "/socket.io" + nginx.ingress.kubernetes.io/session-cookie-expires: "3600" + nginx.ingress.kubernetes.io/session-cookie-change-on-failure: "true" + + nginx.ingress.kubernetes.io/limit-rps: "50" # max requests per second per source IP + nginx.ingress.kubernetes.io/limit-connections: "50" # max concurrent connections per source IP + nginx.ingress.kubernetes.io/proxy-connect-timeout: "60" # max timeout for connecting to server + + # Enable long-lived connections, required for websocket/socket.io streams + nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" # max timeout between two successive read operations + nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" # max timeout between two successive write operations spec: rules: - http: @@ -48,6 +64,13 @@ spec: name: nbiservice port: number: 8080 + - path: /()(socket.io/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 - path: /()(tfs-api/.*) pathType: Prefix backend: -- GitLab From 948d63c32a98ab431eddc7dd542edae2425b4341 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sun, 16 Mar 2025 12:35:08 +0000 Subject: [PATCH 321/463] OFC25 tests: - Updated E2E topology descriptor - Updated NGINX ingress controllers to support sticky sessions for SocketIO towards NBI --- src/tests/ofc25/descriptors/topology_e2e.json | 48 +++++++++---------- src/tests/ofc25/tfs-ingress-e2e.yaml | 30 +++++++++++- src/tests/ofc25/tfs-ingress-ip.yaml | 30 +++++++++++- src/tests/ofc25/tfs-ingress-opt.yaml | 30 +++++++++++- 4 files changed, 111 insertions(+), 27 deletions(-) diff --git a/src/tests/ofc25/descriptors/topology_e2e.json b/src/tests/ofc25/descriptors/topology_e2e.json index 8c3c1fd40..16a4ead24 100644 --- a/src/tests/ofc25/descriptors/topology_e2e.json +++ b/src/tests/ofc25/descriptors/topology_e2e.json @@ -30,56 +30,56 @@ } ], "links": [ - {"link_id": {"link_uuid": {"uuid": "CSGW1-TP1.1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "CSGW1"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"link_id": {"link_uuid": {"uuid": "IP1-TP1.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, {"device_id": {"device_uuid": {"uuid": "TP1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} ]}, - {"link_id": {"link_uuid": {"uuid": "CSGW1-TP1.2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "CSGW1"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"link_id": {"link_uuid": {"uuid": "IP1-TP1.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, {"device_id": {"device_uuid": {"uuid": "TP1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} ]}, - {"link_id": {"link_uuid": {"uuid": "CSGW1-TP1.3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "CSGW1"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"link_id": {"link_uuid": {"uuid": "IP1-TP1.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, {"device_id": {"device_uuid": {"uuid": "TP1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} ]}, - {"link_id": {"link_uuid": {"uuid": "CSGW2-TP2.1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "CSGW2"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"link_id": {"link_uuid": {"uuid": "IP2-TP2.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, {"device_id": {"device_uuid": {"uuid": "TP2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} ]}, - {"link_id": {"link_uuid": {"uuid": "CSGW2-TP2.2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "CSGW2"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"link_id": {"link_uuid": {"uuid": "IP2-TP2.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, {"device_id": {"device_uuid": {"uuid": "TP2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} ]}, - {"link_id": {"link_uuid": {"uuid": "CSGW2-TP2.3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "CSGW2"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"link_id": {"link_uuid": {"uuid": "IP2-TP2.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, {"device_id": {"device_uuid": {"uuid": "TP2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} ]}, - {"link_id": {"link_uuid": {"uuid": "TP1.1-CSGW1"}}, "link_endpoint_ids": [ + {"link_id": {"link_uuid": {"uuid": "TP1.1-IP1"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "TP1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, - {"device_id": {"device_uuid": {"uuid": "CSGW1"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}} ]}, - {"link_id": {"link_uuid": {"uuid": "TP1.2-CSGW1"}}, "link_endpoint_ids": [ + {"link_id": {"link_uuid": {"uuid": "TP1.2-IP1"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "TP1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, - {"device_id": {"device_uuid": {"uuid": "CSGW1"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}} ]}, - {"link_id": {"link_uuid": {"uuid": "TP1.3-CSGW1"}}, "link_endpoint_ids": [ + {"link_id": {"link_uuid": {"uuid": "TP1.3-IP1"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "TP1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, - {"device_id": {"device_uuid": {"uuid": "CSGW1"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}} ]}, - {"link_id": {"link_uuid": {"uuid": "TP2.1-CSGW2"}}, "link_endpoint_ids": [ + {"link_id": {"link_uuid": {"uuid": "TP2.1-IP2"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "TP2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, - {"device_id": {"device_uuid": {"uuid": "CSGW2"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}} ]}, - {"link_id": {"link_uuid": {"uuid": "TP2.2-CSGW2"}}, "link_endpoint_ids": [ + {"link_id": {"link_uuid": {"uuid": "TP2.2-IP2"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "TP2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, - {"device_id": {"device_uuid": {"uuid": "CSGW2"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}} ]}, - {"link_id": {"link_uuid": {"uuid": "TP2.3-CSGW2"}}, "link_endpoint_ids": [ + {"link_id": {"link_uuid": {"uuid": "TP2.3-IP2"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "TP2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, - {"device_id": {"device_uuid": {"uuid": "CSGW2"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}} ]} ] } diff --git a/src/tests/ofc25/tfs-ingress-e2e.yaml b/src/tests/ofc25/tfs-ingress-e2e.yaml index c75a22cb3..c2f4a5a60 100644 --- a/src/tests/ofc25/tfs-ingress-e2e.yaml +++ b/src/tests/ofc25/tfs-ingress-e2e.yaml @@ -17,7 +17,28 @@ kind: Ingress metadata: name: tfs-ingress-e2e annotations: - nginx.ingress.kubernetes.io/rewrite-target: /$2 + nginx.ingress.kubernetes.io/rewrite-target: "/$2" + + # Enable websocket services and configure sticky cookies (seems not to work) + #nginx.org/websocket-services: "nbiservice" + #nginx.org/sticky-cookie-services: "serviceName=nbiservice tfs-nbi-session expires=1h path=/socket.io" + + # Enable sticky sessions (use same backend for all connections + # originated by a specific client, identified through its cookie) + nginx.ingress.kubernetes.io/affinity: "cookie" + nginx.ingress.kubernetes.io/affinity-mode: "persistent" + nginx.ingress.kubernetes.io/session-cookie-name: "tfs-nbi-session" + nginx.ingress.kubernetes.io/session-cookie-path: "/socket.io" + nginx.ingress.kubernetes.io/session-cookie-expires: "3600" + nginx.ingress.kubernetes.io/session-cookie-change-on-failure: "true" + + nginx.ingress.kubernetes.io/limit-rps: "50" # max requests per second per source IP + nginx.ingress.kubernetes.io/limit-connections: "50" # max concurrent connections per source IP + nginx.ingress.kubernetes.io/proxy-connect-timeout: "60" # max timeout for connecting to server + + # Enable long-lived connections, required for websocket/socket.io streams + nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" # max timeout between two successive read operations + nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" # max timeout between two successive write operations spec: ingressClassName: tfs-ingress-class-e2e rules: @@ -44,6 +65,13 @@ spec: name: nbiservice port: number: 8080 + - path: /()(socket.io/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 - path: /()(tfs-api/.*) pathType: Prefix backend: diff --git a/src/tests/ofc25/tfs-ingress-ip.yaml b/src/tests/ofc25/tfs-ingress-ip.yaml index aefcfcffe..43bc52b4a 100644 --- a/src/tests/ofc25/tfs-ingress-ip.yaml +++ b/src/tests/ofc25/tfs-ingress-ip.yaml @@ -17,7 +17,28 @@ kind: Ingress metadata: name: tfs-ingress-ip annotations: - nginx.ingress.kubernetes.io/rewrite-target: /$2 + nginx.ingress.kubernetes.io/rewrite-target: "/$2" + + # Enable websocket services and configure sticky cookies (seems not to work) + #nginx.org/websocket-services: "nbiservice" + #nginx.org/sticky-cookie-services: "serviceName=nbiservice tfs-nbi-session expires=1h path=/socket.io" + + # Enable sticky sessions (use same backend for all connections + # originated by a specific client, identified through its cookie) + nginx.ingress.kubernetes.io/affinity: "cookie" + nginx.ingress.kubernetes.io/affinity-mode: "persistent" + nginx.ingress.kubernetes.io/session-cookie-name: "tfs-nbi-session" + nginx.ingress.kubernetes.io/session-cookie-path: "/socket.io" + nginx.ingress.kubernetes.io/session-cookie-expires: "3600" + nginx.ingress.kubernetes.io/session-cookie-change-on-failure: "true" + + nginx.ingress.kubernetes.io/limit-rps: "50" # max requests per second per source IP + nginx.ingress.kubernetes.io/limit-connections: "50" # max concurrent connections per source IP + nginx.ingress.kubernetes.io/proxy-connect-timeout: "60" # max timeout for connecting to server + + # Enable long-lived connections, required for websocket/socket.io streams + nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" # max timeout between two successive read operations + nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" # max timeout between two successive write operations spec: ingressClassName: tfs-ingress-class-ip rules: @@ -44,6 +65,13 @@ spec: name: nbiservice port: number: 8080 + - path: /()(socket.io/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 - path: /()(tfs-api/.*) pathType: Prefix backend: diff --git a/src/tests/ofc25/tfs-ingress-opt.yaml b/src/tests/ofc25/tfs-ingress-opt.yaml index 57e1f9141..87fc29de5 100644 --- a/src/tests/ofc25/tfs-ingress-opt.yaml +++ b/src/tests/ofc25/tfs-ingress-opt.yaml @@ -17,7 +17,28 @@ kind: Ingress metadata: name: tfs-ingress-opt annotations: - nginx.ingress.kubernetes.io/rewrite-target: /$2 + nginx.ingress.kubernetes.io/rewrite-target: "/$2" + + # Enable websocket services and configure sticky cookies (seems not to work) + #nginx.org/websocket-services: "nbiservice" + #nginx.org/sticky-cookie-services: "serviceName=nbiservice tfs-nbi-session expires=1h path=/socket.io" + + # Enable sticky sessions (use same backend for all connections + # originated by a specific client, identified through its cookie) + nginx.ingress.kubernetes.io/affinity: "cookie" + nginx.ingress.kubernetes.io/affinity-mode: "persistent" + nginx.ingress.kubernetes.io/session-cookie-name: "tfs-nbi-session" + nginx.ingress.kubernetes.io/session-cookie-path: "/socket.io" + nginx.ingress.kubernetes.io/session-cookie-expires: "3600" + nginx.ingress.kubernetes.io/session-cookie-change-on-failure: "true" + + nginx.ingress.kubernetes.io/limit-rps: "50" # max requests per second per source IP + nginx.ingress.kubernetes.io/limit-connections: "50" # max concurrent connections per source IP + nginx.ingress.kubernetes.io/proxy-connect-timeout: "60" # max timeout for connecting to server + + # Enable long-lived connections, required for websocket/socket.io streams + nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" # max timeout between two successive read operations + nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" # max timeout between two successive write operations spec: ingressClassName: tfs-ingress-class-opt rules: @@ -44,6 +65,13 @@ spec: name: nbiservice port: number: 8080 + - path: /()(socket.io/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 - path: /()(tfs-api/.*) pathType: Prefix backend: -- GitLab From bb6a98376f78df8bef6667bf36af4b3825681496 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sun, 16 Mar 2025 19:13:07 +0000 Subject: [PATCH 322/463] Common - Kafka tools: - Cosmetic changes --- src/common/tools/kafka/Variables.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/tools/kafka/Variables.py b/src/common/tools/kafka/Variables.py index 432291c6a..515a43f16 100644 --- a/src/common/tools/kafka/Variables.py +++ b/src/common/tools/kafka/Variables.py @@ -57,14 +57,14 @@ class KafkaTopic(Enum): ANALYTICS_RESPONSE = 'topic_analytics_response' VNTMANAGER_REQUEST = 'topic_vntmanager_request' VNTMANAGER_RESPONSE = 'topic_vntmanager_response' - NBI_SOCKETIO_WORKERS = 'tfs-nbi-socketio' + NBI_SOCKETIO_WORKERS = 'tfs_nbi_socketio' @staticmethod def create_all_topics() -> bool: ''' Method to create Kafka topics defined as class members ''' - LOGGER.debug('Kafka server address: {:s} '.format(str(KafkaConfig.get_kafka_address()))) + LOGGER.debug('Kafka server address: {:s}'.format(str(KafkaConfig.get_kafka_address()))) kafka_admin_client = KafkaConfig.get_admin_client() topic_metadata = kafka_admin_client.list_topics(timeout=KAFKA_TOPIC_LIST_TIMEOUT) -- GitLab From 6c3da65d66c4cbc2ac548cf757b7c1bfa7b83b5a Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sun, 16 Mar 2025 19:15:29 +0000 Subject: [PATCH 323/463] Forecaster component: - Homogeneized code with other components --- src/forecaster/service/__main__.py | 35 ++++++++++++++++-------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/forecaster/service/__main__.py b/src/forecaster/service/__main__.py index cf5e88110..54f3331fa 100644 --- a/src/forecaster/service/__main__.py +++ b/src/forecaster/service/__main__.py @@ -16,27 +16,28 @@ import logging, signal, sys, threading from prometheus_client import start_http_server from common.Constants import ServiceNameEnum from common.Settings import ( - ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, get_log_level, get_metrics_port, - wait_for_environment_variables) + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, + get_log_level, get_metrics_port, wait_for_environment_variables +) from .ForecasterService import ForecasterService -terminate = threading.Event() -LOGGER : logging.Logger = None + +TERMINATE = threading.Event() + +LOG_LEVEL = get_log_level() +logging.basicConfig(level=LOG_LEVEL, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") +logging.getLogger('apscheduler.executors.default').setLevel(logging.WARNING) +logging.getLogger('apscheduler.scheduler').setLevel(logging.WARNING) +logging.getLogger('monitoring-client').setLevel(logging.WARNING) +LOGGER = logging.getLogger(__name__) + def signal_handler(signal, frame): # pylint: disable=redefined-outer-name LOGGER.warning('Terminate signal received') - terminate.set() + TERMINATE.set() -def main(): - global LOGGER # pylint: disable=global-statement - - log_level = get_log_level() - logging.basicConfig(level=log_level, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") - logging.getLogger('apscheduler.executors.default').setLevel(logging.WARNING) - logging.getLogger('apscheduler.scheduler').setLevel(logging.WARNING) - logging.getLogger('monitoring-client').setLevel(logging.WARNING) - LOGGER = logging.getLogger(__name__) +def main(): wait_for_environment_variables([ get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST ), get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC), @@ -53,12 +54,13 @@ def main(): metrics_port = get_metrics_port() start_http_server(metrics_port) - # Starting Forecaster service + # Starting service grpc_service = ForecasterService() grpc_service.start() + LOGGER.info('Running...') # Wait for Ctrl+C or termination signal - while not terminate.wait(timeout=1.0): pass + while not TERMINATE.wait(timeout=1.0): pass LOGGER.info('Terminating...') grpc_service.stop() @@ -66,5 +68,6 @@ def main(): LOGGER.info('Bye') return 0 + if __name__ == '__main__': sys.exit(main()) -- GitLab From 66284d484adfe70d47da5fd287b5aa00120f5921 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sun, 16 Mar 2025 21:03:00 +0000 Subject: [PATCH 324/463] NBI component - VNTM Recommendations: - Corrected namespace name - Corrected Kafka listener logic --- src/nbi/service/vntm_recommend/Constants.py | 4 ++-- src/nbi/service/vntm_recommend/VntRecommThread.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nbi/service/vntm_recommend/Constants.py b/src/nbi/service/vntm_recommend/Constants.py index 99438dac3..43e91fed5 100644 --- a/src/nbi/service/vntm_recommend/Constants.py +++ b/src/nbi/service/vntm_recommend/Constants.py @@ -13,5 +13,5 @@ # limitations under the License. -SIO_NAMESPACE = '/vnt-recomm' -SIO_ROOM = 'vnt-recomm' +SIO_NAMESPACE = '/recommendations' +SIO_ROOM = 'recommendations' diff --git a/src/nbi/service/vntm_recommend/VntRecommThread.py b/src/nbi/service/vntm_recommend/VntRecommThread.py index f3d74e5ac..e44670607 100644 --- a/src/nbi/service/vntm_recommend/VntRecommThread.py +++ b/src/nbi/service/vntm_recommend/VntRecommThread.py @@ -50,7 +50,7 @@ class VntRecommThread(threading.Thread): while not self._terminate.is_set(): topic_records : Dict[TopicPartition, List[ConsumerRecord]] = \ kafka_consumer.poll(timeout_ms=1000, max_records=1) - if len(topic_records) == 0: return # no pending records + if len(topic_records) == 0: continue # no pending records self.process_topic_records(topic_records) LOGGER.info('[run] Closing...') -- GitLab From 3f9c2b70da8642ab6d18dc40c9644ba281639a70 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sun, 16 Mar 2025 21:07:41 +0000 Subject: [PATCH 325/463] E2E Orchestrator component: - Updated Subscriptions Framework - Corrected Controller Discovery mechanism - Extended framework to support multiple Dispatchers - Implemented Recommendations Dispatcher (being tested) --- src/e2e_orchestrator/service/__main__.py | 62 +++++---- ...vererThread.py => ControllerDiscoverer.py} | 16 +-- .../RecommendationsClientNamespace.py | 40 ------ .../service/subscriptions/Subscription.py | 30 ++--- .../service/subscriptions/Subscriptions.py | 17 +-- .../subscriptions/dispatchers/Dispatchers.py | 33 +++++ .../subscriptions/dispatchers/_Dispatcher.py | 46 +++++++ .../subscriptions/dispatchers/__init__.py | 13 ++ .../recommendation/ClientNamespace.py | 63 +++++++++ .../dispatchers/recommendation/Constants.py | 15 +++ .../dispatchers/recommendation/Dispatcher.py | 66 +++++++++ .../recommendation/Recommendation.py | 27 ++++ .../dispatchers/recommendation/Tools.py | 127 ++++++++++++++++++ .../dispatchers/recommendation/__init__.py | 13 ++ 14 files changed, 456 insertions(+), 112 deletions(-) rename src/e2e_orchestrator/service/subscriptions/{ControllerDiscovererThread.py => ControllerDiscoverer.py} (89%) delete mode 100644 src/e2e_orchestrator/service/subscriptions/RecommendationsClientNamespace.py create mode 100644 src/e2e_orchestrator/service/subscriptions/dispatchers/Dispatchers.py create mode 100644 src/e2e_orchestrator/service/subscriptions/dispatchers/_Dispatcher.py create mode 100644 src/e2e_orchestrator/service/subscriptions/dispatchers/__init__.py create mode 100644 src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/ClientNamespace.py create mode 100644 src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Constants.py create mode 100644 src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Dispatcher.py create mode 100644 src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Recommendation.py create mode 100644 src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py create mode 100644 src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/__init__.py diff --git a/src/e2e_orchestrator/service/__main__.py b/src/e2e_orchestrator/service/__main__.py index d984add76..aa4def383 100644 --- a/src/e2e_orchestrator/service/__main__.py +++ b/src/e2e_orchestrator/service/__main__.py @@ -12,64 +12,68 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging -import signal -import sys -import threading - +import logging, signal, sys, threading from prometheus_client import start_http_server - from common.Constants import ServiceNameEnum -from common.Settings import (ENVVAR_SUFIX_SERVICE_HOST, - ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, - get_log_level, get_metrics_port, - wait_for_environment_variables) -from e2e_orchestrator.service.subscriptions.ControllerDiscovererThread import ControllerDiscoverer - +from common.Settings import ( + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, + get_log_level, get_metrics_port, wait_for_environment_variables +) +from .subscriptions.ControllerDiscoverer import ControllerDiscoverer +from .subscriptions.Subscriptions import Subscriptions +from .subscriptions.dispatchers.Dispatchers import Dispatchers +from .subscriptions.dispatchers.recommendation.Dispatcher import RecommendationDispatcher from .E2EOrchestratorService import E2EOrchestratorService -terminate = threading.Event() +TERMINATE = threading.Event() LOG_LEVEL = get_log_level() logging.basicConfig(level=LOG_LEVEL, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") LOGGER = logging.getLogger(__name__) -def signal_handler(signal, frame): # pylint: disable=redefined-outer-name - LOGGER.warning("Terminate signal received") - terminate.set() +def signal_handler(signal, frame): # pylint: disable=redefined-outer-name + LOGGER.warning('Terminate signal received') + TERMINATE.set() def main(): - signal.signal(signal.SIGINT, signal_handler) + wait_for_environment_variables([ + get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + ]) + + signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGTERM, signal_handler) - LOGGER.info("Starting...") + LOGGER.info('Starting...') # Start metrics server metrics_port = get_metrics_port() start_http_server(metrics_port) + # Starting service grpc_service = E2EOrchestratorService() grpc_service.start() - controller_discoverer = ControllerDiscoverer( - terminate=terminate - ) - controller_discoverer.start() - LOGGER.info("Running...") + dispatchers = Dispatchers(TERMINATE) + dispatchers.add_dispatcher(RecommendationDispatcher) + subscriptions = Subscriptions(dispatchers, TERMINATE) + discoverer = ControllerDiscoverer(subscriptions, TERMINATE) + discoverer.start() + + LOGGER.info('Running...') # Wait for Ctrl+C or termination signal - while not terminate.wait(timeout=1): - pass + while not TERMINATE.wait(timeout=1.0): pass - LOGGER.info("Terminating...") - controller_discoverer.stop() + LOGGER.info('Terminating...') + discoverer.stop() grpc_service.stop() - LOGGER.info("Bye") + LOGGER.info('Bye') return 0 -if __name__ == "__main__": +if __name__ == '__main__': sys.exit(main()) diff --git a/src/e2e_orchestrator/service/subscriptions/ControllerDiscovererThread.py b/src/e2e_orchestrator/service/subscriptions/ControllerDiscoverer.py similarity index 89% rename from src/e2e_orchestrator/service/subscriptions/ControllerDiscovererThread.py rename to src/e2e_orchestrator/service/subscriptions/ControllerDiscoverer.py index e12917f7d..5d9efd531 100644 --- a/src/e2e_orchestrator/service/subscriptions/ControllerDiscovererThread.py +++ b/src/e2e_orchestrator/service/subscriptions/ControllerDiscoverer.py @@ -68,24 +68,16 @@ class EventDispatcher(BaseEventDispatcher): class ControllerDiscoverer: def __init__( - self, terminate : Optional[threading.Event] = None + self, subscriptions : Subscriptions, terminate : threading.Event ) -> None: self._context_client = ContextClient() - self._event_collector = BaseEventCollector( - terminate=terminate - ) + self._event_collector = BaseEventCollector(terminate=terminate) self._event_collector.install_collector( - self._context_client.GetDeviceEvents, - Empty(), log_events_received=True + self._context_client.GetDeviceEvents, Empty(), log_events_received=True ) - - self._subscriptions = Subscriptions() - self._event_dispatcher = EventDispatcher( - self._event_collector.get_events_queue(), - self._context_client, - self._subscriptions, + self._event_collector.get_events_queue(), self._context_client, subscriptions, terminate=terminate ) diff --git a/src/e2e_orchestrator/service/subscriptions/RecommendationsClientNamespace.py b/src/e2e_orchestrator/service/subscriptions/RecommendationsClientNamespace.py deleted file mode 100644 index 590524eea..000000000 --- a/src/e2e_orchestrator/service/subscriptions/RecommendationsClientNamespace.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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, queue, socketio - -LOGGER = logging.getLogger(__name__) - -class RecommendationsClientNamespace(socketio.ClientNamespace): - def __init__(self, request_queue : queue.Queue, reply_queue : queue.Queue): - self._request_queue = request_queue - self._reply_queue = reply_queue - super().__init__(namespace='/recommendations') - - def on_connect(self): - LOGGER.info('[on_connect] Connected') - - def on_disconnect(self, reason): - MSG = '[on_disconnect] Disconnected!, reason: {:s}' - LOGGER.info(MSG.format(str(reason))) - - def on_recommendation(self, data): - MSG = '[on_recommendation] data={:s}' - LOGGER.info(MSG.format(str(data))) - - #MSG = '[on_recommendation] Recommendation: {:s}' - #LOGGER.info(MSG.format(str(recommendation))) - - #request = (self._device_uuid, *sample) - #self._request_queue.put_nowait(request) diff --git a/src/e2e_orchestrator/service/subscriptions/Subscription.py b/src/e2e_orchestrator/service/subscriptions/Subscription.py index 8e1866bac..a8b986858 100644 --- a/src/e2e_orchestrator/service/subscriptions/Subscription.py +++ b/src/e2e_orchestrator/service/subscriptions/Subscription.py @@ -13,53 +13,41 @@ # limitations under the License. -import queue, socketio, threading +import socketio, threading from common.Constants import ServiceNameEnum from common.Settings import get_service_baseurl_http -from .RecommendationsClientNamespace import RecommendationsClientNamespace +from .dispatchers.Dispatchers import Dispatchers from .TFSControllerSettings import TFSControllerSettings NBI_SERVICE_PREFIX_URL = get_service_baseurl_http(ServiceNameEnum.NBI) or '' -CHILD_SOCKETIO_URL = 'http://{:s}:{:s}@{:s}:{:d}{:s}' +CHILD_SOCKETIO_URL = 'http://{:s}:{:s}@{:s}:{:d}' + NBI_SERVICE_PREFIX_URL class Subscription(threading.Thread): def __init__( - self, tfs_ctrl_settings : TFSControllerSettings, + self, tfs_ctrl_settings : TFSControllerSettings, dispatchers : Dispatchers, terminate : threading.Event ) -> None: super().__init__(daemon=True) - self._settings = tfs_ctrl_settings - self._terminate = terminate - self._request_queue = queue.Queue() - self._reply_queue = queue.Queue() - self._is_running = threading.Event() + self._settings = tfs_ctrl_settings + self._dispatchers = dispatchers + self._terminate = terminate + self._is_running = threading.Event() @property def is_running(self): return self._is_running.is_set() - @property - def request_queue(self): return self._request_queue - - @property - def reply_queue(self): return self._reply_queue - def run(self) -> None: child_socketio_url = CHILD_SOCKETIO_URL.format( self._settings.nbi_username, self._settings.nbi_password, self._settings.nbi_address, self._settings.nbi_port, - NBI_SERVICE_PREFIX_URL - ) - - namespace = RecommendationsClientNamespace( - self._request_queue, self._reply_queue ) sio = socketio.Client(logger=True, engineio_logger=True) - sio.register_namespace(namespace) + self._dispatchers.register(sio) sio.connect(child_socketio_url) while not self._terminate.is_set(): diff --git a/src/e2e_orchestrator/service/subscriptions/Subscriptions.py b/src/e2e_orchestrator/service/subscriptions/Subscriptions.py index f4676ff8d..683aead3b 100644 --- a/src/e2e_orchestrator/service/subscriptions/Subscriptions.py +++ b/src/e2e_orchestrator/service/subscriptions/Subscriptions.py @@ -12,17 +12,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, queue, threading +import logging, threading from typing import Dict +from .dispatchers.Dispatchers import Dispatchers from .Subscription import Subscription from .TFSControllerSettings import TFSControllerSettings LOGGER = logging.getLogger(__name__) class Subscriptions: - def __init__(self) -> None: - self._terminate = threading.Event() - self._lock = threading.Lock() + def __init__(self, dispatchers : Dispatchers, terminate : threading.Event) -> None: + self._dispatchers = dispatchers + self._terminate = terminate + self._lock = threading.Lock() self._subscriptions : Dict[str, Subscription] = dict() def add_subscription(self, tfs_ctrl_settings : TFSControllerSettings) -> None: @@ -30,7 +32,7 @@ class Subscriptions: with self._lock: subscription = self._subscriptions.get(device_uuid) if (subscription is not None) and subscription.is_running: return - subscription = Subscription(tfs_ctrl_settings, self._terminate) + subscription = Subscription(tfs_ctrl_settings, self._dispatchers, self._terminate) self._subscriptions[device_uuid] = subscription subscription.start() @@ -40,8 +42,3 @@ class Subscriptions: if subscription is None: return if subscription.is_running: subscription.stop() self._subscriptions.pop(device_uuid, None) - - def stop(self): - self._terminate.set() - for device_uuid in self._subscriptions: - self.remove_subscription(device_uuid) diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/Dispatchers.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/Dispatchers.py new file mode 100644 index 000000000..88345e32a --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/Dispatchers.py @@ -0,0 +1,33 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, socketio, threading +from typing import List, Type +from ._Dispatcher import _Dispatcher + +LOGGER = logging.getLogger(__name__) + +class Dispatchers: + def __init__(self, terminate : threading.Event) -> None: + self._terminate = terminate + self._dispatchers : List[_Dispatcher] = list() + + def add_dispatcher(self, dispatcher_class : Type[_Dispatcher]) -> None: + dispatcher = dispatcher_class(self._terminate) + self._dispatchers.append(dispatcher) + dispatcher.start() + + def register(self, sio_client : socketio.Client) -> None: + for dispatcher in self._dispatchers: + dispatcher.register(sio_client) diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/_Dispatcher.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/_Dispatcher.py new file mode 100644 index 000000000..d2cd40bbd --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/_Dispatcher.py @@ -0,0 +1,46 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 queue, socketio, threading +from concurrent.futures import Future +from typing import Any, Tuple + +class _Dispatcher(threading.Thread): + def __init__(self, terminate : threading.Event): + super().__init__(daemon=True) + self._dispatcher_queue = queue.Queue[Tuple[Any, Future]]() + self._terminate = terminate + + @property + def dispatcher_queue(self): return self._dispatcher_queue + + def register(self, sio_client : socketio.Client) -> None: + raise NotImplementedError('To be implemented in subclass') + + def run(self): + while not self._terminate.is_set(): + try: + request,future = self._dispatcher_queue.get(block=True, timeout=1.0) + except queue.Empty: + continue + + try: + result = self.process_request(request) + except Exception as e: + future.set_exception(e) + else: + future.set_result(result) + + def process_request(self, request : Any) -> Any: + raise NotImplementedError('To be implemented in subclass') diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/__init__.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/__init__.py new file mode 100644 index 000000000..023830645 --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/ClientNamespace.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/ClientNamespace.py new file mode 100644 index 000000000..ab702acf6 --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/ClientNamespace.py @@ -0,0 +1,63 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, queue, socketio +from concurrent.futures import Future +from .Constants import SIO_NAMESPACE +from .Recommendation import Recommendation, RecommendationAction + +LOGGER = logging.getLogger(__name__) + +class ClientNamespace(socketio.ClientNamespace): + def __init__(self, dispatcher_queue : queue.Queue[Recommendation]): + self._dispatcher_queue = dispatcher_queue + super().__init__(namespace=SIO_NAMESPACE) + + def on_connect(self): + LOGGER.info('[on_connect] Connected') + + def on_disconnect(self, reason): + MSG = '[on_disconnect] Disconnected!, reason: {:s}' + LOGGER.info(MSG.format(str(reason))) + + def on_recommendation(self, data): + MSG = '[on_recommendation] begin data={:s}' + LOGGER.info(MSG.format(str(data))) + + json_data = json.loads(data) + recommendation = Recommendation( + action = RecommendationAction._value2member_map_[json_data['action']], + data = json.loads(json_data['data']), + ) + result = Future() + + MSG = '[on_recommendation] Recommendation: {:s}' + LOGGER.info(MSG.format(str(recommendation))) + + LOGGER.debug('[on_recommendation] Queuing recommendation...') + self._dispatcher_queue.put_nowait((recommendation, result)) + LOGGER.debug('[on_recommendation] Recommendation processed...') + + reply = dict() + try: + reply['result'] = result.result() + event = reply['result']['event'] + except Exception as e: + reply['error'] = str(e) + #reply['stacktrace'] = str(e) + event = 'error' + + LOGGER.debug('[on_recommendation] Replying...') + self.emit(event, json.dumps(reply)) + LOGGER.debug('[on_recommendation] end') diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Constants.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Constants.py new file mode 100644 index 000000000..da3af24fd --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Constants.py @@ -0,0 +1,15 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +SIO_NAMESPACE = '/recommendations' diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Dispatcher.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Dispatcher.py new file mode 100644 index 000000000..72e79e6b5 --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Dispatcher.py @@ -0,0 +1,66 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 copy, logging, socketio +from typing import Dict +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import Service, ServiceId +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Service import json_service_id +from service.client.ServiceClient import ServiceClient +from .._Dispatcher import _Dispatcher +from .ClientNamespace import ClientNamespace +from .Recommendation import Recommendation, RecommendationAction +from .Tools import compose_optical_service + +LOGGER = logging.getLogger(__name__) + +class RecommendationDispatcher(_Dispatcher): + + def register(self, sio_client : socketio.Client) -> None: + sio_client.register_namespace(ClientNamespace(self.dispatcher_queue)) + + def process_request(self, request : Recommendation) -> Dict: + LOGGER.info('[process_request] request={:s}'.format(str(request))) + + if request.action == RecommendationAction.VLINK_CREATE: + vlink_optical_service = compose_optical_service(request.data) + vlink_optical_service_add = copy.deepcopy(vlink_optical_service) + vlink_optical_service_add.pop('service_endpoint_ids', None) + vlink_optical_service_add.pop('service_constraints', None) + vlink_optical_service_add.pop('service_config', None) + + service_client = ServiceClient() + service_id = service_client.CreateService(Service(**vlink_optical_service_add)) + vlink_optical_service['service_id']['service_uuid']['uuid'] = service_id.service_uuid.uuid + service_id = service_client.UpdateService(Service(**vlink_optical_service)) + + result = {'event': 'vlink-created'} + elif request.action == RecommendationAction.VLINK_REMOVE: + vlink_service_uuid = request.data['link_id']['link_uuid']['uuid'] + context_id = json_context_id(DEFAULT_CONTEXT_NAME) + vlink_optical_service_id = json_service_id(vlink_service_uuid, context_id=context_id) + + service_client = ServiceClient() + service_id = service_client.DeleteService(ServiceId(**vlink_optical_service_id)) + + if vlink_service_uuid == 'IP1/PORT-xe1==IP2/PORT-xe1': + service_id = service_client.DeleteService(ServiceId(**vlink_optical_service_id)) + + result = {'event': 'vlink-removed'} + else: + MSG = 'RecommendationAction not supported in Recommendation({:s})' + raise NotImplementedError(MSG.format(str(request))) + + return result diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Recommendation.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Recommendation.py new file mode 100644 index 000000000..ca03b193f --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Recommendation.py @@ -0,0 +1,27 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from dataclasses import dataclass, field +from enum import Enum +from typing import Dict + +class RecommendationAction(Enum): + VLINK_CREATE = 'vlink-create' + VLINK_REMOVE = 'vlink-remove' + +@dataclass +class Recommendation: + action : RecommendationAction + data : Dict = field(default_factory=dict) diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py new file mode 100644 index 000000000..48720767c --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py @@ -0,0 +1,127 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, networkx +from dataclasses import dataclass, field +from typing import Dict, List +from common.proto.context_pb2 import ServiceTypeEnum +from common.tools.context_queries.Topology import get_topology_details +from common.tools.object_factory.Constraint import json_constraint_custom +from common.tools.object_factory.Context import json_context +from common.tools.object_factory.Device import json_device_id +from common.tools.object_factory.EndPoint import json_endpoint_id +from common.tools.object_factory.Service import json_service +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.DeviceTypes import DeviceTypeEnum +from context.client.ContextClient import ContextClient + + +LOGGER = logging.getLogger(__name__) + + +@dataclass +class GraphAndMapping: + graph : networkx.Graph = field(default_factory=networkx.Graph) + device_to_type : Dict[str, str] = field(default_factory=dict) + device_name_to_uuid : Dict[str, str] = field(default_factory=dict) + endpoint_name_to_uuid : Dict[Dict[str, str], str] = field(default_factory=dict) + endpoint_to_device_uuid : Dict[str, str] = field(default_factory=dict) + + +def compose_graph_from_topology() -> GraphAndMapping: + context_client = ContextClient() + topology_details = get_topology_details( + context_client, DEFAULT_TOPOLOGY_NAME, + context_uuid=DEFAULT_CONTEXT_NAME, rw_copy=False + ) + + graph_and_mapping = GraphAndMapping() + + for device in topology_details.devices: + device_uuid = device.device_id.device_uuid.uuid + graph_and_mapping.device_name_to_uuid.setdefault(device.name, device_uuid) + graph_and_mapping.device_name_to_uuid.setdefault(device_uuid, device_uuid) + graph_and_mapping.device_to_type.setdefault(device_uuid, device.device_type) + + endpoint_uuids = list() + for endpoint in device.device_endpoints: + endpoint_uuid = endpoint.endpoint_id.endpoint_uuid.uuid + endpoint_uuids.append(endpoint_uuid) + graph_and_mapping.graph.add_node(endpoint_uuid) + + graph_and_mapping.endpoint_name_to_uuid.setdefault((device_uuid, endpoint.name), endpoint_uuid) + graph_and_mapping.endpoint_name_to_uuid.setdefault((device_uuid, endpoint_uuid), endpoint_uuid) + graph_and_mapping.endpoint_to_device_uuid.setdefault(endpoint_uuid, device_uuid) + + for endpoint_uuid_i in endpoint_uuids: + for endpoint_uuid_j in endpoint_uuids: + if endpoint_uuid_i == endpoint_uuid_j: continue + graph_and_mapping.graph.add_edge(endpoint_uuid_i, endpoint_uuid_j) + + for link in topology_details.links: + graph_and_mapping.graph.add_edge( + link.link_endpoint_ids[ 0].endpoint_uuid.uuid, + link.link_endpoint_ids[-1].endpoint_uuid.uuid, + ) + + return graph_and_mapping + +def compose_optical_service(vlink_request : Dict) -> Dict: + graph_and_mapping = compose_graph_from_topology() + + vlink_endpoint_id_a = vlink_request['link_endpoint_ids'][ 0] + vlink_endpoint_id_b = vlink_request['link_endpoint_ids'][-1] + + device_uuid_or_name_a = vlink_endpoint_id_a['device_id']['device_uuid']['uuid'] + device_uuid_or_name_b = vlink_endpoint_id_b['device_id']['device_uuid']['uuid'] + endpoint_uuid_or_name_a = vlink_endpoint_id_a['endpoint_uuid']['uuid'] + endpoint_uuid_or_name_b = vlink_endpoint_id_b['endpoint_uuid']['uuid'] + + device_uuid_a = graph_and_mapping.device_name_to_uuid[device_uuid_or_name_a] + device_uuid_b = graph_and_mapping.device_name_to_uuid[device_uuid_or_name_b] + + endpoint_uuid_a = graph_and_mapping.endpoint_name_to_uuid[(device_uuid_a, endpoint_uuid_or_name_a)] + endpoint_uuid_b = graph_and_mapping.endpoint_name_to_uuid[(device_uuid_b, endpoint_uuid_or_name_b)] + + path_hops = networkx.shortest_path( + graph_and_mapping.graph, endpoint_uuid_a, endpoint_uuid_b + ) + + optical_border_endpoint_ids : List[str] = list() + for endpoint_uuid in path_hops: + device_uuid = graph_and_mapping.endpoint_to_device_uuid[endpoint_uuid] + device_type = graph_and_mapping.device_to_type[device_uuid] + if device_type != DeviceTypeEnum.EMULATED_OPTICAL_TRANSPONDER.value: continue + device_id = json_device_id(device_uuid) + endpoint_id = json_endpoint_id(device_id, endpoint_uuid) + optical_border_endpoint_ids.append(endpoint_id) + + constraints = [ + json_constraint_custom('bandwidth[gbps]', str(vlink_request['attributes']['total_capacity_gbps'])), + json_constraint_custom('bidirectionality', '1'), + ] + + vlink_service_uuid = vlink_request['link_id']['link_uuid']['uuid'] + + if vlink_service_uuid == 'IP1/PORT-xe1==IP2/PORT-xe1': + constraints.append(json_constraint_custom('optical-band-width[GHz]', '300')) + + vlink_optical_service = json_service( + vlink_service_uuid, + ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY, + context_id=json_context(DEFAULT_CONTEXT_NAME), + endpoint_ids=optical_border_endpoint_ids, + constraints=constraints, + ) + return vlink_optical_service diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/__init__.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/__init__.py new file mode 100644 index 000000000..023830645 --- /dev/null +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. -- GitLab From 8a9e716b62491ad36d2e90c5bccb946c2485f080 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sun, 16 Mar 2025 21:48:58 +0000 Subject: [PATCH 326/463] VNT Manager component: - Updated code to use Kafka topics for recommendations to NBI --- .../service/VNTManagerServiceServicerImpl.py | 215 +++++++----------- src/vnt_manager/service/old_code.py | 168 ++++++++++++++ 2 files changed, 255 insertions(+), 128 deletions(-) create mode 100644 src/vnt_manager/service/old_code.py diff --git a/src/vnt_manager/service/VNTManagerServiceServicerImpl.py b/src/vnt_manager/service/VNTManagerServiceServicerImpl.py index 46a012560..ca1a1b2f3 100644 --- a/src/vnt_manager/service/VNTManagerServiceServicerImpl.py +++ b/src/vnt_manager/service/VNTManagerServiceServicerImpl.py @@ -12,149 +12,83 @@ # See the License for the specific language governing permissions and # limitations under the License. -import grpc -import json -import logging -import threading -import time -from websockets.sync.client import connect -from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +import grpc, json, logging, uuid +from confluent_kafka import Consumer as KafkaConsumer +from confluent_kafka import Producer as KafkaProducer +from confluent_kafka import KafkaError from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method -from common.proto.context_pb2 import ContextId, Empty, Link, LinkId, LinkList, TopologyId -from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest, VNTSubscriptionReply +from common.proto.context_pb2 import Empty, Link, LinkId, LinkList from common.proto.vnt_manager_pb2_grpc import VNTManagerServiceServicer -from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string -from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Topology import json_topology_id +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.kafka.Variables import KafkaConfig, KafkaTopic from context.client.ContextClient import ContextClient -from context.client.EventsCollector import EventsCollector from .vntm_config_device import configure, deconfigure + LOGGER = logging.getLogger(__name__) METRICS_POOL = MetricsPool("VNTManager", "RPC") -context_client: ContextClient = ContextClient() - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) -ADMIN_TOPOLOGY_ID = TopologyId(**json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id=JSON_ADMIN_CONTEXT_ID)) - -GET_EVENT_TIMEOUT = 0.5 - - -class VNTMEventDispatcher(threading.Thread): - def __init__(self, host, port) -> None: - LOGGER.debug('Creating VNTM connector...') - self.host = host - self.port = port - super().__init__(name='VNTMEventDispatcher', daemon=True) - self._terminate = threading.Event() - LOGGER.debug('VNTM connector created') - - def start(self) -> None: - self._terminate.clear() - return super().start() - - def stop(self): - self._terminate.set() - - def send_msg(self, msg): - try: - self.websocket.send(msg) - except Exception as e: - LOGGER.exception('Unable to send message') - - def recv_msg(self): - message = self.websocket.recv() - return message - - def run(self) -> None: - events_collector = EventsCollector( - context_client, - log_events_received = True, - activate_context_collector = True, - activate_topology_collector = True, - activate_device_collector = True, - activate_link_collector = True, - activate_service_collector = False, - activate_slice_collector = False, - activate_connection_collector = False, - ) - events_collector.start() - - try: - url = "ws://" + str(self.host) + ":" + str(self.port) - LOGGER.info("Connecting to events server...: {:s}".format(url)) - self.websocket = connect(url) - except Exception as ex: - MSG = 'Error connecting to {:s}' - LOGGER.exception(MSG.format(str(url))) - else: - LOGGER.info('Connected to {:s}'.format(url)) - context_id = json_context_id(DEFAULT_CONTEXT_NAME) - topology_id = json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id) - - try: - topology_details = context_client.GetTopologyDetails(TopologyId(**topology_id)) - except Exception as ex: - LOGGER.warning('No topology found') - else: - self.send_msg(grpc_message_to_json_string(topology_details)) - - while not self._terminate.is_set(): - event = events_collector.get_event(block=True, timeout=GET_EVENT_TIMEOUT) - if event is None: continue - LOGGER.debug('Event type: {}'.format(event)) - topology_details = context_client.GetTopologyDetails(TopologyId(**topology_id)) - to_send = grpc_message_to_json_string(topology_details) - self.send_msg(to_send) - - LOGGER.info('Exiting') - events_collector.stop() - class VNTManagerServiceServicerImpl(VNTManagerServiceServicer): def __init__(self): LOGGER.debug("Creating Servicer...") - LOGGER.debug("Servicer Created") + self.context_client = ContextClient() self.links = [] - - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def VNTSubscript(self, request: VNTSubscriptionRequest, context: grpc.ServicerContext) -> VNTSubscriptionReply: - LOGGER.info("Subscript request: {:s}".format(str(grpc_message_to_json(request)))) - reply = VNTSubscriptionReply() - reply.subscription = "OK" - - self.event_dispatcher = VNTMEventDispatcher(request.host, int(request.port)) - self.host = request.host - self.port = request.port - LOGGER.info('sleeping 5...') - time.sleep(5) - self.event_dispatcher.start() - return reply + LOGGER.debug("Servicer Created") @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def ListVirtualLinks(self, request : Empty, context : grpc.ServicerContext) -> LinkList: - return [link for link in context_client.ListLinks(Empty()).links if link.virtual] + links = self.context_client.ListLinks(Empty()).links + return [link for link in links if link.virtual] @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetVirtualLink(self, request : LinkId, context : grpc.ServicerContext) -> Link: - link = context_client.GetLink(request) + link = self.context_client.GetLink(request) return link if link.virtual else Empty() @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def SetVirtualLink(self, request : Link, context : grpc.ServicerContext) -> LinkId: try: - LOGGER.info('SETTING virtual link') - self.event_dispatcher.send_msg(grpc_message_to_json_string(request)) + LOGGER.info('[SetVirtualLink] request={:s}'.format(grpc_message_to_json_string(request))) + request_key = str(uuid.uuid4()) + kafka_producer = KafkaProducer({ + 'bootstrap.servers' : KafkaConfig.get_kafka_address() + }) + + vntm_request = json.dumps({ + 'event': 'vlink_create', 'data': grpc_message_to_json_string(request) + }).encode('utf-8') + LOGGER.info('[SetVirtualLink] vntm_request={:s}'.format(str(vntm_request))) + kafka_producer.produce( + KafkaTopic.VNTMANAGER_REQUEST.value, key=request_key, value=vntm_request + ) + kafka_producer.flush() + + kafka_consumer = KafkaConsumer({ + 'bootstrap.servers' : KafkaConfig.get_kafka_address(), + 'group.id' : str(uuid.uuid4()), + 'auto.offset.reset' : 'latest' + }) + kafka_consumer.subscribe([KafkaTopic.VNTMANAGER_RESPONSE.value]) + while True: + receive_msg = kafka_consumer.poll(2.0) + if receive_msg is None: continue + LOGGER.info('[SetVirtualLink] receive_msg={:s}'.format(str(receive_msg))) + if receive_msg.error(): + if receive_msg.error().code() == KafkaError._PARTITION_EOF: continue + LOGGER.error('Consumer error: {:s}'.format(str(receive_msg.error()))) + break + reply_key = receive_msg.key().decode('utf-8') + if reply_key == request_key: break + + link = Link(**json.loads(receive_msg.value().decode('utf-8'))) + # at this point, we know the request was accepted and an optical connection was created + # configure('CSGW1', 'xe5', 'CSGW2', 'xe5', 'ecoc2024-1') - response = self.event_dispatcher.recv_msg() - message_json = json.loads(response) - link = Link(**message_json) - context_client.SetLink(link) - except Exception as e: - MSG = 'Exception setting virtual link={:s}') + self.context_client.SetLink(link) + except: # pylint: disable=bare-except + MSG = 'Exception setting virtual link={:s}' LOGGER.exception(MSG.format(str(request.link_id.link_uuid.uuid))) return request.link_id @@ -162,20 +96,45 @@ class VNTManagerServiceServicerImpl(VNTManagerServiceServicer): def RemoveVirtualLink(self, request : LinkId, context : grpc.ServicerContext) -> Empty: try: LOGGER.debug('Removing virtual link') - self.event_dispatcher.send_msg(grpc_message_to_json_string(request)) - # deconfigure('CSGW1', 'xe5', 'CSGW2', 'xe5', 'ecoc2024-1') - response = self.event_dispatcher.recv_msg() - message_json = json.loads(response) - link_id = LinkId(**message_json) - context_client.RemoveLink(link_id) + request_key = str(uuid.uuid4()) + + kafka_producer = KafkaProducer({ + 'bootstrap.servers' : KafkaConfig.get_kafka_address() + }) + + vntm_request = json.dumps({ + 'event': 'vlink_remove', 'data': grpc_message_to_json_string(request) + }).encode('utf-8') + LOGGER.info('[RemoveVirtualLink] vntm_request={:s}'.format(str(vntm_request))) + kafka_producer.produce( + KafkaTopic.VNTMANAGER_REQUEST.value, key=request_key, value=vntm_request + ) + kafka_producer.flush() + + kafka_consumer = KafkaConsumer({ + 'bootstrap.servers' : KafkaConfig.get_kafka_address(), + 'group.id' : str(uuid.uuid4()), + 'auto.offset.reset' : 'latest' + }) + kafka_consumer.subscribe([KafkaTopic.VNTMANAGER_RESPONSE.value]) + while True: + receive_msg = kafka_consumer.poll(2.0) + if receive_msg is None: continue + if receive_msg.error(): + if receive_msg.error().code() == KafkaError._PARTITION_EOF: continue + LOGGER.error('Consumer error: {:s}'.format(str(receive_msg.error()))) + break + reply_key = receive_msg.key().decode('utf-8') + if reply_key == request_key: break + + link_id = LinkId(**json.loads(receive_msg.value().decode('utf-8'))) + # at this point, we know the request was accepted and an optical connection was deleted + # deconfigure('CSGW1', 'xe5', 'CSGW2', 'xe5', 'ecoc2024-1') + self.context_client.RemoveLink(link_id) LOGGER.info('Removed') - except Exception as e: + except: # pylint: disable=bare-except MSG = 'Exception removing virtual link={:s}' LOGGER.exception(MSG.format(str(request.link_uuid.uuid))) - return msg_error - else: - context_client.RemoveLink(request) - LOGGER.info('Removed') return Empty() diff --git a/src/vnt_manager/service/old_code.py b/src/vnt_manager/service/old_code.py new file mode 100644 index 000000000..a701a1c77 --- /dev/null +++ b/src/vnt_manager/service/old_code.py @@ -0,0 +1,168 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 grpc +import json +import logging +import threading +import time +from websockets.sync.client import connect +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.proto.context_pb2 import ContextId, Empty, Link, LinkId, LinkList, TopologyId +from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest, VNTSubscriptionReply +from common.proto.vnt_manager_pb2_grpc import VNTManagerServiceServicer +from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Topology import json_topology_id +from context.client.ContextClient import ContextClient +from context.client.EventsCollector import EventsCollector +from .vntm_config_device import configure, deconfigure + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool("VNTManager", "RPC") + +context_client: ContextClient = ContextClient() + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) +ADMIN_TOPOLOGY_ID = TopologyId(**json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id=JSON_ADMIN_CONTEXT_ID)) + +GET_EVENT_TIMEOUT = 0.5 + + +class VNTMEventDispatcher(threading.Thread): + def __init__(self, host, port) -> None: + LOGGER.debug('Creating VNTM connector...') + self.host = host + self.port = port + super().__init__(name='VNTMEventDispatcher', daemon=True) + self._terminate = threading.Event() + LOGGER.debug('VNTM connector created') + + def start(self) -> None: + self._terminate.clear() + return super().start() + + def stop(self): + self._terminate.set() + + def send_msg(self, msg): + try: + self.websocket.send(msg) + except Exception as e: + LOGGER.exception('Unable to send message') + + def recv_msg(self): + message = self.websocket.recv() + return message + + def run(self) -> None: + events_collector = EventsCollector( + context_client, + log_events_received = True, + activate_context_collector = True, + activate_topology_collector = True, + activate_device_collector = True, + activate_link_collector = True, + activate_service_collector = False, + activate_slice_collector = False, + activate_connection_collector = False, + ) + events_collector.start() + + try: + url = "ws://" + str(self.host) + ":" + str(self.port) + LOGGER.info("Connecting to events server...: {:s}".format(url)) + self.websocket = connect(url) + except Exception as ex: + MSG = 'Error connecting to {:s}' + LOGGER.exception(MSG.format(str(url))) + else: + LOGGER.info('Connected to {:s}'.format(url)) + context_id = json_context_id(DEFAULT_CONTEXT_NAME) + topology_id = json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id) + + try: + topology_details = context_client.GetTopologyDetails(TopologyId(**topology_id)) + except Exception as ex: + LOGGER.warning('No topology found') + else: + self.send_msg(grpc_message_to_json_string(topology_details)) + + while not self._terminate.is_set(): + event = events_collector.get_event(block=True, timeout=GET_EVENT_TIMEOUT) + if event is None: continue + LOGGER.debug('Event type: {}'.format(event)) + topology_details = context_client.GetTopologyDetails(TopologyId(**topology_id)) + to_send = grpc_message_to_json_string(topology_details) + self.send_msg(to_send) + + LOGGER.info('Exiting') + events_collector.stop() + + +class VNTManagerServiceServicerImpl(VNTManagerServiceServicer): + def __init__(self): + LOGGER.debug("Creating Servicer...") + LOGGER.debug("Servicer Created") + self.links = [] + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def ListVirtualLinks(self, request : Empty, context : grpc.ServicerContext) -> LinkList: + links = context_client.ListLinks(Empty()).links + return [link for link in links if link.virtual] + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetVirtualLink(self, request : LinkId, context : grpc.ServicerContext) -> Link: + link = context_client.GetLink(request) + return link if link.virtual else Empty() + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def SetVirtualLink(self, request : Link, context : grpc.ServicerContext) -> LinkId: + try: + LOGGER.info('SETTING virtual link') + self.event_dispatcher.send_msg(grpc_message_to_json_string(request)) + # configure('CSGW1', 'xe5', 'CSGW2', 'xe5', 'ecoc2024-1') + response = self.event_dispatcher.recv_msg() + message_json = json.loads(response) + link = Link(**message_json) + context_client.SetLink(link) + except Exception as e: + MSG = 'Exception setting virtual link={:s}') + LOGGER.exception(MSG.format(str(request.link_id.link_uuid.uuid))) + return request.link_id + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def RemoveVirtualLink(self, request : LinkId, context : grpc.ServicerContext) -> Empty: + try: + LOGGER.debug('Removing virtual link') + self.event_dispatcher.send_msg(grpc_message_to_json_string(request)) + # deconfigure('CSGW1', 'xe5', 'CSGW2', 'xe5', 'ecoc2024-1') + response = self.event_dispatcher.recv_msg() + message_json = json.loads(response) + link_id = LinkId(**message_json) + context_client.RemoveLink(link_id) + + LOGGER.info('Removed') + except Exception as e: + MSG = 'Exception removing virtual link={:s}' + LOGGER.exception(MSG.format(str(request.link_uuid.uuid))) + return msg_error + else: + context_client.RemoveLink(request) + LOGGER.info('Removed') + + return Empty() -- GitLab From 597edf16353c49c6029465082c91887cfada347b Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Sun, 16 Mar 2025 22:14:53 +0000 Subject: [PATCH 327/463] OFC25 tests: - Updated deploy script to wait for Context subscription to be ready --- src/tests/ofc25/deploy.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tests/ofc25/deploy.sh b/src/tests/ofc25/deploy.sh index d72254191..8bd0b8989 100755 --- a/src/tests/ofc25/deploy.sh +++ b/src/tests/ofc25/deploy.sh @@ -104,9 +104,17 @@ mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_e2e.sh # ===== Recovering files ========================= mv manifests/contextservice.yaml.bak manifests/contextservice.yaml + +# ===== Wait Content for NATS Subscription ========================= +echo "Waiting for E2E Context to have subscriber ready..." +while ! kubectl --namespace tfs-e2e logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do sleep 1; done +kubectl --namespace tfs-e2e logs deployment/contextservice -c server + + # ===== Onboarding topologies ========================= # TODO: pending... + # ===== Configure subscriptions ========================= # This should not be needed #./src/tests/ofc25/subscription_ws_ip.sh -- GitLab From ad9f57b96bd23ec525670cea70c956dd83bdf454 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Mar 2025 00:05:57 +0000 Subject: [PATCH 328/463] E2E Orchestrator component: - Changed recommendation namespace to use specific events for actions - Corrected path computation logic - Corrected subscription creation logic --- .../service/subscriptions/Subscriptions.py | 2 +- .../recommendation/ClientNamespace.py | 55 +++++++++++++++---- .../dispatchers/recommendation/Dispatcher.py | 4 +- .../dispatchers/recommendation/Tools.py | 52 ++++++++++++++++-- 4 files changed, 94 insertions(+), 19 deletions(-) diff --git a/src/e2e_orchestrator/service/subscriptions/Subscriptions.py b/src/e2e_orchestrator/service/subscriptions/Subscriptions.py index 683aead3b..0ef8c0109 100644 --- a/src/e2e_orchestrator/service/subscriptions/Subscriptions.py +++ b/src/e2e_orchestrator/service/subscriptions/Subscriptions.py @@ -31,7 +31,7 @@ class Subscriptions: device_uuid = tfs_ctrl_settings.device_uuid with self._lock: subscription = self._subscriptions.get(device_uuid) - if (subscription is not None) and subscription.is_running: return + if subscription is not None: return subscription = Subscription(tfs_ctrl_settings, self._dispatchers, self._terminate) self._subscriptions[device_uuid] = subscription subscription.start() diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/ClientNamespace.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/ClientNamespace.py index ab702acf6..168a136de 100644 --- a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/ClientNamespace.py +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/ClientNamespace.py @@ -31,25 +31,60 @@ class ClientNamespace(socketio.ClientNamespace): MSG = '[on_disconnect] Disconnected!, reason: {:s}' LOGGER.info(MSG.format(str(reason))) - def on_recommendation(self, data): - MSG = '[on_recommendation] begin data={:s}' + def on_vlink_create(self, data): + MSG = '[on_vlink_create] begin data={:s}' LOGGER.info(MSG.format(str(data))) json_data = json.loads(data) + request_key = json_data.pop('_request_key') + + recommendation = Recommendation( + action = RecommendationAction.VLINK_CREATE, + data = json_data, + ) + result = Future() + + MSG = '[on_vlink_create] Recommendation ({:s}): {:s}' + LOGGER.info(MSG.format(str(request_key), str(recommendation))) + + LOGGER.debug('[on_vlink_create] Queuing recommendation...') + self._dispatcher_queue.put_nowait((recommendation, result)) + + reply = dict() + reply['_request_key'] = request_key + try: + reply['result'] = result.result() + event = reply['result']['event'] + except Exception as e: + reply['error'] = str(e) + #reply['stacktrace'] = str(e) + event = 'error' + + LOGGER.debug('[on_vlink_create] Replying...') + self.emit(event, json.dumps(reply)) + LOGGER.debug('[on_vlink_create] end') + + def on_vlink_remove(self, data): + MSG = '[on_vlink_remove] begin data={:s}' + LOGGER.info(MSG.format(str(data))) + + json_data = json.loads(data) + request_key = json_data.pop('_request_key') + recommendation = Recommendation( - action = RecommendationAction._value2member_map_[json_data['action']], - data = json.loads(json_data['data']), + action = RecommendationAction.VLINK_REMOVE, + data = json_data, ) result = Future() - MSG = '[on_recommendation] Recommendation: {:s}' - LOGGER.info(MSG.format(str(recommendation))) + MSG = '[on_vlink_remove] Recommendation ({:s}): {:s}' + LOGGER.info(MSG.format(str(request_key), str(recommendation))) - LOGGER.debug('[on_recommendation] Queuing recommendation...') + LOGGER.debug('[on_vlink_remove] Queuing recommendation...') self._dispatcher_queue.put_nowait((recommendation, result)) - LOGGER.debug('[on_recommendation] Recommendation processed...') reply = dict() + reply['_request_key'] = request_key try: reply['result'] = result.result() event = reply['result']['event'] @@ -58,6 +93,6 @@ class ClientNamespace(socketio.ClientNamespace): #reply['stacktrace'] = str(e) event = 'error' - LOGGER.debug('[on_recommendation] Replying...') + LOGGER.debug('[on_vlink_remove] Replying...') self.emit(event, json.dumps(reply)) - LOGGER.debug('[on_recommendation] end') + LOGGER.debug('[on_vlink_remove] end') diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Dispatcher.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Dispatcher.py index 72e79e6b5..4fd452857 100644 --- a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Dispatcher.py +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Dispatcher.py @@ -46,7 +46,7 @@ class RecommendationDispatcher(_Dispatcher): vlink_optical_service['service_id']['service_uuid']['uuid'] = service_id.service_uuid.uuid service_id = service_client.UpdateService(Service(**vlink_optical_service)) - result = {'event': 'vlink-created'} + result = {'event': 'vlink_created'} elif request.action == RecommendationAction.VLINK_REMOVE: vlink_service_uuid = request.data['link_id']['link_uuid']['uuid'] context_id = json_context_id(DEFAULT_CONTEXT_NAME) @@ -58,7 +58,7 @@ class RecommendationDispatcher(_Dispatcher): if vlink_service_uuid == 'IP1/PORT-xe1==IP2/PORT-xe1': service_id = service_client.DeleteService(ServiceId(**vlink_optical_service_id)) - result = {'event': 'vlink-removed'} + result = {'event': 'vlink_removed'} else: MSG = 'RecommendationAction not supported in Recommendation({:s})' raise NotImplementedError(MSG.format(str(request))) diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py index 48720767c..20665fcb5 100644 --- a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py @@ -14,11 +14,11 @@ import logging, networkx from dataclasses import dataclass, field -from typing import Dict, List +from typing import Dict, List, Set from common.proto.context_pb2 import ServiceTypeEnum from common.tools.context_queries.Topology import get_topology_details from common.tools.object_factory.Constraint import json_constraint_custom -from common.tools.object_factory.Context import json_context +from common.tools.object_factory.Context import json_context_id from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.EndPoint import json_endpoint_id from common.tools.object_factory.Service import json_service @@ -39,6 +39,21 @@ class GraphAndMapping: endpoint_to_device_uuid : Dict[str, str] = field(default_factory=dict) +EXCLUDED_DEVICE_TYPES : Set[str] = { + DeviceTypeEnum.EMULATED_IP_SDN_CONTROLLER.value, + DeviceTypeEnum.EMULATED_MICROWAVE_RADIO_SYSTEM.value, + DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM.value, + DeviceTypeEnum.EMULATED_XR_CONSTELLATION.value, + DeviceTypeEnum.IETF_SLICE.value, + DeviceTypeEnum.IP_SDN_CONTROLLER.value, + DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM.value, + DeviceTypeEnum.NCE.value, + DeviceTypeEnum.OPEN_LINE_SYSTEM.value, + DeviceTypeEnum.TERAFLOWSDN_CONTROLLER.value, + DeviceTypeEnum.XR_CONSTELLATION.value, +} + + def compose_graph_from_topology() -> GraphAndMapping: context_client = ContextClient() topology_details = get_topology_details( @@ -48,12 +63,18 @@ def compose_graph_from_topology() -> GraphAndMapping: graph_and_mapping = GraphAndMapping() + excluded_device_uuids : Set[str] = set() + for device in topology_details.devices: device_uuid = device.device_id.device_uuid.uuid graph_and_mapping.device_name_to_uuid.setdefault(device.name, device_uuid) graph_and_mapping.device_name_to_uuid.setdefault(device_uuid, device_uuid) graph_and_mapping.device_to_type.setdefault(device_uuid, device.device_type) + if device.device_type in EXCLUDED_DEVICE_TYPES: + excluded_device_uuids.add(device_uuid) + continue + endpoint_uuids = list() for endpoint in device.device_endpoints: endpoint_uuid = endpoint.endpoint_id.endpoint_uuid.uuid @@ -70,9 +91,18 @@ def compose_graph_from_topology() -> GraphAndMapping: graph_and_mapping.graph.add_edge(endpoint_uuid_i, endpoint_uuid_j) for link in topology_details.links: + endpoint_id_a = link.link_endpoint_ids[ 0] + endpoint_id_z = link.link_endpoint_ids[-1] + + device_uuid_a = endpoint_id_a.device_id.device_uuid.uuid + if device_uuid_a in excluded_device_uuids: continue + + device_uuid_z = endpoint_id_z.device_id.device_uuid.uuid + if device_uuid_z in excluded_device_uuids: continue + graph_and_mapping.graph.add_edge( - link.link_endpoint_ids[ 0].endpoint_uuid.uuid, - link.link_endpoint_ids[-1].endpoint_uuid.uuid, + endpoint_id_a.endpoint_uuid.uuid, + endpoint_id_z.endpoint_uuid.uuid, ) return graph_and_mapping @@ -98,15 +128,23 @@ def compose_optical_service(vlink_request : Dict) -> Dict: graph_and_mapping.graph, endpoint_uuid_a, endpoint_uuid_b ) + LOGGER.info('[compose_optical_service] path_hops={:s}'.format(str(path_hops))) + optical_border_endpoint_ids : List[str] = list() for endpoint_uuid in path_hops: + LOGGER.info('[compose_optical_service] endpoint_uuid={:s}'.format(str(endpoint_uuid))) device_uuid = graph_and_mapping.endpoint_to_device_uuid[endpoint_uuid] + LOGGER.info('[compose_optical_service] device_uuid={:s}'.format(str(device_uuid))) device_type = graph_and_mapping.device_to_type[device_uuid] + LOGGER.info('[compose_optical_service] device_type={:s}'.format(str(device_type))) if device_type != DeviceTypeEnum.EMULATED_OPTICAL_TRANSPONDER.value: continue device_id = json_device_id(device_uuid) endpoint_id = json_endpoint_id(device_id, endpoint_uuid) + LOGGER.info('[compose_optical_service] endpoint_id={:s}'.format(str(endpoint_id))) optical_border_endpoint_ids.append(endpoint_id) + LOGGER.info('[compose_optical_service] optical_border_endpoint_ids={:s}'.format(str(optical_border_endpoint_ids))) + constraints = [ json_constraint_custom('bandwidth[gbps]', str(vlink_request['attributes']['total_capacity_gbps'])), json_constraint_custom('bidirectionality', '1'), @@ -120,8 +158,10 @@ def compose_optical_service(vlink_request : Dict) -> Dict: vlink_optical_service = json_service( vlink_service_uuid, ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY, - context_id=json_context(DEFAULT_CONTEXT_NAME), - endpoint_ids=optical_border_endpoint_ids, + context_id=json_context_id(DEFAULT_CONTEXT_NAME), + endpoint_ids=[ + optical_border_endpoint_ids[1], optical_border_endpoint_ids[2] + ], constraints=constraints, ) return vlink_optical_service -- GitLab From 8033d20439f5f6e7173497dfdf84cfdc15f4105d Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Mar 2025 00:07:13 +0000 Subject: [PATCH 329/463] NBI component - VNTM Recommendations: - Added management of recommendation replies - Corrected format of recommendations --- src/nbi/service/vntm_recommend/Namespaces.py | 36 ++++++++++++++++++- .../service/vntm_recommend/VntRecommThread.py | 13 ++++--- 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/src/nbi/service/vntm_recommend/Namespaces.py b/src/nbi/service/vntm_recommend/Namespaces.py index c4cb211a6..a7660f859 100644 --- a/src/nbi/service/vntm_recommend/Namespaces.py +++ b/src/nbi/service/vntm_recommend/Namespaces.py @@ -12,9 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging +import json, logging from flask import request from flask_socketio import Namespace, join_room, leave_room +from kafka import KafkaProducer +from common.tools.kafka.Variables import KafkaConfig, KafkaTopic from .Constants import SIO_NAMESPACE, SIO_ROOM from .VntRecommThread import VntRecommThread @@ -26,6 +28,10 @@ class VntRecommServerNamespace(Namespace): self._thread = VntRecommThread(self) self._thread.start() + self.kafka_producer = KafkaProducer( + bootstrap_servers = KafkaConfig.get_kafka_address(), + ) + def stop_thread(self) -> None: self._thread.stop() @@ -38,3 +44,31 @@ class VntRecommServerNamespace(Namespace): MSG = '[on_disconnect] Client disconnect: sid={:s}, reason={:s}' LOGGER.info(MSG.format(str(request.sid), str(reason))) leave_room(SIO_ROOM, namespace=SIO_NAMESPACE) + + def on_vlink_created(self, data): + MSG = '[on_vlink_created] begin: sid={:s}, data={:s}' + LOGGER.info(MSG.format(str(request.sid), str(data))) + + data = json.loads(data) + request_key = data.pop('_request_key') + + vntm_reply = json.dumps({'event': 'vlink_created', 'data': data}).encode('utf-8') + LOGGER.info('[on_vlink_created] vntm_reply={:s}'.format(str(vntm_reply))) + self.kafka_producer.send( + KafkaTopic.VNTMANAGER_RESPONSE.value, key=request_key, value=vntm_reply + ) + self.kafka_producer.flush() + + def on_vlink_removed(self, data): + MSG = '[on_vlink_removed] begin: sid={:s}, data={:s}' + LOGGER.info(MSG.format(str(request.sid), str(data))) + + data = json.loads(data) + request_key = data.pop('_request_key') + + vntm_reply = json.dumps({'event': 'vlink_removed', 'data': data}).encode('utf-8') + LOGGER.info('[on_vlink_removed] vntm_reply={:s}'.format(str(vntm_reply))) + self.kafka_producer.send( + KafkaTopic.VNTMANAGER_RESPONSE.value, key=request_key, value=vntm_reply + ) + self.kafka_producer.flush() diff --git a/src/nbi/service/vntm_recommend/VntRecommThread.py b/src/nbi/service/vntm_recommend/VntRecommThread.py index e44670607..2b745c16d 100644 --- a/src/nbi/service/vntm_recommend/VntRecommThread.py +++ b/src/nbi/service/vntm_recommend/VntRecommThread.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, socketio, threading +import json, logging, socketio, threading from typing import Dict, List from common.tools.kafka.Variables import KafkaConfig, KafkaTopic from kafka import KafkaConsumer, TopicPartition @@ -71,13 +71,18 @@ class VntRecommThread(threading.Thread): def emit_recommendation(self, record : ConsumerRecord) -> None: message_key = record.key.decode('utf-8') message_value = record.value.decode('utf-8') + message_value = json.loads(message_value) + message_event = message_value.pop('event') + message_data = json.loads(message_value['data']) + message_data['_request_key'] = message_key + message_data = json.dumps(message_data) - MSG = '[emit_recommendation] Recommendation: key={:s} value={:s}' - LOGGER.debug(MSG.format(str(message_key), str(message_value))) + MSG = '[emit_recommendation] Recommendation: event={:s} data={:s}' + LOGGER.debug(MSG.format(str(message_event), str(message_data))) LOGGER.debug('[emit_recommendation] checking server namespace...') server : socketio.Server = self._namespace.server if server is None: return LOGGER.debug('[emit_recommendation] emitting recommendation...') - server.emit('recommendation', message_value, namespace=SIO_NAMESPACE, to=SIO_ROOM) + server.emit(message_event, message_data, namespace=SIO_NAMESPACE, to=SIO_ROOM) LOGGER.debug('[emit_recommendation] emitted') -- GitLab From d582c17d380dd0d0651c25dd8696b0fba26df1e4 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Mar 2025 00:08:37 +0000 Subject: [PATCH 330/463] NBI component: - Disabled multi-worker as synchronization through Kafka seems not to work, to be corrected - Disabled heartbeat thread --- src/nbi/Dockerfile | 3 ++- src/nbi/service/NbiApplication.py | 10 +++++----- src/nbi/service/health_probes/Namespaces.py | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/nbi/Dockerfile b/src/nbi/Dockerfile index 6bca1c81a..ac54fc851 100644 --- a/src/nbi/Dockerfile +++ b/src/nbi/Dockerfile @@ -89,4 +89,5 @@ RUN mkdir -p /var/teraflow/tests/tools COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ # Start the service -ENTRYPOINT ["gunicorn", "--workers", "4", "--worker-class", "eventlet", "--bind", "0.0.0.0:8080", "nbi.service.app:app"] +# NOTE: Configured single worker to prevent issues with multi-worker synchronization. To be invetsigated. +ENTRYPOINT ["gunicorn", "--workers", "1", "--worker-class", "eventlet", "--bind", "0.0.0.0:8080", "nbi.service.app:app"] diff --git a/src/nbi/service/NbiApplication.py b/src/nbi/service/NbiApplication.py index dee09462c..16c1a6a1a 100644 --- a/src/nbi/service/NbiApplication.py +++ b/src/nbi/service/NbiApplication.py @@ -44,13 +44,13 @@ class NbiApplication: # Configure KafkaManager to enable SocketIO Servers running in different # gunicorn workers to self-coordinate and share sessions. - self._sio_client_manager = socketio.KafkaManager( - url='kafka://{:s}'.format(KafkaConfig.get_kafka_address()), - channel=KafkaTopic.NBI_SOCKETIO_WORKERS.value - ) + #self._sio_client_manager = socketio.KafkaManager( + # url='kafka://{:s}'.format(KafkaConfig.get_kafka_address()), + # channel=KafkaTopic.NBI_SOCKETIO_WORKERS.value + #) self._sio = SocketIO( self._app, cors_allowed_origins='*', async_mode='eventlet', - client_manager=self._sio_client_manager, + #client_manager=self._sio_client_manager, logger=True, engineio_logger=True ) diff --git a/src/nbi/service/health_probes/Namespaces.py b/src/nbi/service/health_probes/Namespaces.py index 8a3f9323c..5f6a5205f 100644 --- a/src/nbi/service/health_probes/Namespaces.py +++ b/src/nbi/service/health_probes/Namespaces.py @@ -24,7 +24,7 @@ class HeartbeatServerNamespace(Namespace): def __init__(self): super().__init__(namespace=SIO_NAMESPACE) self._thread = HeartbeatThread(self) - self._thread.start() + #self._thread.start() def stop_thread(self) -> None: self._thread.stop() -- GitLab From fdd6265193bfe360bb46b53442ee4bd1d4ffd388 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Mar 2025 00:09:27 +0000 Subject: [PATCH 331/463] Service component: - Renamed service handler e2e_orch to optical_tfs --- .../OpticalTfsServiceHandler.py} | 28 +++++++++---------- .../{e2e_orch => optical_tfs}/__init__.py | 0 2 files changed, 14 insertions(+), 14 deletions(-) rename src/service/service/service_handlers/{e2e_orch/E2EOrchestratorServiceHandler.py => optical_tfs/OpticalTfsServiceHandler.py} (90%) rename src/service/service/service_handlers/{e2e_orch => optical_tfs}/__init__.py (100%) diff --git a/src/service/service/service_handlers/e2e_orch/E2EOrchestratorServiceHandler.py b/src/service/service/service_handlers/optical_tfs/OpticalTfsServiceHandler.py similarity index 90% rename from src/service/service/service_handlers/e2e_orch/E2EOrchestratorServiceHandler.py rename to src/service/service/service_handlers/optical_tfs/OpticalTfsServiceHandler.py index 9512f242c..93dfce19e 100644 --- a/src/service/service/service_handlers/e2e_orch/E2EOrchestratorServiceHandler.py +++ b/src/service/service/service_handlers/optical_tfs/OpticalTfsServiceHandler.py @@ -26,9 +26,9 @@ from service.service.task_scheduler.TaskExecutor import TaskExecutor LOGGER = logging.getLogger(__name__) -METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'e2e_orch'}) +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'optical_tfs'}) -class E2EOrchestratorServiceHandler(_ServiceHandler): +class OpticalTfsServiceHandler(_ServiceHandler): def __init__( # pylint: disable=super-init-not-called self, service : Service, task_executor : TaskExecutor, **settings ) -> None: @@ -47,7 +47,7 @@ class E2EOrchestratorServiceHandler(_ServiceHandler): 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 - bitrate = json_settings.get('bitrate', 1000) + bitrate = json_settings['bitrate'] results = [] try: @@ -64,10 +64,10 @@ class E2EOrchestratorServiceHandler(_ServiceHandler): controller = src_controller json_config_rule = json_config_rule_set('/services/service[{:s}]'.format(service_uuid), { - 'uuid' : service_uuid, - 'src_node' : src_endpoint_uuid, - 'dst_node' : dst_endpoint_uuid, - 'bitrate' : bitrate + 'uuid' : service_uuid, + 'src_node' : src_endpoint_uuid, + 'dst_node' : dst_endpoint_uuid, + 'bitrate' : bitrate }) del controller.device_config.config_rules[:] controller.device_config.config_rules.append(ConfigRule(**json_config_rule)) @@ -90,8 +90,8 @@ class E2EOrchestratorServiceHandler(_ServiceHandler): 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 - flow_id = json_settings.get('flow_id', 100) - bitrate = json_settings.get('bitrate', 1000) + flow_id = json_settings['flow_id'] + bitrate = json_settings['bitrate'] results = [] try: @@ -108,11 +108,11 @@ class E2EOrchestratorServiceHandler(_ServiceHandler): controller = src_controller json_config_rule = json_config_rule_set('/services/service[{:s}]'.format(service_uuid), { - 'uuid' : service_uuid, - 'flow_id' : flow_id, - 'src_node' : src_endpoint_uuid, - 'dst_node' : dst_endpoint_uuid, - 'bitrate' : bitrate + 'uuid' : service_uuid, + 'flow_id' : flow_id, + 'src_node' : src_endpoint_uuid, + 'dst_node' : dst_endpoint_uuid, + 'bitrate' : bitrate }) del controller.device_config.config_rules[:] diff --git a/src/service/service/service_handlers/e2e_orch/__init__.py b/src/service/service/service_handlers/optical_tfs/__init__.py similarity index 100% rename from src/service/service/service_handlers/e2e_orch/__init__.py rename to src/service/service/service_handlers/optical_tfs/__init__.py -- GitLab From 1b6624907310329a7858ee3747e31fa4d4acdae7 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Mar 2025 00:10:01 +0000 Subject: [PATCH 332/463] PathComp Component - Frontend: - Updated default link capacity values --- .../frontend/service/algorithms/tools/ComposeRequest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py b/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py index 0554084f8..3ca4dec3e 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py @@ -101,8 +101,8 @@ def compose_device(grpc_device : Device) -> Dict: link_port_direction = LinkPortDirection.BIDIRECTIONAL.value termination_direction = TerminationDirection.BIDIRECTIONAL.value termination_state = TerminationState.TERMINATED_BIDIRECTIONAL.value - total_potential_capacity = compose_capacity(200, CapacityUnit.MBPS.value) - available_capacity = compose_capacity(200, CapacityUnit.MBPS.value) + total_potential_capacity = compose_capacity(100000, CapacityUnit.GBPS.value) + available_capacity = compose_capacity(100000, CapacityUnit.GBPS.value) endpoint = compose_endpoint( endpoint_id, endpoint_type, link_port_direction, termination_direction, termination_state, total_potential_capacity, available_capacity) -- GitLab From 27392e7671b40d0a576d896db706ea44ba553e02 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Mar 2025 00:10:22 +0000 Subject: [PATCH 333/463] Service component: - Renamed service handler e2e_orch to optical_tfs --- src/service/service/service_handlers/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index 85545d238..74ad3620a 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -28,7 +28,7 @@ from .microwave.MicrowaveServiceHandler import MicrowaveServiceHandler from .p4.p4_service_handler import P4ServiceHandler from .tapi_tapi.TapiServiceHandler import TapiServiceHandler from .tapi_xr.TapiXrServiceHandler import TapiXrServiceHandler -from .e2e_orch.E2EOrchestratorServiceHandler import E2EOrchestratorServiceHandler +from .optical_tfs.OpticalTfsServiceHandler import OpticalTfsServiceHandler from .oc.OCServiceHandler import OCServiceHandler from .qkd.qkd_service_handler import QKDServiceHandler @@ -117,9 +117,9 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN], } ]), - (E2EOrchestratorServiceHandler, [ + (OpticalTfsServiceHandler, [ { - FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_E2E, + FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY, FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS], } ]), -- GitLab From aa159a616a05e24480ab543ef421d57c66145c81 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Mar 2025 07:51:46 +0000 Subject: [PATCH 334/463] E2E Orchestrator component: - Corrected vlink optical service endpoints --- .../service/subscriptions/dispatchers/recommendation/Tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py index 20665fcb5..12b2069cf 100644 --- a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py @@ -160,7 +160,7 @@ def compose_optical_service(vlink_request : Dict) -> Dict: ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY, context_id=json_context_id(DEFAULT_CONTEXT_NAME), endpoint_ids=[ - optical_border_endpoint_ids[1], optical_border_endpoint_ids[2] + optical_border_endpoint_ids[0], optical_border_endpoint_ids[-1] ], constraints=constraints, ) -- GitLab From a10687b7ef08fa87766f51ce4066173ab1634a71 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Mar 2025 12:54:03 +0000 Subject: [PATCH 335/463] Common - Object Factory tools: - Added field name to json_service() --- src/common/tools/object_factory/Service.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/common/tools/object_factory/Service.py b/src/common/tools/object_factory/Service.py index ab399adbe..74c183230 100644 --- a/src/common/tools/object_factory/Service.py +++ b/src/common/tools/object_factory/Service.py @@ -30,10 +30,10 @@ def json_service_id(service_uuid : str, context_id : Optional[Dict] = None): def json_service( service_uuid : str, service_type : ServiceTypeEnum, context_id : Optional[Dict] = None, - status : ServiceStatusEnum = ServiceStatusEnum.SERVICESTATUS_PLANNED, - endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], config_rules : List[Dict] = []): - - return { + name : Optional[str] = None, status : ServiceStatusEnum = ServiceStatusEnum.SERVICESTATUS_PLANNED, + endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], config_rules : List[Dict] = [] +) -> Dict: + result = { 'service_id' : json_service_id(service_uuid, context_id=context_id), 'service_type' : service_type, 'service_status' : {'service_status': status}, @@ -41,6 +41,8 @@ def json_service( 'service_constraints' : copy.deepcopy(constraints), 'service_config' : {'config_rules': copy.deepcopy(config_rules)}, } + if name is not None: result['name'] = name + return result def json_service_qkd_planned( service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], -- GitLab From 6161b92a0b6d9bee9bcc7fc8183c0d1be15c4d34 Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 17 Mar 2025 15:04:49 +0100 Subject: [PATCH 336/463] debug/refactor: - sub service creation code changed to avoid new sub service creation when multi-domain services are updated - sub service creation code refactored with dataclass addition --- .../algorithms/tools/ComputeSubServices.py | 76 +++++++++++-------- 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py b/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py index dfcd1156b..728bb58c8 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py @@ -45,24 +45,39 @@ # ], [UUID('c2e57966-5d82-4705-a5fe-44cf6487219e')]) # ] -import logging, queue, uuid +import logging, queue +from dataclasses import dataclass, field from typing import Dict, List, Optional, Tuple from common.DeviceTypes import DeviceTypeEnum from common.proto.context_pb2 import Device, ServiceTypeEnum +from common.tools.context_queries.Slice import get_uuid_from_string from .ResourceGroups import IGNORED_DEVICE_TYPES, REMOTEDOMAIN_DEVICE_TYPES, get_resource_classification from .ServiceTypes import get_service_type LOGGER = logging.getLogger(__name__) +@dataclass +class ConnectionEntry: + uuid: str = '' + service_type : ServiceTypeEnum = ServiceTypeEnum.SERVICETYPE_UNKNOWN + path_hops : List[Dict] = field(default_factory=list) + dependencies : List[str] = field(default_factory=list) + + def __post_init__(self) -> None: + if self.uuid != '': + return + composed_string = '-'.join(f'{path_hop["device"]}/{path_hop["ingress_ep"]}/{path_hop["egress_ep"]}' for path_hop in self.path_hops) + self.sub_service_uuid = get_uuid_from_string(composed_string) + def convert_explicit_path_hops_to_connections( 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]]]: +) -> List[Tuple[str, int, List[Dict], List[str]]]: LOGGER.debug('path_hops={:s}'.format(str(path_hops))) connection_stack = queue.LifoQueue() - connections : List[Tuple[str, int, List[str], List[str]]] = list() + connections : List[ConnectionEntry] = list() prv_device_uuid = None prv_res_class : Tuple[Optional[int], Optional[DeviceTypeEnum], Optional[str]] = None, None, None @@ -85,82 +100,83 @@ def convert_explicit_path_hops_to_connections( LOGGER.debug(' create and terminate underlying connection') # create underlying connection - sub_service_uuid = str(uuid.uuid4()) - prv_service_type = connection_stack.queue[-1][1] + prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) - connection_stack.put((sub_service_uuid, service_type, [path_hop], [])) + connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) + connection_stack.put(connection_entry) # underlying connection ended - connection = connection_stack.get() + connection: ConnectionEntry = connection_stack.get() connections.append(connection) - connection_stack.queue[-1][3].append(connection[0]) + connection_stack.queue[-1].dependencies.append(connection.uuid) #connection_stack.queue[-1][2].append(path_hop) elif prv_res_class[2] is None and res_class[2] is not None: # entering domain of a device controller, create underlying connection LOGGER.debug(' entering domain of a device controller, create underlying connection') - sub_service_uuid = str(uuid.uuid4()) - prv_service_type = connection_stack.queue[-1][1] + prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) - connection_stack.put((sub_service_uuid, service_type, [path_hop], [])) + connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) + connection_stack.put(connection_entry) elif prv_res_class[2] is not None and res_class[2] is None: # leaving domain of a device controller, terminate underlying connection LOGGER.debug(' leaving domain of a device controller, terminate underlying connection') connection = connection_stack.get() connections.append(connection) - connection_stack.queue[-1][3].append(connection[0]) - connection_stack.queue[-1][2].append(path_hop) + connection_stack.queue[-1].dependencies.append(connection.uuid) + connection_stack.queue[-1].path_hops.append(path_hop) elif prv_res_class[2] is not None and res_class[2] is not None: if prv_res_class[2] == res_class[2]: # stay in domain of a device controller, connection continues LOGGER.debug(' stay in domain of a device controller, connection continues') - connection_stack.queue[-1][2].append(path_hop) + connection_stack.queue[-1].path_hops.append(path_hop) else: # switching to different device controller, chain connections LOGGER.debug(' switching to different device controller, chain connections') connection = connection_stack.get() connections.append(connection) - connection_stack.queue[-1][3].append(connection[0]) + connection_stack.queue[-1].dependencies.append(connection.uuid) - sub_service_uuid = str(uuid.uuid4()) - prv_service_type = connection_stack.queue[-1][1] + prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) - connection_stack.put((sub_service_uuid, service_type, [path_hop], [])) + connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) + connection_stack.put(connection_entry) elif prv_res_class[0] is None: # path ingress LOGGER.debug(' path ingress') - connection_stack.put((main_service_uuid, main_service_type, [path_hop], [])) + connection_entry = ConnectionEntry(uuid=main_service_uuid, service_type=main_service_type, path_hops=[path_hop]) + connection_stack.put(connection_entry) elif prv_res_class[0] > res_class[0]: # create underlying connection LOGGER.debug(' create underlying connection') - sub_service_uuid = str(uuid.uuid4()) - prv_service_type = connection_stack.queue[-1][1] + prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) - connection_stack.put((sub_service_uuid, service_type, [path_hop], [])) + connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) + connection_stack.put(connection_entry) elif prv_res_class[0] == res_class[0]: # same resource group kind LOGGER.debug(' 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 LOGGER.debug(' connection continues') - connection_stack.queue[-1][2].append(path_hop) + connection_stack.queue[-1].path_hops.append(path_hop) else: # different device type or device controller: chain connections LOGGER.debug(' chain connections') connection = connection_stack.get() connections.append(connection) - connection_stack.queue[-1][3].append(connection[0]) + connection_stack.queue[-1].dependencies.append(connection.uuid) - sub_service_uuid = str(uuid.uuid4()) - prv_service_type = connection_stack.queue[-1][1] + prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) - connection_stack.put((sub_service_uuid, service_type, [path_hop], [])) + connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) + connection_stack.put(connection_entry) elif prv_res_class[0] < res_class[0]: # underlying connection ended LOGGER.debug(' underlying connection ended') connection = connection_stack.get() connections.append(connection) - connection_stack.queue[-1][3].append(connection[0]) - connection_stack.queue[-1][2].append(path_hop) + connection_stack.queue[-1].dependencies.append(connection.uuid) + connection_stack.queue[-1].path_hops.append(path_hop) else: raise Exception('Uncontrolled condition') @@ -172,7 +188,7 @@ def convert_explicit_path_hops_to_connections( connections.append(connection_stack.get()) LOGGER.debug('connections={:s}'.format(str(connections))) assert connection_stack.empty() - return connections + return [(c.uuid, c.service_type, c.path_hops, c.dependencies) for c in connections] def convert_explicit_path_hops_to_plain_connection( path_hops : List[Dict], main_service_uuid : str, main_service_type : ServiceTypeEnum -- GitLab From 9f1b13b1cd7a40fab36332ef6a3b5837aa61c563 Mon Sep 17 00:00:00 2001 From: hajipour Date: Mon, 17 Mar 2025 18:33:40 +0100 Subject: [PATCH 337/463] debug: main service uuid added to the prefix of the hash function of the subservices, __post_init__ changed to a method tha is called in the code --- .../algorithms/tools/ComputeSubServices.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py b/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py index 728bb58c8..053e6d542 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py @@ -63,11 +63,11 @@ class ConnectionEntry: path_hops : List[Dict] = field(default_factory=list) dependencies : List[str] = field(default_factory=list) - def __post_init__(self) -> None: - if self.uuid != '': - return - composed_string = '-'.join(f'{path_hop["device"]}/{path_hop["ingress_ep"]}/{path_hop["egress_ep"]}' for path_hop in self.path_hops) - self.sub_service_uuid = get_uuid_from_string(composed_string) + def calculate_subservice_uuid(self, main_service_uuid: str) -> None: + composed_string = main_service_uuid + '-'.join( + f'{path_hop["device"]}/{path_hop["ingress_ep"]}/{path_hop["egress_ep"]}' for path_hop in self.path_hops + ) + self.uuid = get_uuid_from_string(composed_string) def convert_explicit_path_hops_to_connections( path_hops : List[Dict], device_dict : Dict[str, Tuple[Dict, Device]], @@ -103,6 +103,7 @@ def convert_explicit_path_hops_to_connections( prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) + connection_entry.calculate_subservice_uuid(main_service_uuid) connection_stack.put(connection_entry) # underlying connection ended @@ -116,6 +117,7 @@ def convert_explicit_path_hops_to_connections( prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) + connection_entry.calculate_subservice_uuid(main_service_uuid) connection_stack.put(connection_entry) elif prv_res_class[2] is not None and res_class[2] is None: # leaving domain of a device controller, terminate underlying connection @@ -139,6 +141,7 @@ def convert_explicit_path_hops_to_connections( prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) + connection_entry.calculate_subservice_uuid (main_service_uuid) connection_stack.put(connection_entry) elif prv_res_class[0] is None: # path ingress @@ -151,6 +154,7 @@ def convert_explicit_path_hops_to_connections( prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) + connection_entry.calculate_subservice_uuid(main_service_uuid) connection_stack.put(connection_entry) elif prv_res_class[0] == res_class[0]: # same resource group kind @@ -169,6 +173,7 @@ def convert_explicit_path_hops_to_connections( prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) + connection_entry.calculate_subservice_uuid(main_service_uuid) connection_stack.put(connection_entry) elif prv_res_class[0] < res_class[0]: # underlying connection ended -- GitLab From 64ba4d8e40ce1cb989eea0d2510e823885edbd51 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Mar 2025 19:15:49 +0000 Subject: [PATCH 338/463] Device component - OpticalTfs driver: - Corrected setup/teardown of optical connectivity services --- .../drivers/optical_tfs/OpticalTfsDriver.py | 30 ++-- .../drivers/optical_tfs/TfsApiClient.py | 145 ++++++++++++++++-- 2 files changed, 147 insertions(+), 28 deletions(-) diff --git a/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py b/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py index 8d7d95251..d2d3ec3bb 100644 --- a/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py +++ b/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py @@ -20,7 +20,7 @@ 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.driver_api.ImportTopologyEnum import ImportTopologyEnum, get_import_topology from .TfsApiClient import TfsApiClient -from .TfsOpticalClient import TfsOpticalClient +#from .TfsOpticalClient import TfsOpticalClient LOGGER = logging.getLogger(__name__) @@ -46,10 +46,10 @@ class OpticalTfsDriver(_Driver): self.address, self.port, scheme=scheme, username=username, password=password, timeout=timeout ) - self.toc = TfsOpticalClient( - self.address, int(self.port), scheme=scheme, username=username, - password=password, timeout=timeout - ) + #self.toc = TfsOpticalClient( + # self.address, int(self.port), scheme=scheme, username=username, + # password=password, timeout=timeout + #) # Options are: # disabled --> just import endpoints as usual @@ -99,8 +99,7 @@ class OpticalTfsDriver(_Driver): results.extend(self.tac.get_devices_endpoints(self.__import_topology)) elif resource_key == RESOURCE_SERVICES: # return all services through - #results.extend(self.toc.get_lightpaths()) - pass + results.extend(self.tac.get_services()) else: MSG = 'ResourceKey({:s}) not implemented' LOGGER.warning(MSG.format(str(resource_key))) @@ -123,13 +122,11 @@ class OpticalTfsDriver(_Driver): resource_key, resource_value = resource try: resource_value = json.loads(resource_value) - src_node = resource_value['src_node'] - dst_node = resource_value['dst_node'] - bitrate = resource_value['bitrate' ] - results.extend(self.toc.add_lightpath(src_node, dst_node, bitrate)) + self.tac.setup_service(resource_value) results.append((resource_key, True)) except Exception as e: - LOGGER.exception('Unhandled error processing resource_key({:s})'.format(str(resource_key))) + MSG = 'Unhandled error processing resource_key({:s})' + LOGGER.exception(MSG.format(str(resource_key))) results.append((resource_key, e)) return results @@ -146,14 +143,11 @@ class OpticalTfsDriver(_Driver): resource_key,resource_value = resource try: resource_value = json.loads(resource_value) - flow_id = resource_value['flow_id' ] - src_node = resource_value['src_node'] - dst_node = resource_value['dst_node'] - bitrate = resource_value['bitrate' ] - self.toc.del_lightpath(flow_id, src_node, dst_node, bitrate) + self.tac.teardown_service(resource_value) results.append((resource_key, True)) except Exception as e: - LOGGER.exception('Unhandled error processing resource_key({:s})'.format(str(resource_key))) + MSG = 'Unhandled error processing resource_key({:s})' + LOGGER.exception(MSG.format(str(resource_key))) results.append((resource_key, e)) return results diff --git a/src/device/service/drivers/optical_tfs/TfsApiClient.py b/src/device/service/drivers/optical_tfs/TfsApiClient.py index e9b21f249..49c5a9e4f 100644 --- a/src/device/service/drivers/optical_tfs/TfsApiClient.py +++ b/src/device/service/drivers/optical_tfs/TfsApiClient.py @@ -12,14 +12,22 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, requests -from typing import Dict, List, Optional +import logging +from typing import Dict, List, Optional, Tuple +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.proto.context_pb2 import ServiceStatusEnum, ServiceTypeEnum from common.tools.client.RestClient import RestClient +from common.tools.object_factory.Constraint import json_constraint_custom +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Device import json_device_id +from common.tools.object_factory.EndPoint import json_endpoint_id +from common.tools.object_factory.Service import json_service from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum -GET_CONTEXT_IDS_URL = '/tfs-api/context_ids' -GET_DEVICES_URL = '/tfs-api/devices' -GET_LINKS_URL = '/tfs-api/links' +CONTEXT_IDS_URL = '/tfs-api/context_ids' +TOPOLOGY_URL = '/tfs-api/context/{context_uuid:s}/topology_details/{topology_uuid:s}' +SERVICES_URL = '/tfs-api/context/{context_uuid:s}/services' +SERVICE_URL = '/tfs-api/context/{context_uuid:s}/service/{service_uuid:s}' MAPPING_STATUS = { 'DEVICEOPERATIONALSTATUS_UNDEFINED': 0, @@ -60,7 +68,7 @@ class TfsApiClient(RestClient): ) def check_credentials(self) -> None: - self.get(GET_CONTEXT_IDS_URL, expected_status_codes={requests.codes['OK']}) + self.get(CONTEXT_IDS_URL) LOGGER.info('Credentials checked') def get_devices_endpoints( @@ -74,10 +82,12 @@ class TfsApiClient(RestClient): MSG = 'Unsupported import_topology mode: {:s}' raise Exception(MSG.format(str(import_topology))) - devices = self.get(GET_DEVICES_URL, expected_status_codes={requests.codes['OK']}) + topology = self.get(TOPOLOGY_URL.format( + context_uuid=DEFAULT_CONTEXT_NAME, topology_uuid=DEFAULT_TOPOLOGY_NAME + )) result = list() - for json_device in devices['devices']: + for json_device in topology['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 @@ -110,9 +120,24 @@ class TfsApiClient(RestClient): LOGGER.debug('[get_devices_endpoints] devices only; returning') return result - links = self.get(GET_LINKS_URL, expected_status_codes={requests.codes['OK']}) + for json_link in topology['links']: + link_uuid : str = json_link['link_id']['link_uuid']['uuid'] + link_url = '/links/link[{:s}]'.format(link_uuid) + link_endpoint_ids = [ + ( + json_endpoint_id['device_id']['device_uuid']['uuid'], + json_endpoint_id['endpoint_uuid']['uuid'], + ) + for json_endpoint_id in json_link['link_endpoint_ids'] + ] + link_data = { + 'uuid': json_link['link_id']['link_uuid']['uuid'], + 'name': json_link['name'], + 'endpoints': link_endpoint_ids, + } + result.append((link_url, link_data)) - for json_link in links['links']: + for json_link in topology['optical_links']: link_uuid : str = json_link['link_id']['link_uuid']['uuid'] link_url = '/links/link[{:s}]'.format(link_uuid) link_endpoint_ids = [ @@ -131,3 +156,103 @@ class TfsApiClient(RestClient): LOGGER.debug('[get_devices_endpoints] topology; returning') return result + + def setup_service(self, resource_value : Dict) -> None: + service_uuid = resource_value['service_uuid' ] + service_name = resource_value['service_name' ] + src_device_uuid = resource_value['src_device_uuid' ] + src_endpoint_uuid = resource_value['src_endpoint_uuid'] + dst_device_uuid = resource_value['dst_device_uuid' ] + dst_endpoint_uuid = resource_value['dst_endpoint_uuid'] + bitrate = resource_value['bitrate' ] + bidir = resource_value['bidir' ] + ob_width = resource_value['ob_width' ] + + endpoint_ids = [ + json_endpoint_id(json_device_id(src_device_uuid), src_endpoint_uuid), + json_endpoint_id(json_device_id(dst_device_uuid), dst_endpoint_uuid), + ] + constraints = [ + json_constraint_custom('bandwidth[gbps]', str(bitrate)), + json_constraint_custom('bidirectionality', '1' if bidir else '0'), + ] + if service_name == 'IP1/PORT-xe1==IP2/PORT-xe1': + constraints.append(json_constraint_custom('optical-band-width[GHz]', str(ob_width))) + + service_add = json_service( + service_uuid, + ServiceTypeEnum.Name(ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY), + context_id = json_context_id(DEFAULT_CONTEXT_NAME), + name = service_name, + status = ServiceStatusEnum.Name(ServiceStatusEnum.SERVICESTATUS_PLANNED), + ) + services_url = SERVICES_URL.format(context_uuid=DEFAULT_CONTEXT_NAME) + service_ids = self.post(services_url, body=service_add) + assert len(service_ids) == 1 + service_id = service_ids[0] + service_uuid = service_id['service_uuid']['uuid'] + + service_upd = json_service( + service_uuid, + ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY, + context_id = json_context_id(DEFAULT_CONTEXT_NAME), + name = service_name, endpoint_ids = endpoint_ids, constraints = constraints, + status = ServiceStatusEnum.Name(ServiceStatusEnum.SERVICESTATUS_PLANNED), + ) + service_url = SERVICE_URL.format(context_uuid=DEFAULT_CONTEXT_NAME, service_uuid=service_uuid) + self.put(service_url, body=service_upd) + + def teardown_service(self, resource_value : Dict) -> None: + service_uuid = resource_value['service_uuid'] + service_name = resource_value['service_name'] + + service_url = SERVICE_URL.format(context_uuid=DEFAULT_CONTEXT_NAME, service_uuid=service_uuid) + self.delete(service_url) + if service_name == 'IP1/PORT-xe1==IP2/PORT-xe1': + self.delete(service_url) + + @staticmethod + def parse_service(service : Dict) -> Tuple[str, Dict]: + service_uuid = service['service_id']['service_uuid']['uuid'] + src_endpoint_id = service['service_endpoint_ids'][ 0] + dst_endpoint_id = service['service_endpoint_ids'][-1] + parsed_service = { + 'service_uuid' : service_uuid, + 'service_name' : service['name'], + 'src_device_uuid' : src_endpoint_id['device_id']['device_uuid']['uuid'], + 'src_endpoint_uuid': src_endpoint_id['endpoint_uuid']['uuid'], + 'dst_device_uuid' : dst_endpoint_id['device_id']['device_uuid']['uuid'], + 'dst_endpoint_uuid': dst_endpoint_id['endpoint_uuid']['uuid'], + } + + for constraint in service.get('service_constraints', list()): + if 'custom' not in constraint: continue + constraint_type = constraint['custom']['constraint_type'] + constraint_value = constraint['custom']['constraint_value'] + if constraint_type == 'bandwidth[gbps]': + parsed_service['bitrate'] = int(float(constraint_value)) + if constraint_type == 'bidirectionality': + parsed_service['bidir'] = int(constraint_value) == 1 + if constraint_type == 'optical-band-width[GHz]': + parsed_service['ob_width'] = int(constraint_value) + + resource_key = '/services/service[{:s}]'.format(service_uuid) + return resource_key, parsed_service + + def get_services(self) -> List[Tuple[str, Dict]]: + services_url = SERVICES_URL.format(context_uuid=DEFAULT_CONTEXT_NAME) + _services = self.get(services_url) + OPTICAL_CONNECTIVITY_SERVICE_TYPES = { + 'SERVICETYPE_OPTICAL_CONNECTIVITY', + ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY + } + return [ + TfsApiClient.parse_service(service) + for service in _services['services'] + if service['service_type'] in OPTICAL_CONNECTIVITY_SERVICE_TYPES + ] + + def get_service(self, service_uuid : str) -> Tuple[str, Dict]: + service_url = SERVICE_URL.format(context_uuid=DEFAULT_CONTEXT_NAME, service_uuid=service_uuid) + service = self.get(service_url) + return TfsApiClient.parse_service(service) -- GitLab From 970d7456d7210cd27625412dfec0cbc5c895eab6 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Mar 2025 19:16:54 +0000 Subject: [PATCH 339/463] NBI component - TFS API: - Corrected parsing of POST service requests - Corrected return types of POST methods --- src/nbi/service/tfs_api/Resources.py | 38 +++++++++++++++------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/nbi/service/tfs_api/Resources.py b/src/nbi/service/tfs_api/Resources.py index ab608f2d7..294a06e6e 100644 --- a/src/nbi/service/tfs_api/Resources.py +++ b/src/nbi/service/tfs_api/Resources.py @@ -55,10 +55,10 @@ class Contexts(_Resource): json_requests = request.get_json() if 'contexts' in json_requests: json_requests = json_requests['contexts'] - return [ - format_grpc_to_json(self.context_client.SetContext(grpc_context(context))) + return jsonify([ + grpc_message_to_json(self.context_client.SetContext(grpc_context(context))) for context in json_requests - ] + ]) class Context(_Resource): def get(self, context_uuid : str): @@ -157,10 +157,10 @@ class Topologies(_Resource): for topology in json_requests: if context_uuid != topology['topology_id']['context_id']['context_uuid']['uuid']: raise BadRequest('Mismatching context_uuid') - return [ - format_grpc_to_json(self.context_client.SetTopology(grpc_topology(**topology))) + return jsonify([ + grpc_message_to_json(self.context_client.SetTopology(grpc_topology(topology))) for topology in json_requests - ] + ]) class Topology(_Resource): def get(self, context_uuid : str, topology_uuid : str): @@ -194,13 +194,15 @@ class Services(_Resource): json_requests = request.get_json() if 'services' in json_requests: json_requests = json_requests['services'] + if isinstance(json_requests, dict): + json_requests = [json_requests] for service in json_requests: if context_uuid != service['service_id']['context_id']['context_uuid']['uuid']: raise BadRequest('Mismatching context_uuid') - return [ - format_grpc_to_json(self.service_client.CreateService(grpc_service(**service))) + return jsonify([ + grpc_message_to_json(self.service_client.CreateService(grpc_service(service))) for service in json_requests - ] + ]) class Service(_Resource): def get(self, context_uuid : str, service_uuid : str): @@ -232,10 +234,10 @@ class Slices(_Resource): for slice_ in json_requests: if context_uuid != slice_['slice_id']['context_id']['context_uuid']['uuid']: raise BadRequest('Mismatching context_uuid') - return [ - format_grpc_to_json(self.slice_client.CreateSlice(grpc_slice(**slice_))) + return jsonify([ + grpc_message_to_json(self.slice_client.CreateSlice(grpc_slice(slice_))) for slice_ in json_requests - ] + ]) class Slice(_Resource): def get(self, context_uuid : str, slice_uuid : str): @@ -264,10 +266,10 @@ class Devices(_Resource): json_requests = request.get_json() if 'devices' in json_requests: json_requests = json_requests['devices'] - return [ - format_grpc_to_json(self.device_client.AddDevice(grpc_device(device))) + return jsonify([ + grpc_message_to_json(self.device_client.AddDevice(grpc_device(device))) for device in json_requests - ] + ]) class Device(_Resource): def get(self, device_uuid : str): @@ -294,10 +296,10 @@ class Links(_Resource): json_requests = request.get_json() if 'links' in json_requests: json_requests = json_requests['links'] - return [ - format_grpc_to_json(self.context_client.SetLink(grpc_link(link))) + return jsonify([ + grpc_message_to_json(self.context_client.SetLink(grpc_link(link))) for link in json_requests - ] + ]) class Link(_Resource): def get(self, link_uuid : str): -- GitLab From 0e8bc24b016ae0c94c45cb3a20e56577bc3de2b5 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Mar 2025 19:18:22 +0000 Subject: [PATCH 340/463] Service component - OpticalTfs Service Handler: - Corrected composition of requests for setting up and tearing down optical connectivity services --- .../optical_tfs/OpticalTfsServiceHandler.py | 52 +++++++++++++------ 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/src/service/service/service_handlers/optical_tfs/OpticalTfsServiceHandler.py b/src/service/service/service_handlers/optical_tfs/OpticalTfsServiceHandler.py index 93dfce19e..1b48f90f1 100644 --- a/src/service/service/service_handlers/optical_tfs/OpticalTfsServiceHandler.py +++ b/src/service/service/service_handlers/optical_tfs/OpticalTfsServiceHandler.py @@ -16,7 +16,7 @@ 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_set +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 @@ -36,6 +36,20 @@ class OpticalTfsServiceHandler(_ServiceHandler): self.__task_executor = task_executor self.__settings_handler = SettingsHandler(service.service_config, **settings) + def _get_constraints(self) -> Tuple[Optional[int], Optional[int], Optional[int]]: + bitrate = None + bidir = None + ob_width = None + for constraint in self.__service.service_constraints: + if constraint.WhichOneof('constraint') != 'custom': continue + if constraint.custom.constraint_type == 'bandwidth[gbps]': + bitrate = int(float(constraint.custom.constraint_value)) + elif constraint.custom.constraint_type == 'bidirectionality': + bidir = int(constraint.custom.constraint_value) == 1 + elif constraint.custom.constraint_type == 'optical-band-width[GHz]': + ob_width = int(constraint.custom.constraint_value) + return bitrate, bidir, ob_width + @metered_subclass_method(METRICS_POOL) def SetEndpoint( self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None @@ -45,9 +59,8 @@ class OpticalTfsServiceHandler(_ServiceHandler): 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 - bitrate = json_settings['bitrate'] + service_name = self.__service.name + bitrate, bidir, ob_width = self._get_constraints() results = [] try: @@ -64,10 +77,15 @@ class OpticalTfsServiceHandler(_ServiceHandler): controller = src_controller json_config_rule = json_config_rule_set('/services/service[{:s}]'.format(service_uuid), { - 'uuid' : service_uuid, - 'src_node' : src_endpoint_uuid, - 'dst_node' : dst_endpoint_uuid, - 'bitrate' : bitrate + 'service_uuid' : service_uuid, + 'service_name' : service_name, + 'src_device_uuid' : src_device_uuid, + 'src_endpoint_uuid': src_endpoint_uuid, + 'dst_device_uuid' : dst_device_uuid, + 'dst_endpoint_uuid': dst_endpoint_uuid, + 'bitrate' : bitrate, + 'bidir' : bidir, + 'ob_width' : ob_width, }) del controller.device_config.config_rules[:] controller.device_config.config_rules.append(ConfigRule(**json_config_rule)) @@ -91,7 +109,7 @@ class OpticalTfsServiceHandler(_ServiceHandler): settings = self.__settings_handler.get('/settings') json_settings : Dict = {} if settings is None else settings.value flow_id = json_settings['flow_id'] - bitrate = json_settings['bitrate'] + bitrate, bidir, ob_width = self._get_constraints() results = [] try: @@ -107,12 +125,16 @@ class OpticalTfsServiceHandler(_ServiceHandler): controller = src_controller - json_config_rule = json_config_rule_set('/services/service[{:s}]'.format(service_uuid), { - 'uuid' : service_uuid, - 'flow_id' : flow_id, - 'src_node' : src_endpoint_uuid, - 'dst_node' : dst_endpoint_uuid, - 'bitrate' : bitrate + json_config_rule = json_config_rule_delete('/services/service[{:s}]'.format(service_uuid), { + 'flow_id' : flow_id, + 'service_uuid' : service_uuid, + 'src_device_uuid' : src_device_uuid, + 'src_endpoint_uuid': src_endpoint_uuid, + 'dst_device_uuid' : dst_device_uuid, + 'dst_endpoint_uuid': dst_endpoint_uuid, + 'bitrate' : bitrate, + 'bidir' : bidir, + 'ob_width' : ob_width, }) del controller.device_config.config_rules[:] -- GitLab From 761810ecdfc86433af3223996df439071711473d Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Mar 2025 19:19:05 +0000 Subject: [PATCH 341/463] OFC25 tests: - Corrected E2E and Optical descriptors --- .../ofc25/descriptors/old/topology_e2e.json | 85 +++ .../ofc25/descriptors/old/topology_opt.json | 192 ++++++ src/tests/ofc25/descriptors/topology_e2e.json | 72 +-- src/tests/ofc25/descriptors/topology_opt.json | 549 +++++++++++++++--- 4 files changed, 770 insertions(+), 128 deletions(-) create mode 100644 src/tests/ofc25/descriptors/old/topology_e2e.json create mode 100644 src/tests/ofc25/descriptors/old/topology_opt.json diff --git a/src/tests/ofc25/descriptors/old/topology_e2e.json b/src/tests/ofc25/descriptors/old/topology_e2e.json new file mode 100644 index 000000000..a8adf32ea --- /dev/null +++ b/src/tests/ofc25/descriptors/old/topology_e2e.json @@ -0,0 +1,85 @@ +{ + "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-PACKET"}}, "device_type": "teraflowsdn", + "device_drivers": ["DEVICEDRIVER_IETF_L3VPN"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "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", "import_topology": "topology" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "TFS-OPTICAL"}}, "device_type": "teraflowsdn", + "device_drivers": ["DEVICEDRIVER_OPTICAL_TFS"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "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": "8003"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http", "username": "admin", "password": "admin", "import_topology": "topology" + }}} + ]} + } + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "IP1-T1.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"device_id": {"device_uuid": {"uuid": "T1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "IP1-T1.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"device_id": {"device_uuid": {"uuid": "T1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "IP1-T1.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"device_id": {"device_uuid": {"uuid": "T1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + + {"link_id": {"link_uuid": {"uuid": "IP2-TP2.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"device_id": {"device_uuid": {"uuid": "TP2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "IP2-TP2.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"device_id": {"device_uuid": {"uuid": "TP2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "IP2-TP2.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"device_id": {"device_uuid": {"uuid": "TP2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + + {"link_id": {"link_uuid": {"uuid": "T1.1-IP1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "T1.2-IP1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "T1.3-IP1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "TP2.1-IP2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP2.2-IP2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP2.3-IP2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + ]} + ] +} diff --git a/src/tests/ofc25/descriptors/old/topology_opt.json b/src/tests/ofc25/descriptors/old/topology_opt.json new file mode 100644 index 000000000..dffa68ed2 --- /dev/null +++ b/src/tests/ofc25/descriptors/old/topology_opt.json @@ -0,0 +1,192 @@ +{ + "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": "TP1.1"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "LINE", "type": "optical/channel"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "TP1.2"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "LINE", "type": "optical/channel"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "TP1.3"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "LINE", "type": "optical/channel"} + ]}}} + ]} + }, + + { + "device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "device_type": "emu-optical-roadm", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "ADP1", "type": "optical/add-drop"}, + {"uuid": "ADP2", "type": "optical/add-drop"}, + {"uuid": "ADP3", "type": "optical/add-drop"}, + {"uuid": "LINE2", "type": "optical/line" } + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "device_type": "emu-optical-roadm", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "LINE1", "type": "optical/line"}, + {"uuid": "LINE3", "type": "optical/line"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "device_type": "emu-optical-roadm", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "ADP1", "type": "optical/add-drop"}, + {"uuid": "ADP2", "type": "optical/add-drop"}, + {"uuid": "ADP3", "type": "optical/add-drop"}, + {"uuid": "LINE2", "type": "optical/line" } + ]}}} + ]} + }, + + { + "device_id": {"device_uuid": {"uuid": "TP2.1"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "LINE", "type": "optical/channel"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "TP2.2"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "LINE", "type": "optical/channel"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "TP2.3"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "LINE", "type": "optical/channel"} + ]}}} + ]} + } + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "MG-ON1->MG-ON2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "LINE2"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "endpoint_uuid": {"uuid": "LINE1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON2->MG-ON1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "endpoint_uuid": {"uuid": "LINE1"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "LINE2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON2->MG-ON3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "endpoint_uuid": {"uuid": "LINE3"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "LINE2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON3->MG-ON2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "LINE2"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "endpoint_uuid": {"uuid": "LINE3"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "TP1.1->MG-ON1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP1.1" }}, "endpoint_uuid": {"uuid": "LINE"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP1.2->MG-ON1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP1.2" }}, "endpoint_uuid": {"uuid": "LINE"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP1.3->MG-ON1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP1.3" }}, "endpoint_uuid": {"uuid": "LINE"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP2.1->MG-ON3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP2.1" }}, "endpoint_uuid": {"uuid": "LINE"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP2.2->MG-ON3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP2.2" }}, "endpoint_uuid": {"uuid": "LINE"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "TP2.3->MG-ON3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "TP2.3" }}, "endpoint_uuid": {"uuid": "LINE"}}, + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP3"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "MG-ON1->TP1.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP1"}}, + {"device_id": {"device_uuid": {"uuid": "TP1.1" }}, "endpoint_uuid": {"uuid": "LINE"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON1->TP1.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP2"}}, + {"device_id": {"device_uuid": {"uuid": "TP1.2" }}, "endpoint_uuid": {"uuid": "LINE"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON1->TP1.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP3"}}, + {"device_id": {"device_uuid": {"uuid": "TP1.3" }}, "endpoint_uuid": {"uuid": "LINE"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON3->TP2.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP1"}}, + {"device_id": {"device_uuid": {"uuid": "TP2.1" }}, "endpoint_uuid": {"uuid": "LINE"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON3->TP2.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP2"}}, + {"device_id": {"device_uuid": {"uuid": "TP2.2" }}, "endpoint_uuid": {"uuid": "LINE"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "MG-ON3->TP2.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP3"}}, + {"device_id": {"device_uuid": {"uuid": "TP2.3" }}, "endpoint_uuid": {"uuid": "LINE"}} + ]} + ] +} diff --git a/src/tests/ofc25/descriptors/topology_e2e.json b/src/tests/ofc25/descriptors/topology_e2e.json index 16a4ead24..4d721861f 100644 --- a/src/tests/ofc25/descriptors/topology_e2e.json +++ b/src/tests/ofc25/descriptors/topology_e2e.json @@ -30,56 +30,56 @@ } ], "links": [ - {"link_id": {"link_uuid": {"uuid": "IP1-TP1.1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, - {"device_id": {"device_uuid": {"uuid": "TP1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + {"link_id": {"link_uuid": {"uuid": "IP1-T1.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"device_id": {"device_uuid": {"uuid": "T1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} ]}, - {"link_id": {"link_uuid": {"uuid": "IP1-TP1.2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, - {"device_id": {"device_uuid": {"uuid": "TP1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + {"link_id": {"link_uuid": {"uuid": "IP1-T1.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"device_id": {"device_uuid": {"uuid": "T1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} ]}, - {"link_id": {"link_uuid": {"uuid": "IP1-TP1.3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, - {"device_id": {"device_uuid": {"uuid": "TP1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + {"link_id": {"link_uuid": {"uuid": "IP1-T1.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"device_id": {"device_uuid": {"uuid": "T1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} ]}, - {"link_id": {"link_uuid": {"uuid": "IP2-TP2.1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, - {"device_id": {"device_uuid": {"uuid": "TP2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + {"link_id": {"link_uuid": {"uuid": "IP2-T2.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"device_id": {"device_uuid": {"uuid": "T2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} ]}, - {"link_id": {"link_uuid": {"uuid": "IP2-TP2.2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, - {"device_id": {"device_uuid": {"uuid": "TP2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + {"link_id": {"link_uuid": {"uuid": "IP2-T2.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"device_id": {"device_uuid": {"uuid": "T2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} ]}, - {"link_id": {"link_uuid": {"uuid": "IP2-TP2.3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, - {"device_id": {"device_uuid": {"uuid": "TP2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + {"link_id": {"link_uuid": {"uuid": "IP2-T2.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"device_id": {"device_uuid": {"uuid": "T2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} ]}, - {"link_id": {"link_uuid": {"uuid": "TP1.1-IP1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "TP1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, - {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + {"link_id": {"link_uuid": {"uuid": "T1.1-IP1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe1"}} ]}, - {"link_id": {"link_uuid": {"uuid": "TP1.2-IP1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "TP1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, - {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + {"link_id": {"link_uuid": {"uuid": "T1.2-IP1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe2"}} ]}, - {"link_id": {"link_uuid": {"uuid": "TP1.3-IP1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "TP1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, - {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + {"link_id": {"link_uuid": {"uuid": "T1.3-IP1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe3"}} ]}, - {"link_id": {"link_uuid": {"uuid": "TP2.1-IP2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "TP2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, - {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + {"link_id": {"link_uuid": {"uuid": "T2.1-IP2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe1"}} ]}, - {"link_id": {"link_uuid": {"uuid": "TP2.2-IP2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "TP2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, - {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + {"link_id": {"link_uuid": {"uuid": "T2.2-IP2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe2"}} ]}, - {"link_id": {"link_uuid": {"uuid": "TP2.3-IP2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "TP2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, - {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + {"link_id": {"link_uuid": {"uuid": "T2.3-IP2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe3"}} ]} ] } diff --git a/src/tests/ofc25/descriptors/topology_opt.json b/src/tests/ofc25/descriptors/topology_opt.json index dffa68ed2..a39713821 100644 --- a/src/tests/ofc25/descriptors/topology_opt.json +++ b/src/tests/ofc25/descriptors/topology_opt.json @@ -7,186 +7,551 @@ ], "devices": [ { - "device_id": {"device_uuid": {"uuid": "TP1.1"}}, "device_type": "emu-optical-transponder", + "device_id": {"device_uuid": {"uuid": "T1.1"}}, "device_type": "emu-optical-transponder", "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"uuid": "CLIENT", "type": "copper" }, - {"uuid": "LINE", "type": "optical/channel"} + {"uuid": "1", "type": "optical/channel"} ]}}} ]} }, { - "device_id": {"device_uuid": {"uuid": "TP1.2"}}, "device_type": "emu-optical-transponder", + "device_id": {"device_uuid": {"uuid": "T1.2"}}, "device_type": "emu-optical-transponder", "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"uuid": "CLIENT", "type": "copper" }, - {"uuid": "LINE", "type": "optical/channel"} + {"uuid": "2", "type": "optical/channel"} ]}}} ]} }, { - "device_id": {"device_uuid": {"uuid": "TP1.3"}}, "device_type": "emu-optical-transponder", + "device_id": {"device_uuid": {"uuid": "T1.3"}}, "device_type": "emu-optical-transponder", "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"uuid": "CLIENT", "type": "copper" }, - {"uuid": "LINE", "type": "optical/channel"} + {"uuid": "3", "type": "optical/channel"} ]}}} ]} }, { - "device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "device_type": "emu-optical-roadm", + "device_id": {"device_uuid": {"uuid": "MGON1"}}, "device_type": "emu-optical-roadm", "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ - {"uuid": "ADP1", "type": "optical/add-drop"}, - {"uuid": "ADP2", "type": "optical/add-drop"}, - {"uuid": "ADP3", "type": "optical/add-drop"}, - {"uuid": "LINE2", "type": "optical/line" } + {"uuid": "port-33-in", "type": "optical/client-add" }, + {"uuid": "port-33-out", "type": "optical/client-drop"}, + {"uuid": "port-34-in", "type": "optical/client-add" }, + {"uuid": "port-34-out", "type": "optical/client-drop"}, + {"uuid": "port-35-in", "type": "optical/client-add" }, + {"uuid": "port-35-out", "type": "optical/client-drop"}, + {"uuid": "port-9-in", "type": "optical/line-in" }, + {"uuid": "port-9-out", "type": "optical/line-out" } ]}}} ]} }, { - "device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "device_type": "emu-optical-roadm", + "device_id": {"device_uuid": {"uuid": "MGON2"}}, "device_type": "emu-optical-roadm", "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ - {"uuid": "LINE1", "type": "optical/line"}, - {"uuid": "LINE3", "type": "optical/line"} + {"uuid": "port-1-in", "type": "optical/line-in" }, + {"uuid": "port-1-out", "type": "optical/line-out" }, + {"uuid": "port-9-in", "type": "optical/line-in" }, + {"uuid": "port-9-out", "type": "optical/line-out" } ]}}} ]} }, { - "device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "device_type": "emu-optical-roadm", + "device_id": {"device_uuid": {"uuid": "MGON3"}}, "device_type": "emu-optical-roadm", "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ - {"uuid": "ADP1", "type": "optical/add-drop"}, - {"uuid": "ADP2", "type": "optical/add-drop"}, - {"uuid": "ADP3", "type": "optical/add-drop"}, - {"uuid": "LINE2", "type": "optical/line" } + {"uuid": "port-33-in", "type": "optical/client-add" }, + {"uuid": "port-33-out", "type": "optical/client-drop"}, + {"uuid": "port-34-in", "type": "optical/client-add" }, + {"uuid": "port-34-out", "type": "optical/client-drop"}, + {"uuid": "port-35-in", "type": "optical/client-add" }, + {"uuid": "port-35-out", "type": "optical/client-drop"}, + {"uuid": "port-1-in", "type": "optical/line-in" }, + {"uuid": "port-1-out", "type": "optical/line-out" } ]}}} ]} }, { - "device_id": {"device_uuid": {"uuid": "TP2.1"}}, "device_type": "emu-optical-transponder", + "device_id": {"device_uuid": {"uuid": "T2.1"}}, "device_type": "emu-optical-transponder", "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"uuid": "CLIENT", "type": "copper" }, - {"uuid": "LINE", "type": "optical/channel"} + {"uuid": "1", "type": "optical/channel"} ]}}} ]} }, { - "device_id": {"device_uuid": {"uuid": "TP2.2"}}, "device_type": "emu-optical-transponder", + "device_id": {"device_uuid": {"uuid": "T2.2"}}, "device_type": "emu-optical-transponder", "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"uuid": "CLIENT", "type": "copper" }, - {"uuid": "LINE", "type": "optical/channel"} + {"uuid": "2", "type": "optical/channel"} ]}}} ]} }, { - "device_id": {"device_uuid": {"uuid": "TP2.3"}}, "device_type": "emu-optical-transponder", + "device_id": {"device_uuid": {"uuid": "T2.3"}}, "device_type": "emu-optical-transponder", "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ {"uuid": "CLIENT", "type": "copper" }, - {"uuid": "LINE", "type": "optical/channel"} + {"uuid": "3", "type": "optical/channel"} ]}}} ]} } ], - "links": [ - {"link_id": {"link_uuid": {"uuid": "MG-ON1->MG-ON2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "LINE2"}}, - {"device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "endpoint_uuid": {"uuid": "LINE1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "MG-ON2->MG-ON1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "endpoint_uuid": {"uuid": "LINE1"}}, - {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "LINE2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "MG-ON2->MG-ON3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "endpoint_uuid": {"uuid": "LINE3"}}, - {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "LINE2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "MG-ON3->MG-ON2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "LINE2"}}, - {"device_id": {"device_uuid": {"uuid": "MG-ON2"}}, "endpoint_uuid": {"uuid": "LINE3"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "TP1.1->MG-ON1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "TP1.1" }}, "endpoint_uuid": {"uuid": "LINE"}}, - {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "TP1.2->MG-ON1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "TP1.2" }}, "endpoint_uuid": {"uuid": "LINE"}}, - {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "TP1.3->MG-ON1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "TP1.3" }}, "endpoint_uuid": {"uuid": "LINE"}}, - {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP3"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "TP2.1->MG-ON3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "TP2.1" }}, "endpoint_uuid": {"uuid": "LINE"}}, - {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "TP2.2->MG-ON3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "TP2.2" }}, "endpoint_uuid": {"uuid": "LINE"}}, - {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "TP2.3->MG-ON3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "TP2.3" }}, "endpoint_uuid": {"uuid": "LINE"}}, - {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP3"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "MG-ON1->TP1.1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP1"}}, - {"device_id": {"device_uuid": {"uuid": "TP1.1" }}, "endpoint_uuid": {"uuid": "LINE"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "MG-ON1->TP1.2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP2"}}, - {"device_id": {"device_uuid": {"uuid": "TP1.2" }}, "endpoint_uuid": {"uuid": "LINE"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "MG-ON1->TP1.3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "MG-ON1"}}, "endpoint_uuid": {"uuid": "ADP3"}}, - {"device_id": {"device_uuid": {"uuid": "TP1.3" }}, "endpoint_uuid": {"uuid": "LINE"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "MG-ON3->TP2.1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP1"}}, - {"device_id": {"device_uuid": {"uuid": "TP2.1" }}, "endpoint_uuid": {"uuid": "LINE"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "MG-ON3->TP2.2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP2"}}, - {"device_id": {"device_uuid": {"uuid": "TP2.2" }}, "endpoint_uuid": {"uuid": "LINE"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "MG-ON3->TP2.3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "MG-ON3"}}, "endpoint_uuid": {"uuid": "ADP3"}}, - {"device_id": {"device_uuid": {"uuid": "TP2.3" }}, "endpoint_uuid": {"uuid": "LINE"}} - ]} + "optical_links": [ + { + "name": "T1.1-MGON1", "link_id": {"link_uuid": {"uuid": "T1.1->MGON1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.1" }}, "endpoint_uuid": {"uuid": "1" }}, + {"device_id": {"device_uuid": {"uuid": "MGON1"}}, "endpoint_uuid": {"uuid": "port-33-in"}} + ], + "optical_details": { + "length": 0, "src_port": "1", "dst_port": "port-33-in", "local_peer_port": "1", "remote_peer_port": "port-33-out", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "T1.2-MGON1", "link_id": {"link_uuid": {"uuid": "T1.2->MGON1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.2"}}, "endpoint_uuid": {"uuid": "2"}}, + {"device_id": {"device_uuid": {"uuid": "MGON1"}},"endpoint_uuid": {"uuid": "port-34-in"}} + ], + "optical_details": { + "length": 0, + "src_port": "2", + "dst_port": "port-34-in", + "local_peer_port": "2", + "remote_peer_port": "port-34-out", + "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "T1.3-MGON1", "link_id": {"link_uuid": {"uuid": "T1.3->MGON1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.3"}}, "endpoint_uuid": {"uuid": "3"}}, + {"device_id": {"device_uuid": {"uuid": "MGON1"}},"endpoint_uuid": {"uuid": "port-35-in"}} + ], + "optical_details": { + "length": 0, "src_port": "3", "dst_port": "port-35-in", "local_peer_port": "3", "remote_peer_port": "port-35-out", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON1-T1.1", "link_id": {"link_uuid": {"uuid": "MGON1->T1.1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON1"}}, "endpoint_uuid": {"uuid": "port-33-out"}}, + {"device_id": {"device_uuid": {"uuid": "T1.1"}},"endpoint_uuid": {"uuid": "1"}} + ], + "optical_details": { + "length": 0, "src_port": "port-33-out", "dst_port": "1", "local_peer_port": "port-33-in", "remote_peer_port": "1", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON1-T1.2", "link_id": {"link_uuid": {"uuid": "MGON1->T1.2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON1"}}, "endpoint_uuid": {"uuid": "port-34-out"}}, + {"device_id": {"device_uuid": {"uuid": "T1.2"}},"endpoint_uuid": {"uuid": "2"}} + ], + "optical_details": { + "length": 0, "src_port": "port-34-out", "dst_port": "2", "local_peer_port": "port-34-in", "remote_peer_port": "2", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON1-T1.3", "link_id": {"link_uuid": {"uuid": "MGON1->T1.3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON1"}}, "endpoint_uuid": {"uuid": "port-35-out"}}, + {"device_id": {"device_uuid": {"uuid": "T1.3"}},"endpoint_uuid": {"uuid": "3"}} + ], + "optical_details": { + "length": 0, "src_port": "port-35-out", "dst_port": "3", "local_peer_port": "port-35-in", "remote_peer_port": "3", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON1-MGON2", "link_id": {"link_uuid": {"uuid": "MGON1->MGON2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON1"}}, "endpoint_uuid": {"uuid": "port-9-out"}}, + {"device_id": {"device_uuid": {"uuid": "MGON2"}},"endpoint_uuid": {"uuid": "port-1-in"}} + ], + "optical_details": { + "length": 0, "src_port": "port-9-out", "dst_port": "port-1-in", "local_peer_port": "port-9-in", "remote_peer_port": "port-1-out", + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON2-MGON1", "link_id": {"link_uuid": {"uuid": "MGON2->MGON1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON2"}}, "endpoint_uuid": {"uuid": "port-1-out"}}, + {"device_id": {"device_uuid": {"uuid": "MGON1"}},"endpoint_uuid": {"uuid": "port-9-in"}} + ], + "optical_details": { + "length": 0, "src_port": "port-1-out", "dst_port": "port-9-in", "local_peer_port": "port-1-in", "remote_peer_port": "port-9-out", + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON2-MGON3", "link_id": {"link_uuid": {"uuid": "MGON2->MGON3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON2"}}, "endpoint_uuid": {"uuid": "port-9-out"}}, + {"device_id": {"device_uuid": {"uuid": "MGON3"}},"endpoint_uuid": {"uuid": "port-1-in"}} + ], + "optical_details": { + "length": 0, "src_port": "port-9-out", "dst_port": "port-1-in", "local_peer_port": "port-9-in", "remote_peer_port": "port-1-out", + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON3-MGON2", "link_id": {"link_uuid": {"uuid": "MGON3->MGON2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON3"}}, "endpoint_uuid": {"uuid": "port-1-out"}}, + {"device_id": {"device_uuid": {"uuid": "MGON2"}},"endpoint_uuid": {"uuid": "port-9-in"}} + ], + "optical_details": { + "length": 0, "src_port": "port-1-out", "dst_port": "port-9-in", "local_peer_port": "port-1-in", "remote_peer_port": "port-9-out", + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "T2.1-MGON3", "link_id": {"link_uuid": {"uuid": "T2.1->MGON3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.1"}}, "endpoint_uuid": {"uuid": "1"}}, + {"device_id": {"device_uuid": {"uuid": "MGON3"}},"endpoint_uuid": {"uuid": "port-33-in"}} + ], + "optical_details": { + "length": 0, "src_port": "1", "dst_port": "port-33-in", "local_peer_port": "1", "remote_peer_port": "port-33-out", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "T2.2-MGON3", "link_id": {"link_uuid": {"uuid": "T2.2->MGON3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.2"}}, "endpoint_uuid": {"uuid": "2"}}, + {"device_id": {"device_uuid": {"uuid": "MGON3"}},"endpoint_uuid": {"uuid": "port-34-in"}} + ], + "optical_details": { + "length": 0, "src_port": "2", "dst_port": "port-34-in", "local_peer_port": "2", "remote_peer_port": "port-34-out", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "T2.3-MGON3", "link_id": {"link_uuid": {"uuid": "T2.3->MGON3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.3"}}, "endpoint_uuid": {"uuid": "3"}}, + {"device_id": {"device_uuid": {"uuid": "MGON3"}},"endpoint_uuid": {"uuid": "port-35-in"}} + ], + "optical_details": { + "length": 0, "src_port": "3", "dst_port": "port-35-in", "local_peer_port": "3", "remote_peer_port": "port-35-out", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON3-T2.1", "link_id": {"link_uuid": {"uuid": "MGON3->T2.1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON3"}}, "endpoint_uuid": {"uuid": "port-33-out"}}, + {"device_id": {"device_uuid": {"uuid": "T2.1"}},"endpoint_uuid": {"uuid": "1"}} + ], + "optical_details": { + "length": 0, "src_port": "port-33-out", "dst_port": "1", "local_peer_port": "port-33-in", "remote_peer_port": "1", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON3-T2.2", "link_id": {"link_uuid": {"uuid": "MGON3->T2.2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON3"}}, "endpoint_uuid": {"uuid": "port-34-out"}}, + {"device_id": {"device_uuid": {"uuid": "T2.2"}},"endpoint_uuid": {"uuid": "2"}} + ], + "optical_details": { + "length": 0, "src_port": "port-34-out", "dst_port": "2", "local_peer_port": "port-34-in", "remote_peer_port": "2", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON3-T2.3", "link_id": {"link_uuid": {"uuid": "MGON3->T2.3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON3"}}, "endpoint_uuid": {"uuid": "port-35-out"}}, + {"device_id": {"device_uuid": {"uuid": "T2.3"}},"endpoint_uuid": {"uuid": "3"}} + ], + "optical_details": { + "length": 0, "src_port": "port-35-out", "dst_port": "3", "local_peer_port": "port-35-in", "remote_peer_port": "3", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + } ] } -- GitLab From a377af3d7a34c46e729d7edd5dab35f419c96385 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 17 Mar 2025 19:21:20 +0000 Subject: [PATCH 342/463] Service component: - Added translation of UUID to name for optical connection endpoint devices - Extended Task_ConnectionConfigure to delegate on remote TeraFlowSDN controllers when needed --- src/service/service/ServiceServiceServicerImpl.py | 12 ++++++++++-- .../tasks/Task_ConnectionConfigure.py | 15 +++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py index b6f8a7faf..9a9bd27df 100644 --- a/src/service/service/ServiceServiceServicerImpl.py +++ b/src/service/service/ServiceServiceServicerImpl.py @@ -13,7 +13,7 @@ # limitations under the License. import grpc, json, logging, random, uuid -from typing import Optional +from typing import Dict, Optional from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.method_wrappers.ServiceExceptions import ( AlreadyExistsException, InvalidArgumentException, NotFoundException, NotImplementedException, @@ -265,10 +265,18 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): devices = topology_details.devices context_uuid_x = topology_details.topology_id.context_id.context_uuid.uuid topology_uuid_x = topology_details.topology_id.topology_uuid.uuid + + device_names : Dict[str, str] = dict() + for device in devices: + device_uuid = device.device_id.device_uuid.uuid + device_names[device_uuid] = device.name + devs = [] ports = [] for endpoint_id in service.service_endpoint_ids: - devs.append(endpoint_id.device_id.device_uuid.uuid) + endpoint_device_uuid = endpoint_id.device_id.device_uuid.uuid + endpoint_device_name = device_names[endpoint_device_uuid] + devs.append(endpoint_device_name) ports.append(endpoint_id.endpoint_uuid.uuid) src = devs[0] dst = devs[1] diff --git a/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py b/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py index fac991432..d98daf280 100644 --- a/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py +++ b/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py @@ -56,12 +56,15 @@ class Task_ConnectionConfigure(_Task): endpointids_to_set = endpointids_to_raw(connection.path_hops_endpoint_ids) errors = list() - for _, (service_handler, connection_devices) in service_handlers.items(): - _endpointids_to_set = [ - (device_uuid, endpoint_uuid, topology_uuid) - for device_uuid, endpoint_uuid, topology_uuid in endpointids_to_set - if device_uuid in connection_devices - ] + for device_type, (service_handler, connection_devices) in service_handlers.items(): + if device_type == DeviceTypeEnum.TERAFLOWSDN_CONTROLLER: + _endpointids_to_set = endpointids_to_set + else: + _endpointids_to_set = [ + (device_uuid, endpoint_uuid, topology_uuid) + for device_uuid, endpoint_uuid, topology_uuid in endpointids_to_set + if device_uuid in connection_devices + ] results_setendpoint = service_handler.SetEndpoint( _endpointids_to_set, connection_uuid=connection_uuid ) -- GitLab From 7cfd29c6215372fcdd726381dc63dea1bf72a545 Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Tue, 18 Mar 2025 10:33:08 +0000 Subject: [PATCH 343/463] Solve some minor typo --- manifests/osm_clientservice.yaml | 3 +-- src/osm_client/Config.py | 4 +--- src/osm_client/client/OsmClient.py | 3 ++- src/osm_client/service/OsmClientServiceServicerImpl.py | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/manifests/osm_clientservice.yaml b/manifests/osm_clientservice.yaml index bf536e2fd..ef9eaa2f8 100644 --- a/manifests/osm_clientservice.yaml +++ b/manifests/osm_clientservice.yaml @@ -71,5 +71,4 @@ spec: - name: metrics protocol: TCP port: 9192 - targetPort: ---- \ No newline at end of file + targetPort: 9192 diff --git a/src/osm_client/Config.py b/src/osm_client/Config.py index 84feff3d9..d34980c43 100644 --- a/src/osm_client/Config.py +++ b/src/osm_client/Config.py @@ -15,6 +15,4 @@ from common.Settings import get_setting DEFAULT_OSM_ADDRESS = '127.0.0.1' -OSM_ADDRESS = get_setting('OSM_ADDRESS', DEFAULT_OSM_ADDRESS) - - \ No newline at end of file +OSM_ADDRESS = get_setting('OSM_ADDRESS', default=DEFAULT_OSM_ADDRESS) diff --git a/src/osm_client/client/OsmClient.py b/src/osm_client/client/OsmClient.py index 239e2a2fb..2ef7a414e 100644 --- a/src/osm_client/client/OsmClient.py +++ b/src/osm_client/client/OsmClient.py @@ -16,6 +16,7 @@ import grpc, logging from common.Constants import ServiceNameEnum from common.Settings import get_service_host, get_service_port_grpc from common.proto.osm_client_pb2_grpc import OsmServiceStub +from common.proto.osm_client_pb2 import CreateRequest, CreateResponse, NsiListResponse, GetRequest, GetResponse, DeleteRequest, DeleteResponse from common.proto.context_pb2 import (Empty) from common.tools.client.RetryDecorator import retry, delay_exponential from common.tools.grpc.Tools import grpc_message_to_json_string @@ -76,4 +77,4 @@ class OsmClient: LOGGER.debug('NsiDelete request: {:s}'.format(grpc_message_to_json_string(request))) response = self.stub.NsiDelete(request) LOGGER.debug('NsiDelete result: {:s}'.format(grpc_message_to_json_string(response))) - return response \ No newline at end of file + return response diff --git a/src/osm_client/service/OsmClientServiceServicerImpl.py b/src/osm_client/service/OsmClientServiceServicerImpl.py index 5bbde3b8b..8e9bf1ea6 100644 --- a/src/osm_client/service/OsmClientServiceServicerImpl.py +++ b/src/osm_client/service/OsmClientServiceServicerImpl.py @@ -67,4 +67,4 @@ class OsmClientServiceServicerImpl(OsmServiceServicer): resp = DeleteResponse(succeded = False, errormessage = str(e)) else: resp = DeleteResponse(succeded = True) - return resp \ No newline at end of file + return resp -- GitLab From 1d4f227b04de6d47a9ceaa35e640fe161a608136 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 13:55:44 +0000 Subject: [PATCH 344/463] Common - Object Factory tools: - Added field name to json_link() --- src/common/tools/object_factory/Link.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/tools/object_factory/Link.py b/src/common/tools/object_factory/Link.py index 358a30b96..35cef889a 100644 --- a/src/common/tools/object_factory/Link.py +++ b/src/common/tools/object_factory/Link.py @@ -15,6 +15,8 @@ import copy from typing import Dict, List, Optional, Tuple +from common.proto.context_pb2 import LinkTypeEnum + def get_link_uuid(a_endpoint_id : Dict, z_endpoint_id : Dict) -> str: return '{:s}/{:s}=={:s}/{:s}'.format( a_endpoint_id['device_id']['device_uuid']['uuid'], a_endpoint_id['endpoint_uuid']['uuid'], @@ -25,9 +27,13 @@ def json_link_id(link_uuid : str) -> Dict: def json_link( link_uuid : str, endpoint_ids : List[Dict], name : Optional[str] = None, + link_type : LinkTypeEnum = LinkTypeEnum.LINKTYPE_UNKNOWN, total_capacity_gbps : Optional[float] = None, used_capacity_gbps : Optional[float] = None ) -> Dict: - result = {'link_id': json_link_id(link_uuid), 'link_endpoint_ids': copy.deepcopy(endpoint_ids)} + result = { + 'link_id': json_link_id(link_uuid), 'link_type': link_type, + 'link_endpoint_ids': copy.deepcopy(endpoint_ids), + } if name is not None: result['name'] = name if total_capacity_gbps is not None: attributes : Dict = result.setdefault('attributes', dict()) -- GitLab From 055dae1e2df9a664283df7a33a00e3fc7705a088 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 13:56:14 +0000 Subject: [PATCH 345/463] Context component: - Added field "position" to optical link endpoints --- src/context/service/database/Link.py | 4 +++- src/context/service/database/OpticalLink.py | 10 +++++----- .../service/database/models/OpticalLinkModel.py | 15 +++++++++++---- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/context/service/database/Link.py b/src/context/service/database/Link.py index 6244a8517..5782667be 100644 --- a/src/context/service/database/Link.py +++ b/src/context/service/database/Link.py @@ -18,7 +18,9 @@ from sqlalchemy.engine import Engine from sqlalchemy.orm import Session, selectinload, sessionmaker from sqlalchemy_cockroachdb import run_transaction from typing import Dict, List, Optional, Set, Tuple -from common.proto.context_pb2 import Empty, EventTypeEnum, Link, LinkId, LinkIdList, LinkList, TopologyId +from common.proto.context_pb2 import ( + Empty, EventTypeEnum, Link, LinkId, LinkIdList, LinkList, TopologyId +) from common.message_broker.MessageBroker import MessageBroker from common.method_wrappers.ServiceExceptions import NotFoundException from common.tools.object_factory.Link import json_link_id diff --git a/src/context/service/database/OpticalLink.py b/src/context/service/database/OpticalLink.py index 1f45daf43..785ce8098 100644 --- a/src/context/service/database/OpticalLink.py +++ b/src/context/service/database/OpticalLink.py @@ -66,9 +66,10 @@ def optical_link_set(db_engine : Engine, messagebroker : MessageBroker, request now = datetime.datetime.now(datetime.timezone.utc) - # By default, always add link to default Context/Topology topology_uuids : Set[str] = set() related_topologies : List[Dict] = list() + + # By default, always add link to default Context/Topology _,topology_uuid = topology_get_uuid(TopologyId(), allow_random=False, allow_default=True) related_topologies.append({ 'topology_uuid': topology_uuid, @@ -77,15 +78,14 @@ def optical_link_set(db_engine : Engine, messagebroker : MessageBroker, request topology_uuids.add(topology_uuid) link_endpoints_data : List[Dict] = list() - for i,endpoint_id in enumerate(request.link_endpoint_ids): - endpoint_topology_uuid, endpoint_device_uuid, endpoint_uuid = endpoint_get_uuid( - endpoint_id, endpoint_name="", allow_random=True) + 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/models/OpticalLinkModel.py b/src/context/service/database/models/OpticalLinkModel.py index 930e8935c..d43fee018 100644 --- a/src/context/service/database/models/OpticalLinkModel.py +++ b/src/context/service/database/models/OpticalLinkModel.py @@ -12,13 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. - -from sqlalchemy import Column, DateTime, ForeignKey, Integer, String ,Boolean +import operator +from sqlalchemy import ( + Boolean, CheckConstraint, Column, DateTime, ForeignKey, Integer, String +) from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.orm import relationship from typing import Dict from ._Base import _Base -from .Slot import C_Slot ,S_Slot , L_Slot +from .Slot import C_Slot, S_Slot, L_Slot class OpticalLinkModel(_Base): __tablename__ = 'opticallink' @@ -59,7 +61,7 @@ class OpticalLinkModel(_Base): }, 'link_endpoint_ids' : [ optical_endpoint.endpoint.dump_id() - for optical_endpoint in self.opticallink_endpoints + for optical_endpoint in sorted(self.opticallink_endpoints, key=operator.attrgetter('position')) ], } return result @@ -69,6 +71,11 @@ class OpticalLinkEndPointModel(_Base): link_uuid = Column(ForeignKey('opticallink.opticallink_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) optical_link = relationship('OpticalLinkModel', back_populates='opticallink_endpoints') endpoint = relationship('EndPointModel', lazy='selectin') + + __table_args__ = ( + CheckConstraint(position >= 0, name='check_position_value'), + ) -- GitLab From 7f1e6dd1d0aee98bb35a67f445370e466bfd7304 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 13:57:06 +0000 Subject: [PATCH 346/463] E2E Orchestrator component: - Corrected vnt recommendations message formatting --- .../dispatchers/recommendation/ClientNamespace.py | 4 ++-- .../subscriptions/dispatchers/recommendation/Dispatcher.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/ClientNamespace.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/ClientNamespace.py index 168a136de..b20b5a5f0 100644 --- a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/ClientNamespace.py +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/ClientNamespace.py @@ -54,7 +54,7 @@ class ClientNamespace(socketio.ClientNamespace): reply['_request_key'] = request_key try: reply['result'] = result.result() - event = reply['result']['event'] + event = reply['result'].pop('event') except Exception as e: reply['error'] = str(e) #reply['stacktrace'] = str(e) @@ -87,7 +87,7 @@ class ClientNamespace(socketio.ClientNamespace): reply['_request_key'] = request_key try: reply['result'] = result.result() - event = reply['result']['event'] + event = reply['result'].pop('event') except Exception as e: reply['error'] = str(e) #reply['stacktrace'] = str(e) diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Dispatcher.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Dispatcher.py index 4fd452857..6913014ad 100644 --- a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Dispatcher.py +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Dispatcher.py @@ -43,12 +43,13 @@ class RecommendationDispatcher(_Dispatcher): service_client = ServiceClient() service_id = service_client.CreateService(Service(**vlink_optical_service_add)) - vlink_optical_service['service_id']['service_uuid']['uuid'] = service_id.service_uuid.uuid + service_uuid = service_id.service_uuid.uuid + vlink_optical_service['service_id']['service_uuid']['uuid'] = service_uuid service_id = service_client.UpdateService(Service(**vlink_optical_service)) - result = {'event': 'vlink_created'} + result = {'event': 'vlink_created', 'vlink_uuid': service_uuid} elif request.action == RecommendationAction.VLINK_REMOVE: - vlink_service_uuid = request.data['link_id']['link_uuid']['uuid'] + vlink_service_uuid = request.data['link_uuid']['uuid'] context_id = json_context_id(DEFAULT_CONTEXT_NAME) vlink_optical_service_id = json_service_id(vlink_service_uuid, context_id=context_id) -- GitLab From 69337db48a7904b62f74a27a56082c49f9354711 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 13:58:23 +0000 Subject: [PATCH 347/463] NBI component - TFS API connector: - Implemented vLink creation --- src/nbi/service/tfs_api/Resources.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/nbi/service/tfs_api/Resources.py b/src/nbi/service/tfs_api/Resources.py index 294a06e6e..d634a0a59 100644 --- a/src/nbi/service/tfs_api/Resources.py +++ b/src/nbi/service/tfs_api/Resources.py @@ -14,6 +14,7 @@ import json import logging +from typing import Dict, List from flask.json import jsonify from flask_restful import Resource, request from werkzeug.exceptions import BadRequest @@ -296,10 +297,15 @@ class Links(_Resource): json_requests = request.get_json() if 'links' in json_requests: json_requests = json_requests['links'] - return jsonify([ - grpc_message_to_json(self.context_client.SetLink(grpc_link(link))) - for link in json_requests - ]) + json_link_ids : List[Dict] = list() + for link_json in json_requests: + link = grpc_link(link_json) + if link.link_type == LinkTypeEnum.LINKTYPE_VIRTUAL: + link_id = self.vntmanager_client.SetVirtualLink(link) + else: + link_id = self.context_client.SetLink(link) + json_link_ids.append(grpc_message_to_json(link_id)) + return jsonify(json_link_ids) class Link(_Resource): def get(self, link_uuid : str): -- GitLab From 2a4a21326db7df5abb6273879fef36da77735c41 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 13:58:49 +0000 Subject: [PATCH 348/463] PathComp component - Frontend: - Corrected default link total capacity --- .../frontend/service/algorithms/tools/ComposeRequest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py b/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py index 3ca4dec3e..f9672d070 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py @@ -130,7 +130,7 @@ def compose_link(grpc_link : Link) -> Dict: elif total_capacity_gbps is not None: used_capacity_gbps = total_capacity_gbps - if total_capacity_gbps is None: total_capacity_gbps = 100 + if total_capacity_gbps is None: total_capacity_gbps = 100000 if used_capacity_gbps is None: used_capacity_gbps = 0 available_capacity_gbps = total_capacity_gbps - used_capacity_gbps -- GitLab From ca65ef73f7870be1a38af02962bc2daa999abd98 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 13:59:19 +0000 Subject: [PATCH 349/463] OFC25 tests: - Corrected Optical descriptors --- src/tests/ofc25/descriptors/topology_opt.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/tests/ofc25/descriptors/topology_opt.json b/src/tests/ofc25/descriptors/topology_opt.json index a39713821..6b6d5f260 100644 --- a/src/tests/ofc25/descriptors/topology_opt.json +++ b/src/tests/ofc25/descriptors/topology_opt.json @@ -165,12 +165,7 @@ {"device_id": {"device_uuid": {"uuid": "MGON1"}},"endpoint_uuid": {"uuid": "port-34-in"}} ], "optical_details": { - "length": 0, - "src_port": "2", - "dst_port": "port-34-in", - "local_peer_port": "2", - "remote_peer_port": "port-34-out", - "used": false, + "length": 0, "src_port": "2", "dst_port": "port-34-in", "local_peer_port": "2", "remote_peer_port": "port-34-out", "used": false, "c_slots": { "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, -- GitLab From 49aa2da810885789c97ce9083f59a2df0da5b25f Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 14:00:10 +0000 Subject: [PATCH 350/463] WebUI component: - Implemented vlink removal - Added sanity checks in device and link removal --- src/webui/service/device/routes.py | 27 ++++++++++++++------------- src/webui/service/link/routes.py | 24 +++++++++++++----------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py index 16b86c769..977f0ec4b 100644 --- a/src/webui/service/device/routes.py +++ b/src/webui/service/device/routes.py @@ -184,20 +184,21 @@ def logical(device_uuid: str): @device.get('/delete') def delete(device_uuid): try: + context_client.connect() + + device_obj = get_device( + context_client, device_uuid, rw_copy=False, include_components=False, + include_config_rules=False, include_endpoints=False + ) + if device_obj is None: + flash('Device({:s}) not found'.format(str(device_uuid)), 'danger') + else: + device_client.connect() + device_client.DeleteDevice(device_obj.device_id) + device_client.close() + flash(f'Device "{device_uuid}" deleted successfully!', 'success') - # first, check if device exists! - # request: DeviceId = DeviceId() - # request.device_uuid.uuid = device_uuid - # response: Device = client.GetDevice(request) - # TODO: finalize implementation - - request = DeviceId() - request.device_uuid.uuid = device_uuid # pylint: disable=no-member - device_client.connect() - device_client.DeleteDevice(request) - device_client.close() - - flash(f'Device "{device_uuid}" deleted successfully!', 'success') + context_client.close() except Exception as e: # pylint: disable=broad-except flash(f'Problem deleting device "{device_uuid}": {e.details()}', 'danger') current_app.logger.exception(e) diff --git a/src/webui/service/link/routes.py b/src/webui/service/link/routes.py index 42f5984a3..34b2af27f 100644 --- a/src/webui/service/link/routes.py +++ b/src/webui/service/link/routes.py @@ -21,10 +21,12 @@ from common.tools.context_queries.EndPoint import get_endpoint_names from common.tools.context_queries.Link import get_link from common.tools.context_queries.Topology import get_topology from context.client.ContextClient import ContextClient +from vnt_manager.client.VNTManagerClient import VNTManagerClient link = Blueprint('link', __name__, url_prefix='/link') context_client = ContextClient() +vntm_client = VNTManagerClient() @link.get('/') def home(): @@ -77,20 +79,20 @@ def detail(link_uuid: str): @link.get('/delete') def delete(link_uuid): try: + context_client.connect() - # first, check if link exists! - # request: LinkId = LinkId() - # request.link_uuid.uuid = link_uuid - # response: Link = client.GetLink(request) - # TODO: finalize implementation + link_obj = get_link(context_client, link_uuid, rw_copy=False) + if link_obj is None: + flash('Link({:s}) not found'.format(str(link_uuid)), 'danger') + else: + link_type = link_obj.link_type + if link_type == LinkTypeEnum.LINKTYPE_VIRTUAL: + vntm_client.RemoveVirtualLink(link_obj.link_id) + else: + context_client.RemoveLink(link_obj.link_id) + flash(f'Link "{link_uuid}" deleted successfully!', 'success') - request = LinkId() - request.link_uuid.uuid = link_uuid # pylint: disable=no-member - context_client.connect() - context_client.RemoveLink(request) context_client.close() - - flash(f'Link "{link_uuid}" deleted successfully!', 'success') except Exception as e: # pylint: disable=broad-except flash(f'Problem deleting link "{link_uuid}": {e.details()}', 'danger') current_app.logger.exception(e) -- GitLab From cc05832044ee48e3f32f0e4f2e8ee3d9551fed8b Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 14:02:46 +0000 Subject: [PATCH 351/463] Optical component: - Corrected composition of topology graph - Ignored addition of special devices such as controllers - Added special print method to dump log messages --- src/opticalcontroller/OpticalController.py | 55 ++++++++++++++++------ src/opticalcontroller/RSA.py | 5 ++ 2 files changed, 45 insertions(+), 15 deletions(-) diff --git a/src/opticalcontroller/OpticalController.py b/src/opticalcontroller/OpticalController.py index 74fd78826..9cf0f6733 100644 --- a/src/opticalcontroller/OpticalController.py +++ b/src/opticalcontroller/OpticalController.py @@ -15,6 +15,7 @@ import logging, time from flask import Flask from flask import render_template +from common.DeviceTypes import DeviceTypeEnum from flask_restplus import Resource, Api from google.protobuf.json_format import MessageToDict from common.proto.context_pb2 import TopologyId @@ -317,7 +318,44 @@ class GetTopology(Resource): node_dict = {} topo, nodes = readTopologyDataFromContext(topog_id) - for link in topo: + OPTICAL_ROADM_TYPES = { + DeviceTypeEnum.OPTICAL_ROADM.value, DeviceTypeEnum.EMULATED_OPTICAL_ROADM.value + } + OPTICAL_TRANSPONDER_TYPES = { + DeviceTypeEnum.OPTICAL_TRANSPONDER.value, DeviceTypeEnum.EMULATED_OPTICAL_TRANSPONDER.value + } + added_device_uuids = set() + for device in nodes: + if device.device_type in OPTICAL_ROADM_TYPES: + dev_type = "OC-ROADM" + elif device.device_type in OPTICAL_TRANSPONDER_TYPES: + dev_type = "OC-TP" + else: + continue + + dev_dic = { + "id":device.device_id.device_uuid.uuid, + #"ip":f"10.30.2.{207+i}", + #"port":"50001", + "type": dev_type, + "driver": "OpticalOC" + } + node_dict[device.name] = dev_dic + added_device_uuids.add(device.device_id.device_uuid.uuid) + #i+=1 + #print(f"refresh_optical controller optical_links_dict= {links_dict}") + #print(f"refresh_optical controller node_dict {node_dict}") + + for link in topo: + endpoint_id_a = link.link_endpoint_ids[ 0] + endpoint_id_z = link.link_endpoint_ids[-1] + + device_uuid_a = endpoint_id_a.device_id.device_uuid.uuid + if device_uuid_a not in added_device_uuids: continue + + device_uuid_z = endpoint_id_z.device_id.device_uuid.uuid + if device_uuid_z not in added_device_uuids: continue + link_dict_type = MessageToDict(link, preserving_proto_field_name=True) if "c_slots" in link_dict_type["optical_details"]: @@ -331,19 +369,6 @@ class GetTopology(Resource): links_dict["optical_links"].append(link_dict_type) - for device in nodes : - dev_dic = { - "id":device.device_id.device_uuid.uuid, - #"ip":f"10.30.2.{207+i}", - #"port":"50001", - "type":"OC-ROADM" if device.device_type =="optical-roadm" else "OC-TP", - "driver": "OpticalOC" - } - node_dict[device.name] = dev_dic - #i+=1 - #print(f"refresh_optical controller optical_links_dict= {links_dict}") - #print(f"refresh_optical controller node_dict {node_dict}") - rsa = RSA(node_dict, links_dict) if debug: print(rsa.init_link_slots2()) @@ -354,4 +379,4 @@ class GetTopology(Resource): return "Error", 400 if __name__ == '__main__': - app.run(host='0.0.0.0', port=10060) + app.run(host='0.0.0.0', port=10060, debug=True) diff --git a/src/opticalcontroller/RSA.py b/src/opticalcontroller/RSA.py index da31187eb..e5cf6e406 100644 --- a/src/opticalcontroller/RSA.py +++ b/src/opticalcontroller/RSA.py @@ -12,10 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +import logging from opticalcontroller.dijkstra import Graph, shortest_path from opticalcontroller.tools import * from opticalcontroller.variables import * +LOGGER = logging.getLogger(__name__) + +def print(*args) -> None: + LOGGER.info(' '.join([str(a) for a in args])) class RSA(): def __init__(self, nodes, links): -- GitLab From 2a85e17ae402c2717b209341820156c6d53f0c36 Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Tue, 21 Jan 2025 10:50:42 +0000 Subject: [PATCH 352/463] Add osm_client microservice Implement new osm_client.proto Create logic to manage request provide by NBI microservice Including ServiceServicer implementation ToDo: Automatic test with HTTP Mock Dockerfile --- manifests/osm_clientservice.yaml | 75 ++++++++++++++++++ proto/osm_client.proto | 71 +++++++++++++++++ src/common/Constants.py | 2 + src/osm_client/Config.py | 20 +++++ src/osm_client/__init__.py | 14 ++++ src/osm_client/client/OsmClient.py | 79 +++++++++++++++++++ src/osm_client/client/__init__.py | 14 ++++ src/osm_client/service/OsmClientService.py | 33 ++++++++ .../service/OsmClientServiceServicerImpl.py | 70 ++++++++++++++++ src/osm_client/service/__init__.py | 14 ++++ src/osm_client/service/__main__.py | 68 ++++++++++++++++ 11 files changed, 460 insertions(+) create mode 100644 manifests/osm_clientservice.yaml create mode 100644 proto/osm_client.proto create mode 100644 src/osm_client/Config.py create mode 100644 src/osm_client/__init__.py create mode 100644 src/osm_client/client/OsmClient.py create mode 100644 src/osm_client/client/__init__.py create mode 100644 src/osm_client/service/OsmClientService.py create mode 100644 src/osm_client/service/OsmClientServiceServicerImpl.py create mode 100644 src/osm_client/service/__init__.py create mode 100644 src/osm_client/service/__main__.py diff --git a/manifests/osm_clientservice.yaml b/manifests/osm_clientservice.yaml new file mode 100644 index 000000000..bf536e2fd --- /dev/null +++ b/manifests/osm_clientservice.yaml @@ -0,0 +1,75 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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: apps/v1 +kind: Deployment +metadata: + name: osm_clientservice +spec: + selector: + matchLabels: + app: osm_clientservice + #replicas: 1 + template: + metadata: + labels: + app: osm_clientservice + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: server + image: labs.etsi.org:5050/tfs/controller/osm_client:latest + imagePullPolicy: Always + ports: + - containerPort: 30210 + - containerPort: 9192 + env: + - name: OSM_ADDRESS + value: "127.0.0.1" + - name: LOG_LEVEL + value: "INFO" + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:30210"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:30210"] + resources: + requests: + cpu: 250m + memory: 128Mi + limits: + cpu: 1000m + memory: 1024Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: osm_clientservice + labels: + app: osm_clientservice +spec: + type: ClusterIP + selector: + app: osm_clientservice + ports: + - name: grpc + protocol: TCP + port: 30210 + targetPort: 30210 + - name: metrics + protocol: TCP + port: 9192 + targetPort: +--- \ No newline at end of file diff --git a/proto/osm_client.proto b/proto/osm_client.proto new file mode 100644 index 000000000..b44781641 --- /dev/null +++ b/proto/osm_client.proto @@ -0,0 +1,71 @@ +// Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package osmClient; + +import "context.proto"; + +service OsmService { + rpc NsiCreate (CreateRequest) returns(CreateResponse) {} + rpc NsiList (context.Empty) returns(NsiListResponse) {} + rpc NsiGet (GetRequest) returns(GetResponse) {} + rpc NsiDelete (DeleteRequest) returns(DeleteResponse) {} +} + +message CreateRequest { + string nst_name = 1; + string nsi_name = 2; + string config = 3; + string ssh_key = 4; + string account = 5; +} + +//OSM library doesn't return nsi ID, just an exception +message CreateResponse { + bool succeded = 1; + string errormessage = 2; +} + +message NsiListResponse { + repeated string id = 1; +} + +message GetRequest { + string id = 1; +} + +message GetResponse { + NsiObject nsi = 1; +} + +message NsiObject { + string nst_name = 1; + string nsi_name = 2; + string description = 3; + string VimAccountId = 4; + string Netslice_Subnet_id = 5; + string Netslice_vld_ip = 6; +} + +message DeleteRequest { + string id = 1; +} + +//OSM library doesn't return nsi ID, just an exception +message DeleteResponse { + bool succeded = 1; + string errormessage = 2; +} + diff --git a/src/common/Constants.py b/src/common/Constants.py index 682007646..8b5b714b5 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -72,6 +72,7 @@ class ServiceNameEnum(Enum): ANALYTICS = 'analytics' ANALYTICSBACKEND = 'analytics-backend' QOSPROFILE = 'qos-profile' + OSMCLIENT = 'osm-client' # Used for test and debugging only DLT_GATEWAY = 'dltgateway' @@ -112,6 +113,7 @@ DEFAULT_SERVICE_GRPC_PORTS = { ServiceNameEnum.ANALYTICS .value : 30080, ServiceNameEnum.ANALYTICSBACKEND .value : 30090, ServiceNameEnum.AUTOMATION .value : 30200, + ServiceNameEnum.OSMCLIENT .value : 30210, # Used for test and debugging only ServiceNameEnum.DLT_GATEWAY .value : 50051, diff --git a/src/osm_client/Config.py b/src/osm_client/Config.py new file mode 100644 index 000000000..84feff3d9 --- /dev/null +++ b/src/osm_client/Config.py @@ -0,0 +1,20 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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.Settings import get_setting + +DEFAULT_OSM_ADDRESS = '127.0.0.1' +OSM_ADDRESS = get_setting('OSM_ADDRESS', DEFAULT_OSM_ADDRESS) + + \ No newline at end of file diff --git a/src/osm_client/__init__.py b/src/osm_client/__init__.py new file mode 100644 index 000000000..53d5157f7 --- /dev/null +++ b/src/osm_client/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/osm_client/client/OsmClient.py b/src/osm_client/client/OsmClient.py new file mode 100644 index 000000000..a040f661c --- /dev/null +++ b/src/osm_client/client/OsmClient.py @@ -0,0 +1,79 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 grpc, logging +from common.Constants import ServiceNameEnum +from common.Settings import get_service_host, get_service_port_grpc +from common.proto.osm_client_pb2_grpc import osmClientServiceStub +from common.proto.context_pb2 import (Empty) +from common.tools.client.RetryDecorator import retry, delay_exponential +from common.tools.grpc.Tools import grpc_message_to_json_string + +from osmclient import client +from osmclient.common.exceptions import ClientException + + +LOGGER = logging.getLogger(__name__) +MAX_RETRIES = 15 +DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) +RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') + +class OsmClient: + def __init__(self, host=None, port=None): + if not host: host = get_service_host(ServiceNameEnum.OSMCLIENT) + if not port: port = get_service_port_grpc(ServiceNameEnum.OSMCLIENT) + self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) + LOGGER.debug('Creating channel to {:s}...'.format(str(self.endpoint))) + self.channel = None + self.stub = None + self.connect() + LOGGER.debug('Channel created') + + + def connect(self): + self.channel = grpc.insecure_channel(self.endpoint) + self.stub = osmClientServiceStub(self.channel) + + def close(self): + if self.channel is not None: self.channel.close() + self.channel = None + self.stub = None + + @RETRY_DECORATOR + def NsiCreate(self, request : CreateRequest) -> CreateResponse: + LOGGER.debug('NsiCreate request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.NsiCreate(request) + LOGGER.debug('NsiCreate result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def NsiList(self, request : Empty) -> NsiListResponse: + LOGGER.debug('NsiList request') + response = self.stub.NsiList(request) + LOGGER.debug('NsiList result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def NsiGet(self, request : GetRequest) -> GetResponse: + LOGGER.debug('NsiGet request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.NsiGet(request) + LOGGER.debug('NsiGet result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def NsiDelete(self, request : DeleteRequest) -> DeleteResponse: + LOGGER.debug('NsiDelete request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.NsiDelete(request) + LOGGER.debug('NsiDelete result: {:s}'.format(grpc_message_to_json_string(response))) + return response \ No newline at end of file diff --git a/src/osm_client/client/__init__.py b/src/osm_client/client/__init__.py new file mode 100644 index 000000000..53d5157f7 --- /dev/null +++ b/src/osm_client/client/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/osm_client/service/OsmClientService.py b/src/osm_client/service/OsmClientService.py new file mode 100644 index 000000000..ccbf15366 --- /dev/null +++ b/src/osm_client/service/OsmClientService.py @@ -0,0 +1,33 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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.Constants import ServiceNameEnum +from common.Settings import get_service_port_grpc +from common.proto.osm_client_pb2_grpc import add_OsmServiceServicer_to_server +from common.tools.service.GenericGrpcService import GenericGrpcService +from osm_client.service.OsmClientServiceServicerImpl import OsmClientServiceServicerImpl + +from osmclient import client +from osmclient.common.exceptions import ClientException + + +class OsmClientService(GenericGrpcService): + def __init__(self, cls_name: str = __name__) -> None: + port = get_service_port_grpc(ServiceNameEnum.OSMCLIENT) + super().__init__(port, cls_name=cls_name) + self.osmClient_servicer = OsmClientServiceServicerImpl() + + + def install_servicers(self): + add_OsmServiceServicer_to_server(self.osmClient_servicer, self.server) diff --git a/src/osm_client/service/OsmClientServiceServicerImpl.py b/src/osm_client/service/OsmClientServiceServicerImpl.py new file mode 100644 index 000000000..f45c682a4 --- /dev/null +++ b/src/osm_client/service/OsmClientServiceServicerImpl.py @@ -0,0 +1,70 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 grpc, logging +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.proto.context_pb2 import (Empty) +from common.proto.osm_client_pb2 import CreateRequest, CreateResponse, NsiListResponse, GetRequest, GetResponse, DeleteRequest, DeleteResponse +from common.proto.osm_client_pb2_grpc import osmCLientServiceServicer +from osmclient import client +from osmclient.common.exceptions import ClientException +from osm_client.Config import OSM_ADDRESS + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('OSMCLIENT', 'RPC') + +class OsmClientServiceServicerImpl(osmCLientServiceServicer): + def __init__(self): + LOGGER.info('Creating Servicer...') + self.myclient = client.Client(host=OSM_ADDRESS, sol005=True) + LOGGER.info('osmClient created') + + LOGGER.info('Servicer Created') + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def NsiCreate(self, request : CreateRequest, context : grpc.ServicerContext) -> CreateResponse: + try: + #OSM library doesn't return nsi ID, just an exception + self.myclient.nsi.create(request.nst_name, request.nsi_name, request.account) + except Exception as e: + resp = CreateResponse(succeded = False, errormessage = str(e)) + else: + resp = CreateResponse(succeded = True) + return resp + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def NsiList(self, request : Empty, context : grpc.ServicerContext) -> NsiListResponse: + nsiIDs = self.myclient.nsi.list() + resp = NsiListResponse(id=nsiIDs) + return resp + + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def NsiGet(self, request : GetRequest, context : grpc.ServicerContext) -> GetResponse: + nsiObject = self.myclient.nsi.get(request.id) + resp = GetResponse(NsiObject = nsiObject) + return resp + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def NsiDelete(self, request : DeleteRequest, context : grpc.ServicerContext) -> DeleteResponse: + try: + #OSM library doesn't return nsi ID, just an exception + self.myclient.nsi.delete(request.id, False, False) + except Exception as e: + resp = DeleteResponse(succeded = False, errormessage = str(e)) + else: + resp = DeleteResponse(succeded = True) + return resp \ No newline at end of file diff --git a/src/osm_client/service/__init__.py b/src/osm_client/service/__init__.py new file mode 100644 index 000000000..53d5157f7 --- /dev/null +++ b/src/osm_client/service/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/osm_client/service/__main__.py b/src/osm_client/service/__main__.py new file mode 100644 index 000000000..d27b5c80a --- /dev/null +++ b/src/osm_client/service/__main__.py @@ -0,0 +1,68 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, signal, sys, threading +from common.Constants import ServiceNameEnum +from common.Settings import ( + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, + get_env_var_name, get_log_level, + wait_for_environment_variables +) +from .OsmClientService import OsmClientService + +terminate = threading.Event() +LOGGER = None + +def signal_handler(signal, frame): # pylint: disable=redefined-outer-name, unused-argument + LOGGER.warning('Terminate signal received') + terminate.set() + +def main(): + global LOGGER # pylint: disable=global-statement + + log_level = get_log_level() + logging.basicConfig(level=log_level) + LOGGER = logging.getLogger(__name__) + + wait_for_environment_variables([ + get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + ]) + + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + + LOGGER.info('Starting...') + + # Starting OsmClient service + grpc_service = OsmClientService() + grpc_service.start() + + LOGGER.debug('Configured Rules:') + + # Wait for Ctrl+C or termination signal + while not terminate.wait(timeout=1.0): pass + + LOGGER.info('Terminating...') + grpc_service.stop() + + LOGGER.info('Bye') + return 0 + +if __name__ == '__main__': + sys.exit(main()) -- GitLab From a431db9a7bac33dd5a93af4afa2eec6958490ed1 Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Thu, 23 Jan 2025 13:14:46 +0000 Subject: [PATCH 353/463] Add DockerFile to osm_client MicroServices Solve imports typo --- src/osm_client/Dockerfile | 77 +++++++++++++++++++ src/osm_client/client/OsmClient.py | 4 +- src/osm_client/service/OsmClientService.py | 4 - .../service/OsmClientServiceServicerImpl.py | 4 +- 4 files changed, 81 insertions(+), 8 deletions(-) create mode 100644 src/osm_client/Dockerfile diff --git a/src/osm_client/Dockerfile b/src/osm_client/Dockerfile new file mode 100644 index 000000000..1c7427404 --- /dev/null +++ b/src/osm_client/Dockerfile @@ -0,0 +1,77 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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.10.16-slim + + +# Install dependencies +RUN apt-get --yes --quiet --quiet update +RUN apt-get --yes --quiet --quiet install wget g++ git build-essential cmake make git \ + libpcre2-dev python3-dev python3-pip python3-cffi curl software-properties-common && \ + rm -rf /var/lib/apt/lists/* + +# Set Python to show logs as they occur +ENV PYTHONUNBUFFERED=0 + + +# Download the gRPC health probe +RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ + wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ + chmod +x /bin/grpc_health_probe + +# 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 + +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + +# Add common files into working directory +WORKDIR /var/teraflow/common +COPY src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto +RUN touch __init__.py +COPY proto/*.proto ./ +RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto +RUN rm *.proto +RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; + +# Create component sub-folders +RUN mkdir -p /var/teraflow/osm_client +WORKDIR /var/teraflow/osm_client +ENV OSM_CLIENT_VERSION=v16.0 +RUN python3 -m pip install -r "https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=${OSM_CLIENT_VERSION}" +RUN python3 -m pip install "git+https://osm.etsi.org/gerrit/osm/IM.git@${OSM_CLIENT_VERSION}#egg=osm-im" --upgrade +#Clone OsmCLient code +RUN git clone https://osm.etsi.org/gerrit/osm/osmclient +RUN git -C osmclient checkout ${OSM_CLIENT_VERSION} +# Install osmClient using pip +RUN python3 -m pip install -r osmclient/requirements.txt +RUN python3 -m pip install ./osmclient + +# Add component files into working directory +WORKDIR /var/teraflow +COPY src/osm_client/. osm_client/ + +# Start the service +ENTRYPOINT ["python", "-m", "osm_client.service"] diff --git a/src/osm_client/client/OsmClient.py b/src/osm_client/client/OsmClient.py index a040f661c..239e2a2fb 100644 --- a/src/osm_client/client/OsmClient.py +++ b/src/osm_client/client/OsmClient.py @@ -15,7 +15,7 @@ import grpc, logging from common.Constants import ServiceNameEnum from common.Settings import get_service_host, get_service_port_grpc -from common.proto.osm_client_pb2_grpc import osmClientServiceStub +from common.proto.osm_client_pb2_grpc import OsmServiceStub from common.proto.context_pb2 import (Empty) from common.tools.client.RetryDecorator import retry, delay_exponential from common.tools.grpc.Tools import grpc_message_to_json_string @@ -43,7 +43,7 @@ class OsmClient: def connect(self): self.channel = grpc.insecure_channel(self.endpoint) - self.stub = osmClientServiceStub(self.channel) + self.stub = OsmServiceStub(self.channel) def close(self): if self.channel is not None: self.channel.close() diff --git a/src/osm_client/service/OsmClientService.py b/src/osm_client/service/OsmClientService.py index ccbf15366..81ec534d2 100644 --- a/src/osm_client/service/OsmClientService.py +++ b/src/osm_client/service/OsmClientService.py @@ -18,10 +18,6 @@ from common.proto.osm_client_pb2_grpc import add_OsmServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from osm_client.service.OsmClientServiceServicerImpl import OsmClientServiceServicerImpl -from osmclient import client -from osmclient.common.exceptions import ClientException - - class OsmClientService(GenericGrpcService): def __init__(self, cls_name: str = __name__) -> None: port = get_service_port_grpc(ServiceNameEnum.OSMCLIENT) diff --git a/src/osm_client/service/OsmClientServiceServicerImpl.py b/src/osm_client/service/OsmClientServiceServicerImpl.py index f45c682a4..5bbde3b8b 100644 --- a/src/osm_client/service/OsmClientServiceServicerImpl.py +++ b/src/osm_client/service/OsmClientServiceServicerImpl.py @@ -17,7 +17,7 @@ from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_m from common.tools.grpc.Tools import grpc_message_to_json_string from common.proto.context_pb2 import (Empty) from common.proto.osm_client_pb2 import CreateRequest, CreateResponse, NsiListResponse, GetRequest, GetResponse, DeleteRequest, DeleteResponse -from common.proto.osm_client_pb2_grpc import osmCLientServiceServicer +from common.proto.osm_client_pb2_grpc import OsmServiceServicer from osmclient import client from osmclient.common.exceptions import ClientException from osm_client.Config import OSM_ADDRESS @@ -26,7 +26,7 @@ LOGGER = logging.getLogger(__name__) METRICS_POOL = MetricsPool('OSMCLIENT', 'RPC') -class OsmClientServiceServicerImpl(osmCLientServiceServicer): +class OsmClientServiceServicerImpl(OsmServiceServicer): def __init__(self): LOGGER.info('Creating Servicer...') self.myclient = client.Client(host=OSM_ADDRESS, sol005=True) -- GitLab From 4022dccf9e6b45d1ac757b2059e7b2849881d683 Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Tue, 18 Mar 2025 10:33:08 +0000 Subject: [PATCH 354/463] Solve some minor typo --- manifests/osm_clientservice.yaml | 3 +-- src/osm_client/Config.py | 4 +--- src/osm_client/client/OsmClient.py | 3 ++- src/osm_client/service/OsmClientServiceServicerImpl.py | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/manifests/osm_clientservice.yaml b/manifests/osm_clientservice.yaml index bf536e2fd..ef9eaa2f8 100644 --- a/manifests/osm_clientservice.yaml +++ b/manifests/osm_clientservice.yaml @@ -71,5 +71,4 @@ spec: - name: metrics protocol: TCP port: 9192 - targetPort: ---- \ No newline at end of file + targetPort: 9192 diff --git a/src/osm_client/Config.py b/src/osm_client/Config.py index 84feff3d9..d34980c43 100644 --- a/src/osm_client/Config.py +++ b/src/osm_client/Config.py @@ -15,6 +15,4 @@ from common.Settings import get_setting DEFAULT_OSM_ADDRESS = '127.0.0.1' -OSM_ADDRESS = get_setting('OSM_ADDRESS', DEFAULT_OSM_ADDRESS) - - \ No newline at end of file +OSM_ADDRESS = get_setting('OSM_ADDRESS', default=DEFAULT_OSM_ADDRESS) diff --git a/src/osm_client/client/OsmClient.py b/src/osm_client/client/OsmClient.py index 239e2a2fb..2ef7a414e 100644 --- a/src/osm_client/client/OsmClient.py +++ b/src/osm_client/client/OsmClient.py @@ -16,6 +16,7 @@ import grpc, logging from common.Constants import ServiceNameEnum from common.Settings import get_service_host, get_service_port_grpc from common.proto.osm_client_pb2_grpc import OsmServiceStub +from common.proto.osm_client_pb2 import CreateRequest, CreateResponse, NsiListResponse, GetRequest, GetResponse, DeleteRequest, DeleteResponse from common.proto.context_pb2 import (Empty) from common.tools.client.RetryDecorator import retry, delay_exponential from common.tools.grpc.Tools import grpc_message_to_json_string @@ -76,4 +77,4 @@ class OsmClient: LOGGER.debug('NsiDelete request: {:s}'.format(grpc_message_to_json_string(request))) response = self.stub.NsiDelete(request) LOGGER.debug('NsiDelete result: {:s}'.format(grpc_message_to_json_string(response))) - return response \ No newline at end of file + return response diff --git a/src/osm_client/service/OsmClientServiceServicerImpl.py b/src/osm_client/service/OsmClientServiceServicerImpl.py index 5bbde3b8b..8e9bf1ea6 100644 --- a/src/osm_client/service/OsmClientServiceServicerImpl.py +++ b/src/osm_client/service/OsmClientServiceServicerImpl.py @@ -67,4 +67,4 @@ class OsmClientServiceServicerImpl(OsmServiceServicer): resp = DeleteResponse(succeded = False, errormessage = str(e)) else: resp = DeleteResponse(succeded = True) - return resp \ No newline at end of file + return resp -- GitLab From d10df48f9ef84d050ee59fd7401e82cc038af17a Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 16:14:27 +0000 Subject: [PATCH 355/463] OFC25 tests: - Added convenience scripts for logging --- src/tests/ofc25/dump-logs.sh | 55 ++++++++++++++++++++++++++++++++++++ src/tests/ofc25/dump_logs.sh | 51 --------------------------------- 2 files changed, 55 insertions(+), 51 deletions(-) create mode 100755 src/tests/ofc25/dump-logs.sh delete mode 100755 src/tests/ofc25/dump_logs.sh diff --git a/src/tests/ofc25/dump-logs.sh b/src/tests/ofc25/dump-logs.sh new file mode 100755 index 000000000..234537fba --- /dev/null +++ b/src/tests/ofc25/dump-logs.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 logs -rf tmp/exec + +echo "Collecting logs for E2E..." +mkdir -p tmp/exec/e2e +kubectl logs --namespace tfs-e2e deployment/contextservice -c server > tmp/exec/e2e/context.log +kubectl logs --namespace tfs-e2e deployment/deviceservice -c server > tmp/exec/e2e/device.log +kubectl logs --namespace tfs-e2e deployment/serviceservice -c server > tmp/exec/e2e/service.log +kubectl logs --namespace tfs-e2e deployment/pathcompservice -c frontend > tmp/exec/e2e/pathcomp-frontend.log +kubectl logs --namespace tfs-e2e deployment/pathcompservice -c backend > tmp/exec/e2e/pathcomp-backend.log +kubectl logs --namespace tfs-e2e deployment/webuiservice -c server > tmp/exec/e2e/webui.log +kubectl logs --namespace tfs-e2e deployment/nbiservice -c server > tmp/exec/e2e/nbi.log +kubectl logs --namespace tfs-e2e deployment/e2e-orchestratorservice -c server > tmp/exec/e2e/e2eorch.log +printf logs "\n" + +echo "Collecting logs for IP..." +mkdir -p tmp/exec/ip +kubectl logs --namespace tfs-ip deployment/contextservice -c server > tmp/exec/ip/context.log +kubectl logs --namespace tfs-ip deployment/deviceservice -c server > tmp/exec/ip/device.log +kubectl logs --namespace tfs-ip deployment/serviceservice -c server > tmp/exec/ip/service.log +kubectl logs --namespace tfs-ip deployment/pathcompservice -c frontend > tmp/exec/ip/pathcomp-frontend.log +kubectl logs --namespace tfs-ip deployment/pathcompservice -c backend > tmp/exec/ip/pathcomp-backend.log +kubectl logs --namespace tfs-ip deployment/webuiservice -c server > tmp/exec/ip/webui.log +kubectl logs --namespace tfs-ip deployment/nbiservice -c server > tmp/exec/ip/nbi.log +kubectl logs --namespace tfs-ip deployment/vnt-managerservice -c server > tmp/exec/ip/vntm.log +printf logs "\n" + +echo "Collecting logs for OPT..." +mkdir -p tmp/exec/opt +kubectl logs --namespace tfs-opt deployment/contextservice -c server > tmp/exec/opt/context.log +kubectl logs --namespace tfs-opt deployment/deviceservice -c server > tmp/exec/opt/device.log +kubectl logs --namespace tfs-opt deployment/serviceservice -c server > tmp/exec/opt/service.log +kubectl logs --namespace tfs-opt deployment/pathcompservice -c frontend > tmp/exec/opt/pathcomp-frontend.log +kubectl logs --namespace tfs-opt deployment/pathcompservice -c backend > tmp/exec/opt/pathcomp-backend.log +kubectl logs --namespace tfs-opt deployment/webuiservice -c server > tmp/exec/opt/webui.log +kubectl logs --namespace tfs-opt deployment/nbiservice -c server > tmp/exec/opt/nbi.log +kubectl logs --namespace tfs-opt deployment/opticalcontrollerservice -c server > tmp/exec/opt/ctrl.log +printf "\n" + +echo "Done!" diff --git a/src/tests/ofc25/dump_logs.sh b/src/tests/ofc25/dump_logs.sh deleted file mode 100755 index 02b1f524c..000000000 --- a/src/tests/ofc25/dump_logs.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 IP..." -mkdir -p tmp/exec/ip -kubectl --namespace tfs-ip logs deployment/contextservice -c server > tmp/exec/ip/context.log -kubectl --namespace tfs-ip logs deployment/deviceservice -c server > tmp/exec/ip/device.log -kubectl --namespace tfs-ip logs deployment/pathcompservice -c frontend > tmp/exec/ip/pathcomp-frontend.log -kubectl --namespace tfs-ip logs deployment/pathcompservice -c backend > tmp/exec/ip/pathcomp-backend.log -kubectl --namespace tfs-ip logs deployment/serviceservice -c server > tmp/exec/ip/service.log -kubectl --namespace tfs-ip logs deployment/nbiservice -c server > tmp/exec/ip/nbi.log -kubectl --namespace tfs-ip logs deployment/vnt-managerservice -c server > tmp/exec/ip/vntm.log -printf "\n" - -echo "Collecting logs for IP..." -mkdir -p tmp/exec/opt -kubectl --namespace tfs-opt logs deployment/contextservice -c server > tmp/exec/opt/context.log -kubectl --namespace tfs-opt logs deployment/deviceservice -c server > tmp/exec/opt/device.log -kubectl --namespace tfs-opt logs deployment/pathcompservice -c frontend > tmp/exec/opt/pathcomp-frontend.log -kubectl --namespace tfs-opt logs deployment/pathcompservice -c backend > tmp/exec/opt/pathcomp-backend.log -kubectl --namespace tfs-opt logs deployment/serviceservice -c server > tmp/exec/opt/service.log -kubectl --namespace tfs-opt logs deployment/nbiservice -c server > tmp/exec/opt/nbi.log -printf "\n" - -echo "Collecting logs for E2E..." -mkdir -p tmp/exec/e2e -kubectl --namespace tfs-e2e logs deployment/contextservice -c server > tmp/exec/e2e/context.log -kubectl --namespace tfs-e2e logs deployment/deviceservice -c server > tmp/exec/e2e/device.log -kubectl --namespace tfs-e2e logs deployment/pathcompservice -c frontend > tmp/exec/e2e/pathcomp-frontend.log -kubectl --namespace tfs-e2e logs deployment/pathcompservice -c backend > tmp/exec/e2e/pathcomp-backend.log -kubectl --namespace tfs-e2e logs deployment/serviceservice -c server > tmp/exec/e2e/service.log -kubectl --namespace tfs-e2e logs deployment/nbiservice -c server > tmp/exec/e2e/nbi.log -kubectl --namespace tfs-e2e logs deployment/e2e-orchestratorservice -c server > tmp/exec/e2e/e2eorch.log -printf "\n" - -echo "Done!" -- GitLab From ff3aa5016f969d2e48c527ec06fdc892a332b680 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 16:22:50 +0000 Subject: [PATCH 356/463] Manifests: - Removed unneeded fields - Enabled DEBUG when needed --- manifests/e2e_orchestratorservice.yaml | 12 ------------ manifests/nbiservice.yaml | 2 +- manifests/pathcompservice.yaml | 2 +- manifests/vnt_managerservice.yaml | 9 ++++----- 4 files changed, 6 insertions(+), 19 deletions(-) diff --git a/manifests/e2e_orchestratorservice.yaml b/manifests/e2e_orchestratorservice.yaml index 8c39f4712..c628df3a7 100644 --- a/manifests/e2e_orchestratorservice.yaml +++ b/manifests/e2e_orchestratorservice.yaml @@ -41,18 +41,6 @@ spec: env: - name: LOG_LEVEL value: "DEBUG" - - name: WS_IP_HOST - value: "nbiservice.tfs-ip.svc.cluster.local" - - name: WS_IP_PORT - value: "8761" - - name: WS_E2E_HOST - value: "e2e-orchestratorservice.tfs-e2e.svc.cluster.local" - - name: WS_E2E_PORT - value: "8762" - - name: EXT_CONTROLLER1_ADD - value: "10.1.1.96" - - name: EXT_CONTROLLER1_PORT - value: "8003" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:10050"] diff --git a/manifests/nbiservice.yaml b/manifests/nbiservice.yaml index 3e6d1de84..2bf31678f 100644 --- a/manifests/nbiservice.yaml +++ b/manifests/nbiservice.yaml @@ -39,7 +39,7 @@ spec: #- containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" + value: "DEBUG" - name: FLASK_ENV value: "production" # change to "development" if developing - name: IETF_NETWORK_RENDERER diff --git a/manifests/pathcompservice.yaml b/manifests/pathcompservice.yaml index 0cac6cc18..b6f969bf4 100644 --- a/manifests/pathcompservice.yaml +++ b/manifests/pathcompservice.yaml @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" + value: "DEBUG" - name: ENABLE_FORECASTER value: "NO" readinessProbe: diff --git a/manifests/vnt_managerservice.yaml b/manifests/vnt_managerservice.yaml index 41735a589..6f82a341c 100644 --- a/manifests/vnt_managerservice.yaml +++ b/manifests/vnt_managerservice.yaml @@ -39,11 +39,10 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" - - name: WS_IP_PORT - value: "8761" - - name: WS_E2E_PORT - value: "8762" + value: "DEBUG" + envFrom: + - secretRef: + name: kfk-kpi-data readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:10080"] -- GitLab From aee95791928d204725e01723885edce8c62aaf02 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 16:23:55 +0000 Subject: [PATCH 357/463] NBI component - VNTM Recommendation: - Corrected log levels - Corrected management of request_keys --- src/nbi/service/vntm_recommend/Namespaces.py | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/nbi/service/vntm_recommend/Namespaces.py b/src/nbi/service/vntm_recommend/Namespaces.py index a7660f859..b19550fae 100644 --- a/src/nbi/service/vntm_recommend/Namespaces.py +++ b/src/nbi/service/vntm_recommend/Namespaces.py @@ -37,23 +37,24 @@ class VntRecommServerNamespace(Namespace): def on_connect(self, auth): MSG = '[on_connect] Client connect: sid={:s}, auth={:s}' - LOGGER.info(MSG.format(str(request.sid), str(auth))) + LOGGER.debug(MSG.format(str(request.sid), str(auth))) join_room(SIO_ROOM, namespace=SIO_NAMESPACE) def on_disconnect(self, reason): MSG = '[on_disconnect] Client disconnect: sid={:s}, reason={:s}' - LOGGER.info(MSG.format(str(request.sid), str(reason))) + LOGGER.debug(MSG.format(str(request.sid), str(reason))) leave_room(SIO_ROOM, namespace=SIO_NAMESPACE) def on_vlink_created(self, data): MSG = '[on_vlink_created] begin: sid={:s}, data={:s}' - LOGGER.info(MSG.format(str(request.sid), str(data))) + LOGGER.debug(MSG.format(str(request.sid), str(data))) data = json.loads(data) - request_key = data.pop('_request_key') - + request_key = str(data.pop('_request_key')).encode('utf-8') vntm_reply = json.dumps({'event': 'vlink_created', 'data': data}).encode('utf-8') - LOGGER.info('[on_vlink_created] vntm_reply={:s}'.format(str(vntm_reply))) + LOGGER.debug('[on_vlink_created] request_key={:s}/{:s}'.format(str(type(request_key)), str(request_key))) + LOGGER.debug('[on_vlink_created] vntm_reply={:s}/{:s}'.format(str(type(vntm_reply)), str(vntm_reply))) + self.kafka_producer.send( KafkaTopic.VNTMANAGER_RESPONSE.value, key=request_key, value=vntm_reply ) @@ -61,13 +62,14 @@ class VntRecommServerNamespace(Namespace): def on_vlink_removed(self, data): MSG = '[on_vlink_removed] begin: sid={:s}, data={:s}' - LOGGER.info(MSG.format(str(request.sid), str(data))) + LOGGER.debug(MSG.format(str(request.sid), str(data))) data = json.loads(data) - request_key = data.pop('_request_key') - + request_key = str(data.pop('_request_key')).encode('utf-8') vntm_reply = json.dumps({'event': 'vlink_removed', 'data': data}).encode('utf-8') - LOGGER.info('[on_vlink_removed] vntm_reply={:s}'.format(str(vntm_reply))) + LOGGER.debug('[on_vlink_removed] request_key={:s}/{:s}'.format(str(type(request_key)), str(request_key))) + LOGGER.debug('[on_vlink_removed] vntm_reply={:s}/{:s}'.format(str(type(vntm_reply)), str(vntm_reply))) + self.kafka_producer.send( KafkaTopic.VNTMANAGER_RESPONSE.value, key=request_key, value=vntm_reply ) -- GitLab From 606fb96c940373018e8288e16679630ce9c81fc6 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 16:24:52 +0000 Subject: [PATCH 358/463] Service component - L3NM OpenConfig: - Corrected management of settings --- .../l3nm_openconfig/ConfigRules.py | 80 ++++++++++++------- 1 file changed, 51 insertions(+), 29 deletions(-) diff --git a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py index 37f8256b1..99d4bc8e5 100644 --- a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py @@ -12,52 +12,74 @@ # See the License for the specific language governing permissions and # limitations under the License. +import functools from typing import Any, Dict, List, Optional, Tuple from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set from service.service.service_handler_api.AnyTreeTools import TreeNode -def get_value(field_name : str, *containers, default=None) -> Optional[Any]: +def get_settings_containers( + service_settings : TreeNode, device_settings : TreeNode, endpoint_settings : TreeNode +) -> List[Dict]: + settings_containers : List[Dict] = list() + + # highest priority settings container + if endpoint_settings is not None: + json_endpoint_settings : Dict = endpoint_settings.value + settings_containers.append(json_endpoint_settings) + + if device_settings is not None: + json_device_settings : Dict = device_settings.value + settings_containers.append(json_device_settings) + + # lowest priority settings container + if service_settings is not None: + json_service_settings : Dict = service_settings.value + settings_containers.append(json_service_settings) + + return settings_containers + +def get_value(containers : List[Dict], field_name : str, **kwargs) -> Optional[Any]: if len(containers) == 0: raise Exception('No containers specified') + for container in containers: if field_name not in container: continue return container[field_name] - return default + + if 'default' in kwargs: + return kwargs['default'] + + MSG = 'Field({:s}) not found in containers specified({:s}) and no default value specified' + # pylint: disable=broad-exception-raised + raise Exception(MSG.format(str(field_name), str(containers))) def setup_config_rules( service_uuid : str, connection_uuid : str, device_uuid : str, endpoint_uuid : str, endpoint_name : str, service_settings : TreeNode, device_settings : TreeNode, endpoint_settings : TreeNode, endpoint_acls : List [Tuple] ) -> List[Dict]: - if service_settings is None: return [] - if device_settings is None: return [] - if endpoint_settings is None: return [] - - json_settings : Dict = service_settings.value - json_device_settings : Dict = device_settings.value - json_endpoint_settings : Dict = endpoint_settings.value - - settings = (json_settings, json_endpoint_settings, json_device_settings) - - mtu = get_value('mtu', *settings, default=1450) # 1512 - #address_families = json_settings.get('address_families', [] ) # ['IPV4'] - bgp_as = get_value('bgp_as', *settings, default=65000) # 65000 - - router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' - route_distinguisher = json_settings.get('route_distinguisher', '65000:101' ) # '60001:801' - 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 - - policy_import = json_endpoint_settings.get('policy_AZ', '2' ) # 2 - policy_export = json_endpoint_settings.get('policy_ZA', '7' ) # 30 + settings_containers : Tuple[Dict] = get_settings_containers( + service_settings, device_settings, endpoint_settings + ) + get_settings_value = functools.partial(get_value, settings_containers) + + mtu = get_settings_value('mtu', default=1450 ) # 1512 + #address_families = get_settings_value('address_families', default=[] ) # ['IPV4'] + bgp_as = get_settings_value('bgp_as', default=65000 ) # 65000 + router_id = get_settings_value('router_id', default='0.0.0.0' ) # '10.95.0.10' + route_distinguisher = get_settings_value('route_distinguisher', default='65000:101') # '60001:801' + sub_interface_index = get_settings_value('sub_interface_index', default=0 ) # 1 + vlan_id = get_settings_value('vlan_id', default=1 ) # 400 + address_ip = get_settings_value('address_ip', default='0.0.0.0' ) # '2.2.2.1' + address_prefix = get_settings_value('address_prefix', default=24 ) # 30 + policy_import = get_settings_value('policy_AZ', default='2' ) # 2 + policy_export = get_settings_value('policy_ZA', default='7' ) # 30 #network_interface_desc = '{:s}-NetIf'.format(service_uuid) - network_interface_desc = json_endpoint_settings.get('ni_description','') + network_interface_desc = get_settings_value('ni_description', default='' ) #network_subinterface_desc = '{:s}-NetSubIf'.format(service_uuid) - network_subinterface_desc = json_endpoint_settings.get('subif_description','') - #service_short_uuid = service_uuid.split('-')[-1] + network_subinterface_desc = get_settings_value('subif_description', default='' ) + service_short_uuid = service_uuid.split('-')[-1] #network_instance_name = '{:s}-NetInst'.format(service_short_uuid) - network_instance_name = json_endpoint_settings.get('ni_name', service_uuid.split('-')[-1]) #ELAN-AC:1 + network_instance_name = get_settings_value('ni_name', default=service_short_uuid) #ELAN-AC:1 if_subif_name = '{:s}.{:d}'.format(endpoint_name, vlan_id) -- GitLab From 9e8ceb44271838c4d1ce7d684cc7f7596061bdbb Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 16:25:29 +0000 Subject: [PATCH 359/463] Service component - Optical TFS Service Handler: - Corrected DeleteEndpoint method() --- .../optical_tfs/OpticalTfsServiceHandler.py | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/service/service/service_handlers/optical_tfs/OpticalTfsServiceHandler.py b/src/service/service/service_handlers/optical_tfs/OpticalTfsServiceHandler.py index 1b48f90f1..4ac85f3ac 100644 --- a/src/service/service/service_handlers/optical_tfs/OpticalTfsServiceHandler.py +++ b/src/service/service/service_handlers/optical_tfs/OpticalTfsServiceHandler.py @@ -106,19 +106,16 @@ class OpticalTfsServiceHandler(_ServiceHandler): 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 - flow_id = json_settings['flow_id'] - bitrate, bidir, ob_width = self._get_constraints() + service_name = self.__service.name results = [] try: - src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) + 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, dst_endpoint_uuid = get_device_endpoint_uuids(endpoints[1]) + 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 @@ -126,15 +123,8 @@ class OpticalTfsServiceHandler(_ServiceHandler): controller = src_controller json_config_rule = json_config_rule_delete('/services/service[{:s}]'.format(service_uuid), { - 'flow_id' : flow_id, - 'service_uuid' : service_uuid, - 'src_device_uuid' : src_device_uuid, - 'src_endpoint_uuid': src_endpoint_uuid, - 'dst_device_uuid' : dst_device_uuid, - 'dst_endpoint_uuid': dst_endpoint_uuid, - 'bitrate' : bitrate, - 'bidir' : bidir, - 'ob_width' : ob_width, + 'service_uuid': service_uuid, + 'service_name': service_name, }) del controller.device_config.config_rules[:] -- GitLab From b055fc3fca2cec9c57c4f9a6b0f6172cb8e495ab Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 16:27:34 +0000 Subject: [PATCH 360/463] Service component: - Corrected ConnectionDeconfigure task to enable management of underlaying TFS controllers - Enhanced DeleteService to identify if optical controller is present --- src/service/service/ServiceServiceServicerImpl.py | 2 +- .../tasks/Task_ConnectionDeconfigure.py | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py index 9a9bd27df..3a376c014 100644 --- a/src/service/service/ServiceServiceServicerImpl.py +++ b/src/service/service/ServiceServiceServicerImpl.py @@ -367,7 +367,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): context_client.RemoveService(request) return Empty() - if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + if is_deployed_optical() and service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: params = { "src" : None, "dst" : None, diff --git a/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py b/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py index cb1e91cc2..8528f8365 100644 --- a/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py +++ b/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py @@ -56,12 +56,15 @@ class Task_ConnectionDeconfigure(_Task): endpointids_to_delete = endpointids_to_raw(connection.path_hops_endpoint_ids) errors = list() - for _, (service_handler, connection_devices) in service_handlers.items(): - _endpointids_to_delete = [ - (device_uuid, endpoint_uuid, topology_uuid) - for device_uuid, endpoint_uuid, topology_uuid in endpointids_to_delete - if device_uuid in connection_devices - ] + for device_type, (service_handler, connection_devices) in service_handlers.items(): + if device_type == DeviceTypeEnum.TERAFLOWSDN_CONTROLLER: + _endpointids_to_delete = endpointids_to_delete + else: + _endpointids_to_delete = [ + (device_uuid, endpoint_uuid, topology_uuid) + for device_uuid, endpoint_uuid, topology_uuid in endpointids_to_delete + if device_uuid in connection_devices + ] results_deleteendpoint = service_handler.DeleteEndpoint( _endpointids_to_delete, connection_uuid=connection_uuid ) -- GitLab From 7eea7be329b2bffa8ab327fe6dccaa98275b42fc Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 16:28:11 +0000 Subject: [PATCH 361/463] VNT Manager component: - Reviewed complete logic to request creation/removal of virtual links --- .../service/VNTManagerServiceServicerImpl.py | 236 ++++++++++++------ 1 file changed, 155 insertions(+), 81 deletions(-) diff --git a/src/vnt_manager/service/VNTManagerServiceServicerImpl.py b/src/vnt_manager/service/VNTManagerServiceServicerImpl.py index ca1a1b2f3..2424f5530 100644 --- a/src/vnt_manager/service/VNTManagerServiceServicerImpl.py +++ b/src/vnt_manager/service/VNTManagerServiceServicerImpl.py @@ -12,30 +12,44 @@ # See the License for the specific language governing permissions and # limitations under the License. +from typing import Dict, Optional import grpc, json, logging, uuid from confluent_kafka import Consumer as KafkaConsumer from confluent_kafka import Producer as KafkaProducer from confluent_kafka import KafkaError from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method -from common.proto.context_pb2 import Empty, Link, LinkId, LinkList +from common.proto.context_pb2 import Empty, Link, LinkId, LinkList, LinkTypeEnum from common.proto.vnt_manager_pb2_grpc import VNTManagerServiceServicer -from common.tools.grpc.Tools import grpc_message_to_json_string +#from common.tools.context_queries.EndPoint import get_endpoint_names +from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string from common.tools.kafka.Variables import KafkaConfig, KafkaTopic +#from common.tools.object_factory.Device import json_device_id +#from common.tools.object_factory.EndPoint import json_endpoint_id +from common.tools.object_factory.Link import json_link, json_link_id from context.client.ContextClient import ContextClient -from .vntm_config_device import configure, deconfigure +#from .vntm_config_device import configure, deconfigure LOGGER = logging.getLogger(__name__) -METRICS_POOL = MetricsPool("VNTManager", "RPC") +METRICS_POOL = MetricsPool('VNTManager', 'RPC') class VNTManagerServiceServicerImpl(VNTManagerServiceServicer): def __init__(self): - LOGGER.debug("Creating Servicer...") + LOGGER.debug('Creating Servicer...') self.context_client = ContextClient() + self.kafka_producer = KafkaProducer({ + 'bootstrap.servers' : KafkaConfig.get_kafka_address() + }) + self.kafka_consumer = KafkaConsumer({ + 'bootstrap.servers' : KafkaConfig.get_kafka_address(), + 'group.id' : str(uuid.uuid4()), + 'auto.offset.reset' : 'latest' + }) + self.kafka_consumer.subscribe([KafkaTopic.VNTMANAGER_RESPONSE.value]) self.links = [] - LOGGER.debug("Servicer Created") + LOGGER.debug('Servicer Created') @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def ListVirtualLinks(self, request : Empty, context : grpc.ServicerContext) -> LinkList: @@ -47,94 +61,154 @@ class VNTManagerServiceServicerImpl(VNTManagerServiceServicer): link = self.context_client.GetLink(request) return link if link.virtual else Empty() + def send_recommendation(self, vntm_request : Dict) -> str: + request_key = str(uuid.uuid4()) + vntm_request = json.dumps(vntm_request) + MSG = '[send_recommendation] request_key={:s} vntm_request={:s}' + LOGGER.info(MSG.format(str(request_key), str(vntm_request))) + self.kafka_producer.produce( + KafkaTopic.VNTMANAGER_REQUEST.value, + key=request_key.encode('utf-8'), + value=vntm_request.encode('utf-8'), + ) + self.kafka_producer.flush() + return request_key + + def send_vlink_create(self, request : Link) -> str: + return self.send_recommendation({ + 'event': 'vlink_create', 'data': grpc_message_to_json_string(request) + }) + + def send_vlink_remove(self, request : LinkId) -> str: + return self.send_recommendation({ + 'event': 'vlink_remove', 'data': grpc_message_to_json_string(request) + }) + + def wait_for_reply(self, request_key : str) -> Optional[Dict]: + LOGGER.info('[wait_for_reply] request_key={:s}'.format(str(request_key))) + + while True: + receive_msg = self.kafka_consumer.poll(2.0) + if receive_msg is None: continue + LOGGER.info('[wait_for_reply] receive_msg={:s}'.format(str(receive_msg))) + if receive_msg.error(): + if receive_msg.error().code() == KafkaError._PARTITION_EOF: continue + LOGGER.error('[wait_for_reply] Consumer error: {:s}'.format(str(receive_msg.error()))) + return None + + reply_key = receive_msg.key().decode('utf-8') + LOGGER.info('[wait_for_reply] reply_key={:s}'.format(str(reply_key))) + if reply_key == request_key: + LOGGER.info('[wait_for_reply] match!') + break + LOGGER.info('[wait_for_reply] no match... waiting...') + + json_receive_msg = json.loads(receive_msg.value().decode('utf-8')) + LOGGER.info('[wait_for_reply] json_receive_msg={:s}'.format(str(json_receive_msg))) + + if 'data' not in json_receive_msg: + MSG = 'Malformed reply: {:s}' + raise Exception(MSG.format(str(json_receive_msg))) + data = json_receive_msg['data'] + + if 'error' in data: + MSG = 'Something went wrong: {:s}' + raise Exception(MSG.format(str(data['error']))) + + if 'result' not in data: + MSG = 'Malformed reply: {:s}' + raise Exception(MSG.format(str(data))) + return data['result'] + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def SetVirtualLink(self, request : Link, context : grpc.ServicerContext) -> LinkId: try: LOGGER.info('[SetVirtualLink] request={:s}'.format(grpc_message_to_json_string(request))) - request_key = str(uuid.uuid4()) - kafka_producer = KafkaProducer({ - 'bootstrap.servers' : KafkaConfig.get_kafka_address() - }) - - vntm_request = json.dumps({ - 'event': 'vlink_create', 'data': grpc_message_to_json_string(request) - }).encode('utf-8') - LOGGER.info('[SetVirtualLink] vntm_request={:s}'.format(str(vntm_request))) - kafka_producer.produce( - KafkaTopic.VNTMANAGER_REQUEST.value, key=request_key, value=vntm_request - ) - kafka_producer.flush() - - kafka_consumer = KafkaConsumer({ - 'bootstrap.servers' : KafkaConfig.get_kafka_address(), - 'group.id' : str(uuid.uuid4()), - 'auto.offset.reset' : 'latest' - }) - kafka_consumer.subscribe([KafkaTopic.VNTMANAGER_RESPONSE.value]) - while True: - receive_msg = kafka_consumer.poll(2.0) - if receive_msg is None: continue - LOGGER.info('[SetVirtualLink] receive_msg={:s}'.format(str(receive_msg))) - if receive_msg.error(): - if receive_msg.error().code() == KafkaError._PARTITION_EOF: continue - LOGGER.error('Consumer error: {:s}'.format(str(receive_msg.error()))) - break - reply_key = receive_msg.key().decode('utf-8') - if reply_key == request_key: break - - link = Link(**json.loads(receive_msg.value().decode('utf-8'))) - # at this point, we know the request was accepted and an optical connection was created - - # configure('CSGW1', 'xe5', 'CSGW2', 'xe5', 'ecoc2024-1') - self.context_client.SetLink(link) + request_key = self.send_vlink_create(request) + reply = self.wait_for_reply(request_key) + LOGGER.info('[SetVirtualLink] reply={:s}'.format(str(reply))) + + # At this point, we know the request is processed and an optical connection was created + + vlink_uuid = reply['vlink_uuid'] + LOGGER.info('[SetVirtualLink] vlink_uuid={:s}'.format(str(vlink_uuid))) + + vlink_name = request.name + if len(vlink_name) == 0: vlink_name = request.link_id.link_uuid.uuid + LOGGER.info('[SetVirtualLink] vlink_name={:s}'.format(str(vlink_name))) + + vlink_endpoint_ids = [ + grpc_message_to_json(endpoint_id) + for endpoint_id in request.link_endpoint_ids + ] + LOGGER.info('[SetVirtualLink] vlink_endpoint_ids={:s}'.format(str(vlink_endpoint_ids))) + + total_capacity_gbps = request.attributes.total_capacity_gbps + LOGGER.info('[SetVirtualLink] total_capacity_gbps={:s}'.format(str(total_capacity_gbps))) + + vlink = Link(**json_link( + vlink_uuid, vlink_endpoint_ids, name=vlink_name, + link_type=LinkTypeEnum.LINKTYPE_VIRTUAL, + total_capacity_gbps=total_capacity_gbps, + )) + LOGGER.info('[SetVirtualLink] vlink={:s}'.format(grpc_message_to_json_string(vlink))) + + #device_names, endpoints_data = get_endpoint_names(self.context_client, request.link_endpoint_ids) + + #device_uuid_or_name_a = vlink_endpoint_ids[ 0]['device_id']['device_uuid']['uuid'] + #device_name_a = device_names.get(device_uuid_or_name_a, device_uuid_or_name_a) + + #device_uuid_or_name_b = vlink_endpoint_ids[-1]['device_id']['device_uuid']['uuid'] + #device_name_b = device_names.get(device_uuid_or_name_b, device_uuid_or_name_b) + + #endpoint_uuid_or_name_a = vlink_endpoint_ids[ 0]['endpoint_uuid']['uuid'] + #endpoint_name_a = endpoints_data.get(endpoint_uuid_or_name_a, (endpoint_uuid_or_name_a, None)) + #endpoint_name_a = endpoint_name_a.replace('PORT-', '') + + #endpoint_uuid_or_name_b = vlink_endpoint_ids[-1]['endpoint_uuid']['uuid'] + #endpoint_name_b = endpoints_data.get(endpoint_uuid_or_name_b, (endpoint_uuid_or_name_b, None)) + #endpoint_name_b = endpoint_name_b.replace('PORT-', '') + + #network_instance_name = '-'.join([ + # device_name_a, endpoint_name_a, device_name_b, endpoint_name_b + #]) + #configure( + # device_name_a, endpoint_name_a, device_name_b, endpoint_name_b, network_instance_name + #) + + vlink_id = self.context_client.SetLink(vlink) + + MSG = 'Virtual link created, vlink_id={:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(vlink_id))) + return vlink_id except: # pylint: disable=bare-except MSG = 'Exception setting virtual link={:s}' LOGGER.exception(MSG.format(str(request.link_id.link_uuid.uuid))) - return request.link_id + raise @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RemoveVirtualLink(self, request : LinkId, context : grpc.ServicerContext) -> Empty: try: - LOGGER.debug('Removing virtual link') - request_key = str(uuid.uuid4()) - - kafka_producer = KafkaProducer({ - 'bootstrap.servers' : KafkaConfig.get_kafka_address() - }) - - vntm_request = json.dumps({ - 'event': 'vlink_remove', 'data': grpc_message_to_json_string(request) - }).encode('utf-8') - LOGGER.info('[RemoveVirtualLink] vntm_request={:s}'.format(str(vntm_request))) - kafka_producer.produce( - KafkaTopic.VNTMANAGER_REQUEST.value, key=request_key, value=vntm_request - ) - kafka_producer.flush() - - kafka_consumer = KafkaConsumer({ - 'bootstrap.servers' : KafkaConfig.get_kafka_address(), - 'group.id' : str(uuid.uuid4()), - 'auto.offset.reset' : 'latest' - }) - kafka_consumer.subscribe([KafkaTopic.VNTMANAGER_RESPONSE.value]) - while True: - receive_msg = kafka_consumer.poll(2.0) - if receive_msg is None: continue - if receive_msg.error(): - if receive_msg.error().code() == KafkaError._PARTITION_EOF: continue - LOGGER.error('Consumer error: {:s}'.format(str(receive_msg.error()))) - break - reply_key = receive_msg.key().decode('utf-8') - if reply_key == request_key: break - - link_id = LinkId(**json.loads(receive_msg.value().decode('utf-8'))) - # at this point, we know the request was accepted and an optical connection was deleted + LOGGER.info('[RemoveVirtualLink] request={:s}'.format(grpc_message_to_json_string(request))) + request_key = self.send_vlink_remove(request) + reply = self.wait_for_reply(request_key) + LOGGER.info('[RemoveVirtualLink] reply={:s}'.format(str(reply))) + + # At this point, we know the request is processed and an optical connection was removed + + vlink_uuid = request.link_uuid.uuid + LOGGER.info('[RemoveVirtualLink] vlink_uuid={:s}'.format(str(vlink_uuid))) + + vlink_id = LinkId(**json_link_id(vlink_uuid)) + LOGGER.info('[RemoveVirtualLink] vlink_id={:s}'.format(grpc_message_to_json_string(vlink_id))) # deconfigure('CSGW1', 'xe5', 'CSGW2', 'xe5', 'ecoc2024-1') - self.context_client.RemoveLink(link_id) - LOGGER.info('Removed') + self.context_client.RemoveLink(vlink_id) + + MSG = 'Virtual link removed, vlink_id={:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(vlink_id))) + return Empty() except: # pylint: disable=bare-except MSG = 'Exception removing virtual link={:s}' LOGGER.exception(MSG.format(str(request.link_uuid.uuid))) - - return Empty() + raise -- GitLab From 2fc95bd17dabf09948087a00ddcbc309a0d7d2a9 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 16:34:54 +0000 Subject: [PATCH 362/463] Manifests: - Enabled DEBUG when needed --- manifests/opticalcontrollerservice.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/opticalcontrollerservice.yaml b/manifests/opticalcontrollerservice.yaml index d537076fe..341af782a 100644 --- a/manifests/opticalcontrollerservice.yaml +++ b/manifests/opticalcontrollerservice.yaml @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" + value: "DEBUG" #readinessProbe: # exec: # command: ["/bin/grpc_health_probe", "-addr=:10060"] -- GitLab From 681e6276696c7ecb543d65acfcfac3c6696bbdb8 Mon Sep 17 00:00:00 2001 From: hajipour Date: Tue, 18 Mar 2025 17:41:56 +0100 Subject: [PATCH 363/463] debug & refactor: ConnectionEntry added as a dependency of the ConnectionEntry --- .../algorithms/tools/ComputeSubServices.py | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py b/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py index 053e6d542..7cd419c6b 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py @@ -61,9 +61,11 @@ class ConnectionEntry: uuid: str = '' service_type : ServiceTypeEnum = ServiceTypeEnum.SERVICETYPE_UNKNOWN path_hops : List[Dict] = field(default_factory=list) - dependencies : List[str] = field(default_factory=list) + dependencies : List['ConnectionEntry'] = field(default_factory=list) def calculate_subservice_uuid(self, main_service_uuid: str) -> None: + if self.uuid: + return composed_string = main_service_uuid + '-'.join( f'{path_hop["device"]}/{path_hop["ingress_ep"]}/{path_hop["egress_ep"]}' for path_hop in self.path_hops ) @@ -103,28 +105,25 @@ def convert_explicit_path_hops_to_connections( prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) - connection_entry.calculate_subservice_uuid(main_service_uuid) connection_stack.put(connection_entry) # underlying connection ended connection: ConnectionEntry = connection_stack.get() connections.append(connection) - connection_stack.queue[-1].dependencies.append(connection.uuid) - #connection_stack.queue[-1][2].append(path_hop) + connection_stack.queue[-1].dependencies.append(connection) elif prv_res_class[2] is None and res_class[2] is not None: # entering domain of a device controller, create underlying connection LOGGER.debug(' entering domain of a device controller, create underlying connection') prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) - connection_entry.calculate_subservice_uuid(main_service_uuid) connection_stack.put(connection_entry) elif prv_res_class[2] is not None and res_class[2] is None: # leaving domain of a device controller, terminate underlying connection LOGGER.debug(' leaving domain of a device controller, terminate underlying connection') connection = connection_stack.get() connections.append(connection) - connection_stack.queue[-1].dependencies.append(connection.uuid) + connection_stack.queue[-1].dependencies.append(connection) connection_stack.queue[-1].path_hops.append(path_hop) elif prv_res_class[2] is not None and res_class[2] is not None: if prv_res_class[2] == res_class[2]: @@ -136,12 +135,11 @@ def convert_explicit_path_hops_to_connections( LOGGER.debug(' switching to different device controller, chain connections') connection = connection_stack.get() connections.append(connection) - connection_stack.queue[-1].dependencies.append(connection.uuid) + connection_stack.queue[-1].dependencies.append(connection) prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) - connection_entry.calculate_subservice_uuid (main_service_uuid) connection_stack.put(connection_entry) elif prv_res_class[0] is None: # path ingress @@ -154,7 +152,6 @@ def convert_explicit_path_hops_to_connections( prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) - connection_entry.calculate_subservice_uuid(main_service_uuid) connection_stack.put(connection_entry) elif prv_res_class[0] == res_class[0]: # same resource group kind @@ -168,19 +165,18 @@ def convert_explicit_path_hops_to_connections( LOGGER.debug(' chain connections') connection = connection_stack.get() connections.append(connection) - connection_stack.queue[-1].dependencies.append(connection.uuid) + connection_stack.queue[-1].dependencies.append(connection) prv_service_type = connection_stack.queue[-1].service_type service_type = get_service_type(res_class[1], prv_service_type) connection_entry = ConnectionEntry(service_type=service_type, path_hops=[path_hop]) - connection_entry.calculate_subservice_uuid(main_service_uuid) connection_stack.put(connection_entry) elif prv_res_class[0] < res_class[0]: # underlying connection ended LOGGER.debug(' underlying connection ended') connection = connection_stack.get() connections.append(connection) - connection_stack.queue[-1].dependencies.append(connection.uuid) + connection_stack.queue[-1].dependencies.append(connection) connection_stack.queue[-1].path_hops.append(path_hop) else: raise Exception('Uncontrolled condition') @@ -193,7 +189,9 @@ def convert_explicit_path_hops_to_connections( connections.append(connection_stack.get()) LOGGER.debug('connections={:s}'.format(str(connections))) assert connection_stack.empty() - return [(c.uuid, c.service_type, c.path_hops, c.dependencies) for c in connections] + for c in connections: + c.calculate_subservice_uuid(main_service_uuid) + return [(c.uuid, c.service_type, c.path_hops, [cd.uuid for cd in c.dependencies]) for c in connections] def convert_explicit_path_hops_to_plain_connection( path_hops : List[Dict], main_service_uuid : str, main_service_type : ServiceTypeEnum -- GitLab From e62ec3fddc3e39a50e059c01c9c2ebd2c8550d5d Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 17:01:40 +0000 Subject: [PATCH 364/463] OFC25 tests: - Removed unneeded scripts - Fixed deploy.sh script --- src/tests/ofc25/_old/subscription_ws_e2e.sh | 42 --------------------- src/tests/ofc25/_old/subscription_ws_ip.sh | 42 --------------------- src/tests/ofc25/deploy.sh | 15 ++------ 3 files changed, 3 insertions(+), 96 deletions(-) delete mode 100755 src/tests/ofc25/_old/subscription_ws_e2e.sh delete mode 100755 src/tests/ofc25/_old/subscription_ws_ip.sh diff --git a/src/tests/ofc25/_old/subscription_ws_e2e.sh b/src/tests/ofc25/_old/subscription_ws_e2e.sh deleted file mode 100755 index 26c430cdf..000000000 --- a/src/tests/ofc25/_old/subscription_ws_e2e.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -######################################################################################################################## -# Read deployment settings -######################################################################################################################## - -# If not already set, set the namespace where CockroackDB will be deployed. -export SUBSCRIPTION_WS_NAMESPACE=${SUBSCRIPTION_WS_NAMESPACE:-"tfs-e2e"} - -# If not already set, set the external port interface will be exposed to. -export SUBSCRIPTION_WS_EXT_PORT=${SUBSCRIPTION_WS_EXT_PORT:-"8761"} - - -######################################################################################################################## -# Automated steps start here -######################################################################################################################## - - -echo "Subscription WebSocket Port Mapping" -echo ">>> ExposeSubscription WebSocket port (${SUBSCRIPTION_WS_EXT_PORT}->${SUBSCRIPTION_WS_EXT_PORT})" -PATCH='{"data": {"'${SUBSCRIPTION_WS_EXT_PORT}'": "'${SUBSCRIPTION_WS_NAMESPACE}'/nbiservice:'${SUBSCRIPTION_WS_EXT_PORT}'"}}' -kubectl patch configmap nginx-ingress-tcp-microk8s-conf-e2e --namespace ingress --patch "${PATCH}" - -PORT_MAP='{"containerPort": '${SUBSCRIPTION_WS_EXT_PORT}', "hostPort": '${SUBSCRIPTION_WS_EXT_PORT}'}' -CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}' -PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}' -kubectl patch daemonset nginx-ingress-microk8s-controller-e2e --namespace ingress --patch "${PATCH}" -echo diff --git a/src/tests/ofc25/_old/subscription_ws_ip.sh b/src/tests/ofc25/_old/subscription_ws_ip.sh deleted file mode 100755 index 379929d73..000000000 --- a/src/tests/ofc25/_old/subscription_ws_ip.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -######################################################################################################################## -# Read deployment settings -######################################################################################################################## - -# If not already set, set the namespace where CockroackDB will be deployed. -export SUBSCRIPTION_WS_NAMESPACE=${SUBSCRIPTION_WS_NAMESPACE:-"tfs-ip"} - -# If not already set, set the external port interface will be exposed to. -export SUBSCRIPTION_WS_INT_PORT=${SUBSCRIPTION_WS_INT_PORT:-"8762"} -######################################################################################################################## -# Automated steps start here -######################################################################################################################## - - - - -echo "Subscription WebSocket Port Mapping" -echo ">>> ExposeSubscription WebSocket port (${SUBSCRIPTION_WS_INT_PORT}->${SUBSCRIPTION_WS_INT_PORT})" -PATCH='{"data": {"'${SUBSCRIPTION_WS_INT_PORT}'": "'${SUBSCRIPTION_WS_NAMESPACE}'/nbiservice:'${SUBSCRIPTION_WS_INT_PORT}'"}}' -kubectl patch configmap nginx-ingress-tcp-microk8s-conf-ip --namespace ingress --patch "${PATCH}" - -PORT_MAP='{"containerPort": '${SUBSCRIPTION_WS_INT_PORT}', "hostPort": '${SUBSCRIPTION_WS_INT_PORT}'}' -CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}' -PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}' -kubectl patch daemonset nginx-ingress-microk8s-controller-ip --namespace ingress --patch "${PATCH}" -echo diff --git a/src/tests/ofc25/deploy.sh b/src/tests/ofc25/deploy.sh index 8bd0b8989..fb892e14c 100755 --- a/src/tests/ofc25/deploy.sh +++ b/src/tests/ofc25/deploy.sh @@ -47,9 +47,9 @@ #yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/vntmservice.yaml # Create secondary ingress controllers -#kubectl apply -f src/tests/ofc25/nginx-ingress-controller-opt.yaml -#kubectl apply -f src/tests/ofc25/nginx-ingress-controller-ip.yaml -#kubectl apply -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml +kubectl apply -f src/tests/ofc25/nginx-ingress-controller-opt.yaml +kubectl apply -f src/tests/ofc25/nginx-ingress-controller-ip.yaml +kubectl apply -f src/tests/ofc25/nginx-ingress-controller-e2e.yaml cp manifests/contextservice.yaml manifests/contextservice.yaml.bak @@ -111,13 +111,4 @@ while ! kubectl --namespace tfs-e2e logs deployment/contextservice -c server 2>& kubectl --namespace tfs-e2e logs deployment/contextservice -c server -# ===== Onboarding topologies ========================= -# TODO: pending... - - -# ===== Configure subscriptions ========================= -# This should not be needed -#./src/tests/ofc25/subscription_ws_ip.sh -#./src/tests/ofc25/subscription_ws_e2e.sh - echo "Done!" -- GitLab From 5a155f4bc15485cb575df81c555a7a22c525b716 Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Wed, 27 Nov 2024 16:21:42 +0100 Subject: [PATCH 365/463] First draft --- proto/ztp_server.proto | 23 + src/common/Constants.py | 2 + src/ztp_server/.gitlab-ci.yml | 120 + src/ztp_server/Config.py | 20 + src/ztp_server/Dockerfile | 97 + src/ztp_server/README.md | 35 + src/ztp_server/__init__.py | 14 + src/ztp_server/client/ZtpClient.py | 61 + src/ztp_server/client/__init__.py | 14 + src/ztp_server/data/nso_client.proto | 60 + .../data/provisioning_script_sonic.sh | 38 + src/ztp_server/data/ztp.json | 11 + src/ztp_server/requirements.in | 28 + src/ztp_server/service/ZtpServerService.py | 28 + .../service/ZtpServerServiceServicerImpl.py | 40 + src/ztp_server/service/__init__.py | 14 + src/ztp_server/service/__main__.py | 78 + .../service/context_subscription/__init__.py | 64 + .../service/rest_server/RestServer.py | 23 + .../service/rest_server/__init__.py | 14 + .../rest_server/ztpServer_plugins/__init__.py | 14 + .../ztpServer_plugins/tfs_api/Resources.py | 47 + .../ztpServer_plugins/tfs_api/Tools.py | 41 + .../ztpServer_plugins/tfs_api/__init__.py | 30 + .../ztpServer_plugins/tools/Authentication.py | 25 + .../tools/HttpStatusCodes.py | 20 + .../ztpServer_plugins/tools/Validator.py | 35 + .../ztpServer_plugins/tools/__init__.py | 14 + src/ztp_server/tests/Constants.py | 85 + .../tests/MockService_Dependencies.py | 58 + src/ztp_server/tests/PrepareTestScenario.py | 169 + src/ztp_server/tests/__init__.py | 14 + src/ztp_server/tests/data/ietf_acl.json | 56 + .../tests/data/ietf_l3vpn_req_svc1.json | 231 ++ .../tests/data/ietf_l3vpn_req_svc2.json | 231 ++ .../tests/data/test-ietf-network.json | 1962 +++++++++++ src/ztp_server/tests/data/tfs_api_dummy.json | 442 +++ .../data/topology-7router-emu-dummy.json | 157 + .../tests/data/topology-7router-emu.json | 156 + src/ztp_server/tests/data/topology-dummy.json | 3134 +++++++++++++++++ src/ztp_server/tests/data/topology-real.json | 259 ++ src/ztp_server/tests/ietf_acl_client.py | 89 + src/ztp_server/tests/test_etsi_bwm.py | 240 ++ src/ztp_server/tests/test_ietf_l2vpn.py | 75 + src/ztp_server/tests/test_ietf_l3vpn.py | 113 + src/ztp_server/tests/test_ietf_network.py | 105 + src/ztp_server/tests/test_slice.py | 125 + src/ztp_server/tests/test_tfs_api.py | 217 ++ src/ztp_server/tests/test_yang_acl.py | 104 + 49 files changed, 9032 insertions(+) create mode 100755 proto/ztp_server.proto create mode 100755 src/ztp_server/.gitlab-ci.yml create mode 100755 src/ztp_server/Config.py create mode 100755 src/ztp_server/Dockerfile create mode 100755 src/ztp_server/README.md create mode 100755 src/ztp_server/__init__.py create mode 100755 src/ztp_server/client/ZtpClient.py create mode 100755 src/ztp_server/client/__init__.py create mode 100644 src/ztp_server/data/nso_client.proto create mode 100644 src/ztp_server/data/provisioning_script_sonic.sh create mode 100644 src/ztp_server/data/ztp.json create mode 100755 src/ztp_server/requirements.in create mode 100755 src/ztp_server/service/ZtpServerService.py create mode 100755 src/ztp_server/service/ZtpServerServiceServicerImpl.py create mode 100755 src/ztp_server/service/__init__.py create mode 100755 src/ztp_server/service/__main__.py create mode 100755 src/ztp_server/service/context_subscription/__init__.py create mode 100755 src/ztp_server/service/rest_server/RestServer.py create mode 100755 src/ztp_server/service/rest_server/__init__.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/__init__.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/__init__.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tools/Authentication.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tools/HttpStatusCodes.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py create mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tools/__init__.py create mode 100755 src/ztp_server/tests/Constants.py create mode 100755 src/ztp_server/tests/MockService_Dependencies.py create mode 100755 src/ztp_server/tests/PrepareTestScenario.py create mode 100755 src/ztp_server/tests/__init__.py create mode 100755 src/ztp_server/tests/data/ietf_acl.json create mode 100755 src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json create mode 100755 src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json create mode 100755 src/ztp_server/tests/data/test-ietf-network.json create mode 100755 src/ztp_server/tests/data/tfs_api_dummy.json create mode 100755 src/ztp_server/tests/data/topology-7router-emu-dummy.json create mode 100755 src/ztp_server/tests/data/topology-7router-emu.json create mode 100755 src/ztp_server/tests/data/topology-dummy.json create mode 100755 src/ztp_server/tests/data/topology-real.json create mode 100755 src/ztp_server/tests/ietf_acl_client.py create mode 100755 src/ztp_server/tests/test_etsi_bwm.py create mode 100755 src/ztp_server/tests/test_ietf_l2vpn.py create mode 100755 src/ztp_server/tests/test_ietf_l3vpn.py create mode 100755 src/ztp_server/tests/test_ietf_network.py create mode 100755 src/ztp_server/tests/test_slice.py create mode 100755 src/ztp_server/tests/test_tfs_api.py create mode 100755 src/ztp_server/tests/test_yang_acl.py diff --git a/proto/ztp_server.proto b/proto/ztp_server.proto new file mode 100755 index 000000000..37ccc71d3 --- /dev/null +++ b/proto/ztp_server.proto @@ -0,0 +1,23 @@ +// Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package ztpServer; + +import "context.proto"; + +service ZtpServerService { + rpc GetProvisioningScript (context.ProvisioningScriptName ) returns (context.ProvisioningScript ) {} + rpc GetZtpProvisioning (context.ZtpFileName ) returns (context.ZtpFile ) {} +} diff --git a/src/common/Constants.py b/src/common/Constants.py index 682007646..660e99f04 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -42,6 +42,7 @@ class ServiceNameEnum(Enum): SERVICE = 'service' SLICE = 'slice' ZTP = 'ztp' + ZTP_SERVER = 'ztp_server' POLICY = 'policy' MONITORING = 'monitoring' DLT = 'dlt' @@ -84,6 +85,7 @@ DEFAULT_SERVICE_GRPC_PORTS = { ServiceNameEnum.SERVICE .value : 3030, ServiceNameEnum.SLICE .value : 4040, ServiceNameEnum.ZTP .value : 5050, + ServiceNameEnum.ZTP_SERVER .value : 5051, ServiceNameEnum.POLICY .value : 6060, ServiceNameEnum.MONITORING .value : 7070, ServiceNameEnum.DLT .value : 8080, diff --git a/src/ztp_server/.gitlab-ci.yml b/src/ztp_server/.gitlab-ci.yml new file mode 100755 index 000000000..71bf223ba --- /dev/null +++ b/src/ztp_server/.gitlab-ci.yml @@ -0,0 +1,120 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Build, tag, and push the Docker image to the GitLab Docker registry +build nbi: + variables: + IMAGE_NAME: 'nbi' # name of the microservice + IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - docker buildx build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker tag "$IMAGE_NAME:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + after_script: + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/$IMAGE_NAME/**/*.{py,in,yml} + - src/$IMAGE_NAME/Dockerfile + - src/$IMAGE_NAME/tests/*.py + - manifests/${IMAGE_NAME}service.yaml + - .gitlab-ci.yml + +# Apply unit test to the component +unit_test nbi: + variables: + IMAGE_NAME: 'nbi' # name of the microservice + IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) + stage: unit_test + needs: + - build nbi + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - > + if docker network list | grep teraflowbridge; then + echo "teraflowbridge is already created"; + else + docker network create -d bridge teraflowbridge; + fi + - > + if docker container ls | grep $IMAGE_NAME; then + docker rm -f $IMAGE_NAME; + else + echo "$IMAGE_NAME image is not in the system"; + fi + script: + - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + - docker run --name $IMAGE_NAME -d -p 9090:9090 -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG + - sleep 5 + - docker ps -a + - docker logs $IMAGE_NAME + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" + coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + after_script: + - docker rm -f $IMAGE_NAME + - docker network rm teraflowbridge + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/$IMAGE_NAME/**/*.{py,in,yml} + - src/$IMAGE_NAME/Dockerfile + - src/$IMAGE_NAME/tests/*.py + - src/$IMAGE_NAME/tests/Dockerfile + - manifests/${IMAGE_NAME}service.yaml + - .gitlab-ci.yml + artifacts: + when: always + reports: + junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report_*.xml + +## Deployment of the service in Kubernetes Cluster +#deploy nbi: +# variables: +# IMAGE_NAME: 'nbi' # name of the microservice +# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) +# stage: deploy +# needs: +# - unit test nbi +# # - integ_test execute +# script: +# - 'sed -i "s/$IMAGE_NAME:.*/$IMAGE_NAME:$IMAGE_TAG/" manifests/${IMAGE_NAME}service.yaml' +# - kubectl version +# - kubectl get all +# - kubectl apply -f "manifests/${IMAGE_NAME}service.yaml" +# - kubectl get all +# # environment: +# # name: test +# # url: https://example.com +# # kubernetes: +# # namespace: test +# rules: +# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' +# when: manual +# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' +# when: manual diff --git a/src/ztp_server/Config.py b/src/ztp_server/Config.py new file mode 100755 index 000000000..83a350058 --- /dev/null +++ b/src/ztp_server/Config.py @@ -0,0 +1,20 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from werkzeug.security import generate_password_hash + +# REST-API users +RESTAPI_USERS = { # TODO: implement a database of credentials and permissions + 'admin': generate_password_hash('admin'), +} diff --git a/src/ztp_server/Dockerfile b/src/ztp_server/Dockerfile new file mode 100755 index 000000000..a9be06d37 --- /dev/null +++ b/src/ztp_server/Dockerfile @@ -0,0 +1,97 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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 + +# Install dependencies +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install wget g++ git build-essential cmake libpcre2-dev python3-dev python3-cffi && \ + rm -rf /var/lib/apt/lists/* + +# Download, build and install libyang. Note that APT package is outdated +# - Ref: https://github.com/CESNET/libyang +# - Ref: https://github.com/CESNET/libyang-python/ +RUN mkdir -p /var/libyang +RUN git clone https://github.com/CESNET/libyang.git /var/libyang +WORKDIR /var/libyang +RUN git fetch +RUN git checkout v2.1.148 +RUN mkdir -p /var/libyang/build +WORKDIR /var/libyang/build +RUN cmake -D CMAKE_BUILD_TYPE:String="Release" .. +RUN make +RUN make install +RUN ldconfig + +# Set Python to show logs as they occur +ENV PYTHONUNBUFFERED=0 + +# Download the gRPC health probe +RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ + wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ + chmod +x /bin/grpc_health_probe + +# 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 + +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + +# Add common files into working directory +WORKDIR /var/teraflow/common +COPY src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto +RUN touch __init__.py +COPY proto/*.proto ./ +RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto +RUN rm *.proto +RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; + +# Create component sub-folders, get specific Python packages +RUN mkdir -p /var/teraflow/nbi +WORKDIR /var/teraflow/nbi +COPY src/nbi/requirements.in requirements.in +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +# Add component files into working directory +WORKDIR /var/teraflow +COPY src/nbi/. nbi/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ +COPY src/service/__init__.py service/__init__.py +COPY src/service/client/. service/client/ +COPY src/slice/__init__.py slice/__init__.py +COPY src/slice/client/. slice/client/ +COPY src/qkd_app/__init__.py qkd_app/__init__.py +COPY src/qkd_app/client/. qkd_app/client/ +COPY src/vnt_manager/__init__.py vnt_manager/__init__.py +COPY src/vnt_manager/client/. vnt_manager/client/ +RUN mkdir -p /var/teraflow/tests/tools +COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ + +# Start the service +ENTRYPOINT ["python", "-m", "nbi.service"] diff --git a/src/ztp_server/README.md b/src/ztp_server/README.md new file mode 100755 index 000000000..32902a0b3 --- /dev/null +++ b/src/ztp_server/README.md @@ -0,0 +1,35 @@ +# NBI Component + +The NBI component uses libyang to validate and process messages. Follow instructions below to install it. + +## Install libyang +- Ref: https://github.com/CESNET/libyang +- Ref: https://github.com/CESNET/libyang-python/ + +__NOTE__: APT package is extremely outdated and does not work for our purposes. + +### Build Requisites +```bash +sudo apt-get install build-essential cmake libpcre2-dev +sudo apt-get install python3-dev gcc python3-cffi +``` + +### Build from source +```bash +mkdir ~/tfs-ctrl/libyang +git clone https://github.com/CESNET/libyang.git ~/tfs-ctrl/libyang +cd ~/tfs-ctrl/libyang +git fetch +git checkout v2.1.148 +mkdir ~/tfs-ctrl/libyang/build +cd ~/tfs-ctrl/libyang/build +cmake -D CMAKE_BUILD_TYPE:String="Release" .. +make +sudo make install +sudo ldconfig +``` + +### Install Python bindings +```bash +pip install libyang==2.8.0 +``` diff --git a/src/ztp_server/__init__.py b/src/ztp_server/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/client/ZtpClient.py b/src/ztp_server/client/ZtpClient.py new file mode 100755 index 000000000..a790b76e2 --- /dev/null +++ b/src/ztp_server/client/ZtpClient.py @@ -0,0 +1,61 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 grpc, logging +from common.Constants import ServiceNameEnum +from common.Settings import get_service_host, get_service_port_grpc +from common.proto.ztpServer_pb2_grpc import ztpServerServiceStub #TODO +from common.proto.context_pb2 import ( + ZtpFileName, ZtpFile, ProvisioningScriptName, ProvisioningScript) +from common.tools.client.RetryDecorator import retry, delay_exponential +from common.tools.grpc.Tools import grpc_message_to_json_string + +LOGGER = logging.getLogger(__name__) +MAX_RETRIES = 15 +DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) +RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') + +class ZtpClient: + def __init__(self, host=None, port=None): + if not host: host = get_service_host(ServiceNameEnum.ZTP_SERVER) + if not port: port = get_service_port_grpc(ServiceNameEnum.ZTP_SERVER) + self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) + LOGGER.debug('Creating channel to {:s}...'.format(str(self.endpoint))) + self.channel = None + self.stub = None + self.connect() + LOGGER.debug('Channel created') + + def connect(self): + self.channel = grpc.insecure_channel(self.endpoint) + self.stub = ztpServerServiceStub(self.channel) #TODO + + def close(self): + if self.channel is not None: self.channel.close() + self.channel = None + self.stub = None + + @RETRY_DECORATOR + def GetProvisioningScript(self, request : ProvisioningScriptName) -> ProvisioningScript: + LOGGER.debug('GetProvisioningScript request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.GetProvisioningScript(request) + LOGGER.debug('GetProvisioningScript result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def GetZtpProvisioning(self, request : ZtpFileName) -> ZtpFile: + LOGGER.debug('GetZtpProvisioning request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.GetZtpProvisioning(request) + LOGGER.debug('GetZtpProvisioning result: {:s}'.format(grpc_message_to_json_string(response))) + return response diff --git a/src/ztp_server/client/__init__.py b/src/ztp_server/client/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/client/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/data/nso_client.proto b/src/ztp_server/data/nso_client.proto new file mode 100644 index 000000000..d5983c62c --- /dev/null +++ b/src/ztp_server/data/nso_client.proto @@ -0,0 +1,60 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package nos_client; + +message NOS_SW { + string ztp_device_sw_url = 1; + bytes ztp_device_sw_file = 2; +} + +// For ONIE Requests +message NOS_SW_REQ { + string serial_number = 1; + string eth_addr = 2; + string vendor_id = 3; + string machine = 4; + string machine_rev = 5; + string arch = 6; + string security_key = 7; + string operation = 8; +} + +message Config_Script { + string config_script_url = 1; + bytes config_script_file = 2; +} + +message Config_Script_REQ { + string agent = 1; + string machine = 2; + string serial_number = 3; + string eth_addr = 4; + string version = 5; +} + +message Status_Notification { + string status = 1; + string serial_number = 2; + string eth_addr = 3; +} + +message Empty{} + +service nos_client { + rpc GetNOSFile (NOS_SW_REQ) returns (NOS_SW) {} + rpc GetConfigScriptFile (Config_Script_REQ) returns (Config_Script) {} + rpc NotifyStatus (Status_Notification) returns (Empty) {} +} diff --git a/src/ztp_server/data/provisioning_script_sonic.sh b/src/ztp_server/data/provisioning_script_sonic.sh new file mode 100644 index 000000000..c4dd20438 --- /dev/null +++ b/src/ztp_server/data/provisioning_script_sonic.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +PRODUCT_NAME=$(show version | grep 'Platform' | awk '{print $2}') +SERIAL_NUMBER=$(show version | grep 'Serial Number' | awk '{print $3}') +BASE_MAC_ADDRESS=$(show platform syseeprom | grep 'Base MAC Address' | awk '{print $6}') +SONIC_VERSION=$(show version | grep 'SONiC Software Version' | awk '{print $4}') + +# URL of the config_db.json file +CONFIG_DB_URL="http://10.1.1.119:9001/config/config_db.json" + +# Directory where the file will be saved +DEST_DIR="/etc/sonic" +DEST_FILE="$DEST_DIR/config_db.json" + +# Download the config_db.json file +curl -o $DEST_FILE -H "User-Agent: SONiC-ZTP/0.1" \ + -H "PRODUCT-NAME: $PRODUCT_NAME" \ + -H "SERIAL-NUMBER: $SERIAL_NUMBER" \ + -H "BASE-MAC-ADDRESS: $BASE_MAC_ADDRESS" \ + -H "SONiC-VERSION: $SONIC_VERSION" \ + $CONFIG_DB_URL +if [ $? -ne 0 ]; then + logger "Error: Failed to download the file from $CONFIG_DB_URL" + exit 1 +fi + +# Reload the configuration database +sudo config reload -y + +# Check if the reload was successful +if [ $? -eq 0 ]; then + logger "The configuration database reloaded successfully." +else + logger "Error: Failed to reload the configuration database." + exit 1 +fi + +logger "Plugin executed successfully." diff --git a/src/ztp_server/data/ztp.json b/src/ztp_server/data/ztp.json new file mode 100644 index 000000000..6e606a5e8 --- /dev/null +++ b/src/ztp_server/data/ztp.json @@ -0,0 +1,11 @@ +{ + "ztp": { + "01-provisioning-script": { + "plugin": { + "url": "http://localhost:9001/provisioning/provisioning_script_sonic.sh" + }, + "reboot-on-success": true + } + } + } + \ No newline at end of file diff --git a/src/ztp_server/requirements.in b/src/ztp_server/requirements.in new file mode 100755 index 000000000..0d7804836 --- /dev/null +++ b/src/ztp_server/requirements.in @@ -0,0 +1,28 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +deepdiff==6.7.* +deepmerge==1.1.* +Flask==2.1.3 +Flask-HTTPAuth==4.5.0 +Flask-RESTful==0.3.9 +jsonschema==4.4.0 +libyang==2.8.0 +netaddr==0.9.0 +pyang==2.6.0 +git+https://github.com/robshakir/pyangbind.git +pydantic==2.6.3 +requests==2.27.1 +werkzeug==2.3.7 +websockets==12.0 diff --git a/src/ztp_server/service/ZtpServerService.py b/src/ztp_server/service/ZtpServerService.py new file mode 100755 index 000000000..2b4da4f93 --- /dev/null +++ b/src/ztp_server/service/ZtpServerService.py @@ -0,0 +1,28 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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.Constants import ServiceNameEnum +from common.Settings import get_service_port_grpc +from common.proto.ztpServer_pb2_grpc import add_Ztp_ServerServiceServicer_to_server +from common.tools.service.GenericGrpcService import GenericGrpcService +from ztp_server.service.ZtpServerServiceServicerImpl import ZtpServerServiceServicerImpl + +class ZtpServerService(GenericGrpcService): + def __init__(self, cls_name: str = __name__) -> None: + port = get_service_port_grpc(ServiceNameEnum.ZTP_SERVER) + super().__init__(port, cls_name=cls_name) + self.ztp_servicer = ZtpServerServiceServicerImpl() + + def install_servicers(self): + add_Ztp_ServerServiceServicer_to_server(self.ztp_servicer, self.server) diff --git a/src/ztp_server/service/ZtpServerServiceServicerImpl.py b/src/ztp_server/service/ZtpServerServiceServicerImpl.py new file mode 100755 index 000000000..009cda922 --- /dev/null +++ b/src/ztp_server/service/ZtpServerServiceServicerImpl.py @@ -0,0 +1,40 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 grpc, logging +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.proto.context_pb2 import ( + ZtpFileName, ZtpFile, ProvisioningScriptName, ProvisioningScript) +from common.proto.ztpServer_pb2_grpc import ztpServerServiceServicer + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('ZTP_SERVER', 'RPC') + +class ZtpServerServiceServicerImpl(ztpServerServiceServicer): + def __init__(self): + LOGGER.info('Creating Servicer...') + LOGGER.info('Servicer Created') + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetZtpProvisioning(self, request : ProvisioningScriptName, context : grpc.ServicerContext) -> ProvisioningScript: + LOGGER.warning('NOT IMPLEMENTED') + return ProvisioningScript() + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetZtpProvisioning(self, request : ZtpFileName, context : grpc.ServicerContext) -> ZtpFile: + LOGGER.warning('NOT IMPLEMENTED') + return ZtpFile() + + diff --git a/src/ztp_server/service/__init__.py b/src/ztp_server/service/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/service/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/service/__main__.py b/src/ztp_server/service/__main__.py new file mode 100755 index 000000000..25e8605d3 --- /dev/null +++ b/src/ztp_server/service/__main__.py @@ -0,0 +1,78 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, signal, sys, threading +from prometheus_client import start_http_server +from common.Constants import ServiceNameEnum +from common.Settings import ( + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, + get_env_var_name, get_log_level, get_metrics_port, +) +from .ZtpServerService import ZtpServerService +from .rest_server.RestServer import RestServer + +from .context_subscription import register_context_subscription + +terminate = threading.Event() +LOGGER = None + +def signal_handler(signal, frame): # pylint: disable=redefined-outer-name, unused-argument + LOGGER.warning('Terminate signal received') + terminate.set() + +def main(): + global LOGGER # pylint: disable=global-statement + + log_level = get_log_level() + logging.basicConfig(level=log_level) + LOGGER = logging.getLogger(__name__) + + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + + LOGGER.info('Starting...') + + # Start metrics server + metrics_port = get_metrics_port() + start_http_server(metrics_port) + + # Starting ZtpServer service + grpc_service = ZtpServerService() + grpc_service.start() + + rest_server = RestServer() + register_tfs_api(rest_server) + rest_server.start() + + LOGGER.debug('Configured Resources:') + for resource in rest_server.api.resources: + LOGGER.debug(' - {:s}'.format(str(resource))) + + LOGGER.debug('Configured Rules:') + for rule in rest_server.app.url_map.iter_rules(): + LOGGER.debug(' - {:s}'.format(str(rule))) + + # Wait for Ctrl+C or termination signal + while not terminate.wait(timeout=1.0): pass + + LOGGER.info('Terminating...') + grpc_service.stop() + rest_server.shutdown() + rest_server.join() + + LOGGER.info('Bye') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/ztp_server/service/context_subscription/__init__.py b/src/ztp_server/service/context_subscription/__init__.py new file mode 100755 index 000000000..758f3d82c --- /dev/null +++ b/src/ztp_server/service/context_subscription/__init__.py @@ -0,0 +1,64 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 websockets.sync.server import serve +from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest +from common.Settings import get_setting +from context.client.ContextClient import ContextClient +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.tools.object_factory.Topology import json_topology_id +from common.tools.object_factory.Context import json_context_id +from common.proto.context_pb2 import ContextId, TopologyId +import json +import os +from vnt_manager.client.VNTManagerClient import VNTManagerClient + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) +ADMIN_TOPOLOGY_ID = TopologyId(**json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id=JSON_ADMIN_CONTEXT_ID)) + +vnt_manager_client: VNTManagerClient = VNTManagerClient() +context_client: ContextClient = ContextClient() + +ALL_HOSTS = "0.0.0.0" +WS_E2E_PORT = int(get_setting('WS_E2E_PORT', default='8762')) + +LOGGER = logging.getLogger(__name__) + + +def register_context_subscription(): + with serve(subcript_to_vnt_manager, ALL_HOSTS, WS_E2E_PORT, logger=LOGGER) as server: + LOGGER.info("Running subscription server...: {}:{}".format(ALL_HOSTS, str(WS_E2E_PORT))) + server.serve_forever() + LOGGER.info("Exiting subscription server...") + + +def subcript_to_vnt_manager(websocket): + for message in websocket: + LOGGER.debug("Message received: {}".format(message)) + message_json = json.loads(message) + request = VNTSubscriptionRequest() + request.host = message_json['host'] + request.port = message_json['port'] + LOGGER.debug("Received gRPC from ws: {}".format(request)) + + try: + vntm_reply = vnt_manager_client.VNTSubscript(request) + LOGGER.debug("Received gRPC from vntm: {}".format(vntm_reply)) + except Exception as e: + LOGGER.error('Could not subscript to VTNManager: {}'.format(e)) + + websocket.send(vntm_reply.subscription) diff --git a/src/ztp_server/service/rest_server/RestServer.py b/src/ztp_server/service/rest_server/RestServer.py new file mode 100755 index 000000000..0c4e45a8c --- /dev/null +++ b/src/ztp_server/service/rest_server/RestServer.py @@ -0,0 +1,23 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES 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.Constants import ServiceNameEnum +from common.Settings import get_service_baseurl_http, get_service_port_http +from common.tools.service.GenericRestServer import GenericRestServer + +class RestServer(GenericRestServer): + def __init__(self, cls_name: str = __name__) -> None: + bind_port = get_service_port_http(ServiceNameEnum.ZTP_SERVER) + base_url = get_service_baseurl_http(ServiceNameEnum.ZTP_SERVER) + super().__init__(bind_port, base_url, cls_name=cls_name) diff --git a/src/ztp_server/service/rest_server/__init__.py b/src/ztp_server/service/rest_server/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/service/rest_server/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/service/rest_server/ztpServer_plugins/__init__.py b/src/ztp_server/service/rest_server/ztpServer_plugins/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py new file mode 100755 index 000000000..c1b8c3733 --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py @@ -0,0 +1,47 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 +from flask.json import jsonify +from flask_restful import Resource, request +from werkzeug.exceptions import BadRequest +from common.proto.context_pb2 import Empty, LinkTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from slice.client.SliceClient import SliceClient +from vnt_manager.client.VNTManagerClient import VNTManagerClient + +from .Tools import ( + format_grpc_to_json, returnConfigFile +) + +LOGGER = logging.getLogger(__name__) + + +class _Resource(Resource): + def __init__(self) -> None: + super().__init__() + self.context_client = ContextClient() + self.device_client = DeviceClient() + self.service_client = ServiceClient() + self.vntmanager_client = VNTManagerClient() + self.slice_client = SliceClient() + + +class config(_Resource): + def get(self, config_db : str): + return returnConfigFile(config_db) #TODO define how to return configFile.json diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py new file mode 100755 index 000000000..6665dd4ce --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py @@ -0,0 +1,41 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict +from flask.json import jsonify +from common.proto.context_pb2 import ( + ConnectionId, returnConfigFile +) +from common.proto.policy_pb2 import PolicyRule, PolicyRuleId +from common.tools.grpc.Tools import grpc_message_to_json +from common.tools.object_factory.Connection import json_connection_id +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Device import json_device_id +from common.tools.object_factory.Link import json_link_id +from common.tools.object_factory.PolicyRule import json_policyrule_id +from common.tools.object_factory.Service import json_service_id +from common.tools.object_factory.Slice import json_slice_id +from common.tools.object_factory.Topology import json_topology_id + + +def format_grpc_to_json(grpc_reply): + return jsonify(grpc_message_to_json(grpc_reply)) + +def returnConfigFile(config_db): + path = config_db + + with open(path, 'r', encoding='utf-8') as configFile: + content = configFile.read() + + return content \ No newline at end of file diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/__init__.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/__init__.py new file mode 100755 index 000000000..7062772b4 --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/__init__.py @@ -0,0 +1,30 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from ztp_server.service.rest_server.RestServer import RestServer +from .Resources import ( + config +) + +URL_PREFIX = '/provisioning' + +# Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. +RESOURCES = [ + # (endpoint_name, resource_class, resource_url) + ('api.config', config, '/config/'), +] + +def register_tfs_api(rest_server : RestServer): + for endpoint_name, resource_class, resource_url in RESOURCES: + rest_server.add_resource(resource_class, URL_PREFIX + resource_url, endpoint=endpoint_name) diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Authentication.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Authentication.py new file mode 100755 index 000000000..aab239f36 --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Authentication.py @@ -0,0 +1,25 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from flask_httpauth import HTTPBasicAuth +from werkzeug.security import check_password_hash +from ztp_server.Config import RESTAPI_USERS + +HTTP_AUTH = HTTPBasicAuth() + +@HTTP_AUTH.verify_password +def verify_password(username, password): + if username not in RESTAPI_USERS: return None + if not check_password_hash(RESTAPI_USERS[username], password): return None + return username diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/HttpStatusCodes.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/HttpStatusCodes.py new file mode 100755 index 000000000..56ea475c7 --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/HttpStatusCodes.py @@ -0,0 +1,20 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +HTTP_OK = 200 +HTTP_CREATED = 201 +HTTP_NOCONTENT = 204 +HTTP_BADREQUEST = 400 +HTTP_SERVERERROR = 500 +HTTP_GATEWAYTIMEOUT = 504 \ No newline at end of file diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py new file mode 100755 index 000000000..66b607c8b --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py @@ -0,0 +1,35 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import List +from flask.json import jsonify +from jsonschema import _utils +from jsonschema.validators import validator_for +from jsonschema.protocols import Validator +from jsonschema.exceptions import ValidationError +from werkzeug.exceptions import BadRequest +from .HttpStatusCodes import HTTP_BADREQUEST + +def validate_message(schema, message): + validator_class = validator_for(schema) + validator : Validator = validator_class(schema) + errors : List[ValidationError] = sorted(validator.iter_errors(message), key=str) + if len(errors) == 0: return + response = jsonify([ + {'message': str(error.message), 'schema': str(error.schema), 'validator': str(error.validator), + 'where': str(_utils.format_as_index(container='message', indices=error.relative_path))} + for error in errors + ]) + response.status_code = HTTP_BADREQUEST + raise BadRequest(response=response) diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/__init__.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/tests/Constants.py b/src/ztp_server/tests/Constants.py new file mode 100755 index 000000000..886ddcafa --- /dev/null +++ b/src/ztp_server/tests/Constants.py @@ -0,0 +1,85 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +USERNAME = 'admin' +PASSWORD = 'admin' + +# Ref: https://osm.etsi.org/wikipub/index.php/WIM +WIM_MAPPING = [ + { + 'device-id' : 'dev-1', # pop_switch_dpid + #'device_interface_id' : ??, # pop_switch_port + 'service_endpoint_id' : 'ep-1', # wan_service_endpoint_id + 'service_mapping_info': { # wan_service_mapping_info, other extra info + 'bearer': {'bearer-reference': 'R1-EMU:13/1/2'}, + 'site-id': '1', + }, + #'switch_dpid' : ??, # wan_switch_dpid + #'switch_port' : ??, # wan_switch_port + #'datacenter_id' : ??, # vim_account + }, + { + 'device-id' : 'dev-2', # pop_switch_dpid + #'device_interface_id' : ??, # pop_switch_port + 'service_endpoint_id' : 'ep-2', # wan_service_endpoint_id + 'service_mapping_info': { # wan_service_mapping_info, other extra info + 'bearer': {'bearer-reference': 'R2-EMU:13/1/2'}, + 'site-id': '2', + }, + #'switch_dpid' : ??, # wan_switch_dpid + #'switch_port' : ??, # wan_switch_port + #'datacenter_id' : ??, # vim_account + }, + { + 'device-id' : 'dev-3', # pop_switch_dpid + #'device_interface_id' : ??, # pop_switch_port + 'service_endpoint_id' : 'ep-3', # wan_service_endpoint_id + 'service_mapping_info': { # wan_service_mapping_info, other extra info + 'bearer': {'bearer-reference': 'R3-EMU:13/1/2'}, + 'site-id': '3', + }, + #'switch_dpid' : ??, # wan_switch_dpid + #'switch_port' : ??, # wan_switch_port + #'datacenter_id' : ??, # vim_account + }, + { + 'device-id' : 'dev-4', # pop_switch_dpid + #'device_interface_id' : ??, # pop_switch_port + 'service_endpoint_id' : 'ep-4', # wan_service_endpoint_id + 'service_mapping_info': { # wan_service_mapping_info, other extra info + 'bearer': {'bearer-reference': 'R4-EMU:13/1/2'}, + 'site-id': '4', + }, + #'switch_dpid' : ??, # wan_switch_dpid + #'switch_port' : ??, # wan_switch_port + #'datacenter_id' : ??, # vim_account + }, +] + +SERVICE_TYPE = 'ELINE' + +SERVICE_CONNECTION_POINTS_1 = [ + {'service_endpoint_id': 'ep-1', + 'service_endpoint_encapsulation_type': 'dot1q', + 'service_endpoint_encapsulation_info': {'vlan': 1234}}, + {'service_endpoint_id': 'ep-2', + 'service_endpoint_encapsulation_type': 'dot1q', + 'service_endpoint_encapsulation_info': {'vlan': 1234}}, +] + +SERVICE_CONNECTION_POINTS_2 = [ + {'service_endpoint_id': 'ep-3', + 'service_endpoint_encapsulation_type': 'dot1q', + 'service_endpoint_encapsulation_info': {'vlan': 1234}}, +] \ No newline at end of file diff --git a/src/ztp_server/tests/MockService_Dependencies.py b/src/ztp_server/tests/MockService_Dependencies.py new file mode 100755 index 000000000..322441367 --- /dev/null +++ b/src/ztp_server/tests/MockService_Dependencies.py @@ -0,0 +1,58 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 os +from typing import Union +from common.Constants import ServiceNameEnum +from common.Settings import ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name +from common.proto.context_pb2_grpc import add_ContextServiceServicer_to_server +from common.proto.service_pb2_grpc import add_ServiceServiceServicer_to_server +from common.proto.slice_pb2_grpc import add_SliceServiceServicer_to_server +from common.tests.MockServicerImpl_Context import MockServicerImpl_Context +from common.tests.MockServicerImpl_Service import MockServicerImpl_Service +from common.tests.MockServicerImpl_Slice import MockServicerImpl_Slice +from common.tools.service.GenericGrpcService import GenericGrpcService + +LOCAL_HOST = '127.0.0.1' + +SERVICE_CONTEXT = ServiceNameEnum.CONTEXT +SERVICE_SERVICE = ServiceNameEnum.SERVICE +SERVICE_SLICE = ServiceNameEnum.SLICE + +class MockService_Dependencies(GenericGrpcService): + # Mock Service implementing Context, Service and Slice to simplify unitary tests of NBI + + def __init__(self, bind_port: Union[str, int]) -> None: + super().__init__(bind_port, LOCAL_HOST, enable_health_servicer=False, cls_name='MockService') + + # pylint: disable=attribute-defined-outside-init + def install_servicers(self): + self.context_servicer = MockServicerImpl_Context() + add_ContextServiceServicer_to_server(self.context_servicer, self.server) + + self.service_servicer = MockServicerImpl_Service() + add_ServiceServiceServicer_to_server(self.service_servicer, self.server) + + self.slice_servicer = MockServicerImpl_Slice() + add_SliceServiceServicer_to_server(self.slice_servicer, self.server) + + def configure_env_vars(self): + os.environ[get_env_var_name(SERVICE_CONTEXT, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) + os.environ[get_env_var_name(SERVICE_CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) + + os.environ[get_env_var_name(SERVICE_SERVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) + os.environ[get_env_var_name(SERVICE_SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) + + os.environ[get_env_var_name(SERVICE_SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) + os.environ[get_env_var_name(SERVICE_SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) diff --git a/src/ztp_server/tests/PrepareTestScenario.py b/src/ztp_server/tests/PrepareTestScenario.py new file mode 100755 index 000000000..a574f086b --- /dev/null +++ b/src/ztp_server/tests/PrepareTestScenario.py @@ -0,0 +1,169 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 enum, logging, os, pytest, requests, time +from typing import Any, Dict, List, Optional, Set, Union +from common.Constants import ServiceNameEnum +from common.Settings import ( + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_HTTP, + get_env_var_name, get_service_baseurl_http, get_service_port_http +) +from context.client.ContextClient import ContextClient +from nbi.service.rest_server.RestServer import RestServer +from nbi.service.rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api +from nbi.service.rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn +from nbi.service.rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn +from nbi.service.rest_server.nbi_plugins.ietf_network import register_ietf_network +from nbi.service.rest_server.nbi_plugins.tfs_api import register_tfs_api +from nbi.tests.MockService_Dependencies import MockService_Dependencies +from service.client.ServiceClient import ServiceClient +from slice.client.SliceClient import SliceClient +from tests.tools.mock_osm.MockOSM import MockOSM +from .Constants import USERNAME, PASSWORD, WIM_MAPPING + +LOCAL_HOST = '127.0.0.1' +MOCKSERVICE_PORT = 10000 +NBI_SERVICE_PORT = MOCKSERVICE_PORT + get_service_port_http(ServiceNameEnum.NBI) # avoid privileged ports +os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(NBI_SERVICE_PORT) + +@pytest.fixture(scope='session') +def mock_service(): + _service = MockService_Dependencies(MOCKSERVICE_PORT) + _service.configure_env_vars() + _service.start() + yield _service + _service.stop() + +@pytest.fixture(scope='session') +def nbi_service_rest(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument + _rest_server = RestServer() + register_etsi_bwm_api(_rest_server) + register_ietf_l2vpn(_rest_server) + register_ietf_l3vpn(_rest_server) + register_ietf_network(_rest_server) + register_tfs_api(_rest_server) + _rest_server.start() + time.sleep(1) # bring time for the server to start + yield _rest_server + _rest_server.shutdown() + _rest_server.join() + +@pytest.fixture(scope='session') +def osm_wim(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + wim_url = 'http://{:s}:{:d}'.format(LOCAL_HOST, NBI_SERVICE_PORT) + return MockOSM(wim_url, WIM_MAPPING, USERNAME, PASSWORD) + +@pytest.fixture(scope='session') +def context_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument + _client = ContextClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def service_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument + _client = ServiceClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def slice_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument + _client = SliceClient() + yield _client + _client.close() + +class RestRequestMethod(enum.Enum): + GET = 'get' + POST = 'post' + PUT = 'put' + PATCH = 'patch' + DELETE = 'delete' + +EXPECTED_STATUS_CODES : Set[int] = { + requests.codes['OK' ], + requests.codes['CREATED' ], + requests.codes['ACCEPTED' ], + requests.codes['NO_CONTENT'], +} + +def do_rest_request( + method : RestRequestMethod, url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + base_url = get_service_baseurl_http(ServiceNameEnum.NBI) or '' + request_url = 'http://{:s}:{:s}@{:s}:{:d}{:s}{:s}'.format( + USERNAME, PASSWORD, LOCAL_HOST, NBI_SERVICE_PORT, str(base_url), url + ) + if logger is not None: + msg = 'Request: {:s} {:s}'.format(str(method.value).upper(), str(request_url)) + if body is not None: msg += ' body={:s}'.format(str(body)) + logger.warning(msg) + reply = requests.request(method.value, request_url, timeout=timeout, json=body, allow_redirects=allow_redirects) + if logger is not None: + logger.warning('Reply: {:s}'.format(str(reply.text))) + assert reply.status_code in expected_status_codes, 'Reply failed with status code {:d}'.format(reply.status_code) + + if reply.content and len(reply.content) > 0: return reply.json() + return None + +def do_rest_get_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.GET, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_post_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.POST, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_put_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.PUT, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_patch_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.PATCH, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_delete_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.DELETE, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) diff --git a/src/ztp_server/tests/__init__.py b/src/ztp_server/tests/__init__.py new file mode 100755 index 000000000..53d5157f7 --- /dev/null +++ b/src/ztp_server/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/ztp_server/tests/data/ietf_acl.json b/src/ztp_server/tests/data/ietf_acl.json new file mode 100755 index 000000000..072df6d01 --- /dev/null +++ b/src/ztp_server/tests/data/ietf_acl.json @@ -0,0 +1,56 @@ +{ + "ietf-access-control-list": { + "acls": { + "acl": [ + { + "name": "sample-ipv4-acl", + "type": "ipv4-acl-type", + "aces": { + "ace": [ + { + "name": "rule1", + "matches": { + "ipv4": { + "dscp": 18, + "source-ipv4-network": "128.32.10.6/24", + "destination-ipv4-network": "172.10.33.0/24" + }, + "tcp": { + "flags": "syn", + "source-port": { + "port": 1444, + "operator": "eq" + }, + "destination-port": { + "port": 1333, + "operator": "eq" + } + } + }, + "actions": { + "forwarding": "drop" + } + } + ] + } + } + ], + "attachment-points": { + "interface": [ + { + "interface-id": "200", + "ingress": { + "acl-sets": { + "acl-set": [ + { + "name": "sample-ipv4-acl" + } + ] + } + } + } + ] + } + } + } +} diff --git a/src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json b/src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json new file mode 100755 index 000000000..bfeb93fb7 --- /dev/null +++ b/src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json @@ -0,0 +1,231 @@ +{ + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": { + "vpn-service": [ + { + "vpn-id": "vpn1" + } + ] + }, + "sites": { + "site": [ + { + "site-id": "site_OLT", + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "locations": { + "location": [ + { + "location-id": "OLT" + } + ] + }, + "devices": { + "device": [ + { + "device-id": "128.32.33.5", + "location": "OLT" + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "128.32.10.1/24", + "lan-tag": "vlan21", + "next-hop": "128.32.33.2" + }, + { + "lan": "128.32.20.1/24", + "lan-tag": "vlan21", + "next-hop": "128.32.33.2" + } + ] + } + } + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "500", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "128.32.33.5", + "vpn-attachment": { + "vpn-id": "vpn1", + "site-role": "ietf-l3vpn-svc:spoke-role" + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "128.32.33.254", + "customer-address": "128.32.33.2", + "prefix-length": 24 + } + } + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.101.1/24", + "lan-tag": "vlan21", + "next-hop": "128.32.33.254" + } + ] + } + } + } + ] + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + } + } + ] + } + } + } + } + } + ] + } + }, + { + "site-id": "site_POP", + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "locations": { + "location": [ + { + "location-id": "POP" + } + ] + }, + "devices": { + "device": [ + { + "device-id": "172.10.33.5", + "location": "POP" + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.101.1/24", + "lan-tag": "vlan101", + "next-hop": "172.10.33.2" + } + ] + } + } + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "500", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "172.10.33.5", + "vpn-attachment": { + "vpn-id": "vpn1", + "site-role": "ietf-l3vpn-svc:hub-role" + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "172.10.33.254", + "customer-address": "172.10.33.2", + "prefix-length": 24 + } + } + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "128.32.10.1/24", + "lan-tag": "vlan101", + "next-hop": "172.10.33.254" + }, + { + "lan": "128.32.20.1/24", + "lan-tag": "vlan101", + "next-hop": "172.10.33.254" + } + ] + } + } + } + ] + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + } + } + ] + } + } + } + } + } + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json b/src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json new file mode 100755 index 000000000..2cc512e59 --- /dev/null +++ b/src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json @@ -0,0 +1,231 @@ +{ + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": { + "vpn-service": [ + { + "vpn-id": "vpn2" + } + ] + }, + "sites": { + "site": [ + { + "site-id": "site_OLT", + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "locations": { + "location": [ + { + "location-id": "OLT" + } + ] + }, + "devices": { + "device": [ + { + "device-id": "128.32.33.5", + "location": "OLT" + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "128.32.10.1/24", + "lan-tag": "vlan31", + "next-hop": "128.32.33.2" + }, + { + "lan": "128.32.20.1/24", + "lan-tag": "vlan31", + "next-hop": "128.32.33.2" + } + ] + } + } + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "500", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "128.32.33.5", + "vpn-attachment": { + "vpn-id": "vpn2", + "site-role": "ietf-l3vpn-svc:spoke-role" + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "128.32.33.254", + "customer-address": "128.32.33.2", + "prefix-length": 24 + } + } + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.201.1/24", + "lan-tag": "vlan31", + "next-hop": "128.32.33.254" + } + ] + } + } + } + ] + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + } + } + ] + } + } + } + } + } + ] + } + }, + { + "site-id": "site_POP", + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "locations": { + "location": [ + { + "location-id": "POP" + } + ] + }, + "devices": { + "device": [ + { + "device-id": "172.10.33.5", + "location": "POP" + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.201.1/24", + "lan-tag": "vlan201", + "next-hop": "172.10.33.2" + } + ] + } + } + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "500", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "172.10.33.5", + "vpn-attachment": { + "vpn-id": "vpn2", + "site-role": "ietf-l3vpn-svc:hub-role" + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "172.10.33.254", + "customer-address": "172.10.33.2", + "prefix-length": 24 + } + } + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "128.32.10.1/24", + "lan-tag": "vlan201", + "next-hop": "172.10.33.254" + }, + { + "lan": "128.32.20.1/24", + "lan-tag": "vlan201", + "next-hop": "172.10.33.254" + } + ] + } + } + } + ] + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + } + } + ] + } + } + } + } + } + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/src/ztp_server/tests/data/test-ietf-network.json b/src/ztp_server/tests/data/test-ietf-network.json new file mode 100755 index 000000000..7643ef53a --- /dev/null +++ b/src/ztp_server/tests/data/test-ietf-network.json @@ -0,0 +1,1962 @@ +{ + "ietf-network:networks": { + "network": [ + { + "network-id": "providerId-10-clientId-0-topologyId-1", + "ietf-te-topology:te": { + "name": "Huawei-Network" + }, + "ietf-te-topology:te-topology-identifier": { + "provider-id": 10, + "client-id": 0, + "topology-id": "1" + }, + "network-types": { + "ietf-te-topology:te-topology": { + "ietf-otn-topology:otn-topology": {} + } + }, + "node": [ + { + "node-id": "10.0.10.1", + "ietf-te-topology:te-node-id": "10.0.10.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OA" + }, + "tunnel-termination-point": [ + { + "tunnel-tp-id": "NTAx", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "501" + } + ] + } + }, + { + "tunnel-tp-id": "NTAw", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "500" + } + ] + } + } + ] + } + }, + { + "node-id": "10.0.20.1", + "ietf-te-topology:te-node-id": "10.0.20.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "P" + }, + "tunnel-termination-point": [ + { + "tunnel-tp-id": "NTAx", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "501" + } + ] + } + }, + { + "tunnel-tp-id": "NTAw", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "500" + } + ] + } + } + ] + } + }, + { + "node-id": "10.0.40.1", + "ietf-te-topology:te-node-id": "10.0.40.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + }, + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "P" + }, + "tunnel-termination-point": [ + { + "tunnel-tp-id": "NTAw", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "500" + } + ] + } + }, + { + "tunnel-tp-id": "NTAx", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "501" + } + ] + } + } + ] + } + }, + { + "node-id": "10.0.30.1", + "ietf-te-topology:te-node-id": "10.0.30.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + }, + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OE" + }, + "tunnel-termination-point": [ + { + "tunnel-tp-id": "NTAw", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "500" + } + ] + } + }, + { + "tunnel-tp-id": "NTAx", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "501" + } + ] + } + } + ] + } + } + ], + "ietf-network-topology:link": [ + { + "link-id": "10.0.10.1-501", + "source": { + "source-node": "10.0.10.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.20.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-501", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.10.1-500", + "source": { + "source-node": "10.0.10.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.40.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-500", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.20.1-501", + "source": { + "source-node": "10.0.20.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.20.1-501", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.20.1-500", + "source": { + "source-node": "10.0.20.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.30.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.20.1-500", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.40.1-500", + "source": { + "source-node": "10.0.40.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.40.1-500", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.40.1-501", + "source": { + "source-node": "10.0.40.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.30.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.40.1-501", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.30.1-500", + "source": { + "source-node": "10.0.30.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.20.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.30.1-500", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.30.1-501", + "source": { + "source-node": "10.0.30.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.40.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.30.1-501", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + } + ] + }, + { + "network-id": "providerId-10-clientId-0-topologyId-2", + "ietf-te-topology:te": { + "name": "Huawei-Network" + }, + "ietf-te-topology:te-topology-identifier": { + "provider-id": 10, + "client-id": 0, + "topology-id": "2" + }, + "network-types": { + "ietf-te-topology:te-topology": { + "ietf-eth-te-topology:eth-tran-topology": {} + } + }, + "node": [ + { + "node-id": "10.0.10.1", + "ietf-te-topology:te-node-id": "10.0.10.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": "128.32.33.254", + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OA" + } + } + }, + { + "node-id": "10.0.20.1", + "ietf-te-topology:te-node-id": "10.0.20.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "P" + } + } + }, + { + "node-id": "10.0.40.1", + "ietf-te-topology:te-node-id": "10.0.40.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "P" + } + } + }, + { + "node-id": "10.0.30.1", + "ietf-te-topology:te-node-id": "10.0.30.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": "172.10.33.254", + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OE" + } + } + }, + { + "node-id": "128.32.33.5", + "ietf-te-topology:te-node-id": "128.32.33.5", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": "128.32.33.2", + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": 200, + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + }, + { + "tp-id": "201", + "ietf-te-topology:te-tp-id": 201, + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OLT", + "connectivity-matrices": { + "label-restrictions": { + "label-restriction": [ + { + "index": 0, + "label-start": { + "te-label": { + "ietf-eth-te-topology:vlanid": 21 + } + }, + "label-end": { + "te-label": { + "ietf-eth-te-topology:vlanid": 21 + } + } + }, + { + "index": 1, + "label-start": { + "te-label": { + "ietf-eth-te-topology:vlanid": 31 + } + }, + "label-end": { + "te-label": { + "ietf-eth-te-topology:vlanid": 31 + } + } + } + ] + } + } + } + } + }, + { + "node-id": "128.32.10.1", + "ietf-te-topology:te-node-id": "128.32.10.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + }, + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": 200, + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "ONT1" + } + } + }, + { + "node-id": "128.32.20.1", + "ietf-te-topology:te-node-id": "128.32.20.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + }, + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": 200, + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "ONT2" + } + } + } + ], + "ietf-network-topology:link": [ + { + "link-id": "10.0.10.1-200", + "source": { + "source-node": "10.0.10.1", + "source-tp": "200" + }, + "destination": { + "dest-node": "128.32.33.5", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-200", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.33.5-500", + "source": { + "source-node": "128.32.33.5", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "200" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.33.5-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.10.1-501", + "source": { + "source-node": "10.0.10.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.20.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-501", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.10.1-500", + "source": { + "source-node": "10.0.10.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.40.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.20.1-501", + "source": { + "source-node": "10.0.20.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.20.1-501", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.20.1-500", + "source": { + "source-node": "10.0.20.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.30.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.20.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.40.1-501", + "source": { + "source-node": "10.0.40.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.30.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.40.1-501", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.40.1-500", + "source": { + "source-node": "10.0.40.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.40.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.30.1-501", + "source": { + "source-node": "10.0.30.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.40.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.30.1-501", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.30.1-500", + "source": { + "source-node": "10.0.30.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.20.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.30.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.33.5-200", + "source": { + "source-node": "128.32.33.5", + "source-tp": "200" + }, + "destination": { + "dest-node": "128.32.10.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.33.5-200", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.10.1-500", + "source": { + "source-node": "128.32.10.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "128.32.33.5", + "dest-tp": "200" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.10.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.33.5-201", + "source": { + "source-node": "128.32.33.5", + "source-tp": "201" + }, + "destination": { + "dest-node": "128.32.20.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.33.5-201", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.20.1-500", + "source": { + "source-node": "128.32.20.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "128.32.33.5", + "dest-tp": "201" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.20.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + } + ] + } + ] + } +} \ No newline at end of file diff --git a/src/ztp_server/tests/data/tfs_api_dummy.json b/src/ztp_server/tests/data/tfs_api_dummy.json new file mode 100755 index 000000000..d8f513757 --- /dev/null +++ b/src/ztp_server/tests/data/tfs_api_dummy.json @@ -0,0 +1,442 @@ +{ + "dummy_mode": true, + "contexts": [ + { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "name": "admin", + "topology_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + ], + "service_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}} + ], + "slice_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "slice_uuid": {"uuid": "SLC:R1-R2-R3"}} + ] + } + ], + "topologies": [ + { + "device_ids": [ + {"device_uuid": {"uuid": "R1"}}, + {"device_uuid": {"uuid": "R2"}}, + {"device_uuid": {"uuid": "R3"}} + ], + "link_ids": [ + {"link_uuid": {"uuid": "R1/502==R2/501"}}, + {"link_uuid": {"uuid": "R1/503==R3/501"}}, + {"link_uuid": {"uuid": "R2/501==R1/502"}}, + {"link_uuid": {"uuid": "R2/503==R3/502"}}, + {"link_uuid": {"uuid": "R3/501==R1/503"}}, + {"link_uuid": {"uuid": "R3/502==R2/503"}} + ], + "name": "admin", + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "name": "R1", "device_type": "emu-packet-router", + "device_drivers": [0], "device_operational_status": 2, + "device_endpoints": [ + {"name": "200", "endpoint_type": "copper", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "502", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "503", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "502", "name": "502", "type": "optical"}, + {"uuid": "503", "name": "503", "type": "optical"} + ]}}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { + "uuid": "200", "name": "200", "type": "copper" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[502]", "resource_value": { + "uuid": "502", "name": "502", "type": "optical" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { + "uuid": "503", "name": "503", "type": "optical" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "name": "R2", "device_type": "emu-packet-router", + "device_drivers": [0], "device_operational_status": 2, + "device_endpoints": [ + {"name": "200", "endpoint_type": "copper", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "501", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "503", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "501", "name": "501", "type": "optical"}, + {"uuid": "503", "name": "503", "type": "optical"} + ]}}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { + "uuid": "200", "name": "200", "type": "copper" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[501]", "resource_value": { + "uuid": "501", "name": "501", "type": "optical" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { + "uuid": "503", "name": "503", "type": "optical" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "name": "R3", "device_type": "emu-packet-router", + "device_drivers": [0], "device_operational_status": 2, + "device_endpoints": [ + {"name": "200", "endpoint_type": "copper", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "502", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "503", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "502", "name": "502", "type": "optical"}, + {"uuid": "503", "name": "503", "type": "optical"} + ]}}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { + "uuid": "200", "name": "200", "type": "copper" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[502]", "resource_value": { + "uuid": "502", "name": "502", "type": "optical" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { + "uuid": "503", "name": "503", "type": "optical" + }}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "R1/502==R2/501"}}, "name": "R1/502==R2/501", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R1/503==R3/501"}}, "name": "R1/503==R3/501", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R2/501==R1/502"}}, "name": "R2/501==R1/502", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R2/503==R3/502"}}, "name": "R2/503==R3/502", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R3/501==R1/503"}}, "name": "R3/501==R1/503", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R3/502==R2/503"}}, "name": "R3/502==R2/503", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + } + ], + "services": [ + { + "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, + "name": "SVC:R1/200==R2/200", "service_type": 1, "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "service_constraints": [ + {"action": 1, "sla_capacity": {"capacity_gbps": 40.0}}, + {"action": 1, "sla_latency": {"e2e_latency_ms": 10.0}}, + {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.99}} + ], + "service_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 + }}} + ]} + }, + { + "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, + "name": "SVC:R1/200==R3/200", "service_type": 1, "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "service_constraints": [ + {"action": 1, "sla_capacity": {"capacity_gbps": 50.0}}, + {"action": 1, "sla_latency": {"e2e_latency_ms": 8.0}}, + {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.9}} + ], + "service_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 + }}} + ]} + }, + { + "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}}, + "name": "SVC:R2/200==R3/200", "service_type": 1, "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "service_constraints": [ + {"action": 1, "sla_capacity": {"capacity_gbps": 10.0}}, + {"action": 1, "sla_latency": {"e2e_latency_ms": 3.0}}, + {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.9999}} + ], + "service_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 + }}} + ]} + } + ], + "slices": [ + { + "slice_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "slice_uuid": {"uuid": "SLC:R1-R2-R3"}}, + "name": "SLC:R1-R2-R3", + "slice_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "slice_constraints": [ + {"action": 1, "sla_capacity": {"capacity_gbps": 40.0}}, + {"action": 1, "sla_latency": {"e2e_latency_ms": 10.0}}, + {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.99}} + ], + "slice_service_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}} + ], + "slice_subslice_ids": [], + "slice_status": {"slice_status" : 1}, + "slice_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 + }}} + ]}, + "slice_owner": {"owner_uuid": {"uuid": "TFS"}, "owner_string": "TFS:SLC:R1-R2-R3"} + } + ], + "connections": [ + { + "connection_id": {"connection_uuid": {"uuid": "CON:R1/200==R2/200:1"}}, + "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, + "path_hops_endpoint_ids" : [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "sub_service_ids": [], + "settings": { + "l3": {"src_ip_address": "10.0.1.10", "dst_ip_address": "10.0.2.10", "ttl": 20} + } + }, + { + "connection_id": {"connection_uuid": {"uuid": "CON:R1/200==R3/200:1"}}, + "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, + "path_hops_endpoint_ids" : [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "sub_service_ids": [], + "settings": { + "l3": {"src_ip_address": "10.0.1.10", "dst_ip_address": "10.0.3.10", "ttl": 20} + } + }, + { + "connection_id": {"connection_uuid": {"uuid": "CON:R2/200==R3/200:1"}}, + "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}}, + "path_hops_endpoint_ids" : [ + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "sub_service_ids": [], + "settings": { + "l3": {"src_ip_address": "10.0.2.10", "dst_ip_address": "10.0.3.10", "ttl": 20} + } + } + ] +} diff --git a/src/ztp_server/tests/data/topology-7router-emu-dummy.json b/src/ztp_server/tests/data/topology-7router-emu-dummy.json new file mode 100755 index 000000000..3bb622626 --- /dev/null +++ b/src/ztp_server/tests/data/topology-7router-emu-dummy.json @@ -0,0 +1,157 @@ +{ + "dummy_mode": true, + "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": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, + {"uuid": "1/3", "type": "copper"}, {"uuid": "2/1", "type": "copper"}, + {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"}, + {"uuid": "2/4", "type": "copper"}, {"uuid": "2/5", "type": "copper"}, + {"uuid": "2/6", "type": "copper"} + ]}}} + ]}} + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "R1==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]} + ] +} diff --git a/src/ztp_server/tests/data/topology-7router-emu.json b/src/ztp_server/tests/data/topology-7router-emu.json new file mode 100755 index 000000000..4174f4fb4 --- /dev/null +++ b/src/ztp_server/tests/data/topology-7router-emu.json @@ -0,0 +1,156 @@ +{ + "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": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "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": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, + {"uuid": "1/3", "type": "copper"}, {"uuid": "2/1", "type": "copper"}, + {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"}, + {"uuid": "2/4", "type": "copper"}, {"uuid": "2/5", "type": "copper"}, + {"uuid": "2/6", "type": "copper"} + ]}}} + ]}} + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "R1==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]} + ] +} diff --git a/src/ztp_server/tests/data/topology-dummy.json b/src/ztp_server/tests/data/topology-dummy.json new file mode 100755 index 000000000..f066051ee --- /dev/null +++ b/src/ztp_server/tests/data/topology-dummy.json @@ -0,0 +1,3134 @@ +{ + "contexts": [ + { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "name": "admin", + "service_ids": [], + "slice_ids": [], + "topology_ids": [ + { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + ] + } + ], + "devices": [ + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + }, + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "500", + "type": "optical", + "uuid": "500" + }, + { + "name": "501", + "type": "optical", + "uuid": "501" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "optical", + "uuid": "500" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[501]", + "resource_value": { + "name": "501", + "type": "optical", + "uuid": "501" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "501" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "b72983bd-57d8-5cf8-8ec7-da9084382d7a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + } + ], + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "10.0.30.1" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "500", + "type": "copper", + "uuid": "500" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "copper", + "uuid": "500" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "500" + } + ], + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "128.32.10.1" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "201", + "type": "copper", + "uuid": "201" + }, + { + "name": "500", + "type": "copper", + "uuid": "500" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[201]", + "resource_value": { + "name": "201", + "type": "copper", + "uuid": "201" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "copper", + "uuid": "500" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "227b6bb2-dacf-5b3d-84e9-c1d0c107bcd8" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "201" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "d8528b70-9215-59ed-851d-b9590ab0c94b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + } + ], + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "device_operational_status": 2, + "device_type": "emu-datacenter", + "name": "172.10.33.5" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + }, + { + "name": "500", + "type": "optical", + "uuid": "500" + }, + { + "name": "501", + "type": "optical", + "uuid": "501" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "optical", + "uuid": "500" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[501]", + "resource_value": { + "name": "501", + "type": "optical", + "uuid": "501" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "501" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "ede34dea-6b51-5787-88d2-553fe548f540" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + } + ], + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "10.0.40.1" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "201", + "type": "copper", + "uuid": "201" + }, + { + "name": "500", + "type": "copper", + "uuid": "500" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[201]", + "resource_value": { + "name": "201", + "type": "copper", + "uuid": "201" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "copper", + "uuid": "500" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "201" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "c6435612-3aca-590f-89ba-e606f54df474" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + } + ], + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "device_operational_status": 2, + "device_type": "emu-optical-transponder", + "name": "128.32.33.5" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + }, + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "500", + "type": "optical", + "uuid": "500" + }, + { + "name": "501", + "type": "optical", + "uuid": "501" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "optical", + "uuid": "500" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[501]", + "resource_value": { + "name": "501", + "type": "optical", + "uuid": "501" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "59e1e30f-ea65-5e04-8a91-760a648a02c6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "70cbb732-8149-59ee-939b-011828e4292b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "501" + } + ], + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "10.0.10.1" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + }, + { + "name": "500", + "type": "optical", + "uuid": "500" + }, + { + "name": "501", + "type": "optical", + "uuid": "501" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "optical", + "uuid": "500" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[501]", + "resource_value": { + "name": "501", + "type": "optical", + "uuid": "501" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "501" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "356378dd-952b-5032-912d-37fc21284b4c" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "da826790-a4b0-5317-b30b-e1370918a644" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + } + ], + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "10.0.20.1" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "eth1", + "type": "copper", + "uuid": "eth1" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[eth1]", + "resource_value": { + "name": "eth1", + "type": "copper", + "uuid": "eth1" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + "endpoint_uuid": { + "uuid": "0701f406-633f-53e7-a44d-c93384745df8" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "eth1" + } + ], + "device_id": { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + "device_operational_status": 2, + "device_type": "emu-client", + "name": "128.32.20.5" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "500", + "type": "copper", + "uuid": "500" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "copper", + "uuid": "500" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + } + ], + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "128.32.20.1" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "eth1", + "type": "copper", + "uuid": "eth1" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[eth1]", + "resource_value": { + "name": "eth1", + "type": "copper", + "uuid": "eth1" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + "endpoint_uuid": { + "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "eth1" + } + ], + "device_id": { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + "device_operational_status": 2, + "device_type": "emu-client", + "name": "128.32.10.5" + }, + { + "components": [], + "controller_id": {}, + "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": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + } + ], + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "device_operational_status": 2, + "device_type": "emu-open-line-system", + "name": "nce-t" + } + ], + "dummy_mode": true, + "links": [ + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "70cbb732-8149-59ee-939b-011828e4292b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "0b3d5943-c2bf-595f-a805-dc29c2be2f52" + } + }, + "name": "10.0.10.1-200" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "1490e70f-472c-5e4c-8280-21c48ed03477" + } + }, + "name": "10.0.40.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "c6435612-3aca-590f-89ba-e606f54df474" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "18ba8eb2-342b-5a73-aeae-7288ea9bb28b" + } + }, + "name": "128.32.10.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + "endpoint_uuid": { + "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "1901b0dc-1b5e-5fdf-b9ac-9168787464c1" + } + }, + "name": "128.32.10.1-200" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "70cbb732-8149-59ee-939b-011828e4292b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "1afdae8b-a281-53aa-99c2-205afb8f4ee7" + } + }, + "name": "128.32.33.5-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "356378dd-952b-5032-912d-37fc21284b4c" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "30ca0f8f-b150-57f2-ae5e-8a6844944783" + } + }, + "name": "10.0.20.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "34c9c6c3-0dcf-54e5-ba67-da33eb2d3c1a" + } + }, + "name": "10.0.20.1-501" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "356378dd-952b-5032-912d-37fc21284b4c" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "35801e61-45f3-564e-ad5c-09baf4aae906" + } + }, + "name": "10.0.30.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "36643dba-e8fa-5fb7-952d-dff313db957b" + } + }, + "name": "172.10.33.5-500" + }, + { + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "ede34dea-6b51-5787-88d2-553fe548f540" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "36856920-3387-5384-b1b1-dbc9e54da226" + } + }, + "name": "nce-t/mgmt==10.0.40.1/mgmt" + }, + { + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "b72983bd-57d8-5cf8-8ec7-da9084382d7a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "46ba12f9-dd17-5f2a-9558-e4611515a6b9" + } + }, + "name": "nce-t/mgmt==10.0.30.1/mgmt" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "4dfe28dd-ac28-53d5-b330-1707e350d772" + } + }, + "name": "10.0.30.1-501" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "644ab377-572c-53a4-8ab5-f5cf45591d88" + } + }, + "name": "128.32.20.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "c6435612-3aca-590f-89ba-e606f54df474" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "661ac531-4309-58cc-b70e-2a79492c2488" + } + }, + "name": "128.32.33.5-200" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "6a236e01-853c-51d0-8915-2d09b45923b0" + } + }, + "name": "128.32.33.5-201" + }, + { + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "da826790-a4b0-5317-b30b-e1370918a644" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "6c802ae7-59d1-55e7-9498-146c465bcab5" + } + }, + "name": "nce-t/mgmt==10.0.20.1/mgmt" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + "endpoint_uuid": { + "uuid": "0701f406-633f-53e7-a44d-c93384745df8" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "6fa77ad9-e4d7-5830-bf84-ab206eff613a" + } + }, + "name": "128.32.20.1-200" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "808b54e8-3d5a-5e03-a42e-d6c2a57cf6f3" + } + }, + "name": "10.0.30.1-200" + }, + { + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "59e1e30f-ea65-5e04-8a91-760a648a02c6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "85a18715-3ce0-57f9-8025-5634fe622a06" + } + }, + "name": "nce-t/mgmt==10.0.10.1/mgmt" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "8e8d1a2b-beae-5624-8826-9235bd73a3a8" + } + }, + "name": "10.0.40.1-501" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "e9c5b57e-de50-509c-9f5a-0107ff233703" + } + }, + "name": "10.0.10.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + "endpoint_uuid": { + "uuid": "0701f406-633f-53e7-a44d-c93384745df8" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "effca6e0-acf3-5c02-ba9a-d82c17a3f006" + } + }, + "name": "128.32.20.5-eth1" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "f45b4432-4ae2-5719-b4e8-a5e8baa1ccd2" + } + }, + "name": "10.0.10.1-501" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + "endpoint_uuid": { + "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "fd005f34-39f5-550e-b2c0-c6e6f8c16325" + } + }, + "name": "128.32.10.5-eth1" + } + ], + "topologies": [ + { + "device_ids": [ + { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + } + ], + "link_ids": [ + { + "link_uuid": { + "uuid": "0b3d5943-c2bf-595f-a805-dc29c2be2f52" + } + }, + { + "link_uuid": { + "uuid": "1490e70f-472c-5e4c-8280-21c48ed03477" + } + }, + { + "link_uuid": { + "uuid": "18ba8eb2-342b-5a73-aeae-7288ea9bb28b" + } + }, + { + "link_uuid": { + "uuid": "1901b0dc-1b5e-5fdf-b9ac-9168787464c1" + } + }, + { + "link_uuid": { + "uuid": "1afdae8b-a281-53aa-99c2-205afb8f4ee7" + } + }, + { + "link_uuid": { + "uuid": "30ca0f8f-b150-57f2-ae5e-8a6844944783" + } + }, + { + "link_uuid": { + "uuid": "34c9c6c3-0dcf-54e5-ba67-da33eb2d3c1a" + } + }, + { + "link_uuid": { + "uuid": "35801e61-45f3-564e-ad5c-09baf4aae906" + } + }, + { + "link_uuid": { + "uuid": "36643dba-e8fa-5fb7-952d-dff313db957b" + } + }, + { + "link_uuid": { + "uuid": "36856920-3387-5384-b1b1-dbc9e54da226" + } + }, + { + "link_uuid": { + "uuid": "46ba12f9-dd17-5f2a-9558-e4611515a6b9" + } + }, + { + "link_uuid": { + "uuid": "4dfe28dd-ac28-53d5-b330-1707e350d772" + } + }, + { + "link_uuid": { + "uuid": "644ab377-572c-53a4-8ab5-f5cf45591d88" + } + }, + { + "link_uuid": { + "uuid": "661ac531-4309-58cc-b70e-2a79492c2488" + } + }, + { + "link_uuid": { + "uuid": "6a236e01-853c-51d0-8915-2d09b45923b0" + } + }, + { + "link_uuid": { + "uuid": "6c802ae7-59d1-55e7-9498-146c465bcab5" + } + }, + { + "link_uuid": { + "uuid": "6fa77ad9-e4d7-5830-bf84-ab206eff613a" + } + }, + { + "link_uuid": { + "uuid": "808b54e8-3d5a-5e03-a42e-d6c2a57cf6f3" + } + }, + { + "link_uuid": { + "uuid": "85a18715-3ce0-57f9-8025-5634fe622a06" + } + }, + { + "link_uuid": { + "uuid": "8e8d1a2b-beae-5624-8826-9235bd73a3a8" + } + }, + { + "link_uuid": { + "uuid": "e9c5b57e-de50-509c-9f5a-0107ff233703" + } + }, + { + "link_uuid": { + "uuid": "effca6e0-acf3-5c02-ba9a-d82c17a3f006" + } + }, + { + "link_uuid": { + "uuid": "f45b4432-4ae2-5719-b4e8-a5e8baa1ccd2" + } + }, + { + "link_uuid": { + "uuid": "fd005f34-39f5-550e-b2c0-c6e6f8c16325" + } + } + ], + "name": "admin", + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ] +} \ No newline at end of file diff --git a/src/ztp_server/tests/data/topology-real.json b/src/ztp_server/tests/data/topology-real.json new file mode 100755 index 000000000..bb158d920 --- /dev/null +++ b/src/ztp_server/tests/data/topology-real.json @@ -0,0 +1,259 @@ +{ + "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": "nce-t"}}, "name": "nce-t", "device_type": "emu-open-line-system", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "name": "10.0.10.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "200", "name": "200", "type": "copper" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "name": "10.0.20.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "name": "10.0.30.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "200", "name": "200", "type": "copper" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "name": "10.0.40.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "name": "128.32.10.5", "device_type": "emu-client", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "eth1", "name": "eth1", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "name": "128.32.10.1", "device_type": "emu-packet-router", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "name": "128.32.20.5", "device_type": "emu-client", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "eth1", "name": "eth1", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "name": "128.32.20.1", "device_type": "emu-packet-router", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "name": "128.32.33.5", "device_type": "emu-optical-transponder", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "201", "name": "201", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "name": "172.10.33.5", "device_type": "emu-datacenter", + "device_operational_status": 1, "device_drivers": [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": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "201", "name": "201", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}} + ], + + "links": [ + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.10.1/mgmt"}}, "name": "nce-t/mgmt==10.0.10.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.20.1/mgmt"}}, "name": "nce-t/mgmt==10.0.20.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.30.1/mgmt"}}, "name": "nce-t/mgmt==10.0.30.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.40.1/mgmt"}}, "name": "nce-t/mgmt==10.0.40.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.10.1-501"}}, "name": "10.0.10.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.20.1-501"}}, "name": "10.0.20.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.10.1-500"}}, "name": "10.0.10.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.40.1-500"}}, "name": "10.0.40.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.20.1-500"}}, "name": "10.0.20.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.30.1-500"}}, "name": "10.0.30.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.40.1-501"}}, "name": "10.0.40.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.30.1-501"}}, "name": "10.0.30.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.10.5-eth1"}}, "name": "128.32.10.5-eth1", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "200" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.10.1-200"}}, "name": "128.32.10.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "200" }}, + {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "endpoint_uuid": {"uuid": "eth1"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.10.1-500"}}, "name": "128.32.10.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "200"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.33.5-200"}}, "name": "128.32.33.5-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "200"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.20.5-eth1"}}, "name": "128.32.20.5-eth1", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "200" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.20.1-200"}}, "name": "128.32.20.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "200" }}, + {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "endpoint_uuid": {"uuid": "eth1"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.20.1-500"}}, "name": "128.32.20.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "201"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.33.5-201"}}, "name": "128.32.33.5-201", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "201"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.33.5-500"}}, "name": "128.32.33.5-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "200"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.10.1-200"}}, "name": "10.0.10.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "200"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "172.10.33.5-500"}}, "name": "172.10.33.5-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "200"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.30.1-200"}}, "name": "10.0.30.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "200"}}, + {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "endpoint_uuid": {"uuid": "500"}} + ]} + ] +} diff --git a/src/ztp_server/tests/ietf_acl_client.py b/src/ztp_server/tests/ietf_acl_client.py new file mode 100755 index 000000000..20887f1a8 --- /dev/null +++ b/src/ztp_server/tests/ietf_acl_client.py @@ -0,0 +1,89 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 requests, time +from typing import Optional +from requests.auth import HTTPBasicAuth + +BASE_URL = '{:s}://{:s}:{:d}/restconf/data' +ACLS_URL = '{:s}/device={:s}/ietf-access-control-list:acls' +ACL_URL = '{:s}/device={:s}/ietf-access-control-list:acl={:s}' + +CSG1_DEVICE_UUID = '118295c8-318a-52ec-a394-529fc4b70f2f' # router: 128.32.10.1 +ACL_NAME = 'sample-ipv4-acl' +ACL_RULE = {"ietf-access-control-list:acls": { + "acl": [{ + "name": "sample-ipv4-acl", "type": "ipv4-acl-type", + "aces": {"ace": [{ + "name": "rule1", + "matches": { + "ipv4": { + "source-ipv4-network": "128.32.10.6/24", + "destination-ipv4-network": "172.10.33.0/24", + "dscp": 18 + }, + "tcp": { + "source-port": {"operator": "eq", "port": 1444}, + "destination-port": {"operator": "eq", "port": 1333}, + "flags": "syn" + } + }, + "actions": {"forwarding": "drop"} + }]} + }], + "attachment-points": {"interface": [{ + "interface-id": "200", + "ingress": {"acl-sets": {"acl-set": [{"name": "sample-ipv4-acl"}]}} + }] +}}} + +class TfsIetfAclClient: + def __init__( + self, host : str = 'localhost', port : int = 80, schema : str = 'http', + username : Optional[str] = 'admin', password : Optional[str] = 'admin', + timeout : int = 10, allow_redirects : bool = True, verify : bool = False + ) -> None: + self._base_url = BASE_URL.format(schema, host, port) + auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None + self._settings = dict(auth=auth, timeout=timeout, allow_redirects=allow_redirects, verify=verify) + + def post(self, device_uuid : str, ietf_acl_data : dict) -> str: + request_url = ACLS_URL.format(self._base_url, device_uuid) + reply = requests.post(request_url, json=ietf_acl_data, **(self._settings)) + return reply.text + + def get(self, device_uuid : str, acl_name : str) -> str: + request_url = ACL_URL.format(self._base_url, device_uuid, acl_name) + reply = requests.get(request_url, **(self._settings)) + return reply.text + + def delete(self, device_uuid : str, acl_name : str) -> str: + request_url = ACL_URL.format(self._base_url, device_uuid, acl_name) + reply = requests.delete(request_url, **(self._settings)) + return reply.text + +def main(): + client = TfsIetfAclClient() + print(f'ACL rule: {ACL_RULE}') + post_response = client.post(CSG1_DEVICE_UUID, ACL_RULE) + print(f'post response: {post_response}') + time.sleep(.5) + get_response = client.get(CSG1_DEVICE_UUID, ACL_NAME) + print(f'get response: {get_response}') + time.sleep(.5) + delete_response = client.delete(CSG1_DEVICE_UUID, ACL_NAME) + print(f'delete response: {delete_response}') + +if __name__ == '__main__': + main() diff --git a/src/ztp_server/tests/test_etsi_bwm.py b/src/ztp_server/tests/test_etsi_bwm.py new file mode 100755 index 000000000..9400de00f --- /dev/null +++ b/src/ztp_server/tests/test_etsi_bwm.py @@ -0,0 +1,240 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 deepdiff, json, logging, pytest +from typing import Dict +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.proto.context_pb2 import ContextId, TopologyId +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Topology import json_topology_id +from context.client.ContextClient import ContextClient +from nbi.service.rest_server import RestServer +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + do_rest_delete_request, do_rest_get_request, do_rest_patch_request, do_rest_post_request, do_rest_put_request, + mock_service, nbi_service_rest, context_client +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) +ADMIN_TOPOLOGY_ID = TopologyId(**json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id=JSON_ADMIN_CONTEXT_ID)) +BASE_URL = '/restconf/bwm/v1' + +@pytest.fixture(scope='session') +def storage() -> Dict: + yield dict() + +#def compare_dicts(dict1, dict2): +# # Function to recursively sort dictionaries +# def recursively_sort(d): +# if isinstance(d, dict): +# return {k: recursively_sort(v) for k, v in sorted(d.items())} +# if isinstance(d, list): +# return [recursively_sort(item) for item in d] +# return d +# +# # Sort dictionaries to ignore the order of fields +# sorted_dict1 = recursively_sort(dict1) +# sorted_dict2 = recursively_sort(dict2) +# +# if sorted_dict1 != sorted_dict2: +# LOGGER.error(sorted_dict1) +# LOGGER.error(sorted_dict2) +# +# return sorted_dict1 != sorted_dict2 + +def check_timestamps(bwm_service): + assert 'timeStamp' in bwm_service + assert 'seconds' in bwm_service['timeStamp'] + assert 'nanoseconds' in bwm_service['timeStamp'] + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + +def test_get_allocations_empty(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + URL = BASE_URL + '/bw_allocations' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + assert len(retrieved_data) == 0 + +def test_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + URL = BASE_URL + '/bw_allocations' + data = { + "appInsId" : "service_uuid_01", + "allocationDirection" : "00", + "fixedAllocation" : "123000.0", + "fixedBWPriority" : "SEE_DESCRIPTION", + "requestType" : 0, + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }] + } + retrieved_data = do_rest_post_request(URL, body=data, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + storage['service_uuid_01'] = 'service_uuid_01' + + +def test_get_allocations(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + assert len(retrieved_data) == 1 + good_result = [ + { + "appInsId" : "service_uuid_01", + "fixedAllocation" : "123000.0", + "allocationDirection" : "00", + "fixedBWPriority" : "SEE_DESCRIPTION", + "requestType" : "0", + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }], + } + ] + check_timestamps(retrieved_data[0]) + del retrieved_data[0]['timeStamp'] + diff_data = deepdiff.DeepDiff(good_result, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + + +def test_get_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations/service_uuid_01' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + good_result = { + "appInsId" : "service_uuid_01", + "fixedAllocation" : "123000.0", + "allocationDirection": "00", + "fixedBWPriority" : "SEE_DESCRIPTION", + "requestType" : "0", + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }] + } + check_timestamps(retrieved_data) + del retrieved_data['timeStamp'] + diff_data = deepdiff.DeepDiff(good_result, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + + +def test_put_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations/service_uuid_01' + changed_allocation = { + "appInsId" : "service_uuid_01", + "fixedAllocation" : "200.0", + "allocationDirection": "00", + "fixedBWPriority" : "NOPRIORITY", + "requestType" : "0", + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }] + } + retrieved_data = do_rest_put_request(URL, body=json.dumps(changed_allocation), logger=LOGGER, expected_status_codes={200}) + check_timestamps(retrieved_data) + del retrieved_data['timeStamp'] + diff_data = deepdiff.DeepDiff(changed_allocation, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + + +def test_patch_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations/service_uuid_01' + difference = { + "fixedBWPriority":"FULLPRIORITY", + } + changed_allocation = { + "appInsId" : "service_uuid_01", + "fixedAllocation" : "200.0", + "allocationDirection": "00", + "fixedBWPriority" : "FULLPRIORITY", + "requestType" : "0", + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }] + } + retrieved_data = do_rest_patch_request(URL, body=difference, logger=LOGGER, expected_status_codes={200}) + check_timestamps(retrieved_data) + del retrieved_data['timeStamp'] + diff_data = deepdiff.DeepDiff(changed_allocation, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + + +def test_delete_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations/service_uuid_01' + do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={200}) + + +def test_get_allocations_empty_final(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + URL = BASE_URL + '/bw_allocations' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + assert len(retrieved_data) == 0 + + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_ietf_l2vpn.py b/src/ztp_server/tests/test_ietf_l2vpn.py new file mode 100755 index 000000000..7bed8ff5d --- /dev/null +++ b/src/ztp_server/tests/test_ietf_l2vpn.py @@ -0,0 +1,75 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from tests.tools.mock_osm.MockOSM import MockOSM +from .Constants import SERVICE_CONNECTION_POINTS_1, SERVICE_CONNECTION_POINTS_2, SERVICE_TYPE +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + mock_service, nbi_service_rest, osm_wim, context_client +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/topology-7router-emu-dummy.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + +def test_create_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name + osm_wim.create_connectivity_service(SERVICE_TYPE, SERVICE_CONNECTION_POINTS_1) + +def test_get_service_status(osm_wim : MockOSM): # pylint: disable=redefined-outer-name + service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service + osm_wim.get_connectivity_service_status(service_uuid) + +def test_edit_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name + service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service + osm_wim.edit_connectivity_service(service_uuid, SERVICE_CONNECTION_POINTS_2) + +def test_delete_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name + service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service + osm_wim.delete_connectivity_service(service_uuid) + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_ietf_l3vpn.py b/src/ztp_server/tests/test_ietf_l3vpn.py new file mode 100755 index 000000000..0f214661f --- /dev/null +++ b/src/ztp_server/tests/test_ietf_l3vpn.py @@ -0,0 +1,113 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, pytest +from typing import Dict +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import ( + DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +) +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from nbi.service.rest_server.RestServer import RestServer +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + do_rest_delete_request, do_rest_get_request, do_rest_post_request, + mock_service, nbi_service_rest, osm_wim, context_client +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' +SVC1_DATA_FILE = 'nbi/tests/data/ietf_l3vpn_req_svc1.json' +SVC2_DATA_FILE = 'nbi/tests/data/ietf_l3vpn_req_svc2.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) + +@pytest.fixture(scope='session') +def storage() -> Dict: + yield dict() + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + +# pylint: disable=redefined-outer-name, unused-argument +def test_create_svc1(nbi_service_rest : RestServer, storage : Dict): + with open(SVC1_DATA_FILE, 'r', encoding='UTF-8') as f: + svc1_data = json.load(f) + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' + do_rest_post_request(URL, body=svc1_data, logger=LOGGER, expected_status_codes={201}) + storage['svc1-uuid'] = svc1_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] + +# pylint: disable=redefined-outer-name, unused-argument +def test_create_svc2(nbi_service_rest : RestServer, storage : Dict): + with open(SVC2_DATA_FILE, 'r', encoding='UTF-8') as f: + svc2_data = json.load(f) + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' + do_rest_post_request(URL, body=svc2_data, logger=LOGGER, expected_status_codes={201}) + storage['svc2-uuid'] = svc2_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] + +# pylint: disable=redefined-outer-name, unused-argument +def test_get_state_svc1(nbi_service_rest : RestServer, storage : Dict): + assert 'svc1-uuid' in storage + service_uuid = storage['svc1-uuid'] + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) + do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + +# pylint: disable=redefined-outer-name, unused-argument +def test_get_state_svc2(nbi_service_rest : RestServer, storage : Dict): + assert 'svc2-uuid' in storage + service_uuid = storage['svc2-uuid'] + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) + do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + +# pylint: disable=redefined-outer-name, unused-argument +def test_delete_svc1(nbi_service_rest : RestServer, storage : Dict): + assert 'svc1-uuid' in storage + service_uuid = storage['svc1-uuid'] + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) + do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={204}) + +# pylint: disable=redefined-outer-name, unused-argument +def test_delete_svc2(nbi_service_rest : RestServer, storage : Dict): + assert 'svc2-uuid' in storage + service_uuid = storage['svc2-uuid'] + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) + do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={204}) + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_ietf_network.py b/src/ztp_server/tests/test_ietf_network.py new file mode 100755 index 000000000..68337d0a8 --- /dev/null +++ b/src/ztp_server/tests/test_ietf_network.py @@ -0,0 +1,105 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 deepdiff, json, logging, operator, os +from typing import Dict +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import ( + DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +) +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from nbi.service.rest_server import RestServer + +# Explicitly state NBI to use PyangBind Renderer for this test +os.environ['IETF_NETWORK_RENDERER'] = 'PYANGBIND' + +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + do_rest_get_request, mock_service, nbi_service_rest, osm_wim, context_client +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' +TARGET_DATA_FILE = 'nbi/tests/data/test-ietf-network.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + +def sort_data(data : Dict) -> None: + if 'ietf-network:networks' not in data: return + if 'network' not in data['ietf-network:networks']: return + data['ietf-network:networks']['network'] = sorted( + data['ietf-network:networks']['network'], + key=operator.itemgetter('network-id') + ) + for network in data['ietf-network:networks']['network']: + if 'node' in network: + network['node'] = sorted( + network['node'], + key=operator.itemgetter('node-id') + ) + + for node in network['node']: + if 'ietf-network-topology:termination-point' in node: + node['ietf-network-topology:termination-point'] = sorted( + node['ietf-network-topology:termination-point'], + key=operator.itemgetter('tp-id') + ) + + if 'ietf-network-topology:link' in network: + network['ietf-network-topology:link'] = sorted( + network['ietf-network-topology:link'], + key=operator.itemgetter('link-id') + ) + +def test_rest_get_networks(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + with open(TARGET_DATA_FILE, 'r', encoding='UTF-8') as f: + target_data = json.load(f) + URL = '/restconf/data/ietf-network:networks' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + sort_data(retrieved_data) + sort_data(target_data) + diff_data = deepdiff.DeepDiff(target_data, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_slice.py b/src/ztp_server/tests/test_slice.py new file mode 100755 index 000000000..fe112e6fc --- /dev/null +++ b/src/ztp_server/tests/test_slice.py @@ -0,0 +1,125 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, random, uuid +from typing import Dict, Tuple +from nbi.service.rest_server.nbi_plugins.ietf_network_slice.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) -> Tuple[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__": + request = generate_request(123) + print(json.dumps(request[0], sort_keys=True, indent=4)) diff --git a/src/ztp_server/tests/test_tfs_api.py b/src/ztp_server/tests/test_tfs_api.py new file mode 100755 index 000000000..eab2f8d9b --- /dev/null +++ b/src/ztp_server/tests/test_tfs_api.py @@ -0,0 +1,217 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, urllib +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import ( + DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +) +from common.tools.object_factory.Context import json_context_id +from common.type_checkers.Assertions import ( + validate_connection, validate_connection_ids, validate_connections, + validate_context, validate_context_ids, validate_contexts, + validate_device, validate_device_ids, validate_devices, + validate_link, validate_link_ids, validate_links, + validate_service, validate_service_ids, validate_services, + validate_slice, validate_slice_ids, validate_slices, + validate_topologies, validate_topology, validate_topology_ids +) +from context.client.ContextClient import ContextClient +from nbi.service.rest_server.RestServer import RestServer +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + mock_service, nbi_service_rest, context_client, + do_rest_get_request +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/tfs_api_dummy.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) + + +# ----- Prepare Environment -------------------------------------------------------------------------------------------- + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 3 + assert len(response.slice_ids ) == 1 + + +# ----- Context -------------------------------------------------------------------------------------------------------- + +def test_rest_get_context_ids(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/context_ids') + validate_context_ids(reply) + +def test_rest_get_contexts(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/contexts') + validate_contexts(reply) + +def test_rest_get_context(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}'.format(context_uuid)) + validate_context(reply) + + +# ----- Topology ------------------------------------------------------------------------------------------------------- + +def test_rest_get_topology_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/topology_ids'.format(context_uuid)) + validate_topology_ids(reply) + +def test_rest_get_topologies(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/topologies'.format(context_uuid)) + validate_topologies(reply) + +def test_rest_get_topology(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + topology_uuid = urllib.parse.quote(DEFAULT_TOPOLOGY_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/topology/{:s}'.format(context_uuid, topology_uuid)) + validate_topology(reply, num_devices=3, num_links=6) + + +# ----- Device --------------------------------------------------------------------------------------------------------- + +def test_rest_get_device_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/device_ids') + validate_device_ids(reply) + +def test_rest_get_devices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/devices') + validate_devices(reply) + +def test_rest_get_device(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + device_uuid = urllib.parse.quote('R1', safe='') + reply = do_rest_get_request('/tfs-api/device/{:s}'.format(device_uuid)) + validate_device(reply) + + +# ----- Link ----------------------------------------------------------------------------------------------------------- + +def test_rest_get_link_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/link_ids') + validate_link_ids(reply) + +def test_rest_get_links(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/links') + validate_links(reply) + +def test_rest_get_link(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + link_uuid = urllib.parse.quote('R1/502==R2/501', safe='') + reply = do_rest_get_request('/tfs-api/link/{:s}'.format(link_uuid)) + validate_link(reply) + + +# ----- Service -------------------------------------------------------------------------------------------------------- + +def test_rest_get_service_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/service_ids'.format(context_uuid)) + validate_service_ids(reply) + +def test_rest_get_services(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/services'.format(context_uuid)) + validate_services(reply) + +def test_rest_get_service(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') + reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}'.format(context_uuid, service_uuid)) + validate_service(reply) + + +# ----- Slice ---------------------------------------------------------------------------------------------------------- + +def test_rest_get_slice_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/slice_ids'.format(context_uuid)) + validate_slice_ids(reply) + +def test_rest_get_slices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/slices'.format(context_uuid)) + validate_slices(reply) + +def test_rest_get_slice(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + slice_uuid = urllib.parse.quote('SLC:R1-R2-R3', safe='') + reply = do_rest_get_request('/tfs-api/context/{:s}/slice/{:s}'.format(context_uuid, slice_uuid)) + validate_slice(reply) + + +# ----- Connection ----------------------------------------------------------------------------------------------------- + +def test_rest_get_connection_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') + reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connection_ids'.format(context_uuid, service_uuid)) + validate_connection_ids(reply) + +def test_rest_get_connections(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') + reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connections'.format(context_uuid, service_uuid)) + validate_connections(reply) + +def test_rest_get_connection(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + connection_uuid = urllib.parse.quote('CON:R1/200==R2/200:1', safe='') + reply = do_rest_get_request('/tfs-api/connection/{:s}'.format(connection_uuid)) + validate_connection(reply) + +# ----- Policy --------------------------------------------------------------------------------------------------------- + +#def test_rest_get_policyrule_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +# reply = do_rest_get_request('/tfs-api/policyrule_ids') +# validate_policyrule_ids(reply) + +#def test_rest_get_policyrules(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +# reply = do_rest_get_request('/tfs-api/policyrules') +# validate_policyrules(reply) + +#def test_rest_get_policyrule(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +# policyrule_uuid_quoted = urllib.parse.quote(policyrule_uuid, safe='') +# reply = do_rest_get_request('/tfs-api/policyrule/{:s}'.format(policyrule_uuid_quoted)) +# validate_policyrule(reply) + + +# ----- Cleanup Environment -------------------------------------------------------------------------------------------- + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 3 + assert len(response.slice_ids ) == 1 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_yang_acl.py b/src/ztp_server/tests/test_yang_acl.py new file mode 100755 index 000000000..2f45c50bc --- /dev/null +++ b/src/ztp_server/tests/test_yang_acl.py @@ -0,0 +1,104 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 copy, json, libyang, logging, os +from typing import Dict, List, Optional + +LOGGER = logging.getLogger(__name__) + +YANG_DIR = os.path.join(os.path.dirname(__file__), 'yang') +YANG_MODULES = [ + 'ietf-yang-types', + 'ietf-interfaces', + 'iana-if-type', + 'ietf-access-control-list', +] + +class YangValidator: + def __init__(self) -> None: + self._yang_context = libyang.Context(YANG_DIR) + for module_name in YANG_MODULES: + LOGGER.info('Loading module: {:s}'.format(str(module_name))) + yang_module = self._yang_context.load_module(module_name) + yang_module.feature_enable_all() + yang_module_prefix = yang_module.prefix() + LOGGER.info(' Prefix: {:s}'.format(str(yang_module_prefix))) + + def parse_to_dict(self, message : Dict, interface_names : List[str]) -> Dict: + interfaces = self._yang_context.create_data_path('/ietf-interfaces:interfaces') + for if_index,interface_name in enumerate(interface_names): + if_path = 'interface[name="{:s}"]'.format(str(interface_name)) + interface = interfaces.create_path(if_path) + interface.create_path('if-index', if_index + 1) + interface.create_path('type', 'iana-if-type:ethernetCsmacd') + interface.create_path('admin-status', 'up') + interface.create_path('oper-status', 'up') + statistics = interface.create_path('statistics') + statistics.create_path('discontinuity-time', '2024-07-11T10:00:00.000000Z') + + message = copy.deepcopy(message) + message['ietf-interfaces:interfaces'] = interfaces.print_dict()['interfaces'] + + dnode : Optional[libyang.DNode] = self._yang_context.parse_data_mem( + json.dumps(message), 'json', validate_present=True, strict=True + ) + if dnode is None: raise Exception('Unable to parse Message({:s})'.format(str(message))) + message = dnode.print_dict() + dnode.free() + interfaces.free() + return message + + def destroy(self) -> None: + self._yang_context.destroy() + self._yang_context = None + +def main() -> None: + import uuid # pylint: disable=import-outside-toplevel + logging.basicConfig(level=logging.DEBUG) + + interface_names = {'200', '500', str(uuid.uuid4()), str(uuid.uuid4())} + ACL_RULE = {"ietf-access-control-list:acls": { + "acl": [{ + "name": "sample-ipv4-acl", "type": "ipv4-acl-type", + "aces": {"ace": [{ + "name": "rule1", + "matches": { + "ipv4": { + "source-ipv4-network": "128.32.10.6/24", + "destination-ipv4-network": "172.10.33.0/24", + "dscp": 18 + }, + "tcp": { + "source-port": {"operator": "eq", "port": 1444}, + "destination-port": {"operator": "eq", "port": 1333}, + "flags": "syn" + } + }, + "actions": {"forwarding": "drop"} + }]} + }], + "attachment-points": {"interface": [{ + "interface-id": "200", + "ingress": {"acl-sets": {"acl-set": [{"name": "sample-ipv4-acl"}]}} + }] + }}} + + yang_validator = YangValidator() + request_data = yang_validator.parse_to_dict(ACL_RULE, list(interface_names)) + yang_validator.destroy() + + LOGGER.info('request_data = {:s}'.format(str(request_data))) + +if __name__ == '__main__': + main() -- GitLab From ea3a17d4ea360a513979c90eb41859cc0a442244 Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Thu, 19 Dec 2024 11:57:22 +0100 Subject: [PATCH 366/463] Second Draft --- proto/ztp_server.proto | 24 +++++++++++++-- src/ztp_server/client/ZtpClient.py | 4 +-- src/ztp_server/service/ZtpServerService.py | 2 +- .../service/ZtpServerServiceServicerImpl.py | 29 ++++++++++++++----- src/ztp_server/service/__main__.py | 1 + 5 files changed, 46 insertions(+), 14 deletions(-) diff --git a/proto/ztp_server.proto b/proto/ztp_server.proto index 37ccc71d3..6c575df11 100755 --- a/proto/ztp_server.proto +++ b/proto/ztp_server.proto @@ -15,9 +15,27 @@ syntax = "proto3"; package ztpServer; -import "context.proto"; +//import "context.proto"; service ZtpServerService { - rpc GetProvisioningScript (context.ProvisioningScriptName ) returns (context.ProvisioningScript ) {} - rpc GetZtpProvisioning (context.ZtpFileName ) returns (context.ZtpFile ) {} + rpc GetProvisioningScript (ProvisioningScriptName ) returns (ProvisioningScript ) {} + rpc GetZtpProvisioning (ZtpFileName ) returns (ZtpFile ) {} +} + + +// Define the request message for both methods +message ProvisioningScriptName { + string input = 1; +} + +message ZtpFileName { + string input = 1; +} + +message ProvisioningScript { + string script = 1; +} + +message ZtpFile { + string json = 1; } diff --git a/src/ztp_server/client/ZtpClient.py b/src/ztp_server/client/ZtpClient.py index a790b76e2..5e5737857 100755 --- a/src/ztp_server/client/ZtpClient.py +++ b/src/ztp_server/client/ZtpClient.py @@ -15,7 +15,7 @@ import grpc, logging from common.Constants import ServiceNameEnum from common.Settings import get_service_host, get_service_port_grpc -from common.proto.ztpServer_pb2_grpc import ztpServerServiceStub #TODO +from common.proto.ztp_server_pb2_grpc import ztpServerServiceStub from common.proto.context_pb2 import ( ZtpFileName, ZtpFile, ProvisioningScriptName, ProvisioningScript) from common.tools.client.RetryDecorator import retry, delay_exponential @@ -39,7 +39,7 @@ class ZtpClient: def connect(self): self.channel = grpc.insecure_channel(self.endpoint) - self.stub = ztpServerServiceStub(self.channel) #TODO + self.stub = ztpServerServiceStub(self.channel) def close(self): if self.channel is not None: self.channel.close() diff --git a/src/ztp_server/service/ZtpServerService.py b/src/ztp_server/service/ZtpServerService.py index 2b4da4f93..aba4aee94 100755 --- a/src/ztp_server/service/ZtpServerService.py +++ b/src/ztp_server/service/ZtpServerService.py @@ -14,7 +14,7 @@ from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc -from common.proto.ztpServer_pb2_grpc import add_Ztp_ServerServiceServicer_to_server +from common.proto.ztp_server_pb2_grpc import add_Ztp_ServerServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from ztp_server.service.ZtpServerServiceServicerImpl import ZtpServerServiceServicerImpl diff --git a/src/ztp_server/service/ZtpServerServiceServicerImpl.py b/src/ztp_server/service/ZtpServerServiceServicerImpl.py index 009cda922..015f958f4 100755 --- a/src/ztp_server/service/ZtpServerServiceServicerImpl.py +++ b/src/ztp_server/service/ZtpServerServiceServicerImpl.py @@ -12,11 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import grpc, logging +import grpc, logging, json from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.proto.context_pb2 import ( ZtpFileName, ZtpFile, ProvisioningScriptName, ProvisioningScript) -from common.proto.ztpServer_pb2_grpc import ztpServerServiceServicer +from common.proto.ztp_server_pb2_grpc import ztpServerServiceServicer LOGGER = logging.getLogger(__name__) @@ -29,12 +29,25 @@ class ZtpServerServiceServicerImpl(ztpServerServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetZtpProvisioning(self, request : ProvisioningScriptName, context : grpc.ServicerContext) -> ProvisioningScript: - LOGGER.warning('NOT IMPLEMENTED') - return ProvisioningScript() + try: + filePath = '../data/' + ProvisioningScriptName + with open(filePath, 'r') as provisioning_file: + provisioning_content = provisioning_file.read() + return ztpServerServiceServicer.ProvisioningScript(script=provisioning_content) + except FileNotFoundError: + context.set_code(grpc.StatusCode.NOT_FOUND) + context.set_details('File not found') + return ztpServerServiceServicer.ProvisioningScript() + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetZtpProvisioning(self, request : ZtpFileName, context : grpc.ServicerContext) -> ZtpFile: - LOGGER.warning('NOT IMPLEMENTED') - return ZtpFile() - - + try: + filePath = '../data/' + ZtpFileName + with open(filePath, 'r') as json_file: + json_content = json_file.read() + return ztpServerServiceServicer.ZtpFile(json=json_content) + except FileNotFoundError: + context.set_code(grpc.StatusCode.NOT_FOUND) + context.set_details('File not found') + return ztpServerServiceServicer.ZtpFile(json=json_content) \ No newline at end of file diff --git a/src/ztp_server/service/__main__.py b/src/ztp_server/service/__main__.py index 25e8605d3..55bd5f187 100755 --- a/src/ztp_server/service/__main__.py +++ b/src/ztp_server/service/__main__.py @@ -21,6 +21,7 @@ from common.Settings import ( ) from .ZtpServerService import ZtpServerService from .rest_server.RestServer import RestServer +from .rest_server.ztpServer_plugins.tfs_api import register_tfs_api from .context_subscription import register_context_subscription -- GitLab From 8c50376811f2af1ac76697b7c87e648be1f881eb Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Mon, 27 Jan 2025 14:57:40 +0000 Subject: [PATCH 367/463] Add HTTP Server and gRPC Server Add manifest.yaml Add DockerFile Solve some typo on .proto file --- manifests/ztp_server.yaml | 78 + proto/ztp_server.proto | 4 +- src/common/Constants.py | 5 +- src/ztp_server/Dockerfile | 43 +- src/ztp_server/README.md | 35 - src/ztp_server/client/ZtpClient.py | 7 +- src/ztp_server/data/nso_client.proto | 60 - src/ztp_server/requirements.in | 3 - src/ztp_server/service/ZtpServerService.py | 4 +- .../service/ZtpServerServiceServicerImpl.py | 26 +- .../service/context_subscription/__init__.py | 64 - .../ztpServer_plugins/tfs_api/Resources.py | 22 +- .../ztpServer_plugins/tfs_api/Tools.py | 30 +- .../ztpServer_plugins/tools/Validator.py | 35 - src/ztp_server/tests/Constants.py | 85 - .../tests/MockService_Dependencies.py | 58 - src/ztp_server/tests/PrepareTestScenario.py | 169 - src/ztp_server/tests/__init__.py | 14 - src/ztp_server/tests/data/ietf_acl.json | 56 - .../tests/data/ietf_l3vpn_req_svc1.json | 231 -- .../tests/data/ietf_l3vpn_req_svc2.json | 231 -- .../tests/data/test-ietf-network.json | 1962 ----------- src/ztp_server/tests/data/tfs_api_dummy.json | 442 --- .../data/topology-7router-emu-dummy.json | 157 - .../tests/data/topology-7router-emu.json | 156 - src/ztp_server/tests/data/topology-dummy.json | 3134 ----------------- src/ztp_server/tests/data/topology-real.json | 259 -- src/ztp_server/tests/ietf_acl_client.py | 89 - src/ztp_server/tests/test_etsi_bwm.py | 240 -- src/ztp_server/tests/test_ietf_l2vpn.py | 75 - src/ztp_server/tests/test_ietf_l3vpn.py | 113 - src/ztp_server/tests/test_ietf_network.py | 105 - src/ztp_server/tests/test_slice.py | 125 - src/ztp_server/tests/test_tfs_api.py | 217 -- src/ztp_server/tests/test_yang_acl.py | 104 - 35 files changed, 123 insertions(+), 8315 deletions(-) create mode 100644 manifests/ztp_server.yaml delete mode 100755 src/ztp_server/README.md delete mode 100644 src/ztp_server/data/nso_client.proto delete mode 100755 src/ztp_server/service/context_subscription/__init__.py delete mode 100755 src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py delete mode 100755 src/ztp_server/tests/Constants.py delete mode 100755 src/ztp_server/tests/MockService_Dependencies.py delete mode 100755 src/ztp_server/tests/PrepareTestScenario.py delete mode 100755 src/ztp_server/tests/__init__.py delete mode 100755 src/ztp_server/tests/data/ietf_acl.json delete mode 100755 src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json delete mode 100755 src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json delete mode 100755 src/ztp_server/tests/data/test-ietf-network.json delete mode 100755 src/ztp_server/tests/data/tfs_api_dummy.json delete mode 100755 src/ztp_server/tests/data/topology-7router-emu-dummy.json delete mode 100755 src/ztp_server/tests/data/topology-7router-emu.json delete mode 100755 src/ztp_server/tests/data/topology-dummy.json delete mode 100755 src/ztp_server/tests/data/topology-real.json delete mode 100755 src/ztp_server/tests/ietf_acl_client.py delete mode 100755 src/ztp_server/tests/test_etsi_bwm.py delete mode 100755 src/ztp_server/tests/test_ietf_l2vpn.py delete mode 100755 src/ztp_server/tests/test_ietf_l3vpn.py delete mode 100755 src/ztp_server/tests/test_ietf_network.py delete mode 100755 src/ztp_server/tests/test_slice.py delete mode 100755 src/ztp_server/tests/test_tfs_api.py delete mode 100755 src/ztp_server/tests/test_yang_acl.py diff --git a/manifests/ztp_server.yaml b/manifests/ztp_server.yaml new file mode 100644 index 000000000..6ed469174 --- /dev/null +++ b/manifests/ztp_server.yaml @@ -0,0 +1,78 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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: apps/v1 +kind: Deployment +metadata: + name: ztp_serverservice +spec: + selector: + matchLabels: + app: ztp_serverservice + #replicas: 1 + template: + metadata: + labels: + app: ztp_serverservice + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: server + image: labs.etsi.org:5050/tfs/controller/ztp_server:latest + imagePullPolicy: Always + ports: + - containerPort: 8005 + - containerPort: 5051 + - containerPort: 9192 + env: + - name: LOG_LEVEL + value: "INFO" + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:5051"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:5051"] + resources: + requests: + cpu: 250m + memory: 128Mi + limits: + cpu: 1000m + memory: 1024Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: ztp_serverservice + labels: + app: ztp_serverservice +spec: + type: ClusterIP + selector: + app: ztp_serverservice + ports: + - name: http + protocol: TCP + port: 8005 + targetPort: 8005 + - name: grpc + protocol: TCP + port: 5051 + targetPort: 5051 + - name: metrics + protocol: TCP + port: 9192 + targetPort: +--- diff --git a/proto/ztp_server.proto b/proto/ztp_server.proto index 6c575df11..807751084 100755 --- a/proto/ztp_server.proto +++ b/proto/ztp_server.proto @@ -25,11 +25,11 @@ service ZtpServerService { // Define the request message for both methods message ProvisioningScriptName { - string input = 1; + string scriptname = 1; } message ZtpFileName { - string input = 1; + string filename = 1; } message ProvisioningScript { diff --git a/src/common/Constants.py b/src/common/Constants.py index 660e99f04..50b792c65 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -122,8 +122,9 @@ DEFAULT_SERVICE_GRPC_PORTS = { # Default HTTP/REST-API service ports DEFAULT_SERVICE_HTTP_PORTS = { - ServiceNameEnum.NBI .value : 8080, - ServiceNameEnum.WEBUI.value : 8004, + ServiceNameEnum.NBI .value : 8080, + ServiceNameEnum.WEBUI.value : 8004, + ServiceNameEnum.ZTP_SERVER.value : 8005, } # Default HTTP/REST-API service base URLs diff --git a/src/ztp_server/Dockerfile b/src/ztp_server/Dockerfile index a9be06d37..bbcc282bd 100755 --- a/src/ztp_server/Dockerfile +++ b/src/ztp_server/Dockerfile @@ -19,21 +19,6 @@ RUN apt-get --yes --quiet --quiet update && \ apt-get --yes --quiet --quiet install wget g++ git build-essential cmake libpcre2-dev python3-dev python3-cffi && \ rm -rf /var/lib/apt/lists/* -# Download, build and install libyang. Note that APT package is outdated -# - Ref: https://github.com/CESNET/libyang -# - Ref: https://github.com/CESNET/libyang-python/ -RUN mkdir -p /var/libyang -RUN git clone https://github.com/CESNET/libyang.git /var/libyang -WORKDIR /var/libyang -RUN git fetch -RUN git checkout v2.1.148 -RUN mkdir -p /var/libyang/build -WORKDIR /var/libyang/build -RUN cmake -D CMAKE_BUILD_TYPE:String="Release" .. -RUN make -RUN make install -RUN ldconfig - # Set Python to show logs as they occur ENV PYTHONUNBUFFERED=0 @@ -69,29 +54,19 @@ RUN rm *.proto RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; # Create component sub-folders, get specific Python packages -RUN mkdir -p /var/teraflow/nbi -WORKDIR /var/teraflow/nbi -COPY src/nbi/requirements.in requirements.in +RUN mkdir -p /var/teraflow/ztp_server +WORKDIR /var/teraflow/ztp_server +COPY src/ztp_server/requirements.in requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN python3 -m pip install -r requirements.txt # Add component files into working directory WORKDIR /var/teraflow -COPY src/nbi/. nbi/ -COPY src/context/__init__.py context/__init__.py -COPY src/context/client/. context/client/ -COPY src/device/__init__.py device/__init__.py -COPY src/device/client/. device/client/ -COPY src/service/__init__.py service/__init__.py -COPY src/service/client/. service/client/ -COPY src/slice/__init__.py slice/__init__.py -COPY src/slice/client/. slice/client/ -COPY src/qkd_app/__init__.py qkd_app/__init__.py -COPY src/qkd_app/client/. qkd_app/client/ -COPY src/vnt_manager/__init__.py vnt_manager/__init__.py -COPY src/vnt_manager/client/. vnt_manager/client/ -RUN mkdir -p /var/teraflow/tests/tools -COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ +COPY src/ztp_server/. ztp_server/ + +#ToDo Implement Test +#RUN mkdir -p /var/teraflow/tests/tools +#COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ # Start the service -ENTRYPOINT ["python", "-m", "nbi.service"] +ENTRYPOINT ["python", "-m", "ztp_server.service"] diff --git a/src/ztp_server/README.md b/src/ztp_server/README.md deleted file mode 100755 index 32902a0b3..000000000 --- a/src/ztp_server/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# NBI Component - -The NBI component uses libyang to validate and process messages. Follow instructions below to install it. - -## Install libyang -- Ref: https://github.com/CESNET/libyang -- Ref: https://github.com/CESNET/libyang-python/ - -__NOTE__: APT package is extremely outdated and does not work for our purposes. - -### Build Requisites -```bash -sudo apt-get install build-essential cmake libpcre2-dev -sudo apt-get install python3-dev gcc python3-cffi -``` - -### Build from source -```bash -mkdir ~/tfs-ctrl/libyang -git clone https://github.com/CESNET/libyang.git ~/tfs-ctrl/libyang -cd ~/tfs-ctrl/libyang -git fetch -git checkout v2.1.148 -mkdir ~/tfs-ctrl/libyang/build -cd ~/tfs-ctrl/libyang/build -cmake -D CMAKE_BUILD_TYPE:String="Release" .. -make -sudo make install -sudo ldconfig -``` - -### Install Python bindings -```bash -pip install libyang==2.8.0 -``` diff --git a/src/ztp_server/client/ZtpClient.py b/src/ztp_server/client/ZtpClient.py index 5e5737857..9e14bd694 100755 --- a/src/ztp_server/client/ZtpClient.py +++ b/src/ztp_server/client/ZtpClient.py @@ -15,9 +15,8 @@ import grpc, logging from common.Constants import ServiceNameEnum from common.Settings import get_service_host, get_service_port_grpc -from common.proto.ztp_server_pb2_grpc import ztpServerServiceStub -from common.proto.context_pb2 import ( - ZtpFileName, ZtpFile, ProvisioningScriptName, ProvisioningScript) +from common.proto.ztp_server_pb2_grpc import ZtpServerServiceStub +from common.proto.ztp_server_pb2 import ProvisioningScriptName, ProvisioningScript, ZtpFileName, ZtpFile from common.tools.client.RetryDecorator import retry, delay_exponential from common.tools.grpc.Tools import grpc_message_to_json_string @@ -39,7 +38,7 @@ class ZtpClient: def connect(self): self.channel = grpc.insecure_channel(self.endpoint) - self.stub = ztpServerServiceStub(self.channel) + self.stub = ZtpServerServiceStub(self.channel) def close(self): if self.channel is not None: self.channel.close() diff --git a/src/ztp_server/data/nso_client.proto b/src/ztp_server/data/nso_client.proto deleted file mode 100644 index d5983c62c..000000000 --- a/src/ztp_server/data/nso_client.proto +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package nos_client; - -message NOS_SW { - string ztp_device_sw_url = 1; - bytes ztp_device_sw_file = 2; -} - -// For ONIE Requests -message NOS_SW_REQ { - string serial_number = 1; - string eth_addr = 2; - string vendor_id = 3; - string machine = 4; - string machine_rev = 5; - string arch = 6; - string security_key = 7; - string operation = 8; -} - -message Config_Script { - string config_script_url = 1; - bytes config_script_file = 2; -} - -message Config_Script_REQ { - string agent = 1; - string machine = 2; - string serial_number = 3; - string eth_addr = 4; - string version = 5; -} - -message Status_Notification { - string status = 1; - string serial_number = 2; - string eth_addr = 3; -} - -message Empty{} - -service nos_client { - rpc GetNOSFile (NOS_SW_REQ) returns (NOS_SW) {} - rpc GetConfigScriptFile (Config_Script_REQ) returns (Config_Script) {} - rpc NotifyStatus (Status_Notification) returns (Empty) {} -} diff --git a/src/ztp_server/requirements.in b/src/ztp_server/requirements.in index 0d7804836..ba715494d 100755 --- a/src/ztp_server/requirements.in +++ b/src/ztp_server/requirements.in @@ -18,10 +18,7 @@ Flask==2.1.3 Flask-HTTPAuth==4.5.0 Flask-RESTful==0.3.9 jsonschema==4.4.0 -libyang==2.8.0 netaddr==0.9.0 -pyang==2.6.0 -git+https://github.com/robshakir/pyangbind.git pydantic==2.6.3 requests==2.27.1 werkzeug==2.3.7 diff --git a/src/ztp_server/service/ZtpServerService.py b/src/ztp_server/service/ZtpServerService.py index aba4aee94..c099cf7f6 100755 --- a/src/ztp_server/service/ZtpServerService.py +++ b/src/ztp_server/service/ZtpServerService.py @@ -14,7 +14,7 @@ from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc -from common.proto.ztp_server_pb2_grpc import add_Ztp_ServerServiceServicer_to_server +from common.proto.ztp_server_pb2_grpc import add_ZtpServerServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from ztp_server.service.ZtpServerServiceServicerImpl import ZtpServerServiceServicerImpl @@ -25,4 +25,4 @@ class ZtpServerService(GenericGrpcService): self.ztp_servicer = ZtpServerServiceServicerImpl() def install_servicers(self): - add_Ztp_ServerServiceServicer_to_server(self.ztp_servicer, self.server) + add_ZtpServerServiceServicer_to_server(self.ztp_servicer, self.server) diff --git a/src/ztp_server/service/ZtpServerServiceServicerImpl.py b/src/ztp_server/service/ZtpServerServiceServicerImpl.py index 015f958f4..410db6cb3 100755 --- a/src/ztp_server/service/ZtpServerServiceServicerImpl.py +++ b/src/ztp_server/service/ZtpServerServiceServicerImpl.py @@ -12,17 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -import grpc, logging, json +import grpc, logging, json, os from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method -from common.proto.context_pb2 import ( - ZtpFileName, ZtpFile, ProvisioningScriptName, ProvisioningScript) -from common.proto.ztp_server_pb2_grpc import ztpServerServiceServicer +from common.proto.ztp_server_pb2 import ProvisioningScriptName, ProvisioningScript, ZtpFileName, ZtpFile +from common.proto.ztp_server_pb2_grpc import ZtpServerServiceServicer LOGGER = logging.getLogger(__name__) METRICS_POOL = MetricsPool('ZTP_SERVER', 'RPC') -class ZtpServerServiceServicerImpl(ztpServerServiceServicer): + +class ZtpServerServiceServicerImpl(ZtpServerServiceServicer): def __init__(self): LOGGER.info('Creating Servicer...') LOGGER.info('Servicer Created') @@ -30,24 +30,24 @@ class ZtpServerServiceServicerImpl(ztpServerServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetZtpProvisioning(self, request : ProvisioningScriptName, context : grpc.ServicerContext) -> ProvisioningScript: try: - filePath = '../data/' + ProvisioningScriptName - with open(filePath, 'r') as provisioning_file: + provisioningPath = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', 'data', request.scriptname) + with open(provisioningPath, 'r') as provisioning_file: provisioning_content = provisioning_file.read() - return ztpServerServiceServicer.ProvisioningScript(script=provisioning_content) + return ProvisioningScript(script=provisioning_content) except FileNotFoundError: context.set_code(grpc.StatusCode.NOT_FOUND) context.set_details('File not found') - return ztpServerServiceServicer.ProvisioningScript() + return ProvisioningScript() @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetZtpProvisioning(self, request : ZtpFileName, context : grpc.ServicerContext) -> ZtpFile: try: - filePath = '../data/' + ZtpFileName - with open(filePath, 'r') as json_file: + ztpPath = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', 'data', request.filename) + with open(ztpPath, 'r') as json_file: json_content = json_file.read() - return ztpServerServiceServicer.ZtpFile(json=json_content) + return ZtpFile(json=json_content) except FileNotFoundError: context.set_code(grpc.StatusCode.NOT_FOUND) context.set_details('File not found') - return ztpServerServiceServicer.ZtpFile(json=json_content) \ No newline at end of file + return ZtpFile() \ No newline at end of file diff --git a/src/ztp_server/service/context_subscription/__init__.py b/src/ztp_server/service/context_subscription/__init__.py deleted file mode 100755 index 758f3d82c..000000000 --- a/src/ztp_server/service/context_subscription/__init__.py +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 websockets.sync.server import serve -from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest -from common.Settings import get_setting -from context.client.ContextClient import ContextClient -from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME -from common.tools.object_factory.Topology import json_topology_id -from common.tools.object_factory.Context import json_context_id -from common.proto.context_pb2 import ContextId, TopologyId -import json -import os -from vnt_manager.client.VNTManagerClient import VNTManagerClient - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) -ADMIN_TOPOLOGY_ID = TopologyId(**json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id=JSON_ADMIN_CONTEXT_ID)) - -vnt_manager_client: VNTManagerClient = VNTManagerClient() -context_client: ContextClient = ContextClient() - -ALL_HOSTS = "0.0.0.0" -WS_E2E_PORT = int(get_setting('WS_E2E_PORT', default='8762')) - -LOGGER = logging.getLogger(__name__) - - -def register_context_subscription(): - with serve(subcript_to_vnt_manager, ALL_HOSTS, WS_E2E_PORT, logger=LOGGER) as server: - LOGGER.info("Running subscription server...: {}:{}".format(ALL_HOSTS, str(WS_E2E_PORT))) - server.serve_forever() - LOGGER.info("Exiting subscription server...") - - -def subcript_to_vnt_manager(websocket): - for message in websocket: - LOGGER.debug("Message received: {}".format(message)) - message_json = json.loads(message) - request = VNTSubscriptionRequest() - request.host = message_json['host'] - request.port = message_json['port'] - LOGGER.debug("Received gRPC from ws: {}".format(request)) - - try: - vntm_reply = vnt_manager_client.VNTSubscript(request) - LOGGER.debug("Received gRPC from vntm: {}".format(vntm_reply)) - except Exception as e: - LOGGER.error('Could not subscript to VTNManager: {}'.format(e)) - - websocket.send(vntm_reply.subscription) diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py index c1b8c3733..43b7b79b6 100755 --- a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py @@ -16,32 +16,22 @@ import json import logging from flask.json import jsonify from flask_restful import Resource, request -from werkzeug.exceptions import BadRequest -from common.proto.context_pb2 import Empty, LinkTypeEnum from common.tools.grpc.Tools import grpc_message_to_json -from context.client.ContextClient import ContextClient -from device.client.DeviceClient import DeviceClient -from service.client.ServiceClient import ServiceClient -from slice.client.SliceClient import SliceClient -from vnt_manager.client.VNTManagerClient import VNTManagerClient +from ztp_server.service.rest_server.ztpServer_plugins.tools.Authentication import HTTP_AUTH from .Tools import ( - format_grpc_to_json, returnConfigFile + returnConfigFile ) LOGGER = logging.getLogger(__name__) - class _Resource(Resource): def __init__(self) -> None: super().__init__() - self.context_client = ContextClient() - self.device_client = DeviceClient() - self.service_client = ServiceClient() - self.vntmanager_client = VNTManagerClient() - self.slice_client = SliceClient() - class config(_Resource): + @HTTP_AUTH.login_required def get(self, config_db : str): - return returnConfigFile(config_db) #TODO define how to return configFile.json + #if returnConfigFile(config_db) + + return diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py index 6665dd4ce..7d05816ee 100755 --- a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py @@ -12,30 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Dict -from flask.json import jsonify -from common.proto.context_pb2 import ( - ConnectionId, returnConfigFile -) -from common.proto.policy_pb2 import PolicyRule, PolicyRuleId -from common.tools.grpc.Tools import grpc_message_to_json -from common.tools.object_factory.Connection import json_connection_id -from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Device import json_device_id -from common.tools.object_factory.Link import json_link_id -from common.tools.object_factory.PolicyRule import json_policyrule_id -from common.tools.object_factory.Service import json_service_id -from common.tools.object_factory.Slice import json_slice_id -from common.tools.object_factory.Topology import json_topology_id - - -def format_grpc_to_json(grpc_reply): - return jsonify(grpc_message_to_json(grpc_reply)) +import os def returnConfigFile(config_db): - path = config_db - - with open(path, 'r', encoding='utf-8') as configFile: - content = configFile.read() + try: + configFilePath = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..','..','..','..','..', 'data', config_db) + with open(configFilePath, 'r', encoding='utf-8') as configFile: + content = configFile.read() + except FileNotFoundError: + return "File not Found" return content \ No newline at end of file diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py deleted file mode 100755 index 66b607c8b..000000000 --- a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/Validator.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from typing import List -from flask.json import jsonify -from jsonschema import _utils -from jsonschema.validators import validator_for -from jsonschema.protocols import Validator -from jsonschema.exceptions import ValidationError -from werkzeug.exceptions import BadRequest -from .HttpStatusCodes import HTTP_BADREQUEST - -def validate_message(schema, message): - validator_class = validator_for(schema) - validator : Validator = validator_class(schema) - errors : List[ValidationError] = sorted(validator.iter_errors(message), key=str) - if len(errors) == 0: return - response = jsonify([ - {'message': str(error.message), 'schema': str(error.schema), 'validator': str(error.validator), - 'where': str(_utils.format_as_index(container='message', indices=error.relative_path))} - for error in errors - ]) - response.status_code = HTTP_BADREQUEST - raise BadRequest(response=response) diff --git a/src/ztp_server/tests/Constants.py b/src/ztp_server/tests/Constants.py deleted file mode 100755 index 886ddcafa..000000000 --- a/src/ztp_server/tests/Constants.py +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -USERNAME = 'admin' -PASSWORD = 'admin' - -# Ref: https://osm.etsi.org/wikipub/index.php/WIM -WIM_MAPPING = [ - { - 'device-id' : 'dev-1', # pop_switch_dpid - #'device_interface_id' : ??, # pop_switch_port - 'service_endpoint_id' : 'ep-1', # wan_service_endpoint_id - 'service_mapping_info': { # wan_service_mapping_info, other extra info - 'bearer': {'bearer-reference': 'R1-EMU:13/1/2'}, - 'site-id': '1', - }, - #'switch_dpid' : ??, # wan_switch_dpid - #'switch_port' : ??, # wan_switch_port - #'datacenter_id' : ??, # vim_account - }, - { - 'device-id' : 'dev-2', # pop_switch_dpid - #'device_interface_id' : ??, # pop_switch_port - 'service_endpoint_id' : 'ep-2', # wan_service_endpoint_id - 'service_mapping_info': { # wan_service_mapping_info, other extra info - 'bearer': {'bearer-reference': 'R2-EMU:13/1/2'}, - 'site-id': '2', - }, - #'switch_dpid' : ??, # wan_switch_dpid - #'switch_port' : ??, # wan_switch_port - #'datacenter_id' : ??, # vim_account - }, - { - 'device-id' : 'dev-3', # pop_switch_dpid - #'device_interface_id' : ??, # pop_switch_port - 'service_endpoint_id' : 'ep-3', # wan_service_endpoint_id - 'service_mapping_info': { # wan_service_mapping_info, other extra info - 'bearer': {'bearer-reference': 'R3-EMU:13/1/2'}, - 'site-id': '3', - }, - #'switch_dpid' : ??, # wan_switch_dpid - #'switch_port' : ??, # wan_switch_port - #'datacenter_id' : ??, # vim_account - }, - { - 'device-id' : 'dev-4', # pop_switch_dpid - #'device_interface_id' : ??, # pop_switch_port - 'service_endpoint_id' : 'ep-4', # wan_service_endpoint_id - 'service_mapping_info': { # wan_service_mapping_info, other extra info - 'bearer': {'bearer-reference': 'R4-EMU:13/1/2'}, - 'site-id': '4', - }, - #'switch_dpid' : ??, # wan_switch_dpid - #'switch_port' : ??, # wan_switch_port - #'datacenter_id' : ??, # vim_account - }, -] - -SERVICE_TYPE = 'ELINE' - -SERVICE_CONNECTION_POINTS_1 = [ - {'service_endpoint_id': 'ep-1', - 'service_endpoint_encapsulation_type': 'dot1q', - 'service_endpoint_encapsulation_info': {'vlan': 1234}}, - {'service_endpoint_id': 'ep-2', - 'service_endpoint_encapsulation_type': 'dot1q', - 'service_endpoint_encapsulation_info': {'vlan': 1234}}, -] - -SERVICE_CONNECTION_POINTS_2 = [ - {'service_endpoint_id': 'ep-3', - 'service_endpoint_encapsulation_type': 'dot1q', - 'service_endpoint_encapsulation_info': {'vlan': 1234}}, -] \ No newline at end of file diff --git a/src/ztp_server/tests/MockService_Dependencies.py b/src/ztp_server/tests/MockService_Dependencies.py deleted file mode 100755 index 322441367..000000000 --- a/src/ztp_server/tests/MockService_Dependencies.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 os -from typing import Union -from common.Constants import ServiceNameEnum -from common.Settings import ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name -from common.proto.context_pb2_grpc import add_ContextServiceServicer_to_server -from common.proto.service_pb2_grpc import add_ServiceServiceServicer_to_server -from common.proto.slice_pb2_grpc import add_SliceServiceServicer_to_server -from common.tests.MockServicerImpl_Context import MockServicerImpl_Context -from common.tests.MockServicerImpl_Service import MockServicerImpl_Service -from common.tests.MockServicerImpl_Slice import MockServicerImpl_Slice -from common.tools.service.GenericGrpcService import GenericGrpcService - -LOCAL_HOST = '127.0.0.1' - -SERVICE_CONTEXT = ServiceNameEnum.CONTEXT -SERVICE_SERVICE = ServiceNameEnum.SERVICE -SERVICE_SLICE = ServiceNameEnum.SLICE - -class MockService_Dependencies(GenericGrpcService): - # Mock Service implementing Context, Service and Slice to simplify unitary tests of NBI - - def __init__(self, bind_port: Union[str, int]) -> None: - super().__init__(bind_port, LOCAL_HOST, enable_health_servicer=False, cls_name='MockService') - - # pylint: disable=attribute-defined-outside-init - def install_servicers(self): - self.context_servicer = MockServicerImpl_Context() - add_ContextServiceServicer_to_server(self.context_servicer, self.server) - - self.service_servicer = MockServicerImpl_Service() - add_ServiceServiceServicer_to_server(self.service_servicer, self.server) - - self.slice_servicer = MockServicerImpl_Slice() - add_SliceServiceServicer_to_server(self.slice_servicer, self.server) - - def configure_env_vars(self): - os.environ[get_env_var_name(SERVICE_CONTEXT, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) - os.environ[get_env_var_name(SERVICE_CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) - - os.environ[get_env_var_name(SERVICE_SERVICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) - os.environ[get_env_var_name(SERVICE_SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) - - os.environ[get_env_var_name(SERVICE_SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(self.bind_address) - os.environ[get_env_var_name(SERVICE_SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(self.bind_port) diff --git a/src/ztp_server/tests/PrepareTestScenario.py b/src/ztp_server/tests/PrepareTestScenario.py deleted file mode 100755 index a574f086b..000000000 --- a/src/ztp_server/tests/PrepareTestScenario.py +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 enum, logging, os, pytest, requests, time -from typing import Any, Dict, List, Optional, Set, Union -from common.Constants import ServiceNameEnum -from common.Settings import ( - ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_HTTP, - get_env_var_name, get_service_baseurl_http, get_service_port_http -) -from context.client.ContextClient import ContextClient -from nbi.service.rest_server.RestServer import RestServer -from nbi.service.rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api -from nbi.service.rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn -from nbi.service.rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn -from nbi.service.rest_server.nbi_plugins.ietf_network import register_ietf_network -from nbi.service.rest_server.nbi_plugins.tfs_api import register_tfs_api -from nbi.tests.MockService_Dependencies import MockService_Dependencies -from service.client.ServiceClient import ServiceClient -from slice.client.SliceClient import SliceClient -from tests.tools.mock_osm.MockOSM import MockOSM -from .Constants import USERNAME, PASSWORD, WIM_MAPPING - -LOCAL_HOST = '127.0.0.1' -MOCKSERVICE_PORT = 10000 -NBI_SERVICE_PORT = MOCKSERVICE_PORT + get_service_port_http(ServiceNameEnum.NBI) # avoid privileged ports -os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) -os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(NBI_SERVICE_PORT) - -@pytest.fixture(scope='session') -def mock_service(): - _service = MockService_Dependencies(MOCKSERVICE_PORT) - _service.configure_env_vars() - _service.start() - yield _service - _service.stop() - -@pytest.fixture(scope='session') -def nbi_service_rest(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument - _rest_server = RestServer() - register_etsi_bwm_api(_rest_server) - register_ietf_l2vpn(_rest_server) - register_ietf_l3vpn(_rest_server) - register_ietf_network(_rest_server) - register_tfs_api(_rest_server) - _rest_server.start() - time.sleep(1) # bring time for the server to start - yield _rest_server - _rest_server.shutdown() - _rest_server.join() - -@pytest.fixture(scope='session') -def osm_wim(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - wim_url = 'http://{:s}:{:d}'.format(LOCAL_HOST, NBI_SERVICE_PORT) - return MockOSM(wim_url, WIM_MAPPING, USERNAME, PASSWORD) - -@pytest.fixture(scope='session') -def context_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument - _client = ContextClient() - yield _client - _client.close() - -@pytest.fixture(scope='session') -def service_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument - _client = ServiceClient() - yield _client - _client.close() - -@pytest.fixture(scope='session') -def slice_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument - _client = SliceClient() - yield _client - _client.close() - -class RestRequestMethod(enum.Enum): - GET = 'get' - POST = 'post' - PUT = 'put' - PATCH = 'patch' - DELETE = 'delete' - -EXPECTED_STATUS_CODES : Set[int] = { - requests.codes['OK' ], - requests.codes['CREATED' ], - requests.codes['ACCEPTED' ], - requests.codes['NO_CONTENT'], -} - -def do_rest_request( - method : RestRequestMethod, url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - base_url = get_service_baseurl_http(ServiceNameEnum.NBI) or '' - request_url = 'http://{:s}:{:s}@{:s}:{:d}{:s}{:s}'.format( - USERNAME, PASSWORD, LOCAL_HOST, NBI_SERVICE_PORT, str(base_url), url - ) - if logger is not None: - msg = 'Request: {:s} {:s}'.format(str(method.value).upper(), str(request_url)) - if body is not None: msg += ' body={:s}'.format(str(body)) - logger.warning(msg) - reply = requests.request(method.value, request_url, timeout=timeout, json=body, allow_redirects=allow_redirects) - if logger is not None: - logger.warning('Reply: {:s}'.format(str(reply.text))) - assert reply.status_code in expected_status_codes, 'Reply failed with status code {:d}'.format(reply.status_code) - - if reply.content and len(reply.content) > 0: return reply.json() - return None - -def do_rest_get_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.GET, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) - -def do_rest_post_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.POST, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) - -def do_rest_put_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.PUT, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) - -def do_rest_patch_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.PATCH, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) - -def do_rest_delete_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.DELETE, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) diff --git a/src/ztp_server/tests/__init__.py b/src/ztp_server/tests/__init__.py deleted file mode 100755 index 53d5157f7..000000000 --- a/src/ztp_server/tests/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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/ztp_server/tests/data/ietf_acl.json b/src/ztp_server/tests/data/ietf_acl.json deleted file mode 100755 index 072df6d01..000000000 --- a/src/ztp_server/tests/data/ietf_acl.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "ietf-access-control-list": { - "acls": { - "acl": [ - { - "name": "sample-ipv4-acl", - "type": "ipv4-acl-type", - "aces": { - "ace": [ - { - "name": "rule1", - "matches": { - "ipv4": { - "dscp": 18, - "source-ipv4-network": "128.32.10.6/24", - "destination-ipv4-network": "172.10.33.0/24" - }, - "tcp": { - "flags": "syn", - "source-port": { - "port": 1444, - "operator": "eq" - }, - "destination-port": { - "port": 1333, - "operator": "eq" - } - } - }, - "actions": { - "forwarding": "drop" - } - } - ] - } - } - ], - "attachment-points": { - "interface": [ - { - "interface-id": "200", - "ingress": { - "acl-sets": { - "acl-set": [ - { - "name": "sample-ipv4-acl" - } - ] - } - } - } - ] - } - } - } -} diff --git a/src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json b/src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json deleted file mode 100755 index bfeb93fb7..000000000 --- a/src/ztp_server/tests/data/ietf_l3vpn_req_svc1.json +++ /dev/null @@ -1,231 +0,0 @@ -{ - "ietf-l3vpn-svc:l3vpn-svc": { - "vpn-services": { - "vpn-service": [ - { - "vpn-id": "vpn1" - } - ] - }, - "sites": { - "site": [ - { - "site-id": "site_OLT", - "management": { - "type": "ietf-l3vpn-svc:provider-managed" - }, - "locations": { - "location": [ - { - "location-id": "OLT" - } - ] - }, - "devices": { - "device": [ - { - "device-id": "128.32.33.5", - "location": "OLT" - } - ] - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "128.32.10.1/24", - "lan-tag": "vlan21", - "next-hop": "128.32.33.2" - }, - { - "lan": "128.32.20.1/24", - "lan-tag": "vlan21", - "next-hop": "128.32.33.2" - } - ] - } - } - } - ] - }, - "site-network-accesses": { - "site-network-access": [ - { - "site-network-access-id": "500", - "site-network-access-type": "ietf-l3vpn-svc:multipoint", - "device-reference": "128.32.33.5", - "vpn-attachment": { - "vpn-id": "vpn1", - "site-role": "ietf-l3vpn-svc:spoke-role" - }, - "ip-connection": { - "ipv4": { - "address-allocation-type": "ietf-l3vpn-svc:static-address", - "addresses": { - "provider-address": "128.32.33.254", - "customer-address": "128.32.33.2", - "prefix-length": 24 - } - } - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "172.1.101.1/24", - "lan-tag": "vlan21", - "next-hop": "128.32.33.254" - } - ] - } - } - } - ] - }, - "service": { - "svc-mtu": 1500, - "svc-input-bandwidth": 1000000000, - "svc-output-bandwidth": 1000000000, - "qos": { - "qos-profile": { - "classes": { - "class": [ - { - "class-id": "qos-realtime", - "direction": "ietf-l3vpn-svc:both", - "latency": { - "latency-boundary": 10 - }, - "bandwidth": { - "guaranteed-bw-percent": 100 - } - } - ] - } - } - } - } - } - ] - } - }, - { - "site-id": "site_POP", - "management": { - "type": "ietf-l3vpn-svc:provider-managed" - }, - "locations": { - "location": [ - { - "location-id": "POP" - } - ] - }, - "devices": { - "device": [ - { - "device-id": "172.10.33.5", - "location": "POP" - } - ] - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "172.1.101.1/24", - "lan-tag": "vlan101", - "next-hop": "172.10.33.2" - } - ] - } - } - } - ] - }, - "site-network-accesses": { - "site-network-access": [ - { - "site-network-access-id": "500", - "site-network-access-type": "ietf-l3vpn-svc:multipoint", - "device-reference": "172.10.33.5", - "vpn-attachment": { - "vpn-id": "vpn1", - "site-role": "ietf-l3vpn-svc:hub-role" - }, - "ip-connection": { - "ipv4": { - "address-allocation-type": "ietf-l3vpn-svc:static-address", - "addresses": { - "provider-address": "172.10.33.254", - "customer-address": "172.10.33.2", - "prefix-length": 24 - } - } - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "128.32.10.1/24", - "lan-tag": "vlan101", - "next-hop": "172.10.33.254" - }, - { - "lan": "128.32.20.1/24", - "lan-tag": "vlan101", - "next-hop": "172.10.33.254" - } - ] - } - } - } - ] - }, - "service": { - "svc-mtu": 1500, - "svc-input-bandwidth": 1000000000, - "svc-output-bandwidth": 1000000000, - "qos": { - "qos-profile": { - "classes": { - "class": [ - { - "class-id": "qos-realtime", - "direction": "ietf-l3vpn-svc:both", - "latency": { - "latency-boundary": 10 - }, - "bandwidth": { - "guaranteed-bw-percent": 100 - } - } - ] - } - } - } - } - } - ] - } - } - ] - } - } -} \ No newline at end of file diff --git a/src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json b/src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json deleted file mode 100755 index 2cc512e59..000000000 --- a/src/ztp_server/tests/data/ietf_l3vpn_req_svc2.json +++ /dev/null @@ -1,231 +0,0 @@ -{ - "ietf-l3vpn-svc:l3vpn-svc": { - "vpn-services": { - "vpn-service": [ - { - "vpn-id": "vpn2" - } - ] - }, - "sites": { - "site": [ - { - "site-id": "site_OLT", - "management": { - "type": "ietf-l3vpn-svc:provider-managed" - }, - "locations": { - "location": [ - { - "location-id": "OLT" - } - ] - }, - "devices": { - "device": [ - { - "device-id": "128.32.33.5", - "location": "OLT" - } - ] - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "128.32.10.1/24", - "lan-tag": "vlan31", - "next-hop": "128.32.33.2" - }, - { - "lan": "128.32.20.1/24", - "lan-tag": "vlan31", - "next-hop": "128.32.33.2" - } - ] - } - } - } - ] - }, - "site-network-accesses": { - "site-network-access": [ - { - "site-network-access-id": "500", - "site-network-access-type": "ietf-l3vpn-svc:multipoint", - "device-reference": "128.32.33.5", - "vpn-attachment": { - "vpn-id": "vpn2", - "site-role": "ietf-l3vpn-svc:spoke-role" - }, - "ip-connection": { - "ipv4": { - "address-allocation-type": "ietf-l3vpn-svc:static-address", - "addresses": { - "provider-address": "128.32.33.254", - "customer-address": "128.32.33.2", - "prefix-length": 24 - } - } - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "172.1.201.1/24", - "lan-tag": "vlan31", - "next-hop": "128.32.33.254" - } - ] - } - } - } - ] - }, - "service": { - "svc-mtu": 1500, - "svc-input-bandwidth": 1000000000, - "svc-output-bandwidth": 1000000000, - "qos": { - "qos-profile": { - "classes": { - "class": [ - { - "class-id": "qos-realtime", - "direction": "ietf-l3vpn-svc:both", - "latency": { - "latency-boundary": 10 - }, - "bandwidth": { - "guaranteed-bw-percent": 100 - } - } - ] - } - } - } - } - } - ] - } - }, - { - "site-id": "site_POP", - "management": { - "type": "ietf-l3vpn-svc:provider-managed" - }, - "locations": { - "location": [ - { - "location-id": "POP" - } - ] - }, - "devices": { - "device": [ - { - "device-id": "172.10.33.5", - "location": "POP" - } - ] - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "172.1.201.1/24", - "lan-tag": "vlan201", - "next-hop": "172.10.33.2" - } - ] - } - } - } - ] - }, - "site-network-accesses": { - "site-network-access": [ - { - "site-network-access-id": "500", - "site-network-access-type": "ietf-l3vpn-svc:multipoint", - "device-reference": "172.10.33.5", - "vpn-attachment": { - "vpn-id": "vpn2", - "site-role": "ietf-l3vpn-svc:hub-role" - }, - "ip-connection": { - "ipv4": { - "address-allocation-type": "ietf-l3vpn-svc:static-address", - "addresses": { - "provider-address": "172.10.33.254", - "customer-address": "172.10.33.2", - "prefix-length": 24 - } - } - }, - "routing-protocols": { - "routing-protocol": [ - { - "type": "ietf-l3vpn-svc:static", - "static": { - "cascaded-lan-prefixes": { - "ipv4-lan-prefixes": [ - { - "lan": "128.32.10.1/24", - "lan-tag": "vlan201", - "next-hop": "172.10.33.254" - }, - { - "lan": "128.32.20.1/24", - "lan-tag": "vlan201", - "next-hop": "172.10.33.254" - } - ] - } - } - } - ] - }, - "service": { - "svc-mtu": 1500, - "svc-input-bandwidth": 1000000000, - "svc-output-bandwidth": 1000000000, - "qos": { - "qos-profile": { - "classes": { - "class": [ - { - "class-id": "qos-realtime", - "direction": "ietf-l3vpn-svc:both", - "latency": { - "latency-boundary": 10 - }, - "bandwidth": { - "guaranteed-bw-percent": 100 - } - } - ] - } - } - } - } - } - ] - } - } - ] - } - } -} \ No newline at end of file diff --git a/src/ztp_server/tests/data/test-ietf-network.json b/src/ztp_server/tests/data/test-ietf-network.json deleted file mode 100755 index 7643ef53a..000000000 --- a/src/ztp_server/tests/data/test-ietf-network.json +++ /dev/null @@ -1,1962 +0,0 @@ -{ - "ietf-network:networks": { - "network": [ - { - "network-id": "providerId-10-clientId-0-topologyId-1", - "ietf-te-topology:te": { - "name": "Huawei-Network" - }, - "ietf-te-topology:te-topology-identifier": { - "provider-id": 10, - "client-id": 0, - "topology-id": "1" - }, - "network-types": { - "ietf-te-topology:te-topology": { - "ietf-otn-topology:otn-topology": {} - } - }, - "node": [ - { - "node-id": "10.0.10.1", - "ietf-te-topology:te-node-id": "10.0.10.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - }, - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "OA" - }, - "tunnel-termination-point": [ - { - "tunnel-tp-id": "NTAx", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "501" - } - ] - } - }, - { - "tunnel-tp-id": "NTAw", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "500" - } - ] - } - } - ] - } - }, - { - "node-id": "10.0.20.1", - "ietf-te-topology:te-node-id": "10.0.20.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - }, - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "P" - }, - "tunnel-termination-point": [ - { - "tunnel-tp-id": "NTAx", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "501" - } - ] - } - }, - { - "tunnel-tp-id": "NTAw", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "500" - } - ] - } - } - ] - } - }, - { - "node-id": "10.0.40.1", - "ietf-te-topology:te-node-id": "10.0.40.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - }, - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "P" - }, - "tunnel-termination-point": [ - { - "tunnel-tp-id": "NTAw", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "500" - } - ] - } - }, - { - "tunnel-tp-id": "NTAx", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "501" - } - ] - } - } - ] - } - }, - { - "node-id": "10.0.30.1", - "ietf-te-topology:te-node-id": "10.0.30.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - }, - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-te-topology:te": { - "name": "1-1-1-1-1", - "admin-status": "up", - "oper-status": "up", - "ietf-otn-topology:client-svc": { - "client-facing": false - }, - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-oduk", - "switching-capability": "ietf-te-types:switching-otn", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odu-type": "ietf-layer1-types:ODU4" - } - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "OE" - }, - "tunnel-termination-point": [ - { - "tunnel-tp-id": "NTAw", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "500" - } - ] - } - }, - { - "tunnel-tp-id": "NTAx", - "admin-status": "up", - "oper-status": "up", - "encoding": "ietf-te-types:lsp-encoding-oduk", - "name": "1-1-1-1-1", - "protection-type": "ietf-te-types:lsp-protection-unprotected", - "switching-capability": "ietf-te-types:switching-otn", - "local-link-connectivities": { - "local-link-connectivity": [ - { - "is-allowed": true, - "link-tp-ref": "501" - } - ] - } - } - ] - } - } - ], - "ietf-network-topology:link": [ - { - "link-id": "10.0.10.1-501", - "source": { - "source-node": "10.0.10.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.20.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.10.1-501", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.10.1-500", - "source": { - "source-node": "10.0.10.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.40.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.10.1-500", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.20.1-501", - "source": { - "source-node": "10.0.20.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.10.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.20.1-501", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.20.1-500", - "source": { - "source-node": "10.0.20.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.30.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.20.1-500", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.40.1-500", - "source": { - "source-node": "10.0.40.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.10.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.40.1-500", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.40.1-501", - "source": { - "source-node": "10.0.40.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.30.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.40.1-501", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.30.1-500", - "source": { - "source-node": "10.0.30.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.20.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.30.1-500", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - }, - { - "link-id": "10.0.30.1-501", - "source": { - "source-node": "10.0.30.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.40.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.30.1-501", - "te-delay-metric": 1, - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "odu-type": "ietf-layer1-types:ODU0", - "ts-number": 80 - } - ] - } - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-otn-topology:otn": { - "odulist": [ - { - "ts-number": 80, - "odu-type": "ietf-layer1-types:ODU0" - } - ] - } - } - } - ] - } - } - } - ] - }, - { - "network-id": "providerId-10-clientId-0-topologyId-2", - "ietf-te-topology:te": { - "name": "Huawei-Network" - }, - "ietf-te-topology:te-topology-identifier": { - "provider-id": 10, - "client-id": 0, - "topology-id": "2" - }, - "network-types": { - "ietf-te-topology:te-topology": { - "ietf-eth-te-topology:eth-tran-topology": {} - } - }, - "node": [ - { - "node-id": "10.0.10.1", - "ietf-te-topology:te-node-id": "10.0.10.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "200", - "ietf-te-topology:te-tp-id": "128.32.33.254", - "ietf-eth-te-topology:eth-svc": { - "client-facing": true, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "OA" - } - } - }, - { - "node-id": "10.0.20.1", - "ietf-te-topology:te-node-id": "10.0.20.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "P" - } - } - }, - { - "node-id": "10.0.40.1", - "ietf-te-topology:te-node-id": "10.0.40.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "P" - } - } - }, - { - "node-id": "10.0.30.1", - "ietf-te-topology:te-node-id": "10.0.30.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "200", - "ietf-te-topology:te-tp-id": "172.10.33.254", - "ietf-eth-te-topology:eth-svc": { - "client-facing": true, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "501", - "ietf-te-topology:te-tp-id": 501, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "OE" - } - } - }, - { - "node-id": "128.32.33.5", - "ietf-te-topology:te-node-id": "128.32.33.5", - "ietf-network-topology:termination-point": [ - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": "128.32.33.2", - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - }, - "ietf-te-topology:te": { - "name": "endpoint:111", - "admin-status": "up", - "oper-status": "up", - "interface-switching-capability": [ - { - "encoding": "ietf-te-types:lsp-encoding-ethernet", - "switching-capability": "ietf-te-types:switching-l2sc", - "max-lsp-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - ] - } - }, - { - "tp-id": "200", - "ietf-te-topology:te-tp-id": 200, - "ietf-eth-te-topology:eth-svc": { - "client-facing": true, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - } - }, - { - "tp-id": "201", - "ietf-te-topology:te-tp-id": 201, - "ietf-eth-te-topology:eth-svc": { - "client-facing": true, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "OLT", - "connectivity-matrices": { - "label-restrictions": { - "label-restriction": [ - { - "index": 0, - "label-start": { - "te-label": { - "ietf-eth-te-topology:vlanid": 21 - } - }, - "label-end": { - "te-label": { - "ietf-eth-te-topology:vlanid": 21 - } - } - }, - { - "index": 1, - "label-start": { - "te-label": { - "ietf-eth-te-topology:vlanid": 31 - } - }, - "label-end": { - "te-label": { - "ietf-eth-te-topology:vlanid": 31 - } - } - } - ] - } - } - } - } - }, - { - "node-id": "128.32.10.1", - "ietf-te-topology:te-node-id": "128.32.10.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - } - }, - { - "tp-id": "200", - "ietf-te-topology:te-tp-id": 200, - "ietf-eth-te-topology:eth-svc": { - "client-facing": true, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "ONT1" - } - } - }, - { - "node-id": "128.32.20.1", - "ietf-te-topology:te-node-id": "128.32.20.1", - "ietf-network-topology:termination-point": [ - { - "tp-id": "500", - "ietf-te-topology:te-tp-id": 500, - "ietf-eth-te-topology:eth-svc": { - "client-facing": false, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - } - }, - { - "tp-id": "200", - "ietf-te-topology:te-tp-id": 200, - "ietf-eth-te-topology:eth-svc": { - "client-facing": true, - "supported-classification": { - "port-classification": true, - "vlan-classification": { - "outer-tag": { - "supported-tag-types": [ - "ietf-eth-tran-types:classify-c-vlan", - "ietf-eth-tran-types:classify-s-vlan" - ], - "vlan-bundling": false, - "vlan-range": "1-4094" - } - } - } - } - } - ], - "ietf-te-topology:te": { - "oper-status": "up", - "te-node-attributes": { - "admin-status": "up", - "name": "ONT2" - } - } - } - ], - "ietf-network-topology:link": [ - { - "link-id": "10.0.10.1-200", - "source": { - "source-node": "10.0.10.1", - "source-tp": "200" - }, - "destination": { - "dest-node": "128.32.33.5", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.10.1-200", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "128.32.33.5-500", - "source": { - "source-node": "128.32.33.5", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.10.1", - "dest-tp": "200" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "128.32.33.5-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.10.1-501", - "source": { - "source-node": "10.0.10.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.20.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.10.1-501", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.10.1-500", - "source": { - "source-node": "10.0.10.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.40.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.10.1-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.20.1-501", - "source": { - "source-node": "10.0.20.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.10.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.20.1-501", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.20.1-500", - "source": { - "source-node": "10.0.20.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.30.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.20.1-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.40.1-501", - "source": { - "source-node": "10.0.40.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.30.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.40.1-501", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.40.1-500", - "source": { - "source-node": "10.0.40.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.10.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.40.1-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.30.1-501", - "source": { - "source-node": "10.0.30.1", - "source-tp": "501" - }, - "destination": { - "dest-node": "10.0.40.1", - "dest-tp": "501" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.30.1-501", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "10.0.30.1-500", - "source": { - "source-node": "10.0.30.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "10.0.20.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "10.0.30.1-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "128.32.33.5-200", - "source": { - "source-node": "128.32.33.5", - "source-tp": "200" - }, - "destination": { - "dest-node": "128.32.10.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "128.32.33.5-200", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "128.32.10.1-500", - "source": { - "source-node": "128.32.10.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "128.32.33.5", - "dest-tp": "200" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "128.32.10.1-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "128.32.33.5-201", - "source": { - "source-node": "128.32.33.5", - "source-tp": "201" - }, - "destination": { - "dest-node": "128.32.20.1", - "dest-tp": "500" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "128.32.33.5-201", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - }, - { - "link-id": "128.32.20.1-500", - "source": { - "source-node": "128.32.20.1", - "source-tp": "500" - }, - "destination": { - "dest-node": "128.32.33.5", - "dest-tp": "201" - }, - "ietf-te-topology:te": { - "oper-status": "up", - "te-link-attributes": { - "access-type": "point-to-point", - "admin-status": "up", - "name": "128.32.20.1-500", - "max-link-bandwidth": { - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - }, - "unreserved-bandwidth": [ - { - "priority": 7, - "te-bandwidth": { - "ietf-eth-te-topology:eth-bandwidth": 10000000 - } - } - ] - } - } - } - ] - } - ] - } -} \ No newline at end of file diff --git a/src/ztp_server/tests/data/tfs_api_dummy.json b/src/ztp_server/tests/data/tfs_api_dummy.json deleted file mode 100755 index d8f513757..000000000 --- a/src/ztp_server/tests/data/tfs_api_dummy.json +++ /dev/null @@ -1,442 +0,0 @@ -{ - "dummy_mode": true, - "contexts": [ - { - "context_id": {"context_uuid": {"uuid": "admin"}}, - "name": "admin", - "topology_ids": [ - {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - ], - "service_ids": [ - {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, - {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, - {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}} - ], - "slice_ids": [ - {"context_id": {"context_uuid": {"uuid": "admin"}}, "slice_uuid": {"uuid": "SLC:R1-R2-R3"}} - ] - } - ], - "topologies": [ - { - "device_ids": [ - {"device_uuid": {"uuid": "R1"}}, - {"device_uuid": {"uuid": "R2"}}, - {"device_uuid": {"uuid": "R3"}} - ], - "link_ids": [ - {"link_uuid": {"uuid": "R1/502==R2/501"}}, - {"link_uuid": {"uuid": "R1/503==R3/501"}}, - {"link_uuid": {"uuid": "R2/501==R1/502"}}, - {"link_uuid": {"uuid": "R2/503==R3/502"}}, - {"link_uuid": {"uuid": "R3/501==R1/503"}}, - {"link_uuid": {"uuid": "R3/502==R2/503"}} - ], - "name": "admin", - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "devices": [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "name": "R1", "device_type": "emu-packet-router", - "device_drivers": [0], "device_operational_status": 2, - "device_endpoints": [ - {"name": "200", "endpoint_type": "copper", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"name": "502", "endpoint_type": "optical", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"name": "503", "endpoint_type": "optical", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }} - ], - "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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "502", "name": "502", "type": "optical"}, - {"uuid": "503", "name": "503", "type": "optical"} - ]}}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { - "uuid": "200", "name": "200", "type": "copper" - }}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[502]", "resource_value": { - "uuid": "502", "name": "502", "type": "optical" - }}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { - "uuid": "503", "name": "503", "type": "optical" - }}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "name": "R2", "device_type": "emu-packet-router", - "device_drivers": [0], "device_operational_status": 2, - "device_endpoints": [ - {"name": "200", "endpoint_type": "copper", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"name": "501", "endpoint_type": "optical", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"name": "503", "endpoint_type": "optical", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }} - ], - "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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "501", "name": "501", "type": "optical"}, - {"uuid": "503", "name": "503", "type": "optical"} - ]}}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { - "uuid": "200", "name": "200", "type": "copper" - }}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[501]", "resource_value": { - "uuid": "501", "name": "501", "type": "optical" - }}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { - "uuid": "503", "name": "503", "type": "optical" - }}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "name": "R3", "device_type": "emu-packet-router", - "device_drivers": [0], "device_operational_status": 2, - "device_endpoints": [ - {"name": "200", "endpoint_type": "copper", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"name": "502", "endpoint_type": "optical", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"name": "503", "endpoint_type": "optical", "endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }} - ], - "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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "502", "name": "502", "type": "optical"}, - {"uuid": "503", "name": "503", "type": "optical"} - ]}}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { - "uuid": "200", "name": "200", "type": "copper" - }}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[502]", "resource_value": { - "uuid": "502", "name": "502", "type": "optical" - }}}, - {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { - "uuid": "503", "name": "503", "type": "optical" - }}} - ]} - } - ], - "links": [ - { - "link_id": {"link_uuid": {"uuid": "R1/502==R2/501"}}, "name": "R1/502==R2/501", - "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, - "link_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ] - }, - { - "link_id": {"link_uuid": {"uuid": "R1/503==R3/501"}}, "name": "R1/503==R3/501", - "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, - "link_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ] - }, - { - "link_id": {"link_uuid": {"uuid": "R2/501==R1/502"}}, "name": "R2/501==R1/502", - "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, - "link_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ] - }, - { - "link_id": {"link_uuid": {"uuid": "R2/503==R3/502"}}, "name": "R2/503==R3/502", - "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, - "link_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ] - }, - { - "link_id": {"link_uuid": {"uuid": "R3/501==R1/503"}}, "name": "R3/501==R1/503", - "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, - "link_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ] - }, - { - "link_id": {"link_uuid": {"uuid": "R3/502==R2/503"}}, "name": "R3/502==R2/503", - "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, - "link_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ] - } - ], - "services": [ - { - "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, - "name": "SVC:R1/200==R2/200", "service_type": 1, "service_status": {"service_status": 1}, - "service_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "service_constraints": [ - {"action": 1, "sla_capacity": {"capacity_gbps": 40.0}}, - {"action": 1, "sla_latency": {"e2e_latency_ms": 10.0}}, - {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.99}} - ], - "service_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 - }}}, - {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 - }}} - ]} - }, - { - "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, - "name": "SVC:R1/200==R3/200", "service_type": 1, "service_status": {"service_status": 1}, - "service_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "service_constraints": [ - {"action": 1, "sla_capacity": {"capacity_gbps": 50.0}}, - {"action": 1, "sla_latency": {"e2e_latency_ms": 8.0}}, - {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.9}} - ], - "service_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 - }}}, - {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 - }}} - ]} - }, - { - "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}}, - "name": "SVC:R2/200==R3/200", "service_type": 1, "service_status": {"service_status": 1}, - "service_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "service_constraints": [ - {"action": 1, "sla_capacity": {"capacity_gbps": 10.0}}, - {"action": 1, "sla_latency": {"e2e_latency_ms": 3.0}}, - {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.9999}} - ], - "service_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 - }}}, - {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 - }}} - ]} - } - ], - "slices": [ - { - "slice_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "slice_uuid": {"uuid": "SLC:R1-R2-R3"}}, - "name": "SLC:R1-R2-R3", - "slice_endpoint_ids": [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "slice_constraints": [ - {"action": 1, "sla_capacity": {"capacity_gbps": 40.0}}, - {"action": 1, "sla_latency": {"e2e_latency_ms": 10.0}}, - {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.99}} - ], - "slice_service_ids": [ - {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, - {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, - {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}} - ], - "slice_subslice_ids": [], - "slice_status": {"slice_status" : 1}, - "slice_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 - }}}, - {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 - }}}, - {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { - "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 - }}} - ]}, - "slice_owner": {"owner_uuid": {"uuid": "TFS"}, "owner_string": "TFS:SLC:R1-R2-R3"} - } - ], - "connections": [ - { - "connection_id": {"connection_uuid": {"uuid": "CON:R1/200==R2/200:1"}}, - "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, - "path_hops_endpoint_ids" : [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "sub_service_ids": [], - "settings": { - "l3": {"src_ip_address": "10.0.1.10", "dst_ip_address": "10.0.2.10", "ttl": 20} - } - }, - { - "connection_id": {"connection_uuid": {"uuid": "CON:R1/200==R3/200:1"}}, - "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, - "path_hops_endpoint_ids" : [ - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "sub_service_ids": [], - "settings": { - "l3": {"src_ip_address": "10.0.1.10", "dst_ip_address": "10.0.3.10", "ttl": 20} - } - }, - { - "connection_id": {"connection_uuid": {"uuid": "CON:R2/200==R3/200:1"}}, - "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}}, - "path_hops_endpoint_ids" : [ - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }, - { - "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - } - ], - "sub_service_ids": [], - "settings": { - "l3": {"src_ip_address": "10.0.2.10", "dst_ip_address": "10.0.3.10", "ttl": 20} - } - } - ] -} diff --git a/src/ztp_server/tests/data/topology-7router-emu-dummy.json b/src/ztp_server/tests/data/topology-7router-emu-dummy.json deleted file mode 100755 index 3bb622626..000000000 --- a/src/ztp_server/tests/data/topology-7router-emu-dummy.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "dummy_mode": true, - "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": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, - {"uuid": "1/3", "type": "copper"}, {"uuid": "2/1", "type": "copper"}, - {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"}, - {"uuid": "2/4", "type": "copper"}, {"uuid": "2/5", "type": "copper"}, - {"uuid": "2/6", "type": "copper"} - ]}}} - ]}} - ], - "links": [ - {"link_id": {"link_uuid": {"uuid": "R1==R2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R1==R6"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R1==R7"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R2==R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R2==R3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R3==R2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R3==R4"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R3==R7"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R4==R3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R4==R5"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R5==R4"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R5==R6"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R5==R7"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R6==R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R6==R5"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R7==R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R7==R3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R7==R5"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]} - ] -} diff --git a/src/ztp_server/tests/data/topology-7router-emu.json b/src/ztp_server/tests/data/topology-7router-emu.json deleted file mode 100755 index 4174f4fb4..000000000 --- a/src/ztp_server/tests/data/topology-7router-emu.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "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": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, - {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, - {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} - ]}}} - ]}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0], - "device_endpoints": [], "device_operational_status": 1, "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": [ - {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, - {"uuid": "1/3", "type": "copper"}, {"uuid": "2/1", "type": "copper"}, - {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"}, - {"uuid": "2/4", "type": "copper"}, {"uuid": "2/5", "type": "copper"}, - {"uuid": "2/6", "type": "copper"} - ]}}} - ]}} - ], - "links": [ - {"link_id": {"link_uuid": {"uuid": "R1==R2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R1==R6"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R1==R7"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R2==R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R2==R3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R3==R2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R3==R4"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R3==R7"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R4==R3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R4==R5"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R5==R4"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R5==R6"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R5==R7"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R6==R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R6==R5"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R7==R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R7==R3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}}, - {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R7==R5"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}}, - {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}} - ]} - ] -} diff --git a/src/ztp_server/tests/data/topology-dummy.json b/src/ztp_server/tests/data/topology-dummy.json deleted file mode 100755 index f066051ee..000000000 --- a/src/ztp_server/tests/data/topology-dummy.json +++ /dev/null @@ -1,3134 +0,0 @@ -{ - "contexts": [ - { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "name": "admin", - "service_ids": [], - "slice_ids": [], - "topology_ids": [ - { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - ] - } - ], - "devices": [ - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - }, - { - "name": "200", - "type": "copper", - "uuid": "200" - }, - { - "name": "500", - "type": "optical", - "uuid": "500" - }, - { - "name": "501", - "type": "optical", - "uuid": "501" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[mgmt]", - "resource_value": { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[200]", - "resource_value": { - "name": "200", - "type": "copper", - "uuid": "200" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "optical", - "uuid": "500" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[501]", - "resource_value": { - "name": "501", - "type": "optical", - "uuid": "501" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "200" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "501" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "b72983bd-57d8-5cf8-8ec7-da9084382d7a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "mgmt", - "kpi_sample_types": [], - "name": "mgmt" - } - ], - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "device_operational_status": 2, - "device_type": "emu-packet-router", - "name": "10.0.30.1" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "200", - "type": "copper", - "uuid": "200" - }, - { - "name": "500", - "type": "copper", - "uuid": "500" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[200]", - "resource_value": { - "name": "200", - "type": "copper", - "uuid": "200" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "copper", - "uuid": "500" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "endpoint_uuid": { - "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "200" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "endpoint_uuid": { - "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "500" - } - ], - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "device_operational_status": 2, - "device_type": "emu-packet-router", - "name": "128.32.10.1" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "200", - "type": "copper", - "uuid": "200" - }, - { - "name": "201", - "type": "copper", - "uuid": "201" - }, - { - "name": "500", - "type": "copper", - "uuid": "500" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[200]", - "resource_value": { - "name": "200", - "type": "copper", - "uuid": "200" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[201]", - "resource_value": { - "name": "201", - "type": "copper", - "uuid": "201" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "copper", - "uuid": "500" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - "endpoint_uuid": { - "uuid": "227b6bb2-dacf-5b3d-84e9-c1d0c107bcd8" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "201" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - "endpoint_uuid": { - "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - "endpoint_uuid": { - "uuid": "d8528b70-9215-59ed-851d-b9590ab0c94b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "200" - } - ], - "device_id": { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - "device_operational_status": 2, - "device_type": "emu-datacenter", - "name": "172.10.33.5" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - }, - { - "name": "500", - "type": "optical", - "uuid": "500" - }, - { - "name": "501", - "type": "optical", - "uuid": "501" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[mgmt]", - "resource_value": { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "optical", - "uuid": "500" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[501]", - "resource_value": { - "name": "501", - "type": "optical", - "uuid": "501" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "501" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "ede34dea-6b51-5787-88d2-553fe548f540" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "mgmt", - "kpi_sample_types": [], - "name": "mgmt" - } - ], - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "device_operational_status": 2, - "device_type": "emu-packet-router", - "name": "10.0.40.1" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "200", - "type": "copper", - "uuid": "200" - }, - { - "name": "201", - "type": "copper", - "uuid": "201" - }, - { - "name": "500", - "type": "copper", - "uuid": "500" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[200]", - "resource_value": { - "name": "200", - "type": "copper", - "uuid": "200" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[201]", - "resource_value": { - "name": "201", - "type": "copper", - "uuid": "201" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "copper", - "uuid": "500" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "201" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "c6435612-3aca-590f-89ba-e606f54df474" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "200" - } - ], - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "device_operational_status": 2, - "device_type": "emu-optical-transponder", - "name": "128.32.33.5" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - }, - { - "name": "200", - "type": "copper", - "uuid": "200" - }, - { - "name": "500", - "type": "optical", - "uuid": "500" - }, - { - "name": "501", - "type": "optical", - "uuid": "501" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[mgmt]", - "resource_value": { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[200]", - "resource_value": { - "name": "200", - "type": "copper", - "uuid": "200" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "optical", - "uuid": "500" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[501]", - "resource_value": { - "name": "501", - "type": "optical", - "uuid": "501" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "59e1e30f-ea65-5e04-8a91-760a648a02c6" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "mgmt", - "kpi_sample_types": [], - "name": "mgmt" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "70cbb732-8149-59ee-939b-011828e4292b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "200" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "501" - } - ], - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "device_operational_status": 2, - "device_type": "emu-packet-router", - "name": "10.0.10.1" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - }, - { - "name": "500", - "type": "optical", - "uuid": "500" - }, - { - "name": "501", - "type": "optical", - "uuid": "501" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[mgmt]", - "resource_value": { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "optical", - "uuid": "500" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[501]", - "resource_value": { - "name": "501", - "type": "optical", - "uuid": "501" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "501" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "356378dd-952b-5032-912d-37fc21284b4c" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "optical", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "da826790-a4b0-5317-b30b-e1370918a644" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "mgmt", - "kpi_sample_types": [], - "name": "mgmt" - } - ], - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "device_operational_status": 2, - "device_type": "emu-packet-router", - "name": "10.0.20.1" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "eth1", - "type": "copper", - "uuid": "eth1" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[eth1]", - "resource_value": { - "name": "eth1", - "type": "copper", - "uuid": "eth1" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" - } - }, - "endpoint_uuid": { - "uuid": "0701f406-633f-53e7-a44d-c93384745df8" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "eth1" - } - ], - "device_id": { - "device_uuid": { - "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" - } - }, - "device_operational_status": 2, - "device_type": "emu-client", - "name": "128.32.20.5" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "200", - "type": "copper", - "uuid": "200" - }, - { - "name": "500", - "type": "copper", - "uuid": "500" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[200]", - "resource_value": { - "name": "200", - "type": "copper", - "uuid": "200" - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[500]", - "resource_value": { - "name": "500", - "type": "copper", - "uuid": "500" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "endpoint_uuid": { - "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "500" - }, - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "endpoint_uuid": { - "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "200" - } - ], - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "device_operational_status": 2, - "device_type": "emu-packet-router", - "name": "128.32.20.1" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "eth1", - "type": "copper", - "uuid": "eth1" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[eth1]", - "resource_value": { - "name": "eth1", - "type": "copper", - "uuid": "eth1" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" - } - }, - "endpoint_uuid": { - "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "copper", - "kpi_sample_types": [], - "name": "eth1" - } - ], - "device_id": { - "device_uuid": { - "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" - } - }, - "device_operational_status": 2, - "device_type": "emu-client", - "name": "128.32.10.5" - }, - { - "components": [], - "controller_id": {}, - "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": [ - { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - } - ] - } - } - }, - { - "action": 1, - "custom": { - "resource_key": "/endpoints/endpoint[mgmt]", - "resource_value": { - "name": "mgmt", - "type": "mgmt", - "uuid": "mgmt" - } - } - } - ] - }, - "device_drivers": [ - 0 - ], - "device_endpoints": [ - { - "endpoint_id": { - "device_id": { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - }, - "endpoint_uuid": { - "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - "endpoint_location": {}, - "endpoint_type": "mgmt", - "kpi_sample_types": [], - "name": "mgmt" - } - ], - "device_id": { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - }, - "device_operational_status": 2, - "device_type": "emu-open-line-system", - "name": "nce-t" - } - ], - "dummy_mode": true, - "links": [ - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "70cbb732-8149-59ee-939b-011828e4292b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "0b3d5943-c2bf-595f-a805-dc29c2be2f52" - } - }, - "name": "10.0.10.1-200" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "1490e70f-472c-5e4c-8280-21c48ed03477" - } - }, - "name": "10.0.40.1-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "endpoint_uuid": { - "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "c6435612-3aca-590f-89ba-e606f54df474" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "18ba8eb2-342b-5a73-aeae-7288ea9bb28b" - } - }, - "name": "128.32.10.1-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "endpoint_uuid": { - "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" - } - }, - "endpoint_uuid": { - "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "1901b0dc-1b5e-5fdf-b9ac-9168787464c1" - } - }, - "name": "128.32.10.1-200" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "70cbb732-8149-59ee-939b-011828e4292b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "1afdae8b-a281-53aa-99c2-205afb8f4ee7" - } - }, - "name": "128.32.33.5-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "356378dd-952b-5032-912d-37fc21284b4c" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "30ca0f8f-b150-57f2-ae5e-8a6844944783" - } - }, - "name": "10.0.20.1-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "34c9c6c3-0dcf-54e5-ba67-da33eb2d3c1a" - } - }, - "name": "10.0.20.1-501" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "356378dd-952b-5032-912d-37fc21284b4c" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "35801e61-45f3-564e-ad5c-09baf4aae906" - } - }, - "name": "10.0.30.1-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - "endpoint_uuid": { - "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "36643dba-e8fa-5fb7-952d-dff313db957b" - } - }, - "name": "172.10.33.5-500" - }, - { - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - }, - "endpoint_uuid": { - "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "ede34dea-6b51-5787-88d2-553fe548f540" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "36856920-3387-5384-b1b1-dbc9e54da226" - } - }, - "name": "nce-t/mgmt==10.0.40.1/mgmt" - }, - { - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - }, - "endpoint_uuid": { - "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "b72983bd-57d8-5cf8-8ec7-da9084382d7a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "46ba12f9-dd17-5f2a-9558-e4611515a6b9" - } - }, - "name": "nce-t/mgmt==10.0.30.1/mgmt" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "4dfe28dd-ac28-53d5-b330-1707e350d772" - } - }, - "name": "10.0.30.1-501" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "endpoint_uuid": { - "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "644ab377-572c-53a4-8ab5-f5cf45591d88" - } - }, - "name": "128.32.20.1-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "c6435612-3aca-590f-89ba-e606f54df474" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "endpoint_uuid": { - "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "661ac531-4309-58cc-b70e-2a79492c2488" - } - }, - "name": "128.32.33.5-200" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - "endpoint_uuid": { - "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "endpoint_uuid": { - "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "6a236e01-853c-51d0-8915-2d09b45923b0" - } - }, - "name": "128.32.33.5-201" - }, - { - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - }, - "endpoint_uuid": { - "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "da826790-a4b0-5317-b30b-e1370918a644" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "6c802ae7-59d1-55e7-9498-146c465bcab5" - } - }, - "name": "nce-t/mgmt==10.0.20.1/mgmt" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "endpoint_uuid": { - "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" - } - }, - "endpoint_uuid": { - "uuid": "0701f406-633f-53e7-a44d-c93384745df8" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "6fa77ad9-e4d7-5830-bf84-ab206eff613a" - } - }, - "name": "128.32.20.1-200" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - "endpoint_uuid": { - "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "808b54e8-3d5a-5e03-a42e-d6c2a57cf6f3" - } - }, - "name": "10.0.30.1-200" - }, - { - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - }, - "endpoint_uuid": { - "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "59e1e30f-ea65-5e04-8a91-760a648a02c6" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "85a18715-3ce0-57f9-8025-5634fe622a06" - } - }, - "name": "nce-t/mgmt==10.0.10.1/mgmt" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - "endpoint_uuid": { - "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "8e8d1a2b-beae-5624-8826-9235bd73a3a8" - } - }, - "name": "10.0.40.1-501" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - "endpoint_uuid": { - "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "e9c5b57e-de50-509c-9f5a-0107ff233703" - } - }, - "name": "10.0.10.1-500" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" - } - }, - "endpoint_uuid": { - "uuid": "0701f406-633f-53e7-a44d-c93384745df8" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - "endpoint_uuid": { - "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "effca6e0-acf3-5c02-ba9a-d82c17a3f006" - } - }, - "name": "128.32.20.5-eth1" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - "endpoint_uuid": { - "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - "endpoint_uuid": { - "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "f45b4432-4ae2-5719-b4e8-a5e8baa1ccd2" - } - }, - "name": "10.0.10.1-501" - }, - { - "attributes": { - "total_capacity_gbps": 10.0, - "used_capacity_gbps": 0.0 - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" - } - }, - "endpoint_uuid": { - "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - "endpoint_uuid": { - "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" - }, - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ], - "link_id": { - "link_uuid": { - "uuid": "fd005f34-39f5-550e-b2c0-c6e6f8c16325" - } - }, - "name": "128.32.10.5-eth1" - } - ], - "topologies": [ - { - "device_ids": [ - { - "device_uuid": { - "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" - } - }, - { - "device_uuid": { - "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" - } - }, - { - "device_uuid": { - "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" - } - }, - { - "device_uuid": { - "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" - } - }, - { - "device_uuid": { - "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" - } - }, - { - "device_uuid": { - "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" - } - }, - { - "device_uuid": { - "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" - } - }, - { - "device_uuid": { - "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" - } - }, - { - "device_uuid": { - "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" - } - }, - { - "device_uuid": { - "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" - } - }, - { - "device_uuid": { - "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" - } - } - ], - "link_ids": [ - { - "link_uuid": { - "uuid": "0b3d5943-c2bf-595f-a805-dc29c2be2f52" - } - }, - { - "link_uuid": { - "uuid": "1490e70f-472c-5e4c-8280-21c48ed03477" - } - }, - { - "link_uuid": { - "uuid": "18ba8eb2-342b-5a73-aeae-7288ea9bb28b" - } - }, - { - "link_uuid": { - "uuid": "1901b0dc-1b5e-5fdf-b9ac-9168787464c1" - } - }, - { - "link_uuid": { - "uuid": "1afdae8b-a281-53aa-99c2-205afb8f4ee7" - } - }, - { - "link_uuid": { - "uuid": "30ca0f8f-b150-57f2-ae5e-8a6844944783" - } - }, - { - "link_uuid": { - "uuid": "34c9c6c3-0dcf-54e5-ba67-da33eb2d3c1a" - } - }, - { - "link_uuid": { - "uuid": "35801e61-45f3-564e-ad5c-09baf4aae906" - } - }, - { - "link_uuid": { - "uuid": "36643dba-e8fa-5fb7-952d-dff313db957b" - } - }, - { - "link_uuid": { - "uuid": "36856920-3387-5384-b1b1-dbc9e54da226" - } - }, - { - "link_uuid": { - "uuid": "46ba12f9-dd17-5f2a-9558-e4611515a6b9" - } - }, - { - "link_uuid": { - "uuid": "4dfe28dd-ac28-53d5-b330-1707e350d772" - } - }, - { - "link_uuid": { - "uuid": "644ab377-572c-53a4-8ab5-f5cf45591d88" - } - }, - { - "link_uuid": { - "uuid": "661ac531-4309-58cc-b70e-2a79492c2488" - } - }, - { - "link_uuid": { - "uuid": "6a236e01-853c-51d0-8915-2d09b45923b0" - } - }, - { - "link_uuid": { - "uuid": "6c802ae7-59d1-55e7-9498-146c465bcab5" - } - }, - { - "link_uuid": { - "uuid": "6fa77ad9-e4d7-5830-bf84-ab206eff613a" - } - }, - { - "link_uuid": { - "uuid": "808b54e8-3d5a-5e03-a42e-d6c2a57cf6f3" - } - }, - { - "link_uuid": { - "uuid": "85a18715-3ce0-57f9-8025-5634fe622a06" - } - }, - { - "link_uuid": { - "uuid": "8e8d1a2b-beae-5624-8826-9235bd73a3a8" - } - }, - { - "link_uuid": { - "uuid": "e9c5b57e-de50-509c-9f5a-0107ff233703" - } - }, - { - "link_uuid": { - "uuid": "effca6e0-acf3-5c02-ba9a-d82c17a3f006" - } - }, - { - "link_uuid": { - "uuid": "f45b4432-4ae2-5719-b4e8-a5e8baa1ccd2" - } - }, - { - "link_uuid": { - "uuid": "fd005f34-39f5-550e-b2c0-c6e6f8c16325" - } - } - ], - "name": "admin", - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } - } - ] -} \ No newline at end of file diff --git a/src/ztp_server/tests/data/topology-real.json b/src/ztp_server/tests/data/topology-real.json deleted file mode 100755 index bb158d920..000000000 --- a/src/ztp_server/tests/data/topology-real.json +++ /dev/null @@ -1,259 +0,0 @@ -{ - "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": "nce-t"}}, "name": "nce-t", "device_type": "emu-open-line-system", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "mgmt", "name": "mgmt", "type": "mgmt"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "name": "10.0.10.1", "device_type": "emu-packet-router", - "controller_id": {"device_uuid": {"uuid": "nce-t"}}, - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, - {"uuid": "200", "name": "200", "type": "copper" }, - {"uuid": "500", "name": "500", "type": "optical"}, - {"uuid": "501", "name": "501", "type": "optical"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "name": "10.0.20.1", "device_type": "emu-packet-router", - "controller_id": {"device_uuid": {"uuid": "nce-t"}}, - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, - {"uuid": "500", "name": "500", "type": "optical"}, - {"uuid": "501", "name": "501", "type": "optical"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "name": "10.0.30.1", "device_type": "emu-packet-router", - "controller_id": {"device_uuid": {"uuid": "nce-t"}}, - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, - {"uuid": "200", "name": "200", "type": "copper" }, - {"uuid": "500", "name": "500", "type": "optical"}, - {"uuid": "501", "name": "501", "type": "optical"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "name": "10.0.40.1", "device_type": "emu-packet-router", - "controller_id": {"device_uuid": {"uuid": "nce-t"}}, - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, - {"uuid": "500", "name": "500", "type": "optical"}, - {"uuid": "501", "name": "501", "type": "optical"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "name": "128.32.10.5", "device_type": "emu-client", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "eth1", "name": "eth1", "type": "copper"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "name": "128.32.10.1", "device_type": "emu-packet-router", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "500", "name": "500", "type": "copper"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "name": "128.32.20.5", "device_type": "emu-client", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "eth1", "name": "eth1", "type": "copper"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "name": "128.32.20.1", "device_type": "emu-packet-router", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "500", "name": "500", "type": "copper"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "name": "128.32.33.5", "device_type": "emu-optical-transponder", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "201", "name": "201", "type": "copper"}, - {"uuid": "500", "name": "500", "type": "copper"} - ]}}} - ]}}, - - {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "name": "172.10.33.5", "device_type": "emu-datacenter", - "device_operational_status": 1, "device_drivers": [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": [ - {"uuid": "200", "name": "200", "type": "copper"}, - {"uuid": "201", "name": "201", "type": "copper"}, - {"uuid": "500", "name": "500", "type": "copper"} - ]}}} - ]}} - ], - - "links": [ - {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.10.1/mgmt"}}, "name": "nce-t/mgmt==10.0.10.1/mgmt", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.20.1/mgmt"}}, "name": "nce-t/mgmt==10.0.20.1/mgmt", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.30.1/mgmt"}}, "name": "nce-t/mgmt==10.0.30.1/mgmt", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.40.1/mgmt"}}, "name": "nce-t/mgmt==10.0.40.1/mgmt", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "10.0.10.1-501"}}, "name": "10.0.10.1-501", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "501"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "501"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "10.0.20.1-501"}}, "name": "10.0.20.1-501", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "501"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "501"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "10.0.10.1-500"}}, "name": "10.0.10.1-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "10.0.40.1-500"}}, "name": "10.0.40.1-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "10.0.20.1-500"}}, "name": "10.0.20.1-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "10.0.30.1-500"}}, "name": "10.0.30.1-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "10.0.40.1-501"}}, "name": "10.0.40.1-501", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "501"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "501"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "10.0.30.1-501"}}, "name": "10.0.30.1-501", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "501"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "501"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "128.32.10.5-eth1"}}, "name": "128.32.10.5-eth1", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "200" }} - ]}, - {"link_id": {"link_uuid": {"uuid": "128.32.10.1-200"}}, "name": "128.32.10.1-200", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "200" }}, - {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "endpoint_uuid": {"uuid": "eth1"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "128.32.10.1-500"}}, "name": "128.32.10.1-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "200"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "128.32.33.5-200"}}, "name": "128.32.33.5-200", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "200"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "128.32.20.5-eth1"}}, "name": "128.32.20.5-eth1", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "200" }} - ]}, - {"link_id": {"link_uuid": {"uuid": "128.32.20.1-200"}}, "name": "128.32.20.1-200", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "200" }}, - {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "endpoint_uuid": {"uuid": "eth1"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "128.32.20.1-500"}}, "name": "128.32.20.1-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "201"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "128.32.33.5-201"}}, "name": "128.32.33.5-201", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "201"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "128.32.33.5-500"}}, "name": "128.32.33.5-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "200"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "10.0.10.1-200"}}, "name": "10.0.10.1-200", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "200"}}, - {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "500"}} - ]}, - - {"link_id": {"link_uuid": {"uuid": "172.10.33.5-500"}}, "name": "172.10.33.5-500", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "endpoint_uuid": {"uuid": "500"}}, - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "200"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "10.0.30.1-200"}}, "name": "10.0.30.1-200", - "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "200"}}, - {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "endpoint_uuid": {"uuid": "500"}} - ]} - ] -} diff --git a/src/ztp_server/tests/ietf_acl_client.py b/src/ztp_server/tests/ietf_acl_client.py deleted file mode 100755 index 20887f1a8..000000000 --- a/src/ztp_server/tests/ietf_acl_client.py +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 requests, time -from typing import Optional -from requests.auth import HTTPBasicAuth - -BASE_URL = '{:s}://{:s}:{:d}/restconf/data' -ACLS_URL = '{:s}/device={:s}/ietf-access-control-list:acls' -ACL_URL = '{:s}/device={:s}/ietf-access-control-list:acl={:s}' - -CSG1_DEVICE_UUID = '118295c8-318a-52ec-a394-529fc4b70f2f' # router: 128.32.10.1 -ACL_NAME = 'sample-ipv4-acl' -ACL_RULE = {"ietf-access-control-list:acls": { - "acl": [{ - "name": "sample-ipv4-acl", "type": "ipv4-acl-type", - "aces": {"ace": [{ - "name": "rule1", - "matches": { - "ipv4": { - "source-ipv4-network": "128.32.10.6/24", - "destination-ipv4-network": "172.10.33.0/24", - "dscp": 18 - }, - "tcp": { - "source-port": {"operator": "eq", "port": 1444}, - "destination-port": {"operator": "eq", "port": 1333}, - "flags": "syn" - } - }, - "actions": {"forwarding": "drop"} - }]} - }], - "attachment-points": {"interface": [{ - "interface-id": "200", - "ingress": {"acl-sets": {"acl-set": [{"name": "sample-ipv4-acl"}]}} - }] -}}} - -class TfsIetfAclClient: - def __init__( - self, host : str = 'localhost', port : int = 80, schema : str = 'http', - username : Optional[str] = 'admin', password : Optional[str] = 'admin', - timeout : int = 10, allow_redirects : bool = True, verify : bool = False - ) -> None: - self._base_url = BASE_URL.format(schema, host, port) - auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None - self._settings = dict(auth=auth, timeout=timeout, allow_redirects=allow_redirects, verify=verify) - - def post(self, device_uuid : str, ietf_acl_data : dict) -> str: - request_url = ACLS_URL.format(self._base_url, device_uuid) - reply = requests.post(request_url, json=ietf_acl_data, **(self._settings)) - return reply.text - - def get(self, device_uuid : str, acl_name : str) -> str: - request_url = ACL_URL.format(self._base_url, device_uuid, acl_name) - reply = requests.get(request_url, **(self._settings)) - return reply.text - - def delete(self, device_uuid : str, acl_name : str) -> str: - request_url = ACL_URL.format(self._base_url, device_uuid, acl_name) - reply = requests.delete(request_url, **(self._settings)) - return reply.text - -def main(): - client = TfsIetfAclClient() - print(f'ACL rule: {ACL_RULE}') - post_response = client.post(CSG1_DEVICE_UUID, ACL_RULE) - print(f'post response: {post_response}') - time.sleep(.5) - get_response = client.get(CSG1_DEVICE_UUID, ACL_NAME) - print(f'get response: {get_response}') - time.sleep(.5) - delete_response = client.delete(CSG1_DEVICE_UUID, ACL_NAME) - print(f'delete response: {delete_response}') - -if __name__ == '__main__': - main() diff --git a/src/ztp_server/tests/test_etsi_bwm.py b/src/ztp_server/tests/test_etsi_bwm.py deleted file mode 100755 index 9400de00f..000000000 --- a/src/ztp_server/tests/test_etsi_bwm.py +++ /dev/null @@ -1,240 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 deepdiff, json, logging, pytest -from typing import Dict -from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME -from common.proto.context_pb2 import ContextId, TopologyId -from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario -from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Topology import json_topology_id -from context.client.ContextClient import ContextClient -from nbi.service.rest_server import RestServer -from .PrepareTestScenario import ( # pylint: disable=unused-import - # be careful, order of symbols is important here! - do_rest_delete_request, do_rest_get_request, do_rest_patch_request, do_rest_post_request, do_rest_put_request, - mock_service, nbi_service_rest, context_client -) - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) -ADMIN_TOPOLOGY_ID = TopologyId(**json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id=JSON_ADMIN_CONTEXT_ID)) -BASE_URL = '/restconf/bwm/v1' - -@pytest.fixture(scope='session') -def storage() -> Dict: - yield dict() - -#def compare_dicts(dict1, dict2): -# # Function to recursively sort dictionaries -# def recursively_sort(d): -# if isinstance(d, dict): -# return {k: recursively_sort(v) for k, v in sorted(d.items())} -# if isinstance(d, list): -# return [recursively_sort(item) for item in d] -# return d -# -# # Sort dictionaries to ignore the order of fields -# sorted_dict1 = recursively_sort(dict1) -# sorted_dict2 = recursively_sort(dict2) -# -# if sorted_dict1 != sorted_dict2: -# LOGGER.error(sorted_dict1) -# LOGGER.error(sorted_dict2) -# -# return sorted_dict1 != sorted_dict2 - -def check_timestamps(bwm_service): - assert 'timeStamp' in bwm_service - assert 'seconds' in bwm_service['timeStamp'] - assert 'nanoseconds' in bwm_service['timeStamp'] - -def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - validate_empty_scenario(context_client) - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - results = descriptor_loader.process() - check_descriptor_load_results(results, descriptor_loader) - descriptor_loader.validate() - - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - -def test_get_allocations_empty(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - URL = BASE_URL + '/bw_allocations' - retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) - assert len(retrieved_data) == 0 - -def test_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - URL = BASE_URL + '/bw_allocations' - data = { - "appInsId" : "service_uuid_01", - "allocationDirection" : "00", - "fixedAllocation" : "123000.0", - "fixedBWPriority" : "SEE_DESCRIPTION", - "requestType" : 0, - "sessionFilter" : [{ - "sourceIp" : "192.168.1.2", - "sourcePort" : ["a"], - "protocol" : "string", - "dstAddress" : "192.168.3.2", - "dstPort" : ["b"], - }] - } - retrieved_data = do_rest_post_request(URL, body=data, logger=LOGGER, expected_status_codes={200}) - LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) - storage['service_uuid_01'] = 'service_uuid_01' - - -def test_get_allocations(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - assert 'service_uuid_01' in storage - URL = BASE_URL + '/bw_allocations' - retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) - assert len(retrieved_data) == 1 - good_result = [ - { - "appInsId" : "service_uuid_01", - "fixedAllocation" : "123000.0", - "allocationDirection" : "00", - "fixedBWPriority" : "SEE_DESCRIPTION", - "requestType" : "0", - "sessionFilter" : [{ - "sourceIp" : "192.168.1.2", - "sourcePort" : ["a"], - "protocol" : "string", - "dstAddress" : "192.168.3.2", - "dstPort" : ["b"], - }], - } - ] - check_timestamps(retrieved_data[0]) - del retrieved_data[0]['timeStamp'] - diff_data = deepdiff.DeepDiff(good_result, retrieved_data) - LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) - assert len(diff_data) == 0 - - -def test_get_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - assert 'service_uuid_01' in storage - URL = BASE_URL + '/bw_allocations/service_uuid_01' - retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) - good_result = { - "appInsId" : "service_uuid_01", - "fixedAllocation" : "123000.0", - "allocationDirection": "00", - "fixedBWPriority" : "SEE_DESCRIPTION", - "requestType" : "0", - "sessionFilter" : [{ - "sourceIp" : "192.168.1.2", - "sourcePort" : ["a"], - "protocol" : "string", - "dstAddress" : "192.168.3.2", - "dstPort" : ["b"], - }] - } - check_timestamps(retrieved_data) - del retrieved_data['timeStamp'] - diff_data = deepdiff.DeepDiff(good_result, retrieved_data) - LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) - assert len(diff_data) == 0 - - -def test_put_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - assert 'service_uuid_01' in storage - URL = BASE_URL + '/bw_allocations/service_uuid_01' - changed_allocation = { - "appInsId" : "service_uuid_01", - "fixedAllocation" : "200.0", - "allocationDirection": "00", - "fixedBWPriority" : "NOPRIORITY", - "requestType" : "0", - "sessionFilter" : [{ - "sourceIp" : "192.168.1.2", - "sourcePort" : ["a"], - "protocol" : "string", - "dstAddress" : "192.168.3.2", - "dstPort" : ["b"], - }] - } - retrieved_data = do_rest_put_request(URL, body=json.dumps(changed_allocation), logger=LOGGER, expected_status_codes={200}) - check_timestamps(retrieved_data) - del retrieved_data['timeStamp'] - diff_data = deepdiff.DeepDiff(changed_allocation, retrieved_data) - LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) - assert len(diff_data) == 0 - - -def test_patch_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - assert 'service_uuid_01' in storage - URL = BASE_URL + '/bw_allocations/service_uuid_01' - difference = { - "fixedBWPriority":"FULLPRIORITY", - } - changed_allocation = { - "appInsId" : "service_uuid_01", - "fixedAllocation" : "200.0", - "allocationDirection": "00", - "fixedBWPriority" : "FULLPRIORITY", - "requestType" : "0", - "sessionFilter" : [{ - "sourceIp" : "192.168.1.2", - "sourcePort" : ["a"], - "protocol" : "string", - "dstAddress" : "192.168.3.2", - "dstPort" : ["b"], - }] - } - retrieved_data = do_rest_patch_request(URL, body=difference, logger=LOGGER, expected_status_codes={200}) - check_timestamps(retrieved_data) - del retrieved_data['timeStamp'] - diff_data = deepdiff.DeepDiff(changed_allocation, retrieved_data) - LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) - assert len(diff_data) == 0 - - -def test_delete_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - assert 'service_uuid_01' in storage - URL = BASE_URL + '/bw_allocations/service_uuid_01' - do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={200}) - - -def test_get_allocations_empty_final(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument - URL = BASE_URL + '/bw_allocations' - retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) - assert len(retrieved_data) == 0 - - -def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - - # Load descriptors and validate the base scenario - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - descriptor_loader.validate() - descriptor_loader.unload() - validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_ietf_l2vpn.py b/src/ztp_server/tests/test_ietf_l2vpn.py deleted file mode 100755 index 7bed8ff5d..000000000 --- a/src/ztp_server/tests/test_ietf_l2vpn.py +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId -from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario -from common.tools.object_factory.Context import json_context_id -from context.client.ContextClient import ContextClient -from tests.tools.mock_osm.MockOSM import MockOSM -from .Constants import SERVICE_CONNECTION_POINTS_1, SERVICE_CONNECTION_POINTS_2, SERVICE_TYPE -from .PrepareTestScenario import ( # pylint: disable=unused-import - # be careful, order of symbols is important here! - mock_service, nbi_service_rest, osm_wim, context_client -) - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -DESCRIPTOR_FILE = 'nbi/tests/data/topology-7router-emu-dummy.json' - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) - -def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - validate_empty_scenario(context_client) - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - results = descriptor_loader.process() - check_descriptor_load_results(results, descriptor_loader) - descriptor_loader.validate() - - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - -def test_create_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name - osm_wim.create_connectivity_service(SERVICE_TYPE, SERVICE_CONNECTION_POINTS_1) - -def test_get_service_status(osm_wim : MockOSM): # pylint: disable=redefined-outer-name - service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service - osm_wim.get_connectivity_service_status(service_uuid) - -def test_edit_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name - service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service - osm_wim.edit_connectivity_service(service_uuid, SERVICE_CONNECTION_POINTS_2) - -def test_delete_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name - service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service - osm_wim.delete_connectivity_service(service_uuid) - -def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - - # Load descriptors and validate the base scenario - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - descriptor_loader.validate() - descriptor_loader.unload() - validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_ietf_l3vpn.py b/src/ztp_server/tests/test_ietf_l3vpn.py deleted file mode 100755 index 0f214661f..000000000 --- a/src/ztp_server/tests/test_ietf_l3vpn.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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, pytest -from typing import Dict -from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId -from common.tools.descriptor.Loader import ( - DescriptorLoader, check_descriptor_load_results, validate_empty_scenario -) -from common.tools.object_factory.Context import json_context_id -from context.client.ContextClient import ContextClient -from nbi.service.rest_server.RestServer import RestServer -from .PrepareTestScenario import ( # pylint: disable=unused-import - # be careful, order of symbols is important here! - do_rest_delete_request, do_rest_get_request, do_rest_post_request, - mock_service, nbi_service_rest, osm_wim, context_client -) - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' -SVC1_DATA_FILE = 'nbi/tests/data/ietf_l3vpn_req_svc1.json' -SVC2_DATA_FILE = 'nbi/tests/data/ietf_l3vpn_req_svc2.json' - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) - -@pytest.fixture(scope='session') -def storage() -> Dict: - yield dict() - -def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - validate_empty_scenario(context_client) - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - results = descriptor_loader.process() - check_descriptor_load_results(results, descriptor_loader) - descriptor_loader.validate() - - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - -# pylint: disable=redefined-outer-name, unused-argument -def test_create_svc1(nbi_service_rest : RestServer, storage : Dict): - with open(SVC1_DATA_FILE, 'r', encoding='UTF-8') as f: - svc1_data = json.load(f) - URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' - do_rest_post_request(URL, body=svc1_data, logger=LOGGER, expected_status_codes={201}) - storage['svc1-uuid'] = svc1_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] - -# pylint: disable=redefined-outer-name, unused-argument -def test_create_svc2(nbi_service_rest : RestServer, storage : Dict): - with open(SVC2_DATA_FILE, 'r', encoding='UTF-8') as f: - svc2_data = json.load(f) - URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' - do_rest_post_request(URL, body=svc2_data, logger=LOGGER, expected_status_codes={201}) - storage['svc2-uuid'] = svc2_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] - -# pylint: disable=redefined-outer-name, unused-argument -def test_get_state_svc1(nbi_service_rest : RestServer, storage : Dict): - assert 'svc1-uuid' in storage - service_uuid = storage['svc1-uuid'] - URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) - do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - -# pylint: disable=redefined-outer-name, unused-argument -def test_get_state_svc2(nbi_service_rest : RestServer, storage : Dict): - assert 'svc2-uuid' in storage - service_uuid = storage['svc2-uuid'] - URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) - do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - -# pylint: disable=redefined-outer-name, unused-argument -def test_delete_svc1(nbi_service_rest : RestServer, storage : Dict): - assert 'svc1-uuid' in storage - service_uuid = storage['svc1-uuid'] - URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) - do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={204}) - -# pylint: disable=redefined-outer-name, unused-argument -def test_delete_svc2(nbi_service_rest : RestServer, storage : Dict): - assert 'svc2-uuid' in storage - service_uuid = storage['svc2-uuid'] - URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) - do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={204}) - -def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - - # Load descriptors and validate the base scenario - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - descriptor_loader.validate() - descriptor_loader.unload() - validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_ietf_network.py b/src/ztp_server/tests/test_ietf_network.py deleted file mode 100755 index 68337d0a8..000000000 --- a/src/ztp_server/tests/test_ietf_network.py +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 deepdiff, json, logging, operator, os -from typing import Dict -from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId -from common.tools.descriptor.Loader import ( - DescriptorLoader, check_descriptor_load_results, validate_empty_scenario -) -from common.tools.object_factory.Context import json_context_id -from context.client.ContextClient import ContextClient -from nbi.service.rest_server import RestServer - -# Explicitly state NBI to use PyangBind Renderer for this test -os.environ['IETF_NETWORK_RENDERER'] = 'PYANGBIND' - -from .PrepareTestScenario import ( # pylint: disable=unused-import - # be careful, order of symbols is important here! - do_rest_get_request, mock_service, nbi_service_rest, osm_wim, context_client -) - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' -TARGET_DATA_FILE = 'nbi/tests/data/test-ietf-network.json' - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) - -def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - validate_empty_scenario(context_client) - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - results = descriptor_loader.process() - check_descriptor_load_results(results, descriptor_loader) - descriptor_loader.validate() - - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - -def sort_data(data : Dict) -> None: - if 'ietf-network:networks' not in data: return - if 'network' not in data['ietf-network:networks']: return - data['ietf-network:networks']['network'] = sorted( - data['ietf-network:networks']['network'], - key=operator.itemgetter('network-id') - ) - for network in data['ietf-network:networks']['network']: - if 'node' in network: - network['node'] = sorted( - network['node'], - key=operator.itemgetter('node-id') - ) - - for node in network['node']: - if 'ietf-network-topology:termination-point' in node: - node['ietf-network-topology:termination-point'] = sorted( - node['ietf-network-topology:termination-point'], - key=operator.itemgetter('tp-id') - ) - - if 'ietf-network-topology:link' in network: - network['ietf-network-topology:link'] = sorted( - network['ietf-network-topology:link'], - key=operator.itemgetter('link-id') - ) - -def test_rest_get_networks(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - with open(TARGET_DATA_FILE, 'r', encoding='UTF-8') as f: - target_data = json.load(f) - URL = '/restconf/data/ietf-network:networks' - retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) - sort_data(retrieved_data) - sort_data(target_data) - diff_data = deepdiff.DeepDiff(target_data, retrieved_data) - LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) - assert len(diff_data) == 0 - -def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 0 - assert len(response.slice_ids ) == 0 - - # Load descriptors and validate the base scenario - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - descriptor_loader.validate() - descriptor_loader.unload() - validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_slice.py b/src/ztp_server/tests/test_slice.py deleted file mode 100755 index fe112e6fc..000000000 --- a/src/ztp_server/tests/test_slice.py +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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, random, uuid -from typing import Dict, Tuple -from nbi.service.rest_server.nbi_plugins.ietf_network_slice.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) -> Tuple[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__": - request = generate_request(123) - print(json.dumps(request[0], sort_keys=True, indent=4)) diff --git a/src/ztp_server/tests/test_tfs_api.py b/src/ztp_server/tests/test_tfs_api.py deleted file mode 100755 index eab2f8d9b..000000000 --- a/src/ztp_server/tests/test_tfs_api.py +++ /dev/null @@ -1,217 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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, urllib -from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME -from common.proto.context_pb2 import ContextId -from common.tools.descriptor.Loader import ( - DescriptorLoader, check_descriptor_load_results, validate_empty_scenario -) -from common.tools.object_factory.Context import json_context_id -from common.type_checkers.Assertions import ( - validate_connection, validate_connection_ids, validate_connections, - validate_context, validate_context_ids, validate_contexts, - validate_device, validate_device_ids, validate_devices, - validate_link, validate_link_ids, validate_links, - validate_service, validate_service_ids, validate_services, - validate_slice, validate_slice_ids, validate_slices, - validate_topologies, validate_topology, validate_topology_ids -) -from context.client.ContextClient import ContextClient -from nbi.service.rest_server.RestServer import RestServer -from .PrepareTestScenario import ( # pylint: disable=unused-import - # be careful, order of symbols is important here! - mock_service, nbi_service_rest, context_client, - do_rest_get_request -) - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -DESCRIPTOR_FILE = 'nbi/tests/data/tfs_api_dummy.json' - -JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) -ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) - - -# ----- Prepare Environment -------------------------------------------------------------------------------------------- - -def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - validate_empty_scenario(context_client) - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - results = descriptor_loader.process() - check_descriptor_load_results(results, descriptor_loader) - descriptor_loader.validate() - - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 3 - assert len(response.slice_ids ) == 1 - - -# ----- Context -------------------------------------------------------------------------------------------------------- - -def test_rest_get_context_ids(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument - reply = do_rest_get_request('/tfs-api/context_ids') - validate_context_ids(reply) - -def test_rest_get_contexts(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - reply = do_rest_get_request('/tfs-api/contexts') - validate_contexts(reply) - -def test_rest_get_context(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}'.format(context_uuid)) - validate_context(reply) - - -# ----- Topology ------------------------------------------------------------------------------------------------------- - -def test_rest_get_topology_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/topology_ids'.format(context_uuid)) - validate_topology_ids(reply) - -def test_rest_get_topologies(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/topologies'.format(context_uuid)) - validate_topologies(reply) - -def test_rest_get_topology(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - topology_uuid = urllib.parse.quote(DEFAULT_TOPOLOGY_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/topology/{:s}'.format(context_uuid, topology_uuid)) - validate_topology(reply, num_devices=3, num_links=6) - - -# ----- Device --------------------------------------------------------------------------------------------------------- - -def test_rest_get_device_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - reply = do_rest_get_request('/tfs-api/device_ids') - validate_device_ids(reply) - -def test_rest_get_devices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - reply = do_rest_get_request('/tfs-api/devices') - validate_devices(reply) - -def test_rest_get_device(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - device_uuid = urllib.parse.quote('R1', safe='') - reply = do_rest_get_request('/tfs-api/device/{:s}'.format(device_uuid)) - validate_device(reply) - - -# ----- Link ----------------------------------------------------------------------------------------------------------- - -def test_rest_get_link_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - reply = do_rest_get_request('/tfs-api/link_ids') - validate_link_ids(reply) - -def test_rest_get_links(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - reply = do_rest_get_request('/tfs-api/links') - validate_links(reply) - -def test_rest_get_link(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - link_uuid = urllib.parse.quote('R1/502==R2/501', safe='') - reply = do_rest_get_request('/tfs-api/link/{:s}'.format(link_uuid)) - validate_link(reply) - - -# ----- Service -------------------------------------------------------------------------------------------------------- - -def test_rest_get_service_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/service_ids'.format(context_uuid)) - validate_service_ids(reply) - -def test_rest_get_services(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/services'.format(context_uuid)) - validate_services(reply) - -def test_rest_get_service(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') - reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}'.format(context_uuid, service_uuid)) - validate_service(reply) - - -# ----- Slice ---------------------------------------------------------------------------------------------------------- - -def test_rest_get_slice_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/slice_ids'.format(context_uuid)) - validate_slice_ids(reply) - -def test_rest_get_slices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_get_request('/tfs-api/context/{:s}/slices'.format(context_uuid)) - validate_slices(reply) - -def test_rest_get_slice(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - slice_uuid = urllib.parse.quote('SLC:R1-R2-R3', safe='') - reply = do_rest_get_request('/tfs-api/context/{:s}/slice/{:s}'.format(context_uuid, slice_uuid)) - validate_slice(reply) - - -# ----- Connection ----------------------------------------------------------------------------------------------------- - -def test_rest_get_connection_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') - reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connection_ids'.format(context_uuid, service_uuid)) - validate_connection_ids(reply) - -def test_rest_get_connections(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') - reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connections'.format(context_uuid, service_uuid)) - validate_connections(reply) - -def test_rest_get_connection(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - connection_uuid = urllib.parse.quote('CON:R1/200==R2/200:1', safe='') - reply = do_rest_get_request('/tfs-api/connection/{:s}'.format(connection_uuid)) - validate_connection(reply) - -# ----- Policy --------------------------------------------------------------------------------------------------------- - -#def test_rest_get_policyrule_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument -# reply = do_rest_get_request('/tfs-api/policyrule_ids') -# validate_policyrule_ids(reply) - -#def test_rest_get_policyrules(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument -# reply = do_rest_get_request('/tfs-api/policyrules') -# validate_policyrules(reply) - -#def test_rest_get_policyrule(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument -# policyrule_uuid_quoted = urllib.parse.quote(policyrule_uuid, safe='') -# reply = do_rest_get_request('/tfs-api/policyrule/{:s}'.format(policyrule_uuid_quoted)) -# validate_policyrule(reply) - - -# ----- Cleanup Environment -------------------------------------------------------------------------------------------- - -def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name - # Verify the scenario has no services/slices - response = context_client.GetContext(ADMIN_CONTEXT_ID) - assert len(response.topology_ids) == 1 - assert len(response.service_ids ) == 3 - assert len(response.slice_ids ) == 1 - - # Load descriptors and validate the base scenario - descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) - descriptor_loader.validate() - descriptor_loader.unload() - validate_empty_scenario(context_client) diff --git a/src/ztp_server/tests/test_yang_acl.py b/src/ztp_server/tests/test_yang_acl.py deleted file mode 100755 index 2f45c50bc..000000000 --- a/src/ztp_server/tests/test_yang_acl.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 copy, json, libyang, logging, os -from typing import Dict, List, Optional - -LOGGER = logging.getLogger(__name__) - -YANG_DIR = os.path.join(os.path.dirname(__file__), 'yang') -YANG_MODULES = [ - 'ietf-yang-types', - 'ietf-interfaces', - 'iana-if-type', - 'ietf-access-control-list', -] - -class YangValidator: - def __init__(self) -> None: - self._yang_context = libyang.Context(YANG_DIR) - for module_name in YANG_MODULES: - LOGGER.info('Loading module: {:s}'.format(str(module_name))) - yang_module = self._yang_context.load_module(module_name) - yang_module.feature_enable_all() - yang_module_prefix = yang_module.prefix() - LOGGER.info(' Prefix: {:s}'.format(str(yang_module_prefix))) - - def parse_to_dict(self, message : Dict, interface_names : List[str]) -> Dict: - interfaces = self._yang_context.create_data_path('/ietf-interfaces:interfaces') - for if_index,interface_name in enumerate(interface_names): - if_path = 'interface[name="{:s}"]'.format(str(interface_name)) - interface = interfaces.create_path(if_path) - interface.create_path('if-index', if_index + 1) - interface.create_path('type', 'iana-if-type:ethernetCsmacd') - interface.create_path('admin-status', 'up') - interface.create_path('oper-status', 'up') - statistics = interface.create_path('statistics') - statistics.create_path('discontinuity-time', '2024-07-11T10:00:00.000000Z') - - message = copy.deepcopy(message) - message['ietf-interfaces:interfaces'] = interfaces.print_dict()['interfaces'] - - dnode : Optional[libyang.DNode] = self._yang_context.parse_data_mem( - json.dumps(message), 'json', validate_present=True, strict=True - ) - if dnode is None: raise Exception('Unable to parse Message({:s})'.format(str(message))) - message = dnode.print_dict() - dnode.free() - interfaces.free() - return message - - def destroy(self) -> None: - self._yang_context.destroy() - self._yang_context = None - -def main() -> None: - import uuid # pylint: disable=import-outside-toplevel - logging.basicConfig(level=logging.DEBUG) - - interface_names = {'200', '500', str(uuid.uuid4()), str(uuid.uuid4())} - ACL_RULE = {"ietf-access-control-list:acls": { - "acl": [{ - "name": "sample-ipv4-acl", "type": "ipv4-acl-type", - "aces": {"ace": [{ - "name": "rule1", - "matches": { - "ipv4": { - "source-ipv4-network": "128.32.10.6/24", - "destination-ipv4-network": "172.10.33.0/24", - "dscp": 18 - }, - "tcp": { - "source-port": {"operator": "eq", "port": 1444}, - "destination-port": {"operator": "eq", "port": 1333}, - "flags": "syn" - } - }, - "actions": {"forwarding": "drop"} - }]} - }], - "attachment-points": {"interface": [{ - "interface-id": "200", - "ingress": {"acl-sets": {"acl-set": [{"name": "sample-ipv4-acl"}]}} - }] - }}} - - yang_validator = YangValidator() - request_data = yang_validator.parse_to_dict(ACL_RULE, list(interface_names)) - yang_validator.destroy() - - LOGGER.info('request_data = {:s}'.format(str(request_data))) - -if __name__ == '__main__': - main() -- GitLab From 755ec559558ce3f4aa7e993670a2eb17e1bbe648 Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Tue, 18 Mar 2025 12:27:26 +0000 Subject: [PATCH 368/463] Solve some minor Typo Delete unused files --- manifests/ztp_server.yaml | 3 +- proto/ztp_server.proto | 2 +- src/common/Constants.py | 2 +- src/ztp_server/.gitlab-ci.yml | 120 ------------------ .../data/provisioning_script_sonic.sh | 15 +++ src/ztp_server/data/ztp.json | 1 - src/ztp_server/requirements.in | 25 ---- .../service/ZtpServerServiceServicerImpl.py | 13 -- src/ztp_server/service/__main__.py | 6 +- .../tools/HttpStatusCodes.py | 2 +- .../Resources.py | 4 +- .../Tools.py | 4 +- .../__init__.py | 6 +- 13 files changed, 28 insertions(+), 175 deletions(-) delete mode 100755 src/ztp_server/.gitlab-ci.yml delete mode 100755 src/ztp_server/requirements.in rename src/ztp_server/service/rest_server/ztpServer_plugins/{tfs_api => ztp_provisioning_api}/Resources.py (94%) rename src/ztp_server/service/rest_server/ztpServer_plugins/{tfs_api => ztp_provisioning_api}/Tools.py (94%) rename src/ztp_server/service/rest_server/ztpServer_plugins/{tfs_api => ztp_provisioning_api}/__init__.py (89%) diff --git a/manifests/ztp_server.yaml b/manifests/ztp_server.yaml index 6ed469174..398aaa71e 100644 --- a/manifests/ztp_server.yaml +++ b/manifests/ztp_server.yaml @@ -74,5 +74,4 @@ spec: - name: metrics protocol: TCP port: 9192 - targetPort: ---- + targetPort: 9192 diff --git a/proto/ztp_server.proto b/proto/ztp_server.proto index 807751084..31e568d3a 100755 --- a/proto/ztp_server.proto +++ b/proto/ztp_server.proto @@ -19,7 +19,7 @@ package ztpServer; service ZtpServerService { rpc GetProvisioningScript (ProvisioningScriptName ) returns (ProvisioningScript ) {} - rpc GetZtpProvisioning (ZtpFileName ) returns (ZtpFile ) {} + rpc GetZtpProvisioning (ZtpFileName ) returns (ZtpFile ) {} } diff --git a/src/common/Constants.py b/src/common/Constants.py index 50b792c65..b95b6d01b 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -42,7 +42,7 @@ class ServiceNameEnum(Enum): SERVICE = 'service' SLICE = 'slice' ZTP = 'ztp' - ZTP_SERVER = 'ztp_server' + ZTP_SERVER = 'ztp-server' POLICY = 'policy' MONITORING = 'monitoring' DLT = 'dlt' diff --git a/src/ztp_server/.gitlab-ci.yml b/src/ztp_server/.gitlab-ci.yml deleted file mode 100755 index 71bf223ba..000000000 --- a/src/ztp_server/.gitlab-ci.yml +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Build, tag, and push the Docker image to the GitLab Docker registry -build nbi: - variables: - IMAGE_NAME: 'nbi' # name of the microservice - IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) - stage: build - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - docker buildx build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . - - docker tag "$IMAGE_NAME:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" - - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" - after_script: - - docker images --filter="dangling=true" --quiet | xargs -r docker rmi - rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' - - changes: - - src/common/**/*.py - - proto/*.proto - - src/$IMAGE_NAME/**/*.{py,in,yml} - - src/$IMAGE_NAME/Dockerfile - - src/$IMAGE_NAME/tests/*.py - - manifests/${IMAGE_NAME}service.yaml - - .gitlab-ci.yml - -# Apply unit test to the component -unit_test nbi: - variables: - IMAGE_NAME: 'nbi' # name of the microservice - IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) - stage: unit_test - needs: - - build nbi - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - - > - if docker network list | grep teraflowbridge; then - echo "teraflowbridge is already created"; - else - docker network create -d bridge teraflowbridge; - fi - - > - if docker container ls | grep $IMAGE_NAME; then - docker rm -f $IMAGE_NAME; - else - echo "$IMAGE_NAME image is not in the system"; - fi - script: - - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" - - docker run --name $IMAGE_NAME -d -p 9090:9090 -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - - sleep 5 - - docker ps -a - - docker logs $IMAGE_NAME - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" - coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' - after_script: - - docker rm -f $IMAGE_NAME - - docker network rm teraflowbridge - rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' - - changes: - - src/common/**/*.py - - proto/*.proto - - src/$IMAGE_NAME/**/*.{py,in,yml} - - src/$IMAGE_NAME/Dockerfile - - src/$IMAGE_NAME/tests/*.py - - src/$IMAGE_NAME/tests/Dockerfile - - manifests/${IMAGE_NAME}service.yaml - - .gitlab-ci.yml - artifacts: - when: always - reports: - junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report_*.xml - -## Deployment of the service in Kubernetes Cluster -#deploy nbi: -# variables: -# IMAGE_NAME: 'nbi' # name of the microservice -# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) -# stage: deploy -# needs: -# - unit test nbi -# # - integ_test execute -# script: -# - 'sed -i "s/$IMAGE_NAME:.*/$IMAGE_NAME:$IMAGE_TAG/" manifests/${IMAGE_NAME}service.yaml' -# - kubectl version -# - kubectl get all -# - kubectl apply -f "manifests/${IMAGE_NAME}service.yaml" -# - kubectl get all -# # environment: -# # name: test -# # url: https://example.com -# # kubernetes: -# # namespace: test -# rules: -# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' -# when: manual -# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' -# when: manual diff --git a/src/ztp_server/data/provisioning_script_sonic.sh b/src/ztp_server/data/provisioning_script_sonic.sh index c4dd20438..24b1eb8a6 100644 --- a/src/ztp_server/data/provisioning_script_sonic.sh +++ b/src/ztp_server/data/provisioning_script_sonic.sh @@ -1,5 +1,20 @@ #!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License + + PRODUCT_NAME=$(show version | grep 'Platform' | awk '{print $2}') SERIAL_NUMBER=$(show version | grep 'Serial Number' | awk '{print $3}') BASE_MAC_ADDRESS=$(show platform syseeprom | grep 'Base MAC Address' | awk '{print $6}') diff --git a/src/ztp_server/data/ztp.json b/src/ztp_server/data/ztp.json index 6e606a5e8..4a4cdc3cf 100644 --- a/src/ztp_server/data/ztp.json +++ b/src/ztp_server/data/ztp.json @@ -8,4 +8,3 @@ } } } - \ No newline at end of file diff --git a/src/ztp_server/requirements.in b/src/ztp_server/requirements.in deleted file mode 100755 index ba715494d..000000000 --- a/src/ztp_server/requirements.in +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -deepdiff==6.7.* -deepmerge==1.1.* -Flask==2.1.3 -Flask-HTTPAuth==4.5.0 -Flask-RESTful==0.3.9 -jsonschema==4.4.0 -netaddr==0.9.0 -pydantic==2.6.3 -requests==2.27.1 -werkzeug==2.3.7 -websockets==12.0 diff --git a/src/ztp_server/service/ZtpServerServiceServicerImpl.py b/src/ztp_server/service/ZtpServerServiceServicerImpl.py index 410db6cb3..62ddb856f 100755 --- a/src/ztp_server/service/ZtpServerServiceServicerImpl.py +++ b/src/ztp_server/service/ZtpServerServiceServicerImpl.py @@ -38,16 +38,3 @@ class ZtpServerServiceServicerImpl(ZtpServerServiceServicer): context.set_code(grpc.StatusCode.NOT_FOUND) context.set_details('File not found') return ProvisioningScript() - - - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def GetZtpProvisioning(self, request : ZtpFileName, context : grpc.ServicerContext) -> ZtpFile: - try: - ztpPath = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', 'data', request.filename) - with open(ztpPath, 'r') as json_file: - json_content = json_file.read() - return ZtpFile(json=json_content) - except FileNotFoundError: - context.set_code(grpc.StatusCode.NOT_FOUND) - context.set_details('File not found') - return ZtpFile() \ No newline at end of file diff --git a/src/ztp_server/service/__main__.py b/src/ztp_server/service/__main__.py index 55bd5f187..ae8a95d21 100755 --- a/src/ztp_server/service/__main__.py +++ b/src/ztp_server/service/__main__.py @@ -21,9 +21,7 @@ from common.Settings import ( ) from .ZtpServerService import ZtpServerService from .rest_server.RestServer import RestServer -from .rest_server.ztpServer_plugins.tfs_api import register_tfs_api - -from .context_subscription import register_context_subscription +from .rest_server.ztpServer_plugins.ztp_provisioning_api import register_ztp_provisioning terminate = threading.Event() LOGGER = None @@ -53,7 +51,7 @@ def main(): grpc_service.start() rest_server = RestServer() - register_tfs_api(rest_server) + register_ztp_provisioning(rest_server) rest_server.start() LOGGER.debug('Configured Resources:') diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/HttpStatusCodes.py b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/HttpStatusCodes.py index 56ea475c7..f9d749613 100755 --- a/src/ztp_server/service/rest_server/ztpServer_plugins/tools/HttpStatusCodes.py +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/tools/HttpStatusCodes.py @@ -17,4 +17,4 @@ HTTP_CREATED = 201 HTTP_NOCONTENT = 204 HTTP_BADREQUEST = 400 HTTP_SERVERERROR = 500 -HTTP_GATEWAYTIMEOUT = 504 \ No newline at end of file +HTTP_GATEWAYTIMEOUT = 504 diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py b/src/ztp_server/service/rest_server/ztpServer_plugins/ztp_provisioning_api/Resources.py similarity index 94% rename from src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py rename to src/ztp_server/service/rest_server/ztpServer_plugins/ztp_provisioning_api/Resources.py index 43b7b79b6..f4169742a 100755 --- a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Resources.py +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/ztp_provisioning_api/Resources.py @@ -32,6 +32,6 @@ class _Resource(Resource): class config(_Resource): @HTTP_AUTH.login_required def get(self, config_db : str): - #if returnConfigFile(config_db) + content = returnConfigFile(config_db) - return + return content diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py b/src/ztp_server/service/rest_server/ztpServer_plugins/ztp_provisioning_api/Tools.py similarity index 94% rename from src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py rename to src/ztp_server/service/rest_server/ztpServer_plugins/ztp_provisioning_api/Tools.py index 7d05816ee..92573fd2e 100755 --- a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/Tools.py +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/ztp_provisioning_api/Tools.py @@ -20,6 +20,6 @@ def returnConfigFile(config_db): with open(configFilePath, 'r', encoding='utf-8') as configFile: content = configFile.read() except FileNotFoundError: - return "File not Found" + return None - return content \ No newline at end of file + return content diff --git a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/__init__.py b/src/ztp_server/service/rest_server/ztpServer_plugins/ztp_provisioning_api/__init__.py similarity index 89% rename from src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/__init__.py rename to src/ztp_server/service/rest_server/ztpServer_plugins/ztp_provisioning_api/__init__.py index 7062772b4..ab06fd7bd 100755 --- a/src/ztp_server/service/rest_server/ztpServer_plugins/tfs_api/__init__.py +++ b/src/ztp_server/service/rest_server/ztpServer_plugins/ztp_provisioning_api/__init__.py @@ -14,7 +14,7 @@ from ztp_server.service.rest_server.RestServer import RestServer from .Resources import ( - config + Config ) URL_PREFIX = '/provisioning' @@ -22,9 +22,9 @@ URL_PREFIX = '/provisioning' # Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. RESOURCES = [ # (endpoint_name, resource_class, resource_url) - ('api.config', config, '/config/'), + ('api.config', Config, '/config/'), ] -def register_tfs_api(rest_server : RestServer): +def register_ztp_provisioning(rest_server : RestServer): for endpoint_name, resource_class, resource_url in RESOURCES: rest_server.add_resource(resource_class, URL_PREFIX + resource_url, endpoint=endpoint_name) -- GitLab From 9f585e31b720aec9eb7ed958a43583f8995296be Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 18 Mar 2025 18:55:12 +0000 Subject: [PATCH 369/463] VNT Manager component: - Corrected Kafka connection --- .../service/VNTManagerServiceServicerImpl.py | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/vnt_manager/service/VNTManagerServiceServicerImpl.py b/src/vnt_manager/service/VNTManagerServiceServicerImpl.py index 2424f5530..52ee03d22 100644 --- a/src/vnt_manager/service/VNTManagerServiceServicerImpl.py +++ b/src/vnt_manager/service/VNTManagerServiceServicerImpl.py @@ -39,15 +39,6 @@ class VNTManagerServiceServicerImpl(VNTManagerServiceServicer): def __init__(self): LOGGER.debug('Creating Servicer...') self.context_client = ContextClient() - self.kafka_producer = KafkaProducer({ - 'bootstrap.servers' : KafkaConfig.get_kafka_address() - }) - self.kafka_consumer = KafkaConsumer({ - 'bootstrap.servers' : KafkaConfig.get_kafka_address(), - 'group.id' : str(uuid.uuid4()), - 'auto.offset.reset' : 'latest' - }) - self.kafka_consumer.subscribe([KafkaTopic.VNTMANAGER_RESPONSE.value]) self.links = [] LOGGER.debug('Servicer Created') @@ -66,6 +57,9 @@ class VNTManagerServiceServicerImpl(VNTManagerServiceServicer): vntm_request = json.dumps(vntm_request) MSG = '[send_recommendation] request_key={:s} vntm_request={:s}' LOGGER.info(MSG.format(str(request_key), str(vntm_request))) + self.kafka_producer = KafkaProducer({ + 'bootstrap.servers' : KafkaConfig.get_kafka_address() + }) self.kafka_producer.produce( KafkaTopic.VNTMANAGER_REQUEST.value, key=request_key.encode('utf-8'), @@ -87,6 +81,15 @@ class VNTManagerServiceServicerImpl(VNTManagerServiceServicer): def wait_for_reply(self, request_key : str) -> Optional[Dict]: LOGGER.info('[wait_for_reply] request_key={:s}'.format(str(request_key))) + self.kafka_consumer = KafkaConsumer({ + 'bootstrap.servers' : KafkaConfig.get_kafka_address(), + 'group.id' : str(uuid.uuid4()), + 'auto.offset.reset' : 'latest', + 'max.poll.interval.ms': 600000, + 'session.timeout.ms' : 60000, + }) + self.kafka_consumer.subscribe([KafkaTopic.VNTMANAGER_RESPONSE.value]) + while True: receive_msg = self.kafka_consumer.poll(2.0) if receive_msg is None: continue -- GitLab From 9eb5fa01407efe7e8026b1d334a8c2dd3f288a11 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 19 Mar 2025 08:16:20 +0000 Subject: [PATCH 370/463] OFC25 tests: - Added Additional topology E2E for the server - Fixed dump-logs.sh script --- .../descriptors/topology_e2e-netorch.json | 85 +++++++++++++++++++ src/tests/ofc25/dump-logs.sh | 56 ++++++------ 2 files changed, 112 insertions(+), 29 deletions(-) create mode 100644 src/tests/ofc25/descriptors/topology_e2e-netorch.json diff --git a/src/tests/ofc25/descriptors/topology_e2e-netorch.json b/src/tests/ofc25/descriptors/topology_e2e-netorch.json new file mode 100644 index 000000000..6d5d119bb --- /dev/null +++ b/src/tests/ofc25/descriptors/topology_e2e-netorch.json @@ -0,0 +1,85 @@ +{ + "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-PACKET"}}, "device_type": "teraflowsdn", + "device_drivers": ["DEVICEDRIVER_IETF_L3VPN"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.1.96"}}, + {"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", "import_topology": "topology" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "TFS-OPTICAL"}}, "device_type": "teraflowsdn", + "device_drivers": ["DEVICEDRIVER_OPTICAL_TFS"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.1.96"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8003"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http", "username": "admin", "password": "admin", "import_topology": "topology" + }}} + ]} + } + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "IP1-T1.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"device_id": {"device_uuid": {"uuid": "T1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "IP1-T1.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"device_id": {"device_uuid": {"uuid": "T1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "IP1-T1.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"device_id": {"device_uuid": {"uuid": "T1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + + {"link_id": {"link_uuid": {"uuid": "IP2-T2.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"device_id": {"device_uuid": {"uuid": "T2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "IP2-T2.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"device_id": {"device_uuid": {"uuid": "T2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "IP2-T2.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"device_id": {"device_uuid": {"uuid": "T2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + + {"link_id": {"link_uuid": {"uuid": "T1.1-IP1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "T1.2-IP1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "T1.3-IP1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "T2.1-IP2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "T2.2-IP2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "T2.3-IP2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + ]} + ] +} diff --git a/src/tests/ofc25/dump-logs.sh b/src/tests/ofc25/dump-logs.sh index 234537fba..5037728d9 100755 --- a/src/tests/ofc25/dump-logs.sh +++ b/src/tests/ofc25/dump-logs.sh @@ -15,41 +15,39 @@ rm logs -rf tmp/exec +mkdir -p tmp/exec echo "Collecting logs for E2E..." -mkdir -p tmp/exec/e2e -kubectl logs --namespace tfs-e2e deployment/contextservice -c server > tmp/exec/e2e/context.log -kubectl logs --namespace tfs-e2e deployment/deviceservice -c server > tmp/exec/e2e/device.log -kubectl logs --namespace tfs-e2e deployment/serviceservice -c server > tmp/exec/e2e/service.log -kubectl logs --namespace tfs-e2e deployment/pathcompservice -c frontend > tmp/exec/e2e/pathcomp-frontend.log -kubectl logs --namespace tfs-e2e deployment/pathcompservice -c backend > tmp/exec/e2e/pathcomp-backend.log -kubectl logs --namespace tfs-e2e deployment/webuiservice -c server > tmp/exec/e2e/webui.log -kubectl logs --namespace tfs-e2e deployment/nbiservice -c server > tmp/exec/e2e/nbi.log -kubectl logs --namespace tfs-e2e deployment/e2e-orchestratorservice -c server > tmp/exec/e2e/e2eorch.log -printf logs "\n" +kubectl logs --namespace tfs-e2e deployment/contextservice -c server > tmp/exec/e2e-context.log +kubectl logs --namespace tfs-e2e deployment/deviceservice -c server > tmp/exec/e2e-device.log +kubectl logs --namespace tfs-e2e deployment/serviceservice -c server > tmp/exec/e2e-service.log +kubectl logs --namespace tfs-e2e deployment/pathcompservice -c frontend > tmp/exec/e2e-pathcomp-frontend.log +kubectl logs --namespace tfs-e2e deployment/pathcompservice -c backend > tmp/exec/e2e-pathcomp-backend.log +kubectl logs --namespace tfs-e2e deployment/webuiservice -c server > tmp/exec/e2e-webui.log +kubectl logs --namespace tfs-e2e deployment/nbiservice -c server > tmp/exec/e2e-nbi.log +kubectl logs --namespace tfs-e2e deployment/e2e-orchestratorservice -c server > tmp/exec/e2e-orch.log +printf "\n" echo "Collecting logs for IP..." -mkdir -p tmp/exec/ip -kubectl logs --namespace tfs-ip deployment/contextservice -c server > tmp/exec/ip/context.log -kubectl logs --namespace tfs-ip deployment/deviceservice -c server > tmp/exec/ip/device.log -kubectl logs --namespace tfs-ip deployment/serviceservice -c server > tmp/exec/ip/service.log -kubectl logs --namespace tfs-ip deployment/pathcompservice -c frontend > tmp/exec/ip/pathcomp-frontend.log -kubectl logs --namespace tfs-ip deployment/pathcompservice -c backend > tmp/exec/ip/pathcomp-backend.log -kubectl logs --namespace tfs-ip deployment/webuiservice -c server > tmp/exec/ip/webui.log -kubectl logs --namespace tfs-ip deployment/nbiservice -c server > tmp/exec/ip/nbi.log -kubectl logs --namespace tfs-ip deployment/vnt-managerservice -c server > tmp/exec/ip/vntm.log -printf logs "\n" +kubectl logs --namespace tfs-ip deployment/contextservice -c server > tmp/exec/ip-context.log +kubectl logs --namespace tfs-ip deployment/deviceservice -c server > tmp/exec/ip-device.log +kubectl logs --namespace tfs-ip deployment/serviceservice -c server > tmp/exec/ip-service.log +kubectl logs --namespace tfs-ip deployment/pathcompservice -c frontend > tmp/exec/ip-pathcomp-frontend.log +kubectl logs --namespace tfs-ip deployment/pathcompservice -c backend > tmp/exec/ip-pathcomp-backend.log +kubectl logs --namespace tfs-ip deployment/webuiservice -c server > tmp/exec/ip-webui.log +kubectl logs --namespace tfs-ip deployment/nbiservice -c server > tmp/exec/ip-nbi.log +kubectl logs --namespace tfs-ip deployment/vnt-managerservice -c server > tmp/exec/ip-vntm.log +printf "\n" echo "Collecting logs for OPT..." -mkdir -p tmp/exec/opt -kubectl logs --namespace tfs-opt deployment/contextservice -c server > tmp/exec/opt/context.log -kubectl logs --namespace tfs-opt deployment/deviceservice -c server > tmp/exec/opt/device.log -kubectl logs --namespace tfs-opt deployment/serviceservice -c server > tmp/exec/opt/service.log -kubectl logs --namespace tfs-opt deployment/pathcompservice -c frontend > tmp/exec/opt/pathcomp-frontend.log -kubectl logs --namespace tfs-opt deployment/pathcompservice -c backend > tmp/exec/opt/pathcomp-backend.log -kubectl logs --namespace tfs-opt deployment/webuiservice -c server > tmp/exec/opt/webui.log -kubectl logs --namespace tfs-opt deployment/nbiservice -c server > tmp/exec/opt/nbi.log -kubectl logs --namespace tfs-opt deployment/opticalcontrollerservice -c server > tmp/exec/opt/ctrl.log +kubectl logs --namespace tfs-opt deployment/contextservice -c server > tmp/exec/opt-context.log +kubectl logs --namespace tfs-opt deployment/deviceservice -c server > tmp/exec/opt-device.log +kubectl logs --namespace tfs-opt deployment/serviceservice -c server > tmp/exec/opt-service.log +kubectl logs --namespace tfs-opt deployment/pathcompservice -c frontend > tmp/exec/opt-pathcomp-frontend.log +kubectl logs --namespace tfs-opt deployment/pathcompservice -c backend > tmp/exec/opt-pathcomp-backend.log +kubectl logs --namespace tfs-opt deployment/webuiservice -c server > tmp/exec/opt-webui.log +kubectl logs --namespace tfs-opt deployment/nbiservice -c server > tmp/exec/opt-nbi.log +kubectl logs --namespace tfs-opt deployment/opticalcontrollerservice -c server > tmp/exec/opt-ctrl.log printf "\n" echo "Done!" -- GitLab From 3869c531d3837050d3ddd98b1e711c7f82cd56ea Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 19 Mar 2025 10:42:34 +0000 Subject: [PATCH 371/463] OFC25 tests: - Renamed E2E topology descriptor used for local VMs --- .../descriptors/{topology_e2e.json => topology_e2e-local-vm.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/tests/ofc25/descriptors/{topology_e2e.json => topology_e2e-local-vm.json} (100%) diff --git a/src/tests/ofc25/descriptors/topology_e2e.json b/src/tests/ofc25/descriptors/topology_e2e-local-vm.json similarity index 100% rename from src/tests/ofc25/descriptors/topology_e2e.json rename to src/tests/ofc25/descriptors/topology_e2e-local-vm.json -- GitLab From a6036edaa39c77ceab6e1d635ef749b6de6202a4 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 19 Mar 2025 11:23:07 +0000 Subject: [PATCH 372/463] E2E Orchestrator component: - Corrected selection of border transponders --- .../subscriptions/dispatchers/recommendation/Tools.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py index 12b2069cf..606b5da95 100644 --- a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py +++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py @@ -130,6 +130,11 @@ def compose_optical_service(vlink_request : Dict) -> Dict: LOGGER.info('[compose_optical_service] path_hops={:s}'.format(str(path_hops))) + OPTICAL_TRANSPONDER_TYPE = { + DeviceTypeEnum.EMULATED_OPTICAL_TRANSPONDER.value, + DeviceTypeEnum.OPTICAL_TRANSPONDER.value, + } + optical_border_endpoint_ids : List[str] = list() for endpoint_uuid in path_hops: LOGGER.info('[compose_optical_service] endpoint_uuid={:s}'.format(str(endpoint_uuid))) @@ -137,7 +142,7 @@ def compose_optical_service(vlink_request : Dict) -> Dict: LOGGER.info('[compose_optical_service] device_uuid={:s}'.format(str(device_uuid))) device_type = graph_and_mapping.device_to_type[device_uuid] LOGGER.info('[compose_optical_service] device_type={:s}'.format(str(device_type))) - if device_type != DeviceTypeEnum.EMULATED_OPTICAL_TRANSPONDER.value: continue + if device_type not in OPTICAL_TRANSPONDER_TYPE: continue device_id = json_device_id(device_uuid) endpoint_id = json_endpoint_id(device_id, endpoint_uuid) LOGGER.info('[compose_optical_service] endpoint_id={:s}'.format(str(endpoint_id))) -- GitLab From 08d76ded6fbe491c689a232b37b5adb85d8e7934 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 24 Mar 2025 15:57:14 +0000 Subject: [PATCH 373/463] Manifests: - Relaxed readiness and liveness probe failure thresholds --- manifests/nbiservice.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/nbiservice.yaml b/manifests/nbiservice.yaml index 2bf31678f..bc1882e22 100644 --- a/manifests/nbiservice.yaml +++ b/manifests/nbiservice.yaml @@ -51,16 +51,16 @@ spec: httpGet: path: /healthz port: 8080 - initialDelaySeconds: 30 # NBI's gunicorn takes 30~40 seconds to bootstrap + initialDelaySeconds: 50 # NBI's gunicorn takes 30~40 seconds to bootstrap periodSeconds: 10 - failureThreshold: 6 + failureThreshold: 10 livenessProbe: httpGet: path: /healthz port: 8080 - initialDelaySeconds: 30 # NBI's gunicorn takes 30~40 seconds to bootstrap + initialDelaySeconds: 50 # NBI's gunicorn takes 30~40 seconds to bootstrap periodSeconds: 10 - failureThreshold: 6 + failureThreshold: 10 resources: requests: cpu: 150m -- GitLab From 0369031ad53964db24a10e6f531179bc661513d6 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 24 Mar 2025 16:18:27 +0000 Subject: [PATCH 374/463] OFC25 tests: - Added special deployment verison for multiple VMs running independent instances of TFS --- src/tests/ofc25/separate_vms/deploy_e2e.sh | 54 ++ src/tests/ofc25/separate_vms/deploy_opt.sh | 48 ++ src/tests/ofc25/separate_vms/deploy_pkt.sh | 48 ++ .../ofc25/separate_vms/deploy_specs_e2e.sh | 213 +++++++ .../ofc25/separate_vms/deploy_specs_ip.sh | 213 +++++++ .../ofc25/separate_vms/deploy_specs_opt.sh | 213 +++++++ .../descriptors/create-vlink-01.json | 13 + .../descriptors/create-vlink-02.json | 13 + .../descriptors/create-vlink-03.json | 13 + .../descriptors/topology_e2e.json | 85 +++ .../separate_vms/descriptors/topology_ip.json | 36 ++ .../descriptors/topology_opt.json | 552 ++++++++++++++++++ 12 files changed, 1501 insertions(+) create mode 100755 src/tests/ofc25/separate_vms/deploy_e2e.sh create mode 100755 src/tests/ofc25/separate_vms/deploy_opt.sh create mode 100755 src/tests/ofc25/separate_vms/deploy_pkt.sh create mode 100755 src/tests/ofc25/separate_vms/deploy_specs_e2e.sh create mode 100755 src/tests/ofc25/separate_vms/deploy_specs_ip.sh create mode 100755 src/tests/ofc25/separate_vms/deploy_specs_opt.sh create mode 100644 src/tests/ofc25/separate_vms/descriptors/create-vlink-01.json create mode 100644 src/tests/ofc25/separate_vms/descriptors/create-vlink-02.json create mode 100644 src/tests/ofc25/separate_vms/descriptors/create-vlink-03.json create mode 100644 src/tests/ofc25/separate_vms/descriptors/topology_e2e.json create mode 100644 src/tests/ofc25/separate_vms/descriptors/topology_ip.json create mode 100644 src/tests/ofc25/separate_vms/descriptors/topology_opt.json diff --git a/src/tests/ofc25/separate_vms/deploy_e2e.sh b/src/tests/ofc25/separate_vms/deploy_e2e.sh new file mode 100755 index 000000000..c8f3e4dee --- /dev/null +++ b/src/tests/ofc25/separate_vms/deploy_e2e.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# ===== Check Microk8s is ready ============================== +#microk8s status --wait-ready +#kubectl get pods --all-namespaces + + +# ===== Cleanup old deployments ============================== +#helm3 uninstall --namespace nats nats 2>/dev/null || true +#kubectl delete namespaces tfs --ignore-not-found +#kubectl delete namespaces qdb --ignore-not-found +#kubectl delete namespaces kafka --ignore-not-found +#kubectl delete namespaces nats --ignore-not-found + + +# ===== Check Microk8s is ready ============================== +#microk8s status --wait-ready +#kubectl get pods --all-namespaces + + +# ===== Deploy End-to-End TeraFlowSDN ==================== +sed -i 's|\(

ETSI TeraFlowSDN Controller\)

|\1 (End-to-End)|' src/webui/service/templates/main/home.html +source src/tests/ofc25/deploy_specs_e2e.sh + +./deploy/crdb.sh +./deploy/nats.sh +./deploy/kafka.sh +#./deploy/qdb.sh +#./deploy/expose_dashboard.sh +./deploy/tfs.sh +./deploy/show.sh + + +# ===== Wait Content for NATS Subscription ========================= +echo "Waiting for E2E Context to have subscriber ready..." +while ! kubectl --namespace tfs-e2e logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do sleep 1; done +kubectl --namespace tfs-e2e logs deployment/contextservice -c server + + +echo "Done!" diff --git a/src/tests/ofc25/separate_vms/deploy_opt.sh b/src/tests/ofc25/separate_vms/deploy_opt.sh new file mode 100755 index 000000000..a5e27f146 --- /dev/null +++ b/src/tests/ofc25/separate_vms/deploy_opt.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# ===== Check Microk8s is ready ============================== +#microk8s status --wait-ready +#kubectl get pods --all-namespaces + + +# ===== Cleanup old deployments ============================== +#helm3 uninstall --namespace nats nats 2>/dev/null || true +#kubectl delete namespaces tfs --ignore-not-found +#kubectl delete namespaces qdb --ignore-not-found +#kubectl delete namespaces kafka --ignore-not-found +#kubectl delete namespaces nats --ignore-not-found + + +# ===== Check Microk8s is ready ============================== +#microk8s status --wait-ready +#kubectl get pods --all-namespaces + + +# ===== Deploy End-to-End TeraFlowSDN ==================== +sed -i 's|\(

ETSI TeraFlowSDN Controller\)

|\1 (Optical)|' src/webui/service/templates/main/home.html +source src/tests/ofc25/deploy_specs_opt.sh + +./deploy/crdb.sh +./deploy/nats.sh +./deploy/kafka.sh +#./deploy/qdb.sh +#./deploy/expose_dashboard.sh +./deploy/tfs.sh +./deploy/show.sh + + +echo "Done!" diff --git a/src/tests/ofc25/separate_vms/deploy_pkt.sh b/src/tests/ofc25/separate_vms/deploy_pkt.sh new file mode 100755 index 000000000..bf0c211ef --- /dev/null +++ b/src/tests/ofc25/separate_vms/deploy_pkt.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# ===== Check Microk8s is ready ============================== +#microk8s status --wait-ready +#kubectl get pods --all-namespaces + + +# ===== Cleanup old deployments ============================== +#helm3 uninstall --namespace nats nats 2>/dev/null || true +#kubectl delete namespaces tfs --ignore-not-found +#kubectl delete namespaces qdb --ignore-not-found +#kubectl delete namespaces kafka --ignore-not-found +#kubectl delete namespaces nats --ignore-not-found + + +# ===== Check Microk8s is ready ============================== +#microk8s status --wait-ready +#kubectl get pods --all-namespaces + + +# ===== Deploy End-to-End TeraFlowSDN ==================== +sed -i 's|\(

ETSI TeraFlowSDN Controller\)

|\1 (Packet)|' src/webui/service/templates/main/home.html +source src/tests/ofc25/deploy_specs_pkt.sh + +./deploy/crdb.sh +./deploy/nats.sh +./deploy/kafka.sh +#./deploy/qdb.sh +#./deploy/expose_dashboard.sh +./deploy/tfs.sh +./deploy/show.sh + + +echo "Done!" diff --git a/src/tests/ofc25/separate_vms/deploy_specs_e2e.sh b/src/tests/ofc25/separate_vms/deploy_specs_e2e.sh new file mode 100755 index 000000000..7bdedd3aa --- /dev/null +++ b/src/tests/ofc25/separate_vms/deploy_specs_e2e.sh @@ -0,0 +1,213 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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. +export TFS_COMPONENTS="context device pathcomp service nbi webui" + +# Uncomment to activate Monitoring (old) +#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" + +# Uncomment to activate Monitoring Framework (new) +#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" + +# Uncomment to activate QoS Profiles +#export TFS_COMPONENTS="${TFS_COMPONENTS} qos_profile" + +# Uncomment to activate BGP-LS Speaker +#export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker" + +# Uncomment to activate Optical Controller +# To manage optical connections, "service" requires "opticalcontroller" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "opticalcontroller" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} opticalcontroller service ${AFTER}" +#fi + +# Uncomment to activate ZTP +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" + +# Uncomment to activate Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} policy" + +# Uncomment to activate Optical CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" + +# Uncomment to activate L3 CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector" + +# Uncomment to activate TE +#export TFS_COMPONENTS="${TFS_COMPONENTS} te" + +# Uncomment to activate Forecaster +#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster" + +# Uncomment to activate E2E Orchestrator +export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator" + +# Uncomment to activate VNT Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} vnt_manager" + +# Uncomment to activate DLT and Interdomain +#export TFS_COMPONENTS="${TFS_COMPONENTS} interdomain dlt" +#if [[ "$TFS_COMPONENTS" == *"dlt"* ]]; then +# export KEY_DIRECTORY_PATH="src/dlt/gateway/keys/priv_sk" +# export CERT_DIRECTORY_PATH="src/dlt/gateway/keys/cert.pem" +# export TLS_CERT_PATH="src/dlt/gateway/keys/ca.crt" +#fi + +# Uncomment to activate QKD App +# To manage QKD Apps, "service" requires "qkd_app" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "qkd_app" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}" +#fi + +# Uncomment to activate Load Generator +#export TFS_COMPONENTS="${TFS_COMPONENTS} 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" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Uncomment to monitor performance of components +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" + +# Uncomment when deploying Optical CyberSecurity +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.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 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" + +# 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" + +# Set NATS installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/nats.sh for additional details +export NATS_DEPLOY_MODE="single" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb" + +# 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="9009" + +# 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="" + + +# ----- K8s Observability ------------------------------------------------------ + +# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to. +export PROM_EXT_PORT_HTTP="9090" + +# Set the external port Grafana HTTP Dashboards will be exposed to. +export GRAF_EXT_PORT_HTTP="3000" + + +# ----- Apache Kafka ----------------------------------------------------------- + +# Set the namespace where Apache Kafka will be deployed. +export KFK_NAMESPACE="kafka" + +# Set the port Apache Kafka server will be exposed to. +export KFK_SERVER_PORT="9092" + +# Set the flag to YES for redeploying of Apache Kafka +export KFK_REDEPLOY="" diff --git a/src/tests/ofc25/separate_vms/deploy_specs_ip.sh b/src/tests/ofc25/separate_vms/deploy_specs_ip.sh new file mode 100755 index 000000000..f325c7c45 --- /dev/null +++ b/src/tests/ofc25/separate_vms/deploy_specs_ip.sh @@ -0,0 +1,213 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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. +export TFS_COMPONENTS="context device pathcomp service nbi webui" + +# Uncomment to activate Monitoring (old) +#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" + +# Uncomment to activate Monitoring Framework (new) +#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" + +# Uncomment to activate QoS Profiles +#export TFS_COMPONENTS="${TFS_COMPONENTS} qos_profile" + +# Uncomment to activate BGP-LS Speaker +#export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker" + +# Uncomment to activate Optical Controller +# To manage optical connections, "service" requires "opticalcontroller" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "opticalcontroller" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} opticalcontroller service ${AFTER}" +#fi + +# Uncomment to activate ZTP +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" + +# Uncomment to activate Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} policy" + +# Uncomment to activate Optical CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" + +# Uncomment to activate L3 CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector" + +# Uncomment to activate TE +#export TFS_COMPONENTS="${TFS_COMPONENTS} te" + +# Uncomment to activate Forecaster +#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster" + +# Uncomment to activate E2E Orchestrator +#export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator" + +# Uncomment to activate VNT Manager +export TFS_COMPONENTS="${TFS_COMPONENTS} vnt_manager" + +# Uncomment to activate DLT and Interdomain +#export TFS_COMPONENTS="${TFS_COMPONENTS} interdomain dlt" +#if [[ "$TFS_COMPONENTS" == *"dlt"* ]]; then +# export KEY_DIRECTORY_PATH="src/dlt/gateway/keys/priv_sk" +# export CERT_DIRECTORY_PATH="src/dlt/gateway/keys/cert.pem" +# export TLS_CERT_PATH="src/dlt/gateway/keys/ca.crt" +#fi + +# Uncomment to activate QKD App +# To manage QKD Apps, "service" requires "qkd_app" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "qkd_app" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}" +#fi + +# Uncomment to activate Load Generator +#export TFS_COMPONENTS="${TFS_COMPONENTS} 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" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Uncomment to monitor performance of components +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" + +# Uncomment when deploying Optical CyberSecurity +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.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 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" + +# 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" + +# Set NATS installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/nats.sh for additional details +export NATS_DEPLOY_MODE="single" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb" + +# 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="9009" + +# 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="" + + +# ----- K8s Observability ------------------------------------------------------ + +# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to. +export PROM_EXT_PORT_HTTP="9090" + +# Set the external port Grafana HTTP Dashboards will be exposed to. +export GRAF_EXT_PORT_HTTP="3000" + + +# ----- Apache Kafka ----------------------------------------------------------- + +# Set the namespace where Apache Kafka will be deployed. +export KFK_NAMESPACE="kafka" + +# Set the port Apache Kafka server will be exposed to. +export KFK_SERVER_PORT="9092" + +# Set the flag to YES for redeploying of Apache Kafka +export KFK_REDEPLOY="" diff --git a/src/tests/ofc25/separate_vms/deploy_specs_opt.sh b/src/tests/ofc25/separate_vms/deploy_specs_opt.sh new file mode 100755 index 000000000..a597b5687 --- /dev/null +++ b/src/tests/ofc25/separate_vms/deploy_specs_opt.sh @@ -0,0 +1,213 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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. +export TFS_COMPONENTS="context device pathcomp service nbi webui" + +# Uncomment to activate Monitoring (old) +#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" + +# Uncomment to activate Monitoring Framework (new) +#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" + +# Uncomment to activate QoS Profiles +#export TFS_COMPONENTS="${TFS_COMPONENTS} qos_profile" + +# Uncomment to activate BGP-LS Speaker +#export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker" + +# Uncomment to activate Optical Controller +# To manage optical connections, "service" requires "opticalcontroller" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "opticalcontroller" only if "service" is already in TFS_COMPONENTS, and re-export it. +if [[ "$TFS_COMPONENTS" == *"service"* ]]; then + BEFORE="${TFS_COMPONENTS% service*}" + AFTER="${TFS_COMPONENTS#* service}" + export TFS_COMPONENTS="${BEFORE} opticalcontroller service ${AFTER}" +fi + +# Uncomment to activate ZTP +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" + +# Uncomment to activate Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} policy" + +# Uncomment to activate Optical CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" + +# Uncomment to activate L3 CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector" + +# Uncomment to activate TE +#export TFS_COMPONENTS="${TFS_COMPONENTS} te" + +# Uncomment to activate Forecaster +#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster" + +# Uncomment to activate E2E Orchestrator +#export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator" + +# Uncomment to activate VNT Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} vnt_manager" + +# Uncomment to activate DLT and Interdomain +#export TFS_COMPONENTS="${TFS_COMPONENTS} interdomain dlt" +#if [[ "$TFS_COMPONENTS" == *"dlt"* ]]; then +# export KEY_DIRECTORY_PATH="src/dlt/gateway/keys/priv_sk" +# export CERT_DIRECTORY_PATH="src/dlt/gateway/keys/cert.pem" +# export TLS_CERT_PATH="src/dlt/gateway/keys/ca.crt" +#fi + +# Uncomment to activate QKD App +# To manage QKD Apps, "service" requires "qkd_app" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "qkd_app" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}" +#fi + +# Uncomment to activate Load Generator +#export TFS_COMPONENTS="${TFS_COMPONENTS} 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" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Uncomment to monitor performance of components +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" + +# Uncomment when deploying Optical CyberSecurity +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.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 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" + +# 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" + +# Set NATS installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/nats.sh for additional details +export NATS_DEPLOY_MODE="single" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb" + +# 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="9009" + +# 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="" + + +# ----- K8s Observability ------------------------------------------------------ + +# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to. +export PROM_EXT_PORT_HTTP="9090" + +# Set the external port Grafana HTTP Dashboards will be exposed to. +export GRAF_EXT_PORT_HTTP="3000" + + +# ----- Apache Kafka ----------------------------------------------------------- + +# Set the namespace where Apache Kafka will be deployed. +export KFK_NAMESPACE="kafka" + +# Set the port Apache Kafka server will be exposed to. +export KFK_SERVER_PORT="9092" + +# Set the flag to YES for redeploying of Apache Kafka +export KFK_REDEPLOY="" diff --git a/src/tests/ofc25/separate_vms/descriptors/create-vlink-01.json b/src/tests/ofc25/separate_vms/descriptors/create-vlink-01.json new file mode 100644 index 000000000..edb9bc61c --- /dev/null +++ b/src/tests/ofc25/separate_vms/descriptors/create-vlink-01.json @@ -0,0 +1,13 @@ +{ + "links": [ + { + "link_id": {"link_uuid": {"uuid": "IP1/PORT-xe1==IP2/PORT-xe1"}}, + "link_type": "LINKTYPE_VIRTUAL", + "attributes": {"total_capacity_gbps": 800.0}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + ] + } + ] +} diff --git a/src/tests/ofc25/separate_vms/descriptors/create-vlink-02.json b/src/tests/ofc25/separate_vms/descriptors/create-vlink-02.json new file mode 100644 index 000000000..63b141a2d --- /dev/null +++ b/src/tests/ofc25/separate_vms/descriptors/create-vlink-02.json @@ -0,0 +1,13 @@ +{ + "links": [ + { + "link_id": {"link_uuid": {"uuid": "IP1/PORT-xe2==IP2/PORT-xe2"}}, + "link_type": "LINKTYPE_VIRTUAL", + "attributes": {"total_capacity_gbps": 800.0}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + ] + } + ] +} diff --git a/src/tests/ofc25/separate_vms/descriptors/create-vlink-03.json b/src/tests/ofc25/separate_vms/descriptors/create-vlink-03.json new file mode 100644 index 000000000..1f57c5ce4 --- /dev/null +++ b/src/tests/ofc25/separate_vms/descriptors/create-vlink-03.json @@ -0,0 +1,13 @@ +{ + "links": [ + { + "link_id": {"link_uuid": {"uuid": "IP1/PORT-xe3==IP2/PORT-xe3"}}, + "link_type": "LINKTYPE_VIRTUAL", + "attributes": {"total_capacity_gbps": 800.0}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"device_id": {"device_uuid": {"uuid": "IP2"}}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + ] + } + ] +} diff --git a/src/tests/ofc25/separate_vms/descriptors/topology_e2e.json b/src/tests/ofc25/separate_vms/descriptors/topology_e2e.json new file mode 100644 index 000000000..9eac431cb --- /dev/null +++ b/src/tests/ofc25/separate_vms/descriptors/topology_e2e.json @@ -0,0 +1,85 @@ +{ + "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-PACKET"}}, "device_type": "teraflowsdn", + "device_drivers": ["DEVICEDRIVER_IETF_L3VPN"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.16.254.11"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "80"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http", "username": "admin", "password": "admin", "import_topology": "topology" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "TFS-OPTICAL"}}, "device_type": "teraflowsdn", + "device_drivers": ["DEVICEDRIVER_OPTICAL_TFS"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.24.36.50"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "80"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http", "username": "admin", "password": "admin", "import_topology": "topology" + }}} + ]} + } + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "IP1-T1.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"device_id": {"device_uuid": {"uuid": "T1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "IP1-T1.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"device_id": {"device_uuid": {"uuid": "T1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "IP1-T1.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"device_id": {"device_uuid": {"uuid": "T1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + + {"link_id": {"link_uuid": {"uuid": "IP2-T2.1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe1"}}, + {"device_id": {"device_uuid": {"uuid": "T2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "IP2-T2.2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe2"}}, + {"device_id": {"device_uuid": {"uuid": "T2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "IP2-T2.3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe3"}}, + {"device_id": {"device_uuid": {"uuid": "T2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }} + ]}, + + {"link_id": {"link_uuid": {"uuid": "T1.1-IP1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "T1.2-IP1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "T1.3-IP1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP1" }}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "T2.1-IP2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.1"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "T2.2-IP2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.2"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "T2.3-IP2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.3"}}, "endpoint_uuid": {"uuid": "CLIENT" }}, + {"device_id": {"device_uuid": {"uuid": "IP2" }}, "endpoint_uuid": {"uuid": "PORT-xe3"}} + ]} + ] +} diff --git a/src/tests/ofc25/separate_vms/descriptors/topology_ip.json b/src/tests/ofc25/separate_vms/descriptors/topology_ip.json new file mode 100644 index 000000000..b75aeb7b1 --- /dev/null +++ b/src/tests/ofc25/separate_vms/descriptors/topology_ip.json @@ -0,0 +1,36 @@ +{ + "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": "IP1"}}, "device_type": "emu-packet-router", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "PORT-xe1", "type": "copper"}, + {"uuid": "PORT-xe2", "type": "copper"}, + {"uuid": "PORT-xe3", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "IP2"}}, "device_type": "emu-packet-router", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "PORT-xe1", "type": "copper"}, + {"uuid": "PORT-xe2", "type": "copper"}, + {"uuid": "PORT-xe3", "type": "copper"} + ]}}} + ]} + } + ] +} diff --git a/src/tests/ofc25/separate_vms/descriptors/topology_opt.json b/src/tests/ofc25/separate_vms/descriptors/topology_opt.json new file mode 100644 index 000000000..6b6d5f260 --- /dev/null +++ b/src/tests/ofc25/separate_vms/descriptors/topology_opt.json @@ -0,0 +1,552 @@ +{ + "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": "T1.1"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "1", "type": "optical/channel"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "T1.2"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "2", "type": "optical/channel"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "T1.3"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "3", "type": "optical/channel"} + ]}}} + ]} + }, + + { + "device_id": {"device_uuid": {"uuid": "MGON1"}}, "device_type": "emu-optical-roadm", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "port-33-in", "type": "optical/client-add" }, + {"uuid": "port-33-out", "type": "optical/client-drop"}, + {"uuid": "port-34-in", "type": "optical/client-add" }, + {"uuid": "port-34-out", "type": "optical/client-drop"}, + {"uuid": "port-35-in", "type": "optical/client-add" }, + {"uuid": "port-35-out", "type": "optical/client-drop"}, + {"uuid": "port-9-in", "type": "optical/line-in" }, + {"uuid": "port-9-out", "type": "optical/line-out" } + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "MGON2"}}, "device_type": "emu-optical-roadm", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "port-1-in", "type": "optical/line-in" }, + {"uuid": "port-1-out", "type": "optical/line-out" }, + {"uuid": "port-9-in", "type": "optical/line-in" }, + {"uuid": "port-9-out", "type": "optical/line-out" } + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "MGON3"}}, "device_type": "emu-optical-roadm", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "port-33-in", "type": "optical/client-add" }, + {"uuid": "port-33-out", "type": "optical/client-drop"}, + {"uuid": "port-34-in", "type": "optical/client-add" }, + {"uuid": "port-34-out", "type": "optical/client-drop"}, + {"uuid": "port-35-in", "type": "optical/client-add" }, + {"uuid": "port-35-out", "type": "optical/client-drop"}, + {"uuid": "port-1-in", "type": "optical/line-in" }, + {"uuid": "port-1-out", "type": "optical/line-out" } + ]}}} + ]} + }, + + { + "device_id": {"device_uuid": {"uuid": "T2.1"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "1", "type": "optical/channel"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "T2.2"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "2", "type": "optical/channel"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "T2.3"}}, "device_type": "emu-optical-transponder", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0" }}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "CLIENT", "type": "copper" }, + {"uuid": "3", "type": "optical/channel"} + ]}}} + ]} + } + ], + "optical_links": [ + { + "name": "T1.1-MGON1", "link_id": {"link_uuid": {"uuid": "T1.1->MGON1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.1" }}, "endpoint_uuid": {"uuid": "1" }}, + {"device_id": {"device_uuid": {"uuid": "MGON1"}}, "endpoint_uuid": {"uuid": "port-33-in"}} + ], + "optical_details": { + "length": 0, "src_port": "1", "dst_port": "port-33-in", "local_peer_port": "1", "remote_peer_port": "port-33-out", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "T1.2-MGON1", "link_id": {"link_uuid": {"uuid": "T1.2->MGON1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.2"}}, "endpoint_uuid": {"uuid": "2"}}, + {"device_id": {"device_uuid": {"uuid": "MGON1"}},"endpoint_uuid": {"uuid": "port-34-in"}} + ], + "optical_details": { + "length": 0, "src_port": "2", "dst_port": "port-34-in", "local_peer_port": "2", "remote_peer_port": "port-34-out", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "T1.3-MGON1", "link_id": {"link_uuid": {"uuid": "T1.3->MGON1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1.3"}}, "endpoint_uuid": {"uuid": "3"}}, + {"device_id": {"device_uuid": {"uuid": "MGON1"}},"endpoint_uuid": {"uuid": "port-35-in"}} + ], + "optical_details": { + "length": 0, "src_port": "3", "dst_port": "port-35-in", "local_peer_port": "3", "remote_peer_port": "port-35-out", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON1-T1.1", "link_id": {"link_uuid": {"uuid": "MGON1->T1.1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON1"}}, "endpoint_uuid": {"uuid": "port-33-out"}}, + {"device_id": {"device_uuid": {"uuid": "T1.1"}},"endpoint_uuid": {"uuid": "1"}} + ], + "optical_details": { + "length": 0, "src_port": "port-33-out", "dst_port": "1", "local_peer_port": "port-33-in", "remote_peer_port": "1", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON1-T1.2", "link_id": {"link_uuid": {"uuid": "MGON1->T1.2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON1"}}, "endpoint_uuid": {"uuid": "port-34-out"}}, + {"device_id": {"device_uuid": {"uuid": "T1.2"}},"endpoint_uuid": {"uuid": "2"}} + ], + "optical_details": { + "length": 0, "src_port": "port-34-out", "dst_port": "2", "local_peer_port": "port-34-in", "remote_peer_port": "2", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON1-T1.3", "link_id": {"link_uuid": {"uuid": "MGON1->T1.3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON1"}}, "endpoint_uuid": {"uuid": "port-35-out"}}, + {"device_id": {"device_uuid": {"uuid": "T1.3"}},"endpoint_uuid": {"uuid": "3"}} + ], + "optical_details": { + "length": 0, "src_port": "port-35-out", "dst_port": "3", "local_peer_port": "port-35-in", "remote_peer_port": "3", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON1-MGON2", "link_id": {"link_uuid": {"uuid": "MGON1->MGON2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON1"}}, "endpoint_uuid": {"uuid": "port-9-out"}}, + {"device_id": {"device_uuid": {"uuid": "MGON2"}},"endpoint_uuid": {"uuid": "port-1-in"}} + ], + "optical_details": { + "length": 0, "src_port": "port-9-out", "dst_port": "port-1-in", "local_peer_port": "port-9-in", "remote_peer_port": "port-1-out", + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON2-MGON1", "link_id": {"link_uuid": {"uuid": "MGON2->MGON1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON2"}}, "endpoint_uuid": {"uuid": "port-1-out"}}, + {"device_id": {"device_uuid": {"uuid": "MGON1"}},"endpoint_uuid": {"uuid": "port-9-in"}} + ], + "optical_details": { + "length": 0, "src_port": "port-1-out", "dst_port": "port-9-in", "local_peer_port": "port-1-in", "remote_peer_port": "port-9-out", + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON2-MGON3", "link_id": {"link_uuid": {"uuid": "MGON2->MGON3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON2"}}, "endpoint_uuid": {"uuid": "port-9-out"}}, + {"device_id": {"device_uuid": {"uuid": "MGON3"}},"endpoint_uuid": {"uuid": "port-1-in"}} + ], + "optical_details": { + "length": 0, "src_port": "port-9-out", "dst_port": "port-1-in", "local_peer_port": "port-9-in", "remote_peer_port": "port-1-out", + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON3-MGON2", "link_id": {"link_uuid": {"uuid": "MGON3->MGON2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON3"}}, "endpoint_uuid": {"uuid": "port-1-out"}}, + {"device_id": {"device_uuid": {"uuid": "MGON2"}},"endpoint_uuid": {"uuid": "port-9-in"}} + ], + "optical_details": { + "length": 0, "src_port": "port-1-out", "dst_port": "port-9-in", "local_peer_port": "port-1-in", "remote_peer_port": "port-9-out", + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "T2.1-MGON3", "link_id": {"link_uuid": {"uuid": "T2.1->MGON3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.1"}}, "endpoint_uuid": {"uuid": "1"}}, + {"device_id": {"device_uuid": {"uuid": "MGON3"}},"endpoint_uuid": {"uuid": "port-33-in"}} + ], + "optical_details": { + "length": 0, "src_port": "1", "dst_port": "port-33-in", "local_peer_port": "1", "remote_peer_port": "port-33-out", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "T2.2-MGON3", "link_id": {"link_uuid": {"uuid": "T2.2->MGON3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.2"}}, "endpoint_uuid": {"uuid": "2"}}, + {"device_id": {"device_uuid": {"uuid": "MGON3"}},"endpoint_uuid": {"uuid": "port-34-in"}} + ], + "optical_details": { + "length": 0, "src_port": "2", "dst_port": "port-34-in", "local_peer_port": "2", "remote_peer_port": "port-34-out", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "T2.3-MGON3", "link_id": {"link_uuid": {"uuid": "T2.3->MGON3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2.3"}}, "endpoint_uuid": {"uuid": "3"}}, + {"device_id": {"device_uuid": {"uuid": "MGON3"}},"endpoint_uuid": {"uuid": "port-35-in"}} + ], + "optical_details": { + "length": 0, "src_port": "3", "dst_port": "port-35-in", "local_peer_port": "3", "remote_peer_port": "port-35-out", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON3-T2.1", "link_id": {"link_uuid": {"uuid": "MGON3->T2.1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON3"}}, "endpoint_uuid": {"uuid": "port-33-out"}}, + {"device_id": {"device_uuid": {"uuid": "T2.1"}},"endpoint_uuid": {"uuid": "1"}} + ], + "optical_details": { + "length": 0, "src_port": "port-33-out", "dst_port": "1", "local_peer_port": "port-33-in", "remote_peer_port": "1", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON3-T2.2", "link_id": {"link_uuid": {"uuid": "MGON3->T2.2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON3"}}, "endpoint_uuid": {"uuid": "port-34-out"}}, + {"device_id": {"device_uuid": {"uuid": "T2.2"}},"endpoint_uuid": {"uuid": "2"}} + ], + "optical_details": { + "length": 0, "src_port": "port-34-out", "dst_port": "2", "local_peer_port": "port-34-in", "remote_peer_port": "2", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + }, + { + "name": "MGON3-T2.3", "link_id": {"link_uuid": {"uuid": "MGON3->T2.3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "MGON3"}}, "endpoint_uuid": {"uuid": "port-35-out"}}, + {"device_id": {"device_uuid": {"uuid": "T2.3"}},"endpoint_uuid": {"uuid": "3"}} + ], + "optical_details": { + "length": 0, "src_port": "port-35-out", "dst_port": "3", "local_peer_port": "port-35-in", "remote_peer_port": "3", "used": false, + "c_slots": { + "1": 1, "2": 1, "3": 1, "4": 1, "5": 1, "6": 1, "7": 1, "8": 1, "9": 1, "10": 1, + "11": 1, "12": 1, "13": 1, "14": 1, "15": 1, "16": 1, "17": 1, "18": 1, "19": 1, "20": 1, + "21": 1, "22": 1, "23": 1, "24": 1, "25": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, + "31": 1, "32": 1, "33": 1, "34": 1, "35": 1, "36": 1, "37": 1, "38": 1, "39": 1, "40": 1, + "41": 1, "42": 1, "43": 1, "44": 1, "45": 1, "46": 1, "47": 1, "48": 1, "49": 1, "50": 1, + "51": 1, "52": 1, "53": 1, "54": 1, "55": 1, "56": 1, "57": 1, "58": 1, "59": 1, "60": 1 + }, + "l_slots": { + "101": 1, "102": 1, "103": 1, "104": 1, "105": 1, "106": 1, "107": 1, "108": 1, "109": 1, "110": 1, + "111": 1, "112": 1, "113": 1, "114": 1, "115": 1, "116": 1, "117": 1, "118": 1, "119": 1, "120": 1 + }, + "s_slots": { + "501": 1, "502": 1, "503": 1, "504": 1, "505": 1, "506": 1, "507": 1, "508": 1, "509": 1, "510": 1, + "511": 1, "512": 1, "513": 1, "514": 1, "515": 1, "516": 1, "517": 1, "518": 1, "519": 1, "520": 1 + } + } + } + ] +} -- GitLab From 24d6634b7939577fcbf58f135dfea8fb95ea3148 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 24 Mar 2025 16:18:50 +0000 Subject: [PATCH 375/463] OFC25 tests: - Added labels in all-in-one deployment to differentiate TFS instances --- src/tests/ofc25/deploy.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tests/ofc25/deploy.sh b/src/tests/ofc25/deploy.sh index fb892e14c..c630647a0 100755 --- a/src/tests/ofc25/deploy.sh +++ b/src/tests/ofc25/deploy.sh @@ -57,6 +57,7 @@ cp manifests/contextservice.yaml manifests/contextservice.yaml.bak source src/tests/ofc25/deploy_specs_opt.sh cp manifests/contextservice.yaml.bak manifests/contextservice.yaml sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfs_opt_context"/}' manifests/contextservice.yaml +sed -i 's|\(

ETSI TeraFlowSDN Controller\)

|\1 (Optical)|' src/webui/service/templates/main/home.html ./deploy/crdb.sh ./deploy/nats.sh @@ -73,6 +74,7 @@ mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_opt.sh source src/tests/ofc25/deploy_specs_ip.sh cp manifests/contextservice.yaml.bak manifests/contextservice.yaml sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfs_ip_context"/}' manifests/contextservice.yaml +sed -i 's|\(

ETSI TeraFlowSDN Controller\)

|\1 (Packet)|' src/webui/service/templates/main/home.html ./deploy/crdb.sh ./deploy/nats.sh @@ -89,6 +91,7 @@ mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_ip.sh source src/tests/ofc25/deploy_specs_e2e.sh cp manifests/contextservice.yaml.bak manifests/contextservice.yaml sed -i '/name: CRDB_DATABASE/{n;s/value: .*/value: "tfs_e2e_context"/}' manifests/contextservice.yaml +sed -i 's|\(

ETSI TeraFlowSDN Controller\)

|\1 (End-to-End)|' src/webui/service/templates/main/home.html ./deploy/crdb.sh ./deploy/nats.sh -- GitLab From bfcf43481155b14e12fa73c7b8067d7e39f42d28 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 24 Mar 2025 16:22:05 +0000 Subject: [PATCH 376/463] OFC25 tests: - Corrected paths --- src/tests/ofc25/separate_vms/deploy_e2e.sh | 2 +- src/tests/ofc25/separate_vms/deploy_opt.sh | 2 +- src/tests/ofc25/separate_vms/deploy_pkt.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests/ofc25/separate_vms/deploy_e2e.sh b/src/tests/ofc25/separate_vms/deploy_e2e.sh index c8f3e4dee..9196e9de0 100755 --- a/src/tests/ofc25/separate_vms/deploy_e2e.sh +++ b/src/tests/ofc25/separate_vms/deploy_e2e.sh @@ -34,7 +34,7 @@ # ===== Deploy End-to-End TeraFlowSDN ==================== sed -i 's|\(

ETSI TeraFlowSDN Controller\)

|\1 (End-to-End)|' src/webui/service/templates/main/home.html -source src/tests/ofc25/deploy_specs_e2e.sh +source src/tests/ofc25/separate_vms/deploy_specs_e2e.sh ./deploy/crdb.sh ./deploy/nats.sh diff --git a/src/tests/ofc25/separate_vms/deploy_opt.sh b/src/tests/ofc25/separate_vms/deploy_opt.sh index a5e27f146..d2123cd96 100755 --- a/src/tests/ofc25/separate_vms/deploy_opt.sh +++ b/src/tests/ofc25/separate_vms/deploy_opt.sh @@ -34,7 +34,7 @@ # ===== Deploy End-to-End TeraFlowSDN ==================== sed -i 's|\(

ETSI TeraFlowSDN Controller\)

|\1 (Optical)|' src/webui/service/templates/main/home.html -source src/tests/ofc25/deploy_specs_opt.sh +source src/tests/ofc25/separate_vms/deploy_specs_opt.sh ./deploy/crdb.sh ./deploy/nats.sh diff --git a/src/tests/ofc25/separate_vms/deploy_pkt.sh b/src/tests/ofc25/separate_vms/deploy_pkt.sh index bf0c211ef..b3fadcd96 100755 --- a/src/tests/ofc25/separate_vms/deploy_pkt.sh +++ b/src/tests/ofc25/separate_vms/deploy_pkt.sh @@ -34,7 +34,7 @@ # ===== Deploy End-to-End TeraFlowSDN ==================== sed -i 's|\(

ETSI TeraFlowSDN Controller\)

|\1 (Packet)|' src/webui/service/templates/main/home.html -source src/tests/ofc25/deploy_specs_pkt.sh +source src/tests/ofc25/separate_vms/deploy_specs_pkt.sh ./deploy/crdb.sh ./deploy/nats.sh -- GitLab From b7a46ef0818d771390c7001437ff0c4d5032139f Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 24 Mar 2025 17:37:05 +0000 Subject: [PATCH 377/463] OFC25 tests: - Corrected file names --- .../separate_vms/{deploy_specs_ip.sh => deploy_specs_pkt.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/tests/ofc25/separate_vms/{deploy_specs_ip.sh => deploy_specs_pkt.sh} (100%) diff --git a/src/tests/ofc25/separate_vms/deploy_specs_ip.sh b/src/tests/ofc25/separate_vms/deploy_specs_pkt.sh similarity index 100% rename from src/tests/ofc25/separate_vms/deploy_specs_ip.sh rename to src/tests/ofc25/separate_vms/deploy_specs_pkt.sh -- GitLab From 18b5143cd638abb917ded4262b2b14659d7712b3 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 25 Mar 2025 10:28:42 +0000 Subject: [PATCH 378/463] Device component - OpenConfig driver: - Added missing AFI-SAFI in BGP config --- .../templates/VPN/Network_instance_multivendor.py | 6 ++++++ .../templates/network_instance/protocols/edit_config.xml | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py b/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py index 71581640e..761312c47 100644 --- a/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py +++ b/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py @@ -134,6 +134,12 @@ def add_protocol_NI(parameters,vendor, DEL): with tag('as') :text(parameters['as']) if "router_id" in parameters: with tag('router-id'):text(parameters['router_id']) + with tag('afi-safis'): + with tag('afi-safi', 'xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types"'): + with tag('afi-safi-name'): text('oc-bgp-types:IPV4_UNICAST') + with tag('config'): + with tag('afi-safi-name'): text('oc-bgp-types:IPV4_UNICAST') + with tag('enabled'): text('true') if 'neighbors' in parameters: with tag('neighbors'): for neighbor in parameters['neighbors']: diff --git a/src/device/service/drivers/openconfig/templates/network_instance/protocols/edit_config.xml b/src/device/service/drivers/openconfig/templates/network_instance/protocols/edit_config.xml index da66d97f0..7c36dfb45 100644 --- a/src/device/service/drivers/openconfig/templates/network_instance/protocols/edit_config.xml +++ b/src/device/service/drivers/openconfig/templates/network_instance/protocols/edit_config.xml @@ -19,6 +19,15 @@ {{as}} {{router_id}} + + + oc-bgp-types:IPV4_UNICAST + + oc-bgp-types:IPV4_UNICAST + true + + + {% if neighbors is defined %} -- GitLab From 386aab3c39187e120e9487138210febfaaa7453c Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 25 Mar 2025 10:29:01 +0000 Subject: [PATCH 379/463] OFC25 tests: - Corrected wait for subscriber in E2E deployment --- src/tests/ofc25/separate_vms/deploy_e2e.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/ofc25/separate_vms/deploy_e2e.sh b/src/tests/ofc25/separate_vms/deploy_e2e.sh index 9196e9de0..d2cdf8f10 100755 --- a/src/tests/ofc25/separate_vms/deploy_e2e.sh +++ b/src/tests/ofc25/separate_vms/deploy_e2e.sh @@ -47,8 +47,8 @@ source src/tests/ofc25/separate_vms/deploy_specs_e2e.sh # ===== Wait Content for NATS Subscription ========================= echo "Waiting for E2E Context to have subscriber ready..." -while ! kubectl --namespace tfs-e2e logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do sleep 1; done -kubectl --namespace tfs-e2e logs deployment/contextservice -c server +while ! kubectl --namespace tfs logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do sleep 1; done +kubectl --namespace tfs logs deployment/contextservice -c server echo "Done!" -- GitLab From 617797ffaabe5f1714925f938cf5cf0031339af8 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 9 Apr 2025 15:43:01 +0000 Subject: [PATCH 380/463] Deploy scripts: - Corrected deploy of pre-built docker images --- deploy/tfs.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/deploy/tfs.sh b/deploy/tfs.sh index a1429e443..382bce345 100755 --- a/deploy/tfs.sh +++ b/deploy/tfs.sh @@ -342,11 +342,7 @@ for COMPONENT in $TFS_COMPONENTS; do sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-gateway:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST" else VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}:" "$MANIFEST" | cut -d ":" -f4) - if [ "$TFS_SKIP_BUILD" != "YES" ]; then - IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g') - else - IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$VERSION" | sed 's,//,/,g' | sed 's,http:/,,g') - fi + IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g') sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST" fi -- GitLab From 8a7a1ffcbca900e761778f5422e9a6e7c27c3535 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 9 Apr 2025 16:27:02 +0000 Subject: [PATCH 381/463] Manifests: - Corrected log levels, annotations, and ports --- manifests/e2e_orchestratorservice.yaml | 9 +-------- manifests/nbiservice.yaml | 2 +- manifests/opticalcontrollerservice.yaml | 2 +- manifests/serviceservice.yaml | 2 +- manifests/vnt_managerservice.yaml | 5 +---- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/manifests/e2e_orchestratorservice.yaml b/manifests/e2e_orchestratorservice.yaml index c628df3a7..34121e043 100644 --- a/manifests/e2e_orchestratorservice.yaml +++ b/manifests/e2e_orchestratorservice.yaml @@ -23,9 +23,6 @@ spec: replicas: 1 template: metadata: - annotations: - config.linkerd.io/skip-outbound-ports: "8761" - config.linkerd.io/skip-inbound-ports: "8761" labels: app: e2e-orchestratorservice spec: @@ -37,10 +34,9 @@ spec: ports: - containerPort: 10050 - containerPort: 9192 - - containerPort: 8762 env: - name: LOG_LEVEL - value: "DEBUG" + value: "INFO" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:10050"] @@ -72,6 +68,3 @@ spec: - name: metrics port: 9192 targetPort: 9192 - - name: ws - port: 8762 - targetPort: 8762 diff --git a/manifests/nbiservice.yaml b/manifests/nbiservice.yaml index bc1882e22..5133af5ce 100644 --- a/manifests/nbiservice.yaml +++ b/manifests/nbiservice.yaml @@ -39,7 +39,7 @@ spec: #- containerPort: 9192 env: - name: LOG_LEVEL - value: "DEBUG" + value: "INFO" - name: FLASK_ENV value: "production" # change to "development" if developing - name: IETF_NETWORK_RENDERER diff --git a/manifests/opticalcontrollerservice.yaml b/manifests/opticalcontrollerservice.yaml index 341af782a..d537076fe 100644 --- a/manifests/opticalcontrollerservice.yaml +++ b/manifests/opticalcontrollerservice.yaml @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "DEBUG" + value: "INFO" #readinessProbe: # exec: # command: ["/bin/grpc_health_probe", "-addr=:10060"] diff --git a/manifests/serviceservice.yaml b/manifests/serviceservice.yaml index 72c3015b3..aa94e4269 100644 --- a/manifests/serviceservice.yaml +++ b/manifests/serviceservice.yaml @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "DEBUG" + value: "INFO" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:3030"] diff --git a/manifests/vnt_managerservice.yaml b/manifests/vnt_managerservice.yaml index 6f82a341c..3c73bd58d 100644 --- a/manifests/vnt_managerservice.yaml +++ b/manifests/vnt_managerservice.yaml @@ -23,9 +23,6 @@ spec: replicas: 1 template: metadata: - annotations: - config.linkerd.io/skip-outbound-ports: "8765" - config.linkerd.io/skip-inbound-ports: "8765" labels: app: vnt-managerservice spec: @@ -39,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "DEBUG" + value: "INFO" envFrom: - secretRef: name: kfk-kpi-data -- GitLab From f3642dbd9017d8ff00a220d360625ba6c707cec3 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 9 Apr 2025 16:35:59 +0000 Subject: [PATCH 382/463] E2E Orchestrator component: - Remove unneeded files --- src/e2e_orchestrator/service/TopologyTools.py | 37 --- .../old_E2EOrchestratorServiceServicerImpl.py | 268 ------------------ 2 files changed, 305 deletions(-) delete mode 100644 src/e2e_orchestrator/service/TopologyTools.py delete mode 100644 src/e2e_orchestrator/service/old_E2EOrchestratorServiceServicerImpl.py diff --git a/src/e2e_orchestrator/service/TopologyTools.py b/src/e2e_orchestrator/service/TopologyTools.py deleted file mode 100644 index eaa0e2dbb..000000000 --- a/src/e2e_orchestrator/service/TopologyTools.py +++ /dev/null @@ -1,37 +0,0 @@ - def retrieve_external_topologies(self): - i = 1 - while True: - try: - ADD = str(get_setting(f'EXT_CONTROLLER{i}_ADD')) - PORT = int(get_setting(f'EXT_CONTROLLER{i}_PORT')) - except: # pylint: disable=bare-except - break - - try: - LOGGER.info('Retrieving external controller #{:d}'.format(i)) - url = 'http://{:s}:{:d}/tfs-api/context/{:s}/topology_details/{:s}'.format( - ADD, PORT, DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME - ) - LOGGER.info('url={:s}'.format(str(url))) - topo = requests.get(url).json() - LOGGER.info('Retrieved external controller #{:d}'.format(i)) - except: # pylint: disable=bare-except - LOGGER.exception('Exception retrieven topology from external controler #{:d}'.format(i)) - - topology_details = TopologyDetails(**topo) - context = Context() - context.context_id.context_uuid.uuid = topology_details.topology_id.context_id.context_uuid.uuid - context_client.SetContext(context) - - topology = Topology() - topology.topology_id.context_id.CopyFrom(context.context_id) - topology.topology_id.topology_uuid.uuid = topology_details.topology_id.topology_uuid.uuid - context_client.SetTopology(topology) - - for device in topology_details.devices: - context_client.SetDevice(device) - - for link in topology_details.links: - context_client.SetLink(link) - - i+=1 diff --git a/src/e2e_orchestrator/service/old_E2EOrchestratorServiceServicerImpl.py b/src/e2e_orchestrator/service/old_E2EOrchestratorServiceServicerImpl.py deleted file mode 100644 index 4878d4788..000000000 --- a/src/e2e_orchestrator/service/old_E2EOrchestratorServiceServicerImpl.py +++ /dev/null @@ -1,268 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 copy, grpc, json, logging, networkx, requests, threading -from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method -from common.proto.e2eorchestrator_pb2 import E2EOrchestratorRequest, E2EOrchestratorReply -from common.proto.context_pb2 import ( - Empty, Connection, EndPointId, Link, LinkId, TopologyDetails, Topology, Context, Service, ServiceId, - ServiceTypeEnum, ServiceStatusEnum) -from common.proto.e2eorchestrator_pb2_grpc import E2EOrchestratorServiceServicer -from common.proto.vnt_manager_pb2 import VNTSubscriptionRequest -from common.tools.grpc.Tools import grpc_message_to_json_string -from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME -from common.Settings import get_setting -from context.client.ContextClient import ContextClient -from context.service.database.uuids.EndPoint import endpoint_get_uuid -from context.service.database.uuids.Device import device_get_uuid -from service.client.ServiceClient import ServiceClient -from websockets.sync.client import connect -from websockets.sync.server import serve - - -LOGGER = logging.getLogger(__name__) -logging.getLogger("websockets").propagate = True -logging.getLogger("requests.packages.urllib3").propagate = True - -METRICS_POOL = MetricsPool("E2EOrchestrator", "RPC") - - -context_client: ContextClient = ContextClient() -service_client: ServiceClient = ServiceClient() - -EXT_HOST = str(get_setting('WS_IP_HOST')) -EXT_PORT = int(get_setting('WS_IP_PORT')) -EXT_URL = 'ws://{:s}:{:d}'.format(EXT_HOST, EXT_PORT) - -OWN_HOST = str(get_setting('WS_E2E_HOST')) -OWN_PORT = int(get_setting('WS_E2E_PORT')) - -ALL_HOSTS = '0.0.0.0' - -class SubscriptionServer(threading.Thread): - def run(self): - request = VNTSubscriptionRequest() - request.host = OWN_HOST - request.port = OWN_PORT - try: - LOGGER.debug('Trying to connect to {:s}'.format(EXT_URL)) - websocket = connect(EXT_URL) - except: # pylint: disable=bare-except - LOGGER.exception('Error connecting to {:s}'.format(EXT_URL)) - else: - with websocket: - LOGGER.debug('Connected to {:s}'.format(EXT_URL)) - send = grpc_message_to_json_string(request) - websocket.send(send) - LOGGER.debug('Sent: {:s}'.format(send)) - try: - message = websocket.recv() - LOGGER.debug('Received message from WebSocket: {:s}'.format(message)) - except Exception as ex: - LOGGER.error('Exception receiving from WebSocket: {:s}'.format(ex)) - self._events_server() - - - def _events_server(self): - try: - server = serve(self._event_received, ALL_HOSTS, int(OWN_PORT)) - except: # pylint: disable=bare-except - LOGGER.exception('Error starting server on {:s}:{:d}'.format(ALL_HOSTS, OWN_PORT)) - else: - with server: - LOGGER.info('Running events server...: {:s}:{:d}'.format(ALL_HOSTS, OWN_PORT)) - server.serve_forever() - - - def _event_received(self, connection): - LOGGER.debug('Event received') - for message in connection: - message_json = json.loads(message) - - # Link creation - if 'link_id' in message_json: - LOGGER.debug('Link creation') - link = Link(**message_json) - - service = Service() - service.service_id.service_uuid.uuid = link.link_id.link_uuid.uuid - service.service_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME - service.service_type = ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY - service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED - service_client.CreateService(service) - - a_device_uuid = device_get_uuid(link.link_endpoint_ids[0].device_id) - a_endpoint_uuid = endpoint_get_uuid(link.link_endpoint_ids[0])[2] - z_device_uuid = device_get_uuid(link.link_endpoint_ids[1].device_id) - z_endpoint_uuid = endpoint_get_uuid(link.link_endpoint_ids[1])[2] - - links = context_client.ListLinks(Empty()).links - for _link in links: - for _endpoint_id in _link.link_endpoint_ids: - if _endpoint_id.device_id.device_uuid.uuid == a_device_uuid and \ - _endpoint_id.endpoint_uuid.uuid == a_endpoint_uuid: - a_ep_id = _endpoint_id - elif _endpoint_id.device_id.device_uuid.uuid == z_device_uuid and \ - _endpoint_id.endpoint_uuid.uuid == z_endpoint_uuid: - z_ep_id = _endpoint_id - - if (not 'a_ep_id' in locals()) or (not 'z_ep_id' in locals()): - error_msg = f'Could not get VNT link endpoints\ - \n\ta_endpoint_uuid= {a_endpoint_uuid}\ - \n\tz_endpoint_uuid= {z_device_uuid}' - LOGGER.error(error_msg) - connection.send(error_msg) - return - - service.service_endpoint_ids.append(copy.deepcopy(a_ep_id)) - service.service_endpoint_ids.append(copy.deepcopy(z_ep_id)) - - service_client.UpdateService(service) - re_svc = context_client.GetService(service.service_id) - connection.send(grpc_message_to_json_string(link)) - context_client.SetLink(link) - elif 'link_uuid' in message_json: - LOGGER.debug('Link removal') - link_id = LinkId(**message_json) - - service_id = ServiceId() - service_id.service_uuid.uuid = link_id.link_uuid.uuid - service_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME - service_client.DeleteService(service_id) - connection.send(grpc_message_to_json_string(link_id)) - context_client.RemoveLink(link_id) - else: - LOGGER.debug('Topology received') - topology_details = TopologyDetails(**message_json) - - context = Context() - context.context_id.context_uuid.uuid = topology_details.topology_id.context_id.context_uuid.uuid - context_client.SetContext(context) - - topology = Topology() - topology.topology_id.context_id.CopyFrom(context.context_id) - topology.topology_id.topology_uuid.uuid = topology_details.topology_id.topology_uuid.uuid - context_client.SetTopology(topology) - - for device in topology_details.devices: - context_client.SetDevice(device) - - for link in topology_details.links: - context_client.SetLink(link) - - - -class E2EOrchestratorServiceServicerImpl(E2EOrchestratorServiceServicer): - def __init__(self): - LOGGER.debug('Creating Servicer...') - try: - LOGGER.debug('Requesting subscription') - sub_server = SubscriptionServer() - sub_server.start() - LOGGER.debug('Servicer Created') - self.retrieve_external_topologies() - except: - LOGGER.exception('Unhandled Exception') - - def retrieve_external_topologies(self): - i = 1 - while True: - try: - ADD = str(get_setting(f'EXT_CONTROLLER{i}_ADD')) - PORT = int(get_setting(f'EXT_CONTROLLER{i}_PORT')) - except: # pylint: disable=bare-except - break - - try: - LOGGER.info('Retrieving external controller #{:d}'.format(i)) - url = 'http://{:s}:{:d}/tfs-api/context/{:s}/topology_details/{:s}'.format( - ADD, PORT, DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME - ) - LOGGER.info('url={:s}'.format(str(url))) - topo = requests.get(url).json() - LOGGER.info('Retrieved external controller #{:d}'.format(i)) - except: # pylint: disable=bare-except - LOGGER.exception('Exception retrieven topology from external controler #{:d}'.format(i)) - - topology_details = TopologyDetails(**topo) - context = Context() - context.context_id.context_uuid.uuid = topology_details.topology_id.context_id.context_uuid.uuid - context_client.SetContext(context) - - topology = Topology() - topology.topology_id.context_id.CopyFrom(context.context_id) - topology.topology_id.topology_uuid.uuid = topology_details.topology_id.topology_uuid.uuid - context_client.SetTopology(topology) - - for device in topology_details.devices: - context_client.SetDevice(device) - - for link in topology_details.links: - context_client.SetLink(link) - - i+=1 - - - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def Compute(self, request: E2EOrchestratorRequest, context: grpc.ServicerContext) -> E2EOrchestratorReply: - endpoints_ids = [] - for endpoint_id in request.service.service_endpoint_ids: - endpoints_ids.append(endpoint_get_uuid(endpoint_id)[2]) - - graph = networkx.Graph() - - devices = context_client.ListDevices(Empty()).devices - - for device in devices: - endpoints_uuids = [endpoint.endpoint_id.endpoint_uuid.uuid - for endpoint in device.device_endpoints] - for ep in endpoints_uuids: - graph.add_node(ep) - - for ep in endpoints_uuids: - for ep_i in endpoints_uuids: - if ep == ep_i: - continue - graph.add_edge(ep, ep_i) - - links = context_client.ListLinks(Empty()).links - for link in links: - eps = [] - for endpoint_id in link.link_endpoint_ids: - eps.append(endpoint_id.endpoint_uuid.uuid) - graph.add_edge(eps[0], eps[1]) - - - shortest = networkx.shortest_path(graph, endpoints_ids[0], endpoints_ids[1]) - - path = E2EOrchestratorReply() - path.services.append(copy.deepcopy(request.service)) - for i in range(0, int(len(shortest)/2)): - conn = Connection() - ep_a_uuid = str(shortest[i*2]) - ep_z_uuid = str(shortest[i*2+1]) - - conn.connection_id.connection_uuid.uuid = str(ep_a_uuid) + '_->_' + str(ep_z_uuid) - - ep_a_id = EndPointId() - ep_a_id.endpoint_uuid.uuid = ep_a_uuid - conn.path_hops_endpoint_ids.append(ep_a_id) - - ep_z_id = EndPointId() - ep_z_id.endpoint_uuid.uuid = ep_z_uuid - conn.path_hops_endpoint_ids.append(ep_z_id) - - path.connections.append(conn) - - return path -- GitLab From 89ae4bd011d107fb13ff8ed5c030c6252320db3e Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 9 Apr 2025 16:36:08 +0000 Subject: [PATCH 383/463] Manifests: - Corrected log levels, annotations, and ports --- manifests/pathcompservice.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/pathcompservice.yaml b/manifests/pathcompservice.yaml index b6f969bf4..0cac6cc18 100644 --- a/manifests/pathcompservice.yaml +++ b/manifests/pathcompservice.yaml @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL - value: "DEBUG" + value: "INFO" - name: ENABLE_FORECASTER value: "NO" readinessProbe: -- GitLab From 8b77136376dd04117fa2e17176a336e003be7d16 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 9 Apr 2025 16:40:12 +0000 Subject: [PATCH 384/463] NBI component: - Remove unneeded GitLab CI/CD commands --- src/nbi/.gitlab-ci.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 52f9d856b..674aabf01 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -82,19 +82,12 @@ unit_test nbi: - docker ps -a - docker logs mock_tfs_nbi_dependencies - docker logs $IMAGE_NAME - - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml" - - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" - - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" - - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" - - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" - - date - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" - - date - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: -- GitLab From 4928cbc55f14e7ba4ce877c4f6e173e2c6f1c245 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 9 Apr 2025 16:40:39 +0000 Subject: [PATCH 385/463] GitLab CI/CD pipeline: - Reactivated tests of Automation component --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 769ccd80e..2fe405733 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,7 +34,7 @@ include: - local: '/src/opticalcontroller/.gitlab-ci.yml' - local: '/src/ztp/.gitlab-ci.yml' - local: '/src/policy/.gitlab-ci.yml' - #- local: '/src/automation/.gitlab-ci.yml' + - local: '/src/automation/.gitlab-ci.yml' - local: '/src/forecaster/.gitlab-ci.yml' #- local: '/src/webui/.gitlab-ci.yml' #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' -- GitLab From c609d51c37d2d92d5fdac17af6fec796405e9a92 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 9 Apr 2025 17:11:16 +0000 Subject: [PATCH 386/463] GitLab CI/CD pipeline - NBI component: - Corrected test log levels --- src/nbi/.gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 674aabf01..2e280ed8a 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -82,12 +82,12 @@ unit_test nbi: - docker ps -a - docker logs mock_tfs_nbi_dependencies - docker logs $IMAGE_NAME - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: -- GitLab From 3cdeb456a2d18294f6c7998cb03e1b51268dc8c4 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 9 Apr 2025 17:22:54 +0000 Subject: [PATCH 387/463] Forecaster component: - Added missing dependencies --- src/forecaster/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/forecaster/Dockerfile b/src/forecaster/Dockerfile index f521eab40..8e4bd3c4e 100644 --- a/src/forecaster/Dockerfile +++ b/src/forecaster/Dockerfile @@ -72,6 +72,8 @@ COPY src/service/__init__.py service/__init__.py COPY src/service/client/. service/client/ COPY src/slice/__init__.py slice/__init__.py COPY src/slice/client/. slice/client/ +COPY src/vnt_manager/__init__.py vnt_manager/__init__.py +COPY src/vnt_manager/client/. vnt_manager/client/ COPY src/forecaster/. forecaster/ # Start the service -- GitLab From 1a2ad3f91f2b8404b9f60f808a8a6677ce8b769d Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Thu, 10 Apr 2025 10:57:52 +0200 Subject: [PATCH 388/463] Code cleanup --- proto/context.proto | 2 +- proto/nfv_client.proto | 51 -- proto/nos_client.proto | 33 - src/common/tools/object_factory/Device.py | 6 +- src/device/service/drivers/__init__.py | 2 +- .../drivers/smartnic/probes-agent.yang | 14 + .../nbi_plugins/agent_probes/Resources.py | 180 +---- .../nbi_plugins/agent_probes/Tools.py | 73 +-- .../nbi_plugins/agent_probes/__init__.py | 41 +- src/nbi/tests/data/agent_probes_device.json | 1 - src/policy/Dockerfile | 67 +- src/policy/src/main/proto/acl.proto | 70 +- src/policy/src/main/proto/context.proto | 616 +----------------- .../src/main/proto/context_policy.proto | 29 +- src/policy/src/main/proto/device.proto | 35 +- .../src/main/proto/kpi_sample_types.proto | 43 +- src/policy/src/main/proto/monitoring.proto | 175 +---- src/policy/src/main/proto/policy.proto | 114 +--- src/policy/src/main/proto/policy_action.proto | 43 +- .../src/main/proto/policy_condition.proto | 44 +- src/policy/src/main/proto/service.proto | 26 +- src/ztp/Dockerfile | 68 +- src/ztp/src/main/proto/acl.proto | 70 +- src/ztp/src/main/proto/context.proto | 616 +----------------- src/ztp/src/main/proto/device.proto | 35 +- src/ztp/src/main/proto/kpi_sample_types.proto | 43 +- src/ztp/src/main/proto/monitoring.proto | 175 +---- src/ztp/src/main/proto/ztp.proto | 70 +- 28 files changed, 42 insertions(+), 2700 deletions(-) delete mode 100644 proto/nfv_client.proto delete mode 100644 proto/nos_client.proto mode change 100644 => 120000 src/policy/Dockerfile mode change 100644 => 120000 src/policy/src/main/proto/acl.proto mode change 100644 => 120000 src/policy/src/main/proto/context.proto mode change 100644 => 120000 src/policy/src/main/proto/context_policy.proto mode change 100644 => 120000 src/policy/src/main/proto/device.proto mode change 100644 => 120000 src/policy/src/main/proto/kpi_sample_types.proto mode change 100644 => 120000 src/policy/src/main/proto/monitoring.proto mode change 100644 => 120000 src/policy/src/main/proto/policy.proto mode change 100644 => 120000 src/policy/src/main/proto/policy_action.proto mode change 100644 => 120000 src/policy/src/main/proto/policy_condition.proto mode change 100644 => 120000 src/policy/src/main/proto/service.proto mode change 100644 => 120000 src/ztp/Dockerfile mode change 100644 => 120000 src/ztp/src/main/proto/acl.proto mode change 100644 => 120000 src/ztp/src/main/proto/context.proto mode change 100644 => 120000 src/ztp/src/main/proto/device.proto mode change 100644 => 120000 src/ztp/src/main/proto/kpi_sample_types.proto mode change 100644 => 120000 src/ztp/src/main/proto/monitoring.proto mode change 100644 => 120000 src/ztp/src/main/proto/ztp.proto diff --git a/proto/context.proto b/proto/context.proto index b6b55c15f..d22dcdc43 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -497,7 +497,7 @@ message EndPointId { message EndPoint { EndPointId endpoint_id = 1; string name = 2; - string endpoint_type = 3; // == 'smartnics' + string endpoint_type = 3; repeated kpi_sample_types.KpiSampleType kpi_sample_types = 4; Location endpoint_location = 5; map capabilities = 6; diff --git a/proto/nfv_client.proto b/proto/nfv_client.proto deleted file mode 100644 index d903e7907..000000000 --- a/proto/nfv_client.proto +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package nfv_client; - -import "context.proto"; - -message Nsd { - string nsd_name = 1; - string config_params=2; -} - -message Ns { - string ns_id=1; - string ns_name=2; - string nsd_name=3; - string vim_account=4; - string config_params=5; - string status = 6; - string status_message = 7; -} - -message NsList { - repeated Ns ns = 1; -} - -message NsdList { - repeated Nsd nsd = 1; -} - -service nfv_client { - rpc GetNsList (context.Empty) returns (NsList) {} - rpc GetNsdList (context.Empty) returns (NsdList) {} - rpc CreateNs (Ns) returns (Ns) {} - rpc UpdateNs (Ns) returns (Ns) {} - rpc DeleteNs (Ns) returns (context.Empty) {} -} - - diff --git a/proto/nos_client.proto b/proto/nos_client.proto deleted file mode 100644 index e0e35a648..000000000 --- a/proto/nos_client.proto +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package nos_client; - -message NOS_SW { - string ztp_device_sw_url = 1; - bytes ztp_device_sw_file = 2; -} - -message Config_Script { - string config_script_url = 1; - bytes config_script_file = 2; -} - -service nos_client { - rpc GetNOSFile (NOS_SW) returns (NOS_SW) {} - rpc GetConfigScriptFile (Config_Script) returns (Config_Script) {} -} - - diff --git a/src/common/tools/object_factory/Device.py b/src/common/tools/object_factory/Device.py index bb5c85634..3d09d7156 100644 --- a/src/common/tools/object_factory/Device.py +++ b/src/common/tools/object_factory/Device.py @@ -12,13 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import copy, logging +import copy from typing import Dict, List, Optional, Tuple from common.DeviceTypes import DeviceTypeEnum from common.proto.context_pb2 import DeviceDriverEnum, DeviceOperationalStatusEnum from common.tools.object_factory.ConfigRule import json_config_rule_set -LOGGER = logging.getLogger(__name__) DEVICE_DISABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_DISABLED DEVICE_EMUDC_TYPE = DeviceTypeEnum.EMULATED_DATACENTER.value @@ -53,7 +52,6 @@ DEVICE_IETF_ACTN_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN] DEVICE_SMARTNIC_TYPE = DeviceTypeEnum.SMARTNIC.value DEVICE_SMARTNIC_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_SMARTNIC] - def json_device_id(device_uuid : str): return {'device_uuid': {'uuid': device_uuid}} @@ -63,13 +61,13 @@ def json_device( ): result = { 'device_id' : json_device_id(device_uuid), - 'name' : name, 'device_type' : device_type, 'device_config' : {'config_rules': copy.deepcopy(config_rules)}, 'device_operational_status': status, 'device_drivers' : copy.deepcopy(drivers), 'device_endpoints' : copy.deepcopy(endpoints), } + if name is not None: result['name'] = name return result def json_device_emulated_packet_router_disabled( diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index 3c1baf5df..ccb348c05 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -167,7 +167,7 @@ if LOAD_ALL_DEVICE_DRIVERS: DRIVERS.append( (SmartnicDriver, [ { - # Real P4 Switch, specifying P4 Driver => use P4Driver + # Real SmartNics device => use SmartNicsDriver FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.SMARTNIC, FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_SMARTNIC, } diff --git a/src/device/service/drivers/smartnic/probes-agent.yang b/src/device/service/drivers/smartnic/probes-agent.yang index 897d2f129..0ed81170a 100644 --- a/src/device/service/drivers/smartnic/probes-agent.yang +++ b/src/device/service/drivers/smartnic/probes-agent.yang @@ -1,3 +1,17 @@ +// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + module probes-agent { namespace "urn:probes-agent"; diff --git a/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py index 50e8e77af..3c3184323 100644 --- a/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Resources.py @@ -12,162 +12,22 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json -from flask.json import jsonify from flask_restful import Resource, request from common.proto.context_pb2 import Empty -from common.tools.grpc.Tools import grpc_message_to_json from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient -from service.client.ServiceClient import ServiceClient -from .Tools import ( - format_grpc_to_json, grpc_connection_id, grpc_context_id, grpc_device, grpc_device_id, grpc_link_id, grpc_policy_rule_id, - grpc_service_id, grpc_service, grpc_slice_id, grpc_topology_id) +from .Tools import format_grpc_to_json, grpc_device, grpc_device_id class _Resource(Resource): def __init__(self) -> None: super().__init__() self.client = ContextClient() self.device_client = DeviceClient() - self.service_client = ServiceClient() - -class ContextIds(_Resource): - def get(self): - return format_grpc_to_json(self.client.ListContextIds(Empty())) - -class Contexts(_Resource): - def get(self): - return format_grpc_to_json(self.client.ListContexts(Empty())) - -class DummyContexts(_Resource): - def get(self): - contexts = grpc_message_to_json(self.client.ListContexts(Empty()), use_integers_for_enums=True)['contexts'] - devices = grpc_message_to_json(self.client.ListDevices(Empty()), use_integers_for_enums=True)['devices'] - links = grpc_message_to_json(self.client.ListLinks(Empty()), use_integers_for_enums=True)['links'] - - topologies = list() - slices = list() - services = list() - connections = list() - - for context in contexts: - context_uuid = context['context_id']['context_uuid']['uuid'] - context_id = grpc_context_id(context_uuid) - - topologies.extend(grpc_message_to_json( - self.client.ListTopologies(context_id), - use_integers_for_enums=True - )['topologies']) - - slices.extend(grpc_message_to_json( - self.client.ListSlices(context_id), - use_integers_for_enums=True - )['slices']) - - context_services = grpc_message_to_json( - self.client.ListServices(context_id), - use_integers_for_enums=True - )['services'] - services.extend(context_services) - - for service in context_services: - service_uuid = service['service_id']['service_uuid']['uuid'] - service_id = grpc_service_id(context_uuid, service_uuid) - connections.extend(grpc_message_to_json( - self.client.ListConnections(service_id), - use_integers_for_enums=True - )['connections']) - - for device in devices: - for config_rule in device['device_config']['config_rules']: - if 'custom' not in config_rule: continue - resource_value = config_rule['custom']['resource_value'] - if not isinstance(resource_value, str): continue - try: - resource_value = json.loads(resource_value) - except: # pylint: disable=bare-except - pass - config_rule['custom']['resource_value'] = resource_value - - dummy_context = {'dummy_mode': True} - if len(contexts ) > 0: dummy_context['contexts' ] = contexts - if len(topologies ) > 0: dummy_context['topologies' ] = topologies - if len(devices ) > 0: dummy_context['devices' ] = devices - if len(links ) > 0: dummy_context['links' ] = links - if len(slices ) > 0: dummy_context['slices' ] = slices - if len(services ) > 0: dummy_context['services' ] = services - if len(connections) > 0: dummy_context['connections'] = connections - return jsonify(dummy_context) - -class Context(_Resource): - def get(self, context_uuid : str): - return format_grpc_to_json(self.client.GetContext(grpc_context_id(context_uuid))) - -class TopologyIds(_Resource): - def get(self, context_uuid : str): - return format_grpc_to_json(self.client.ListTopologyIds(grpc_context_id(context_uuid))) - -class Topologies(_Resource): - def get(self, context_uuid : str): - return format_grpc_to_json(self.client.ListTopologies(grpc_context_id(context_uuid))) - -class Topology(_Resource): - def get(self, context_uuid : str, topology_uuid : str): - return format_grpc_to_json(self.client.GetTopology(grpc_topology_id(context_uuid, topology_uuid))) - -class ServiceIds(_Resource): - def get(self, context_uuid : str): - return format_grpc_to_json(self.client.ListServiceIds(grpc_context_id(context_uuid))) - -class Services(_Resource): - def get(self, context_uuid : str): - return format_grpc_to_json(self.client.ListServices(grpc_context_id(context_uuid))) - -class Service(_Resource): - def get(self, context_uuid : str, service_uuid : str): - return format_grpc_to_json(self.client.GetService(grpc_service_id(context_uuid, service_uuid))) - - def post(self, context_uuid : str, service_uuid : str): # pylint: disable=unused-argument - service = request.get_json()['services'][0] - return format_grpc_to_json(self.service_client.CreateService(grpc_service( - service_uuid = service['service_id']['service_uuid']['uuid'], - service_type = service['service_type'], - context_uuid = service['service_id']['context_id']['context_uuid']['uuid'], - ))) - - def put(self, context_uuid : str, service_uuid : str): # pylint: disable=unused-argument - service = request.get_json()['services'][0] - return format_grpc_to_json(self.service_client.UpdateService(grpc_service( - service_uuid = service['service_id']['service_uuid']['uuid'], - service_type = service['service_type'], - context_uuid = service['service_id']['context_id']['context_uuid']['uuid'], - status = service['service_status']['service_status'], - endpoint_ids = service['service_endpoint_ids'], - constraints = service['service_constraints'], - config_rules = service['service_config']['config_rules'] - ))) - - def delete(self, context_uuid : str, service_uuid : str): - return format_grpc_to_json(self.service_client.DeleteService(grpc_service_id( - context_uuid, service_uuid, - ))) - -class SliceIds(_Resource): - def get(self, context_uuid : str): - return format_grpc_to_json(self.client.ListSliceIds(grpc_context_id(context_uuid))) - -class Slices(_Resource): - def get(self, context_uuid : str): - return format_grpc_to_json(self.client.ListSlices(grpc_context_id(context_uuid))) - -class Slice(_Resource): - def get(self, context_uuid : str, slice_uuid : str): - return format_grpc_to_json(self.client.GetSlice(grpc_slice_id(context_uuid, slice_uuid))) class DeviceIds(_Resource): def get(self): return format_grpc_to_json(self.client.ListDeviceIds(Empty())) - + class Devices(_Resource): def get(self): return format_grpc_to_json(self.client.ListDevices(Empty())) @@ -208,39 +68,3 @@ class Device(_Resource): config_rules = device['device_config']['config_rules'], drivers = device['device_drivers'] ))) - -class LinkIds(_Resource): - def get(self): - return format_grpc_to_json(self.client.ListLinkIds(Empty())) - -class Links(_Resource): - def get(self): - return format_grpc_to_json(self.client.ListLinks(Empty())) - -class Link(_Resource): - def get(self, link_uuid : str): - return format_grpc_to_json(self.client.GetLink(grpc_link_id(link_uuid))) - -class ConnectionIds(_Resource): - def get(self, context_uuid : str, service_uuid : str): - return format_grpc_to_json(self.client.ListConnectionIds(grpc_service_id(context_uuid, service_uuid))) - -class Connections(_Resource): - def get(self, context_uuid : str, service_uuid : str): - return format_grpc_to_json(self.client.ListConnections(grpc_service_id(context_uuid, service_uuid))) - -class Connection(_Resource): - def get(self, connection_uuid : str): - return format_grpc_to_json(self.client.GetConnection(grpc_connection_id(connection_uuid))) - -class PolicyRuleIds(_Resource): - def get(self): - return format_grpc_to_json(self.client.ListPolicyRuleIds(Empty())) - -class PolicyRules(_Resource): - def get(self): - return format_grpc_to_json(self.client.ListPolicyRules(Empty())) - -class PolicyRule(_Resource): - def get(self, policy_rule_uuid : str): - return format_grpc_to_json(self.client.GetPolicyRule(grpc_policy_rule_id(policy_rule_uuid))) diff --git a/src/nbi/service/rest_server/nbi_plugins/agent_probes/Tools.py b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Tools.py index 6cffbb5cc..27a2780bb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/agent_probes/Tools.py +++ b/src/nbi/service/rest_server/nbi_plugins/agent_probes/Tools.py @@ -12,45 +12,24 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging from flask.json import jsonify from common.proto.context_pb2 import ( - ConnectionId, ContextId, DeviceDriverEnum, Device, DeviceId, DeviceOperationalStatusEnum, LinkId, ServiceId, SliceId, TopologyId, Service, ServiceStatusEnum + DeviceDriverEnum, Device, DeviceId, DeviceOperationalStatusEnum ) -from common.proto.policy_pb2 import PolicyRuleId -from common.proto.context_pb2 import ConfigActionEnum -from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string -from common.tools.object_factory.Connection import json_connection_id -from common.tools.object_factory.Context import json_context_id +from common.tools.grpc.Tools import grpc_message_to_json from common.tools.object_factory.ConfigRule import json_config_rule -from common.tools.object_factory.Constraint import json_constraint_custom -from common.tools.object_factory.EndPoint import json_endpoint_id, json_endpoint +from common.tools.object_factory.EndPoint import json_endpoint from common.tools.object_factory.Device import json_device_id, json_device -from common.tools.object_factory.Link import json_link_id -from common.tools.object_factory.PolicyRule import json_policyrule_id -from common.tools.object_factory.Service import json_service_id, json_service -from common.tools.object_factory.Slice import json_slice_id -from common.tools.object_factory.Topology import json_topology_id - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) def format_grpc_to_json(grpc_reply): return jsonify(grpc_message_to_json(grpc_reply)) -def grpc_connection_id(connection_uuid): - return ConnectionId(**json_connection_id(connection_uuid)) - -def grpc_context_id(context_uuid): - return ContextId(**json_context_id(context_uuid)) - def grpc_device_id(device_uuid): return DeviceId(**json_device_id(device_uuid)) def grpc_device( device_uuid, device_type, status, endpoints=None, config_rules=None, drivers=None ): - json_config_rules = [ json_config_rule( config_rule['action'], @@ -74,49 +53,3 @@ def grpc_device( ] if endpoints else [] return Device(**json_device( device_uuid, device_type, json_status, None, json_endpoints, json_config_rules, json_drivers)) - -def grpc_link_id(link_uuid): - return LinkId(**json_link_id(link_uuid)) - -def grpc_service_id(context_uuid, service_uuid): - return ServiceId(**json_service_id(service_uuid, context_id=json_context_id(context_uuid))) - -def grpc_service( - service_uuid, service_type, context_uuid, status=None, endpoint_ids=None, constraints=None, config_rules=None -): - json_context = json_context_id(context_uuid) - json_status = status if status else ServiceStatusEnum.SERVICESTATUS_PLANNED - json_endpoints_ids = [ - json_endpoint_id( - json_device_id(endpoint_id['device_id']['device_uuid']['uuid']), - endpoint_id['endpoint_uuid']['uuid'] - ) - for endpoint_id in endpoint_ids - ] if endpoint_ids else [] - json_constraints = [ - json_constraint_custom( - constraint['custom']['constraint_type'], - constraint['custom']['constraint_value'] - ) - for constraint in constraints - ] if constraints else [] - json_config_rules = [ - json_config_rule( - config_rule['action'], - config_rule['custom']['resource_key'], - config_rule['custom']['resource_value'] - ) - for config_rule in config_rules - ] if config_rules else [] - return Service(**json_service( - service_uuid, service_type, json_context, json_status, - json_endpoints_ids, json_constraints, json_config_rules)) - -def grpc_slice_id(context_uuid, slice_uuid): - return SliceId(**json_slice_id(slice_uuid, context_id=json_context_id(context_uuid))) - -def grpc_topology_id(context_uuid, topology_uuid): - return TopologyId(**json_topology_id(topology_uuid, context_id=json_context_id(context_uuid))) - -def grpc_policy_rule_id(policy_rule_uuid): - return PolicyRuleId(**json_policyrule_id(policy_rule_uuid)) diff --git a/src/nbi/service/rest_server/nbi_plugins/agent_probes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/agent_probes/__init__.py index 0b85500fc..f28a2ad56 100644 --- a/src/nbi/service/rest_server/nbi_plugins/agent_probes/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/agent_probes/__init__.py @@ -13,55 +13,16 @@ # limitations under the License. from nbi.service.rest_server.RestServer import RestServer -from .Resources import ( - Connection, ConnectionIds, Connections, - Context, ContextIds, Contexts, - Device, DeviceIds, Devices, - DummyContexts, - Link, LinkIds, Links, - PolicyRule, PolicyRuleIds, PolicyRules, - Service, ServiceIds, Services, - Slice, SliceIds, Slices, - Topologies, Topology, TopologyIds -) +from .Resources import Device, DeviceIds, Devices URL_PREFIX = '/agent-probes' # Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. RESOURCES = [ # (endpoint_name, resource_class, resource_url) - # ('api.context_ids', ContextIds, '/context_ids'), - # ('api.contexts', Contexts, '/contexts'), - # ('api.dummy_contexts', DummyContexts, '/dummy_contexts'), - # ('api.context', Context, '/context/'), - - # ('api.topology_ids', TopologyIds, '/context//topology_ids'), - # ('api.topologies', Topologies, '/context//topologies'), - # ('api.topology', Topology, '/context//topology/'), - - # ('api.service_ids', ServiceIds, '/context//service_ids'), - # ('api.services', Services, '/context//services'), - # ('api.service', Service, '/context//service/'), - - # ('api.slice_ids', SliceIds, '/context//slice_ids'), - # ('api.slices', Slices, '/context//slices'), - # ('api.slice', Slice, '/context//slice/'), - ('api.smartnic.device_ids', DeviceIds, '/device_ids'), ('api.smartnic.devices', Devices, '/devices'), ('api.smartnic.device', Device, '/device/'), - - # ('api.link_ids', LinkIds, '/link_ids'), - # ('api.links', Links, '/links'), - # ('api.link', Link, '/link/'), - - # ('api.connection_ids', ConnectionIds, '/context//service//connection_ids'), - # ('api.connections', Connections, '/context//service//connections'), - # ('api.connection', Connection, '/connection/'), - - # ('api.policyrule_ids', PolicyRuleIds, '/policyrule_ids'), - # ('api.policyrules', PolicyRules, '/policyrules'), - # ('api.policyrule', PolicyRule, '/policyrule/'), ] def register_agent_probes(rest_server : RestServer): diff --git a/src/nbi/tests/data/agent_probes_device.json b/src/nbi/tests/data/agent_probes_device.json index e9d931528..6170e88a1 100644 --- a/src/nbi/tests/data/agent_probes_device.json +++ b/src/nbi/tests/data/agent_probes_device.json @@ -24,4 +24,3 @@ ] } - \ No newline at end of file diff --git a/src/policy/Dockerfile b/src/policy/Dockerfile deleted file mode 100644 index 2c6412d07..000000000 --- a/src/policy/Dockerfile +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Multi-stage Docker image build - -# Stage 1 -FROM maven:3-jdk-11 AS builder - -# Define working directory -WORKDIR /app - -# Copy every file in working directory, as defined in .dockerignore file -COPY ./pom.xml pom.xml -COPY ./src src/ -COPY ./target/generated-sources/ target/generated-sources/ -RUN mvn --errors --batch-mode package -Dmaven.test.skip=true - -# Stage 2 -FROM builder AS unit-test - -RUN mvn --errors --batch-mode -Pgenerate-consolidated-coverage verify - -# Stage 3 -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4 AS release - -ARG JAVA_PACKAGE=java-11-openjdk-headless -ARG RUN_JAVA_VERSION=1.3.8 -ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' -# Install java and the run-java script -# Also set up permissions for user `1001` -RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ - && microdnf update \ - && microdnf clean all \ - && mkdir /deployments \ - && chown 1001 /deployments \ - && chmod "g+rwX" /deployments \ - && chown 1001:root /deployments \ - && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \ - && chown 1001 /deployments/run-java.sh \ - && chmod 540 /deployments/run-java.sh \ - && echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/conf/security/java.security - -# Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size. -ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" -# We make four distinct layers so if there are application changes the library layers can be re-used -COPY --from=builder --chown=1001 /app/target/quarkus-app/lib/ /deployments/lib/ -COPY --from=builder --chown=1001 /app/target/quarkus-app/*.jar /deployments/ -COPY --from=builder --chown=1001 /app/target/quarkus-app/app/ /deployments/app/ -COPY --from=builder --chown=1001 /app/target/quarkus-app/quarkus/ /deployments/quarkus/ - -EXPOSE 8080 -EXPOSE 6060 -USER 1001 - -ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/src/policy/Dockerfile b/src/policy/Dockerfile new file mode 120000 index 000000000..eec732273 --- /dev/null +++ b/src/policy/Dockerfile @@ -0,0 +1 @@ +src/main/docker/Dockerfile.multistage.jvm \ No newline at end of file diff --git a/src/policy/src/main/proto/acl.proto b/src/policy/src/main/proto/acl.proto deleted file mode 100644 index 3dba735dc..000000000 --- a/src/policy/src/main/proto/acl.proto +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package acl; - -enum AclRuleTypeEnum { - ACLRULETYPE_UNDEFINED = 0; - ACLRULETYPE_IPV4 = 1; - ACLRULETYPE_IPV6 = 2; - ACLRULETYPE_L2 = 3; - ACLRULETYPE_MPLS = 4; - ACLRULETYPE_MIXED = 5; -} - -enum AclForwardActionEnum { - ACLFORWARDINGACTION_UNDEFINED = 0; - ACLFORWARDINGACTION_DROP = 1; - ACLFORWARDINGACTION_ACCEPT = 2; - ACLFORWARDINGACTION_REJECT = 3; -} - -enum AclLogActionEnum { - ACLLOGACTION_UNDEFINED = 0; - ACLLOGACTION_NOLOG = 1; - ACLLOGACTION_SYSLOG = 2; -} - -message AclMatch { - uint32 dscp = 1; - uint32 protocol = 2; - string src_address = 3; - string dst_address = 4; - uint32 src_port = 5; - uint32 dst_port = 6; - uint32 start_mpls_label = 7; - uint32 end_mpls_label = 8; -} - -message AclAction { - AclForwardActionEnum forward_action = 1; - AclLogActionEnum log_action = 2; -} - -message AclEntry { - uint32 sequence_id = 1; - string description = 2; - AclMatch match = 3; - AclAction action = 4; -} - -message AclRuleSet { - string name = 1; - AclRuleTypeEnum type = 2; - string description = 3; - string user_id = 4; - repeated AclEntry entries = 5; -} diff --git a/src/policy/src/main/proto/acl.proto b/src/policy/src/main/proto/acl.proto new file mode 120000 index 000000000..158ae78eb --- /dev/null +++ b/src/policy/src/main/proto/acl.proto @@ -0,0 +1 @@ +../../../../../proto/acl.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/context.proto b/src/policy/src/main/proto/context.proto deleted file mode 100644 index fce1e71ad..000000000 --- a/src/policy/src/main/proto/context.proto +++ /dev/null @@ -1,615 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package context; - -import "acl.proto"; -import "kpi_sample_types.proto"; - -service ContextService { - rpc ListContextIds (Empty ) returns ( ContextIdList ) {} - rpc ListContexts (Empty ) returns ( ContextList ) {} - rpc GetContext (ContextId ) returns ( Context ) {} - rpc SetContext (Context ) returns ( ContextId ) {} - rpc RemoveContext (ContextId ) returns ( Empty ) {} - rpc GetContextEvents (Empty ) returns (stream ContextEvent ) {} - - rpc ListTopologyIds (ContextId ) returns ( TopologyIdList ) {} - rpc ListTopologies (ContextId ) returns ( TopologyList ) {} - rpc GetTopology (TopologyId ) returns ( Topology ) {} - rpc GetTopologyDetails (TopologyId ) returns ( TopologyDetails ) {} - rpc SetTopology (Topology ) returns ( TopologyId ) {} - rpc RemoveTopology (TopologyId ) returns ( Empty ) {} - rpc GetTopologyEvents (Empty ) returns (stream TopologyEvent ) {} - - rpc ListDeviceIds (Empty ) returns ( DeviceIdList ) {} - rpc ListDevices (Empty ) returns ( DeviceList ) {} - rpc GetDevice (DeviceId ) returns ( Device ) {} - rpc SetDevice (Device ) returns ( DeviceId ) {} - rpc RemoveDevice (DeviceId ) returns ( Empty ) {} - rpc GetDeviceEvents (Empty ) returns (stream DeviceEvent ) {} - rpc SelectDevice (DeviceFilter ) returns ( DeviceList ) {} - rpc ListEndPointNames (EndPointIdList) returns ( EndPointNameList) {} - - rpc ListLinkIds (Empty ) returns ( LinkIdList ) {} - rpc ListLinks (Empty ) returns ( LinkList ) {} - rpc GetLink (LinkId ) returns ( Link ) {} - rpc SetLink (Link ) returns ( LinkId ) {} - rpc RemoveLink (LinkId ) returns ( Empty ) {} - rpc GetLinkEvents (Empty ) returns (stream LinkEvent ) {} - - rpc ListServiceIds (ContextId ) returns ( ServiceIdList ) {} - rpc ListServices (ContextId ) returns ( ServiceList ) {} - rpc GetService (ServiceId ) returns ( Service ) {} - rpc SetService (Service ) returns ( ServiceId ) {} - rpc UnsetService (Service ) returns ( ServiceId ) {} - rpc RemoveService (ServiceId ) returns ( Empty ) {} - rpc GetServiceEvents (Empty ) returns (stream ServiceEvent ) {} - rpc SelectService (ServiceFilter ) returns ( ServiceList ) {} - - rpc ListSliceIds (ContextId ) returns ( SliceIdList ) {} - rpc ListSlices (ContextId ) returns ( SliceList ) {} - rpc GetSlice (SliceId ) returns ( Slice ) {} - rpc SetSlice (Slice ) returns ( SliceId ) {} - rpc UnsetSlice (Slice ) returns ( SliceId ) {} - rpc RemoveSlice (SliceId ) returns ( Empty ) {} - rpc GetSliceEvents (Empty ) returns (stream SliceEvent ) {} - rpc SelectSlice (SliceFilter ) returns ( SliceList ) {} - - rpc ListConnectionIds (ServiceId ) returns ( ConnectionIdList) {} - rpc ListConnections (ServiceId ) returns ( ConnectionList ) {} - rpc GetConnection (ConnectionId ) returns ( Connection ) {} - rpc SetConnection (Connection ) returns ( ConnectionId ) {} - rpc RemoveConnection (ConnectionId ) returns ( Empty ) {} - rpc GetConnectionEvents(Empty ) returns (stream ConnectionEvent ) {} -} - -// ----- Generic ------------------------------------------------------------------------------------------------------- -message Empty {} - -message Uuid { - string uuid = 1; -} - -enum EventTypeEnum { - EVENTTYPE_UNDEFINED = 0; - EVENTTYPE_CREATE = 1; - EVENTTYPE_UPDATE = 2; - EVENTTYPE_REMOVE = 3; -} - -message Timestamp { - double timestamp = 1; -} - -message Event { - Timestamp timestamp = 1; - EventTypeEnum event_type = 2; -} - -// ----- Context ------------------------------------------------------------------------------------------------------- -message ContextId { - Uuid context_uuid = 1; -} - -message Context { - ContextId context_id = 1; - string name = 2; - repeated TopologyId topology_ids = 3; - repeated ServiceId service_ids = 4; - repeated SliceId slice_ids = 5; - TeraFlowController controller = 6; -} - -message ContextIdList { - repeated ContextId context_ids = 1; -} - -message ContextList { - repeated Context contexts = 1; -} - -message ContextEvent { - Event event = 1; - ContextId context_id = 2; -} - - -// ----- Topology ------------------------------------------------------------------------------------------------------ -message TopologyId { - ContextId context_id = 1; - Uuid topology_uuid = 2; -} - -message Topology { - TopologyId topology_id = 1; - string name = 2; - repeated DeviceId device_ids = 3; - repeated LinkId link_ids = 4; -} - -message TopologyDetails { - TopologyId topology_id = 1; - string name = 2; - repeated Device devices = 3; - repeated Link links = 4; -} - -message TopologyIdList { - repeated TopologyId topology_ids = 1; -} - -message TopologyList { - repeated Topology topologies = 1; -} - -message TopologyEvent { - Event event = 1; - TopologyId topology_id = 2; -} - - -// ----- Device -------------------------------------------------------------------------------------------------------- -message DeviceId { - Uuid device_uuid = 1; -} - -message Device { - DeviceId device_id = 1; - string name = 2; - string device_type = 3; - DeviceConfig device_config = 4; - DeviceOperationalStatusEnum device_operational_status = 5; - repeated DeviceDriverEnum device_drivers = 6; - repeated EndPoint device_endpoints = 7; - repeated Component components = 8; // Used for inventory - DeviceId controller_id = 9; // Identifier of node controlling the actual device -} - -message Component { //Defined previously to this section - Tested OK - Uuid component_uuid = 1; - string name = 2; - string type = 3; - - map attributes = 4; // dict[attr.name => json.dumps(attr.value)] - string parent = 5; -} - -message DeviceConfig { - repeated ConfigRule config_rules = 1; -} - -enum DeviceDriverEnum { - DEVICEDRIVER_UNDEFINED = 0; // also used for emulated - DEVICEDRIVER_OPENCONFIG = 1; - DEVICEDRIVER_TRANSPORT_API = 2; - DEVICEDRIVER_P4 = 3; - DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; - DEVICEDRIVER_ONF_TR_532 = 5; - DEVICEDRIVER_XR = 6; - DEVICEDRIVER_IETF_L2VPN = 7; - DEVICEDRIVER_GNMI_OPENCONFIG = 8; - DEVICEDRIVER_FLEXSCALE = 9; - DEVICEDRIVER_IETF_ACTN = 10; - DEVICEDRIVER_SMARTNIC = 11; -} - -enum DeviceOperationalStatusEnum { - DEVICEOPERATIONALSTATUS_UNDEFINED = 0; - DEVICEOPERATIONALSTATUS_DISABLED = 1; - DEVICEOPERATIONALSTATUS_ENABLED = 2; -} - -message DeviceIdList { - repeated DeviceId device_ids = 1; -} - -message DeviceList { - repeated Device devices = 1; -} - -message DeviceFilter { - DeviceIdList device_ids = 1; - bool include_endpoints = 2; - bool include_config_rules = 3; - bool include_components = 4; -} - -message DeviceEvent { - Event event = 1; - DeviceId device_id = 2; - DeviceConfig device_config = 3; -} - - -// ----- Link ---------------------------------------------------------------------------------------------------------- -message LinkId { - Uuid link_uuid = 1; -} - -message LinkAttributes { - float total_capacity_gbps = 1; - float used_capacity_gbps = 2; -} - -message Link { - LinkId link_id = 1; - string name = 2; - repeated EndPointId link_endpoint_ids = 3; - LinkAttributes attributes = 4; -} - -message LinkIdList { - repeated LinkId link_ids = 1; -} - -message LinkList { - repeated Link links = 1; -} - -message LinkEvent { - Event event = 1; - LinkId link_id = 2; -} - - -// ----- Service ------------------------------------------------------------------------------------------------------- -message ServiceId { - ContextId context_id = 1; - Uuid service_uuid = 2; -} - -message Service { - ServiceId service_id = 1; - string name = 2; - ServiceTypeEnum service_type = 3; - repeated EndPointId service_endpoint_ids = 4; - repeated Constraint service_constraints = 5; - ServiceStatus service_status = 6; - ServiceConfig service_config = 7; - Timestamp timestamp = 8; -} - -enum ServiceTypeEnum { - SERVICETYPE_UNKNOWN = 0; - SERVICETYPE_L3NM = 1; - SERVICETYPE_L2NM = 2; - SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; - SERVICETYPE_TE = 4; - SERVICETYPE_E2E = 5; -} - -enum ServiceStatusEnum { - SERVICESTATUS_UNDEFINED = 0; - SERVICESTATUS_PLANNED = 1; - SERVICESTATUS_ACTIVE = 2; - SERVICESTATUS_UPDATING = 3; - SERVICESTATUS_PENDING_REMOVAL = 4; - SERVICESTATUS_SLA_VIOLATED = 5; -} - -message ServiceStatus { - ServiceStatusEnum service_status = 1; -} - -message ServiceConfig { - repeated ConfigRule config_rules = 1; -} - -message ServiceIdList { - repeated ServiceId service_ids = 1; -} - -message ServiceList { - repeated Service services = 1; -} - -message ServiceFilter { - ServiceIdList service_ids = 1; - bool include_endpoint_ids = 2; - bool include_constraints = 3; - bool include_config_rules = 4; -} - -message ServiceEvent { - Event event = 1; - ServiceId service_id = 2; -} - -// ----- Slice --------------------------------------------------------------------------------------------------------- -message SliceId { - ContextId context_id = 1; - Uuid slice_uuid = 2; -} - -message Slice { - SliceId slice_id = 1; - string name = 2; - repeated EndPointId slice_endpoint_ids = 3; - repeated Constraint slice_constraints = 4; - repeated ServiceId slice_service_ids = 5; - repeated SliceId slice_subslice_ids = 6; - SliceStatus slice_status = 7; - SliceConfig slice_config = 8; - SliceOwner slice_owner = 9; - Timestamp timestamp = 10; -} - -message SliceOwner { - Uuid owner_uuid = 1; - string owner_string = 2; -} - -enum SliceStatusEnum { - SLICESTATUS_UNDEFINED = 0; - SLICESTATUS_PLANNED = 1; - SLICESTATUS_INIT = 2; - SLICESTATUS_ACTIVE = 3; - SLICESTATUS_DEINIT = 4; - SLICESTATUS_SLA_VIOLATED = 5; -} - -message SliceStatus { - SliceStatusEnum slice_status = 1; -} - -message SliceConfig { - repeated ConfigRule config_rules = 1; -} - -message SliceIdList { - repeated SliceId slice_ids = 1; -} - -message SliceList { - repeated Slice slices = 1; -} - -message SliceFilter { - SliceIdList slice_ids = 1; - bool include_endpoint_ids = 2; - bool include_constraints = 3; - bool include_service_ids = 4; - bool include_subslice_ids = 5; - bool include_config_rules = 6; -} - -message SliceEvent { - Event event = 1; - SliceId slice_id = 2; -} - -// ----- Connection ---------------------------------------------------------------------------------------------------- -message ConnectionId { - Uuid connection_uuid = 1; -} - -message ConnectionSettings_L0 { - string lsp_symbolic_name = 1; -} - -message ConnectionSettings_L2 { - string src_mac_address = 1; - string dst_mac_address = 2; - uint32 ether_type = 3; - uint32 vlan_id = 4; - uint32 mpls_label = 5; - uint32 mpls_traffic_class = 6; -} - -message ConnectionSettings_L3 { - string src_ip_address = 1; - string dst_ip_address = 2; - uint32 dscp = 3; - uint32 protocol = 4; - uint32 ttl = 5; -} - -message ConnectionSettings_L4 { - uint32 src_port = 1; - uint32 dst_port = 2; - uint32 tcp_flags = 3; - uint32 ttl = 4; -} - -message ConnectionSettings { - ConnectionSettings_L0 l0 = 1; - ConnectionSettings_L2 l2 = 2; - ConnectionSettings_L3 l3 = 3; - ConnectionSettings_L4 l4 = 4; -} - -message Connection { - ConnectionId connection_id = 1; - ServiceId service_id = 2; - repeated EndPointId path_hops_endpoint_ids = 3; - repeated ServiceId sub_service_ids = 4; - ConnectionSettings settings = 5; -} - -message ConnectionIdList { - repeated ConnectionId connection_ids = 1; -} - -message ConnectionList { - repeated Connection connections = 1; -} - -message ConnectionEvent { - Event event = 1; - ConnectionId connection_id = 2; -} - - -// ----- Endpoint ------------------------------------------------------------------------------------------------------ -message EndPointId { - TopologyId topology_id = 1; - DeviceId device_id = 2; - Uuid endpoint_uuid = 3; -} - -message EndPoint { - EndPointId endpoint_id = 1; - string name = 2; - string endpoint_type = 3; - repeated kpi_sample_types.KpiSampleType kpi_sample_types = 4; - Location endpoint_location = 5; -} - -message EndPointName { - EndPointId endpoint_id = 1; - string device_name = 2; - string endpoint_name = 3; - string endpoint_type = 4; -} - -message EndPointIdList { - repeated EndPointId endpoint_ids = 1; -} - -message EndPointNameList { - repeated EndPointName endpoint_names = 1; -} - - -// ----- Configuration ------------------------------------------------------------------------------------------------- -enum ConfigActionEnum { - CONFIGACTION_UNDEFINED = 0; - CONFIGACTION_SET = 1; - CONFIGACTION_DELETE = 2; -} - -message ConfigRule_Custom { - string resource_key = 1; - string resource_value = 2; -} - -message ConfigRule_ACL { - EndPointId endpoint_id = 1; - acl.AclRuleSet rule_set = 2; -} - -message ConfigRule { - ConfigActionEnum action = 1; - oneof config_rule { - ConfigRule_Custom custom = 2; - ConfigRule_ACL acl = 3; - } -} - - -// ----- Constraint ---------------------------------------------------------------------------------------------------- -enum ConstraintActionEnum { - CONSTRAINTACTION_UNDEFINED = 0; - CONSTRAINTACTION_SET = 1; - CONSTRAINTACTION_DELETE = 2; -} - -message Constraint_Custom { - string constraint_type = 1; - string constraint_value = 2; -} - -message Constraint_Schedule { - float start_timestamp = 1; - float duration_days = 2; -} - -message GPS_Position { - float latitude = 1; - float longitude = 2; -} - -message Location { - oneof location { - string region = 1; - GPS_Position gps_position = 2; - } -} - -message Constraint_EndPointLocation { - EndPointId endpoint_id = 1; - Location location = 2; -} - -message Constraint_EndPointPriority { - EndPointId endpoint_id = 1; - uint32 priority = 2; -} - -message Constraint_SLA_Latency { - float e2e_latency_ms = 1; -} - -message Constraint_SLA_Capacity { - float capacity_gbps = 1; -} - -message Constraint_SLA_Availability { - uint32 num_disjoint_paths = 1; - bool all_active = 2; - float availability = 3; // 0.0 .. 100.0 percentage of availability -} - -enum IsolationLevelEnum { - NO_ISOLATION = 0; - PHYSICAL_ISOLATION = 1; - LOGICAL_ISOLATION = 2; - PROCESS_ISOLATION = 3; - PHYSICAL_MEMORY_ISOLATION = 4; - PHYSICAL_NETWORK_ISOLATION = 5; - VIRTUAL_RESOURCE_ISOLATION = 6; - NETWORK_FUNCTIONS_ISOLATION = 7; - SERVICE_ISOLATION = 8; -} - -message Constraint_SLA_Isolation_level { - repeated IsolationLevelEnum isolation_level = 1; -} - -message Constraint_Exclusions { - bool is_permanent = 1; - repeated DeviceId device_ids = 2; - repeated EndPointId endpoint_ids = 3; - repeated LinkId link_ids = 4; -} - -message Constraint { - ConstraintActionEnum action = 1; - oneof constraint { - Constraint_Custom custom = 2; - Constraint_Schedule schedule = 3; - Constraint_EndPointLocation endpoint_location = 4; - Constraint_EndPointPriority endpoint_priority = 5; - Constraint_SLA_Capacity sla_capacity = 6; - Constraint_SLA_Latency sla_latency = 7; - Constraint_SLA_Availability sla_availability = 8; - Constraint_SLA_Isolation_level sla_isolation = 9; - Constraint_Exclusions exclusions = 10; - } -} - - -// ----- Miscellaneous ------------------------------------------------------------------------------------------------- -message TeraFlowController { - ContextId context_id = 1; - string ip_address = 2; - uint32 port = 3; -} - -message AuthenticationResult { - ContextId context_id = 1; - bool authenticated = 2; -} diff --git a/src/policy/src/main/proto/context.proto b/src/policy/src/main/proto/context.proto new file mode 120000 index 000000000..7f33c4bc7 --- /dev/null +++ b/src/policy/src/main/proto/context.proto @@ -0,0 +1 @@ +../../../../../proto/context.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/context_policy.proto b/src/policy/src/main/proto/context_policy.proto deleted file mode 100644 index f6dae4830..000000000 --- a/src/policy/src/main/proto/context_policy.proto +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package context_policy; - -import "context.proto"; -import "policy.proto"; - -// created as a separate service to prevent import-loops in context and policy -service ContextPolicyService { - rpc ListPolicyRuleIds(context.Empty ) returns (policy.PolicyRuleIdList) {} - rpc ListPolicyRules (context.Empty ) returns (policy.PolicyRuleList ) {} - rpc GetPolicyRule (policy.PolicyRuleId ) returns (policy.PolicyRule ) {} - rpc SetPolicyRule (policy.PolicyRule ) returns (policy.PolicyRuleId ) {} - rpc RemovePolicyRule (policy.PolicyRuleId ) returns (context.Empty ) {} -} diff --git a/src/policy/src/main/proto/context_policy.proto b/src/policy/src/main/proto/context_policy.proto new file mode 120000 index 000000000..d41593dde --- /dev/null +++ b/src/policy/src/main/proto/context_policy.proto @@ -0,0 +1 @@ +../../../../../proto/context_policy.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/device.proto b/src/policy/src/main/proto/device.proto deleted file mode 100644 index 30e60079d..000000000 --- a/src/policy/src/main/proto/device.proto +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package device; - -import "context.proto"; -import "monitoring.proto"; - -service DeviceService { - rpc AddDevice (context.Device ) returns (context.DeviceId ) {} - rpc ConfigureDevice (context.Device ) returns (context.DeviceId ) {} - rpc DeleteDevice (context.DeviceId ) returns (context.Empty ) {} - rpc GetInitialConfig(context.DeviceId ) returns (context.DeviceConfig) {} - rpc MonitorDeviceKpi(MonitoringSettings) returns (context.Empty ) {} -} - -message MonitoringSettings { - monitoring.KpiId kpi_id = 1; - monitoring.KpiDescriptor kpi_descriptor = 2; - float sampling_duration_s = 3; - float sampling_interval_s = 4; -} diff --git a/src/policy/src/main/proto/device.proto b/src/policy/src/main/proto/device.proto new file mode 120000 index 000000000..ad6e7c47e --- /dev/null +++ b/src/policy/src/main/proto/device.proto @@ -0,0 +1 @@ +../../../../../proto/device.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/kpi_sample_types.proto b/src/policy/src/main/proto/kpi_sample_types.proto deleted file mode 100644 index 5b234a4e3..000000000 --- a/src/policy/src/main/proto/kpi_sample_types.proto +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package kpi_sample_types; - -enum KpiSampleType { - KPISAMPLETYPE_UNKNOWN = 0; - - KPISAMPLETYPE_PACKETS_TRANSMITTED = 101; - KPISAMPLETYPE_PACKETS_RECEIVED = 102; - KPISAMPLETYPE_PACKETS_DROPPED = 103; - KPISAMPLETYPE_BYTES_TRANSMITTED = 201; - KPISAMPLETYPE_BYTES_RECEIVED = 202; - KPISAMPLETYPE_BYTES_DROPPED = 203; - - KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS = 301; - KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS = 302; - - KPISAMPLETYPE_ML_CONFIDENCE = 401; //. can be used by both optical and L3 without any issue - - KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501; //. can be used by both optical and L3 without any issue - - KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601; - KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602; - KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603; - KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604; - KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605; - - KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; -} diff --git a/src/policy/src/main/proto/kpi_sample_types.proto b/src/policy/src/main/proto/kpi_sample_types.proto new file mode 120000 index 000000000..98e748bbf --- /dev/null +++ b/src/policy/src/main/proto/kpi_sample_types.proto @@ -0,0 +1 @@ +../../../../../proto/kpi_sample_types.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/monitoring.proto b/src/policy/src/main/proto/monitoring.proto deleted file mode 100644 index 45ba48b02..000000000 --- a/src/policy/src/main/proto/monitoring.proto +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package monitoring; - -import "context.proto"; -import "kpi_sample_types.proto"; - -service MonitoringService { - rpc SetKpi (KpiDescriptor ) returns (KpiId ) {} // Stable not final - rpc DeleteKpi (KpiId ) returns (context.Empty ) {} // Stable and final - rpc GetKpiDescriptor (KpiId ) returns (KpiDescriptor ) {} // Stable and final - rpc GetKpiDescriptorList (context.Empty ) returns (KpiDescriptorList ) {} // Stable and final - rpc IncludeKpi (Kpi ) returns (context.Empty ) {} // Stable and final - rpc MonitorKpi (MonitorKpiRequest ) returns (context.Empty ) {} // Stable and final - rpc QueryKpiData (KpiQuery ) returns (RawKpiTable ) {} // Not implemented - rpc SetKpiSubscription (SubsDescriptor ) returns (stream SubsResponse ) {} // Stable not final - rpc GetSubsDescriptor (SubscriptionID ) returns (SubsDescriptor ) {} // Stable and final - rpc GetSubscriptions (context.Empty ) returns (SubsList ) {} // Stable and final - rpc DeleteSubscription (SubscriptionID ) returns (context.Empty ) {} // Stable and final - rpc SetKpiAlarm (AlarmDescriptor ) returns (AlarmID ) {} // Stable not final - rpc GetAlarms (context.Empty ) returns (AlarmList ) {} // Stable and final - rpc GetAlarmDescriptor (AlarmID ) returns (AlarmDescriptor ) {} // Stable and final - rpc GetAlarmResponseStream(AlarmSubscription ) returns (stream AlarmResponse) {} // Not Stable not final - rpc DeleteAlarm (AlarmID ) returns (context.Empty ) {} // Stable and final - rpc GetStreamKpi (KpiId ) returns (stream Kpi ) {} // Stable not final - rpc GetInstantKpi (KpiId ) returns (Kpi ) {} // Stable not final -} - -message KpiDescriptor { - KpiId kpi_id = 1; - string kpi_description = 2; - repeated KpiId kpi_id_list = 3; - kpi_sample_types.KpiSampleType kpi_sample_type = 4; - context.DeviceId device_id = 5; - context.EndPointId endpoint_id = 6; - context.ServiceId service_id = 7; - context.SliceId slice_id = 8; - context.ConnectionId connection_id = 9; - context.LinkId link_id = 10; -} - -message MonitorKpiRequest { - KpiId kpi_id = 1; - float monitoring_window_s = 2; - float sampling_rate_s = 3; - // Pending add field to reflect Available Device Protocols -} - -message KpiQuery { - repeated KpiId kpi_ids = 1; - float monitoring_window_s = 2; - uint32 last_n_samples = 3; // used when you want something like "get the last N many samples - context.Timestamp start_timestamp = 4; // used when you want something like "get the samples since X date/time" - context.Timestamp end_timestamp = 5; // used when you want something like "get the samples until X date/time" -} - - -message RawKpi { // cell - context.Timestamp timestamp = 1; - KpiValue kpi_value = 2; -} - -message RawKpiList { // column - KpiId kpi_id = 1; - repeated RawKpi raw_kpis = 2; -} - -message RawKpiTable { // table - repeated RawKpiList raw_kpi_lists = 1; -} - -message KpiId { - context.Uuid kpi_id = 1; -} - -message Kpi { - KpiId kpi_id = 1; - context.Timestamp timestamp = 2; - KpiValue kpi_value = 3; -} - -message KpiValueRange { - KpiValue kpiMinValue = 1; - KpiValue kpiMaxValue = 2; - bool inRange = 3; // by default True - bool includeMinValue = 4; // False is outside the interval - bool includeMaxValue = 5; // False is outside the interval -} - -message KpiValue { - oneof value { - int32 int32Val = 1; - uint32 uint32Val = 2; - int64 int64Val = 3; - uint64 uint64Val = 4; - float floatVal = 5; - string stringVal = 6; - bool boolVal = 7; - } -} - - -message KpiList { - repeated Kpi kpi = 1; -} - -message KpiDescriptorList { - repeated KpiDescriptor kpi_descriptor_list = 1; -} - -message SubsDescriptor{ - SubscriptionID subs_id = 1; - KpiId kpi_id = 2; - float sampling_duration_s = 3; - float sampling_interval_s = 4; - context.Timestamp start_timestamp = 5; // used when you want something like "get the samples since X date/time" - context.Timestamp end_timestamp = 6; // used when you want something like "get the samples until X date/time" - // Pending add field to reflect Available Device Protocols -} - -message SubscriptionID { - context.Uuid subs_id = 1; -} - -message SubsResponse { - SubscriptionID subs_id = 1; - KpiList kpi_list = 2; -} - -message SubsList { - repeated SubsDescriptor subs_descriptor = 1; -} - -message AlarmDescriptor { - AlarmID alarm_id = 1; - string alarm_description = 2; - string name = 3; - KpiId kpi_id = 4; - KpiValueRange kpi_value_range = 5; - context.Timestamp timestamp = 6; -} - -message AlarmID{ - context.Uuid alarm_id = 1; -} - -message AlarmSubscription{ - AlarmID alarm_id = 1; - float subscription_timeout_s = 2; - float subscription_frequency_ms = 3; -} - -message AlarmResponse { - AlarmID alarm_id = 1; - string text = 2; - KpiList kpi_list = 3; -} - -message AlarmList { - repeated AlarmDescriptor alarm_descriptor = 1; -} diff --git a/src/policy/src/main/proto/monitoring.proto b/src/policy/src/main/proto/monitoring.proto new file mode 120000 index 000000000..aceaa7328 --- /dev/null +++ b/src/policy/src/main/proto/monitoring.proto @@ -0,0 +1 @@ +../../../../../proto/monitoring.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/policy.proto b/src/policy/src/main/proto/policy.proto deleted file mode 100644 index a6f160150..000000000 --- a/src/policy/src/main/proto/policy.proto +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package policy; - -import "context.proto"; -import "policy_condition.proto"; -import "policy_action.proto"; - -service PolicyService { - rpc PolicyAddService (PolicyRuleService) returns (PolicyRuleState) {} - rpc PolicyAddDevice (PolicyRuleDevice) returns (PolicyRuleState) {} - rpc PolicyUpdateService (PolicyRuleService) returns (PolicyRuleState) {} - rpc PolicyUpdateDevice (PolicyRuleDevice) returns (PolicyRuleState) {} - rpc PolicyDelete (PolicyRuleId) returns (PolicyRuleState) {} - rpc GetPolicyService (PolicyRuleId) returns (PolicyRuleService) {} - rpc GetPolicyDevice (PolicyRuleId) returns (PolicyRuleDevice) {} - rpc GetPolicyByServiceId (context.ServiceId) returns (PolicyRuleServiceList) {} -} - -enum PolicyRuleStateEnum { - POLICY_UNDEFINED = 0; // Undefined rule state - POLICY_FAILED = 1; // Rule failed - POLICY_INSERTED = 2; // Rule is just inserted - POLICY_VALIDATED = 3; // Rule content is correct - POLICY_PROVISIONED = 4; // Rule subscribed to Monitoring - POLICY_ACTIVE = 5; // Rule is currently active (alarm is just thrown by Monitoring) - POLICY_ENFORCED = 6; // Rule action is successfully enforced - POLICY_INEFFECTIVE = 7; // The applied rule action did not work as expected - POLICY_EFFECTIVE = 8; // The applied rule action did work as expected - POLICY_UPDATED = 9; // Operator requires a policy to change - POLICY_REMOVED = 10; // Operator requires to remove a policy -} - -message PolicyRuleId { - context.Uuid uuid = 1; -} - -message PolicyRuleState { - PolicyRuleStateEnum policyRuleState = 1; - string policyRuleStateMessage = 2; -} - -// Basic policy rule attributes -message PolicyRuleBasic { - PolicyRuleId policyRuleId = 1; - PolicyRuleState policyRuleState = 2; //policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default. - uint32 priority = 3; - - // Event-Condition-Action (ECA) model - repeated PolicyRuleCondition conditionList = 4; // When these policy conditions are met, an event is automatically thrown - BooleanOperator booleanOperator = 5; // Evaluation operator to be used - repeated PolicyRuleAction actionList = 6; // One or more actions should be applied -} - -// Service-oriented policy rule -message PolicyRuleService { - // Basic policy rule attributes - PolicyRuleBasic policyRuleBasic = 1; - - // Affected service and (some of) its device(s) - context.ServiceId serviceId = 2; - repeated context.DeviceId deviceList = 3; // List of devices this service is traversing (not exhaustive) -} - -// Device-oriented policy rule -message PolicyRuleDevice { - // Basic policy rule attributes - PolicyRuleBasic policyRuleBasic = 1; - - // Affected device(s) - repeated context.DeviceId deviceList = 2; -} - -// Wrapper policy rule object -message PolicyRule { - oneof policy_rule { - PolicyRuleService service = 1; - PolicyRuleDevice device = 2; - } -} - -// A list of policy rule IDs -message PolicyRuleIdList { - repeated PolicyRuleId policyRuleIdList = 1; -} - -// A list of service-oriented policy rules -message PolicyRuleServiceList { - repeated PolicyRuleService policyRuleServiceList = 1; -} - -// A list of device-oriented policy rules -message PolicyRuleDeviceList { - repeated PolicyRuleDevice policyRuleDeviceList = 1; -} - -// A list of policy rules -message PolicyRuleList { - repeated PolicyRule policyRules = 1; -} diff --git a/src/policy/src/main/proto/policy.proto b/src/policy/src/main/proto/policy.proto new file mode 120000 index 000000000..df455f961 --- /dev/null +++ b/src/policy/src/main/proto/policy.proto @@ -0,0 +1 @@ +../../../../../proto/policy.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/policy_action.proto b/src/policy/src/main/proto/policy_action.proto deleted file mode 100644 index d547e9779..000000000 --- a/src/policy/src/main/proto/policy_action.proto +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package policy; - -// Action -message PolicyRuleAction { - PolicyRuleActionEnum action = 1; - repeated PolicyRuleActionConfig action_config = 2; -} - -enum PolicyRuleActionEnum { - POLICYRULE_ACTION_NO_ACTION = 0; - POLICYRULE_ACTION_SET_DEVICE_STATUS = 1; - POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE = 2; - POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT = 3; - POLICY_RULE_ACTION_CALL_SERVICE_RPC = 4; - POLICY_RULE_ACTION_RECALCULATE_PATH = 5; -} - -// Action configuration -message PolicyRuleActionConfig { - string action_key = 1; - string action_value = 2; -} - -// message PolicyRuleAction { -// PolicyRuleActionEnum action = 1; -// repeated string parameters = 2; -// } diff --git a/src/policy/src/main/proto/policy_action.proto b/src/policy/src/main/proto/policy_action.proto new file mode 120000 index 000000000..63dcef3d2 --- /dev/null +++ b/src/policy/src/main/proto/policy_action.proto @@ -0,0 +1 @@ +../../../../../proto/policy_action.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/policy_condition.proto b/src/policy/src/main/proto/policy_condition.proto deleted file mode 100644 index 2037af93c..000000000 --- a/src/policy/src/main/proto/policy_condition.proto +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package policy; - -import "monitoring.proto"; - -// Condition -message PolicyRuleCondition { - monitoring.KpiId kpiId = 1; - NumericalOperator numericalOperator = 2; - monitoring.KpiValue kpiValue = 3; -} - -// Operator to be used when comparing Kpis with condition values -enum NumericalOperator { - POLICYRULE_CONDITION_NUMERICAL_UNDEFINED = 0; // Kpi numerical operator undefined - POLICYRULE_CONDITION_NUMERICAL_EQUAL = 1; // Kpi is equal with value - POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL = 2; // Kpi is not equal with value - POLICYRULE_CONDITION_NUMERICAL_LESS_THAN = 3; // Kpi is less than value - POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL = 4; // Kpi is less than or equal with value - POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN = 5; // Kpi is greater than value - POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL = 6; // Kpi is less than or equal with value -} - -// Operator to be used when evaluating each condition -enum BooleanOperator { - POLICYRULE_CONDITION_BOOLEAN_UNDEFINED = 0; // Boolean operator undefined - POLICYRULE_CONDITION_BOOLEAN_AND = 1; // Boolean AND operator - POLICYRULE_CONDITION_BOOLEAN_OR = 2; // Boolean OR operator -} \ No newline at end of file diff --git a/src/policy/src/main/proto/policy_condition.proto b/src/policy/src/main/proto/policy_condition.proto new file mode 120000 index 000000000..31f7d9d10 --- /dev/null +++ b/src/policy/src/main/proto/policy_condition.proto @@ -0,0 +1 @@ +../../../../../proto/policy_condition.proto \ No newline at end of file diff --git a/src/policy/src/main/proto/service.proto b/src/policy/src/main/proto/service.proto deleted file mode 100644 index 658859e3c..000000000 --- a/src/policy/src/main/proto/service.proto +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package service; - -import "context.proto"; - -service ServiceService { - rpc CreateService (context.Service ) returns (context.ServiceId) {} - rpc UpdateService (context.Service ) returns (context.ServiceId) {} - rpc DeleteService (context.ServiceId) returns (context.Empty ) {} - rpc RecomputeConnections(context.Service ) returns (context.Empty ) {} -} diff --git a/src/policy/src/main/proto/service.proto b/src/policy/src/main/proto/service.proto new file mode 120000 index 000000000..5ca543da0 --- /dev/null +++ b/src/policy/src/main/proto/service.proto @@ -0,0 +1 @@ +../../../../../proto/service.proto \ No newline at end of file diff --git a/src/ztp/Dockerfile b/src/ztp/Dockerfile deleted file mode 100644 index 43fef96b4..000000000 --- a/src/ztp/Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Multi-stage Docker image build - -# Stage 1 -FROM maven:3-jdk-11 AS builder - -# Define working directory -WORKDIR /app - -# Copy every file in working directory, as defined in .dockerignore file -COPY ./pom.xml pom.xml -COPY ./src src/ -COPY ./target/generated-sources/ target/generated-sources/ -RUN mvn --errors --batch-mode package -Dmaven.test.skip=true - -# Stage 2 -FROM builder AS unit-test - -RUN mvn --errors --batch-mode -Pgenerate-consolidated-coverage verify - -# Stage 3 -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4 AS release - -ARG JAVA_PACKAGE=java-11-openjdk-headless -ARG RUN_JAVA_VERSION=1.3.8 -ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' -# Install java and the run-java script -# Also set up permissions for user `1001` -RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ - && microdnf update \ - && microdnf clean all \ - && mkdir /deployments \ - && chown 1001 /deployments \ - && chmod "g+rwX" /deployments \ - && chown 1001:root /deployments \ - && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \ - && chown 1001 /deployments/run-java.sh \ - && chmod 540 /deployments/run-java.sh \ - && echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/conf/security/java.security - -# Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size. -ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" -# We make four distinct layers so if there are application changes the library layers can be re-used -COPY --from=builder --chown=1001 /app/target/quarkus-app/lib/ /deployments/lib/ -COPY --from=builder --chown=1001 /app/target/quarkus-app/*.jar /deployments/ -COPY --from=builder --chown=1001 /app/target/quarkus-app/app/ /deployments/app/ -COPY --from=builder --chown=1001 /app/target/quarkus-app/quarkus/ /deployments/quarkus/ - -EXPOSE 8080 -EXPOSE 5050 -USER 1001 - -ENTRYPOINT [ "/deployments/run-java.sh" ] - diff --git a/src/ztp/Dockerfile b/src/ztp/Dockerfile new file mode 120000 index 000000000..eec732273 --- /dev/null +++ b/src/ztp/Dockerfile @@ -0,0 +1 @@ +src/main/docker/Dockerfile.multistage.jvm \ No newline at end of file diff --git a/src/ztp/src/main/proto/acl.proto b/src/ztp/src/main/proto/acl.proto deleted file mode 100644 index 3dba735dc..000000000 --- a/src/ztp/src/main/proto/acl.proto +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package acl; - -enum AclRuleTypeEnum { - ACLRULETYPE_UNDEFINED = 0; - ACLRULETYPE_IPV4 = 1; - ACLRULETYPE_IPV6 = 2; - ACLRULETYPE_L2 = 3; - ACLRULETYPE_MPLS = 4; - ACLRULETYPE_MIXED = 5; -} - -enum AclForwardActionEnum { - ACLFORWARDINGACTION_UNDEFINED = 0; - ACLFORWARDINGACTION_DROP = 1; - ACLFORWARDINGACTION_ACCEPT = 2; - ACLFORWARDINGACTION_REJECT = 3; -} - -enum AclLogActionEnum { - ACLLOGACTION_UNDEFINED = 0; - ACLLOGACTION_NOLOG = 1; - ACLLOGACTION_SYSLOG = 2; -} - -message AclMatch { - uint32 dscp = 1; - uint32 protocol = 2; - string src_address = 3; - string dst_address = 4; - uint32 src_port = 5; - uint32 dst_port = 6; - uint32 start_mpls_label = 7; - uint32 end_mpls_label = 8; -} - -message AclAction { - AclForwardActionEnum forward_action = 1; - AclLogActionEnum log_action = 2; -} - -message AclEntry { - uint32 sequence_id = 1; - string description = 2; - AclMatch match = 3; - AclAction action = 4; -} - -message AclRuleSet { - string name = 1; - AclRuleTypeEnum type = 2; - string description = 3; - string user_id = 4; - repeated AclEntry entries = 5; -} diff --git a/src/ztp/src/main/proto/acl.proto b/src/ztp/src/main/proto/acl.proto new file mode 120000 index 000000000..158ae78eb --- /dev/null +++ b/src/ztp/src/main/proto/acl.proto @@ -0,0 +1 @@ +../../../../../proto/acl.proto \ No newline at end of file diff --git a/src/ztp/src/main/proto/context.proto b/src/ztp/src/main/proto/context.proto deleted file mode 100644 index fce1e71ad..000000000 --- a/src/ztp/src/main/proto/context.proto +++ /dev/null @@ -1,615 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package context; - -import "acl.proto"; -import "kpi_sample_types.proto"; - -service ContextService { - rpc ListContextIds (Empty ) returns ( ContextIdList ) {} - rpc ListContexts (Empty ) returns ( ContextList ) {} - rpc GetContext (ContextId ) returns ( Context ) {} - rpc SetContext (Context ) returns ( ContextId ) {} - rpc RemoveContext (ContextId ) returns ( Empty ) {} - rpc GetContextEvents (Empty ) returns (stream ContextEvent ) {} - - rpc ListTopologyIds (ContextId ) returns ( TopologyIdList ) {} - rpc ListTopologies (ContextId ) returns ( TopologyList ) {} - rpc GetTopology (TopologyId ) returns ( Topology ) {} - rpc GetTopologyDetails (TopologyId ) returns ( TopologyDetails ) {} - rpc SetTopology (Topology ) returns ( TopologyId ) {} - rpc RemoveTopology (TopologyId ) returns ( Empty ) {} - rpc GetTopologyEvents (Empty ) returns (stream TopologyEvent ) {} - - rpc ListDeviceIds (Empty ) returns ( DeviceIdList ) {} - rpc ListDevices (Empty ) returns ( DeviceList ) {} - rpc GetDevice (DeviceId ) returns ( Device ) {} - rpc SetDevice (Device ) returns ( DeviceId ) {} - rpc RemoveDevice (DeviceId ) returns ( Empty ) {} - rpc GetDeviceEvents (Empty ) returns (stream DeviceEvent ) {} - rpc SelectDevice (DeviceFilter ) returns ( DeviceList ) {} - rpc ListEndPointNames (EndPointIdList) returns ( EndPointNameList) {} - - rpc ListLinkIds (Empty ) returns ( LinkIdList ) {} - rpc ListLinks (Empty ) returns ( LinkList ) {} - rpc GetLink (LinkId ) returns ( Link ) {} - rpc SetLink (Link ) returns ( LinkId ) {} - rpc RemoveLink (LinkId ) returns ( Empty ) {} - rpc GetLinkEvents (Empty ) returns (stream LinkEvent ) {} - - rpc ListServiceIds (ContextId ) returns ( ServiceIdList ) {} - rpc ListServices (ContextId ) returns ( ServiceList ) {} - rpc GetService (ServiceId ) returns ( Service ) {} - rpc SetService (Service ) returns ( ServiceId ) {} - rpc UnsetService (Service ) returns ( ServiceId ) {} - rpc RemoveService (ServiceId ) returns ( Empty ) {} - rpc GetServiceEvents (Empty ) returns (stream ServiceEvent ) {} - rpc SelectService (ServiceFilter ) returns ( ServiceList ) {} - - rpc ListSliceIds (ContextId ) returns ( SliceIdList ) {} - rpc ListSlices (ContextId ) returns ( SliceList ) {} - rpc GetSlice (SliceId ) returns ( Slice ) {} - rpc SetSlice (Slice ) returns ( SliceId ) {} - rpc UnsetSlice (Slice ) returns ( SliceId ) {} - rpc RemoveSlice (SliceId ) returns ( Empty ) {} - rpc GetSliceEvents (Empty ) returns (stream SliceEvent ) {} - rpc SelectSlice (SliceFilter ) returns ( SliceList ) {} - - rpc ListConnectionIds (ServiceId ) returns ( ConnectionIdList) {} - rpc ListConnections (ServiceId ) returns ( ConnectionList ) {} - rpc GetConnection (ConnectionId ) returns ( Connection ) {} - rpc SetConnection (Connection ) returns ( ConnectionId ) {} - rpc RemoveConnection (ConnectionId ) returns ( Empty ) {} - rpc GetConnectionEvents(Empty ) returns (stream ConnectionEvent ) {} -} - -// ----- Generic ------------------------------------------------------------------------------------------------------- -message Empty {} - -message Uuid { - string uuid = 1; -} - -enum EventTypeEnum { - EVENTTYPE_UNDEFINED = 0; - EVENTTYPE_CREATE = 1; - EVENTTYPE_UPDATE = 2; - EVENTTYPE_REMOVE = 3; -} - -message Timestamp { - double timestamp = 1; -} - -message Event { - Timestamp timestamp = 1; - EventTypeEnum event_type = 2; -} - -// ----- Context ------------------------------------------------------------------------------------------------------- -message ContextId { - Uuid context_uuid = 1; -} - -message Context { - ContextId context_id = 1; - string name = 2; - repeated TopologyId topology_ids = 3; - repeated ServiceId service_ids = 4; - repeated SliceId slice_ids = 5; - TeraFlowController controller = 6; -} - -message ContextIdList { - repeated ContextId context_ids = 1; -} - -message ContextList { - repeated Context contexts = 1; -} - -message ContextEvent { - Event event = 1; - ContextId context_id = 2; -} - - -// ----- Topology ------------------------------------------------------------------------------------------------------ -message TopologyId { - ContextId context_id = 1; - Uuid topology_uuid = 2; -} - -message Topology { - TopologyId topology_id = 1; - string name = 2; - repeated DeviceId device_ids = 3; - repeated LinkId link_ids = 4; -} - -message TopologyDetails { - TopologyId topology_id = 1; - string name = 2; - repeated Device devices = 3; - repeated Link links = 4; -} - -message TopologyIdList { - repeated TopologyId topology_ids = 1; -} - -message TopologyList { - repeated Topology topologies = 1; -} - -message TopologyEvent { - Event event = 1; - TopologyId topology_id = 2; -} - - -// ----- Device -------------------------------------------------------------------------------------------------------- -message DeviceId { - Uuid device_uuid = 1; -} - -message Device { - DeviceId device_id = 1; - string name = 2; - string device_type = 3; - DeviceConfig device_config = 4; - DeviceOperationalStatusEnum device_operational_status = 5; - repeated DeviceDriverEnum device_drivers = 6; - repeated EndPoint device_endpoints = 7; - repeated Component components = 8; // Used for inventory - DeviceId controller_id = 9; // Identifier of node controlling the actual device -} - -message Component { //Defined previously to this section - Tested OK - Uuid component_uuid = 1; - string name = 2; - string type = 3; - - map attributes = 4; // dict[attr.name => json.dumps(attr.value)] - string parent = 5; -} - -message DeviceConfig { - repeated ConfigRule config_rules = 1; -} - -enum DeviceDriverEnum { - DEVICEDRIVER_UNDEFINED = 0; // also used for emulated - DEVICEDRIVER_OPENCONFIG = 1; - DEVICEDRIVER_TRANSPORT_API = 2; - DEVICEDRIVER_P4 = 3; - DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; - DEVICEDRIVER_ONF_TR_532 = 5; - DEVICEDRIVER_XR = 6; - DEVICEDRIVER_IETF_L2VPN = 7; - DEVICEDRIVER_GNMI_OPENCONFIG = 8; - DEVICEDRIVER_FLEXSCALE = 9; - DEVICEDRIVER_IETF_ACTN = 10; - DEVICEDRIVER_SMARTNIC = 11; -} - -enum DeviceOperationalStatusEnum { - DEVICEOPERATIONALSTATUS_UNDEFINED = 0; - DEVICEOPERATIONALSTATUS_DISABLED = 1; - DEVICEOPERATIONALSTATUS_ENABLED = 2; -} - -message DeviceIdList { - repeated DeviceId device_ids = 1; -} - -message DeviceList { - repeated Device devices = 1; -} - -message DeviceFilter { - DeviceIdList device_ids = 1; - bool include_endpoints = 2; - bool include_config_rules = 3; - bool include_components = 4; -} - -message DeviceEvent { - Event event = 1; - DeviceId device_id = 2; - DeviceConfig device_config = 3; -} - - -// ----- Link ---------------------------------------------------------------------------------------------------------- -message LinkId { - Uuid link_uuid = 1; -} - -message LinkAttributes { - float total_capacity_gbps = 1; - float used_capacity_gbps = 2; -} - -message Link { - LinkId link_id = 1; - string name = 2; - repeated EndPointId link_endpoint_ids = 3; - LinkAttributes attributes = 4; -} - -message LinkIdList { - repeated LinkId link_ids = 1; -} - -message LinkList { - repeated Link links = 1; -} - -message LinkEvent { - Event event = 1; - LinkId link_id = 2; -} - - -// ----- Service ------------------------------------------------------------------------------------------------------- -message ServiceId { - ContextId context_id = 1; - Uuid service_uuid = 2; -} - -message Service { - ServiceId service_id = 1; - string name = 2; - ServiceTypeEnum service_type = 3; - repeated EndPointId service_endpoint_ids = 4; - repeated Constraint service_constraints = 5; - ServiceStatus service_status = 6; - ServiceConfig service_config = 7; - Timestamp timestamp = 8; -} - -enum ServiceTypeEnum { - SERVICETYPE_UNKNOWN = 0; - SERVICETYPE_L3NM = 1; - SERVICETYPE_L2NM = 2; - SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; - SERVICETYPE_TE = 4; - SERVICETYPE_E2E = 5; -} - -enum ServiceStatusEnum { - SERVICESTATUS_UNDEFINED = 0; - SERVICESTATUS_PLANNED = 1; - SERVICESTATUS_ACTIVE = 2; - SERVICESTATUS_UPDATING = 3; - SERVICESTATUS_PENDING_REMOVAL = 4; - SERVICESTATUS_SLA_VIOLATED = 5; -} - -message ServiceStatus { - ServiceStatusEnum service_status = 1; -} - -message ServiceConfig { - repeated ConfigRule config_rules = 1; -} - -message ServiceIdList { - repeated ServiceId service_ids = 1; -} - -message ServiceList { - repeated Service services = 1; -} - -message ServiceFilter { - ServiceIdList service_ids = 1; - bool include_endpoint_ids = 2; - bool include_constraints = 3; - bool include_config_rules = 4; -} - -message ServiceEvent { - Event event = 1; - ServiceId service_id = 2; -} - -// ----- Slice --------------------------------------------------------------------------------------------------------- -message SliceId { - ContextId context_id = 1; - Uuid slice_uuid = 2; -} - -message Slice { - SliceId slice_id = 1; - string name = 2; - repeated EndPointId slice_endpoint_ids = 3; - repeated Constraint slice_constraints = 4; - repeated ServiceId slice_service_ids = 5; - repeated SliceId slice_subslice_ids = 6; - SliceStatus slice_status = 7; - SliceConfig slice_config = 8; - SliceOwner slice_owner = 9; - Timestamp timestamp = 10; -} - -message SliceOwner { - Uuid owner_uuid = 1; - string owner_string = 2; -} - -enum SliceStatusEnum { - SLICESTATUS_UNDEFINED = 0; - SLICESTATUS_PLANNED = 1; - SLICESTATUS_INIT = 2; - SLICESTATUS_ACTIVE = 3; - SLICESTATUS_DEINIT = 4; - SLICESTATUS_SLA_VIOLATED = 5; -} - -message SliceStatus { - SliceStatusEnum slice_status = 1; -} - -message SliceConfig { - repeated ConfigRule config_rules = 1; -} - -message SliceIdList { - repeated SliceId slice_ids = 1; -} - -message SliceList { - repeated Slice slices = 1; -} - -message SliceFilter { - SliceIdList slice_ids = 1; - bool include_endpoint_ids = 2; - bool include_constraints = 3; - bool include_service_ids = 4; - bool include_subslice_ids = 5; - bool include_config_rules = 6; -} - -message SliceEvent { - Event event = 1; - SliceId slice_id = 2; -} - -// ----- Connection ---------------------------------------------------------------------------------------------------- -message ConnectionId { - Uuid connection_uuid = 1; -} - -message ConnectionSettings_L0 { - string lsp_symbolic_name = 1; -} - -message ConnectionSettings_L2 { - string src_mac_address = 1; - string dst_mac_address = 2; - uint32 ether_type = 3; - uint32 vlan_id = 4; - uint32 mpls_label = 5; - uint32 mpls_traffic_class = 6; -} - -message ConnectionSettings_L3 { - string src_ip_address = 1; - string dst_ip_address = 2; - uint32 dscp = 3; - uint32 protocol = 4; - uint32 ttl = 5; -} - -message ConnectionSettings_L4 { - uint32 src_port = 1; - uint32 dst_port = 2; - uint32 tcp_flags = 3; - uint32 ttl = 4; -} - -message ConnectionSettings { - ConnectionSettings_L0 l0 = 1; - ConnectionSettings_L2 l2 = 2; - ConnectionSettings_L3 l3 = 3; - ConnectionSettings_L4 l4 = 4; -} - -message Connection { - ConnectionId connection_id = 1; - ServiceId service_id = 2; - repeated EndPointId path_hops_endpoint_ids = 3; - repeated ServiceId sub_service_ids = 4; - ConnectionSettings settings = 5; -} - -message ConnectionIdList { - repeated ConnectionId connection_ids = 1; -} - -message ConnectionList { - repeated Connection connections = 1; -} - -message ConnectionEvent { - Event event = 1; - ConnectionId connection_id = 2; -} - - -// ----- Endpoint ------------------------------------------------------------------------------------------------------ -message EndPointId { - TopologyId topology_id = 1; - DeviceId device_id = 2; - Uuid endpoint_uuid = 3; -} - -message EndPoint { - EndPointId endpoint_id = 1; - string name = 2; - string endpoint_type = 3; - repeated kpi_sample_types.KpiSampleType kpi_sample_types = 4; - Location endpoint_location = 5; -} - -message EndPointName { - EndPointId endpoint_id = 1; - string device_name = 2; - string endpoint_name = 3; - string endpoint_type = 4; -} - -message EndPointIdList { - repeated EndPointId endpoint_ids = 1; -} - -message EndPointNameList { - repeated EndPointName endpoint_names = 1; -} - - -// ----- Configuration ------------------------------------------------------------------------------------------------- -enum ConfigActionEnum { - CONFIGACTION_UNDEFINED = 0; - CONFIGACTION_SET = 1; - CONFIGACTION_DELETE = 2; -} - -message ConfigRule_Custom { - string resource_key = 1; - string resource_value = 2; -} - -message ConfigRule_ACL { - EndPointId endpoint_id = 1; - acl.AclRuleSet rule_set = 2; -} - -message ConfigRule { - ConfigActionEnum action = 1; - oneof config_rule { - ConfigRule_Custom custom = 2; - ConfigRule_ACL acl = 3; - } -} - - -// ----- Constraint ---------------------------------------------------------------------------------------------------- -enum ConstraintActionEnum { - CONSTRAINTACTION_UNDEFINED = 0; - CONSTRAINTACTION_SET = 1; - CONSTRAINTACTION_DELETE = 2; -} - -message Constraint_Custom { - string constraint_type = 1; - string constraint_value = 2; -} - -message Constraint_Schedule { - float start_timestamp = 1; - float duration_days = 2; -} - -message GPS_Position { - float latitude = 1; - float longitude = 2; -} - -message Location { - oneof location { - string region = 1; - GPS_Position gps_position = 2; - } -} - -message Constraint_EndPointLocation { - EndPointId endpoint_id = 1; - Location location = 2; -} - -message Constraint_EndPointPriority { - EndPointId endpoint_id = 1; - uint32 priority = 2; -} - -message Constraint_SLA_Latency { - float e2e_latency_ms = 1; -} - -message Constraint_SLA_Capacity { - float capacity_gbps = 1; -} - -message Constraint_SLA_Availability { - uint32 num_disjoint_paths = 1; - bool all_active = 2; - float availability = 3; // 0.0 .. 100.0 percentage of availability -} - -enum IsolationLevelEnum { - NO_ISOLATION = 0; - PHYSICAL_ISOLATION = 1; - LOGICAL_ISOLATION = 2; - PROCESS_ISOLATION = 3; - PHYSICAL_MEMORY_ISOLATION = 4; - PHYSICAL_NETWORK_ISOLATION = 5; - VIRTUAL_RESOURCE_ISOLATION = 6; - NETWORK_FUNCTIONS_ISOLATION = 7; - SERVICE_ISOLATION = 8; -} - -message Constraint_SLA_Isolation_level { - repeated IsolationLevelEnum isolation_level = 1; -} - -message Constraint_Exclusions { - bool is_permanent = 1; - repeated DeviceId device_ids = 2; - repeated EndPointId endpoint_ids = 3; - repeated LinkId link_ids = 4; -} - -message Constraint { - ConstraintActionEnum action = 1; - oneof constraint { - Constraint_Custom custom = 2; - Constraint_Schedule schedule = 3; - Constraint_EndPointLocation endpoint_location = 4; - Constraint_EndPointPriority endpoint_priority = 5; - Constraint_SLA_Capacity sla_capacity = 6; - Constraint_SLA_Latency sla_latency = 7; - Constraint_SLA_Availability sla_availability = 8; - Constraint_SLA_Isolation_level sla_isolation = 9; - Constraint_Exclusions exclusions = 10; - } -} - - -// ----- Miscellaneous ------------------------------------------------------------------------------------------------- -message TeraFlowController { - ContextId context_id = 1; - string ip_address = 2; - uint32 port = 3; -} - -message AuthenticationResult { - ContextId context_id = 1; - bool authenticated = 2; -} diff --git a/src/ztp/src/main/proto/context.proto b/src/ztp/src/main/proto/context.proto new file mode 120000 index 000000000..7f33c4bc7 --- /dev/null +++ b/src/ztp/src/main/proto/context.proto @@ -0,0 +1 @@ +../../../../../proto/context.proto \ No newline at end of file diff --git a/src/ztp/src/main/proto/device.proto b/src/ztp/src/main/proto/device.proto deleted file mode 100644 index 30e60079d..000000000 --- a/src/ztp/src/main/proto/device.proto +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package device; - -import "context.proto"; -import "monitoring.proto"; - -service DeviceService { - rpc AddDevice (context.Device ) returns (context.DeviceId ) {} - rpc ConfigureDevice (context.Device ) returns (context.DeviceId ) {} - rpc DeleteDevice (context.DeviceId ) returns (context.Empty ) {} - rpc GetInitialConfig(context.DeviceId ) returns (context.DeviceConfig) {} - rpc MonitorDeviceKpi(MonitoringSettings) returns (context.Empty ) {} -} - -message MonitoringSettings { - monitoring.KpiId kpi_id = 1; - monitoring.KpiDescriptor kpi_descriptor = 2; - float sampling_duration_s = 3; - float sampling_interval_s = 4; -} diff --git a/src/ztp/src/main/proto/device.proto b/src/ztp/src/main/proto/device.proto new file mode 120000 index 000000000..ad6e7c47e --- /dev/null +++ b/src/ztp/src/main/proto/device.proto @@ -0,0 +1 @@ +../../../../../proto/device.proto \ No newline at end of file diff --git a/src/ztp/src/main/proto/kpi_sample_types.proto b/src/ztp/src/main/proto/kpi_sample_types.proto deleted file mode 100644 index 5b234a4e3..000000000 --- a/src/ztp/src/main/proto/kpi_sample_types.proto +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package kpi_sample_types; - -enum KpiSampleType { - KPISAMPLETYPE_UNKNOWN = 0; - - KPISAMPLETYPE_PACKETS_TRANSMITTED = 101; - KPISAMPLETYPE_PACKETS_RECEIVED = 102; - KPISAMPLETYPE_PACKETS_DROPPED = 103; - KPISAMPLETYPE_BYTES_TRANSMITTED = 201; - KPISAMPLETYPE_BYTES_RECEIVED = 202; - KPISAMPLETYPE_BYTES_DROPPED = 203; - - KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS = 301; - KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS = 302; - - KPISAMPLETYPE_ML_CONFIDENCE = 401; //. can be used by both optical and L3 without any issue - - KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501; //. can be used by both optical and L3 without any issue - - KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601; - KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602; - KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603; - KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604; - KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605; - - KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; -} diff --git a/src/ztp/src/main/proto/kpi_sample_types.proto b/src/ztp/src/main/proto/kpi_sample_types.proto new file mode 120000 index 000000000..98e748bbf --- /dev/null +++ b/src/ztp/src/main/proto/kpi_sample_types.proto @@ -0,0 +1 @@ +../../../../../proto/kpi_sample_types.proto \ No newline at end of file diff --git a/src/ztp/src/main/proto/monitoring.proto b/src/ztp/src/main/proto/monitoring.proto deleted file mode 100644 index 45ba48b02..000000000 --- a/src/ztp/src/main/proto/monitoring.proto +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package monitoring; - -import "context.proto"; -import "kpi_sample_types.proto"; - -service MonitoringService { - rpc SetKpi (KpiDescriptor ) returns (KpiId ) {} // Stable not final - rpc DeleteKpi (KpiId ) returns (context.Empty ) {} // Stable and final - rpc GetKpiDescriptor (KpiId ) returns (KpiDescriptor ) {} // Stable and final - rpc GetKpiDescriptorList (context.Empty ) returns (KpiDescriptorList ) {} // Stable and final - rpc IncludeKpi (Kpi ) returns (context.Empty ) {} // Stable and final - rpc MonitorKpi (MonitorKpiRequest ) returns (context.Empty ) {} // Stable and final - rpc QueryKpiData (KpiQuery ) returns (RawKpiTable ) {} // Not implemented - rpc SetKpiSubscription (SubsDescriptor ) returns (stream SubsResponse ) {} // Stable not final - rpc GetSubsDescriptor (SubscriptionID ) returns (SubsDescriptor ) {} // Stable and final - rpc GetSubscriptions (context.Empty ) returns (SubsList ) {} // Stable and final - rpc DeleteSubscription (SubscriptionID ) returns (context.Empty ) {} // Stable and final - rpc SetKpiAlarm (AlarmDescriptor ) returns (AlarmID ) {} // Stable not final - rpc GetAlarms (context.Empty ) returns (AlarmList ) {} // Stable and final - rpc GetAlarmDescriptor (AlarmID ) returns (AlarmDescriptor ) {} // Stable and final - rpc GetAlarmResponseStream(AlarmSubscription ) returns (stream AlarmResponse) {} // Not Stable not final - rpc DeleteAlarm (AlarmID ) returns (context.Empty ) {} // Stable and final - rpc GetStreamKpi (KpiId ) returns (stream Kpi ) {} // Stable not final - rpc GetInstantKpi (KpiId ) returns (Kpi ) {} // Stable not final -} - -message KpiDescriptor { - KpiId kpi_id = 1; - string kpi_description = 2; - repeated KpiId kpi_id_list = 3; - kpi_sample_types.KpiSampleType kpi_sample_type = 4; - context.DeviceId device_id = 5; - context.EndPointId endpoint_id = 6; - context.ServiceId service_id = 7; - context.SliceId slice_id = 8; - context.ConnectionId connection_id = 9; - context.LinkId link_id = 10; -} - -message MonitorKpiRequest { - KpiId kpi_id = 1; - float monitoring_window_s = 2; - float sampling_rate_s = 3; - // Pending add field to reflect Available Device Protocols -} - -message KpiQuery { - repeated KpiId kpi_ids = 1; - float monitoring_window_s = 2; - uint32 last_n_samples = 3; // used when you want something like "get the last N many samples - context.Timestamp start_timestamp = 4; // used when you want something like "get the samples since X date/time" - context.Timestamp end_timestamp = 5; // used when you want something like "get the samples until X date/time" -} - - -message RawKpi { // cell - context.Timestamp timestamp = 1; - KpiValue kpi_value = 2; -} - -message RawKpiList { // column - KpiId kpi_id = 1; - repeated RawKpi raw_kpis = 2; -} - -message RawKpiTable { // table - repeated RawKpiList raw_kpi_lists = 1; -} - -message KpiId { - context.Uuid kpi_id = 1; -} - -message Kpi { - KpiId kpi_id = 1; - context.Timestamp timestamp = 2; - KpiValue kpi_value = 3; -} - -message KpiValueRange { - KpiValue kpiMinValue = 1; - KpiValue kpiMaxValue = 2; - bool inRange = 3; // by default True - bool includeMinValue = 4; // False is outside the interval - bool includeMaxValue = 5; // False is outside the interval -} - -message KpiValue { - oneof value { - int32 int32Val = 1; - uint32 uint32Val = 2; - int64 int64Val = 3; - uint64 uint64Val = 4; - float floatVal = 5; - string stringVal = 6; - bool boolVal = 7; - } -} - - -message KpiList { - repeated Kpi kpi = 1; -} - -message KpiDescriptorList { - repeated KpiDescriptor kpi_descriptor_list = 1; -} - -message SubsDescriptor{ - SubscriptionID subs_id = 1; - KpiId kpi_id = 2; - float sampling_duration_s = 3; - float sampling_interval_s = 4; - context.Timestamp start_timestamp = 5; // used when you want something like "get the samples since X date/time" - context.Timestamp end_timestamp = 6; // used when you want something like "get the samples until X date/time" - // Pending add field to reflect Available Device Protocols -} - -message SubscriptionID { - context.Uuid subs_id = 1; -} - -message SubsResponse { - SubscriptionID subs_id = 1; - KpiList kpi_list = 2; -} - -message SubsList { - repeated SubsDescriptor subs_descriptor = 1; -} - -message AlarmDescriptor { - AlarmID alarm_id = 1; - string alarm_description = 2; - string name = 3; - KpiId kpi_id = 4; - KpiValueRange kpi_value_range = 5; - context.Timestamp timestamp = 6; -} - -message AlarmID{ - context.Uuid alarm_id = 1; -} - -message AlarmSubscription{ - AlarmID alarm_id = 1; - float subscription_timeout_s = 2; - float subscription_frequency_ms = 3; -} - -message AlarmResponse { - AlarmID alarm_id = 1; - string text = 2; - KpiList kpi_list = 3; -} - -message AlarmList { - repeated AlarmDescriptor alarm_descriptor = 1; -} diff --git a/src/ztp/src/main/proto/monitoring.proto b/src/ztp/src/main/proto/monitoring.proto new file mode 120000 index 000000000..aceaa7328 --- /dev/null +++ b/src/ztp/src/main/proto/monitoring.proto @@ -0,0 +1 @@ +../../../../../proto/monitoring.proto \ No newline at end of file diff --git a/src/ztp/src/main/proto/ztp.proto b/src/ztp/src/main/proto/ztp.proto deleted file mode 100644 index 5c895900d..000000000 --- a/src/ztp/src/main/proto/ztp.proto +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; -package ztp; - -import "context.proto"; - -service ZtpService { - rpc ZtpGetDeviceRole(DeviceRoleId) returns (DeviceRole) {} - rpc ZtpGetDeviceRolesByDeviceId(context.DeviceId) returns (DeviceRoleList) {} - rpc ZtpAdd(DeviceRole) returns (DeviceRoleState) {} - rpc ZtpUpdate(DeviceRoleConfig) returns (DeviceRoleState) {} - rpc ZtpDelete(DeviceRole) returns (DeviceRoleState) {} - rpc ZtpDeleteAll(context.Empty) returns (DeviceDeletionResult) {} -} - -enum DeviceRoleType { - NONE = 0; - DEV_OPS = 1; - DEV_CONF = 2; - PIPELINE_CONF = 3; -} - -message DeviceRoleId { - context.Uuid devRoleId = 1; - context.DeviceId devId = 2; -} - -message DeviceRole { - DeviceRoleId devRoleId = 1; - DeviceRoleType devRoleType = 2; -} - -message DeviceRoleConfig { - DeviceRole devRole = 1; - context.DeviceConfig devConfig = 2; -} - -message DeviceRoleList { - repeated DeviceRole devRole = 1; -} - -message DeviceRoleState { - DeviceRoleId devRoleId = 1; - ZtpDeviceState devRoleState = 2; -} - -message DeviceDeletionResult { - repeated string deleted = 1; -} - -enum ZtpDeviceState { - ZTP_DEV_STATE_UNDEFINED = 0; - ZTP_DEV_STATE_CREATED = 1; - ZTP_DEV_STATE_UPDATED = 2; - ZTP_DEV_STATE_DELETED = 3; -} diff --git a/src/ztp/src/main/proto/ztp.proto b/src/ztp/src/main/proto/ztp.proto new file mode 120000 index 000000000..9183ce531 --- /dev/null +++ b/src/ztp/src/main/proto/ztp.proto @@ -0,0 +1 @@ +../../../../../proto/ztp.proto \ No newline at end of file -- GitLab From 3786a02f8976fa80a9c2b71ef9955fc009258cdc Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Thu, 10 Apr 2025 11:02:45 +0200 Subject: [PATCH 389/463] Remove ztp_device.yang --- src/ztp/src/ztp-agent/ztp_device.yang | 46 --------------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/ztp/src/ztp-agent/ztp_device.yang diff --git a/src/ztp/src/ztp-agent/ztp_device.yang b/src/ztp/src/ztp-agent/ztp_device.yang deleted file mode 100644 index f506d6413..000000000 --- a/src/ztp/src/ztp-agent/ztp_device.yang +++ /dev/null @@ -1,46 +0,0 @@ -module ztp_device { - - yang-version "1"; - - namespace "urn:ztp_nos"; - prefix "ztp_nos"; - organization "EVIDEN"; - contact "jose.carcel@eviden.com"; - description "Basic example of data model for modelling NOS ZTP Device"; - - revision "2023-08-03" { - description "Basic example of data model for modelling NOS ZTP Device"; - reference ""; - } - - grouping config{ - leaf ztp_device_sw_url{ - type string; - } - leaf config_script_url{ - type string; - } - leaf ip_range { - type string; // check IP regular expression - } - } - - typedef state { - type enumeration{ - enum "UNDEF"; - enum "INIT_HW"; - enum "INIT_SW"; - enum "CONFIGURED"; - enum "RUNNING"; - enum "UPDATING"; - enum "MIGRATING"; - enum "DELETED"; - } - } - - grouping state { - leaf ztp_device_state { - type state; - } - } -} \ No newline at end of file -- GitLab From ac2f59755ee0550c5377c5e993df71bc187d3b99 Mon Sep 17 00:00:00 2001 From: jimenezquesa Date: Thu, 10 Apr 2025 16:34:36 +0200 Subject: [PATCH 390/463] Add requirements.in --- src/ztp_server/requirements.in | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/ztp_server/requirements.in diff --git a/src/ztp_server/requirements.in b/src/ztp_server/requirements.in new file mode 100644 index 000000000..d56ee821b --- /dev/null +++ b/src/ztp_server/requirements.in @@ -0,0 +1,28 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +deepdiff==6.7.* +deepmerge==1.1.* +Flask==2.1.3 +Flask-HTTPAuth==4.5.0 +Flask-RESTful==0.3.9 +jsonschema==4.4.0 +libyang==2.8.4 +netaddr==0.9.0 +pyang==2.6.0 +git+https://github.com/robshakir/pyangbind.git +pydantic==2.6.3 +requests==2.27.1 +werkzeug==2.3.7 +websockets==12.0 -- GitLab From 2f3891fda51de8f6221c3303cd40192901ff3b30 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 10 Apr 2025 15:31:39 +0000 Subject: [PATCH 391/463] Protocol Buffers: - Auto-import any.proto in context --- proto/any.proto | 162 -------------------------------------------- proto/context.proto | 4 +- 2 files changed, 3 insertions(+), 163 deletions(-) delete mode 100644 proto/any.proto diff --git a/proto/any.proto b/proto/any.proto deleted file mode 100644 index eff44e509..000000000 --- a/proto/any.proto +++ /dev/null @@ -1,162 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option go_package = "google.golang.org/protobuf/types/known/anypb"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "AnyProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; - -// `Any` contains an arbitrary serialized protocol buffer message along with a -// URL that describes the type of the serialized message. -// -// Protobuf library provides support to pack/unpack Any values in the form -// of utility functions or additional generated methods of the Any type. -// -// Example 1: Pack and unpack a message in C++. -// -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } -// -// Example 2: Pack and unpack a message in Java. -// -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// // or ... -// if (any.isSameTypeAs(Foo.getDefaultInstance())) { -// foo = any.unpack(Foo.getDefaultInstance()); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } -// -// The pack methods provided by protobuf library will by default use -// 'type.googleapis.com/full.type.name' as the type URL and the unpack -// methods only use the fully qualified type name after the last '/' -// in the type URL, for example "foo.bar.com/x/y.z" will yield type -// name "y.z". -// -// JSON -// ==== -// The JSON representation of an `Any` value uses the regular -// representation of the deserialized, embedded message, with an -// additional field `@type` which contains the type URL. Example: -// -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } -// -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } -// -// If the embedded message type is well-known and has a custom JSON -// representation, that representation will be embedded adding a field -// `value` which holds the custom JSON in addition to the `@type` -// field. Example (for message [google.protobuf.Duration][]): -// -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } -// -message Any { - // A URL/resource name that uniquely identifies the type of the serialized - // protocol buffer message. This string must contain at least - // one "/" character. The last segment of the URL's path must represent - // the fully qualified name of the type (as in - // `path/google.protobuf.Duration`). The name should be in a canonical form - // (e.g., leading "." is not accepted). - // - // In practice, teams usually precompile into the binary all types that they - // expect it to use in the context of Any. However, for URLs which use the - // scheme `http`, `https`, or no scheme, one can optionally set up a type - // server that maps type URLs to message definitions as follows: - // - // * If no scheme is provided, `https` is assumed. - // * An HTTP GET on the URL must yield a [google.protobuf.Type][] - // value in binary format, or produce an error. - // * Applications are allowed to cache lookup results based on the - // URL, or have them precompiled into a binary to avoid any - // lookup. Therefore, binary compatibility needs to be preserved - // on changes to types. (Use versioned type names to manage - // breaking changes.) - // - // Note: this functionality is not currently available in the official - // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. As of May 2023, there are no widely used type server - // implementations and no plans to implement one. - // - // Schemes other than `http`, `https` (or the empty scheme) might be - // used with implementation specific semantics. - // - string type_url = 1; - - // Must be a valid serialized protocol buffer of the above specified type. - bytes value = 2; -} diff --git a/proto/context.proto b/proto/context.proto index d22dcdc43..fb0111e14 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -15,7 +15,9 @@ syntax = "proto3"; package context; -import "any.proto"; +//import "any.proto"; +import "google/protobuf/any.proto"; + import "acl.proto"; import "kpi_sample_types.proto"; -- GitLab From 4a4c9dae464ba1919bca69eb213009c24385a759 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 10 Apr 2025 15:38:13 +0000 Subject: [PATCH 392/463] Common - Type Checkers - Assertions: - Corrected definition of endpoint --- src/common/type_checkers/Assertions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/type_checkers/Assertions.py b/src/common/type_checkers/Assertions.py index 9fb48bcde..f241dc0fb 100644 --- a/src/common/type_checkers/Assertions.py +++ b/src/common/type_checkers/Assertions.py @@ -472,7 +472,7 @@ def validate_topology(message, num_devices=None, num_links=None): def validate_endpoint(message): assert isinstance(message, dict) - assert len(message.keys()) == 4 + assert len(message.keys()) == 6 assert 'endpoint_id' in message validate_endpoint_id(message['endpoint_id']) assert 'name' in message @@ -482,6 +482,10 @@ def validate_endpoint(message): assert 'kpi_sample_types' in message assert isinstance(message['kpi_sample_types'], list) for kpi_sample_type in message['kpi_sample_types']: validate_kpi_sample_types_enum(kpi_sample_type) + assert 'endpoint_location' in message + # TODO: validate "endpoint_location" + assert 'capabilities' in message + # TODO: validate "capabilities" def validate_component(component): assert isinstance(component, dict) -- GitLab From a324e412ed0f73afe42a34b51f3c67f76a1ab3e0 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 10 Apr 2025 16:02:26 +0000 Subject: [PATCH 393/463] Policy & ZTP components: - Updated generated gRPC code - Fixed ConstraintSchedule data types --- .../context/model/ConstraintSchedule.java | 6 +- .../grpc/context/ContextOuterClass.java | 14015 ++++--- .../grpc/context/ContextService.java | 14 +- .../grpc/context/ContextServiceBean.java | 51 +- .../grpc/context/ContextServiceClient.java | 31 +- .../grpc/context/ContextServiceGrpc.java | 288 +- .../context/MutinyContextServiceGrpc.java | 91 +- .../grpc/kpi_sample_types/KpiSampleTypes.java | 87 +- src/policy/target/kubernetes/kubernetes.yml | 135 + .../generated-sources/grpc/acl/Acl.java | 1257 +- .../grpc/context/ContextOuterClass.java | 34324 ++++++++-------- .../grpc/context/ContextService.java | 14 +- .../grpc/context/ContextServiceBean.java | 51 +- .../grpc/context/ContextServiceClient.java | 31 +- .../grpc/context/ContextServiceGrpc.java | 416 +- .../context/MutinyContextServiceGrpc.java | 91 +- .../generated-sources/grpc/device/Device.java | 425 +- .../grpc/device/DeviceServiceGrpc.java | 34 +- .../grpc/kpi_sample_types/KpiSampleTypes.java | 87 +- .../grpc/monitoring/Monitoring.java | 5773 ++- .../monitoring/MonitoringServiceGrpc.java | 60 +- .../generated-sources/grpc/ztp/Ztp.java | 1315 +- .../grpc/ztp/ZtpServiceGrpc.java | 36 +- src/ztp/target/kubernetes/kubernetes.yml | 16 +- 24 files changed, 32338 insertions(+), 26310 deletions(-) create mode 100644 src/policy/target/kubernetes/kubernetes.yml diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java index 19a249513..ddfa2bfb8 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java @@ -18,15 +18,15 @@ package org.etsi.tfs.policy.context.model; public class ConstraintSchedule { - private final float startTimestamp; + private final double startTimestamp; private final float durationDays; - public ConstraintSchedule(float startTimestamp, float durationDays) { + public ConstraintSchedule(double startTimestamp, float durationDays) { this.startTimestamp = startTimestamp; this.durationDays = durationDays; } - public float getStartTimestamp() { + public double getStartTimestamp() { return startTimestamp; } diff --git a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java b/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java index d41b80f1d..d85f89f6f 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java @@ -199,6 +199,22 @@ public final class ContextOuterClass { * DEVICEDRIVER_QKD = 12; */ DEVICEDRIVER_QKD(12), + /** + * DEVICEDRIVER_IETF_L3VPN = 13; + */ + DEVICEDRIVER_IETF_L3VPN(13), + /** + * DEVICEDRIVER_IETF_SLICE = 14; + */ + DEVICEDRIVER_IETF_SLICE(14), + /** + * DEVICEDRIVER_NCE = 15; + */ + DEVICEDRIVER_NCE(15), + /** + * DEVICEDRIVER_SMARTNIC = 16; + */ + DEVICEDRIVER_SMARTNIC(16), UNRECOGNIZED(-1); /** @@ -270,6 +286,26 @@ public final class ContextOuterClass { */ public static final int DEVICEDRIVER_QKD_VALUE = 12; + /** + * DEVICEDRIVER_IETF_L3VPN = 13; + */ + public static final int DEVICEDRIVER_IETF_L3VPN_VALUE = 13; + + /** + * DEVICEDRIVER_IETF_SLICE = 14; + */ + public static final int DEVICEDRIVER_IETF_SLICE_VALUE = 14; + + /** + * DEVICEDRIVER_NCE = 15; + */ + public static final int DEVICEDRIVER_NCE_VALUE = 15; + + /** + * DEVICEDRIVER_SMARTNIC = 16; + */ + public static final int DEVICEDRIVER_SMARTNIC_VALUE = 16; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); @@ -319,6 +355,14 @@ public final class ContextOuterClass { return DEVICEDRIVER_OC; case 12: return DEVICEDRIVER_QKD; + case 13: + return DEVICEDRIVER_IETF_L3VPN; + case 14: + return DEVICEDRIVER_IETF_SLICE; + case 15: + return DEVICEDRIVER_NCE; + case 16: + return DEVICEDRIVER_SMARTNIC; default: return null; } @@ -482,6 +526,141 @@ public final class ContextOuterClass { } } + /** + * Protobuf enum {@code context.LinkTypeEnum} + */ + public enum LinkTypeEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * LINKTYPE_UNKNOWN = 0; + */ + LINKTYPE_UNKNOWN(0), + /** + * LINKTYPE_COPPER = 1; + */ + LINKTYPE_COPPER(1), + /** + * LINKTYPE_FIBER = 2; + */ + LINKTYPE_FIBER(2), + /** + * LINKTYPE_RADIO = 3; + */ + LINKTYPE_RADIO(3), + /** + * LINKTYPE_VIRTUAL = 4; + */ + LINKTYPE_VIRTUAL(4), + UNRECOGNIZED(-1); + + /** + * LINKTYPE_UNKNOWN = 0; + */ + public static final int LINKTYPE_UNKNOWN_VALUE = 0; + + /** + * LINKTYPE_COPPER = 1; + */ + public static final int LINKTYPE_COPPER_VALUE = 1; + + /** + * LINKTYPE_FIBER = 2; + */ + public static final int LINKTYPE_FIBER_VALUE = 2; + + /** + * LINKTYPE_RADIO = 3; + */ + public static final int LINKTYPE_RADIO_VALUE = 3; + + /** + * LINKTYPE_VIRTUAL = 4; + */ + public static final int LINKTYPE_VIRTUAL_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LinkTypeEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LinkTypeEnum forNumber(int value) { + switch(value) { + case 0: + return LINKTYPE_UNKNOWN; + case 1: + return LINKTYPE_COPPER; + case 2: + return LINKTYPE_FIBER; + case 3: + return LINKTYPE_RADIO; + case 4: + return LINKTYPE_VIRTUAL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { + + public LinkTypeEnum findValueByNumber(int number) { + return LinkTypeEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(3); + } + + private static final LinkTypeEnum[] VALUES = values(); + + public static LinkTypeEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LinkTypeEnum(int value) { + this.value = value; + } + } + /** * Protobuf enum {@code context.ServiceTypeEnum} */ @@ -628,7 +807,7 @@ public final class ContextOuterClass { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(3); + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(4); } private static final ServiceTypeEnum[] VALUES = values(); @@ -774,7 +953,7 @@ public final class ContextOuterClass { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(4); + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(5); } private static final ServiceStatusEnum[] VALUES = values(); @@ -920,7 +1099,7 @@ public final class ContextOuterClass { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(5); + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(6); } private static final SliceStatusEnum[] VALUES = values(); @@ -1037,7 +1216,7 @@ public final class ContextOuterClass { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(6); + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(7); } private static final ConfigActionEnum[] VALUES = values(); @@ -1154,7 +1333,7 @@ public final class ContextOuterClass { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(7); + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(8); } private static final ConstraintActionEnum[] VALUES = values(); @@ -1333,7 +1512,7 @@ public final class ContextOuterClass { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(8); + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(9); } private static final IsolationLevelEnum[] VALUES = values(); @@ -8814,6 +8993,31 @@ public final class ContextOuterClass { * repeated .context.LinkId link_ids = 4; */ context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index); + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + java.util.List getOpticalLinkIdsList(); + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + context.ContextOuterClass.LinkId getOpticalLinkIds(int index); + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + int getOpticalLinkIdsCount(); + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + java.util.List getOpticalLinkIdsOrBuilderList(); + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + context.ContextOuterClass.LinkIdOrBuilder getOpticalLinkIdsOrBuilder(int index); } /** @@ -8833,6 +9037,7 @@ public final class ContextOuterClass { name_ = ""; deviceIds_ = java.util.Collections.emptyList(); linkIds_ = java.util.Collections.emptyList(); + opticalLinkIds_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -9008,6 +9213,51 @@ public final class ContextOuterClass { return linkIds_.get(index); } + public static final int OPTICAL_LINK_IDS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List opticalLinkIds_; + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + @java.lang.Override + public java.util.List getOpticalLinkIdsList() { + return opticalLinkIds_; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + @java.lang.Override + public java.util.List getOpticalLinkIdsOrBuilderList() { + return opticalLinkIds_; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + @java.lang.Override + public int getOpticalLinkIdsCount() { + return opticalLinkIds_.size(); + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getOpticalLinkIds(int index) { + return opticalLinkIds_.get(index); + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getOpticalLinkIdsOrBuilder(int index) { + return opticalLinkIds_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -9035,6 +9285,9 @@ public final class ContextOuterClass { for (int i = 0; i < linkIds_.size(); i++) { output.writeMessage(4, linkIds_.get(i)); } + for (int i = 0; i < opticalLinkIds_.size(); i++) { + output.writeMessage(5, opticalLinkIds_.get(i)); + } getUnknownFields().writeTo(output); } @@ -9056,6 +9309,9 @@ public final class ContextOuterClass { for (int i = 0; i < linkIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkIds_.get(i)); } + for (int i = 0; i < opticalLinkIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, opticalLinkIds_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -9082,6 +9338,8 @@ public final class ContextOuterClass { return false; if (!getLinkIdsList().equals(other.getLinkIdsList())) return false; + if (!getOpticalLinkIdsList().equals(other.getOpticalLinkIdsList())) + return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -9108,6 +9366,10 @@ public final class ContextOuterClass { hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; hash = (53 * hash) + getLinkIdsList().hashCode(); } + if (getOpticalLinkIdsCount() > 0) { + hash = (37 * hash) + OPTICAL_LINK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getOpticalLinkIdsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -9232,6 +9494,13 @@ public final class ContextOuterClass { linkIdsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); + if (opticalLinkIdsBuilder_ == null) { + opticalLinkIds_ = java.util.Collections.emptyList(); + } else { + opticalLinkIds_ = null; + opticalLinkIdsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -9284,6 +9553,15 @@ public final class ContextOuterClass { } else { result.linkIds_ = linkIdsBuilder_.build(); } + if (opticalLinkIdsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + opticalLinkIds_ = java.util.Collections.unmodifiableList(opticalLinkIds_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.opticalLinkIds_ = opticalLinkIds_; + } else { + result.opticalLinkIds_ = opticalLinkIdsBuilder_.build(); + } } private void buildPartial0(context.ContextOuterClass.Topology result) { @@ -9365,6 +9643,30 @@ public final class ContextOuterClass { } } } + if (opticalLinkIdsBuilder_ == null) { + if (!other.opticalLinkIds_.isEmpty()) { + if (opticalLinkIds_.isEmpty()) { + opticalLinkIds_ = other.opticalLinkIds_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.addAll(other.opticalLinkIds_); + } + onChanged(); + } + } else { + if (!other.opticalLinkIds_.isEmpty()) { + if (opticalLinkIdsBuilder_.isEmpty()) { + opticalLinkIdsBuilder_.dispose(); + opticalLinkIdsBuilder_ = null; + opticalLinkIds_ = other.opticalLinkIds_; + bitField0_ = (bitField0_ & ~0x00000010); + opticalLinkIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOpticalLinkIdsFieldBuilder() : null; + } else { + opticalLinkIdsBuilder_.addAllMessages(other.opticalLinkIds_); + } + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -9426,6 +9728,18 @@ public final class ContextOuterClass { break; } // case 34 + case 42: + { + context.ContextOuterClass.LinkId m = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry); + if (opticalLinkIdsBuilder_ == null) { + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.add(m); + } else { + opticalLinkIdsBuilder_.addMessage(m); + } + break; + } + // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -10116,6 +10430,243 @@ public final class ContextOuterClass { return linkIdsBuilder_; } + private java.util.List opticalLinkIds_ = java.util.Collections.emptyList(); + + private void ensureOpticalLinkIdsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + opticalLinkIds_ = new java.util.ArrayList(opticalLinkIds_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 opticalLinkIdsBuilder_; + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public java.util.List getOpticalLinkIdsList() { + if (opticalLinkIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(opticalLinkIds_); + } else { + return opticalLinkIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public int getOpticalLinkIdsCount() { + if (opticalLinkIdsBuilder_ == null) { + return opticalLinkIds_.size(); + } else { + return opticalLinkIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public context.ContextOuterClass.LinkId getOpticalLinkIds(int index) { + if (opticalLinkIdsBuilder_ == null) { + return opticalLinkIds_.get(index); + } else { + return opticalLinkIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder setOpticalLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (opticalLinkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.set(index, value); + onChanged(); + } else { + opticalLinkIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder setOpticalLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (opticalLinkIdsBuilder_ == null) { + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.set(index, builderForValue.build()); + onChanged(); + } else { + opticalLinkIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder addOpticalLinkIds(context.ContextOuterClass.LinkId value) { + if (opticalLinkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.add(value); + onChanged(); + } else { + opticalLinkIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder addOpticalLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (opticalLinkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.add(index, value); + onChanged(); + } else { + opticalLinkIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder addOpticalLinkIds(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (opticalLinkIdsBuilder_ == null) { + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.add(builderForValue.build()); + onChanged(); + } else { + opticalLinkIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder addOpticalLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (opticalLinkIdsBuilder_ == null) { + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.add(index, builderForValue.build()); + onChanged(); + } else { + opticalLinkIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder addAllOpticalLinkIds(java.lang.Iterable values) { + if (opticalLinkIdsBuilder_ == null) { + ensureOpticalLinkIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, opticalLinkIds_); + onChanged(); + } else { + opticalLinkIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder clearOpticalLinkIds() { + if (opticalLinkIdsBuilder_ == null) { + opticalLinkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + opticalLinkIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder removeOpticalLinkIds(int index) { + if (opticalLinkIdsBuilder_ == null) { + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.remove(index); + onChanged(); + } else { + opticalLinkIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public context.ContextOuterClass.LinkId.Builder getOpticalLinkIdsBuilder(int index) { + return getOpticalLinkIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public context.ContextOuterClass.LinkIdOrBuilder getOpticalLinkIdsOrBuilder(int index) { + if (opticalLinkIdsBuilder_ == null) { + return opticalLinkIds_.get(index); + } else { + return opticalLinkIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public java.util.List getOpticalLinkIdsOrBuilderList() { + if (opticalLinkIdsBuilder_ != null) { + return opticalLinkIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(opticalLinkIds_); + } + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public context.ContextOuterClass.LinkId.Builder addOpticalLinkIdsBuilder() { + return getOpticalLinkIdsFieldBuilder().addBuilder(context.ContextOuterClass.LinkId.getDefaultInstance()); + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public context.ContextOuterClass.LinkId.Builder addOpticalLinkIdsBuilder(int index) { + return getOpticalLinkIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.LinkId.getDefaultInstance()); + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public java.util.List getOpticalLinkIdsBuilderList() { + return getOpticalLinkIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getOpticalLinkIdsFieldBuilder() { + if (opticalLinkIdsBuilder_ == null) { + opticalLinkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(opticalLinkIds_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + opticalLinkIds_ = null; + } + return opticalLinkIdsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -10253,6 +10804,31 @@ public final class ContextOuterClass { * repeated .context.Link links = 4; */ context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index); + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + java.util.List getOpticalLinksList(); + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + context.ContextOuterClass.OpticalLink getOpticalLinks(int index); + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + int getOpticalLinksCount(); + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + java.util.List getOpticalLinksOrBuilderList(); + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + context.ContextOuterClass.OpticalLinkOrBuilder getOpticalLinksOrBuilder(int index); } /** @@ -10272,6 +10848,7 @@ public final class ContextOuterClass { name_ = ""; devices_ = java.util.Collections.emptyList(); links_ = java.util.Collections.emptyList(); + opticalLinks_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -10447,6 +11024,51 @@ public final class ContextOuterClass { return links_.get(index); } + public static final int OPTICAL_LINKS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List opticalLinks_; + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + @java.lang.Override + public java.util.List getOpticalLinksList() { + return opticalLinks_; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + @java.lang.Override + public java.util.List getOpticalLinksOrBuilderList() { + return opticalLinks_; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + @java.lang.Override + public int getOpticalLinksCount() { + return opticalLinks_.size(); + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLink getOpticalLinks(int index) { + return opticalLinks_.get(index); + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLinkOrBuilder getOpticalLinksOrBuilder(int index) { + return opticalLinks_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -10474,6 +11096,9 @@ public final class ContextOuterClass { for (int i = 0; i < links_.size(); i++) { output.writeMessage(4, links_.get(i)); } + for (int i = 0; i < opticalLinks_.size(); i++) { + output.writeMessage(5, opticalLinks_.get(i)); + } getUnknownFields().writeTo(output); } @@ -10495,6 +11120,9 @@ public final class ContextOuterClass { for (int i = 0; i < links_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, links_.get(i)); } + for (int i = 0; i < opticalLinks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, opticalLinks_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -10521,6 +11149,8 @@ public final class ContextOuterClass { return false; if (!getLinksList().equals(other.getLinksList())) return false; + if (!getOpticalLinksList().equals(other.getOpticalLinksList())) + return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -10547,6 +11177,10 @@ public final class ContextOuterClass { hash = (37 * hash) + LINKS_FIELD_NUMBER; hash = (53 * hash) + getLinksList().hashCode(); } + if (getOpticalLinksCount() > 0) { + hash = (37 * hash) + OPTICAL_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getOpticalLinksList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -10671,6 +11305,13 @@ public final class ContextOuterClass { linksBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); + if (opticalLinksBuilder_ == null) { + opticalLinks_ = java.util.Collections.emptyList(); + } else { + opticalLinks_ = null; + opticalLinksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -10723,6 +11364,15 @@ public final class ContextOuterClass { } else { result.links_ = linksBuilder_.build(); } + if (opticalLinksBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + opticalLinks_ = java.util.Collections.unmodifiableList(opticalLinks_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.opticalLinks_ = opticalLinks_; + } else { + result.opticalLinks_ = opticalLinksBuilder_.build(); + } } private void buildPartial0(context.ContextOuterClass.TopologyDetails result) { @@ -10804,6 +11454,30 @@ public final class ContextOuterClass { } } } + if (opticalLinksBuilder_ == null) { + if (!other.opticalLinks_.isEmpty()) { + if (opticalLinks_.isEmpty()) { + opticalLinks_ = other.opticalLinks_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureOpticalLinksIsMutable(); + opticalLinks_.addAll(other.opticalLinks_); + } + onChanged(); + } + } else { + if (!other.opticalLinks_.isEmpty()) { + if (opticalLinksBuilder_.isEmpty()) { + opticalLinksBuilder_.dispose(); + opticalLinksBuilder_ = null; + opticalLinks_ = other.opticalLinks_; + bitField0_ = (bitField0_ & ~0x00000010); + opticalLinksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOpticalLinksFieldBuilder() : null; + } else { + opticalLinksBuilder_.addAllMessages(other.opticalLinks_); + } + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -10865,6 +11539,18 @@ public final class ContextOuterClass { break; } // case 34 + case 42: + { + context.ContextOuterClass.OpticalLink m = input.readMessage(context.ContextOuterClass.OpticalLink.parser(), extensionRegistry); + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.add(m); + } else { + opticalLinksBuilder_.addMessage(m); + } + break; + } + // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -11555,6 +12241,243 @@ public final class ContextOuterClass { return linksBuilder_; } + private java.util.List opticalLinks_ = java.util.Collections.emptyList(); + + private void ensureOpticalLinksIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + opticalLinks_ = new java.util.ArrayList(opticalLinks_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 opticalLinksBuilder_; + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public java.util.List getOpticalLinksList() { + if (opticalLinksBuilder_ == null) { + return java.util.Collections.unmodifiableList(opticalLinks_); + } else { + return opticalLinksBuilder_.getMessageList(); + } + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public int getOpticalLinksCount() { + if (opticalLinksBuilder_ == null) { + return opticalLinks_.size(); + } else { + return opticalLinksBuilder_.getCount(); + } + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public context.ContextOuterClass.OpticalLink getOpticalLinks(int index) { + if (opticalLinksBuilder_ == null) { + return opticalLinks_.get(index); + } else { + return opticalLinksBuilder_.getMessage(index); + } + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder setOpticalLinks(int index, context.ContextOuterClass.OpticalLink value) { + if (opticalLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinksIsMutable(); + opticalLinks_.set(index, value); + onChanged(); + } else { + opticalLinksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder setOpticalLinks(int index, context.ContextOuterClass.OpticalLink.Builder builderForValue) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.set(index, builderForValue.build()); + onChanged(); + } else { + opticalLinksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder addOpticalLinks(context.ContextOuterClass.OpticalLink value) { + if (opticalLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinksIsMutable(); + opticalLinks_.add(value); + onChanged(); + } else { + opticalLinksBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder addOpticalLinks(int index, context.ContextOuterClass.OpticalLink value) { + if (opticalLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinksIsMutable(); + opticalLinks_.add(index, value); + onChanged(); + } else { + opticalLinksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder addOpticalLinks(context.ContextOuterClass.OpticalLink.Builder builderForValue) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.add(builderForValue.build()); + onChanged(); + } else { + opticalLinksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder addOpticalLinks(int index, context.ContextOuterClass.OpticalLink.Builder builderForValue) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.add(index, builderForValue.build()); + onChanged(); + } else { + opticalLinksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder addAllOpticalLinks(java.lang.Iterable values) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, opticalLinks_); + onChanged(); + } else { + opticalLinksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder clearOpticalLinks() { + if (opticalLinksBuilder_ == null) { + opticalLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + opticalLinksBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder removeOpticalLinks(int index) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.remove(index); + onChanged(); + } else { + opticalLinksBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public context.ContextOuterClass.OpticalLink.Builder getOpticalLinksBuilder(int index) { + return getOpticalLinksFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public context.ContextOuterClass.OpticalLinkOrBuilder getOpticalLinksOrBuilder(int index) { + if (opticalLinksBuilder_ == null) { + return opticalLinks_.get(index); + } else { + return opticalLinksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public java.util.List getOpticalLinksOrBuilderList() { + if (opticalLinksBuilder_ != null) { + return opticalLinksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(opticalLinks_); + } + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public context.ContextOuterClass.OpticalLink.Builder addOpticalLinksBuilder() { + return getOpticalLinksFieldBuilder().addBuilder(context.ContextOuterClass.OpticalLink.getDefaultInstance()); + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public context.ContextOuterClass.OpticalLink.Builder addOpticalLinksBuilder(int index) { + return getOpticalLinksFieldBuilder().addBuilder(index, context.ContextOuterClass.OpticalLink.getDefaultInstance()); + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public java.util.List getOpticalLinksBuilderList() { + return getOpticalLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getOpticalLinksFieldBuilder() { + if (opticalLinksBuilder_ == null) { + opticalLinksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(opticalLinks_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + opticalLinks_ = null; + } + return opticalLinksBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -23209,44 +24132,56 @@ public final class ContextOuterClass { com.google.protobuf.ByteString getNameBytes(); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * .context.LinkTypeEnum link_type = 3; + * @return The enum numeric value on the wire for linkType. + */ + int getLinkTypeValue(); + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The linkType. + */ + context.ContextOuterClass.LinkTypeEnum getLinkType(); + + /** + * repeated .context.EndPointId link_endpoint_ids = 4; */ java.util.List getLinkEndpointIdsList(); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ context.ContextOuterClass.EndPointId getLinkEndpointIds(int index); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ int getLinkEndpointIdsCount(); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ java.util.List getLinkEndpointIdsOrBuilderList(); /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index); /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return Whether the attributes field is set. */ boolean hasAttributes(); /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return The attributes. */ context.ContextOuterClass.LinkAttributes getAttributes(); /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder(); } @@ -23266,6 +24201,7 @@ public final class ContextOuterClass { private Link() { name_ = ""; + linkType_ = 0; linkEndpointIds_ = java.util.Collections.emptyList(); } @@ -23352,13 +24288,36 @@ public final class ContextOuterClass { } } - public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 3; + public static final int LINK_TYPE_FIELD_NUMBER = 3; + + private int linkType_ = 0; + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The enum numeric value on the wire for linkType. + */ + @java.lang.Override + public int getLinkTypeValue() { + return linkType_; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The linkType. + */ + @java.lang.Override + public context.ContextOuterClass.LinkTypeEnum getLinkType() { + context.ContextOuterClass.LinkTypeEnum result = context.ContextOuterClass.LinkTypeEnum.forNumber(linkType_); + return result == null ? context.ContextOuterClass.LinkTypeEnum.UNRECOGNIZED : result; + } + + public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 4; @SuppressWarnings("serial") private java.util.List linkEndpointIds_; /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public java.util.List getLinkEndpointIdsList() { @@ -23366,7 +24325,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public java.util.List getLinkEndpointIdsOrBuilderList() { @@ -23374,7 +24333,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public int getLinkEndpointIdsCount() { @@ -23382,7 +24341,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { @@ -23390,19 +24349,19 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { return linkEndpointIds_.get(index); } - public static final int ATTRIBUTES_FIELD_NUMBER = 4; + public static final int ATTRIBUTES_FIELD_NUMBER = 5; private context.ContextOuterClass.LinkAttributes attributes_; /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return Whether the attributes field is set. */ @java.lang.Override @@ -23411,7 +24370,7 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return The attributes. */ @java.lang.Override @@ -23420,7 +24379,7 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ @java.lang.Override public context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder() { @@ -23448,11 +24407,14 @@ public final class ContextOuterClass { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } + if (linkType_ != context.ContextOuterClass.LinkTypeEnum.LINKTYPE_UNKNOWN.getNumber()) { + output.writeEnum(3, linkType_); + } for (int i = 0; i < linkEndpointIds_.size(); i++) { - output.writeMessage(3, linkEndpointIds_.get(i)); + output.writeMessage(4, linkEndpointIds_.get(i)); } if (attributes_ != null) { - output.writeMessage(4, getAttributes()); + output.writeMessage(5, getAttributes()); } getUnknownFields().writeTo(output); } @@ -23469,11 +24431,14 @@ public final class ContextOuterClass { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } + if (linkType_ != context.ContextOuterClass.LinkTypeEnum.LINKTYPE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, linkType_); + } for (int i = 0; i < linkEndpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, linkEndpointIds_.get(i)); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkEndpointIds_.get(i)); } if (attributes_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAttributes()); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAttributes()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -23497,6 +24462,8 @@ public final class ContextOuterClass { } if (!getName().equals(other.getName())) return false; + if (linkType_ != other.linkType_) + return false; if (!getLinkEndpointIdsList().equals(other.getLinkEndpointIdsList())) return false; if (hasAttributes() != other.hasAttributes()) @@ -23523,6 +24490,8 @@ public final class ContextOuterClass { } hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LINK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + linkType_; if (getLinkEndpointIdsCount() > 0) { hash = (37 * hash) + LINK_ENDPOINT_IDS_FIELD_NUMBER; hash = (53 * hash) + getLinkEndpointIdsList().hashCode(); @@ -23641,13 +24610,14 @@ public final class ContextOuterClass { linkIdBuilder_ = null; } name_ = ""; + linkType_ = 0; if (linkEndpointIdsBuilder_ == null) { linkEndpointIds_ = java.util.Collections.emptyList(); } else { linkEndpointIds_ = null; linkEndpointIdsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); attributes_ = null; if (attributesBuilder_ != null) { attributesBuilder_.dispose(); @@ -23688,9 +24658,9 @@ public final class ContextOuterClass { private void buildPartialRepeatedFields(context.ContextOuterClass.Link result) { if (linkEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { linkEndpointIds_ = java.util.Collections.unmodifiableList(linkEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } result.linkEndpointIds_ = linkEndpointIds_; } else { @@ -23706,7 +24676,10 @@ public final class ContextOuterClass { if (((from_bitField0_ & 0x00000002) != 0)) { result.name_ = name_; } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000004) != 0)) { + result.linkType_ = linkType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { result.attributes_ = attributesBuilder_ == null ? attributes_ : attributesBuilder_.build(); } } @@ -23732,11 +24705,14 @@ public final class ContextOuterClass { bitField0_ |= 0x00000002; onChanged(); } + if (other.linkType_ != 0) { + setLinkTypeValue(other.getLinkTypeValue()); + } if (linkEndpointIdsBuilder_ == null) { if (!other.linkEndpointIds_.isEmpty()) { if (linkEndpointIds_.isEmpty()) { linkEndpointIds_ = other.linkEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureLinkEndpointIdsIsMutable(); linkEndpointIds_.addAll(other.linkEndpointIds_); @@ -23749,7 +24725,7 @@ public final class ContextOuterClass { linkEndpointIdsBuilder_.dispose(); linkEndpointIdsBuilder_ = null; linkEndpointIds_ = other.linkEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); linkEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkEndpointIdsFieldBuilder() : null; } else { linkEndpointIdsBuilder_.addAllMessages(other.linkEndpointIds_); @@ -23796,7 +24772,14 @@ public final class ContextOuterClass { break; } // case 18 - case 26: + case 24: + { + linkType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + case 34: { context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); if (linkEndpointIdsBuilder_ == null) { @@ -23807,14 +24790,14 @@ public final class ContextOuterClass { } break; } - // case 26 - case 34: + // case 34 + case 42: { input.readMessage(getAttributesFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } - // case 34 + // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -24031,19 +25014,78 @@ public final class ContextOuterClass { return this; } + private int linkType_ = 0; + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The enum numeric value on the wire for linkType. + */ + @java.lang.Override + public int getLinkTypeValue() { + return linkType_; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @param value The enum numeric value on the wire for linkType to set. + * @return This builder for chaining. + */ + public Builder setLinkTypeValue(int value) { + linkType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @return The linkType. + */ + @java.lang.Override + public context.ContextOuterClass.LinkTypeEnum getLinkType() { + context.ContextOuterClass.LinkTypeEnum result = context.ContextOuterClass.LinkTypeEnum.forNumber(linkType_); + return result == null ? context.ContextOuterClass.LinkTypeEnum.UNRECOGNIZED : result; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @param value The linkType to set. + * @return This builder for chaining. + */ + public Builder setLinkType(context.ContextOuterClass.LinkTypeEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + linkType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.LinkTypeEnum link_type = 3; + * @return This builder for chaining. + */ + public Builder clearLinkType() { + bitField0_ = (bitField0_ & ~0x00000004); + linkType_ = 0; + onChanged(); + return this; + } + private java.util.List linkEndpointIds_ = java.util.Collections.emptyList(); private void ensureLinkEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { linkEndpointIds_ = new java.util.ArrayList(linkEndpointIds_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3 linkEndpointIdsBuilder_; /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public java.util.List getLinkEndpointIdsList() { if (linkEndpointIdsBuilder_ == null) { @@ -24054,7 +25096,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public int getLinkEndpointIdsCount() { if (linkEndpointIdsBuilder_ == null) { @@ -24065,7 +25107,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { if (linkEndpointIdsBuilder_ == null) { @@ -24076,7 +25118,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { if (linkEndpointIdsBuilder_ == null) { @@ -24093,7 +25135,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { if (linkEndpointIdsBuilder_ == null) { @@ -24107,7 +25149,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId value) { if (linkEndpointIdsBuilder_ == null) { @@ -24124,7 +25166,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { if (linkEndpointIdsBuilder_ == null) { @@ -24141,7 +25183,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { if (linkEndpointIdsBuilder_ == null) { @@ -24155,7 +25197,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { if (linkEndpointIdsBuilder_ == null) { @@ -24169,7 +25211,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder addAllLinkEndpointIds(java.lang.Iterable values) { if (linkEndpointIdsBuilder_ == null) { @@ -24183,12 +25225,12 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder clearLinkEndpointIds() { if (linkEndpointIdsBuilder_ == null) { linkEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { linkEndpointIdsBuilder_.clear(); @@ -24197,7 +25239,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public Builder removeLinkEndpointIds(int index) { if (linkEndpointIdsBuilder_ == null) { @@ -24211,14 +25253,14 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointId.Builder getLinkEndpointIdsBuilder(int index) { return getLinkEndpointIdsFieldBuilder().getBuilder(index); } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { if (linkEndpointIdsBuilder_ == null) { @@ -24229,7 +25271,7 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public java.util.List getLinkEndpointIdsOrBuilderList() { if (linkEndpointIdsBuilder_ != null) { @@ -24240,21 +25282,21 @@ public final class ContextOuterClass { } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder() { return getLinkEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder(int index) { return getLinkEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); } /** - * repeated .context.EndPointId link_endpoint_ids = 3; + * repeated .context.EndPointId link_endpoint_ids = 4; */ public java.util.List getLinkEndpointIdsBuilderList() { return getLinkEndpointIdsFieldBuilder().getBuilderList(); @@ -24262,7 +25304,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3 getLinkEndpointIdsFieldBuilder() { if (linkEndpointIdsBuilder_ == null) { - linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkEndpointIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkEndpointIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); linkEndpointIds_ = null; } return linkEndpointIdsBuilder_; @@ -24273,15 +25315,15 @@ public final class ContextOuterClass { private com.google.protobuf.SingleFieldBuilderV3 attributesBuilder_; /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return Whether the attributes field is set. */ public boolean hasAttributes() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; * @return The attributes. */ public context.ContextOuterClass.LinkAttributes getAttributes() { @@ -24293,7 +25335,7 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public Builder setAttributes(context.ContextOuterClass.LinkAttributes value) { if (attributesBuilder_ == null) { @@ -24304,13 +25346,13 @@ public final class ContextOuterClass { } else { attributesBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public Builder setAttributes(context.ContextOuterClass.LinkAttributes.Builder builderForValue) { if (attributesBuilder_ == null) { @@ -24318,17 +25360,17 @@ public final class ContextOuterClass { } else { attributesBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public Builder mergeAttributes(context.ContextOuterClass.LinkAttributes value) { if (attributesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && attributes_ != null && attributes_ != context.ContextOuterClass.LinkAttributes.getDefaultInstance()) { + if (((bitField0_ & 0x00000010) != 0) && attributes_ != null && attributes_ != context.ContextOuterClass.LinkAttributes.getDefaultInstance()) { getAttributesBuilder().mergeFrom(value); } else { attributes_ = value; @@ -24336,16 +25378,16 @@ public final class ContextOuterClass { } else { attributesBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public Builder clearAttributes() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); attributes_ = null; if (attributesBuilder_ != null) { attributesBuilder_.dispose(); @@ -24356,16 +25398,16 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public context.ContextOuterClass.LinkAttributes.Builder getAttributesBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getAttributesFieldBuilder().getBuilder(); } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ public context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder() { if (attributesBuilder_ != null) { @@ -24376,7 +25418,7 @@ public final class ContextOuterClass { } /** - * .context.LinkAttributes attributes = 4; + * .context.LinkAttributes attributes = 5; */ private com.google.protobuf.SingleFieldBuilderV3 getAttributesFieldBuilder() { if (attributesBuilder_ == null) { @@ -51855,6 +52897,39 @@ public final class ContextOuterClass { * .context.Location endpoint_location = 5; */ context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder(); + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + int getCapabilitiesCount(); + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + boolean containsCapabilities(java.lang.String key); + + /** + * Use {@link #getCapabilitiesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map getCapabilities(); + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + java.util.Map getCapabilitiesMap(); + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + /* nullable */ + com.google.protobuf.Any getCapabilitiesOrDefault(java.lang.String key, /* nullable */ + com.google.protobuf.Any defaultValue); + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + com.google.protobuf.Any getCapabilitiesOrThrow(java.lang.String key); } /** @@ -51886,6 +52961,17 @@ public final class ContextOuterClass { return context.ContextOuterClass.internal_static_context_EndPoint_descriptor; } + @SuppressWarnings({ "rawtypes" }) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch(number) { + case 6: + return internalGetCapabilities(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return context.ContextOuterClass.internal_static_context_EndPoint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPoint.class, context.ContextOuterClass.EndPoint.Builder.class); @@ -52089,6 +53175,84 @@ public final class ContextOuterClass { return endpointLocation_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; } + public static final int CAPABILITIES_FIELD_NUMBER = 6; + + private static final class CapabilitiesDefaultEntryHolder { + + static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance(context.ContextOuterClass.internal_static_context_EndPoint_CapabilitiesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, com.google.protobuf.Any.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField capabilities_; + + private com.google.protobuf.MapField internalGetCapabilities() { + if (capabilities_ == null) { + return com.google.protobuf.MapField.emptyMapField(CapabilitiesDefaultEntryHolder.defaultEntry); + } + return capabilities_; + } + + public int getCapabilitiesCount() { + return internalGetCapabilities().getMap().size(); + } + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + @java.lang.Override + public boolean containsCapabilities(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetCapabilities().getMap().containsKey(key); + } + + /** + * Use {@link #getCapabilitiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCapabilities() { + return getCapabilitiesMap(); + } + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + @java.lang.Override + public java.util.Map getCapabilitiesMap() { + return internalGetCapabilities().getMap(); + } + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + @java.lang.Override + public /* nullable */ + com.google.protobuf.Any getCapabilitiesOrDefault(java.lang.String key, /* nullable */ + com.google.protobuf.Any defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCapabilities().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + @java.lang.Override + public com.google.protobuf.Any getCapabilitiesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCapabilities().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -52124,6 +53288,7 @@ public final class ContextOuterClass { if (endpointLocation_ != null) { output.writeMessage(5, getEndpointLocation()); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(output, internalGetCapabilities(), CapabilitiesDefaultEntryHolder.defaultEntry, 6); getUnknownFields().writeTo(output); } @@ -52157,6 +53322,10 @@ public final class ContextOuterClass { if (endpointLocation_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndpointLocation()); } + for (java.util.Map.Entry entry : internalGetCapabilities().getMap().entrySet()) { + com.google.protobuf.MapEntry capabilities__ = CapabilitiesDefaultEntryHolder.defaultEntry.newBuilderForType().setKey(entry.getKey()).setValue(entry.getValue()).build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, capabilities__); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -52189,6 +53358,8 @@ public final class ContextOuterClass { if (!getEndpointLocation().equals(other.getEndpointLocation())) return false; } + if (!internalGetCapabilities().equals(other.internalGetCapabilities())) + return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -52217,6 +53388,10 @@ public final class ContextOuterClass { hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER; hash = (53 * hash) + getEndpointLocation().hashCode(); } + if (!internalGetCapabilities().getMap().isEmpty()) { + hash = (37 * hash) + CAPABILITIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetCapabilities().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -52304,6 +53479,26 @@ public final class ContextOuterClass { return context.ContextOuterClass.internal_static_context_EndPoint_descriptor; } + @SuppressWarnings({ "rawtypes" }) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch(number) { + case 6: + return internalGetCapabilities(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({ "rawtypes" }) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch(number) { + case 6: + return internalGetMutableCapabilities(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return context.ContextOuterClass.internal_static_context_EndPoint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPoint.class, context.ContextOuterClass.EndPoint.Builder.class); @@ -52335,6 +53530,7 @@ public final class ContextOuterClass { endpointLocationBuilder_.dispose(); endpointLocationBuilder_ = null; } + internalGetMutableCapabilities().clear(); return this; } @@ -52390,6 +53586,10 @@ public final class ContextOuterClass { if (((from_bitField0_ & 0x00000010) != 0)) { result.endpointLocation_ = endpointLocationBuilder_ == null ? endpointLocation_ : endpointLocationBuilder_.build(); } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.capabilities_ = internalGetCapabilities(); + result.capabilities_.makeImmutable(); + } } @java.lang.Override @@ -52431,6 +53631,8 @@ public final class ContextOuterClass { if (other.hasEndpointLocation()) { mergeEndpointLocation(other.getEndpointLocation()); } + internalGetMutableCapabilities().mergeFrom(other.internalGetCapabilities()); + bitField0_ |= 0x00000020; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -52503,6 +53705,14 @@ public final class ContextOuterClass { break; } // case 42 + case 50: + { + com.google.protobuf.MapEntry capabilities__ = input.readMessage(CapabilitiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableCapabilities().getMutableMap().put(capabilities__.getKey(), capabilities__.getValue()); + bitField0_ |= 0x00000020; + break; + } + // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -53058,6 +54268,138 @@ public final class ContextOuterClass { return endpointLocationBuilder_; } + private com.google.protobuf.MapField capabilities_; + + private com.google.protobuf.MapField internalGetCapabilities() { + if (capabilities_ == null) { + return com.google.protobuf.MapField.emptyMapField(CapabilitiesDefaultEntryHolder.defaultEntry); + } + return capabilities_; + } + + private com.google.protobuf.MapField internalGetMutableCapabilities() { + if (capabilities_ == null) { + capabilities_ = com.google.protobuf.MapField.newMapField(CapabilitiesDefaultEntryHolder.defaultEntry); + } + if (!capabilities_.isMutable()) { + capabilities_ = capabilities_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return capabilities_; + } + + public int getCapabilitiesCount() { + return internalGetCapabilities().getMap().size(); + } + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + @java.lang.Override + public boolean containsCapabilities(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetCapabilities().getMap().containsKey(key); + } + + /** + * Use {@link #getCapabilitiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCapabilities() { + return getCapabilitiesMap(); + } + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + @java.lang.Override + public java.util.Map getCapabilitiesMap() { + return internalGetCapabilities().getMap(); + } + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + @java.lang.Override + public /* nullable */ + com.google.protobuf.Any getCapabilitiesOrDefault(java.lang.String key, /* nullable */ + com.google.protobuf.Any defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCapabilities().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + @java.lang.Override + public com.google.protobuf.Any getCapabilitiesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCapabilities().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearCapabilities() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableCapabilities().getMutableMap().clear(); + return this; + } + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + public Builder removeCapabilities(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableCapabilities().getMutableMap().remove(key); + return this; + } + + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map getMutableCapabilities() { + bitField0_ |= 0x00000020; + return internalGetMutableCapabilities().getMutableMap(); + } + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + public Builder putCapabilities(java.lang.String key, com.google.protobuf.Any value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableCapabilities().getMutableMap().put(key, value); + bitField0_ |= 0x00000020; + return this; + } + + /** + * map<string, .google.protobuf.Any> capabilities = 6; + */ + public Builder putAllCapabilities(java.util.Map values) { + internalGetMutableCapabilities().getMutableMap().putAll(values); + bitField0_ |= 0x00000020; + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -58566,10 +59908,10 @@ public final class ContextOuterClass { com.google.protobuf.MessageOrBuilder { /** - * float start_timestamp = 1; + * double start_timestamp = 1; * @return The startTimestamp. */ - float getStartTimestamp(); + double getStartTimestamp(); /** * float duration_days = 2; @@ -58611,14 +59953,14 @@ public final class ContextOuterClass { public static final int START_TIMESTAMP_FIELD_NUMBER = 1; - private float startTimestamp_ = 0F; + private double startTimestamp_ = 0D; /** - * float start_timestamp = 1; + * double start_timestamp = 1; * @return The startTimestamp. */ @java.lang.Override - public float getStartTimestamp() { + public double getStartTimestamp() { return startTimestamp_; } @@ -58650,8 +59992,8 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(startTimestamp_) != 0) { - output.writeFloat(1, startTimestamp_); + if (java.lang.Double.doubleToRawLongBits(startTimestamp_) != 0) { + output.writeDouble(1, startTimestamp_); } if (java.lang.Float.floatToRawIntBits(durationDays_) != 0) { output.writeFloat(2, durationDays_); @@ -58665,8 +60007,8 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (java.lang.Float.floatToRawIntBits(startTimestamp_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, startTimestamp_); + if (java.lang.Double.doubleToRawLongBits(startTimestamp_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, startTimestamp_); } if (java.lang.Float.floatToRawIntBits(durationDays_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, durationDays_); @@ -58685,7 +60027,7 @@ public final class ContextOuterClass { return super.equals(obj); } context.ContextOuterClass.Constraint_Schedule other = (context.ContextOuterClass.Constraint_Schedule) obj; - if (java.lang.Float.floatToIntBits(getStartTimestamp()) != java.lang.Float.floatToIntBits(other.getStartTimestamp())) + if (java.lang.Double.doubleToLongBits(getStartTimestamp()) != java.lang.Double.doubleToLongBits(other.getStartTimestamp())) return false; if (java.lang.Float.floatToIntBits(getDurationDays()) != java.lang.Float.floatToIntBits(other.getDurationDays())) return false; @@ -58702,7 +60044,7 @@ public final class ContextOuterClass { int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getStartTimestamp()); + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getStartTimestamp())); hash = (37 * hash) + DURATION_DAYS_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getDurationDays()); hash = (29 * hash) + getUnknownFields().hashCode(); @@ -58809,7 +60151,7 @@ public final class ContextOuterClass { public Builder clear() { super.clear(); bitField0_ = 0; - startTimestamp_ = 0F; + startTimestamp_ = 0D; durationDays_ = 0F; return this; } @@ -58866,7 +60208,7 @@ public final class ContextOuterClass { public Builder mergeFrom(context.ContextOuterClass.Constraint_Schedule other) { if (other == context.ContextOuterClass.Constraint_Schedule.getDefaultInstance()) return this; - if (other.getStartTimestamp() != 0F) { + if (other.getStartTimestamp() != 0D) { setStartTimestamp(other.getStartTimestamp()); } if (other.getDurationDays() != 0F) { @@ -58895,13 +60237,13 @@ public final class ContextOuterClass { case 0: done = true; break; - case 13: + case 9: { - startTimestamp_ = input.readFloat(); + startTimestamp_ = input.readDouble(); bitField0_ |= 0x00000001; break; } - // case 13 + // case 9 case 21: { durationDays_ = input.readFloat(); @@ -58932,23 +60274,23 @@ public final class ContextOuterClass { private int bitField0_; - private float startTimestamp_; + private double startTimestamp_; /** - * float start_timestamp = 1; + * double start_timestamp = 1; * @return The startTimestamp. */ @java.lang.Override - public float getStartTimestamp() { + public double getStartTimestamp() { return startTimestamp_; } /** - * float start_timestamp = 1; + * double start_timestamp = 1; * @param value The startTimestamp to set. * @return This builder for chaining. */ - public Builder setStartTimestamp(float value) { + public Builder setStartTimestamp(double value) { startTimestamp_ = value; bitField0_ |= 0x00000001; onChanged(); @@ -58956,12 +60298,12 @@ public final class ContextOuterClass { } /** - * float start_timestamp = 1; + * double start_timestamp = 1; * @return This builder for chaining. */ public Builder clearStartTimestamp() { bitField0_ = (bitField0_ & ~0x00000001); - startTimestamp_ = 0F; + startTimestamp_ = 0D; onChanged(); return this; } @@ -59588,6 +60930,42 @@ public final class ContextOuterClass { */ context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder(); + /** + * string interface = 3; + * @return Whether the interface field is set. + */ + boolean hasInterface(); + + /** + * string interface = 3; + * @return The interface. + */ + java.lang.String getInterface(); + + /** + * string interface = 3; + * @return The bytes for interface. + */ + com.google.protobuf.ByteString getInterfaceBytes(); + + /** + * string circuit_pack = 4; + * @return Whether the circuitPack field is set. + */ + boolean hasCircuitPack(); + + /** + * string circuit_pack = 4; + * @return The circuitPack. + */ + java.lang.String getCircuitPack(); + + /** + * string circuit_pack = 4; + * @return The bytes for circuitPack. + */ + com.google.protobuf.ByteString getCircuitPackBytes(); + context.ContextOuterClass.Location.LocationCase getLocationCase(); } @@ -59629,7 +61007,7 @@ public final class ContextOuterClass { public enum LocationCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { - REGION(1), GPS_POSITION(2), LOCATION_NOT_SET(0); + REGION(1), GPS_POSITION(2), INTERFACE(3), CIRCUIT_PACK(4), LOCATION_NOT_SET(0); private final int value; @@ -59653,6 +61031,10 @@ public final class ContextOuterClass { return REGION; case 2: return GPS_POSITION; + case 3: + return INTERFACE; + case 4: + return CIRCUIT_PACK; case 0: return LOCATION_NOT_SET; default: @@ -59754,6 +61136,108 @@ public final class ContextOuterClass { return context.ContextOuterClass.GPS_Position.getDefaultInstance(); } + public static final int INTERFACE_FIELD_NUMBER = 3; + + /** + * string interface = 3; + * @return Whether the interface field is set. + */ + public boolean hasInterface() { + return locationCase_ == 3; + } + + /** + * string interface = 3; + * @return The interface. + */ + public java.lang.String getInterface() { + java.lang.Object ref = ""; + if (locationCase_ == 3) { + ref = location_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (locationCase_ == 3) { + location_ = s; + } + return s; + } + } + + /** + * string interface = 3; + * @return The bytes for interface. + */ + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = ""; + if (locationCase_ == 3) { + ref = location_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationCase_ == 3) { + location_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CIRCUIT_PACK_FIELD_NUMBER = 4; + + /** + * string circuit_pack = 4; + * @return Whether the circuitPack field is set. + */ + public boolean hasCircuitPack() { + return locationCase_ == 4; + } + + /** + * string circuit_pack = 4; + * @return The circuitPack. + */ + public java.lang.String getCircuitPack() { + java.lang.Object ref = ""; + if (locationCase_ == 4) { + ref = location_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (locationCase_ == 4) { + location_ = s; + } + return s; + } + } + + /** + * string circuit_pack = 4; + * @return The bytes for circuitPack. + */ + public com.google.protobuf.ByteString getCircuitPackBytes() { + java.lang.Object ref = ""; + if (locationCase_ == 4) { + ref = location_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationCase_ == 4) { + location_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -59775,6 +61259,12 @@ public final class ContextOuterClass { if (locationCase_ == 2) { output.writeMessage(2, (context.ContextOuterClass.GPS_Position) location_); } + if (locationCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, location_); + } + if (locationCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, location_); + } getUnknownFields().writeTo(output); } @@ -59790,6 +61280,12 @@ public final class ContextOuterClass { if (locationCase_ == 2) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (context.ContextOuterClass.GPS_Position) location_); } + if (locationCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, location_); + } + if (locationCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, location_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -59815,6 +61311,14 @@ public final class ContextOuterClass { if (!getGpsPosition().equals(other.getGpsPosition())) return false; break; + case 3: + if (!getInterface().equals(other.getInterface())) + return false; + break; + case 4: + if (!getCircuitPack().equals(other.getCircuitPack())) + return false; + break; case 0: default: } @@ -59839,6 +61343,14 @@ public final class ContextOuterClass { hash = (37 * hash) + GPS_POSITION_FIELD_NUMBER; hash = (53 * hash) + getGpsPosition().hashCode(); break; + case 3: + hash = (37 * hash) + INTERFACE_FIELD_NUMBER; + hash = (53 * hash) + getInterface().hashCode(); + break; + case 4: + hash = (37 * hash) + CIRCUIT_PACK_FIELD_NUMBER; + hash = (53 * hash) + getCircuitPack().hashCode(); + break; case 0: default: } @@ -60022,6 +61534,20 @@ public final class ContextOuterClass { mergeGpsPosition(other.getGpsPosition()); break; } + case INTERFACE: + { + locationCase_ = 3; + location_ = other.location_; + onChanged(); + break; + } + case CIRCUIT_PACK: + { + locationCase_ = 4; + location_ = other.location_; + onChanged(); + break; + } case LOCATION_NOT_SET: { break; @@ -60065,6 +61591,22 @@ public final class ContextOuterClass { break; } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + locationCase_ = 3; + location_ = s; + break; + } + // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + locationCase_ = 4; + location_ = s; + break; + } + // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -60340,6 +61882,198 @@ public final class ContextOuterClass { return gpsPositionBuilder_; } + /** + * string interface = 3; + * @return Whether the interface field is set. + */ + @java.lang.Override + public boolean hasInterface() { + return locationCase_ == 3; + } + + /** + * string interface = 3; + * @return The interface. + */ + @java.lang.Override + public java.lang.String getInterface() { + java.lang.Object ref = ""; + if (locationCase_ == 3) { + ref = location_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (locationCase_ == 3) { + location_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string interface = 3; + * @return The bytes for interface. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = ""; + if (locationCase_ == 3) { + ref = location_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationCase_ == 3) { + location_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string interface = 3; + * @param value The interface to set. + * @return This builder for chaining. + */ + public Builder setInterface(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + locationCase_ = 3; + location_ = value; + onChanged(); + return this; + } + + /** + * string interface = 3; + * @return This builder for chaining. + */ + public Builder clearInterface() { + if (locationCase_ == 3) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + return this; + } + + /** + * string interface = 3; + * @param value The bytes for interface to set. + * @return This builder for chaining. + */ + public Builder setInterfaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + locationCase_ = 3; + location_ = value; + onChanged(); + return this; + } + + /** + * string circuit_pack = 4; + * @return Whether the circuitPack field is set. + */ + @java.lang.Override + public boolean hasCircuitPack() { + return locationCase_ == 4; + } + + /** + * string circuit_pack = 4; + * @return The circuitPack. + */ + @java.lang.Override + public java.lang.String getCircuitPack() { + java.lang.Object ref = ""; + if (locationCase_ == 4) { + ref = location_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (locationCase_ == 4) { + location_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string circuit_pack = 4; + * @return The bytes for circuitPack. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCircuitPackBytes() { + java.lang.Object ref = ""; + if (locationCase_ == 4) { + ref = location_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationCase_ == 4) { + location_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string circuit_pack = 4; + * @param value The circuitPack to set. + * @return This builder for chaining. + */ + public Builder setCircuitPack(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + locationCase_ = 4; + location_ = value; + onChanged(); + return this; + } + + /** + * string circuit_pack = 4; + * @return This builder for chaining. + */ + public Builder clearCircuitPack() { + if (locationCase_ == 4) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + return this; + } + + /** + * string circuit_pack = 4; + * @param value The bytes for circuitPack to set. + * @return This builder for chaining. + */ + public Builder setCircuitPackBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + locationCase_ = 4; + location_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -65361,606 +67095,676 @@ public final class ContextOuterClass { } } - public interface ConstraintOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint) + public interface QoSProfileIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.QoSProfileId) com.google.protobuf.MessageOrBuilder { /** - * .context.ConstraintActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - int getActionValue(); - - /** - * .context.ConstraintActionEnum action = 1; - * @return The action. - */ - context.ContextOuterClass.ConstraintActionEnum getAction(); - - /** - * .context.Constraint_Custom custom = 2; - * @return Whether the custom field is set. - */ - boolean hasCustom(); - - /** - * .context.Constraint_Custom custom = 2; - * @return The custom. - */ - context.ContextOuterClass.Constraint_Custom getCustom(); - - /** - * .context.Constraint_Custom custom = 2; - */ - context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder(); - - /** - * .context.Constraint_Schedule schedule = 3; - * @return Whether the schedule field is set. - */ - boolean hasSchedule(); - - /** - * .context.Constraint_Schedule schedule = 3; - * @return The schedule. - */ - context.ContextOuterClass.Constraint_Schedule getSchedule(); - - /** - * .context.Constraint_Schedule schedule = 3; - */ - context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder(); - - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return Whether the endpointLocation field is set. - */ - boolean hasEndpointLocation(); - - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return The endpointLocation. - */ - context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation(); - - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder(); - - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return Whether the endpointPriority field is set. - */ - boolean hasEndpointPriority(); - - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return The endpointPriority. - */ - context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority(); - - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder(); - - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return Whether the slaCapacity field is set. - */ - boolean hasSlaCapacity(); - - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return The slaCapacity. - */ - context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity(); - - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder(); - - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return Whether the slaLatency field is set. - */ - boolean hasSlaLatency(); - - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return The slaLatency. - */ - context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency(); - - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder(); - - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return Whether the slaAvailability field is set. - */ - boolean hasSlaAvailability(); - - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return The slaAvailability. - */ - context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability(); - - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder(); - - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return Whether the slaIsolation field is set. - */ - boolean hasSlaIsolation(); - - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return The slaIsolation. - */ - context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation(); - - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder(); - - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return Whether the exclusions field is set. + * .context.Uuid qos_profile_id = 1; + * @return Whether the qosProfileId field is set. */ - boolean hasExclusions(); + boolean hasQosProfileId(); /** - * .context.Constraint_Exclusions exclusions = 10; - * @return The exclusions. + * .context.Uuid qos_profile_id = 1; + * @return The qosProfileId. */ - context.ContextOuterClass.Constraint_Exclusions getExclusions(); + context.ContextOuterClass.Uuid getQosProfileId(); /** - * .context.Constraint_Exclusions exclusions = 10; + * .context.Uuid qos_profile_id = 1; */ - context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder(); - - context.ContextOuterClass.Constraint.ConstraintCase getConstraintCase(); + context.ContextOuterClass.UuidOrBuilder getQosProfileIdOrBuilder(); } /** - * Protobuf type {@code context.Constraint} + * Protobuf type {@code context.QoSProfileId} */ - public static final class Constraint extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint) - ConstraintOrBuilder { + public static final class QoSProfileId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.QoSProfileId) + QoSProfileIdOrBuilder { private static final long serialVersionUID = 0L; - // Use Constraint.newBuilder() to construct. - private Constraint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use QoSProfileId.newBuilder() to construct. + private QoSProfileId(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Constraint() { - action_ = 0; + private QoSProfileId() { } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Constraint(); + return new QoSProfileId(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_descriptor; + return context.ContextOuterClass.internal_static_context_QoSProfileId_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class); - } - - private int constraintCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object constraint_; - - public enum ConstraintCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { - - CUSTOM(2), - SCHEDULE(3), - ENDPOINT_LOCATION(4), - ENDPOINT_PRIORITY(5), - SLA_CAPACITY(6), - SLA_LATENCY(7), - SLA_AVAILABILITY(8), - SLA_ISOLATION(9), - EXCLUSIONS(10), - CONSTRAINT_NOT_SET(0); - - private final int value; - - private ConstraintCase(int value) { - this.value = value; - } - - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ConstraintCase valueOf(int value) { - return forNumber(value); - } - - public static ConstraintCase forNumber(int value) { - switch(value) { - case 2: - return CUSTOM; - case 3: - return SCHEDULE; - case 4: - return ENDPOINT_LOCATION; - case 5: - return ENDPOINT_PRIORITY; - case 6: - return SLA_CAPACITY; - case 7: - return SLA_LATENCY; - case 8: - return SLA_AVAILABILITY; - case 9: - return SLA_ISOLATION; - case 10: - return EXCLUSIONS; - case 0: - return CONSTRAINT_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - } - - public ConstraintCase getConstraintCase() { - return ConstraintCase.forNumber(constraintCase_); + return context.ContextOuterClass.internal_static_context_QoSProfileId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.QoSProfileId.class, context.ContextOuterClass.QoSProfileId.Builder.class); } - public static final int ACTION_FIELD_NUMBER = 1; + public static final int QOS_PROFILE_ID_FIELD_NUMBER = 1; - private int action_ = 0; + private context.ContextOuterClass.Uuid qosProfileId_; /** - * .context.ConstraintActionEnum action = 1; - * @return The enum numeric value on the wire for action. + * .context.Uuid qos_profile_id = 1; + * @return Whether the qosProfileId field is set. */ @java.lang.Override - public int getActionValue() { - return action_; + public boolean hasQosProfileId() { + return qosProfileId_ != null; } /** - * .context.ConstraintActionEnum action = 1; - * @return The action. + * .context.Uuid qos_profile_id = 1; + * @return The qosProfileId. */ @java.lang.Override - public context.ContextOuterClass.ConstraintActionEnum getAction() { - context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.forNumber(action_); - return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; + public context.ContextOuterClass.Uuid getQosProfileId() { + return qosProfileId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : qosProfileId_; } - public static final int CUSTOM_FIELD_NUMBER = 2; - /** - * .context.Constraint_Custom custom = 2; - * @return Whether the custom field is set. + * .context.Uuid qos_profile_id = 1; */ @java.lang.Override - public boolean hasCustom() { - return constraintCase_ == 2; + public context.ContextOuterClass.UuidOrBuilder getQosProfileIdOrBuilder() { + return qosProfileId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : qosProfileId_; } - /** - * .context.Constraint_Custom custom = 2; - * @return The custom. - */ + private byte memoizedIsInitialized = -1; + @java.lang.Override - public context.ContextOuterClass.Constraint_Custom getCustom() { - if (constraintCase_ == 2) { - return (context.ContextOuterClass.Constraint_Custom) constraint_; - } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; } - /** - * .context.Constraint_Custom custom = 2; - */ @java.lang.Override - public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() { - if (constraintCase_ == 2) { - return (context.ContextOuterClass.Constraint_Custom) constraint_; + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (qosProfileId_ != null) { + output.writeMessage(1, getQosProfileId()); } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + getUnknownFields().writeTo(output); } - public static final int SCHEDULE_FIELD_NUMBER = 3; - - /** - * .context.Constraint_Schedule schedule = 3; - * @return Whether the schedule field is set. - */ @java.lang.Override - public boolean hasSchedule() { - return constraintCase_ == 3; + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (qosProfileId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getQosProfileId()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - /** - * .context.Constraint_Schedule schedule = 3; - * @return The schedule. - */ @java.lang.Override - public context.ContextOuterClass.Constraint_Schedule getSchedule() { - if (constraintCase_ == 3) { - return (context.ContextOuterClass.Constraint_Schedule) constraint_; + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + if (!(obj instanceof context.ContextOuterClass.QoSProfileId)) { + return super.equals(obj); + } + context.ContextOuterClass.QoSProfileId other = (context.ContextOuterClass.QoSProfileId) obj; + if (hasQosProfileId() != other.hasQosProfileId()) + return false; + if (hasQosProfileId()) { + if (!getQosProfileId().equals(other.getQosProfileId())) + return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) + return false; + return true; } - /** - * .context.Constraint_Schedule schedule = 3; - */ @java.lang.Override - public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() { - if (constraintCase_ == 3) { - return (context.ContextOuterClass.Constraint_Schedule) constraint_; + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasQosProfileId()) { + hash = (37 * hash) + QOS_PROFILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getQosProfileId().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - public static final int ENDPOINT_LOCATION_FIELD_NUMBER = 4; - - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return Whether the endpointLocation field is set. - */ - @java.lang.Override - public boolean hasEndpointLocation() { - return constraintCase_ == 4; + public static context.ContextOuterClass.QoSProfileId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return The endpointLocation. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() { - if (constraintCase_ == 4) { - return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + public static context.ContextOuterClass.QoSProfileId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() { - if (constraintCase_ == 4) { - return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + public static context.ContextOuterClass.QoSProfileId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - public static final int ENDPOINT_PRIORITY_FIELD_NUMBER = 5; - - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return Whether the endpointPriority field is set. - */ - @java.lang.Override - public boolean hasEndpointPriority() { - return constraintCase_ == 5; + public static context.ContextOuterClass.QoSProfileId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return The endpointPriority. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() { - if (constraintCase_ == 5) { - return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + public static context.ContextOuterClass.QoSProfileId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() { - if (constraintCase_ == 5) { - return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + public static context.ContextOuterClass.QoSProfileId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - public static final int SLA_CAPACITY_FIELD_NUMBER = 6; + public static context.ContextOuterClass.QoSProfileId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return Whether the slaCapacity field is set. - */ - @java.lang.Override - public boolean hasSlaCapacity() { - return constraintCase_ == 6; + public static context.ContextOuterClass.QoSProfileId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return The slaCapacity. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() { - if (constraintCase_ == 6) { - return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + public static context.ContextOuterClass.QoSProfileId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() { - if (constraintCase_ == 6) { - return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + public static context.ContextOuterClass.QoSProfileId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static final int SLA_LATENCY_FIELD_NUMBER = 7; + public static context.ContextOuterClass.QoSProfileId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return Whether the slaLatency field is set. - */ - @java.lang.Override - public boolean hasSlaLatency() { - return constraintCase_ == 7; + public static context.ContextOuterClass.QoSProfileId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return The slaLatency. - */ @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + public Builder newBuilderForType() { + return newBuilder(); } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - public static final int SLA_AVAILABILITY_FIELD_NUMBER = 8; + public static Builder newBuilder(context.ContextOuterClass.QoSProfileId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return Whether the slaAvailability field is set. - */ @java.lang.Override - public boolean hasSlaAvailability() { - return constraintCase_ == 8; + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return The slaAvailability. - */ @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } /** - * .context.Constraint_SLA_Availability sla_availability = 8; + * Protobuf type {@code context.QoSProfileId} */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.QoSProfileId) + context.ContextOuterClass.QoSProfileIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_QoSProfileId_descriptor; } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } - public static final int SLA_ISOLATION_FIELD_NUMBER = 9; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_QoSProfileId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.QoSProfileId.class, context.ContextOuterClass.QoSProfileId.Builder.class); + } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return Whether the slaIsolation field is set. - */ - @java.lang.Override - public boolean hasSlaIsolation() { - return constraintCase_ == 9; - } + // Construct using context.ContextOuterClass.QoSProfileId.newBuilder() + private Builder() { + } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return The slaIsolation. + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + qosProfileId_ = null; + if (qosProfileIdBuilder_ != null) { + qosProfileIdBuilder_.dispose(); + qosProfileIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_QoSProfileId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.QoSProfileId getDefaultInstanceForType() { + return context.ContextOuterClass.QoSProfileId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.QoSProfileId build() { + context.ContextOuterClass.QoSProfileId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.QoSProfileId buildPartial() { + context.ContextOuterClass.QoSProfileId result = new context.ContextOuterClass.QoSProfileId(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(context.ContextOuterClass.QoSProfileId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.qosProfileId_ = qosProfileIdBuilder_ == null ? qosProfileId_ : qosProfileIdBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.QoSProfileId) { + return mergeFrom((context.ContextOuterClass.QoSProfileId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.QoSProfileId other) { + if (other == context.ContextOuterClass.QoSProfileId.getDefaultInstance()) + return this; + if (other.hasQosProfileId()) { + mergeQosProfileId(other.getQosProfileId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getQosProfileIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } + // finally + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.Uuid qosProfileId_; + + private com.google.protobuf.SingleFieldBuilderV3 qosProfileIdBuilder_; + + /** + * .context.Uuid qos_profile_id = 1; + * @return Whether the qosProfileId field is set. + */ + public boolean hasQosProfileId() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * .context.Uuid qos_profile_id = 1; + * @return The qosProfileId. + */ + public context.ContextOuterClass.Uuid getQosProfileId() { + if (qosProfileIdBuilder_ == null) { + return qosProfileId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : qosProfileId_; + } else { + return qosProfileIdBuilder_.getMessage(); + } + } + + /** + * .context.Uuid qos_profile_id = 1; + */ + public Builder setQosProfileId(context.ContextOuterClass.Uuid value) { + if (qosProfileIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + qosProfileId_ = value; + } else { + qosProfileIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * .context.Uuid qos_profile_id = 1; + */ + public Builder setQosProfileId(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (qosProfileIdBuilder_ == null) { + qosProfileId_ = builderForValue.build(); + } else { + qosProfileIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * .context.Uuid qos_profile_id = 1; + */ + public Builder mergeQosProfileId(context.ContextOuterClass.Uuid value) { + if (qosProfileIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && qosProfileId_ != null && qosProfileId_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getQosProfileIdBuilder().mergeFrom(value); + } else { + qosProfileId_ = value; + } + } else { + qosProfileIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * .context.Uuid qos_profile_id = 1; + */ + public Builder clearQosProfileId() { + bitField0_ = (bitField0_ & ~0x00000001); + qosProfileId_ = null; + if (qosProfileIdBuilder_ != null) { + qosProfileIdBuilder_.dispose(); + qosProfileIdBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * .context.Uuid qos_profile_id = 1; + */ + public context.ContextOuterClass.Uuid.Builder getQosProfileIdBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getQosProfileIdFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid qos_profile_id = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getQosProfileIdOrBuilder() { + if (qosProfileIdBuilder_ != null) { + return qosProfileIdBuilder_.getMessageOrBuilder(); + } else { + return qosProfileId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : qosProfileId_; + } + } + + /** + * .context.Uuid qos_profile_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getQosProfileIdFieldBuilder() { + if (qosProfileIdBuilder_ == null) { + qosProfileIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getQosProfileId(), getParentForChildren(), isClean()); + qosProfileId_ = null; + } + return qosProfileIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.QoSProfileId) + } + + // @@protoc_insertion_point(class_scope:context.QoSProfileId) + private static final context.ContextOuterClass.QoSProfileId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.QoSProfileId(); + } + + public static context.ContextOuterClass.QoSProfileId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @java.lang.Override + public QoSProfileId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.QoSProfileId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_QoSProfileOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_QoSProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.QoSProfileId qos_profile_id = 1; + * @return Whether the qosProfileId field is set. + */ + boolean hasQosProfileId(); + + /** + * .context.QoSProfileId qos_profile_id = 1; + * @return The qosProfileId. + */ + context.ContextOuterClass.QoSProfileId getQosProfileId(); + + /** + * .context.QoSProfileId qos_profile_id = 1; + */ + context.ContextOuterClass.QoSProfileIdOrBuilder getQosProfileIdOrBuilder(); + + /** + * string qos_profile_name = 2; + * @return The qosProfileName. + */ + java.lang.String getQosProfileName(); + + /** + * string qos_profile_name = 2; + * @return The bytes for qosProfileName. */ + com.google.protobuf.ByteString getQosProfileNameBytes(); + } + + /** + * Protobuf type {@code context.Constraint_QoSProfile} + */ + public static final class Constraint_QoSProfile extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_QoSProfile) + Constraint_QoSProfileOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_QoSProfile.newBuilder() to construct. + private Constraint_QoSProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_QoSProfile() { + qosProfileName_ = ""; + } + @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Constraint_QoSProfile(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_QoSProfile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_QoSProfile_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_QoSProfile.class, context.ContextOuterClass.Constraint_QoSProfile.Builder.class); } + public static final int QOS_PROFILE_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.QoSProfileId qosProfileId_; + /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.QoSProfileId qos_profile_id = 1; + * @return Whether the qosProfileId field is set. */ @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + public boolean hasQosProfileId() { + return qosProfileId_ != null; } - public static final int EXCLUSIONS_FIELD_NUMBER = 10; + /** + * .context.QoSProfileId qos_profile_id = 1; + * @return The qosProfileId. + */ + @java.lang.Override + public context.ContextOuterClass.QoSProfileId getQosProfileId() { + return qosProfileId_ == null ? context.ContextOuterClass.QoSProfileId.getDefaultInstance() : qosProfileId_; + } /** - * .context.Constraint_Exclusions exclusions = 10; - * @return Whether the exclusions field is set. + * .context.QoSProfileId qos_profile_id = 1; */ @java.lang.Override - public boolean hasExclusions() { - return constraintCase_ == 10; + public context.ContextOuterClass.QoSProfileIdOrBuilder getQosProfileIdOrBuilder() { + return qosProfileId_ == null ? context.ContextOuterClass.QoSProfileId.getDefaultInstance() : qosProfileId_; } + public static final int QOS_PROFILE_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object qosProfileName_ = ""; + /** - * .context.Constraint_Exclusions exclusions = 10; - * @return The exclusions. + * string qos_profile_name = 2; + * @return The qosProfileName. */ @java.lang.Override - public context.ContextOuterClass.Constraint_Exclusions getExclusions() { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; + public java.lang.String getQosProfileName() { + java.lang.Object ref = qosProfileName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + qosProfileName_ = s; + return s; } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); } /** - * .context.Constraint_Exclusions exclusions = 10; + * string qos_profile_name = 2; + * @return The bytes for qosProfileName. */ @java.lang.Override - public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; + public com.google.protobuf.ByteString getQosProfileNameBytes() { + java.lang.Object ref = qosProfileName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + qosProfileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @@ -65978,35 +67782,11 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) { - output.writeEnum(1, action_); - } - if (constraintCase_ == 2) { - output.writeMessage(2, (context.ContextOuterClass.Constraint_Custom) constraint_); - } - if (constraintCase_ == 3) { - output.writeMessage(3, (context.ContextOuterClass.Constraint_Schedule) constraint_); - } - if (constraintCase_ == 4) { - output.writeMessage(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_); - } - if (constraintCase_ == 5) { - output.writeMessage(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_); - } - if (constraintCase_ == 6) { - output.writeMessage(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_); - } - if (constraintCase_ == 7) { - output.writeMessage(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_); + if (qosProfileId_ != null) { + output.writeMessage(1, getQosProfileId()); } - if (constraintCase_ == 8) { - output.writeMessage(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_); - } - if (constraintCase_ == 9) { - output.writeMessage(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_); - } - if (constraintCase_ == 10) { - output.writeMessage(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(qosProfileName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, qosProfileName_); } getUnknownFields().writeTo(output); } @@ -66017,35 +67797,11 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_); - } - if (constraintCase_ == 2) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (context.ContextOuterClass.Constraint_Custom) constraint_); - } - if (constraintCase_ == 3) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, (context.ContextOuterClass.Constraint_Schedule) constraint_); - } - if (constraintCase_ == 4) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_); - } - if (constraintCase_ == 5) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_); - } - if (constraintCase_ == 6) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_); - } - if (constraintCase_ == 7) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_); - } - if (constraintCase_ == 8) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_); - } - if (constraintCase_ == 9) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_); + if (qosProfileId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getQosProfileId()); } - if (constraintCase_ == 10) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(qosProfileName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, qosProfileName_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -66057,54 +67813,18 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.Constraint)) { + if (!(obj instanceof context.ContextOuterClass.Constraint_QoSProfile)) { return super.equals(obj); } - context.ContextOuterClass.Constraint other = (context.ContextOuterClass.Constraint) obj; - if (action_ != other.action_) - return false; - if (!getConstraintCase().equals(other.getConstraintCase())) + context.ContextOuterClass.Constraint_QoSProfile other = (context.ContextOuterClass.Constraint_QoSProfile) obj; + if (hasQosProfileId() != other.hasQosProfileId()) return false; - switch(constraintCase_) { - case 2: - if (!getCustom().equals(other.getCustom())) - return false; - break; - case 3: - if (!getSchedule().equals(other.getSchedule())) - return false; - break; - case 4: - if (!getEndpointLocation().equals(other.getEndpointLocation())) - return false; - break; - case 5: - if (!getEndpointPriority().equals(other.getEndpointPriority())) - return false; - break; - case 6: - if (!getSlaCapacity().equals(other.getSlaCapacity())) - return false; - break; - case 7: - if (!getSlaLatency().equals(other.getSlaLatency())) - return false; - break; - case 8: - if (!getSlaAvailability().equals(other.getSlaAvailability())) - return false; - break; - case 9: - if (!getSlaIsolation().equals(other.getSlaIsolation())) - return false; - break; - case 10: - if (!getExclusions().equals(other.getExclusions())) - return false; - break; - case 0: - default: + if (hasQosProfileId()) { + if (!getQosProfileId().equals(other.getQosProfileId())) + return false; } + if (!getQosProfileName().equals(other.getQosProfileName())) + return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -66117,98 +67837,62 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + action_; - switch(constraintCase_) { - case 2: - hash = (37 * hash) + CUSTOM_FIELD_NUMBER; - hash = (53 * hash) + getCustom().hashCode(); - break; - case 3: - hash = (37 * hash) + SCHEDULE_FIELD_NUMBER; - hash = (53 * hash) + getSchedule().hashCode(); - break; - case 4: - hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getEndpointLocation().hashCode(); - break; - case 5: - hash = (37 * hash) + ENDPOINT_PRIORITY_FIELD_NUMBER; - hash = (53 * hash) + getEndpointPriority().hashCode(); - break; - case 6: - hash = (37 * hash) + SLA_CAPACITY_FIELD_NUMBER; - hash = (53 * hash) + getSlaCapacity().hashCode(); - break; - case 7: - hash = (37 * hash) + SLA_LATENCY_FIELD_NUMBER; - hash = (53 * hash) + getSlaLatency().hashCode(); - break; - case 8: - hash = (37 * hash) + SLA_AVAILABILITY_FIELD_NUMBER; - hash = (53 * hash) + getSlaAvailability().hashCode(); - break; - case 9: - hash = (37 * hash) + SLA_ISOLATION_FIELD_NUMBER; - hash = (53 * hash) + getSlaIsolation().hashCode(); - break; - case 10: - hash = (37 * hash) + EXCLUSIONS_FIELD_NUMBER; - hash = (53 * hash) + getExclusions().hashCode(); - break; - case 0: - default: + if (hasQosProfileId()) { + hash = (37 * hash) + QOS_PROFILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getQosProfileId().hashCode(); } + hash = (37 * hash) + QOS_PROFILE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getQosProfileName().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.Constraint parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.Constraint parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.Constraint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.Constraint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.Constraint_QoSProfile parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.Constraint_QoSProfile parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -66221,7 +67905,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.Constraint prototype) { + public static Builder newBuilder(context.ContextOuterClass.Constraint_QoSProfile prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -66237,21 +67921,21 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.Constraint} + * Protobuf type {@code context.Constraint_QoSProfile} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint) - context.ContextOuterClass.ConstraintOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_QoSProfile) + context.ContextOuterClass.Constraint_QoSProfileOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_descriptor; + return context.ContextOuterClass.internal_static_context_Constraint_QoSProfile_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class); + return context.ContextOuterClass.internal_static_context_Constraint_QoSProfile_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_QoSProfile.class, context.ContextOuterClass.Constraint_QoSProfile.Builder.class); } - // Construct using context.ContextOuterClass.Constraint.newBuilder() + // Construct using context.ContextOuterClass.Constraint_QoSProfile.newBuilder() private Builder() { } @@ -66263,52 +67947,28 @@ public final class ContextOuterClass { public Builder clear() { super.clear(); bitField0_ = 0; - action_ = 0; - if (customBuilder_ != null) { - customBuilder_.clear(); - } - if (scheduleBuilder_ != null) { - scheduleBuilder_.clear(); - } - if (endpointLocationBuilder_ != null) { - endpointLocationBuilder_.clear(); - } - if (endpointPriorityBuilder_ != null) { - endpointPriorityBuilder_.clear(); - } - if (slaCapacityBuilder_ != null) { - slaCapacityBuilder_.clear(); - } - if (slaLatencyBuilder_ != null) { - slaLatencyBuilder_.clear(); + qosProfileId_ = null; + if (qosProfileIdBuilder_ != null) { + qosProfileIdBuilder_.dispose(); + qosProfileIdBuilder_ = null; } - if (slaAvailabilityBuilder_ != null) { - slaAvailabilityBuilder_.clear(); - } - if (slaIsolationBuilder_ != null) { - slaIsolationBuilder_.clear(); - } - if (exclusionsBuilder_ != null) { - exclusionsBuilder_.clear(); - } - constraintCase_ = 0; - constraint_ = null; + qosProfileName_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_descriptor; + return context.ContextOuterClass.internal_static_context_Constraint_QoSProfile_descriptor; } @java.lang.Override - public context.ContextOuterClass.Constraint getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint.getDefaultInstance(); + public context.ContextOuterClass.Constraint_QoSProfile getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.Constraint build() { - context.ContextOuterClass.Constraint result = buildPartial(); + public context.ContextOuterClass.Constraint_QoSProfile build() { + context.ContextOuterClass.Constraint_QoSProfile result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -66316,121 +67976,45 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.Constraint buildPartial() { - context.ContextOuterClass.Constraint result = new context.ContextOuterClass.Constraint(this); + public context.ContextOuterClass.Constraint_QoSProfile buildPartial() { + context.ContextOuterClass.Constraint_QoSProfile result = new context.ContextOuterClass.Constraint_QoSProfile(this); if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); onBuilt(); return result; } - private void buildPartial0(context.ContextOuterClass.Constraint result) { + private void buildPartial0(context.ContextOuterClass.Constraint_QoSProfile result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.action_ = action_; - } - } - - private void buildPartialOneofs(context.ContextOuterClass.Constraint result) { - result.constraintCase_ = constraintCase_; - result.constraint_ = this.constraint_; - if (constraintCase_ == 2 && customBuilder_ != null) { - result.constraint_ = customBuilder_.build(); - } - if (constraintCase_ == 3 && scheduleBuilder_ != null) { - result.constraint_ = scheduleBuilder_.build(); - } - if (constraintCase_ == 4 && endpointLocationBuilder_ != null) { - result.constraint_ = endpointLocationBuilder_.build(); - } - if (constraintCase_ == 5 && endpointPriorityBuilder_ != null) { - result.constraint_ = endpointPriorityBuilder_.build(); - } - if (constraintCase_ == 6 && slaCapacityBuilder_ != null) { - result.constraint_ = slaCapacityBuilder_.build(); - } - if (constraintCase_ == 7 && slaLatencyBuilder_ != null) { - result.constraint_ = slaLatencyBuilder_.build(); - } - if (constraintCase_ == 8 && slaAvailabilityBuilder_ != null) { - result.constraint_ = slaAvailabilityBuilder_.build(); - } - if (constraintCase_ == 9 && slaIsolationBuilder_ != null) { - result.constraint_ = slaIsolationBuilder_.build(); - } - if (constraintCase_ == 10 && exclusionsBuilder_ != null) { - result.constraint_ = exclusionsBuilder_.build(); + result.qosProfileId_ = qosProfileIdBuilder_ == null ? qosProfileId_ : qosProfileIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.qosProfileName_ = qosProfileName_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint) { - return mergeFrom((context.ContextOuterClass.Constraint) other); + if (other instanceof context.ContextOuterClass.Constraint_QoSProfile) { + return mergeFrom((context.ContextOuterClass.Constraint_QoSProfile) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.Constraint other) { - if (other == context.ContextOuterClass.Constraint.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.Constraint_QoSProfile other) { + if (other == context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance()) return this; - if (other.action_ != 0) { - setActionValue(other.getActionValue()); + if (other.hasQosProfileId()) { + mergeQosProfileId(other.getQosProfileId()); } - switch(other.getConstraintCase()) { - case CUSTOM: - { - mergeCustom(other.getCustom()); - break; - } - case SCHEDULE: - { - mergeSchedule(other.getSchedule()); - break; - } - case ENDPOINT_LOCATION: - { - mergeEndpointLocation(other.getEndpointLocation()); - break; - } - case ENDPOINT_PRIORITY: - { - mergeEndpointPriority(other.getEndpointPriority()); - break; - } - case SLA_CAPACITY: - { - mergeSlaCapacity(other.getSlaCapacity()); - break; - } - case SLA_LATENCY: - { - mergeSlaLatency(other.getSlaLatency()); - break; - } - case SLA_AVAILABILITY: - { - mergeSlaAvailability(other.getSlaAvailability()); - break; - } - case SLA_ISOLATION: - { - mergeSlaIsolation(other.getSlaIsolation()); - break; - } - case EXCLUSIONS: - { - mergeExclusions(other.getExclusions()); - break; - } - case CONSTRAINT_NOT_SET: - { - break; - } + if (!other.getQosProfileName().isEmpty()) { + qosProfileName_ = other.qosProfileName_; + bitField0_ |= 0x00000002; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -66455,76 +68039,20 @@ public final class ContextOuterClass { case 0: done = true; break; - case 8: + case 10: { - action_ = input.readEnum(); + input.readMessage(getQosProfileIdFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } - // case 8 + // case 10 case 18: { - input.readMessage(getCustomFieldBuilder().getBuilder(), extensionRegistry); - constraintCase_ = 2; + qosProfileName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; break; } // case 18 - case 26: - { - input.readMessage(getScheduleFieldBuilder().getBuilder(), extensionRegistry); - constraintCase_ = 3; - break; - } - // case 26 - case 34: - { - input.readMessage(getEndpointLocationFieldBuilder().getBuilder(), extensionRegistry); - constraintCase_ = 4; - break; - } - // case 34 - case 42: - { - input.readMessage(getEndpointPriorityFieldBuilder().getBuilder(), extensionRegistry); - constraintCase_ = 5; - break; - } - // case 42 - case 50: - { - input.readMessage(getSlaCapacityFieldBuilder().getBuilder(), extensionRegistry); - constraintCase_ = 6; - break; - } - // case 50 - case 58: - { - input.readMessage(getSlaLatencyFieldBuilder().getBuilder(), extensionRegistry); - constraintCase_ = 7; - break; - } - // case 58 - case 66: - { - input.readMessage(getSlaAvailabilityFieldBuilder().getBuilder(), extensionRegistry); - constraintCase_ = 8; - break; - } - // case 66 - case 74: - { - input.readMessage(getSlaIsolationFieldBuilder().getBuilder(), extensionRegistry); - constraintCase_ = 9; - break; - } - // case 74 - case 82: - { - input.readMessage(getExclusionsFieldBuilder().getBuilder(), extensionRegistry); - constraintCase_ = 10; - break; - } - // case 82 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -66546,1349 +68074,3788 @@ public final class ContextOuterClass { return this; } - private int constraintCase_ = 0; + private int bitField0_; - private java.lang.Object constraint_; + private context.ContextOuterClass.QoSProfileId qosProfileId_; - public ConstraintCase getConstraintCase() { - return ConstraintCase.forNumber(constraintCase_); + private com.google.protobuf.SingleFieldBuilderV3 qosProfileIdBuilder_; + + /** + * .context.QoSProfileId qos_profile_id = 1; + * @return Whether the qosProfileId field is set. + */ + public boolean hasQosProfileId() { + return ((bitField0_ & 0x00000001) != 0); } - public Builder clearConstraint() { - constraintCase_ = 0; - constraint_ = null; + /** + * .context.QoSProfileId qos_profile_id = 1; + * @return The qosProfileId. + */ + public context.ContextOuterClass.QoSProfileId getQosProfileId() { + if (qosProfileIdBuilder_ == null) { + return qosProfileId_ == null ? context.ContextOuterClass.QoSProfileId.getDefaultInstance() : qosProfileId_; + } else { + return qosProfileIdBuilder_.getMessage(); + } + } + + /** + * .context.QoSProfileId qos_profile_id = 1; + */ + public Builder setQosProfileId(context.ContextOuterClass.QoSProfileId value) { + if (qosProfileIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + qosProfileId_ = value; + } else { + qosProfileIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; onChanged(); return this; } - private int bitField0_; + /** + * .context.QoSProfileId qos_profile_id = 1; + */ + public Builder setQosProfileId(context.ContextOuterClass.QoSProfileId.Builder builderForValue) { + if (qosProfileIdBuilder_ == null) { + qosProfileId_ = builderForValue.build(); + } else { + qosProfileIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - private int action_ = 0; + /** + * .context.QoSProfileId qos_profile_id = 1; + */ + public Builder mergeQosProfileId(context.ContextOuterClass.QoSProfileId value) { + if (qosProfileIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && qosProfileId_ != null && qosProfileId_ != context.ContextOuterClass.QoSProfileId.getDefaultInstance()) { + getQosProfileIdBuilder().mergeFrom(value); + } else { + qosProfileId_ = value; + } + } else { + qosProfileIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } /** - * .context.ConstraintActionEnum action = 1; - * @return The enum numeric value on the wire for action. + * .context.QoSProfileId qos_profile_id = 1; */ - @java.lang.Override - public int getActionValue() { - return action_; + public Builder clearQosProfileId() { + bitField0_ = (bitField0_ & ~0x00000001); + qosProfileId_ = null; + if (qosProfileIdBuilder_ != null) { + qosProfileIdBuilder_.dispose(); + qosProfileIdBuilder_ = null; + } + onChanged(); + return this; } /** - * .context.ConstraintActionEnum action = 1; - * @param value The enum numeric value on the wire for action to set. - * @return This builder for chaining. + * .context.QoSProfileId qos_profile_id = 1; */ - public Builder setActionValue(int value) { - action_ = value; + public context.ContextOuterClass.QoSProfileId.Builder getQosProfileIdBuilder() { bitField0_ |= 0x00000001; onChanged(); - return this; + return getQosProfileIdFieldBuilder().getBuilder(); } /** - * .context.ConstraintActionEnum action = 1; - * @return The action. + * .context.QoSProfileId qos_profile_id = 1; */ - @java.lang.Override - public context.ContextOuterClass.ConstraintActionEnum getAction() { - context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.forNumber(action_); - return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; + public context.ContextOuterClass.QoSProfileIdOrBuilder getQosProfileIdOrBuilder() { + if (qosProfileIdBuilder_ != null) { + return qosProfileIdBuilder_.getMessageOrBuilder(); + } else { + return qosProfileId_ == null ? context.ContextOuterClass.QoSProfileId.getDefaultInstance() : qosProfileId_; + } } /** - * .context.ConstraintActionEnum action = 1; - * @param value The action to set. + * .context.QoSProfileId qos_profile_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getQosProfileIdFieldBuilder() { + if (qosProfileIdBuilder_ == null) { + qosProfileIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getQosProfileId(), getParentForChildren(), isClean()); + qosProfileId_ = null; + } + return qosProfileIdBuilder_; + } + + private java.lang.Object qosProfileName_ = ""; + + /** + * string qos_profile_name = 2; + * @return The qosProfileName. + */ + public java.lang.String getQosProfileName() { + java.lang.Object ref = qosProfileName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + qosProfileName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string qos_profile_name = 2; + * @return The bytes for qosProfileName. + */ + public com.google.protobuf.ByteString getQosProfileNameBytes() { + java.lang.Object ref = qosProfileName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + qosProfileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string qos_profile_name = 2; + * @param value The qosProfileName to set. * @return This builder for chaining. */ - public Builder setAction(context.ContextOuterClass.ConstraintActionEnum value) { + public Builder setQosProfileName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - action_ = value.getNumber(); + qosProfileName_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * .context.ConstraintActionEnum action = 1; + * string qos_profile_name = 2; * @return This builder for chaining. */ - public Builder clearAction() { - bitField0_ = (bitField0_ & ~0x00000001); - action_ = 0; + public Builder clearQosProfileName() { + qosProfileName_ = getDefaultInstance().getQosProfileName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } - private com.google.protobuf.SingleFieldBuilderV3 customBuilder_; - /** - * .context.Constraint_Custom custom = 2; - * @return Whether the custom field is set. + * string qos_profile_name = 2; + * @param value The bytes for qosProfileName to set. + * @return This builder for chaining. */ + public Builder setQosProfileNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + qosProfileName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override - public boolean hasCustom() { - return constraintCase_ == 2; + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } - /** - * .context.Constraint_Custom custom = 2; - * @return The custom. - */ @java.lang.Override - public context.ContextOuterClass.Constraint_Custom getCustom() { - if (customBuilder_ == null) { - if (constraintCase_ == 2) { - return (context.ContextOuterClass.Constraint_Custom) constraint_; + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_QoSProfile) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_QoSProfile) + private static final context.ContextOuterClass.Constraint_QoSProfile DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_QoSProfile(); + } + + public static context.ContextOuterClass.Constraint_QoSProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @java.lang.Override + public Constraint_QoSProfile parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_QoSProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConstraintOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ConstraintActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + + /** + * .context.ConstraintActionEnum action = 1; + * @return The action. + */ + context.ContextOuterClass.ConstraintActionEnum getAction(); + + /** + * .context.Constraint_Custom custom = 2; + * @return Whether the custom field is set. + */ + boolean hasCustom(); + + /** + * .context.Constraint_Custom custom = 2; + * @return The custom. + */ + context.ContextOuterClass.Constraint_Custom getCustom(); + + /** + * .context.Constraint_Custom custom = 2; + */ + context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder(); + + /** + * .context.Constraint_Schedule schedule = 3; + * @return Whether the schedule field is set. + */ + boolean hasSchedule(); + + /** + * .context.Constraint_Schedule schedule = 3; + * @return The schedule. + */ + context.ContextOuterClass.Constraint_Schedule getSchedule(); + + /** + * .context.Constraint_Schedule schedule = 3; + */ + context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder(); + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return Whether the endpointLocation field is set. + */ + boolean hasEndpointLocation(); + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return The endpointLocation. + */ + context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation(); + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder(); + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return Whether the endpointPriority field is set. + */ + boolean hasEndpointPriority(); + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return The endpointPriority. + */ + context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority(); + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder(); + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return Whether the slaCapacity field is set. + */ + boolean hasSlaCapacity(); + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return The slaCapacity. + */ + context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity(); + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder(); + + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return Whether the slaLatency field is set. + */ + boolean hasSlaLatency(); + + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return The slaLatency. + */ + context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency(); + + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder(); + + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return Whether the slaAvailability field is set. + */ + boolean hasSlaAvailability(); + + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return The slaAvailability. + */ + context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability(); + + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder(); + + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return Whether the slaIsolation field is set. + */ + boolean hasSlaIsolation(); + + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return The slaIsolation. + */ + context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation(); + + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder(); + + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return Whether the exclusions field is set. + */ + boolean hasExclusions(); + + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return The exclusions. + */ + context.ContextOuterClass.Constraint_Exclusions getExclusions(); + + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder(); + + /** + * .context.Constraint_QoSProfile qos_profile = 11; + * @return Whether the qosProfile field is set. + */ + boolean hasQosProfile(); + + /** + * .context.Constraint_QoSProfile qos_profile = 11; + * @return The qosProfile. + */ + context.ContextOuterClass.Constraint_QoSProfile getQosProfile(); + + /** + * .context.Constraint_QoSProfile qos_profile = 11; + */ + context.ContextOuterClass.Constraint_QoSProfileOrBuilder getQosProfileOrBuilder(); + + context.ContextOuterClass.Constraint.ConstraintCase getConstraintCase(); + } + + /** + * Protobuf type {@code context.Constraint} + */ + public static final class Constraint extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint) + ConstraintOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint.newBuilder() to construct. + private Constraint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint() { + action_ = 0; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Constraint(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class); + } + + private int constraintCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object constraint_; + + public enum ConstraintCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { + + CUSTOM(2), + SCHEDULE(3), + ENDPOINT_LOCATION(4), + ENDPOINT_PRIORITY(5), + SLA_CAPACITY(6), + SLA_LATENCY(7), + SLA_AVAILABILITY(8), + SLA_ISOLATION(9), + EXCLUSIONS(10), + QOS_PROFILE(11), + CONSTRAINT_NOT_SET(0); + + private final int value; + + private ConstraintCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConstraintCase valueOf(int value) { + return forNumber(value); + } + + public static ConstraintCase forNumber(int value) { + switch(value) { + case 2: + return CUSTOM; + case 3: + return SCHEDULE; + case 4: + return ENDPOINT_LOCATION; + case 5: + return ENDPOINT_PRIORITY; + case 6: + return SLA_CAPACITY; + case 7: + return SLA_LATENCY; + case 8: + return SLA_AVAILABILITY; + case 9: + return SLA_ISOLATION; + case 10: + return EXCLUSIONS; + case 11: + return QOS_PROFILE; + case 0: + return CONSTRAINT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + } + + public ConstraintCase getConstraintCase() { + return ConstraintCase.forNumber(constraintCase_); + } + + public static final int ACTION_FIELD_NUMBER = 1; + + private int action_ = 0; + + /** + * .context.ConstraintActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + + /** + * .context.ConstraintActionEnum action = 1; + * @return The action. + */ + @java.lang.Override + public context.ContextOuterClass.ConstraintActionEnum getAction() { + context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.forNumber(action_); + return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; + } + + public static final int CUSTOM_FIELD_NUMBER = 2; + + /** + * .context.Constraint_Custom custom = 2; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return constraintCase_ == 2; + } + + /** + * .context.Constraint_Custom custom = 2; + * @return The custom. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Custom getCustom() { + if (constraintCase_ == 2) { + return (context.ContextOuterClass.Constraint_Custom) constraint_; + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } + + /** + * .context.Constraint_Custom custom = 2; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() { + if (constraintCase_ == 2) { + return (context.ContextOuterClass.Constraint_Custom) constraint_; + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } + + public static final int SCHEDULE_FIELD_NUMBER = 3; + + /** + * .context.Constraint_Schedule schedule = 3; + * @return Whether the schedule field is set. + */ + @java.lang.Override + public boolean hasSchedule() { + return constraintCase_ == 3; + } + + /** + * .context.Constraint_Schedule schedule = 3; + * @return The schedule. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Schedule getSchedule() { + if (constraintCase_ == 3) { + return (context.ContextOuterClass.Constraint_Schedule) constraint_; + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } + + /** + * .context.Constraint_Schedule schedule = 3; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() { + if (constraintCase_ == 3) { + return (context.ContextOuterClass.Constraint_Schedule) constraint_; + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } + + public static final int ENDPOINT_LOCATION_FIELD_NUMBER = 4; + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return Whether the endpointLocation field is set. + */ + @java.lang.Override + public boolean hasEndpointLocation() { + return constraintCase_ == 4; + } + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return The endpointLocation. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() { + if (constraintCase_ == 4) { + return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() { + if (constraintCase_ == 4) { + return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } + + public static final int ENDPOINT_PRIORITY_FIELD_NUMBER = 5; + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return Whether the endpointPriority field is set. + */ + @java.lang.Override + public boolean hasEndpointPriority() { + return constraintCase_ == 5; + } + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return The endpointPriority. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() { + if (constraintCase_ == 5) { + return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() { + if (constraintCase_ == 5) { + return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } + + public static final int SLA_CAPACITY_FIELD_NUMBER = 6; + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return Whether the slaCapacity field is set. + */ + @java.lang.Override + public boolean hasSlaCapacity() { + return constraintCase_ == 6; + } + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return The slaCapacity. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() { + if (constraintCase_ == 6) { + return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() { + if (constraintCase_ == 6) { + return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } + + public static final int SLA_LATENCY_FIELD_NUMBER = 7; + + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return Whether the slaLatency field is set. + */ + @java.lang.Override + public boolean hasSlaLatency() { + return constraintCase_ == 7; + } + + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return The slaLatency. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() { + if (constraintCase_ == 7) { + return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } + + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() { + if (constraintCase_ == 7) { + return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } + + public static final int SLA_AVAILABILITY_FIELD_NUMBER = 8; + + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return Whether the slaAvailability field is set. + */ + @java.lang.Override + public boolean hasSlaAvailability() { + return constraintCase_ == 8; + } + + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return The slaAvailability. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() { + if (constraintCase_ == 8) { + return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } + + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() { + if (constraintCase_ == 8) { + return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } + + public static final int SLA_ISOLATION_FIELD_NUMBER = 9; + + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return Whether the slaIsolation field is set. + */ + @java.lang.Override + public boolean hasSlaIsolation() { + return constraintCase_ == 9; + } + + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return The slaIsolation. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() { + if (constraintCase_ == 9) { + return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } + + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() { + if (constraintCase_ == 9) { + return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } + + public static final int EXCLUSIONS_FIELD_NUMBER = 10; + + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return Whether the exclusions field is set. + */ + @java.lang.Override + public boolean hasExclusions() { + return constraintCase_ == 10; + } + + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return The exclusions. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Exclusions getExclusions() { + if (constraintCase_ == 10) { + return (context.ContextOuterClass.Constraint_Exclusions) constraint_; + } + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } + + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() { + if (constraintCase_ == 10) { + return (context.ContextOuterClass.Constraint_Exclusions) constraint_; + } + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } + + public static final int QOS_PROFILE_FIELD_NUMBER = 11; + + /** + * .context.Constraint_QoSProfile qos_profile = 11; + * @return Whether the qosProfile field is set. + */ + @java.lang.Override + public boolean hasQosProfile() { + return constraintCase_ == 11; + } + + /** + * .context.Constraint_QoSProfile qos_profile = 11; + * @return The qosProfile. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_QoSProfile getQosProfile() { + if (constraintCase_ == 11) { + return (context.ContextOuterClass.Constraint_QoSProfile) constraint_; + } + return context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance(); + } + + /** + * .context.Constraint_QoSProfile qos_profile = 11; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_QoSProfileOrBuilder getQosProfileOrBuilder() { + if (constraintCase_ == 11) { + return (context.ContextOuterClass.Constraint_QoSProfile) constraint_; + } + return context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) { + output.writeEnum(1, action_); + } + if (constraintCase_ == 2) { + output.writeMessage(2, (context.ContextOuterClass.Constraint_Custom) constraint_); + } + if (constraintCase_ == 3) { + output.writeMessage(3, (context.ContextOuterClass.Constraint_Schedule) constraint_); + } + if (constraintCase_ == 4) { + output.writeMessage(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_); + } + if (constraintCase_ == 5) { + output.writeMessage(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_); + } + if (constraintCase_ == 6) { + output.writeMessage(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_); + } + if (constraintCase_ == 7) { + output.writeMessage(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_); + } + if (constraintCase_ == 8) { + output.writeMessage(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_); + } + if (constraintCase_ == 9) { + output.writeMessage(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_); + } + if (constraintCase_ == 10) { + output.writeMessage(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); + } + if (constraintCase_ == 11) { + output.writeMessage(11, (context.ContextOuterClass.Constraint_QoSProfile) constraint_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_); + } + if (constraintCase_ == 2) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (context.ContextOuterClass.Constraint_Custom) constraint_); + } + if (constraintCase_ == 3) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, (context.ContextOuterClass.Constraint_Schedule) constraint_); + } + if (constraintCase_ == 4) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_); + } + if (constraintCase_ == 5) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_); + } + if (constraintCase_ == 6) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_); + } + if (constraintCase_ == 7) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_); + } + if (constraintCase_ == 8) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_); + } + if (constraintCase_ == 9) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_); + } + if (constraintCase_ == 10) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); + } + if (constraintCase_ == 11) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, (context.ContextOuterClass.Constraint_QoSProfile) constraint_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint other = (context.ContextOuterClass.Constraint) obj; + if (action_ != other.action_) + return false; + if (!getConstraintCase().equals(other.getConstraintCase())) + return false; + switch(constraintCase_) { + case 2: + if (!getCustom().equals(other.getCustom())) + return false; + break; + case 3: + if (!getSchedule().equals(other.getSchedule())) + return false; + break; + case 4: + if (!getEndpointLocation().equals(other.getEndpointLocation())) + return false; + break; + case 5: + if (!getEndpointPriority().equals(other.getEndpointPriority())) + return false; + break; + case 6: + if (!getSlaCapacity().equals(other.getSlaCapacity())) + return false; + break; + case 7: + if (!getSlaLatency().equals(other.getSlaLatency())) + return false; + break; + case 8: + if (!getSlaAvailability().equals(other.getSlaAvailability())) + return false; + break; + case 9: + if (!getSlaIsolation().equals(other.getSlaIsolation())) + return false; + break; + case 10: + if (!getExclusions().equals(other.getExclusions())) + return false; + break; + case 11: + if (!getQosProfile().equals(other.getQosProfile())) + return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + switch(constraintCase_) { + case 2: + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + getCustom().hashCode(); + break; + case 3: + hash = (37 * hash) + SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getSchedule().hashCode(); + break; + case 4: + hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getEndpointLocation().hashCode(); + break; + case 5: + hash = (37 * hash) + ENDPOINT_PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getEndpointPriority().hashCode(); + break; + case 6: + hash = (37 * hash) + SLA_CAPACITY_FIELD_NUMBER; + hash = (53 * hash) + getSlaCapacity().hashCode(); + break; + case 7: + hash = (37 * hash) + SLA_LATENCY_FIELD_NUMBER; + hash = (53 * hash) + getSlaLatency().hashCode(); + break; + case 8: + hash = (37 * hash) + SLA_AVAILABILITY_FIELD_NUMBER; + hash = (53 * hash) + getSlaAvailability().hashCode(); + break; + case 9: + hash = (37 * hash) + SLA_ISOLATION_FIELD_NUMBER; + hash = (53 * hash) + getSlaIsolation().hashCode(); + break; + case 10: + hash = (37 * hash) + EXCLUSIONS_FIELD_NUMBER; + hash = (53 * hash) + getExclusions().hashCode(); + break; + case 11: + hash = (37 * hash) + QOS_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getQosProfile().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint) + context.ContextOuterClass.ConstraintOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class); + } + + // Construct using context.ContextOuterClass.Constraint.newBuilder() + private Builder() { + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + action_ = 0; + if (customBuilder_ != null) { + customBuilder_.clear(); + } + if (scheduleBuilder_ != null) { + scheduleBuilder_.clear(); + } + if (endpointLocationBuilder_ != null) { + endpointLocationBuilder_.clear(); + } + if (endpointPriorityBuilder_ != null) { + endpointPriorityBuilder_.clear(); + } + if (slaCapacityBuilder_ != null) { + slaCapacityBuilder_.clear(); + } + if (slaLatencyBuilder_ != null) { + slaLatencyBuilder_.clear(); + } + if (slaAvailabilityBuilder_ != null) { + slaAvailabilityBuilder_.clear(); + } + if (slaIsolationBuilder_ != null) { + slaIsolationBuilder_.clear(); + } + if (exclusionsBuilder_ != null) { + exclusionsBuilder_.clear(); + } + if (qosProfileBuilder_ != null) { + qosProfileBuilder_.clear(); + } + constraintCase_ = 0; + constraint_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint build() { + context.ContextOuterClass.Constraint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint buildPartial() { + context.ContextOuterClass.Constraint result = new context.ContextOuterClass.Constraint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(context.ContextOuterClass.Constraint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.action_ = action_; + } + } + + private void buildPartialOneofs(context.ContextOuterClass.Constraint result) { + result.constraintCase_ = constraintCase_; + result.constraint_ = this.constraint_; + if (constraintCase_ == 2 && customBuilder_ != null) { + result.constraint_ = customBuilder_.build(); + } + if (constraintCase_ == 3 && scheduleBuilder_ != null) { + result.constraint_ = scheduleBuilder_.build(); + } + if (constraintCase_ == 4 && endpointLocationBuilder_ != null) { + result.constraint_ = endpointLocationBuilder_.build(); + } + if (constraintCase_ == 5 && endpointPriorityBuilder_ != null) { + result.constraint_ = endpointPriorityBuilder_.build(); + } + if (constraintCase_ == 6 && slaCapacityBuilder_ != null) { + result.constraint_ = slaCapacityBuilder_.build(); + } + if (constraintCase_ == 7 && slaLatencyBuilder_ != null) { + result.constraint_ = slaLatencyBuilder_.build(); + } + if (constraintCase_ == 8 && slaAvailabilityBuilder_ != null) { + result.constraint_ = slaAvailabilityBuilder_.build(); + } + if (constraintCase_ == 9 && slaIsolationBuilder_ != null) { + result.constraint_ = slaIsolationBuilder_.build(); + } + if (constraintCase_ == 10 && exclusionsBuilder_ != null) { + result.constraint_ = exclusionsBuilder_.build(); + } + if (constraintCase_ == 11 && qosProfileBuilder_ != null) { + result.constraint_ = qosProfileBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint) { + return mergeFrom((context.ContextOuterClass.Constraint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint other) { + if (other == context.ContextOuterClass.Constraint.getDefaultInstance()) + return this; + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + switch(other.getConstraintCase()) { + case CUSTOM: + { + mergeCustom(other.getCustom()); + break; + } + case SCHEDULE: + { + mergeSchedule(other.getSchedule()); + break; + } + case ENDPOINT_LOCATION: + { + mergeEndpointLocation(other.getEndpointLocation()); + break; + } + case ENDPOINT_PRIORITY: + { + mergeEndpointPriority(other.getEndpointPriority()); + break; + } + case SLA_CAPACITY: + { + mergeSlaCapacity(other.getSlaCapacity()); + break; + } + case SLA_LATENCY: + { + mergeSlaLatency(other.getSlaLatency()); + break; + } + case SLA_AVAILABILITY: + { + mergeSlaAvailability(other.getSlaAvailability()); + break; + } + case SLA_ISOLATION: + { + mergeSlaIsolation(other.getSlaIsolation()); + break; + } + case EXCLUSIONS: + { + mergeExclusions(other.getExclusions()); + break; + } + case QOS_PROFILE: + { + mergeQosProfile(other.getQosProfile()); + break; + } + case CONSTRAINT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + action_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 18: + { + input.readMessage(getCustomFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 2; + break; + } + // case 18 + case 26: + { + input.readMessage(getScheduleFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 3; + break; + } + // case 26 + case 34: + { + input.readMessage(getEndpointLocationFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 4; + break; + } + // case 34 + case 42: + { + input.readMessage(getEndpointPriorityFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 5; + break; + } + // case 42 + case 50: + { + input.readMessage(getSlaCapacityFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 6; + break; + } + // case 50 + case 58: + { + input.readMessage(getSlaLatencyFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 7; + break; + } + // case 58 + case 66: + { + input.readMessage(getSlaAvailabilityFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 8; + break; + } + // case 66 + case 74: + { + input.readMessage(getSlaIsolationFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 9; + break; + } + // case 74 + case 82: + { + input.readMessage(getExclusionsFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 10; + break; + } + // case 82 + case 90: + { + input.readMessage(getQosProfileFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 11; + break; + } + // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } + // finally + return this; + } + + private int constraintCase_ = 0; + + private java.lang.Object constraint_; + + public ConstraintCase getConstraintCase() { + return ConstraintCase.forNumber(constraintCase_); + } + + public Builder clearConstraint() { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private int action_ = 0; + + /** + * .context.ConstraintActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + + /** + * .context.ConstraintActionEnum action = 1; + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + action_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * .context.ConstraintActionEnum action = 1; + * @return The action. + */ + @java.lang.Override + public context.ContextOuterClass.ConstraintActionEnum getAction() { + context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.forNumber(action_); + return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; + } + + /** + * .context.ConstraintActionEnum action = 1; + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(context.ContextOuterClass.ConstraintActionEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + action_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.ConstraintActionEnum action = 1; + * @return This builder for chaining. + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000001); + action_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3 customBuilder_; + + /** + * .context.Constraint_Custom custom = 2; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return constraintCase_ == 2; + } + + /** + * .context.Constraint_Custom custom = 2; + * @return The custom. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Custom getCustom() { + if (customBuilder_ == null) { + if (constraintCase_ == 2) { + return (context.ContextOuterClass.Constraint_Custom) constraint_; + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } else { + if (constraintCase_ == 2) { + return customBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } + } + + /** + * .context.Constraint_Custom custom = 2; + */ + public Builder setCustom(context.ContextOuterClass.Constraint_Custom value) { + if (customBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + customBuilder_.setMessage(value); + } + constraintCase_ = 2; + return this; + } + + /** + * .context.Constraint_Custom custom = 2; + */ + public Builder setCustom(context.ContextOuterClass.Constraint_Custom.Builder builderForValue) { + if (customBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + customBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 2; + return this; + } + + /** + * .context.Constraint_Custom custom = 2; + */ + public Builder mergeCustom(context.ContextOuterClass.Constraint_Custom value) { + if (customBuilder_ == null) { + if (constraintCase_ == 2 && constraint_ != context.ContextOuterClass.Constraint_Custom.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_Custom.newBuilder((context.ContextOuterClass.Constraint_Custom) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 2) { + customBuilder_.mergeFrom(value); + } else { + customBuilder_.setMessage(value); + } + } + constraintCase_ = 2; + return this; + } + + /** + * .context.Constraint_Custom custom = 2; + */ + public Builder clearCustom() { + if (customBuilder_ == null) { + if (constraintCase_ == 2) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 2) { + constraintCase_ = 0; + constraint_ = null; + } + customBuilder_.clear(); + } + return this; + } + + /** + * .context.Constraint_Custom custom = 2; + */ + public context.ContextOuterClass.Constraint_Custom.Builder getCustomBuilder() { + return getCustomFieldBuilder().getBuilder(); + } + + /** + * .context.Constraint_Custom custom = 2; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() { + if ((constraintCase_ == 2) && (customBuilder_ != null)) { + return customBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 2) { + return (context.ContextOuterClass.Constraint_Custom) constraint_; + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } + } + + /** + * .context.Constraint_Custom custom = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getCustomFieldBuilder() { + if (customBuilder_ == null) { + if (!(constraintCase_ == 2)) { + constraint_ = context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } + customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Custom) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 2; + onChanged(); + return customBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3 scheduleBuilder_; + + /** + * .context.Constraint_Schedule schedule = 3; + * @return Whether the schedule field is set. + */ + @java.lang.Override + public boolean hasSchedule() { + return constraintCase_ == 3; + } + + /** + * .context.Constraint_Schedule schedule = 3; + * @return The schedule. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Schedule getSchedule() { + if (scheduleBuilder_ == null) { + if (constraintCase_ == 3) { + return (context.ContextOuterClass.Constraint_Schedule) constraint_; + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } else { + if (constraintCase_ == 3) { + return scheduleBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } + } + + /** + * .context.Constraint_Schedule schedule = 3; + */ + public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule value) { + if (scheduleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + scheduleBuilder_.setMessage(value); + } + constraintCase_ = 3; + return this; + } + + /** + * .context.Constraint_Schedule schedule = 3; + */ + public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule.Builder builderForValue) { + if (scheduleBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + scheduleBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 3; + return this; + } + + /** + * .context.Constraint_Schedule schedule = 3; + */ + public Builder mergeSchedule(context.ContextOuterClass.Constraint_Schedule value) { + if (scheduleBuilder_ == null) { + if (constraintCase_ == 3 && constraint_ != context.ContextOuterClass.Constraint_Schedule.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_Schedule.newBuilder((context.ContextOuterClass.Constraint_Schedule) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 3) { + scheduleBuilder_.mergeFrom(value); + } else { + scheduleBuilder_.setMessage(value); + } + } + constraintCase_ = 3; + return this; + } + + /** + * .context.Constraint_Schedule schedule = 3; + */ + public Builder clearSchedule() { + if (scheduleBuilder_ == null) { + if (constraintCase_ == 3) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 3) { + constraintCase_ = 0; + constraint_ = null; + } + scheduleBuilder_.clear(); + } + return this; + } + + /** + * .context.Constraint_Schedule schedule = 3; + */ + public context.ContextOuterClass.Constraint_Schedule.Builder getScheduleBuilder() { + return getScheduleFieldBuilder().getBuilder(); + } + + /** + * .context.Constraint_Schedule schedule = 3; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() { + if ((constraintCase_ == 3) && (scheduleBuilder_ != null)) { + return scheduleBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 3) { + return (context.ContextOuterClass.Constraint_Schedule) constraint_; + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } + } + + /** + * .context.Constraint_Schedule schedule = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getScheduleFieldBuilder() { + if (scheduleBuilder_ == null) { + if (!(constraintCase_ == 3)) { + constraint_ = context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } + scheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Schedule) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 3; + onChanged(); + return scheduleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3 endpointLocationBuilder_; + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return Whether the endpointLocation field is set. + */ + @java.lang.Override + public boolean hasEndpointLocation() { + return constraintCase_ == 4; + } + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return The endpointLocation. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() { + if (endpointLocationBuilder_ == null) { + if (constraintCase_ == 4) { + return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } else { + if (constraintCase_ == 4) { + return endpointLocationBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } + } + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) { + if (endpointLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + endpointLocationBuilder_.setMessage(value); + } + constraintCase_ = 4; + return this; + } + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation.Builder builderForValue) { + if (endpointLocationBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + endpointLocationBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 4; + return this; + } + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public Builder mergeEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) { + if (endpointLocationBuilder_ == null) { + if (constraintCase_ == 4 && constraint_ != context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.newBuilder((context.ContextOuterClass.Constraint_EndPointLocation) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 4) { + endpointLocationBuilder_.mergeFrom(value); + } else { + endpointLocationBuilder_.setMessage(value); + } + } + constraintCase_ = 4; + return this; + } + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public Builder clearEndpointLocation() { + if (endpointLocationBuilder_ == null) { + if (constraintCase_ == 4) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 4) { + constraintCase_ = 0; + constraint_ = null; + } + endpointLocationBuilder_.clear(); + } + return this; + } + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public context.ContextOuterClass.Constraint_EndPointLocation.Builder getEndpointLocationBuilder() { + return getEndpointLocationFieldBuilder().getBuilder(); + } + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() { + if ((constraintCase_ == 4) && (endpointLocationBuilder_ != null)) { + return endpointLocationBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 4) { + return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } + } + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointLocationFieldBuilder() { + if (endpointLocationBuilder_ == null) { + if (!(constraintCase_ == 4)) { + constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } + endpointLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_EndPointLocation) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 4; + onChanged(); + return endpointLocationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3 endpointPriorityBuilder_; + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return Whether the endpointPriority field is set. + */ + @java.lang.Override + public boolean hasEndpointPriority() { + return constraintCase_ == 5; + } + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return The endpointPriority. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() { + if (endpointPriorityBuilder_ == null) { + if (constraintCase_ == 5) { + return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } else { + if (constraintCase_ == 5) { + return endpointPriorityBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } + } + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) { + if (endpointPriorityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + endpointPriorityBuilder_.setMessage(value); + } + constraintCase_ = 5; + return this; + } + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority.Builder builderForValue) { + if (endpointPriorityBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + endpointPriorityBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 5; + return this; + } + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public Builder mergeEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) { + if (endpointPriorityBuilder_ == null) { + if (constraintCase_ == 5 && constraint_ != context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.newBuilder((context.ContextOuterClass.Constraint_EndPointPriority) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 5) { + endpointPriorityBuilder_.mergeFrom(value); + } else { + endpointPriorityBuilder_.setMessage(value); + } + } + constraintCase_ = 5; + return this; + } + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public Builder clearEndpointPriority() { + if (endpointPriorityBuilder_ == null) { + if (constraintCase_ == 5) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 5) { + constraintCase_ = 0; + constraint_ = null; + } + endpointPriorityBuilder_.clear(); + } + return this; + } + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public context.ContextOuterClass.Constraint_EndPointPriority.Builder getEndpointPriorityBuilder() { + return getEndpointPriorityFieldBuilder().getBuilder(); + } + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() { + if ((constraintCase_ == 5) && (endpointPriorityBuilder_ != null)) { + return endpointPriorityBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 5) { + return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } + } + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointPriorityFieldBuilder() { + if (endpointPriorityBuilder_ == null) { + if (!(constraintCase_ == 5)) { + constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } + endpointPriorityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_EndPointPriority) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 5; + onChanged(); + return endpointPriorityBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3 slaCapacityBuilder_; + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return Whether the slaCapacity field is set. + */ + @java.lang.Override + public boolean hasSlaCapacity() { + return constraintCase_ == 6; + } + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return The slaCapacity. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() { + if (slaCapacityBuilder_ == null) { + if (constraintCase_ == 6) { + return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); } else { - if (constraintCase_ == 2) { - return customBuilder_.getMessage(); + if (constraintCase_ == 6) { + return slaCapacityBuilder_.getMessage(); } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); } } /** - * .context.Constraint_Custom custom = 2; + * .context.Constraint_SLA_Capacity sla_capacity = 6; */ - public Builder setCustom(context.ContextOuterClass.Constraint_Custom value) { - if (customBuilder_ == null) { + public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) { + if (slaCapacityBuilder_ == null) { if (value == null) { throw new NullPointerException(); } constraint_ = value; onChanged(); } else { - customBuilder_.setMessage(value); + slaCapacityBuilder_.setMessage(value); } - constraintCase_ = 2; + constraintCase_ = 6; return this; } /** - * .context.Constraint_Custom custom = 2; + * .context.Constraint_SLA_Capacity sla_capacity = 6; */ - public Builder setCustom(context.ContextOuterClass.Constraint_Custom.Builder builderForValue) { - if (customBuilder_ == null) { + public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity.Builder builderForValue) { + if (slaCapacityBuilder_ == null) { constraint_ = builderForValue.build(); onChanged(); } else { - customBuilder_.setMessage(builderForValue.build()); + slaCapacityBuilder_.setMessage(builderForValue.build()); } - constraintCase_ = 2; + constraintCase_ = 6; return this; } /** - * .context.Constraint_Custom custom = 2; + * .context.Constraint_SLA_Capacity sla_capacity = 6; */ - public Builder mergeCustom(context.ContextOuterClass.Constraint_Custom value) { - if (customBuilder_ == null) { - if (constraintCase_ == 2 && constraint_ != context.ContextOuterClass.Constraint_Custom.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_Custom.newBuilder((context.ContextOuterClass.Constraint_Custom) constraint_).mergeFrom(value).buildPartial(); + public Builder mergeSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) { + if (slaCapacityBuilder_ == null) { + if (constraintCase_ == 6 && constraint_ != context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.newBuilder((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_).mergeFrom(value).buildPartial(); } else { constraint_ = value; } onChanged(); } else { - if (constraintCase_ == 2) { - customBuilder_.mergeFrom(value); + if (constraintCase_ == 6) { + slaCapacityBuilder_.mergeFrom(value); } else { - customBuilder_.setMessage(value); + slaCapacityBuilder_.setMessage(value); } } - constraintCase_ = 2; + constraintCase_ = 6; return this; } /** - * .context.Constraint_Custom custom = 2; + * .context.Constraint_SLA_Capacity sla_capacity = 6; */ - public Builder clearCustom() { - if (customBuilder_ == null) { - if (constraintCase_ == 2) { + public Builder clearSlaCapacity() { + if (slaCapacityBuilder_ == null) { + if (constraintCase_ == 6) { constraintCase_ = 0; constraint_ = null; onChanged(); } } else { - if (constraintCase_ == 2) { + if (constraintCase_ == 6) { constraintCase_ = 0; constraint_ = null; } - customBuilder_.clear(); + slaCapacityBuilder_.clear(); } return this; } /** - * .context.Constraint_Custom custom = 2; + * .context.Constraint_SLA_Capacity sla_capacity = 6; */ - public context.ContextOuterClass.Constraint_Custom.Builder getCustomBuilder() { - return getCustomFieldBuilder().getBuilder(); + public context.ContextOuterClass.Constraint_SLA_Capacity.Builder getSlaCapacityBuilder() { + return getSlaCapacityFieldBuilder().getBuilder(); } /** - * .context.Constraint_Custom custom = 2; + * .context.Constraint_SLA_Capacity sla_capacity = 6; */ @java.lang.Override - public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() { - if ((constraintCase_ == 2) && (customBuilder_ != null)) { - return customBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() { + if ((constraintCase_ == 6) && (slaCapacityBuilder_ != null)) { + return slaCapacityBuilder_.getMessageOrBuilder(); } else { - if (constraintCase_ == 2) { - return (context.ContextOuterClass.Constraint_Custom) constraint_; + if (constraintCase_ == 6) { + return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); } } /** - * .context.Constraint_Custom custom = 2; + * .context.Constraint_SLA_Capacity sla_capacity = 6; */ - private com.google.protobuf.SingleFieldBuilderV3 getCustomFieldBuilder() { - if (customBuilder_ == null) { - if (!(constraintCase_ == 2)) { - constraint_ = context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilderV3 getSlaCapacityFieldBuilder() { + if (slaCapacityBuilder_ == null) { + if (!(constraintCase_ == 6)) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); } - customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Custom) constraint_, getParentForChildren(), isClean()); + slaCapacityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_, getParentForChildren(), isClean()); constraint_ = null; } - constraintCase_ = 2; + constraintCase_ = 6; onChanged(); - return customBuilder_; + return slaCapacityBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3 scheduleBuilder_; + private com.google.protobuf.SingleFieldBuilderV3 slaLatencyBuilder_; /** - * .context.Constraint_Schedule schedule = 3; - * @return Whether the schedule field is set. + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return Whether the slaLatency field is set. */ @java.lang.Override - public boolean hasSchedule() { - return constraintCase_ == 3; + public boolean hasSlaLatency() { + return constraintCase_ == 7; } /** - * .context.Constraint_Schedule schedule = 3; - * @return The schedule. + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return The slaLatency. */ @java.lang.Override - public context.ContextOuterClass.Constraint_Schedule getSchedule() { - if (scheduleBuilder_ == null) { - if (constraintCase_ == 3) { - return (context.ContextOuterClass.Constraint_Schedule) constraint_; + public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() { + if (slaLatencyBuilder_ == null) { + if (constraintCase_ == 7) { + return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); } else { - if (constraintCase_ == 3) { - return scheduleBuilder_.getMessage(); + if (constraintCase_ == 7) { + return slaLatencyBuilder_.getMessage(); } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); } } /** - * .context.Constraint_Schedule schedule = 3; + * .context.Constraint_SLA_Latency sla_latency = 7; */ - public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule value) { - if (scheduleBuilder_ == null) { + public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { + if (slaLatencyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } constraint_ = value; onChanged(); } else { - scheduleBuilder_.setMessage(value); + slaLatencyBuilder_.setMessage(value); } - constraintCase_ = 3; + constraintCase_ = 7; return this; } /** - * .context.Constraint_Schedule schedule = 3; + * .context.Constraint_SLA_Latency sla_latency = 7; */ - public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule.Builder builderForValue) { - if (scheduleBuilder_ == null) { + public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency.Builder builderForValue) { + if (slaLatencyBuilder_ == null) { constraint_ = builderForValue.build(); onChanged(); } else { - scheduleBuilder_.setMessage(builderForValue.build()); + slaLatencyBuilder_.setMessage(builderForValue.build()); } - constraintCase_ = 3; + constraintCase_ = 7; return this; } /** - * .context.Constraint_Schedule schedule = 3; + * .context.Constraint_SLA_Latency sla_latency = 7; */ - public Builder mergeSchedule(context.ContextOuterClass.Constraint_Schedule value) { - if (scheduleBuilder_ == null) { - if (constraintCase_ == 3 && constraint_ != context.ContextOuterClass.Constraint_Schedule.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_Schedule.newBuilder((context.ContextOuterClass.Constraint_Schedule) constraint_).mergeFrom(value).buildPartial(); + public Builder mergeSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { + if (slaLatencyBuilder_ == null) { + if (constraintCase_ == 7 && constraint_ != context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.newBuilder((context.ContextOuterClass.Constraint_SLA_Latency) constraint_).mergeFrom(value).buildPartial(); } else { constraint_ = value; } onChanged(); } else { - if (constraintCase_ == 3) { - scheduleBuilder_.mergeFrom(value); + if (constraintCase_ == 7) { + slaLatencyBuilder_.mergeFrom(value); } else { - scheduleBuilder_.setMessage(value); + slaLatencyBuilder_.setMessage(value); } } - constraintCase_ = 3; + constraintCase_ = 7; return this; } /** - * .context.Constraint_Schedule schedule = 3; + * .context.Constraint_SLA_Latency sla_latency = 7; */ - public Builder clearSchedule() { - if (scheduleBuilder_ == null) { - if (constraintCase_ == 3) { + public Builder clearSlaLatency() { + if (slaLatencyBuilder_ == null) { + if (constraintCase_ == 7) { constraintCase_ = 0; constraint_ = null; onChanged(); } } else { - if (constraintCase_ == 3) { + if (constraintCase_ == 7) { constraintCase_ = 0; constraint_ = null; } - scheduleBuilder_.clear(); + slaLatencyBuilder_.clear(); } return this; } /** - * .context.Constraint_Schedule schedule = 3; + * .context.Constraint_SLA_Latency sla_latency = 7; */ - public context.ContextOuterClass.Constraint_Schedule.Builder getScheduleBuilder() { - return getScheduleFieldBuilder().getBuilder(); + public context.ContextOuterClass.Constraint_SLA_Latency.Builder getSlaLatencyBuilder() { + return getSlaLatencyFieldBuilder().getBuilder(); } /** - * .context.Constraint_Schedule schedule = 3; + * .context.Constraint_SLA_Latency sla_latency = 7; */ @java.lang.Override - public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() { - if ((constraintCase_ == 3) && (scheduleBuilder_ != null)) { - return scheduleBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() { + if ((constraintCase_ == 7) && (slaLatencyBuilder_ != null)) { + return slaLatencyBuilder_.getMessageOrBuilder(); } else { - if (constraintCase_ == 3) { - return (context.ContextOuterClass.Constraint_Schedule) constraint_; + if (constraintCase_ == 7) { + return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); } } /** - * .context.Constraint_Schedule schedule = 3; + * .context.Constraint_SLA_Latency sla_latency = 7; */ - private com.google.protobuf.SingleFieldBuilderV3 getScheduleFieldBuilder() { - if (scheduleBuilder_ == null) { - if (!(constraintCase_ == 3)) { - constraint_ = context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilderV3 getSlaLatencyFieldBuilder() { + if (slaLatencyBuilder_ == null) { + if (!(constraintCase_ == 7)) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); } - scheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Schedule) constraint_, getParentForChildren(), isClean()); + slaLatencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Latency) constraint_, getParentForChildren(), isClean()); constraint_ = null; } - constraintCase_ = 3; + constraintCase_ = 7; onChanged(); - return scheduleBuilder_; + return slaLatencyBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3 endpointLocationBuilder_; + private com.google.protobuf.SingleFieldBuilderV3 slaAvailabilityBuilder_; /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return Whether the endpointLocation field is set. + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return Whether the slaAvailability field is set. */ @java.lang.Override - public boolean hasEndpointLocation() { - return constraintCase_ == 4; + public boolean hasSlaAvailability() { + return constraintCase_ == 8; } /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return The endpointLocation. + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return The slaAvailability. */ @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() { - if (endpointLocationBuilder_ == null) { - if (constraintCase_ == 4) { - return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() { + if (slaAvailabilityBuilder_ == null) { + if (constraintCase_ == 8) { + return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); } else { - if (constraintCase_ == 4) { - return endpointLocationBuilder_.getMessage(); + if (constraintCase_ == 8) { + return slaAvailabilityBuilder_.getMessage(); } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); } } /** - * .context.Constraint_EndPointLocation endpoint_location = 4; + * .context.Constraint_SLA_Availability sla_availability = 8; */ - public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) { - if (endpointLocationBuilder_ == null) { + public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { + if (slaAvailabilityBuilder_ == null) { if (value == null) { throw new NullPointerException(); } constraint_ = value; onChanged(); } else { - endpointLocationBuilder_.setMessage(value); + slaAvailabilityBuilder_.setMessage(value); } - constraintCase_ = 4; + constraintCase_ = 8; return this; } /** - * .context.Constraint_EndPointLocation endpoint_location = 4; + * .context.Constraint_SLA_Availability sla_availability = 8; */ - public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation.Builder builderForValue) { - if (endpointLocationBuilder_ == null) { + public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability.Builder builderForValue) { + if (slaAvailabilityBuilder_ == null) { constraint_ = builderForValue.build(); onChanged(); } else { - endpointLocationBuilder_.setMessage(builderForValue.build()); + slaAvailabilityBuilder_.setMessage(builderForValue.build()); } - constraintCase_ = 4; + constraintCase_ = 8; return this; } /** - * .context.Constraint_EndPointLocation endpoint_location = 4; + * .context.Constraint_SLA_Availability sla_availability = 8; */ - public Builder mergeEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) { - if (endpointLocationBuilder_ == null) { - if (constraintCase_ == 4 && constraint_ != context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.newBuilder((context.ContextOuterClass.Constraint_EndPointLocation) constraint_).mergeFrom(value).buildPartial(); + public Builder mergeSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { + if (slaAvailabilityBuilder_ == null) { + if (constraintCase_ == 8 && constraint_ != context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.newBuilder((context.ContextOuterClass.Constraint_SLA_Availability) constraint_).mergeFrom(value).buildPartial(); } else { constraint_ = value; } onChanged(); } else { - if (constraintCase_ == 4) { - endpointLocationBuilder_.mergeFrom(value); + if (constraintCase_ == 8) { + slaAvailabilityBuilder_.mergeFrom(value); } else { - endpointLocationBuilder_.setMessage(value); + slaAvailabilityBuilder_.setMessage(value); } } - constraintCase_ = 4; + constraintCase_ = 8; return this; } /** - * .context.Constraint_EndPointLocation endpoint_location = 4; + * .context.Constraint_SLA_Availability sla_availability = 8; */ - public Builder clearEndpointLocation() { - if (endpointLocationBuilder_ == null) { - if (constraintCase_ == 4) { + public Builder clearSlaAvailability() { + if (slaAvailabilityBuilder_ == null) { + if (constraintCase_ == 8) { constraintCase_ = 0; constraint_ = null; onChanged(); } } else { - if (constraintCase_ == 4) { + if (constraintCase_ == 8) { constraintCase_ = 0; constraint_ = null; } - endpointLocationBuilder_.clear(); + slaAvailabilityBuilder_.clear(); } return this; } /** - * .context.Constraint_EndPointLocation endpoint_location = 4; + * .context.Constraint_SLA_Availability sla_availability = 8; */ - public context.ContextOuterClass.Constraint_EndPointLocation.Builder getEndpointLocationBuilder() { - return getEndpointLocationFieldBuilder().getBuilder(); + public context.ContextOuterClass.Constraint_SLA_Availability.Builder getSlaAvailabilityBuilder() { + return getSlaAvailabilityFieldBuilder().getBuilder(); } /** - * .context.Constraint_EndPointLocation endpoint_location = 4; + * .context.Constraint_SLA_Availability sla_availability = 8; */ @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() { - if ((constraintCase_ == 4) && (endpointLocationBuilder_ != null)) { - return endpointLocationBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() { + if ((constraintCase_ == 8) && (slaAvailabilityBuilder_ != null)) { + return slaAvailabilityBuilder_.getMessageOrBuilder(); } else { - if (constraintCase_ == 4) { - return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + if (constraintCase_ == 8) { + return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); } } /** - * .context.Constraint_EndPointLocation endpoint_location = 4; + * .context.Constraint_SLA_Availability sla_availability = 8; */ - private com.google.protobuf.SingleFieldBuilderV3 getEndpointLocationFieldBuilder() { - if (endpointLocationBuilder_ == null) { - if (!(constraintCase_ == 4)) { - constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilderV3 getSlaAvailabilityFieldBuilder() { + if (slaAvailabilityBuilder_ == null) { + if (!(constraintCase_ == 8)) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); } - endpointLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_EndPointLocation) constraint_, getParentForChildren(), isClean()); + slaAvailabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Availability) constraint_, getParentForChildren(), isClean()); constraint_ = null; } - constraintCase_ = 4; + constraintCase_ = 8; onChanged(); - return endpointLocationBuilder_; + return slaAvailabilityBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3 endpointPriorityBuilder_; + private com.google.protobuf.SingleFieldBuilderV3 slaIsolationBuilder_; /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return Whether the endpointPriority field is set. + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return Whether the slaIsolation field is set. */ @java.lang.Override - public boolean hasEndpointPriority() { - return constraintCase_ == 5; + public boolean hasSlaIsolation() { + return constraintCase_ == 9; } /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return The endpointPriority. + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return The slaIsolation. */ @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() { - if (endpointPriorityBuilder_ == null) { - if (constraintCase_ == 5) { - return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() { + if (slaIsolationBuilder_ == null) { + if (constraintCase_ == 9) { + return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); } else { - if (constraintCase_ == 5) { - return endpointPriorityBuilder_.getMessage(); + if (constraintCase_ == 9) { + return slaIsolationBuilder_.getMessage(); } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); } } /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; */ - public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) { - if (endpointPriorityBuilder_ == null) { + public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { + if (slaIsolationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } constraint_ = value; onChanged(); } else { - endpointPriorityBuilder_.setMessage(value); + slaIsolationBuilder_.setMessage(value); } - constraintCase_ = 5; + constraintCase_ = 9; return this; } /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; */ - public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority.Builder builderForValue) { - if (endpointPriorityBuilder_ == null) { + public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder builderForValue) { + if (slaIsolationBuilder_ == null) { constraint_ = builderForValue.build(); onChanged(); } else { - endpointPriorityBuilder_.setMessage(builderForValue.build()); + slaIsolationBuilder_.setMessage(builderForValue.build()); } - constraintCase_ = 5; + constraintCase_ = 9; return this; } /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; */ - public Builder mergeEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) { - if (endpointPriorityBuilder_ == null) { - if (constraintCase_ == 5 && constraint_ != context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.newBuilder((context.ContextOuterClass.Constraint_EndPointPriority) constraint_).mergeFrom(value).buildPartial(); + public Builder mergeSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { + if (slaIsolationBuilder_ == null) { + if (constraintCase_ == 9 && constraint_ != context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.newBuilder((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_).mergeFrom(value).buildPartial(); } else { constraint_ = value; } onChanged(); } else { - if (constraintCase_ == 5) { - endpointPriorityBuilder_.mergeFrom(value); + if (constraintCase_ == 9) { + slaIsolationBuilder_.mergeFrom(value); } else { - endpointPriorityBuilder_.setMessage(value); + slaIsolationBuilder_.setMessage(value); } } - constraintCase_ = 5; + constraintCase_ = 9; return this; } /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; */ - public Builder clearEndpointPriority() { - if (endpointPriorityBuilder_ == null) { - if (constraintCase_ == 5) { + public Builder clearSlaIsolation() { + if (slaIsolationBuilder_ == null) { + if (constraintCase_ == 9) { constraintCase_ = 0; constraint_ = null; onChanged(); } } else { - if (constraintCase_ == 5) { + if (constraintCase_ == 9) { constraintCase_ = 0; constraint_ = null; } - endpointPriorityBuilder_.clear(); + slaIsolationBuilder_.clear(); } return this; } /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; */ - public context.ContextOuterClass.Constraint_EndPointPriority.Builder getEndpointPriorityBuilder() { - return getEndpointPriorityFieldBuilder().getBuilder(); + public context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder getSlaIsolationBuilder() { + return getSlaIsolationFieldBuilder().getBuilder(); } /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; */ @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() { - if ((constraintCase_ == 5) && (endpointPriorityBuilder_ != null)) { - return endpointPriorityBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() { + if ((constraintCase_ == 9) && (slaIsolationBuilder_ != null)) { + return slaIsolationBuilder_.getMessageOrBuilder(); } else { - if (constraintCase_ == 5) { - return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + if (constraintCase_ == 9) { + return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); } } /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; */ - private com.google.protobuf.SingleFieldBuilderV3 getEndpointPriorityFieldBuilder() { - if (endpointPriorityBuilder_ == null) { - if (!(constraintCase_ == 5)) { - constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilderV3 getSlaIsolationFieldBuilder() { + if (slaIsolationBuilder_ == null) { + if (!(constraintCase_ == 9)) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); } - endpointPriorityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_EndPointPriority) constraint_, getParentForChildren(), isClean()); + slaIsolationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_, getParentForChildren(), isClean()); constraint_ = null; } - constraintCase_ = 5; + constraintCase_ = 9; onChanged(); - return endpointPriorityBuilder_; + return slaIsolationBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3 slaCapacityBuilder_; + private com.google.protobuf.SingleFieldBuilderV3 exclusionsBuilder_; /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return Whether the slaCapacity field is set. + * .context.Constraint_Exclusions exclusions = 10; + * @return Whether the exclusions field is set. */ @java.lang.Override - public boolean hasSlaCapacity() { - return constraintCase_ == 6; + public boolean hasExclusions() { + return constraintCase_ == 10; } /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return The slaCapacity. + * .context.Constraint_Exclusions exclusions = 10; + * @return The exclusions. */ @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() { - if (slaCapacityBuilder_ == null) { - if (constraintCase_ == 6) { - return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; + public context.ContextOuterClass.Constraint_Exclusions getExclusions() { + if (exclusionsBuilder_ == null) { + if (constraintCase_ == 10) { + return (context.ContextOuterClass.Constraint_Exclusions) constraint_; } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); } else { - if (constraintCase_ == 6) { - return slaCapacityBuilder_.getMessage(); + if (constraintCase_ == 10) { + return exclusionsBuilder_.getMessage(); } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); } } /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; + * .context.Constraint_Exclusions exclusions = 10; */ - public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) { - if (slaCapacityBuilder_ == null) { + public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions value) { + if (exclusionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } constraint_ = value; onChanged(); } else { - slaCapacityBuilder_.setMessage(value); + exclusionsBuilder_.setMessage(value); } - constraintCase_ = 6; + constraintCase_ = 10; return this; } /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; + * .context.Constraint_Exclusions exclusions = 10; */ - public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity.Builder builderForValue) { - if (slaCapacityBuilder_ == null) { + public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions.Builder builderForValue) { + if (exclusionsBuilder_ == null) { constraint_ = builderForValue.build(); onChanged(); } else { - slaCapacityBuilder_.setMessage(builderForValue.build()); + exclusionsBuilder_.setMessage(builderForValue.build()); } - constraintCase_ = 6; + constraintCase_ = 10; return this; } /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; + * .context.Constraint_Exclusions exclusions = 10; */ - public Builder mergeSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) { - if (slaCapacityBuilder_ == null) { - if (constraintCase_ == 6 && constraint_ != context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.newBuilder((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_).mergeFrom(value).buildPartial(); + public Builder mergeExclusions(context.ContextOuterClass.Constraint_Exclusions value) { + if (exclusionsBuilder_ == null) { + if (constraintCase_ == 10 && constraint_ != context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_Exclusions.newBuilder((context.ContextOuterClass.Constraint_Exclusions) constraint_).mergeFrom(value).buildPartial(); } else { constraint_ = value; } onChanged(); } else { - if (constraintCase_ == 6) { - slaCapacityBuilder_.mergeFrom(value); + if (constraintCase_ == 10) { + exclusionsBuilder_.mergeFrom(value); } else { - slaCapacityBuilder_.setMessage(value); + exclusionsBuilder_.setMessage(value); } } - constraintCase_ = 6; + constraintCase_ = 10; return this; } /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; + * .context.Constraint_Exclusions exclusions = 10; */ - public Builder clearSlaCapacity() { - if (slaCapacityBuilder_ == null) { - if (constraintCase_ == 6) { + public Builder clearExclusions() { + if (exclusionsBuilder_ == null) { + if (constraintCase_ == 10) { constraintCase_ = 0; constraint_ = null; onChanged(); } } else { - if (constraintCase_ == 6) { + if (constraintCase_ == 10) { constraintCase_ = 0; constraint_ = null; } - slaCapacityBuilder_.clear(); + exclusionsBuilder_.clear(); } return this; } /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; + * .context.Constraint_Exclusions exclusions = 10; */ - public context.ContextOuterClass.Constraint_SLA_Capacity.Builder getSlaCapacityBuilder() { - return getSlaCapacityFieldBuilder().getBuilder(); + public context.ContextOuterClass.Constraint_Exclusions.Builder getExclusionsBuilder() { + return getExclusionsFieldBuilder().getBuilder(); } /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; + * .context.Constraint_Exclusions exclusions = 10; */ @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() { - if ((constraintCase_ == 6) && (slaCapacityBuilder_ != null)) { - return slaCapacityBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() { + if ((constraintCase_ == 10) && (exclusionsBuilder_ != null)) { + return exclusionsBuilder_.getMessageOrBuilder(); } else { - if (constraintCase_ == 6) { - return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; + if (constraintCase_ == 10) { + return (context.ContextOuterClass.Constraint_Exclusions) constraint_; } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); } } /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; + * .context.Constraint_Exclusions exclusions = 10; */ - private com.google.protobuf.SingleFieldBuilderV3 getSlaCapacityFieldBuilder() { - if (slaCapacityBuilder_ == null) { - if (!(constraintCase_ == 6)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilderV3 getExclusionsFieldBuilder() { + if (exclusionsBuilder_ == null) { + if (!(constraintCase_ == 10)) { + constraint_ = context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); } - slaCapacityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_, getParentForChildren(), isClean()); + exclusionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Exclusions) constraint_, getParentForChildren(), isClean()); constraint_ = null; } - constraintCase_ = 6; + constraintCase_ = 10; onChanged(); - return slaCapacityBuilder_; + return exclusionsBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3 slaLatencyBuilder_; + private com.google.protobuf.SingleFieldBuilderV3 qosProfileBuilder_; /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return Whether the slaLatency field is set. + * .context.Constraint_QoSProfile qos_profile = 11; + * @return Whether the qosProfile field is set. */ @java.lang.Override - public boolean hasSlaLatency() { - return constraintCase_ == 7; + public boolean hasQosProfile() { + return constraintCase_ == 11; } /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return The slaLatency. + * .context.Constraint_QoSProfile qos_profile = 11; + * @return The qosProfile. */ @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() { - if (slaLatencyBuilder_ == null) { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; + public context.ContextOuterClass.Constraint_QoSProfile getQosProfile() { + if (qosProfileBuilder_ == null) { + if (constraintCase_ == 11) { + return (context.ContextOuterClass.Constraint_QoSProfile) constraint_; } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + return context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance(); } else { - if (constraintCase_ == 7) { - return slaLatencyBuilder_.getMessage(); + if (constraintCase_ == 11) { + return qosProfileBuilder_.getMessage(); } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + return context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance(); } } /** - * .context.Constraint_SLA_Latency sla_latency = 7; + * .context.Constraint_QoSProfile qos_profile = 11; */ - public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { - if (slaLatencyBuilder_ == null) { + public Builder setQosProfile(context.ContextOuterClass.Constraint_QoSProfile value) { + if (qosProfileBuilder_ == null) { if (value == null) { throw new NullPointerException(); } constraint_ = value; onChanged(); } else { - slaLatencyBuilder_.setMessage(value); + qosProfileBuilder_.setMessage(value); } - constraintCase_ = 7; + constraintCase_ = 11; return this; } /** - * .context.Constraint_SLA_Latency sla_latency = 7; + * .context.Constraint_QoSProfile qos_profile = 11; */ - public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency.Builder builderForValue) { - if (slaLatencyBuilder_ == null) { + public Builder setQosProfile(context.ContextOuterClass.Constraint_QoSProfile.Builder builderForValue) { + if (qosProfileBuilder_ == null) { constraint_ = builderForValue.build(); onChanged(); } else { - slaLatencyBuilder_.setMessage(builderForValue.build()); + qosProfileBuilder_.setMessage(builderForValue.build()); } - constraintCase_ = 7; + constraintCase_ = 11; return this; } /** - * .context.Constraint_SLA_Latency sla_latency = 7; + * .context.Constraint_QoSProfile qos_profile = 11; */ - public Builder mergeSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { - if (slaLatencyBuilder_ == null) { - if (constraintCase_ == 7 && constraint_ != context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.newBuilder((context.ContextOuterClass.Constraint_SLA_Latency) constraint_).mergeFrom(value).buildPartial(); + public Builder mergeQosProfile(context.ContextOuterClass.Constraint_QoSProfile value) { + if (qosProfileBuilder_ == null) { + if (constraintCase_ == 11 && constraint_ != context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_QoSProfile.newBuilder((context.ContextOuterClass.Constraint_QoSProfile) constraint_).mergeFrom(value).buildPartial(); } else { constraint_ = value; } onChanged(); } else { - if (constraintCase_ == 7) { - slaLatencyBuilder_.mergeFrom(value); + if (constraintCase_ == 11) { + qosProfileBuilder_.mergeFrom(value); } else { - slaLatencyBuilder_.setMessage(value); + qosProfileBuilder_.setMessage(value); } } - constraintCase_ = 7; + constraintCase_ = 11; return this; } /** - * .context.Constraint_SLA_Latency sla_latency = 7; + * .context.Constraint_QoSProfile qos_profile = 11; */ - public Builder clearSlaLatency() { - if (slaLatencyBuilder_ == null) { - if (constraintCase_ == 7) { + public Builder clearQosProfile() { + if (qosProfileBuilder_ == null) { + if (constraintCase_ == 11) { constraintCase_ = 0; constraint_ = null; onChanged(); } } else { - if (constraintCase_ == 7) { + if (constraintCase_ == 11) { constraintCase_ = 0; constraint_ = null; } - slaLatencyBuilder_.clear(); + qosProfileBuilder_.clear(); } return this; } /** - * .context.Constraint_SLA_Latency sla_latency = 7; + * .context.Constraint_QoSProfile qos_profile = 11; */ - public context.ContextOuterClass.Constraint_SLA_Latency.Builder getSlaLatencyBuilder() { - return getSlaLatencyFieldBuilder().getBuilder(); + public context.ContextOuterClass.Constraint_QoSProfile.Builder getQosProfileBuilder() { + return getQosProfileFieldBuilder().getBuilder(); } /** - * .context.Constraint_SLA_Latency sla_latency = 7; + * .context.Constraint_QoSProfile qos_profile = 11; */ @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() { - if ((constraintCase_ == 7) && (slaLatencyBuilder_ != null)) { - return slaLatencyBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.Constraint_QoSProfileOrBuilder getQosProfileOrBuilder() { + if ((constraintCase_ == 11) && (qosProfileBuilder_ != null)) { + return qosProfileBuilder_.getMessageOrBuilder(); } else { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; + if (constraintCase_ == 11) { + return (context.ContextOuterClass.Constraint_QoSProfile) constraint_; } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + return context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance(); } } /** - * .context.Constraint_SLA_Latency sla_latency = 7; + * .context.Constraint_QoSProfile qos_profile = 11; */ - private com.google.protobuf.SingleFieldBuilderV3 getSlaLatencyFieldBuilder() { - if (slaLatencyBuilder_ == null) { - if (!(constraintCase_ == 7)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilderV3 getQosProfileFieldBuilder() { + if (qosProfileBuilder_ == null) { + if (!(constraintCase_ == 11)) { + constraint_ = context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance(); } - slaLatencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Latency) constraint_, getParentForChildren(), isClean()); + qosProfileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_QoSProfile) constraint_, getParentForChildren(), isClean()); constraint_ = null; } - constraintCase_ = 7; - onChanged(); - return slaLatencyBuilder_; + constraintCase_ = 11; + onChanged(); + return qosProfileBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint) + } + + // @@protoc_insertion_point(class_scope:context.Constraint) + private static final context.ContextOuterClass.Constraint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint(); + } + + public static context.ContextOuterClass.Constraint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @java.lang.Override + public Constraint parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TeraFlowControllerOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TeraFlowController) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); + + /** + * .context.ContextId context_id = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + + /** + * string ip_address = 2; + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + + /** + * string ip_address = 2; + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); + + /** + * uint32 port = 3; + * @return The port. + */ + int getPort(); + } + + /** + *
+     * ----- Miscellaneous -------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.TeraFlowController} + */ + public static final class TeraFlowController extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TeraFlowController) + TeraFlowControllerOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use TeraFlowController.newBuilder() to construct. + private TeraFlowController(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TeraFlowController() { + ipAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TeraFlowController(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); + } + + public static final int CONTEXT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ContextId contextId_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipAddress_ = ""; + + /** + * string ip_address = 2; + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } + } + + /** + * string ip_address = 2; + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 3; + + private int port_ = 0; + + /** + * uint32 port = 3; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_); + } + if (port_ != 0) { + output.writeUInt32(3, port_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, port_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TeraFlowController)) { + return super.equals(obj); + } + context.ContextOuterClass.TeraFlowController other = (context.ContextOuterClass.TeraFlowController) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (!getIpAddress().equals(other.getIpAddress())) + return false; + if (getPort() != other.getPort()) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.TeraFlowController prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Miscellaneous -------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.TeraFlowController} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TeraFlowController) + context.ContextOuterClass.TeraFlowControllerOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); + } + + // Construct using context.ContextOuterClass.TeraFlowController.newBuilder() + private Builder() { + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); + contextIdBuilder_ = null; + } + ipAddress_ = ""; + port_ = 0; + return this; } - private com.google.protobuf.SingleFieldBuilderV3 slaAvailabilityBuilder_; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return Whether the slaAvailability field is set. - */ @java.lang.Override - public boolean hasSlaAvailability() { - return constraintCase_ == 8; + public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { + return context.ContextOuterClass.TeraFlowController.getDefaultInstance(); } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return The slaAvailability. - */ @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() { - if (slaAvailabilityBuilder_ == null) { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } else { - if (constraintCase_ == 8) { - return slaAvailabilityBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + public context.ContextOuterClass.TeraFlowController build() { + context.ContextOuterClass.TeraFlowController result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { - if (slaAvailabilityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - slaAvailabilityBuilder_.setMessage(value); + @java.lang.Override + public context.ContextOuterClass.TeraFlowController buildPartial() { + context.ContextOuterClass.TeraFlowController result = new context.ContextOuterClass.TeraFlowController(this); + if (bitField0_ != 0) { + buildPartial0(result); } - constraintCase_ = 8; - return this; + onBuilt(); + return result; } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability.Builder builderForValue) { - if (slaAvailabilityBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - slaAvailabilityBuilder_.setMessage(builderForValue.build()); + private void buildPartial0(context.ContextOuterClass.TeraFlowController result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ipAddress_ = ipAddress_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.port_ = port_; } - constraintCase_ = 8; - return this; } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder mergeSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { - if (slaAvailabilityBuilder_ == null) { - if (constraintCase_ == 8 && constraint_ != context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.newBuilder((context.ContextOuterClass.Constraint_SLA_Availability) constraint_).mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TeraFlowController) { + return mergeFrom((context.ContextOuterClass.TeraFlowController) other); } else { - if (constraintCase_ == 8) { - slaAvailabilityBuilder_.mergeFrom(value); - } else { - slaAvailabilityBuilder_.setMessage(value); - } + super.mergeFrom(other); + return this; } - constraintCase_ = 8; - return this; } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder clearSlaAvailability() { - if (slaAvailabilityBuilder_ == null) { - if (constraintCase_ == 8) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 8) { - constraintCase_ = 0; - constraint_ = null; - } - slaAvailabilityBuilder_.clear(); + public Builder mergeFrom(context.ContextOuterClass.TeraFlowController other) { + if (other == context.ContextOuterClass.TeraFlowController.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); return this; } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public context.ContextOuterClass.Constraint_SLA_Availability.Builder getSlaAvailabilityBuilder() { - return getSlaAvailabilityFieldBuilder().getBuilder(); + @java.lang.Override + public final boolean isInitialized() { + return true; } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() { - if ((constraintCase_ == 8) && (slaAvailabilityBuilder_ != null)) { - return slaAvailabilityBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } - } - - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3 getSlaAvailabilityFieldBuilder() { - if (slaAvailabilityBuilder_ == null) { - if (!(constraintCase_ == 8)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 24: + { + port_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) } - slaAvailabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Availability) constraint_, getParentForChildren(), isClean()); - constraint_ = null; + // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); } - constraintCase_ = 8; - onChanged(); - return slaAvailabilityBuilder_; + // finally + return this; } - private com.google.protobuf.SingleFieldBuilderV3 slaIsolationBuilder_; + private int bitField0_; + + private context.ContextOuterClass.ContextId contextId_; + + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return Whether the slaIsolation field is set. + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. */ - @java.lang.Override - public boolean hasSlaIsolation() { - return constraintCase_ == 9; + public boolean hasContextId() { + return ((bitField0_ & 0x00000001) != 0); } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return The slaIsolation. + * .context.ContextId context_id = 1; + * @return The contextId. */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() { - if (slaIsolationBuilder_ == null) { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } else { - if (constraintCase_ == 9) { - return slaIsolationBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + return contextIdBuilder_.getMessage(); } } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { - if (slaIsolationBuilder_ == null) { + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - constraint_ = value; - onChanged(); + contextId_ = value; } else { - slaIsolationBuilder_.setMessage(value); + contextIdBuilder_.setMessage(value); } - constraintCase_ = 9; + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder builderForValue) { - if (slaIsolationBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); } else { - slaIsolationBuilder_.setMessage(builderForValue.build()); + contextIdBuilder_.setMessage(builderForValue.build()); } - constraintCase_ = 9; + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - public Builder mergeSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { - if (slaIsolationBuilder_ == null) { - if (constraintCase_ == 9 && constraint_ != context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.newBuilder((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_).mergeFrom(value).buildPartial(); + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { + getContextIdBuilder().mergeFrom(value); } else { - constraint_ = value; + contextId_ = value; } - onChanged(); } else { - if (constraintCase_ == 9) { - slaIsolationBuilder_.mergeFrom(value); - } else { - slaIsolationBuilder_.setMessage(value); - } + contextIdBuilder_.mergeFrom(value); } - constraintCase_ = 9; + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - public Builder clearSlaIsolation() { - if (slaIsolationBuilder_ == null) { - if (constraintCase_ == 9) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 9) { - constraintCase_ = 0; - constraint_ = null; - } - slaIsolationBuilder_.clear(); + public Builder clearContextId() { + bitField0_ = (bitField0_ & ~0x00000001); + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); + contextIdBuilder_ = null; } + onChanged(); return this; } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - public context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder getSlaIsolationBuilder() { - return getSlaIsolationFieldBuilder().getBuilder(); + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getContextIdFieldBuilder().getBuilder(); } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() { - if ((constraintCase_ == 9) && (slaIsolationBuilder_ != null)) { - return slaIsolationBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); } else { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - private com.google.protobuf.SingleFieldBuilderV3 getSlaIsolationFieldBuilder() { - if (slaIsolationBuilder_ == null) { - if (!(constraintCase_ == 9)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } - slaIsolationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_, getParentForChildren(), isClean()); - constraint_ = null; + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; } - constraintCase_ = 9; - onChanged(); - return slaIsolationBuilder_; + return contextIdBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3 exclusionsBuilder_; - - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return Whether the exclusions field is set. - */ - @java.lang.Override - public boolean hasExclusions() { - return constraintCase_ == 10; - } + private java.lang.Object ipAddress_ = ""; /** - * .context.Constraint_Exclusions exclusions = 10; - * @return The exclusions. + * string ip_address = 2; + * @return The ipAddress. */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Exclusions getExclusions() { - if (exclusionsBuilder_ == null) { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; } else { - if (constraintCase_ == 10) { - return exclusionsBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + return (java.lang.String) ref; } } /** - * .context.Constraint_Exclusions exclusions = 10; + * string ip_address = 2; + * @return The bytes for ipAddress. */ - public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions value) { - if (exclusionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; } else { - exclusionsBuilder_.setMessage(value); + return (com.google.protobuf.ByteString) ref; } - constraintCase_ = 10; - return this; } /** - * .context.Constraint_Exclusions exclusions = 10; + * string ip_address = 2; + * @param value The ipAddress to set. + * @return This builder for chaining. */ - public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions.Builder builderForValue) { - if (exclusionsBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - exclusionsBuilder_.setMessage(builderForValue.build()); + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - constraintCase_ = 10; + ipAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); return this; } /** - * .context.Constraint_Exclusions exclusions = 10; + * string ip_address = 2; + * @return This builder for chaining. */ - public Builder mergeExclusions(context.ContextOuterClass.Constraint_Exclusions value) { - if (exclusionsBuilder_ == null) { - if (constraintCase_ == 10 && constraint_ != context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_Exclusions.newBuilder((context.ContextOuterClass.Constraint_Exclusions) constraint_).mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 10) { - exclusionsBuilder_.mergeFrom(value); - } else { - exclusionsBuilder_.setMessage(value); - } - } - constraintCase_ = 10; + public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); return this; } /** - * .context.Constraint_Exclusions exclusions = 10; + * string ip_address = 2; + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. */ - public Builder clearExclusions() { - if (exclusionsBuilder_ == null) { - if (constraintCase_ == 10) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 10) { - constraintCase_ = 0; - constraint_ = null; - } - exclusionsBuilder_.clear(); + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ipAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); return this; } + private int port_; + /** - * .context.Constraint_Exclusions exclusions = 10; + * uint32 port = 3; + * @return The port. */ - public context.ContextOuterClass.Constraint_Exclusions.Builder getExclusionsBuilder() { - return getExclusionsFieldBuilder().getBuilder(); + @java.lang.Override + public int getPort() { + return port_; } /** - * .context.Constraint_Exclusions exclusions = 10; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() { - if ((constraintCase_ == 10) && (exclusionsBuilder_ != null)) { - return exclusionsBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } + * uint32 port = 3; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + port_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } /** - * .context.Constraint_Exclusions exclusions = 10; + * uint32 port = 3; + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3 getExclusionsFieldBuilder() { - if (exclusionsBuilder_ == null) { - if (!(constraintCase_ == 10)) { - constraint_ = context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } - exclusionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Exclusions) constraint_, getParentForChildren(), isClean()); - constraint_ = null; - } - constraintCase_ = 10; + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000004); + port_ = 0; onChanged(); - return exclusionsBuilder_; + return this; } @java.lang.Override @@ -67900,24 +71867,24 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.Constraint) + // @@protoc_insertion_point(builder_scope:context.TeraFlowController) } - // @@protoc_insertion_point(class_scope:context.Constraint) - private static final context.ContextOuterClass.Constraint DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.TeraFlowController) + private static final context.ContextOuterClass.TeraFlowController DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint(); + DEFAULT_INSTANCE = new context.ContextOuterClass.TeraFlowController(); } - public static context.ContextOuterClass.Constraint getDefaultInstance() { + public static context.ContextOuterClass.TeraFlowController getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public Constraint parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public TeraFlowController parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); @@ -67932,22 +71899,22 @@ public final class ContextOuterClass { } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.Constraint getDefaultInstanceForType() { + public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface TeraFlowControllerOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TeraFlowController) + public interface AuthenticationResultOrBuilder extends // @@protoc_insertion_point(interface_extends:context.AuthenticationResult) com.google.protobuf.MessageOrBuilder { /** @@ -67968,58 +71935,41 @@ public final class ContextOuterClass { context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); /** - * string ip_address = 2; - * @return The ipAddress. - */ - java.lang.String getIpAddress(); - - /** - * string ip_address = 2; - * @return The bytes for ipAddress. - */ - com.google.protobuf.ByteString getIpAddressBytes(); - - /** - * uint32 port = 3; - * @return The port. + * bool authenticated = 2; + * @return The authenticated. */ - int getPort(); + boolean getAuthenticated(); } /** - *
-     * ----- Miscellaneous -------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.TeraFlowController} + * Protobuf type {@code context.AuthenticationResult} */ - public static final class TeraFlowController extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TeraFlowController) - TeraFlowControllerOrBuilder { + public static final class AuthenticationResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.AuthenticationResult) + AuthenticationResultOrBuilder { private static final long serialVersionUID = 0L; - // Use TeraFlowController.newBuilder() to construct. - private TeraFlowController(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use AuthenticationResult.newBuilder() to construct. + private AuthenticationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private TeraFlowController() { - ipAddress_ = ""; + private AuthenticationResult() { } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TeraFlowController(); + return new AuthenticationResult(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); + return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); } public static final int CONTEXT_ID_FIELD_NUMBER = 1; @@ -68052,55 +72002,17 @@ public final class ContextOuterClass { return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } - public static final int IP_ADDRESS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object ipAddress_ = ""; - - /** - * string ip_address = 2; - * @return The ipAddress. - */ - @java.lang.Override - public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ipAddress_ = s; - return s; - } - } - - /** - * string ip_address = 2; - * @return The bytes for ipAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PORT_FIELD_NUMBER = 3; + public static final int AUTHENTICATED_FIELD_NUMBER = 2; - private int port_ = 0; + private boolean authenticated_ = false; /** - * uint32 port = 3; - * @return The port. + * bool authenticated = 2; + * @return The authenticated. */ @java.lang.Override - public int getPort() { - return port_; + public boolean getAuthenticated() { + return authenticated_; } private byte memoizedIsInitialized = -1; @@ -68121,11 +72033,8 @@ public final class ContextOuterClass { if (contextId_ != null) { output.writeMessage(1, getContextId()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_); - } - if (port_ != 0) { - output.writeUInt32(3, port_); + if (authenticated_ != false) { + output.writeBool(2, authenticated_); } getUnknownFields().writeTo(output); } @@ -68139,11 +72048,8 @@ public final class ContextOuterClass { if (contextId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_); - } - if (port_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, port_); + if (authenticated_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, authenticated_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -68155,19 +72061,17 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.TeraFlowController)) { + if (!(obj instanceof context.ContextOuterClass.AuthenticationResult)) { return super.equals(obj); } - context.ContextOuterClass.TeraFlowController other = (context.ContextOuterClass.TeraFlowController) obj; + context.ContextOuterClass.AuthenticationResult other = (context.ContextOuterClass.AuthenticationResult) obj; if (hasContextId() != other.hasContextId()) return false; if (hasContextId()) { if (!getContextId().equals(other.getContextId())) return false; } - if (!getIpAddress().equals(other.getIpAddress())) - return false; - if (getPort() != other.getPort()) + if (getAuthenticated() != other.getAuthenticated()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -68185,60 +72089,58 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; hash = (53 * hash) + getContextId().hashCode(); } - hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getIpAddress().hashCode(); - hash = (37 * hash) + PORT_FIELD_NUMBER; - hash = (53 * hash) + getPort(); + hash = (37 * hash) + AUTHENTICATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAuthenticated()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.TeraFlowController parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.TeraFlowController parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -68251,7 +72153,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.TeraFlowController prototype) { + public static Builder newBuilder(context.ContextOuterClass.AuthenticationResult prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -68267,25 +72169,21 @@ public final class ContextOuterClass { } /** - *
-         * ----- Miscellaneous -------------------------------------------------------------------------------------------------
-         * 
- * - * Protobuf type {@code context.TeraFlowController} + * Protobuf type {@code context.AuthenticationResult} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TeraFlowController) - context.ContextOuterClass.TeraFlowControllerOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.AuthenticationResult) + context.ContextOuterClass.AuthenticationResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); + return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); } - // Construct using context.ContextOuterClass.TeraFlowController.newBuilder() + // Construct using context.ContextOuterClass.AuthenticationResult.newBuilder() private Builder() { } @@ -68302,24 +72200,23 @@ public final class ContextOuterClass { contextIdBuilder_.dispose(); contextIdBuilder_ = null; } - ipAddress_ = ""; - port_ = 0; + authenticated_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; } @java.lang.Override - public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { - return context.ContextOuterClass.TeraFlowController.getDefaultInstance(); + public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { + return context.ContextOuterClass.AuthenticationResult.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.TeraFlowController build() { - context.ContextOuterClass.TeraFlowController result = buildPartial(); + public context.ContextOuterClass.AuthenticationResult build() { + context.ContextOuterClass.AuthenticationResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -68327,8 +72224,8 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.TeraFlowController buildPartial() { - context.ContextOuterClass.TeraFlowController result = new context.ContextOuterClass.TeraFlowController(this); + public context.ContextOuterClass.AuthenticationResult buildPartial() { + context.ContextOuterClass.AuthenticationResult result = new context.ContextOuterClass.AuthenticationResult(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -68336,42 +72233,34 @@ public final class ContextOuterClass { return result; } - private void buildPartial0(context.ContextOuterClass.TeraFlowController result) { + private void buildPartial0(context.ContextOuterClass.AuthenticationResult result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); } if (((from_bitField0_ & 0x00000002) != 0)) { - result.ipAddress_ = ipAddress_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.port_ = port_; + result.authenticated_ = authenticated_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TeraFlowController) { - return mergeFrom((context.ContextOuterClass.TeraFlowController) other); + if (other instanceof context.ContextOuterClass.AuthenticationResult) { + return mergeFrom((context.ContextOuterClass.AuthenticationResult) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.TeraFlowController other) { - if (other == context.ContextOuterClass.TeraFlowController.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.AuthenticationResult other) { + if (other == context.ContextOuterClass.AuthenticationResult.getDefaultInstance()) return this; if (other.hasContextId()) { mergeContextId(other.getContextId()); } - if (!other.getIpAddress().isEmpty()) { - ipAddress_ = other.ipAddress_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.getPort() != 0) { - setPort(other.getPort()); + if (other.getAuthenticated() != false) { + setAuthenticated(other.getAuthenticated()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -68403,20 +72292,13 @@ public final class ContextOuterClass { break; } // case 10 - case 18: + case 16: { - ipAddress_ = input.readStringRequireUtf8(); + authenticated_ = input.readBool(); bitField0_ |= 0x00000002; break; } - // case 18 - case 24: - { - port_ = input.readUInt32(); - bitField0_ |= 0x00000004; - break; - } - // case 24 + // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -68558,111 +72440,36 @@ public final class ContextOuterClass { return contextIdBuilder_; } - private java.lang.Object ipAddress_ = ""; - - /** - * string ip_address = 2; - * @return The ipAddress. - */ - public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ipAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + private boolean authenticated_; /** - * string ip_address = 2; - * @return The bytes for ipAddress. + * bool authenticated = 2; + * @return The authenticated. */ - public com.google.protobuf.ByteString getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + @java.lang.Override + public boolean getAuthenticated() { + return authenticated_; } /** - * string ip_address = 2; - * @param value The ipAddress to set. + * bool authenticated = 2; + * @param value The authenticated to set. * @return This builder for chaining. */ - public Builder setIpAddress(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ipAddress_ = value; + public Builder setAuthenticated(boolean value) { + authenticated_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** - * string ip_address = 2; + * bool authenticated = 2; * @return This builder for chaining. */ - public Builder clearIpAddress() { - ipAddress_ = getDefaultInstance().getIpAddress(); + public Builder clearAuthenticated() { bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * string ip_address = 2; - * @param value The bytes for ipAddress to set. - * @return This builder for chaining. - */ - public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ipAddress_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private int port_; - - /** - * uint32 port = 3; - * @return The port. - */ - @java.lang.Override - public int getPort() { - return port_; - } - - /** - * uint32 port = 3; - * @param value The port to set. - * @return This builder for chaining. - */ - public Builder setPort(int value) { - port_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * uint32 port = 3; - * @return This builder for chaining. - */ - public Builder clearPort() { - bitField0_ = (bitField0_ & ~0x00000004); - port_ = 0; + authenticated_ = false; onChanged(); return this; } @@ -68676,24 +72483,24 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.TeraFlowController) + // @@protoc_insertion_point(builder_scope:context.AuthenticationResult) } - // @@protoc_insertion_point(class_scope:context.TeraFlowController) - private static final context.ContextOuterClass.TeraFlowController DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.AuthenticationResult) + private static final context.ContextOuterClass.AuthenticationResult DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TeraFlowController(); + DEFAULT_INSTANCE = new context.ContextOuterClass.AuthenticationResult(); } - public static context.ContextOuterClass.TeraFlowController getDefaultInstance() { + public static context.ContextOuterClass.AuthenticationResult getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public TeraFlowController parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public AuthenticationResult parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); @@ -68708,120 +72515,109 @@ public final class ContextOuterClass { } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { + public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface AuthenticationResultOrBuilder extends // @@protoc_insertion_point(interface_extends:context.AuthenticationResult) + public interface OpticalConfigIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigId) com.google.protobuf.MessageOrBuilder { /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - - /** - * .context.ContextId context_id = 1; + * string opticalconfig_uuid = 1; + * @return The opticalconfigUuid. */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + java.lang.String getOpticalconfigUuid(); /** - * bool authenticated = 2; - * @return The authenticated. + * string opticalconfig_uuid = 1; + * @return The bytes for opticalconfigUuid. */ - boolean getAuthenticated(); + com.google.protobuf.ByteString getOpticalconfigUuidBytes(); } /** - * Protobuf type {@code context.AuthenticationResult} + *
+     * ---------------- Experimental ------------------------
+     * 
+ * + * Protobuf type {@code context.OpticalConfigId} */ - public static final class AuthenticationResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.AuthenticationResult) - AuthenticationResultOrBuilder { + public static final class OpticalConfigId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigId) + OpticalConfigIdOrBuilder { private static final long serialVersionUID = 0L; - // Use AuthenticationResult.newBuilder() to construct. - private AuthenticationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalConfigId.newBuilder() to construct. + private OpticalConfigId(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private AuthenticationResult() { + private OpticalConfigId() { + opticalconfigUuid_ = ""; } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AuthenticationResult(); + return new OpticalConfigId(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfigId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigId.class, context.ContextOuterClass.OpticalConfigId.Builder.class); } - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - - private context.ContextOuterClass.ContextId contextId_; - - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } + public static final int OPTICALCONFIG_UUID_FIELD_NUMBER = 1; - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } + @SuppressWarnings("serial") + private volatile java.lang.Object opticalconfigUuid_ = ""; /** - * .context.ContextId context_id = 1; + * string opticalconfig_uuid = 1; + * @return The opticalconfigUuid. */ @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + public java.lang.String getOpticalconfigUuid() { + java.lang.Object ref = opticalconfigUuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + opticalconfigUuid_ = s; + return s; + } } - public static final int AUTHENTICATED_FIELD_NUMBER = 2; - - private boolean authenticated_ = false; - /** - * bool authenticated = 2; - * @return The authenticated. + * string opticalconfig_uuid = 1; + * @return The bytes for opticalconfigUuid. */ @java.lang.Override - public boolean getAuthenticated() { - return authenticated_; + public com.google.protobuf.ByteString getOpticalconfigUuidBytes() { + java.lang.Object ref = opticalconfigUuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + opticalconfigUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -68839,11 +72635,8 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (authenticated_ != false) { - output.writeBool(2, authenticated_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opticalconfigUuid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, opticalconfigUuid_); } getUnknownFields().writeTo(output); } @@ -68854,11 +72647,8 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); - } - if (authenticated_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, authenticated_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opticalconfigUuid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, opticalconfigUuid_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -68870,17 +72660,11 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.AuthenticationResult)) { + if (!(obj instanceof context.ContextOuterClass.OpticalConfigId)) { return super.equals(obj); } - context.ContextOuterClass.AuthenticationResult other = (context.ContextOuterClass.AuthenticationResult) obj; - if (hasContextId() != other.hasContextId()) - return false; - if (hasContextId()) { - if (!getContextId().equals(other.getContextId())) - return false; - } - if (getAuthenticated() != other.getAuthenticated()) + context.ContextOuterClass.OpticalConfigId other = (context.ContextOuterClass.OpticalConfigId) obj; + if (!getOpticalconfigUuid().equals(other.getOpticalconfigUuid())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -68894,62 +72678,58 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - hash = (37 * hash) + AUTHENTICATED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAuthenticated()); + hash = (37 * hash) + OPTICALCONFIG_UUID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigUuid().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.AuthenticationResult parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -68962,7 +72742,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.AuthenticationResult prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalConfigId prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -68978,21 +72758,25 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.AuthenticationResult} + *
+         * ---------------- Experimental ------------------------
+         * 
+ * + * Protobuf type {@code context.OpticalConfigId} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.AuthenticationResult) - context.ContextOuterClass.AuthenticationResultOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigId) + context.ContextOuterClass.OpticalConfigIdOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfigId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigId.class, context.ContextOuterClass.OpticalConfigId.Builder.class); } - // Construct using context.ContextOuterClass.AuthenticationResult.newBuilder() + // Construct using context.ContextOuterClass.OpticalConfigId.newBuilder() private Builder() { } @@ -69004,28 +72788,23 @@ public final class ContextOuterClass { public Builder clear() { super.clear(); bitField0_ = 0; - contextId_ = null; - if (contextIdBuilder_ != null) { - contextIdBuilder_.dispose(); - contextIdBuilder_ = null; - } - authenticated_ = false; + opticalconfigUuid_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; } @java.lang.Override - public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { - return context.ContextOuterClass.AuthenticationResult.getDefaultInstance(); + public context.ContextOuterClass.OpticalConfigId getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfigId.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.AuthenticationResult build() { - context.ContextOuterClass.AuthenticationResult result = buildPartial(); + public context.ContextOuterClass.OpticalConfigId build() { + context.ContextOuterClass.OpticalConfigId result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -69033,8 +72812,8 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.AuthenticationResult buildPartial() { - context.ContextOuterClass.AuthenticationResult result = new context.ContextOuterClass.AuthenticationResult(this); + public context.ContextOuterClass.OpticalConfigId buildPartial() { + context.ContextOuterClass.OpticalConfigId result = new context.ContextOuterClass.OpticalConfigId(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -69042,34 +72821,30 @@ public final class ContextOuterClass { return result; } - private void buildPartial0(context.ContextOuterClass.AuthenticationResult result) { + private void buildPartial0(context.ContextOuterClass.OpticalConfigId result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.authenticated_ = authenticated_; + result.opticalconfigUuid_ = opticalconfigUuid_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.AuthenticationResult) { - return mergeFrom((context.ContextOuterClass.AuthenticationResult) other); + if (other instanceof context.ContextOuterClass.OpticalConfigId) { + return mergeFrom((context.ContextOuterClass.OpticalConfigId) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.AuthenticationResult other) { - if (other == context.ContextOuterClass.AuthenticationResult.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalConfigId other) { + if (other == context.ContextOuterClass.OpticalConfigId.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (other.getAuthenticated() != false) { - setAuthenticated(other.getAuthenticated()); + if (!other.getOpticalconfigUuid().isEmpty()) { + opticalconfigUuid_ = other.opticalconfigUuid_; + bitField0_ |= 0x00000001; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -69096,18 +72871,11 @@ public final class ContextOuterClass { break; case 10: { - input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + opticalconfigUuid_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 - case 16: - { - authenticated_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } - // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -69131,154 +72899,77 @@ public final class ContextOuterClass { private int bitField0_; - private context.ContextOuterClass.ContextId contextId_; - - private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; - - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } + private java.lang.Object opticalconfigUuid_ = ""; /** - * .context.ContextId context_id = 1; + * string opticalconfig_uuid = 1; + * @return The opticalconfigUuid. */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; + public java.lang.String getOpticalconfigUuid() { + java.lang.Object ref = opticalconfigUuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + opticalconfigUuid_ = s; + return s; } else { - contextIdBuilder_.setMessage(value); + return (java.lang.String) ref; } - bitField0_ |= 0x00000001; - onChanged(); - return this; } /** - * .context.ContextId context_id = 1; + * string opticalconfig_uuid = 1; + * @return The bytes for opticalconfigUuid. */ - public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); + public com.google.protobuf.ByteString getOpticalconfigUuidBytes() { + java.lang.Object ref = opticalconfigUuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + opticalconfigUuid_ = b; + return b; } else { - contextIdBuilder_.setMessage(builderForValue.build()); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000001; - onChanged(); - return this; } /** - * .context.ContextId context_id = 1; + * string opticalconfig_uuid = 1; + * @param value The opticalconfigUuid to set. + * @return This builder for chaining. */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { - getContextIdBuilder().mergeFrom(value); - } else { - contextId_ = value; - } - } else { - contextIdBuilder_.mergeFrom(value); + public Builder setOpticalconfigUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + opticalconfigUuid_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .context.ContextId context_id = 1; - */ - public Builder clearContextId() { - bitField0_ = (bitField0_ & ~0x00000001); - contextId_ = null; - if (contextIdBuilder_ != null) { - contextIdBuilder_.dispose(); - contextIdBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - - /** - * .context.ContextId context_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - - private boolean authenticated_; - - /** - * bool authenticated = 2; - * @return The authenticated. - */ - @java.lang.Override - public boolean getAuthenticated() { - return authenticated_; - } - - /** - * bool authenticated = 2; - * @param value The authenticated to set. + * string opticalconfig_uuid = 1; * @return This builder for chaining. */ - public Builder setAuthenticated(boolean value) { - authenticated_ = value; - bitField0_ |= 0x00000002; + public Builder clearOpticalconfigUuid() { + opticalconfigUuid_ = getDefaultInstance().getOpticalconfigUuid(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** - * bool authenticated = 2; + * string opticalconfig_uuid = 1; + * @param value The bytes for opticalconfigUuid to set. * @return This builder for chaining. */ - public Builder clearAuthenticated() { - bitField0_ = (bitField0_ & ~0x00000002); - authenticated_ = false; + public Builder setOpticalconfigUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + opticalconfigUuid_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -69292,24 +72983,24 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.AuthenticationResult) + // @@protoc_insertion_point(builder_scope:context.OpticalConfigId) } - // @@protoc_insertion_point(class_scope:context.AuthenticationResult) - private static final context.ContextOuterClass.AuthenticationResult DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalConfigId) + private static final context.ContextOuterClass.OpticalConfigId DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.AuthenticationResult(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigId(); } - public static context.ContextOuterClass.AuthenticationResult getDefaultInstance() { + public static context.ContextOuterClass.OpticalConfigId getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public AuthenticationResult parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public OpticalConfigId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); @@ -69324,111 +73015,201 @@ public final class ContextOuterClass { } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalConfigId getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OpticalConfigIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigId) + public interface OpticalConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfig) com.google.protobuf.MessageOrBuilder { /** - * string opticalconfig_uuid = 1; - * @return The opticalconfigUuid. + * .context.OpticalConfigId opticalconfig_id = 1; + * @return Whether the opticalconfigId field is set. */ - java.lang.String getOpticalconfigUuid(); + boolean hasOpticalconfigId(); /** - * string opticalconfig_uuid = 1; - * @return The bytes for opticalconfigUuid. + * .context.OpticalConfigId opticalconfig_id = 1; + * @return The opticalconfigId. */ - com.google.protobuf.ByteString getOpticalconfigUuidBytes(); + context.ContextOuterClass.OpticalConfigId getOpticalconfigId(); + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder(); + + /** + * string config = 2; + * @return The config. + */ + java.lang.String getConfig(); + + /** + * string config = 2; + * @return The bytes for config. + */ + com.google.protobuf.ByteString getConfigBytes(); + + /** + * .context.DeviceId device_id = 3; + * @return Whether the deviceId field is set. + */ + boolean hasDeviceId(); + + /** + * .context.DeviceId device_id = 3; + * @return The deviceId. + */ + context.ContextOuterClass.DeviceId getDeviceId(); + + /** + * .context.DeviceId device_id = 3; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); } /** - *
-     * ---------------- Experimental ------------------------
-     * 
- * - * Protobuf type {@code context.OpticalConfigId} + * Protobuf type {@code context.OpticalConfig} */ - public static final class OpticalConfigId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigId) - OpticalConfigIdOrBuilder { + public static final class OpticalConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfig) + OpticalConfigOrBuilder { private static final long serialVersionUID = 0L; - // Use OpticalConfigId.newBuilder() to construct. - private OpticalConfigId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalConfig.newBuilder() to construct. + private OpticalConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OpticalConfigId() { - opticalconfigUuid_ = ""; + private OpticalConfig() { + config_ = ""; } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OpticalConfigId(); + return new OpticalConfig(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalConfigId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigId.class, context.ContextOuterClass.OpticalConfigId.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfig.class, context.ContextOuterClass.OpticalConfig.Builder.class); } - public static final int OPTICALCONFIG_UUID_FIELD_NUMBER = 1; + public static final int OPTICALCONFIG_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.OpticalConfigId opticalconfigId_; + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return Whether the opticalconfigId field is set. + */ + @java.lang.Override + public boolean hasOpticalconfigId() { + return opticalconfigId_ != null; + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return The opticalconfigId. + */ + @java.lang.Override + public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } + + public static final int CONFIG_FIELD_NUMBER = 2; @SuppressWarnings("serial") - private volatile java.lang.Object opticalconfigUuid_ = ""; + private volatile java.lang.Object config_ = ""; /** - * string opticalconfig_uuid = 1; - * @return The opticalconfigUuid. + * string config = 2; + * @return The config. */ @java.lang.Override - public java.lang.String getOpticalconfigUuid() { - java.lang.Object ref = opticalconfigUuid_; + public java.lang.String getConfig() { + java.lang.Object ref = config_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - opticalconfigUuid_ = s; + config_ = s; return s; } } /** - * string opticalconfig_uuid = 1; - * @return The bytes for opticalconfigUuid. + * string config = 2; + * @return The bytes for config. */ @java.lang.Override - public com.google.protobuf.ByteString getOpticalconfigUuidBytes() { - java.lang.Object ref = opticalconfigUuid_; + public com.google.protobuf.ByteString getConfigBytes() { + java.lang.Object ref = config_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - opticalconfigUuid_ = b; + config_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + public static final int DEVICE_ID_FIELD_NUMBER = 3; + + private context.ContextOuterClass.DeviceId deviceId_; + + /** + * .context.DeviceId device_id = 3; + * @return Whether the deviceId field is set. + */ + @java.lang.Override + public boolean hasDeviceId() { + return deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 3; + * @return The deviceId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceId() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + + /** + * .context.DeviceId device_id = 3; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -69444,8 +73225,14 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opticalconfigUuid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, opticalconfigUuid_); + if (opticalconfigId_ != null) { + output.writeMessage(1, getOpticalconfigId()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, config_); + } + if (deviceId_ != null) { + output.writeMessage(3, getDeviceId()); } getUnknownFields().writeTo(output); } @@ -69456,8 +73243,14 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opticalconfigUuid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, opticalconfigUuid_); + if (opticalconfigId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpticalconfigId()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, config_); + } + if (deviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDeviceId()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -69469,12 +73262,24 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.OpticalConfigId)) { + if (!(obj instanceof context.ContextOuterClass.OpticalConfig)) { return super.equals(obj); } - context.ContextOuterClass.OpticalConfigId other = (context.ContextOuterClass.OpticalConfigId) obj; - if (!getOpticalconfigUuid().equals(other.getOpticalconfigUuid())) + context.ContextOuterClass.OpticalConfig other = (context.ContextOuterClass.OpticalConfig) obj; + if (hasOpticalconfigId() != other.hasOpticalconfigId()) + return false; + if (hasOpticalconfigId()) { + if (!getOpticalconfigId().equals(other.getOpticalconfigId())) + return false; + } + if (!getConfig().equals(other.getConfig())) + return false; + if (hasDeviceId() != other.hasDeviceId()) return false; + if (hasDeviceId()) { + if (!getDeviceId().equals(other.getDeviceId())) + return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -69487,58 +73292,66 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + OPTICALCONFIG_UUID_FIELD_NUMBER; - hash = (53 * hash) + getOpticalconfigUuid().hashCode(); + if (hasOpticalconfigId()) { + hash = (37 * hash) + OPTICALCONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigId().hashCode(); + } + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + if (hasDeviceId()) { + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.OpticalConfigId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfig parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfigId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -69551,7 +73364,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.OpticalConfigId prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -69565,27 +73378,23 @@ public final class ContextOuterClass { Builder builder = new Builder(parent); return builder; } - - /** - *
-         * ---------------- Experimental ------------------------
-         * 
- * - * Protobuf type {@code context.OpticalConfigId} + + /** + * Protobuf type {@code context.OpticalConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigId) - context.ContextOuterClass.OpticalConfigIdOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfig) + context.ContextOuterClass.OpticalConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalConfigId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigId.class, context.ContextOuterClass.OpticalConfigId.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfig.class, context.ContextOuterClass.OpticalConfig.Builder.class); } - // Construct using context.ContextOuterClass.OpticalConfigId.newBuilder() + // Construct using context.ContextOuterClass.OpticalConfig.newBuilder() private Builder() { } @@ -69597,23 +73406,33 @@ public final class ContextOuterClass { public Builder clear() { super.clear(); bitField0_ = 0; - opticalconfigUuid_ = ""; + opticalconfigId_ = null; + if (opticalconfigIdBuilder_ != null) { + opticalconfigIdBuilder_.dispose(); + opticalconfigIdBuilder_ = null; + } + config_ = ""; + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); + deviceIdBuilder_ = null; + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; } @java.lang.Override - public context.ContextOuterClass.OpticalConfigId getDefaultInstanceForType() { - return context.ContextOuterClass.OpticalConfigId.getDefaultInstance(); + public context.ContextOuterClass.OpticalConfig getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfig.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.OpticalConfigId build() { - context.ContextOuterClass.OpticalConfigId result = buildPartial(); + public context.ContextOuterClass.OpticalConfig build() { + context.ContextOuterClass.OpticalConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -69621,8 +73440,8 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.OpticalConfigId buildPartial() { - context.ContextOuterClass.OpticalConfigId result = new context.ContextOuterClass.OpticalConfigId(this); + public context.ContextOuterClass.OpticalConfig buildPartial() { + context.ContextOuterClass.OpticalConfig result = new context.ContextOuterClass.OpticalConfig(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -69630,31 +73449,43 @@ public final class ContextOuterClass { return result; } - private void buildPartial0(context.ContextOuterClass.OpticalConfigId result) { + private void buildPartial0(context.ContextOuterClass.OpticalConfig result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.opticalconfigUuid_ = opticalconfigUuid_; + result.opticalconfigId_ = opticalconfigIdBuilder_ == null ? opticalconfigId_ : opticalconfigIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.config_ = config_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deviceId_ = deviceIdBuilder_ == null ? deviceId_ : deviceIdBuilder_.build(); } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.OpticalConfigId) { - return mergeFrom((context.ContextOuterClass.OpticalConfigId) other); + if (other instanceof context.ContextOuterClass.OpticalConfig) { + return mergeFrom((context.ContextOuterClass.OpticalConfig) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.OpticalConfigId other) { - if (other == context.ContextOuterClass.OpticalConfigId.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalConfig other) { + if (other == context.ContextOuterClass.OpticalConfig.getDefaultInstance()) return this; - if (!other.getOpticalconfigUuid().isEmpty()) { - opticalconfigUuid_ = other.opticalconfigUuid_; - bitField0_ |= 0x00000001; + if (other.hasOpticalconfigId()) { + mergeOpticalconfigId(other.getOpticalconfigId()); + } + if (!other.getConfig().isEmpty()) { + config_ = other.config_; + bitField0_ |= 0x00000002; onChanged(); } + if (other.hasDeviceId()) { + mergeDeviceId(other.getDeviceId()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -69680,11 +73511,25 @@ public final class ContextOuterClass { break; case 10: { - opticalconfigUuid_ = input.readStringRequireUtf8(); + input.readMessage(getOpticalconfigIdFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 + case 18: + { + config_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + input.readMessage(getDeviceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } + // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -69708,18 +73553,136 @@ public final class ContextOuterClass { private int bitField0_; - private java.lang.Object opticalconfigUuid_ = ""; + private context.ContextOuterClass.OpticalConfigId opticalconfigId_; + + private com.google.protobuf.SingleFieldBuilderV3 opticalconfigIdBuilder_; /** - * string opticalconfig_uuid = 1; - * @return The opticalconfigUuid. + * .context.OpticalConfigId opticalconfig_id = 1; + * @return Whether the opticalconfigId field is set. */ - public java.lang.String getOpticalconfigUuid() { - java.lang.Object ref = opticalconfigUuid_; + public boolean hasOpticalconfigId() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return The opticalconfigId. + */ + public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { + if (opticalconfigIdBuilder_ == null) { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } else { + return opticalconfigIdBuilder_.getMessage(); + } + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { + if (opticalconfigIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + opticalconfigId_ = value; + } else { + opticalconfigIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId.Builder builderForValue) { + if (opticalconfigIdBuilder_ == null) { + opticalconfigId_ = builderForValue.build(); + } else { + opticalconfigIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder mergeOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { + if (opticalconfigIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && opticalconfigId_ != null && opticalconfigId_ != context.ContextOuterClass.OpticalConfigId.getDefaultInstance()) { + getOpticalconfigIdBuilder().mergeFrom(value); + } else { + opticalconfigId_ = value; + } + } else { + opticalconfigIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder clearOpticalconfigId() { + bitField0_ = (bitField0_ & ~0x00000001); + opticalconfigId_ = null; + if (opticalconfigIdBuilder_ != null) { + opticalconfigIdBuilder_.dispose(); + opticalconfigIdBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public context.ContextOuterClass.OpticalConfigId.Builder getOpticalconfigIdBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOpticalconfigIdFieldBuilder().getBuilder(); + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { + if (opticalconfigIdBuilder_ != null) { + return opticalconfigIdBuilder_.getMessageOrBuilder(); + } else { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getOpticalconfigIdFieldBuilder() { + if (opticalconfigIdBuilder_ == null) { + opticalconfigIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalconfigId(), getParentForChildren(), isClean()); + opticalconfigId_ = null; + } + return opticalconfigIdBuilder_; + } + + private java.lang.Object config_ = ""; + + /** + * string config = 2; + * @return The config. + */ + public java.lang.String getConfig() { + java.lang.Object ref = config_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - opticalconfigUuid_ = s; + config_ = s; return s; } else { return (java.lang.String) ref; @@ -69727,14 +73690,14 @@ public final class ContextOuterClass { } /** - * string opticalconfig_uuid = 1; - * @return The bytes for opticalconfigUuid. + * string config = 2; + * @return The bytes for config. */ - public com.google.protobuf.ByteString getOpticalconfigUuidBytes() { - java.lang.Object ref = opticalconfigUuid_; + public com.google.protobuf.ByteString getConfigBytes() { + java.lang.Object ref = config_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - opticalconfigUuid_ = b; + config_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -69742,47 +73705,165 @@ public final class ContextOuterClass { } /** - * string opticalconfig_uuid = 1; - * @param value The opticalconfigUuid to set. + * string config = 2; + * @param value The config to set. * @return This builder for chaining. */ - public Builder setOpticalconfigUuid(java.lang.String value) { + public Builder setConfig(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - opticalconfigUuid_ = value; - bitField0_ |= 0x00000001; + config_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * string opticalconfig_uuid = 1; + * string config = 2; * @return This builder for chaining. */ - public Builder clearOpticalconfigUuid() { - opticalconfigUuid_ = getDefaultInstance().getOpticalconfigUuid(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder clearConfig() { + config_ = getDefaultInstance().getConfig(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** - * string opticalconfig_uuid = 1; - * @param value The bytes for opticalconfigUuid to set. + * string config = 2; + * @param value The bytes for config to set. * @return This builder for chaining. */ - public Builder setOpticalconfigUuidBytes(com.google.protobuf.ByteString value) { + public Builder setConfigBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - opticalconfigUuid_ = value; - bitField0_ |= 0x00000001; + config_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private context.ContextOuterClass.DeviceId deviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceIdBuilder_; + + /** + * .context.DeviceId device_id = 3; + * @return Whether the deviceId field is set. + */ + public boolean hasDeviceId() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * .context.DeviceId device_id = 3; + * @return The deviceId. + */ + public context.ContextOuterClass.DeviceId getDeviceId() { + if (deviceIdBuilder_ == null) { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } else { + return deviceIdBuilder_.getMessage(); + } + } + + /** + * .context.DeviceId device_id = 3; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceId_ = value; + } else { + deviceIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * .context.DeviceId device_id = 3; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdBuilder_ == null) { + deviceId_ = builderForValue.build(); + } else { + deviceIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * .context.DeviceId device_id = 3; + */ + public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && deviceId_ != null && deviceId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) { + getDeviceIdBuilder().mergeFrom(value); + } else { + deviceId_ = value; + } + } else { + deviceIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; onChanged(); return this; } + /** + * .context.DeviceId device_id = 3; + */ + public Builder clearDeviceId() { + bitField0_ = (bitField0_ & ~0x00000004); + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); + deviceIdBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * .context.DeviceId device_id = 3; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDeviceIdFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceId device_id = 3; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + if (deviceIdBuilder_ != null) { + return deviceIdBuilder_.getMessageOrBuilder(); + } else { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + } + + /** + * .context.DeviceId device_id = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdFieldBuilder() { + if (deviceIdBuilder_ == null) { + deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceId(), getParentForChildren(), isClean()); + deviceId_ = null; + } + return deviceIdBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -69792,24 +73873,24 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.OpticalConfigId) + // @@protoc_insertion_point(builder_scope:context.OpticalConfig) } - // @@protoc_insertion_point(class_scope:context.OpticalConfigId) - private static final context.ContextOuterClass.OpticalConfigId DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalConfig) + private static final context.ContextOuterClass.OpticalConfig DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigId(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfig(); } - public static context.ContextOuterClass.OpticalConfigId getDefaultInstance() { + public static context.ContextOuterClass.OpticalConfig getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public OpticalConfigId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public OpticalConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); @@ -69824,152 +73905,125 @@ public final class ContextOuterClass { } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.OpticalConfigId getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OpticalConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfig) + public interface OpticalConfigListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigList) com.google.protobuf.MessageOrBuilder { /** - * .context.OpticalConfigId opticalconfig_id = 1; - * @return Whether the opticalconfigId field is set. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - boolean hasOpticalconfigId(); + java.util.List getOpticalconfigsList(); /** - * .context.OpticalConfigId opticalconfig_id = 1; - * @return The opticalconfigId. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - context.ContextOuterClass.OpticalConfigId getOpticalconfigId(); + context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index); /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder(); + int getOpticalconfigsCount(); /** - * string config = 2; - * @return The config. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - java.lang.String getConfig(); + java.util.List getOpticalconfigsOrBuilderList(); /** - * string config = 2; - * @return The bytes for config. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - com.google.protobuf.ByteString getConfigBytes(); + context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index); } /** - * Protobuf type {@code context.OpticalConfig} + * Protobuf type {@code context.OpticalConfigList} */ - public static final class OpticalConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfig) - OpticalConfigOrBuilder { + public static final class OpticalConfigList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigList) + OpticalConfigListOrBuilder { private static final long serialVersionUID = 0L; - // Use OpticalConfig.newBuilder() to construct. - private OpticalConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalConfigList.newBuilder() to construct. + private OpticalConfigList(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OpticalConfig() { - config_ = ""; + private OpticalConfigList() { + opticalconfigs_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OpticalConfig(); + return new OpticalConfigList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfig.class, context.ContextOuterClass.OpticalConfig.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfigList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigList.class, context.ContextOuterClass.OpticalConfigList.Builder.class); } - public static final int OPTICALCONFIG_ID_FIELD_NUMBER = 1; + public static final int OPTICALCONFIGS_FIELD_NUMBER = 1; - private context.ContextOuterClass.OpticalConfigId opticalconfigId_; + @SuppressWarnings("serial") + private java.util.List opticalconfigs_; /** - * .context.OpticalConfigId opticalconfig_id = 1; - * @return Whether the opticalconfigId field is set. + * repeated .context.OpticalConfig opticalconfigs = 1; */ @java.lang.Override - public boolean hasOpticalconfigId() { - return opticalconfigId_ != null; + public java.util.List getOpticalconfigsList() { + return opticalconfigs_; } /** - * .context.OpticalConfigId opticalconfig_id = 1; - * @return The opticalconfigId. + * repeated .context.OpticalConfig opticalconfigs = 1; */ @java.lang.Override - public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { - return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + public java.util.List getOpticalconfigsOrBuilderList() { + return opticalconfigs_; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ @java.lang.Override - public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { - return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + public int getOpticalconfigsCount() { + return opticalconfigs_.size(); } - public static final int CONFIG_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object config_ = ""; - /** - * string config = 2; - * @return The config. + * repeated .context.OpticalConfig opticalconfigs = 1; */ @java.lang.Override - public java.lang.String getConfig() { - java.lang.Object ref = config_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - config_ = s; - return s; - } + public context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index) { + return opticalconfigs_.get(index); } /** - * string config = 2; - * @return The bytes for config. + * repeated .context.OpticalConfig opticalconfigs = 1; */ @java.lang.Override - public com.google.protobuf.ByteString getConfigBytes() { - java.lang.Object ref = config_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - config_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index) { + return opticalconfigs_.get(index); } private byte memoizedIsInitialized = -1; @@ -69987,11 +74041,8 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (opticalconfigId_ != null) { - output.writeMessage(1, getOpticalconfigId()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, config_); + for (int i = 0; i < opticalconfigs_.size(); i++) { + output.writeMessage(1, opticalconfigs_.get(i)); } getUnknownFields().writeTo(output); } @@ -70002,11 +74053,8 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (opticalconfigId_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpticalconfigId()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, config_); + for (int i = 0; i < opticalconfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, opticalconfigs_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -70018,17 +74066,11 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.OpticalConfig)) { + if (!(obj instanceof context.ContextOuterClass.OpticalConfigList)) { return super.equals(obj); } - context.ContextOuterClass.OpticalConfig other = (context.ContextOuterClass.OpticalConfig) obj; - if (hasOpticalconfigId() != other.hasOpticalconfigId()) - return false; - if (hasOpticalconfigId()) { - if (!getOpticalconfigId().equals(other.getOpticalconfigId())) - return false; - } - if (!getConfig().equals(other.getConfig())) + context.ContextOuterClass.OpticalConfigList other = (context.ContextOuterClass.OpticalConfigList) obj; + if (!getOpticalconfigsList().equals(other.getOpticalconfigsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -70042,62 +74084,60 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOpticalconfigId()) { - hash = (37 * hash) + OPTICALCONFIG_ID_FIELD_NUMBER; - hash = (53 * hash) + getOpticalconfigId().hashCode(); + if (getOpticalconfigsCount() > 0) { + hash = (37 * hash) + OPTICALCONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigsList().hashCode(); } - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.OpticalConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfig parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -70110,7 +74150,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.OpticalConfig prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalConfigList prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -70126,21 +74166,21 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.OpticalConfig} + * Protobuf type {@code context.OpticalConfigList} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfig) - context.ContextOuterClass.OpticalConfigOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigList) + context.ContextOuterClass.OpticalConfigListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfig.class, context.ContextOuterClass.OpticalConfig.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfigList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigList.class, context.ContextOuterClass.OpticalConfigList.Builder.class); } - // Construct using context.ContextOuterClass.OpticalConfig.newBuilder() + // Construct using context.ContextOuterClass.OpticalConfigList.newBuilder() private Builder() { } @@ -70152,28 +74192,29 @@ public final class ContextOuterClass { public Builder clear() { super.clear(); bitField0_ = 0; - opticalconfigId_ = null; - if (opticalconfigIdBuilder_ != null) { - opticalconfigIdBuilder_.dispose(); - opticalconfigIdBuilder_ = null; + if (opticalconfigsBuilder_ == null) { + opticalconfigs_ = java.util.Collections.emptyList(); + } else { + opticalconfigs_ = null; + opticalconfigsBuilder_.clear(); } - config_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; } @java.lang.Override - public context.ContextOuterClass.OpticalConfig getDefaultInstanceForType() { - return context.ContextOuterClass.OpticalConfig.getDefaultInstance(); + public context.ContextOuterClass.OpticalConfigList getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfigList.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.OpticalConfig build() { - context.ContextOuterClass.OpticalConfig result = buildPartial(); + public context.ContextOuterClass.OpticalConfigList build() { + context.ContextOuterClass.OpticalConfigList result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -70181,8 +74222,9 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.OpticalConfig buildPartial() { - context.ContextOuterClass.OpticalConfig result = new context.ContextOuterClass.OpticalConfig(this); + public context.ContextOuterClass.OpticalConfigList buildPartial() { + context.ContextOuterClass.OpticalConfigList result = new context.ContextOuterClass.OpticalConfigList(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -70190,36 +74232,58 @@ public final class ContextOuterClass { return result; } - private void buildPartial0(context.ContextOuterClass.OpticalConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.opticalconfigId_ = opticalconfigIdBuilder_ == null ? opticalconfigId_ : opticalconfigIdBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.config_ = config_; + private void buildPartialRepeatedFields(context.ContextOuterClass.OpticalConfigList result) { + if (opticalconfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + opticalconfigs_ = java.util.Collections.unmodifiableList(opticalconfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.opticalconfigs_ = opticalconfigs_; + } else { + result.opticalconfigs_ = opticalconfigsBuilder_.build(); } } + private void buildPartial0(context.ContextOuterClass.OpticalConfigList result) { + int from_bitField0_ = bitField0_; + } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.OpticalConfig) { - return mergeFrom((context.ContextOuterClass.OpticalConfig) other); + if (other instanceof context.ContextOuterClass.OpticalConfigList) { + return mergeFrom((context.ContextOuterClass.OpticalConfigList) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.OpticalConfig other) { - if (other == context.ContextOuterClass.OpticalConfig.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalConfigList other) { + if (other == context.ContextOuterClass.OpticalConfigList.getDefaultInstance()) return this; - if (other.hasOpticalconfigId()) { - mergeOpticalconfigId(other.getOpticalconfigId()); - } - if (!other.getConfig().isEmpty()) { - config_ = other.config_; - bitField0_ |= 0x00000002; - onChanged(); + if (opticalconfigsBuilder_ == null) { + if (!other.opticalconfigs_.isEmpty()) { + if (opticalconfigs_.isEmpty()) { + opticalconfigs_ = other.opticalconfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.addAll(other.opticalconfigs_); + } + onChanged(); + } + } else { + if (!other.opticalconfigs_.isEmpty()) { + if (opticalconfigsBuilder_.isEmpty()) { + opticalconfigsBuilder_.dispose(); + opticalconfigsBuilder_ = null; + opticalconfigs_ = other.opticalconfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + opticalconfigsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOpticalconfigsFieldBuilder() : null; + } else { + opticalconfigsBuilder_.addAllMessages(other.opticalconfigs_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -70246,18 +74310,16 @@ public final class ContextOuterClass { break; case 10: { - input.readMessage(getOpticalconfigIdFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; + context.ContextOuterClass.OpticalConfig m = input.readMessage(context.ContextOuterClass.OpticalConfig.parser(), extensionRegistry); + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(m); + } else { + opticalconfigsBuilder_.addMessage(m); + } break; } // case 10 - case 18: - { - config_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } - // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -70281,197 +74343,241 @@ public final class ContextOuterClass { private int bitField0_; - private context.ContextOuterClass.OpticalConfigId opticalconfigId_; + private java.util.List opticalconfigs_ = java.util.Collections.emptyList(); - private com.google.protobuf.SingleFieldBuilderV3 opticalconfigIdBuilder_; + private void ensureOpticalconfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + opticalconfigs_ = new java.util.ArrayList(opticalconfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 opticalconfigsBuilder_; /** - * .context.OpticalConfigId opticalconfig_id = 1; - * @return Whether the opticalconfigId field is set. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public boolean hasOpticalconfigId() { - return ((bitField0_ & 0x00000001) != 0); + public java.util.List getOpticalconfigsList() { + if (opticalconfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(opticalconfigs_); + } else { + return opticalconfigsBuilder_.getMessageList(); + } } /** - * .context.OpticalConfigId opticalconfig_id = 1; - * @return The opticalconfigId. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { - if (opticalconfigIdBuilder_ == null) { - return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + public int getOpticalconfigsCount() { + if (opticalconfigsBuilder_ == null) { + return opticalconfigs_.size(); } else { - return opticalconfigIdBuilder_.getMessage(); + return opticalconfigsBuilder_.getCount(); } } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { - if (opticalconfigIdBuilder_ == null) { + public context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index) { + if (opticalconfigsBuilder_ == null) { + return opticalconfigs_.get(index); + } else { + return opticalconfigsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder setOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig value) { + if (opticalconfigsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - opticalconfigId_ = value; + ensureOpticalconfigsIsMutable(); + opticalconfigs_.set(index, value); + onChanged(); } else { - opticalconfigIdBuilder_.setMessage(value); + opticalconfigsBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000001; - onChanged(); return this; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId.Builder builderForValue) { - if (opticalconfigIdBuilder_ == null) { - opticalconfigId_ = builderForValue.build(); + public Builder setOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig.Builder builderForValue) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.set(index, builderForValue.build()); + onChanged(); } else { - opticalconfigIdBuilder_.setMessage(builderForValue.build()); + opticalconfigsBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000001; - onChanged(); return this; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder mergeOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { - if (opticalconfigIdBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && opticalconfigId_ != null && opticalconfigId_ != context.ContextOuterClass.OpticalConfigId.getDefaultInstance()) { - getOpticalconfigIdBuilder().mergeFrom(value); - } else { - opticalconfigId_ = value; + public Builder addOpticalconfigs(context.ContextOuterClass.OpticalConfig value) { + if (opticalconfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(value); + onChanged(); } else { - opticalconfigIdBuilder_.mergeFrom(value); + opticalconfigsBuilder_.addMessage(value); } - bitField0_ |= 0x00000001; - onChanged(); return this; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder clearOpticalconfigId() { - bitField0_ = (bitField0_ & ~0x00000001); - opticalconfigId_ = null; - if (opticalconfigIdBuilder_ != null) { - opticalconfigIdBuilder_.dispose(); - opticalconfigIdBuilder_ = null; + public Builder addOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig value) { + if (opticalconfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(index, value); + onChanged(); + } else { + opticalconfigsBuilder_.addMessage(index, value); } - onChanged(); return this; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public context.ContextOuterClass.OpticalConfigId.Builder getOpticalconfigIdBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getOpticalconfigIdFieldBuilder().getBuilder(); + public Builder addOpticalconfigs(context.ContextOuterClass.OpticalConfig.Builder builderForValue) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(builderForValue.build()); + onChanged(); + } else { + opticalconfigsBuilder_.addMessage(builderForValue.build()); + } + return this; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { - if (opticalconfigIdBuilder_ != null) { - return opticalconfigIdBuilder_.getMessageOrBuilder(); + public Builder addOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig.Builder builderForValue) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(index, builderForValue.build()); + onChanged(); } else { - return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + opticalconfigsBuilder_.addMessage(index, builderForValue.build()); } + return this; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - private com.google.protobuf.SingleFieldBuilderV3 getOpticalconfigIdFieldBuilder() { - if (opticalconfigIdBuilder_ == null) { - opticalconfigIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalconfigId(), getParentForChildren(), isClean()); - opticalconfigId_ = null; + public Builder addAllOpticalconfigs(java.lang.Iterable values) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, opticalconfigs_); + onChanged(); + } else { + opticalconfigsBuilder_.addAllMessages(values); } - return opticalconfigIdBuilder_; + return this; } - private java.lang.Object config_ = ""; + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder clearOpticalconfigs() { + if (opticalconfigsBuilder_ == null) { + opticalconfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + opticalconfigsBuilder_.clear(); + } + return this; + } /** - * string config = 2; - * @return The config. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public java.lang.String getConfig() { - java.lang.Object ref = config_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - config_ = s; - return s; + public Builder removeOpticalconfigs(int index) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.remove(index); + onChanged(); } else { - return (java.lang.String) ref; + opticalconfigsBuilder_.remove(index); } + return this; } /** - * string config = 2; - * @return The bytes for config. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public com.google.protobuf.ByteString getConfigBytes() { - java.lang.Object ref = config_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - config_ = b; - return b; + public context.ContextOuterClass.OpticalConfig.Builder getOpticalconfigsBuilder(int index) { + return getOpticalconfigsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index) { + if (opticalconfigsBuilder_ == null) { + return opticalconfigs_.get(index); } else { - return (com.google.protobuf.ByteString) ref; + return opticalconfigsBuilder_.getMessageOrBuilder(index); } } /** - * string config = 2; - * @param value The config to set. - * @return This builder for chaining. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder setConfig(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List getOpticalconfigsOrBuilderList() { + if (opticalconfigsBuilder_ != null) { + return opticalconfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(opticalconfigs_); } - config_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; } /** - * string config = 2; - * @return This builder for chaining. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder clearConfig() { - config_ = getDefaultInstance().getConfig(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + public context.ContextOuterClass.OpticalConfig.Builder addOpticalconfigsBuilder() { + return getOpticalconfigsFieldBuilder().addBuilder(context.ContextOuterClass.OpticalConfig.getDefaultInstance()); } /** - * string config = 2; - * @param value The bytes for config to set. - * @return This builder for chaining. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder setConfigBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public context.ContextOuterClass.OpticalConfig.Builder addOpticalconfigsBuilder(int index) { + return getOpticalconfigsFieldBuilder().addBuilder(index, context.ContextOuterClass.OpticalConfig.getDefaultInstance()); + } + + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public java.util.List getOpticalconfigsBuilderList() { + return getOpticalconfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getOpticalconfigsFieldBuilder() { + if (opticalconfigsBuilder_ == null) { + opticalconfigsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(opticalconfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + opticalconfigs_ = null; } - checkByteStringIsUtf8(value); - config_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + return opticalconfigsBuilder_; } @java.lang.Override @@ -70483,24 +74589,24 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.OpticalConfig) + // @@protoc_insertion_point(builder_scope:context.OpticalConfigList) } - // @@protoc_insertion_point(class_scope:context.OpticalConfig) - private static final context.ContextOuterClass.OpticalConfig DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalConfigList) + private static final context.ContextOuterClass.OpticalConfigList DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfig(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigList(); } - public static context.ContextOuterClass.OpticalConfig getDefaultInstance() { + public static context.ContextOuterClass.OpticalConfigList getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public OpticalConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public OpticalConfigList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); @@ -70515,125 +74621,148 @@ public final class ContextOuterClass { } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.OpticalConfig getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalConfigList getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OpticalConfigListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigList) + public interface OpticalConfigEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigEvent) com.google.protobuf.MessageOrBuilder { /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; + * @return Whether the event field is set. */ - java.util.List getOpticalconfigsList(); + boolean hasEvent(); /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; + * @return The event. */ - context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index); + context.ContextOuterClass.Event getEvent(); /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - int getOpticalconfigsCount(); + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; + * @return Whether the opticalconfigId field is set. */ - java.util.List getOpticalconfigsOrBuilderList(); + boolean hasOpticalconfigId(); /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; + * @return The opticalconfigId. */ - context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index); + context.ContextOuterClass.OpticalConfigId getOpticalconfigId(); + + /** + * .context.OpticalConfigId opticalconfig_id = 2; + */ + context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder(); } /** - * Protobuf type {@code context.OpticalConfigList} + * Protobuf type {@code context.OpticalConfigEvent} */ - public static final class OpticalConfigList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigList) - OpticalConfigListOrBuilder { + public static final class OpticalConfigEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigEvent) + OpticalConfigEventOrBuilder { private static final long serialVersionUID = 0L; - // Use OpticalConfigList.newBuilder() to construct. - private OpticalConfigList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalConfigEvent.newBuilder() to construct. + private OpticalConfigEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OpticalConfigList() { - opticalconfigs_ = java.util.Collections.emptyList(); + private OpticalConfigEvent() { } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OpticalConfigList(); + return new OpticalConfigEvent(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigEvent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalConfigList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigList.class, context.ContextOuterClass.OpticalConfigList.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfigEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigEvent.class, context.ContextOuterClass.OpticalConfigEvent.Builder.class); } - public static final int OPTICALCONFIGS_FIELD_NUMBER = 1; + public static final int EVENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List opticalconfigs_; + private context.ContextOuterClass.Event event_; /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; + * @return Whether the event field is set. */ @java.lang.Override - public java.util.List getOpticalconfigsList() { - return opticalconfigs_; + public boolean hasEvent() { + return event_ != null; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; + * @return The event. */ @java.lang.Override - public java.util.List getOpticalconfigsOrBuilderList() { - return opticalconfigs_; + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ @java.lang.Override - public int getOpticalconfigsCount() { - return opticalconfigs_.size(); + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } + public static final int OPTICALCONFIG_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.OpticalConfigId opticalconfigId_; + /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; + * @return Whether the opticalconfigId field is set. */ @java.lang.Override - public context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index) { - return opticalconfigs_.get(index); + public boolean hasOpticalconfigId() { + return opticalconfigId_ != null; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; + * @return The opticalconfigId. */ @java.lang.Override - public context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index) { - return opticalconfigs_.get(index); + public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } + + /** + * .context.OpticalConfigId opticalconfig_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; } private byte memoizedIsInitialized = -1; @@ -70651,8 +74780,11 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < opticalconfigs_.size(); i++) { - output.writeMessage(1, opticalconfigs_.get(i)); + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (opticalconfigId_ != null) { + output.writeMessage(2, getOpticalconfigId()); } getUnknownFields().writeTo(output); } @@ -70663,8 +74795,11 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - for (int i = 0; i < opticalconfigs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, opticalconfigs_.get(i)); + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (opticalconfigId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOpticalconfigId()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -70676,12 +74811,22 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.OpticalConfigList)) { + if (!(obj instanceof context.ContextOuterClass.OpticalConfigEvent)) { return super.equals(obj); } - context.ContextOuterClass.OpticalConfigList other = (context.ContextOuterClass.OpticalConfigList) obj; - if (!getOpticalconfigsList().equals(other.getOpticalconfigsList())) + context.ContextOuterClass.OpticalConfigEvent other = (context.ContextOuterClass.OpticalConfigEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasOpticalconfigId() != other.hasOpticalconfigId()) return false; + if (hasOpticalconfigId()) { + if (!getOpticalconfigId().equals(other.getOpticalconfigId())) + return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -70694,60 +74839,64 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getOpticalconfigsCount() > 0) { - hash = (37 * hash) + OPTICALCONFIGS_FIELD_NUMBER; - hash = (53 * hash) + getOpticalconfigsList().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasOpticalconfigId()) { + hash = (37 * hash) + OPTICALCONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigId().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.OpticalConfigList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfigList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -70760,7 +74909,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.OpticalConfigList prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalConfigEvent prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -70776,21 +74925,21 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.OpticalConfigList} + * Protobuf type {@code context.OpticalConfigEvent} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigList) - context.ContextOuterClass.OpticalConfigListOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigEvent) + context.ContextOuterClass.OpticalConfigEventOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigEvent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalConfigList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigList.class, context.ContextOuterClass.OpticalConfigList.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfigEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigEvent.class, context.ContextOuterClass.OpticalConfigEvent.Builder.class); } - // Construct using context.ContextOuterClass.OpticalConfigList.newBuilder() + // Construct using context.ContextOuterClass.OpticalConfigEvent.newBuilder() private Builder() { } @@ -70802,29 +74951,32 @@ public final class ContextOuterClass { public Builder clear() { super.clear(); bitField0_ = 0; - if (opticalconfigsBuilder_ == null) { - opticalconfigs_ = java.util.Collections.emptyList(); - } else { - opticalconfigs_ = null; - opticalconfigsBuilder_.clear(); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); + eventBuilder_ = null; + } + opticalconfigId_ = null; + if (opticalconfigIdBuilder_ != null) { + opticalconfigIdBuilder_.dispose(); + opticalconfigIdBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigEvent_descriptor; } @java.lang.Override - public context.ContextOuterClass.OpticalConfigList getDefaultInstanceForType() { - return context.ContextOuterClass.OpticalConfigList.getDefaultInstance(); + public context.ContextOuterClass.OpticalConfigEvent getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfigEvent.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.OpticalConfigList build() { - context.ContextOuterClass.OpticalConfigList result = buildPartial(); + public context.ContextOuterClass.OpticalConfigEvent build() { + context.ContextOuterClass.OpticalConfigEvent result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -70832,9 +74984,8 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.OpticalConfigList buildPartial() { - context.ContextOuterClass.OpticalConfigList result = new context.ContextOuterClass.OpticalConfigList(this); - buildPartialRepeatedFields(result); + public context.ContextOuterClass.OpticalConfigEvent buildPartial() { + context.ContextOuterClass.OpticalConfigEvent result = new context.ContextOuterClass.OpticalConfigEvent(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -70842,58 +74993,34 @@ public final class ContextOuterClass { return result; } - private void buildPartialRepeatedFields(context.ContextOuterClass.OpticalConfigList result) { - if (opticalconfigsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - opticalconfigs_ = java.util.Collections.unmodifiableList(opticalconfigs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.opticalconfigs_ = opticalconfigs_; - } else { - result.opticalconfigs_ = opticalconfigsBuilder_.build(); - } - } - - private void buildPartial0(context.ContextOuterClass.OpticalConfigList result) { + private void buildPartial0(context.ContextOuterClass.OpticalConfigEvent result) { int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.opticalconfigId_ = opticalconfigIdBuilder_ == null ? opticalconfigId_ : opticalconfigIdBuilder_.build(); + } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.OpticalConfigList) { - return mergeFrom((context.ContextOuterClass.OpticalConfigList) other); + if (other instanceof context.ContextOuterClass.OpticalConfigEvent) { + return mergeFrom((context.ContextOuterClass.OpticalConfigEvent) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.OpticalConfigList other) { - if (other == context.ContextOuterClass.OpticalConfigList.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalConfigEvent other) { + if (other == context.ContextOuterClass.OpticalConfigEvent.getDefaultInstance()) return this; - if (opticalconfigsBuilder_ == null) { - if (!other.opticalconfigs_.isEmpty()) { - if (opticalconfigs_.isEmpty()) { - opticalconfigs_ = other.opticalconfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOpticalconfigsIsMutable(); - opticalconfigs_.addAll(other.opticalconfigs_); - } - onChanged(); - } - } else { - if (!other.opticalconfigs_.isEmpty()) { - if (opticalconfigsBuilder_.isEmpty()) { - opticalconfigsBuilder_.dispose(); - opticalconfigsBuilder_ = null; - opticalconfigs_ = other.opticalconfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - opticalconfigsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOpticalconfigsFieldBuilder() : null; - } else { - opticalconfigsBuilder_.addAllMessages(other.opticalconfigs_); - } - } + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasOpticalconfigId()) { + mergeOpticalconfigId(other.getOpticalconfigId()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -70920,16 +75047,18 @@ public final class ContextOuterClass { break; case 10: { - context.ContextOuterClass.OpticalConfig m = input.readMessage(context.ContextOuterClass.OpticalConfig.parser(), extensionRegistry); - if (opticalconfigsBuilder_ == null) { - ensureOpticalconfigsIsMutable(); - opticalconfigs_.add(m); - } else { - opticalconfigsBuilder_.addMessage(m); - } + input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; break; } // case 10 + case 18: + { + input.readMessage(getOpticalconfigIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -70953,241 +75082,240 @@ public final class ContextOuterClass { private int bitField0_; - private java.util.List opticalconfigs_ = java.util.Collections.emptyList(); - - private void ensureOpticalconfigsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - opticalconfigs_ = new java.util.ArrayList(opticalconfigs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3 opticalconfigsBuilder_; + private context.ContextOuterClass.Event event_; - /** - * repeated .context.OpticalConfig opticalconfigs = 1; - */ - public java.util.List getOpticalconfigsList() { - if (opticalconfigsBuilder_ == null) { - return java.util.Collections.unmodifiableList(opticalconfigs_); - } else { - return opticalconfigsBuilder_.getMessageList(); - } - } + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; + * @return Whether the event field is set. */ - public int getOpticalconfigsCount() { - if (opticalconfigsBuilder_ == null) { - return opticalconfigs_.size(); - } else { - return opticalconfigsBuilder_.getCount(); - } + public boolean hasEvent() { + return ((bitField0_ & 0x00000001) != 0); } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; + * @return The event. */ - public context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index) { - if (opticalconfigsBuilder_ == null) { - return opticalconfigs_.get(index); + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } else { - return opticalconfigsBuilder_.getMessage(index); + return eventBuilder_.getMessage(); } } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - public Builder setOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig value) { - if (opticalconfigsBuilder_ == null) { + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureOpticalconfigsIsMutable(); - opticalconfigs_.set(index, value); - onChanged(); + event_ = value; } else { - opticalconfigsBuilder_.setMessage(index, value); + eventBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - public Builder setOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig.Builder builderForValue) { - if (opticalconfigsBuilder_ == null) { - ensureOpticalconfigsIsMutable(); - opticalconfigs_.set(index, builderForValue.build()); - onChanged(); + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); } else { - opticalconfigsBuilder_.setMessage(index, builderForValue.build()); + eventBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - public Builder addOpticalconfigs(context.ContextOuterClass.OpticalConfig value) { - if (opticalconfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); + } else { + event_ = value; } - ensureOpticalconfigsIsMutable(); - opticalconfigs_.add(value); - onChanged(); } else { - opticalconfigsBuilder_.addMessage(value); + eventBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - public Builder addOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig value) { - if (opticalconfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOpticalconfigsIsMutable(); - opticalconfigs_.add(index, value); - onChanged(); - } else { - opticalconfigsBuilder_.addMessage(index, value); + public Builder clearEvent() { + bitField0_ = (bitField0_ & ~0x00000001); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); + eventBuilder_ = null; } + onChanged(); return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - public Builder addOpticalconfigs(context.ContextOuterClass.OpticalConfig.Builder builderForValue) { - if (opticalconfigsBuilder_ == null) { - ensureOpticalconfigsIsMutable(); - opticalconfigs_.add(builderForValue.build()); - onChanged(); - } else { - opticalconfigsBuilder_.addMessage(builderForValue.build()); - } - return this; + public context.ContextOuterClass.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getEventFieldBuilder().getBuilder(); } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - public Builder addOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig.Builder builderForValue) { - if (opticalconfigsBuilder_ == null) { - ensureOpticalconfigsIsMutable(); - opticalconfigs_.add(index, builderForValue.build()); - onChanged(); + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); } else { - opticalconfigsBuilder_.addMessage(index, builderForValue.build()); + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } - return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - public Builder addAllOpticalconfigs(java.lang.Iterable values) { - if (opticalconfigsBuilder_ == null) { - ensureOpticalconfigsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, opticalconfigs_); - onChanged(); - } else { - opticalconfigsBuilder_.addAllMessages(values); + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; } - return this; + return eventBuilder_; } + private context.ContextOuterClass.OpticalConfigId opticalconfigId_; + + private com.google.protobuf.SingleFieldBuilderV3 opticalconfigIdBuilder_; + /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; + * @return Whether the opticalconfigId field is set. */ - public Builder clearOpticalconfigs() { - if (opticalconfigsBuilder_ == null) { - opticalconfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - opticalconfigsBuilder_.clear(); - } - return this; + public boolean hasOpticalconfigId() { + return ((bitField0_ & 0x00000002) != 0); } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; + * @return The opticalconfigId. */ - public Builder removeOpticalconfigs(int index) { - if (opticalconfigsBuilder_ == null) { - ensureOpticalconfigsIsMutable(); - opticalconfigs_.remove(index); - onChanged(); + public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { + if (opticalconfigIdBuilder_ == null) { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; } else { - opticalconfigsBuilder_.remove(index); + return opticalconfigIdBuilder_.getMessage(); } - return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; */ - public context.ContextOuterClass.OpticalConfig.Builder getOpticalconfigsBuilder(int index) { - return getOpticalconfigsFieldBuilder().getBuilder(index); + public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { + if (opticalconfigIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + opticalconfigId_ = value; + } else { + opticalconfigIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; */ - public context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index) { - if (opticalconfigsBuilder_ == null) { - return opticalconfigs_.get(index); + public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId.Builder builderForValue) { + if (opticalconfigIdBuilder_ == null) { + opticalconfigId_ = builderForValue.build(); } else { - return opticalconfigsBuilder_.getMessageOrBuilder(index); + opticalconfigIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); + return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; */ - public java.util.List getOpticalconfigsOrBuilderList() { - if (opticalconfigsBuilder_ != null) { - return opticalconfigsBuilder_.getMessageOrBuilderList(); + public Builder mergeOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { + if (opticalconfigIdBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && opticalconfigId_ != null && opticalconfigId_ != context.ContextOuterClass.OpticalConfigId.getDefaultInstance()) { + getOpticalconfigIdBuilder().mergeFrom(value); + } else { + opticalconfigId_ = value; + } } else { - return java.util.Collections.unmodifiableList(opticalconfigs_); + opticalconfigIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); + return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; */ - public context.ContextOuterClass.OpticalConfig.Builder addOpticalconfigsBuilder() { - return getOpticalconfigsFieldBuilder().addBuilder(context.ContextOuterClass.OpticalConfig.getDefaultInstance()); + public Builder clearOpticalconfigId() { + bitField0_ = (bitField0_ & ~0x00000002); + opticalconfigId_ = null; + if (opticalconfigIdBuilder_ != null) { + opticalconfigIdBuilder_.dispose(); + opticalconfigIdBuilder_ = null; + } + onChanged(); + return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; */ - public context.ContextOuterClass.OpticalConfig.Builder addOpticalconfigsBuilder(int index) { - return getOpticalconfigsFieldBuilder().addBuilder(index, context.ContextOuterClass.OpticalConfig.getDefaultInstance()); + public context.ContextOuterClass.OpticalConfigId.Builder getOpticalconfigIdBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOpticalconfigIdFieldBuilder().getBuilder(); } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; */ - public java.util.List getOpticalconfigsBuilderList() { - return getOpticalconfigsFieldBuilder().getBuilderList(); + public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { + if (opticalconfigIdBuilder_ != null) { + return opticalconfigIdBuilder_.getMessageOrBuilder(); + } else { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } } - private com.google.protobuf.RepeatedFieldBuilderV3 getOpticalconfigsFieldBuilder() { - if (opticalconfigsBuilder_ == null) { - opticalconfigsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(opticalconfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - opticalconfigs_ = null; + /** + * .context.OpticalConfigId opticalconfig_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getOpticalconfigIdFieldBuilder() { + if (opticalconfigIdBuilder_ == null) { + opticalconfigIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalconfigId(), getParentForChildren(), isClean()); + opticalconfigId_ = null; } - return opticalconfigsBuilder_; + return opticalconfigIdBuilder_; } @java.lang.Override @@ -71199,24 +75327,24 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.OpticalConfigList) + // @@protoc_insertion_point(builder_scope:context.OpticalConfigEvent) } - // @@protoc_insertion_point(class_scope:context.OpticalConfigList) - private static final context.ContextOuterClass.OpticalConfigList DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalConfigEvent) + private static final context.ContextOuterClass.OpticalConfigEvent DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigList(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigEvent(); } - public static context.ContextOuterClass.OpticalConfigList getDefaultInstance() { + public static context.ContextOuterClass.OpticalConfigEvent getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public OpticalConfigList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public OpticalConfigEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); @@ -71231,101 +75359,148 @@ public final class ContextOuterClass { } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.OpticalConfigList getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalConfigEvent getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OpticalLinkIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLinkId) + public interface OpticalEndPointIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalEndPointId) com.google.protobuf.MessageOrBuilder { /** - * .context.Uuid optical_link_uuid = 1; - * @return Whether the opticalLinkUuid field is set. + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + boolean hasDeviceId(); + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + context.ContextOuterClass.DeviceId getDeviceId(); + + /** + * .context.DeviceId device_id = 2; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + + /** + * .context.Uuid endpoint_uuid = 3; + * @return Whether the endpointUuid field is set. */ - boolean hasOpticalLinkUuid(); + boolean hasEndpointUuid(); /** - * .context.Uuid optical_link_uuid = 1; - * @return The opticalLinkUuid. + * .context.Uuid endpoint_uuid = 3; + * @return The endpointUuid. */ - context.ContextOuterClass.Uuid getOpticalLinkUuid(); + context.ContextOuterClass.Uuid getEndpointUuid(); /** - * .context.Uuid optical_link_uuid = 1; + * .context.Uuid endpoint_uuid = 3; */ - context.ContextOuterClass.UuidOrBuilder getOpticalLinkUuidOrBuilder(); + context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder(); } /** - * Protobuf type {@code context.OpticalLinkId} + * Protobuf type {@code context.OpticalEndPointId} */ - public static final class OpticalLinkId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLinkId) - OpticalLinkIdOrBuilder { + public static final class OpticalEndPointId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalEndPointId) + OpticalEndPointIdOrBuilder { private static final long serialVersionUID = 0L; - // Use OpticalLinkId.newBuilder() to construct. - private OpticalLinkId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalEndPointId.newBuilder() to construct. + private OpticalEndPointId(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OpticalLinkId() { + private OpticalEndPointId() { } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OpticalLinkId(); + return new OpticalEndPointId(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalLinkId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalEndPointId_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalLinkId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkId.class, context.ContextOuterClass.OpticalLinkId.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalEndPointId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalEndPointId.class, context.ContextOuterClass.OpticalEndPointId.Builder.class); + } + + public static final int DEVICE_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.DeviceId deviceId_; + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + @java.lang.Override + public boolean hasDeviceId() { + return deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceId() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + + /** + * .context.DeviceId device_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; } - public static final int OPTICAL_LINK_UUID_FIELD_NUMBER = 1; + public static final int ENDPOINT_UUID_FIELD_NUMBER = 3; - private context.ContextOuterClass.Uuid opticalLinkUuid_; + private context.ContextOuterClass.Uuid endpointUuid_; /** - * .context.Uuid optical_link_uuid = 1; - * @return Whether the opticalLinkUuid field is set. + * .context.Uuid endpoint_uuid = 3; + * @return Whether the endpointUuid field is set. */ @java.lang.Override - public boolean hasOpticalLinkUuid() { - return opticalLinkUuid_ != null; + public boolean hasEndpointUuid() { + return endpointUuid_ != null; } /** - * .context.Uuid optical_link_uuid = 1; - * @return The opticalLinkUuid. + * .context.Uuid endpoint_uuid = 3; + * @return The endpointUuid. */ @java.lang.Override - public context.ContextOuterClass.Uuid getOpticalLinkUuid() { - return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; + public context.ContextOuterClass.Uuid getEndpointUuid() { + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; } /** - * .context.Uuid optical_link_uuid = 1; + * .context.Uuid endpoint_uuid = 3; */ @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getOpticalLinkUuidOrBuilder() { - return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; + public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() { + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; } private byte memoizedIsInitialized = -1; @@ -71343,8 +75518,11 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (opticalLinkUuid_ != null) { - output.writeMessage(1, getOpticalLinkUuid()); + if (deviceId_ != null) { + output.writeMessage(2, getDeviceId()); + } + if (endpointUuid_ != null) { + output.writeMessage(3, getEndpointUuid()); } getUnknownFields().writeTo(output); } @@ -71355,8 +75533,11 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (opticalLinkUuid_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpticalLinkUuid()); + if (deviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeviceId()); + } + if (endpointUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndpointUuid()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -71368,14 +75549,20 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.OpticalLinkId)) { + if (!(obj instanceof context.ContextOuterClass.OpticalEndPointId)) { return super.equals(obj); } - context.ContextOuterClass.OpticalLinkId other = (context.ContextOuterClass.OpticalLinkId) obj; - if (hasOpticalLinkUuid() != other.hasOpticalLinkUuid()) + context.ContextOuterClass.OpticalEndPointId other = (context.ContextOuterClass.OpticalEndPointId) obj; + if (hasDeviceId() != other.hasDeviceId()) + return false; + if (hasDeviceId()) { + if (!getDeviceId().equals(other.getDeviceId())) + return false; + } + if (hasEndpointUuid() != other.hasEndpointUuid()) return false; - if (hasOpticalLinkUuid()) { - if (!getOpticalLinkUuid().equals(other.getOpticalLinkUuid())) + if (hasEndpointUuid()) { + if (!getEndpointUuid().equals(other.getEndpointUuid())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) @@ -71390,60 +75577,64 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOpticalLinkUuid()) { - hash = (37 * hash) + OPTICAL_LINK_UUID_FIELD_NUMBER; - hash = (53 * hash) + getOpticalLinkUuid().hashCode(); + if (hasDeviceId()) { + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + } + if (hasEndpointUuid()) { + hash = (37 * hash) + ENDPOINT_UUID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUuid().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.OpticalLinkId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalEndPointId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLinkId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalEndPointId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -71456,7 +75647,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.OpticalLinkId prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalEndPointId prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -71472,21 +75663,21 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.OpticalLinkId} + * Protobuf type {@code context.OpticalEndPointId} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLinkId) - context.ContextOuterClass.OpticalLinkIdOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalEndPointId) + context.ContextOuterClass.OpticalEndPointIdOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalLinkId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalEndPointId_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalLinkId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkId.class, context.ContextOuterClass.OpticalLinkId.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalEndPointId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalEndPointId.class, context.ContextOuterClass.OpticalEndPointId.Builder.class); } - // Construct using context.ContextOuterClass.OpticalLinkId.newBuilder() + // Construct using context.ContextOuterClass.OpticalEndPointId.newBuilder() private Builder() { } @@ -71498,27 +75689,32 @@ public final class ContextOuterClass { public Builder clear() { super.clear(); bitField0_ = 0; - opticalLinkUuid_ = null; - if (opticalLinkUuidBuilder_ != null) { - opticalLinkUuidBuilder_.dispose(); - opticalLinkUuidBuilder_ = null; + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); + deviceIdBuilder_ = null; + } + endpointUuid_ = null; + if (endpointUuidBuilder_ != null) { + endpointUuidBuilder_.dispose(); + endpointUuidBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_OpticalLinkId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalEndPointId_descriptor; } @java.lang.Override - public context.ContextOuterClass.OpticalLinkId getDefaultInstanceForType() { - return context.ContextOuterClass.OpticalLinkId.getDefaultInstance(); + public context.ContextOuterClass.OpticalEndPointId getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalEndPointId.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.OpticalLinkId build() { - context.ContextOuterClass.OpticalLinkId result = buildPartial(); + public context.ContextOuterClass.OpticalEndPointId build() { + context.ContextOuterClass.OpticalEndPointId result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -71526,8 +75722,8 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.OpticalLinkId buildPartial() { - context.ContextOuterClass.OpticalLinkId result = new context.ContextOuterClass.OpticalLinkId(this); + public context.ContextOuterClass.OpticalEndPointId buildPartial() { + context.ContextOuterClass.OpticalEndPointId result = new context.ContextOuterClass.OpticalEndPointId(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -71535,28 +75731,34 @@ public final class ContextOuterClass { return result; } - private void buildPartial0(context.ContextOuterClass.OpticalLinkId result) { + private void buildPartial0(context.ContextOuterClass.OpticalEndPointId result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.opticalLinkUuid_ = opticalLinkUuidBuilder_ == null ? opticalLinkUuid_ : opticalLinkUuidBuilder_.build(); + result.deviceId_ = deviceIdBuilder_ == null ? deviceId_ : deviceIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endpointUuid_ = endpointUuidBuilder_ == null ? endpointUuid_ : endpointUuidBuilder_.build(); } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.OpticalLinkId) { - return mergeFrom((context.ContextOuterClass.OpticalLinkId) other); + if (other instanceof context.ContextOuterClass.OpticalEndPointId) { + return mergeFrom((context.ContextOuterClass.OpticalEndPointId) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.OpticalLinkId other) { - if (other == context.ContextOuterClass.OpticalLinkId.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalEndPointId other) { + if (other == context.ContextOuterClass.OpticalEndPointId.getDefaultInstance()) return this; - if (other.hasOpticalLinkUuid()) { - mergeOpticalLinkUuid(other.getOpticalLinkUuid()); + if (other.hasDeviceId()) { + mergeDeviceId(other.getDeviceId()); + } + if (other.hasEndpointUuid()) { + mergeEndpointUuid(other.getEndpointUuid()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -71581,13 +75783,20 @@ public final class ContextOuterClass { case 0: done = true; break; - case 10: + case 18: { - input.readMessage(getOpticalLinkUuidFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(getDeviceIdFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } - // case 10 + // case 18 + case 26: + { + input.readMessage(getEndpointUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -71611,41 +75820,41 @@ public final class ContextOuterClass { private int bitField0_; - private context.ContextOuterClass.Uuid opticalLinkUuid_; + private context.ContextOuterClass.DeviceId deviceId_; - private com.google.protobuf.SingleFieldBuilderV3 opticalLinkUuidBuilder_; + private com.google.protobuf.SingleFieldBuilderV3 deviceIdBuilder_; /** - * .context.Uuid optical_link_uuid = 1; - * @return Whether the opticalLinkUuid field is set. + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. */ - public boolean hasOpticalLinkUuid() { + public boolean hasDeviceId() { return ((bitField0_ & 0x00000001) != 0); } /** - * .context.Uuid optical_link_uuid = 1; - * @return The opticalLinkUuid. + * .context.DeviceId device_id = 2; + * @return The deviceId. */ - public context.ContextOuterClass.Uuid getOpticalLinkUuid() { - if (opticalLinkUuidBuilder_ == null) { - return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; + public context.ContextOuterClass.DeviceId getDeviceId() { + if (deviceIdBuilder_ == null) { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; } else { - return opticalLinkUuidBuilder_.getMessage(); + return deviceIdBuilder_.getMessage(); } } /** - * .context.Uuid optical_link_uuid = 1; + * .context.DeviceId device_id = 2; */ - public Builder setOpticalLinkUuid(context.ContextOuterClass.Uuid value) { - if (opticalLinkUuidBuilder_ == null) { + public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - opticalLinkUuid_ = value; + deviceId_ = value; } else { - opticalLinkUuidBuilder_.setMessage(value); + deviceIdBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); @@ -71653,13 +75862,13 @@ public final class ContextOuterClass { } /** - * .context.Uuid optical_link_uuid = 1; + * .context.DeviceId device_id = 2; */ - public Builder setOpticalLinkUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuid_ = builderForValue.build(); + public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdBuilder_ == null) { + deviceId_ = builderForValue.build(); } else { - opticalLinkUuidBuilder_.setMessage(builderForValue.build()); + deviceIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); @@ -71667,17 +75876,17 @@ public final class ContextOuterClass { } /** - * .context.Uuid optical_link_uuid = 1; + * .context.DeviceId device_id = 2; */ - public Builder mergeOpticalLinkUuid(context.ContextOuterClass.Uuid value) { - if (opticalLinkUuidBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && opticalLinkUuid_ != null && opticalLinkUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { - getOpticalLinkUuidBuilder().mergeFrom(value); + public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && deviceId_ != null && deviceId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) { + getDeviceIdBuilder().mergeFrom(value); } else { - opticalLinkUuid_ = value; + deviceId_ = value; } } else { - opticalLinkUuidBuilder_.mergeFrom(value); + deviceIdBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; onChanged(); @@ -71685,48 +75894,166 @@ public final class ContextOuterClass { } /** - * .context.Uuid optical_link_uuid = 1; + * .context.DeviceId device_id = 2; */ - public Builder clearOpticalLinkUuid() { + public Builder clearDeviceId() { bitField0_ = (bitField0_ & ~0x00000001); - opticalLinkUuid_ = null; - if (opticalLinkUuidBuilder_ != null) { - opticalLinkUuidBuilder_.dispose(); - opticalLinkUuidBuilder_ = null; + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); + deviceIdBuilder_ = null; } onChanged(); return this; } /** - * .context.Uuid optical_link_uuid = 1; + * .context.DeviceId device_id = 2; */ - public context.ContextOuterClass.Uuid.Builder getOpticalLinkUuidBuilder() { + public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getOpticalLinkUuidFieldBuilder().getBuilder(); + return getDeviceIdFieldBuilder().getBuilder(); } /** - * .context.Uuid optical_link_uuid = 1; + * .context.DeviceId device_id = 2; */ - public context.ContextOuterClass.UuidOrBuilder getOpticalLinkUuidOrBuilder() { - if (opticalLinkUuidBuilder_ != null) { - return opticalLinkUuidBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + if (deviceIdBuilder_ != null) { + return deviceIdBuilder_.getMessageOrBuilder(); } else { - return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + } + + /** + * .context.DeviceId device_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdFieldBuilder() { + if (deviceIdBuilder_ == null) { + deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceId(), getParentForChildren(), isClean()); + deviceId_ = null; } + return deviceIdBuilder_; + } + + private context.ContextOuterClass.Uuid endpointUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointUuidBuilder_; + + /** + * .context.Uuid endpoint_uuid = 3; + * @return Whether the endpointUuid field is set. + */ + public boolean hasEndpointUuid() { + return ((bitField0_ & 0x00000002) != 0); } /** - * .context.Uuid optical_link_uuid = 1; + * .context.Uuid endpoint_uuid = 3; + * @return The endpointUuid. */ - private com.google.protobuf.SingleFieldBuilderV3 getOpticalLinkUuidFieldBuilder() { - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalLinkUuid(), getParentForChildren(), isClean()); - opticalLinkUuid_ = null; + public context.ContextOuterClass.Uuid getEndpointUuid() { + if (endpointUuidBuilder_ == null) { + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; + } else { + return endpointUuidBuilder_.getMessage(); } - return opticalLinkUuidBuilder_; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder setEndpointUuid(context.ContextOuterClass.Uuid value) { + if (endpointUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointUuid_ = value; + } else { + endpointUuidBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder setEndpointUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (endpointUuidBuilder_ == null) { + endpointUuid_ = builderForValue.build(); + } else { + endpointUuidBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder mergeEndpointUuid(context.ContextOuterClass.Uuid value) { + if (endpointUuidBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && endpointUuid_ != null && endpointUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getEndpointUuidBuilder().mergeFrom(value); + } else { + endpointUuid_ = value; + } + } else { + endpointUuidBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder clearEndpointUuid() { + bitField0_ = (bitField0_ & ~0x00000002); + endpointUuid_ = null; + if (endpointUuidBuilder_ != null) { + endpointUuidBuilder_.dispose(); + endpointUuidBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public context.ContextOuterClass.Uuid.Builder getEndpointUuidBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndpointUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() { + if (endpointUuidBuilder_ != null) { + return endpointUuidBuilder_.getMessageOrBuilder(); + } else { + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; + } + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointUuidFieldBuilder() { + if (endpointUuidBuilder_ == null) { + endpointUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointUuid(), getParentForChildren(), isClean()); + endpointUuid_ = null; + } + return endpointUuidBuilder_; } @java.lang.Override @@ -71738,24 +76065,24 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.OpticalLinkId) + // @@protoc_insertion_point(builder_scope:context.OpticalEndPointId) } - // @@protoc_insertion_point(class_scope:context.OpticalLinkId) - private static final context.ContextOuterClass.OpticalLinkId DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalEndPointId) + private static final context.ContextOuterClass.OpticalEndPointId DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLinkId(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalEndPointId(); } - public static context.ContextOuterClass.OpticalLinkId getDefaultInstance() { + public static context.ContextOuterClass.OpticalEndPointId getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public OpticalLinkId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public OpticalEndPointId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); @@ -71770,101 +76097,125 @@ public final class ContextOuterClass { } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.OpticalLinkId getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalEndPointId getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface FiberIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.FiberId) + public interface OpticalLinkListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLinkList) com.google.protobuf.MessageOrBuilder { /** - * .context.Uuid fiber_uuid = 1; - * @return Whether the fiberUuid field is set. + * repeated .context.OpticalLink optical_links = 1; */ - boolean hasFiberUuid(); + java.util.List getOpticalLinksList(); /** - * .context.Uuid fiber_uuid = 1; - * @return The fiberUuid. + * repeated .context.OpticalLink optical_links = 1; */ - context.ContextOuterClass.Uuid getFiberUuid(); + context.ContextOuterClass.OpticalLink getOpticalLinks(int index); /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - context.ContextOuterClass.UuidOrBuilder getFiberUuidOrBuilder(); + int getOpticalLinksCount(); + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + java.util.List getOpticalLinksOrBuilderList(); + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + context.ContextOuterClass.OpticalLinkOrBuilder getOpticalLinksOrBuilder(int index); } /** - * Protobuf type {@code context.FiberId} + * Protobuf type {@code context.OpticalLinkList} */ - public static final class FiberId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.FiberId) - FiberIdOrBuilder { + public static final class OpticalLinkList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLinkList) + OpticalLinkListOrBuilder { private static final long serialVersionUID = 0L; - // Use FiberId.newBuilder() to construct. - private FiberId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalLinkList.newBuilder() to construct. + private OpticalLinkList(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private FiberId() { + private OpticalLinkList() { + opticalLinks_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new FiberId(); + return new OpticalLinkList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_FiberId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLinkList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_FiberId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.FiberId.class, context.ContextOuterClass.FiberId.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalLinkList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkList.class, context.ContextOuterClass.OpticalLinkList.Builder.class); } - public static final int FIBER_UUID_FIELD_NUMBER = 1; + public static final int OPTICAL_LINKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List opticalLinks_; + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + @java.lang.Override + public java.util.List getOpticalLinksList() { + return opticalLinks_; + } - private context.ContextOuterClass.Uuid fiberUuid_; + /** + * repeated .context.OpticalLink optical_links = 1; + */ + @java.lang.Override + public java.util.List getOpticalLinksOrBuilderList() { + return opticalLinks_; + } /** - * .context.Uuid fiber_uuid = 1; - * @return Whether the fiberUuid field is set. + * repeated .context.OpticalLink optical_links = 1; */ @java.lang.Override - public boolean hasFiberUuid() { - return fiberUuid_ != null; + public int getOpticalLinksCount() { + return opticalLinks_.size(); } /** - * .context.Uuid fiber_uuid = 1; - * @return The fiberUuid. + * repeated .context.OpticalLink optical_links = 1; */ @java.lang.Override - public context.ContextOuterClass.Uuid getFiberUuid() { - return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; + public context.ContextOuterClass.OpticalLink getOpticalLinks(int index) { + return opticalLinks_.get(index); } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getFiberUuidOrBuilder() { - return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; + public context.ContextOuterClass.OpticalLinkOrBuilder getOpticalLinksOrBuilder(int index) { + return opticalLinks_.get(index); } private byte memoizedIsInitialized = -1; @@ -71882,8 +76233,8 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (fiberUuid_ != null) { - output.writeMessage(1, getFiberUuid()); + for (int i = 0; i < opticalLinks_.size(); i++) { + output.writeMessage(1, opticalLinks_.get(i)); } getUnknownFields().writeTo(output); } @@ -71894,8 +76245,8 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (fiberUuid_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFiberUuid()); + for (int i = 0; i < opticalLinks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, opticalLinks_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -71907,16 +76258,12 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.FiberId)) { + if (!(obj instanceof context.ContextOuterClass.OpticalLinkList)) { return super.equals(obj); } - context.ContextOuterClass.FiberId other = (context.ContextOuterClass.FiberId) obj; - if (hasFiberUuid() != other.hasFiberUuid()) + context.ContextOuterClass.OpticalLinkList other = (context.ContextOuterClass.OpticalLinkList) obj; + if (!getOpticalLinksList().equals(other.getOpticalLinksList())) return false; - if (hasFiberUuid()) { - if (!getFiberUuid().equals(other.getFiberUuid())) - return false; - } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -71929,60 +76276,60 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasFiberUuid()) { - hash = (37 * hash) + FIBER_UUID_FIELD_NUMBER; - hash = (53 * hash) + getFiberUuid().hashCode(); + if (getOpticalLinksCount() > 0) { + hash = (37 * hash) + OPTICAL_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getOpticalLinksList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.FiberId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.FiberId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.FiberId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.FiberId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.FiberId parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.FiberId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.FiberId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.FiberId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -71995,7 +76342,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.FiberId prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalLinkList prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -72011,21 +76358,21 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.FiberId} + * Protobuf type {@code context.OpticalLinkList} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.FiberId) - context.ContextOuterClass.FiberIdOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLinkList) + context.ContextOuterClass.OpticalLinkListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_FiberId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLinkList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_FiberId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.FiberId.class, context.ContextOuterClass.FiberId.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalLinkList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkList.class, context.ContextOuterClass.OpticalLinkList.Builder.class); } - // Construct using context.ContextOuterClass.FiberId.newBuilder() + // Construct using context.ContextOuterClass.OpticalLinkList.newBuilder() private Builder() { } @@ -72037,27 +76384,29 @@ public final class ContextOuterClass { public Builder clear() { super.clear(); bitField0_ = 0; - fiberUuid_ = null; - if (fiberUuidBuilder_ != null) { - fiberUuidBuilder_.dispose(); - fiberUuidBuilder_ = null; + if (opticalLinksBuilder_ == null) { + opticalLinks_ = java.util.Collections.emptyList(); + } else { + opticalLinks_ = null; + opticalLinksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_FiberId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLinkList_descriptor; } @java.lang.Override - public context.ContextOuterClass.FiberId getDefaultInstanceForType() { - return context.ContextOuterClass.FiberId.getDefaultInstance(); + public context.ContextOuterClass.OpticalLinkList getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalLinkList.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.FiberId build() { - context.ContextOuterClass.FiberId result = buildPartial(); + public context.ContextOuterClass.OpticalLinkList build() { + context.ContextOuterClass.OpticalLinkList result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -72065,8 +76414,9 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.FiberId buildPartial() { - context.ContextOuterClass.FiberId result = new context.ContextOuterClass.FiberId(this); + public context.ContextOuterClass.OpticalLinkList buildPartial() { + context.ContextOuterClass.OpticalLinkList result = new context.ContextOuterClass.OpticalLinkList(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -72074,28 +76424,58 @@ public final class ContextOuterClass { return result; } - private void buildPartial0(context.ContextOuterClass.FiberId result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.fiberUuid_ = fiberUuidBuilder_ == null ? fiberUuid_ : fiberUuidBuilder_.build(); + private void buildPartialRepeatedFields(context.ContextOuterClass.OpticalLinkList result) { + if (opticalLinksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + opticalLinks_ = java.util.Collections.unmodifiableList(opticalLinks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.opticalLinks_ = opticalLinks_; + } else { + result.opticalLinks_ = opticalLinksBuilder_.build(); } } + private void buildPartial0(context.ContextOuterClass.OpticalLinkList result) { + int from_bitField0_ = bitField0_; + } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.FiberId) { - return mergeFrom((context.ContextOuterClass.FiberId) other); + if (other instanceof context.ContextOuterClass.OpticalLinkList) { + return mergeFrom((context.ContextOuterClass.OpticalLinkList) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.FiberId other) { - if (other == context.ContextOuterClass.FiberId.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalLinkList other) { + if (other == context.ContextOuterClass.OpticalLinkList.getDefaultInstance()) return this; - if (other.hasFiberUuid()) { - mergeFiberUuid(other.getFiberUuid()); + if (opticalLinksBuilder_ == null) { + if (!other.opticalLinks_.isEmpty()) { + if (opticalLinks_.isEmpty()) { + opticalLinks_ = other.opticalLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOpticalLinksIsMutable(); + opticalLinks_.addAll(other.opticalLinks_); + } + onChanged(); + } + } else { + if (!other.opticalLinks_.isEmpty()) { + if (opticalLinksBuilder_.isEmpty()) { + opticalLinksBuilder_.dispose(); + opticalLinksBuilder_ = null; + opticalLinks_ = other.opticalLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + opticalLinksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOpticalLinksFieldBuilder() : null; + } else { + opticalLinksBuilder_.addAllMessages(other.opticalLinks_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -72122,8 +76502,13 @@ public final class ContextOuterClass { break; case 10: { - input.readMessage(getFiberUuidFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; + context.ContextOuterClass.OpticalLink m = input.readMessage(context.ContextOuterClass.OpticalLink.parser(), extensionRegistry); + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.add(m); + } else { + opticalLinksBuilder_.addMessage(m); + } break; } // case 10 @@ -72150,122 +76535,241 @@ public final class ContextOuterClass { private int bitField0_; - private context.ContextOuterClass.Uuid fiberUuid_; + private java.util.List opticalLinks_ = java.util.Collections.emptyList(); - private com.google.protobuf.SingleFieldBuilderV3 fiberUuidBuilder_; + private void ensureOpticalLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + opticalLinks_ = new java.util.ArrayList(opticalLinks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 opticalLinksBuilder_; /** - * .context.Uuid fiber_uuid = 1; - * @return Whether the fiberUuid field is set. + * repeated .context.OpticalLink optical_links = 1; */ - public boolean hasFiberUuid() { - return ((bitField0_ & 0x00000001) != 0); + public java.util.List getOpticalLinksList() { + if (opticalLinksBuilder_ == null) { + return java.util.Collections.unmodifiableList(opticalLinks_); + } else { + return opticalLinksBuilder_.getMessageList(); + } + } + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public int getOpticalLinksCount() { + if (opticalLinksBuilder_ == null) { + return opticalLinks_.size(); + } else { + return opticalLinksBuilder_.getCount(); + } } /** - * .context.Uuid fiber_uuid = 1; - * @return The fiberUuid. + * repeated .context.OpticalLink optical_links = 1; */ - public context.ContextOuterClass.Uuid getFiberUuid() { - if (fiberUuidBuilder_ == null) { - return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; + public context.ContextOuterClass.OpticalLink getOpticalLinks(int index) { + if (opticalLinksBuilder_ == null) { + return opticalLinks_.get(index); } else { - return fiberUuidBuilder_.getMessage(); + return opticalLinksBuilder_.getMessage(index); } } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - public Builder setFiberUuid(context.ContextOuterClass.Uuid value) { - if (fiberUuidBuilder_ == null) { + public Builder setOpticalLinks(int index, context.ContextOuterClass.OpticalLink value) { + if (opticalLinksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - fiberUuid_ = value; + ensureOpticalLinksIsMutable(); + opticalLinks_.set(index, value); + onChanged(); } else { - fiberUuidBuilder_.setMessage(value); + opticalLinksBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000001; - onChanged(); return this; } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - public Builder setFiberUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { - if (fiberUuidBuilder_ == null) { - fiberUuid_ = builderForValue.build(); + public Builder setOpticalLinks(int index, context.ContextOuterClass.OpticalLink.Builder builderForValue) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.set(index, builderForValue.build()); + onChanged(); } else { - fiberUuidBuilder_.setMessage(builderForValue.build()); + opticalLinksBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000001; - onChanged(); return this; } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - public Builder mergeFiberUuid(context.ContextOuterClass.Uuid value) { - if (fiberUuidBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && fiberUuid_ != null && fiberUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { - getFiberUuidBuilder().mergeFrom(value); - } else { - fiberUuid_ = value; + public Builder addOpticalLinks(context.ContextOuterClass.OpticalLink value) { + if (opticalLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureOpticalLinksIsMutable(); + opticalLinks_.add(value); + onChanged(); } else { - fiberUuidBuilder_.mergeFrom(value); + opticalLinksBuilder_.addMessage(value); } - bitField0_ |= 0x00000001; - onChanged(); return this; } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - public Builder clearFiberUuid() { - bitField0_ = (bitField0_ & ~0x00000001); - fiberUuid_ = null; - if (fiberUuidBuilder_ != null) { - fiberUuidBuilder_.dispose(); - fiberUuidBuilder_ = null; + public Builder addOpticalLinks(int index, context.ContextOuterClass.OpticalLink value) { + if (opticalLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinksIsMutable(); + opticalLinks_.add(index, value); + onChanged(); + } else { + opticalLinksBuilder_.addMessage(index, value); } - onChanged(); return this; } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - public context.ContextOuterClass.Uuid.Builder getFiberUuidBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getFiberUuidFieldBuilder().getBuilder(); + public Builder addOpticalLinks(context.ContextOuterClass.OpticalLink.Builder builderForValue) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.add(builderForValue.build()); + onChanged(); + } else { + opticalLinksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public Builder addOpticalLinks(int index, context.ContextOuterClass.OpticalLink.Builder builderForValue) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.add(index, builderForValue.build()); + onChanged(); + } else { + opticalLinksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public Builder addAllOpticalLinks(java.lang.Iterable values) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, opticalLinks_); + onChanged(); + } else { + opticalLinksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public Builder clearOpticalLinks() { + if (opticalLinksBuilder_ == null) { + opticalLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + opticalLinksBuilder_.clear(); + } + return this; } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - public context.ContextOuterClass.UuidOrBuilder getFiberUuidOrBuilder() { - if (fiberUuidBuilder_ != null) { - return fiberUuidBuilder_.getMessageOrBuilder(); + public Builder removeOpticalLinks(int index) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.remove(index); + onChanged(); } else { - return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; + opticalLinksBuilder_.remove(index); } + return this; } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - private com.google.protobuf.SingleFieldBuilderV3 getFiberUuidFieldBuilder() { - if (fiberUuidBuilder_ == null) { - fiberUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getFiberUuid(), getParentForChildren(), isClean()); - fiberUuid_ = null; + public context.ContextOuterClass.OpticalLink.Builder getOpticalLinksBuilder(int index) { + return getOpticalLinksFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public context.ContextOuterClass.OpticalLinkOrBuilder getOpticalLinksOrBuilder(int index) { + if (opticalLinksBuilder_ == null) { + return opticalLinks_.get(index); + } else { + return opticalLinksBuilder_.getMessageOrBuilder(index); } - return fiberUuidBuilder_; + } + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public java.util.List getOpticalLinksOrBuilderList() { + if (opticalLinksBuilder_ != null) { + return opticalLinksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(opticalLinks_); + } + } + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public context.ContextOuterClass.OpticalLink.Builder addOpticalLinksBuilder() { + return getOpticalLinksFieldBuilder().addBuilder(context.ContextOuterClass.OpticalLink.getDefaultInstance()); + } + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public context.ContextOuterClass.OpticalLink.Builder addOpticalLinksBuilder(int index) { + return getOpticalLinksFieldBuilder().addBuilder(index, context.ContextOuterClass.OpticalLink.getDefaultInstance()); + } + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public java.util.List getOpticalLinksBuilderList() { + return getOpticalLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getOpticalLinksFieldBuilder() { + if (opticalLinksBuilder_ == null) { + opticalLinksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(opticalLinks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + opticalLinks_ = null; + } + return opticalLinksBuilder_; } @java.lang.Override @@ -72277,24 +76781,24 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.FiberId) + // @@protoc_insertion_point(builder_scope:context.OpticalLinkList) } - // @@protoc_insertion_point(class_scope:context.FiberId) - private static final context.ContextOuterClass.FiberId DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalLinkList) + private static final context.ContextOuterClass.OpticalLinkList DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.FiberId(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLinkList(); } - public static context.ContextOuterClass.FiberId getDefaultInstance() { + public static context.ContextOuterClass.OpticalLinkList getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public FiberId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public OpticalLinkList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); @@ -72309,255 +76813,248 @@ public final class ContextOuterClass { } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.FiberId getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalLinkList getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface FiberOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Fiber) + public interface OpticalLinkDetailsOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLinkDetails) com.google.protobuf.MessageOrBuilder { /** - * string ID = 10; - * @return The iD. - */ - java.lang.String getID(); - - /** - * string ID = 10; - * @return The bytes for iD. + * float length = 1; + * @return The length. */ - com.google.protobuf.ByteString getIDBytes(); + float getLength(); /** - * string src_port = 1; + * string src_port = 2; * @return The srcPort. */ java.lang.String getSrcPort(); /** - * string src_port = 1; + * string src_port = 2; * @return The bytes for srcPort. */ com.google.protobuf.ByteString getSrcPortBytes(); /** - * string dst_port = 2; + * string dst_port = 3; * @return The dstPort. */ java.lang.String getDstPort(); /** - * string dst_port = 2; + * string dst_port = 3; * @return The bytes for dstPort. */ com.google.protobuf.ByteString getDstPortBytes(); /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return The localPeerPort. */ java.lang.String getLocalPeerPort(); /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return The bytes for localPeerPort. */ com.google.protobuf.ByteString getLocalPeerPortBytes(); /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return The remotePeerPort. */ java.lang.String getRemotePeerPort(); /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return The bytes for remotePeerPort. */ com.google.protobuf.ByteString getRemotePeerPortBytes(); /** - * repeated int32 c_slots = 5; - * @return A list containing the cSlots. + * bool used = 6; + * @return The used. */ - java.util.List getCSlotsList(); + boolean getUsed(); /** - * repeated int32 c_slots = 5; - * @return The count of cSlots. + * map<string, int32> c_slots = 7; */ int getCSlotsCount(); /** - * repeated int32 c_slots = 5; - * @param index The index of the element to return. - * @return The cSlots at the given index. + * map<string, int32> c_slots = 7; + */ + boolean containsCSlots(java.lang.String key); + + /** + * Use {@link #getCSlotsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map getCSlots(); + + /** + * map<string, int32> c_slots = 7; + */ + java.util.Map getCSlotsMap(); + + /** + * map<string, int32> c_slots = 7; */ - int getCSlots(int index); + int getCSlotsOrDefault(java.lang.String key, int defaultValue); /** - * repeated int32 l_slots = 6; - * @return A list containing the lSlots. + * map<string, int32> c_slots = 7; */ - java.util.List getLSlotsList(); + int getCSlotsOrThrow(java.lang.String key); /** - * repeated int32 l_slots = 6; - * @return The count of lSlots. + * map<string, int32> l_slots = 8; */ int getLSlotsCount(); /** - * repeated int32 l_slots = 6; - * @param index The index of the element to return. - * @return The lSlots at the given index. + * map<string, int32> l_slots = 8; */ - int getLSlots(int index); + boolean containsLSlots(java.lang.String key); /** - * repeated int32 s_slots = 7; - * @return A list containing the sSlots. + * Use {@link #getLSlotsMap()} instead. */ - java.util.List getSSlotsList(); + @java.lang.Deprecated + java.util.Map getLSlots(); /** - * repeated int32 s_slots = 7; - * @return The count of sSlots. + * map<string, int32> l_slots = 8; */ - int getSSlotsCount(); + java.util.Map getLSlotsMap(); /** - * repeated int32 s_slots = 7; - * @param index The index of the element to return. - * @return The sSlots at the given index. + * map<string, int32> l_slots = 8; */ - int getSSlots(int index); + int getLSlotsOrDefault(java.lang.String key, int defaultValue); /** - * float length = 8; - * @return The length. + * map<string, int32> l_slots = 8; */ - float getLength(); + int getLSlotsOrThrow(java.lang.String key); /** - * bool used = 9; - * @return The used. + * map<string, int32> s_slots = 9; */ - boolean getUsed(); + int getSSlotsCount(); /** - * .context.FiberId fiber_uuid = 11; - * @return Whether the fiberUuid field is set. + * map<string, int32> s_slots = 9; */ - boolean hasFiberUuid(); + boolean containsSSlots(java.lang.String key); /** - * .context.FiberId fiber_uuid = 11; - * @return The fiberUuid. + * Use {@link #getSSlotsMap()} instead. */ - context.ContextOuterClass.FiberId getFiberUuid(); + @java.lang.Deprecated + java.util.Map getSSlots(); /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - context.ContextOuterClass.FiberIdOrBuilder getFiberUuidOrBuilder(); + java.util.Map getSSlotsMap(); + + /** + * map<string, int32> s_slots = 9; + */ + int getSSlotsOrDefault(java.lang.String key, int defaultValue); + + /** + * map<string, int32> s_slots = 9; + */ + int getSSlotsOrThrow(java.lang.String key); } /** - * Protobuf type {@code context.Fiber} + * Protobuf type {@code context.OpticalLinkDetails} */ - public static final class Fiber extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Fiber) - FiberOrBuilder { + public static final class OpticalLinkDetails extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLinkDetails) + OpticalLinkDetailsOrBuilder { private static final long serialVersionUID = 0L; - // Use Fiber.newBuilder() to construct. - private Fiber(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalLinkDetails.newBuilder() to construct. + private OpticalLinkDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Fiber() { - iD_ = ""; + private OpticalLinkDetails() { srcPort_ = ""; dstPort_ = ""; localPeerPort_ = ""; remotePeerPort_ = ""; - cSlots_ = emptyIntList(); - lSlots_ = emptyIntList(); - sSlots_ = emptyIntList(); } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Fiber(); + return new OpticalLinkDetails(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_Fiber_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; } + @SuppressWarnings({ "rawtypes" }) @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Fiber_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Fiber.class, context.ContextOuterClass.Fiber.Builder.class); + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch(number) { + case 7: + return internalGetCSlots(); + case 8: + return internalGetLSlots(); + case 9: + return internalGetSSlots(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } } - public static final int ID_FIELD_NUMBER = 10; - - @SuppressWarnings("serial") - private volatile java.lang.Object iD_ = ""; - - /** - * string ID = 10; - * @return The iD. - */ @java.lang.Override - public java.lang.String getID() { - java.lang.Object ref = iD_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - iD_ = s; - return s; - } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkDetails.class, context.ContextOuterClass.OpticalLinkDetails.Builder.class); } + public static final int LENGTH_FIELD_NUMBER = 1; + + private float length_ = 0F; + /** - * string ID = 10; - * @return The bytes for iD. + * float length = 1; + * @return The length. */ @java.lang.Override - public com.google.protobuf.ByteString getIDBytes() { - java.lang.Object ref = iD_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - iD_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public float getLength() { + return length_; } - public static final int SRC_PORT_FIELD_NUMBER = 1; + public static final int SRC_PORT_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object srcPort_ = ""; /** - * string src_port = 1; + * string src_port = 2; * @return The srcPort. */ @java.lang.Override @@ -72574,7 +77071,7 @@ public final class ContextOuterClass { } /** - * string src_port = 1; + * string src_port = 2; * @return The bytes for srcPort. */ @java.lang.Override @@ -72589,13 +77086,13 @@ public final class ContextOuterClass { } } - public static final int DST_PORT_FIELD_NUMBER = 2; + public static final int DST_PORT_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object dstPort_ = ""; /** - * string dst_port = 2; + * string dst_port = 3; * @return The dstPort. */ @java.lang.Override @@ -72612,7 +77109,7 @@ public final class ContextOuterClass { } /** - * string dst_port = 2; + * string dst_port = 3; * @return The bytes for dstPort. */ @java.lang.Override @@ -72627,13 +77124,13 @@ public final class ContextOuterClass { } } - public static final int LOCAL_PEER_PORT_FIELD_NUMBER = 3; + public static final int LOCAL_PEER_PORT_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object localPeerPort_ = ""; /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return The localPeerPort. */ @java.lang.Override @@ -72650,7 +77147,7 @@ public final class ContextOuterClass { } /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return The bytes for localPeerPort. */ @java.lang.Override @@ -72665,13 +77162,13 @@ public final class ContextOuterClass { } } - public static final int REMOTE_PEER_PORT_FIELD_NUMBER = 4; + public static final int REMOTE_PEER_PORT_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object remotePeerPort_ = ""; /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return The remotePeerPort. */ @java.lang.Override @@ -72688,7 +77185,7 @@ public final class ContextOuterClass { } /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return The bytes for remotePeerPort. */ @java.lang.Override @@ -72703,159 +77200,245 @@ public final class ContextOuterClass { } } - public static final int C_SLOTS_FIELD_NUMBER = 5; + public static final int USED_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList cSlots_; + private boolean used_ = false; /** - * repeated int32 c_slots = 5; - * @return A list containing the cSlots. + * bool used = 6; + * @return The used. */ @java.lang.Override - public java.util.List getCSlotsList() { + public boolean getUsed() { + return used_; + } + + public static final int C_SLOTS_FIELD_NUMBER = 7; + + private static final class CSlotsDefaultEntryHolder { + + static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance(context.ContextOuterClass.internal_static_context_OpticalLinkDetails_CSlotsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.INT32, 0); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField cSlots_; + + private com.google.protobuf.MapField internalGetCSlots() { + if (cSlots_ == null) { + return com.google.protobuf.MapField.emptyMapField(CSlotsDefaultEntryHolder.defaultEntry); + } return cSlots_; } - /** - * repeated int32 c_slots = 5; - * @return The count of cSlots. - */ public int getCSlotsCount() { - return cSlots_.size(); + return internalGetCSlots().getMap().size(); } /** - * repeated int32 c_slots = 5; - * @param index The index of the element to return. - * @return The cSlots at the given index. + * map<string, int32> c_slots = 7; */ - public int getCSlots(int index) { - return cSlots_.getInt(index); + @java.lang.Override + public boolean containsCSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetCSlots().getMap().containsKey(key); } - private int cSlotsMemoizedSerializedSize = -1; - - public static final int L_SLOTS_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList lSlots_; + /** + * Use {@link #getCSlotsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCSlots() { + return getCSlotsMap(); + } /** - * repeated int32 l_slots = 6; - * @return A list containing the lSlots. + * map<string, int32> c_slots = 7; */ @java.lang.Override - public java.util.List getLSlotsList() { - return lSlots_; + public java.util.Map getCSlotsMap() { + return internalGetCSlots().getMap(); } /** - * repeated int32 l_slots = 6; - * @return The count of lSlots. + * map<string, int32> c_slots = 7; */ - public int getLSlotsCount() { - return lSlots_.size(); + @java.lang.Override + public int getCSlotsOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCSlots().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * repeated int32 l_slots = 6; - * @param index The index of the element to return. - * @return The lSlots at the given index. + * map<string, int32> c_slots = 7; */ - public int getLSlots(int index) { - return lSlots_.getInt(index); + @java.lang.Override + public int getCSlotsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCSlots().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); } - private int lSlotsMemoizedSerializedSize = -1; + public static final int L_SLOTS_FIELD_NUMBER = 8; + + private static final class LSlotsDefaultEntryHolder { - public static final int S_SLOTS_FIELD_NUMBER = 7; + static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance(context.ContextOuterClass.internal_static_context_OpticalLinkDetails_LSlotsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.INT32, 0); + } @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList sSlots_; + private com.google.protobuf.MapField lSlots_; + + private com.google.protobuf.MapField internalGetLSlots() { + if (lSlots_ == null) { + return com.google.protobuf.MapField.emptyMapField(LSlotsDefaultEntryHolder.defaultEntry); + } + return lSlots_; + } + + public int getLSlotsCount() { + return internalGetLSlots().getMap().size(); + } /** - * repeated int32 s_slots = 7; - * @return A list containing the sSlots. + * map<string, int32> l_slots = 8; */ @java.lang.Override - public java.util.List getSSlotsList() { - return sSlots_; + public boolean containsLSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLSlots().getMap().containsKey(key); } /** - * repeated int32 s_slots = 7; - * @return The count of sSlots. + * Use {@link #getLSlotsMap()} instead. */ - public int getSSlotsCount() { - return sSlots_.size(); + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLSlots() { + return getLSlotsMap(); } /** - * repeated int32 s_slots = 7; - * @param index The index of the element to return. - * @return The sSlots at the given index. + * map<string, int32> l_slots = 8; */ - public int getSSlots(int index) { - return sSlots_.getInt(index); + @java.lang.Override + public java.util.Map getLSlotsMap() { + return internalGetLSlots().getMap(); } - private int sSlotsMemoizedSerializedSize = -1; - - public static final int LENGTH_FIELD_NUMBER = 8; - - private float length_ = 0F; + /** + * map<string, int32> l_slots = 8; + */ + @java.lang.Override + public int getLSlotsOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLSlots().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } /** - * float length = 8; - * @return The length. + * map<string, int32> l_slots = 8; */ @java.lang.Override - public float getLength() { - return length_; + public int getLSlotsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLSlots().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); } - public static final int USED_FIELD_NUMBER = 9; + public static final int S_SLOTS_FIELD_NUMBER = 9; - private boolean used_ = false; + private static final class SSlotsDefaultEntryHolder { + + static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance(context.ContextOuterClass.internal_static_context_OpticalLinkDetails_SSlotsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.INT32, 0); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField sSlots_; + + private com.google.protobuf.MapField internalGetSSlots() { + if (sSlots_ == null) { + return com.google.protobuf.MapField.emptyMapField(SSlotsDefaultEntryHolder.defaultEntry); + } + return sSlots_; + } + + public int getSSlotsCount() { + return internalGetSSlots().getMap().size(); + } /** - * bool used = 9; - * @return The used. + * map<string, int32> s_slots = 9; */ @java.lang.Override - public boolean getUsed() { - return used_; + public boolean containsSSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetSSlots().getMap().containsKey(key); } - public static final int FIBER_UUID_FIELD_NUMBER = 11; - - private context.ContextOuterClass.FiberId fiberUuid_; + /** + * Use {@link #getSSlotsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSSlots() { + return getSSlotsMap(); + } /** - * .context.FiberId fiber_uuid = 11; - * @return Whether the fiberUuid field is set. + * map<string, int32> s_slots = 9; */ @java.lang.Override - public boolean hasFiberUuid() { - return fiberUuid_ != null; + public java.util.Map getSSlotsMap() { + return internalGetSSlots().getMap(); } /** - * .context.FiberId fiber_uuid = 11; - * @return The fiberUuid. + * map<string, int32> s_slots = 9; */ @java.lang.Override - public context.ContextOuterClass.FiberId getFiberUuid() { - return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; + public int getSSlotsOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetSSlots().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ @java.lang.Override - public context.ContextOuterClass.FiberIdOrBuilder getFiberUuidOrBuilder() { - return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; + public int getSSlotsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetSSlots().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); } private byte memoizedIsInitialized = -1; @@ -72873,52 +77456,27 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); + if (java.lang.Float.floatToRawIntBits(length_) != 0) { + output.writeFloat(1, length_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcPort_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcPort_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, srcPort_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstPort_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstPort_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, dstPort_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(localPeerPort_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, localPeerPort_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, localPeerPort_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remotePeerPort_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, remotePeerPort_); - } - if (getCSlotsList().size() > 0) { - output.writeUInt32NoTag(42); - output.writeUInt32NoTag(cSlotsMemoizedSerializedSize); - } - for (int i = 0; i < cSlots_.size(); i++) { - output.writeInt32NoTag(cSlots_.getInt(i)); - } - if (getLSlotsList().size() > 0) { - output.writeUInt32NoTag(50); - output.writeUInt32NoTag(lSlotsMemoizedSerializedSize); - } - for (int i = 0; i < lSlots_.size(); i++) { - output.writeInt32NoTag(lSlots_.getInt(i)); - } - if (getSSlotsList().size() > 0) { - output.writeUInt32NoTag(58); - output.writeUInt32NoTag(sSlotsMemoizedSerializedSize); - } - for (int i = 0; i < sSlots_.size(); i++) { - output.writeInt32NoTag(sSlots_.getInt(i)); - } - if (java.lang.Float.floatToRawIntBits(length_) != 0) { - output.writeFloat(8, length_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remotePeerPort_); } if (used_ != false) { - output.writeBool(9, used_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(iD_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, iD_); - } - if (fiberUuid_ != null) { - output.writeMessage(11, getFiberUuid()); + output.writeBool(6, used_); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(output, internalGetCSlots(), CSlotsDefaultEntryHolder.defaultEntry, 7); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(output, internalGetLSlots(), LSlotsDefaultEntryHolder.defaultEntry, 8); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(output, internalGetSSlots(), SSlotsDefaultEntryHolder.defaultEntry, 9); getUnknownFields().writeTo(output); } @@ -72928,65 +77486,35 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; + if (java.lang.Float.floatToRawIntBits(length_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, length_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcPort_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcPort_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, srcPort_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstPort_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstPort_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, dstPort_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(localPeerPort_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, localPeerPort_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, localPeerPort_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remotePeerPort_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, remotePeerPort_); - } - { - int dataSize = 0; - for (int i = 0; i < cSlots_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(cSlots_.getInt(i)); - } - size += dataSize; - if (!getCSlotsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - cSlotsMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < lSlots_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(lSlots_.getInt(i)); - } - size += dataSize; - if (!getLSlotsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - lSlotsMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < sSlots_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(sSlots_.getInt(i)); - } - size += dataSize; - if (!getSSlotsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - sSlotsMemoizedSerializedSize = dataSize; - } - if (java.lang.Float.floatToRawIntBits(length_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(8, length_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remotePeerPort_); } if (used_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, used_); + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, used_); + } + for (java.util.Map.Entry entry : internalGetCSlots().getMap().entrySet()) { + com.google.protobuf.MapEntry cSlots__ = CSlotsDefaultEntryHolder.defaultEntry.newBuilderForType().setKey(entry.getKey()).setValue(entry.getValue()).build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, cSlots__); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(iD_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, iD_); + for (java.util.Map.Entry entry : internalGetLSlots().getMap().entrySet()) { + com.google.protobuf.MapEntry lSlots__ = LSlotsDefaultEntryHolder.defaultEntry.newBuilderForType().setKey(entry.getKey()).setValue(entry.getValue()).build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, lSlots__); } - if (fiberUuid_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getFiberUuid()); + for (java.util.Map.Entry entry : internalGetSSlots().getMap().entrySet()) { + com.google.protobuf.MapEntry sSlots__ = SSlotsDefaultEntryHolder.defaultEntry.newBuilderForType().setKey(entry.getKey()).setValue(entry.getValue()).build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, sSlots__); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -72998,11 +77526,11 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.Fiber)) { + if (!(obj instanceof context.ContextOuterClass.OpticalLinkDetails)) { return super.equals(obj); } - context.ContextOuterClass.Fiber other = (context.ContextOuterClass.Fiber) obj; - if (!getID().equals(other.getID())) + context.ContextOuterClass.OpticalLinkDetails other = (context.ContextOuterClass.OpticalLinkDetails) obj; + if (java.lang.Float.floatToIntBits(getLength()) != java.lang.Float.floatToIntBits(other.getLength())) return false; if (!getSrcPort().equals(other.getSrcPort())) return false; @@ -73012,22 +77540,14 @@ public final class ContextOuterClass { return false; if (!getRemotePeerPort().equals(other.getRemotePeerPort())) return false; - if (!getCSlotsList().equals(other.getCSlotsList())) - return false; - if (!getLSlotsList().equals(other.getLSlotsList())) - return false; - if (!getSSlotsList().equals(other.getSSlotsList())) + if (getUsed() != other.getUsed()) return false; - if (java.lang.Float.floatToIntBits(getLength()) != java.lang.Float.floatToIntBits(other.getLength())) + if (!internalGetCSlots().equals(other.internalGetCSlots())) return false; - if (getUsed() != other.getUsed()) + if (!internalGetLSlots().equals(other.internalGetLSlots())) return false; - if (hasFiberUuid() != other.hasFiberUuid()) + if (!internalGetSSlots().equals(other.internalGetSSlots())) return false; - if (hasFiberUuid()) { - if (!getFiberUuid().equals(other.getFiberUuid())) - return false; - } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -73040,8 +77560,8 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getID().hashCode(); + hash = (37 * hash) + LENGTH_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getLength()); hash = (37 * hash) + SRC_PORT_FIELD_NUMBER; hash = (53 * hash) + getSrcPort().hashCode(); hash = (37 * hash) + DST_PORT_FIELD_NUMBER; @@ -73050,76 +77570,70 @@ public final class ContextOuterClass { hash = (53 * hash) + getLocalPeerPort().hashCode(); hash = (37 * hash) + REMOTE_PEER_PORT_FIELD_NUMBER; hash = (53 * hash) + getRemotePeerPort().hashCode(); - if (getCSlotsCount() > 0) { + hash = (37 * hash) + USED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUsed()); + if (!internalGetCSlots().getMap().isEmpty()) { hash = (37 * hash) + C_SLOTS_FIELD_NUMBER; - hash = (53 * hash) + getCSlotsList().hashCode(); + hash = (53 * hash) + internalGetCSlots().hashCode(); } - if (getLSlotsCount() > 0) { + if (!internalGetLSlots().getMap().isEmpty()) { hash = (37 * hash) + L_SLOTS_FIELD_NUMBER; - hash = (53 * hash) + getLSlotsList().hashCode(); + hash = (53 * hash) + internalGetLSlots().hashCode(); } - if (getSSlotsCount() > 0) { + if (!internalGetSSlots().getMap().isEmpty()) { hash = (37 * hash) + S_SLOTS_FIELD_NUMBER; - hash = (53 * hash) + getSSlotsList().hashCode(); - } - hash = (37 * hash) + LENGTH_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getLength()); - hash = (37 * hash) + USED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUsed()); - if (hasFiberUuid()) { - hash = (37 * hash) + FIBER_UUID_FIELD_NUMBER; - hash = (53 * hash) + getFiberUuid().hashCode(); + hash = (53 * hash) + internalGetSSlots().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.Fiber parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.Fiber parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.Fiber parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.Fiber parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.Fiber parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.Fiber parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.Fiber parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkDetails parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.Fiber parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkDetails parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -73132,7 +77646,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.Fiber prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalLinkDetails prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -73148,21 +77662,49 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.Fiber} + * Protobuf type {@code context.OpticalLinkDetails} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Fiber) - context.ContextOuterClass.FiberOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLinkDetails) + context.ContextOuterClass.OpticalLinkDetailsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_Fiber_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + } + + @SuppressWarnings({ "rawtypes" }) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch(number) { + case 7: + return internalGetCSlots(); + case 8: + return internalGetLSlots(); + case 9: + return internalGetSSlots(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({ "rawtypes" }) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch(number) { + case 7: + return internalGetMutableCSlots(); + case 8: + return internalGetMutableLSlots(); + case 9: + return internalGetMutableSSlots(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Fiber_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Fiber.class, context.ContextOuterClass.Fiber.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkDetails.class, context.ContextOuterClass.OpticalLinkDetails.Builder.class); } - // Construct using context.ContextOuterClass.Fiber.newBuilder() + // Construct using context.ContextOuterClass.OpticalLinkDetails.newBuilder() private Builder() { } @@ -73174,37 +77716,31 @@ public final class ContextOuterClass { public Builder clear() { super.clear(); bitField0_ = 0; - iD_ = ""; + length_ = 0F; srcPort_ = ""; dstPort_ = ""; localPeerPort_ = ""; remotePeerPort_ = ""; - cSlots_ = emptyIntList(); - lSlots_ = emptyIntList(); - sSlots_ = emptyIntList(); - length_ = 0F; used_ = false; - fiberUuid_ = null; - if (fiberUuidBuilder_ != null) { - fiberUuidBuilder_.dispose(); - fiberUuidBuilder_ = null; - } + internalGetMutableCSlots().clear(); + internalGetMutableLSlots().clear(); + internalGetMutableSSlots().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Fiber_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; } @java.lang.Override - public context.ContextOuterClass.Fiber getDefaultInstanceForType() { - return context.ContextOuterClass.Fiber.getDefaultInstance(); + public context.ContextOuterClass.OpticalLinkDetails getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.Fiber build() { - context.ContextOuterClass.Fiber result = buildPartial(); + public context.ContextOuterClass.OpticalLinkDetails build() { + context.ContextOuterClass.OpticalLinkDetails result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -73212,9 +77748,8 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.Fiber buildPartial() { - context.ContextOuterClass.Fiber result = new context.ContextOuterClass.Fiber(this); - buildPartialRepeatedFields(result); + public context.ContextOuterClass.OpticalLinkDetails buildPartial() { + context.ContextOuterClass.OpticalLinkDetails result = new context.ContextOuterClass.OpticalLinkDetails(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -73222,28 +77757,10 @@ public final class ContextOuterClass { return result; } - private void buildPartialRepeatedFields(context.ContextOuterClass.Fiber result) { - if (((bitField0_ & 0x00000020) != 0)) { - cSlots_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.cSlots_ = cSlots_; - if (((bitField0_ & 0x00000040) != 0)) { - lSlots_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.lSlots_ = lSlots_; - if (((bitField0_ & 0x00000080) != 0)) { - sSlots_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.sSlots_ = sSlots_; - } - - private void buildPartial0(context.ContextOuterClass.Fiber result) { + private void buildPartial0(context.ContextOuterClass.OpticalLinkDetails result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.iD_ = iD_; + result.length_ = length_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.srcPort_ = srcPort_; @@ -73257,34 +77774,38 @@ public final class ContextOuterClass { if (((from_bitField0_ & 0x00000010) != 0)) { result.remotePeerPort_ = remotePeerPort_; } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.length_ = length_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.used_ = used_; } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.fiberUuid_ = fiberUuidBuilder_ == null ? fiberUuid_ : fiberUuidBuilder_.build(); + if (((from_bitField0_ & 0x00000040) != 0)) { + result.cSlots_ = internalGetCSlots(); + result.cSlots_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.lSlots_ = internalGetLSlots(); + result.lSlots_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.sSlots_ = internalGetSSlots(); + result.sSlots_.makeImmutable(); } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Fiber) { - return mergeFrom((context.ContextOuterClass.Fiber) other); + if (other instanceof context.ContextOuterClass.OpticalLinkDetails) { + return mergeFrom((context.ContextOuterClass.OpticalLinkDetails) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.Fiber other) { - if (other == context.ContextOuterClass.Fiber.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalLinkDetails other) { + if (other == context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance()) return this; - if (!other.getID().isEmpty()) { - iD_ = other.iD_; - bitField0_ |= 0x00000001; - onChanged(); + if (other.getLength() != 0F) { + setLength(other.getLength()); } if (!other.getSrcPort().isEmpty()) { srcPort_ = other.srcPort_; @@ -73306,45 +77827,15 @@ public final class ContextOuterClass { bitField0_ |= 0x00000010; onChanged(); } - if (!other.cSlots_.isEmpty()) { - if (cSlots_.isEmpty()) { - cSlots_ = other.cSlots_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureCSlotsIsMutable(); - cSlots_.addAll(other.cSlots_); - } - onChanged(); - } - if (!other.lSlots_.isEmpty()) { - if (lSlots_.isEmpty()) { - lSlots_ = other.lSlots_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureLSlotsIsMutable(); - lSlots_.addAll(other.lSlots_); - } - onChanged(); - } - if (!other.sSlots_.isEmpty()) { - if (sSlots_.isEmpty()) { - sSlots_ = other.sSlots_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureSSlotsIsMutable(); - sSlots_.addAll(other.sSlots_); - } - onChanged(); - } - if (other.getLength() != 0F) { - setLength(other.getLength()); - } if (other.getUsed() != false) { setUsed(other.getUsed()); } - if (other.hasFiberUuid()) { - mergeFiberUuid(other.getFiberUuid()); - } + internalGetMutableCSlots().mergeFrom(other.internalGetCSlots()); + bitField0_ |= 0x00000040; + internalGetMutableLSlots().mergeFrom(other.internalGetLSlots()); + bitField0_ |= 0x00000080; + internalGetMutableSSlots().mergeFrom(other.internalGetSSlots()); + bitField0_ |= 0x00000100; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -73368,122 +77859,72 @@ public final class ContextOuterClass { case 0: done = true; break; - case 10: + case 13: { - srcPort_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; + length_ = input.readFloat(); + bitField0_ |= 0x00000001; break; } - // case 10 + // case 13 case 18: { - dstPort_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + srcPort_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; break; } // case 18 case 26: { - localPeerPort_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; + dstPort_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; break; } // case 26 case 34: { - remotePeerPort_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; + localPeerPort_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; break; } // case 34 - case 40: - { - int v = input.readInt32(); - ensureCSlotsIsMutable(); - cSlots_.addInt(v); - break; - } - // case 40 case 42: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureCSlotsIsMutable(); - while (input.getBytesUntilLimit() > 0) { - cSlots_.addInt(input.readInt32()); - } - input.popLimit(limit); + remotePeerPort_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; break; } // case 42 case 48: { - int v = input.readInt32(); - ensureLSlotsIsMutable(); - lSlots_.addInt(v); + used_ = input.readBool(); + bitField0_ |= 0x00000020; break; } // case 48 - case 50: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureLSlotsIsMutable(); - while (input.getBytesUntilLimit() > 0) { - lSlots_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - // case 50 - case 56: - { - int v = input.readInt32(); - ensureSSlotsIsMutable(); - sSlots_.addInt(v); - break; - } - // case 56 case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureSSlotsIsMutable(); - while (input.getBytesUntilLimit() > 0) { - sSlots_.addInt(input.readInt32()); - } - input.popLimit(limit); + com.google.protobuf.MapEntry cSlots__ = input.readMessage(CSlotsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableCSlots().getMutableMap().put(cSlots__.getKey(), cSlots__.getValue()); + bitField0_ |= 0x00000040; break; } // case 58 - case 69: - { - length_ = input.readFloat(); - bitField0_ |= 0x00000100; - break; - } - // case 69 - case 72: - { - used_ = input.readBool(); - bitField0_ |= 0x00000200; - break; - } - // case 72 - case 82: + case 66: { - iD_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; + com.google.protobuf.MapEntry lSlots__ = input.readMessage(LSlotsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLSlots().getMutableMap().put(lSlots__.getKey(), lSlots__.getValue()); + bitField0_ |= 0x00000080; break; } - // case 82 - case 90: + // case 66 + case 74: { - input.readMessage(getFiberUuidFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; + com.google.protobuf.MapEntry sSlots__ = input.readMessage(SSlotsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSSlots().getMutableMap().put(sSlots__.getKey(), sSlots__.getValue()); + bitField0_ |= 0x00000100; break; } - // case 90 + // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -73507,77 +77948,36 @@ public final class ContextOuterClass { private int bitField0_; - private java.lang.Object iD_ = ""; - - /** - * string ID = 10; - * @return The iD. - */ - public java.lang.String getID() { - java.lang.Object ref = iD_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - iD_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + private float length_; /** - * string ID = 10; - * @return The bytes for iD. + * float length = 1; + * @return The length. */ - public com.google.protobuf.ByteString getIDBytes() { - java.lang.Object ref = iD_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - iD_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + @java.lang.Override + public float getLength() { + return length_; } /** - * string ID = 10; - * @param value The iD to set. + * float length = 1; + * @param value The length to set. * @return This builder for chaining. */ - public Builder setID(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - iD_ = value; + public Builder setLength(float value) { + length_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** - * string ID = 10; + * float length = 1; * @return This builder for chaining. */ - public Builder clearID() { - iD_ = getDefaultInstance().getID(); + public Builder clearLength() { bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * string ID = 10; - * @param value The bytes for iD to set. - * @return This builder for chaining. - */ - public Builder setIDBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - iD_ = value; - bitField0_ |= 0x00000001; + length_ = 0F; onChanged(); return this; } @@ -73585,7 +77985,7 @@ public final class ContextOuterClass { private java.lang.Object srcPort_ = ""; /** - * string src_port = 1; + * string src_port = 2; * @return The srcPort. */ public java.lang.String getSrcPort() { @@ -73601,7 +78001,7 @@ public final class ContextOuterClass { } /** - * string src_port = 1; + * string src_port = 2; * @return The bytes for srcPort. */ public com.google.protobuf.ByteString getSrcPortBytes() { @@ -73616,7 +78016,7 @@ public final class ContextOuterClass { } /** - * string src_port = 1; + * string src_port = 2; * @param value The srcPort to set. * @return This builder for chaining. */ @@ -73631,7 +78031,7 @@ public final class ContextOuterClass { } /** - * string src_port = 1; + * string src_port = 2; * @return This builder for chaining. */ public Builder clearSrcPort() { @@ -73642,7 +78042,7 @@ public final class ContextOuterClass { } /** - * string src_port = 1; + * string src_port = 2; * @param value The bytes for srcPort to set. * @return This builder for chaining. */ @@ -73660,7 +78060,7 @@ public final class ContextOuterClass { private java.lang.Object dstPort_ = ""; /** - * string dst_port = 2; + * string dst_port = 3; * @return The dstPort. */ public java.lang.String getDstPort() { @@ -73676,7 +78076,7 @@ public final class ContextOuterClass { } /** - * string dst_port = 2; + * string dst_port = 3; * @return The bytes for dstPort. */ public com.google.protobuf.ByteString getDstPortBytes() { @@ -73691,7 +78091,7 @@ public final class ContextOuterClass { } /** - * string dst_port = 2; + * string dst_port = 3; * @param value The dstPort to set. * @return This builder for chaining. */ @@ -73706,7 +78106,7 @@ public final class ContextOuterClass { } /** - * string dst_port = 2; + * string dst_port = 3; * @return This builder for chaining. */ public Builder clearDstPort() { @@ -73717,7 +78117,7 @@ public final class ContextOuterClass { } /** - * string dst_port = 2; + * string dst_port = 3; * @param value The bytes for dstPort to set. * @return This builder for chaining. */ @@ -73735,7 +78135,7 @@ public final class ContextOuterClass { private java.lang.Object localPeerPort_ = ""; /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return The localPeerPort. */ public java.lang.String getLocalPeerPort() { @@ -73751,7 +78151,7 @@ public final class ContextOuterClass { } /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return The bytes for localPeerPort. */ public com.google.protobuf.ByteString getLocalPeerPortBytes() { @@ -73766,7 +78166,7 @@ public final class ContextOuterClass { } /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @param value The localPeerPort to set. * @return This builder for chaining. */ @@ -73781,7 +78181,7 @@ public final class ContextOuterClass { } /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return This builder for chaining. */ public Builder clearLocalPeerPort() { @@ -73792,7 +78192,7 @@ public final class ContextOuterClass { } /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @param value The bytes for localPeerPort to set. * @return This builder for chaining. */ @@ -73810,7 +78210,7 @@ public final class ContextOuterClass { private java.lang.Object remotePeerPort_ = ""; /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return The remotePeerPort. */ public java.lang.String getRemotePeerPort() { @@ -73826,7 +78226,7 @@ public final class ContextOuterClass { } /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return The bytes for remotePeerPort. */ public com.google.protobuf.ByteString getRemotePeerPortBytes() { @@ -73841,7 +78241,7 @@ public final class ContextOuterClass { } /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @param value The remotePeerPort to set. * @return This builder for chaining. */ @@ -73856,7 +78256,7 @@ public final class ContextOuterClass { } /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return This builder for chaining. */ public Builder clearRemotePeerPort() { @@ -73867,7 +78267,7 @@ public final class ContextOuterClass { } /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @param value The bytes for remotePeerPort to set. * @return This builder for chaining. */ @@ -73882,436 +78282,419 @@ public final class ContextOuterClass { return this; } - private com.google.protobuf.Internal.IntList cSlots_ = emptyIntList(); - - private void ensureCSlotsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - cSlots_ = mutableCopy(cSlots_); - bitField0_ |= 0x00000020; - } - } - - /** - * repeated int32 c_slots = 5; - * @return A list containing the cSlots. - */ - public java.util.List getCSlotsList() { - return ((bitField0_ & 0x00000020) != 0) ? java.util.Collections.unmodifiableList(cSlots_) : cSlots_; - } - - /** - * repeated int32 c_slots = 5; - * @return The count of cSlots. - */ - public int getCSlotsCount() { - return cSlots_.size(); - } + private boolean used_; /** - * repeated int32 c_slots = 5; - * @param index The index of the element to return. - * @return The cSlots at the given index. + * bool used = 6; + * @return The used. */ - public int getCSlots(int index) { - return cSlots_.getInt(index); + @java.lang.Override + public boolean getUsed() { + return used_; } /** - * repeated int32 c_slots = 5; - * @param index The index to set the value at. - * @param value The cSlots to set. + * bool used = 6; + * @param value The used to set. * @return This builder for chaining. */ - public Builder setCSlots(int index, int value) { - ensureCSlotsIsMutable(); - cSlots_.setInt(index, value); + public Builder setUsed(boolean value) { + used_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } /** - * repeated int32 c_slots = 5; - * @param value The cSlots to add. + * bool used = 6; * @return This builder for chaining. */ - public Builder addCSlots(int value) { - ensureCSlotsIsMutable(); - cSlots_.addInt(value); + public Builder clearUsed() { + bitField0_ = (bitField0_ & ~0x00000020); + used_ = false; onChanged(); return this; } - /** - * repeated int32 c_slots = 5; - * @param values The cSlots to add. - * @return This builder for chaining. - */ - public Builder addAllCSlots(java.lang.Iterable values) { - ensureCSlotsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cSlots_); - onChanged(); - return this; + private com.google.protobuf.MapField cSlots_; + + private com.google.protobuf.MapField internalGetCSlots() { + if (cSlots_ == null) { + return com.google.protobuf.MapField.emptyMapField(CSlotsDefaultEntryHolder.defaultEntry); + } + return cSlots_; } - /** - * repeated int32 c_slots = 5; - * @return This builder for chaining. - */ - public Builder clearCSlots() { - cSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000020); + private com.google.protobuf.MapField internalGetMutableCSlots() { + if (cSlots_ == null) { + cSlots_ = com.google.protobuf.MapField.newMapField(CSlotsDefaultEntryHolder.defaultEntry); + } + if (!cSlots_.isMutable()) { + cSlots_ = cSlots_.copy(); + } + bitField0_ |= 0x00000040; onChanged(); - return this; + return cSlots_; } - private com.google.protobuf.Internal.IntList lSlots_ = emptyIntList(); + public int getCSlotsCount() { + return internalGetCSlots().getMap().size(); + } - private void ensureLSlotsIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - lSlots_ = mutableCopy(lSlots_); - bitField0_ |= 0x00000040; + /** + * map<string, int32> c_slots = 7; + */ + @java.lang.Override + public boolean containsCSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } + return internalGetCSlots().getMap().containsKey(key); } /** - * repeated int32 l_slots = 6; - * @return A list containing the lSlots. + * Use {@link #getCSlotsMap()} instead. */ - public java.util.List getLSlotsList() { - return ((bitField0_ & 0x00000040) != 0) ? java.util.Collections.unmodifiableList(lSlots_) : lSlots_; + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCSlots() { + return getCSlotsMap(); } /** - * repeated int32 l_slots = 6; - * @return The count of lSlots. + * map<string, int32> c_slots = 7; */ - public int getLSlotsCount() { - return lSlots_.size(); + @java.lang.Override + public java.util.Map getCSlotsMap() { + return internalGetCSlots().getMap(); } /** - * repeated int32 l_slots = 6; - * @param index The index of the element to return. - * @return The lSlots at the given index. + * map<string, int32> c_slots = 7; */ - public int getLSlots(int index) { - return lSlots_.getInt(index); + @java.lang.Override + public int getCSlotsOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCSlots().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * repeated int32 l_slots = 6; - * @param index The index to set the value at. - * @param value The lSlots to set. - * @return This builder for chaining. + * map<string, int32> c_slots = 7; */ - public Builder setLSlots(int index, int value) { - ensureLSlotsIsMutable(); - lSlots_.setInt(index, value); - onChanged(); + @java.lang.Override + public int getCSlotsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCSlots().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearCSlots() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableCSlots().getMutableMap().clear(); return this; } /** - * repeated int32 l_slots = 6; - * @param value The lSlots to add. - * @return This builder for chaining. + * map<string, int32> c_slots = 7; */ - public Builder addLSlots(int value) { - ensureLSlotsIsMutable(); - lSlots_.addInt(value); - onChanged(); + public Builder removeCSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableCSlots().getMutableMap().remove(key); return this; } /** - * repeated int32 l_slots = 6; - * @param values The lSlots to add. - * @return This builder for chaining. + * Use alternate mutation accessors instead. */ - public Builder addAllLSlots(java.lang.Iterable values) { - ensureLSlotsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, lSlots_); - onChanged(); + @java.lang.Deprecated + public java.util.Map getMutableCSlots() { + bitField0_ |= 0x00000040; + return internalGetMutableCSlots().getMutableMap(); + } + + /** + * map<string, int32> c_slots = 7; + */ + public Builder putCSlots(java.lang.String key, int value) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableCSlots().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; return this; } /** - * repeated int32 l_slots = 6; - * @return This builder for chaining. + * map<string, int32> c_slots = 7; */ - public Builder clearLSlots() { - lSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); + public Builder putAllCSlots(java.util.Map values) { + internalGetMutableCSlots().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; return this; } - private com.google.protobuf.Internal.IntList sSlots_ = emptyIntList(); + private com.google.protobuf.MapField lSlots_; - private void ensureSSlotsIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - sSlots_ = mutableCopy(sSlots_); - bitField0_ |= 0x00000080; + private com.google.protobuf.MapField internalGetLSlots() { + if (lSlots_ == null) { + return com.google.protobuf.MapField.emptyMapField(LSlotsDefaultEntryHolder.defaultEntry); } + return lSlots_; } - /** - * repeated int32 s_slots = 7; - * @return A list containing the sSlots. - */ - public java.util.List getSSlotsList() { - return ((bitField0_ & 0x00000080) != 0) ? java.util.Collections.unmodifiableList(sSlots_) : sSlots_; + private com.google.protobuf.MapField internalGetMutableLSlots() { + if (lSlots_ == null) { + lSlots_ = com.google.protobuf.MapField.newMapField(LSlotsDefaultEntryHolder.defaultEntry); + } + if (!lSlots_.isMutable()) { + lSlots_ = lSlots_.copy(); + } + bitField0_ |= 0x00000080; + onChanged(); + return lSlots_; } - /** - * repeated int32 s_slots = 7; - * @return The count of sSlots. - */ - public int getSSlotsCount() { - return sSlots_.size(); + public int getLSlotsCount() { + return internalGetLSlots().getMap().size(); } /** - * repeated int32 s_slots = 7; - * @param index The index of the element to return. - * @return The sSlots at the given index. + * map<string, int32> l_slots = 8; */ - public int getSSlots(int index) { - return sSlots_.getInt(index); + @java.lang.Override + public boolean containsLSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLSlots().getMap().containsKey(key); } /** - * repeated int32 s_slots = 7; - * @param index The index to set the value at. - * @param value The sSlots to set. - * @return This builder for chaining. + * Use {@link #getLSlotsMap()} instead. */ - public Builder setSSlots(int index, int value) { - ensureSSlotsIsMutable(); - sSlots_.setInt(index, value); - onChanged(); - return this; + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLSlots() { + return getLSlotsMap(); } /** - * repeated int32 s_slots = 7; - * @param value The sSlots to add. - * @return This builder for chaining. + * map<string, int32> l_slots = 8; */ - public Builder addSSlots(int value) { - ensureSSlotsIsMutable(); - sSlots_.addInt(value); - onChanged(); - return this; + @java.lang.Override + public java.util.Map getLSlotsMap() { + return internalGetLSlots().getMap(); } /** - * repeated int32 s_slots = 7; - * @param values The sSlots to add. - * @return This builder for chaining. + * map<string, int32> l_slots = 8; */ - public Builder addAllSSlots(java.lang.Iterable values) { - ensureSSlotsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sSlots_); - onChanged(); - return this; + @java.lang.Override + public int getLSlotsOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLSlots().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * repeated int32 s_slots = 7; - * @return This builder for chaining. + * map<string, int32> l_slots = 8; */ - public Builder clearSSlots() { - sSlots_ = emptyIntList(); + @java.lang.Override + public int getLSlotsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLSlots().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLSlots() { bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); + internalGetMutableLSlots().getMutableMap().clear(); return this; } - private float length_; - /** - * float length = 8; - * @return The length. + * map<string, int32> l_slots = 8; */ - @java.lang.Override - public float getLength() { - return length_; + public Builder removeLSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLSlots().getMutableMap().remove(key); + return this; } /** - * float length = 8; - * @param value The length to set. - * @return This builder for chaining. + * Use alternate mutation accessors instead. */ - public Builder setLength(float value) { - length_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; + @java.lang.Deprecated + public java.util.Map getMutableLSlots() { + bitField0_ |= 0x00000080; + return internalGetMutableLSlots().getMutableMap(); } /** - * float length = 8; - * @return This builder for chaining. + * map<string, int32> l_slots = 8; */ - public Builder clearLength() { - bitField0_ = (bitField0_ & ~0x00000100); - length_ = 0F; - onChanged(); + public Builder putLSlots(java.lang.String key, int value) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLSlots().getMutableMap().put(key, value); + bitField0_ |= 0x00000080; return this; } - private boolean used_; - /** - * bool used = 9; - * @return The used. + * map<string, int32> l_slots = 8; */ - @java.lang.Override - public boolean getUsed() { - return used_; + public Builder putAllLSlots(java.util.Map values) { + internalGetMutableLSlots().getMutableMap().putAll(values); + bitField0_ |= 0x00000080; + return this; } - /** - * bool used = 9; - * @param value The used to set. - * @return This builder for chaining. - */ - public Builder setUsed(boolean value) { - used_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; + private com.google.protobuf.MapField sSlots_; + + private com.google.protobuf.MapField internalGetSSlots() { + if (sSlots_ == null) { + return com.google.protobuf.MapField.emptyMapField(SSlotsDefaultEntryHolder.defaultEntry); + } + return sSlots_; } - /** - * bool used = 9; - * @return This builder for chaining. - */ - public Builder clearUsed() { - bitField0_ = (bitField0_ & ~0x00000200); - used_ = false; + private com.google.protobuf.MapField internalGetMutableSSlots() { + if (sSlots_ == null) { + sSlots_ = com.google.protobuf.MapField.newMapField(SSlotsDefaultEntryHolder.defaultEntry); + } + if (!sSlots_.isMutable()) { + sSlots_ = sSlots_.copy(); + } + bitField0_ |= 0x00000100; onChanged(); - return this; + return sSlots_; } - private context.ContextOuterClass.FiberId fiberUuid_; - - private com.google.protobuf.SingleFieldBuilderV3 fiberUuidBuilder_; + public int getSSlotsCount() { + return internalGetSSlots().getMap().size(); + } /** - * .context.FiberId fiber_uuid = 11; - * @return Whether the fiberUuid field is set. + * map<string, int32> s_slots = 9; */ - public boolean hasFiberUuid() { - return ((bitField0_ & 0x00000400) != 0); + @java.lang.Override + public boolean containsSSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetSSlots().getMap().containsKey(key); } /** - * .context.FiberId fiber_uuid = 11; - * @return The fiberUuid. + * Use {@link #getSSlotsMap()} instead. */ - public context.ContextOuterClass.FiberId getFiberUuid() { - if (fiberUuidBuilder_ == null) { - return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; - } else { - return fiberUuidBuilder_.getMessage(); - } + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSSlots() { + return getSSlotsMap(); } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - public Builder setFiberUuid(context.ContextOuterClass.FiberId value) { - if (fiberUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fiberUuid_ = value; - } else { - fiberUuidBuilder_.setMessage(value); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; + @java.lang.Override + public java.util.Map getSSlotsMap() { + return internalGetSSlots().getMap(); } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - public Builder setFiberUuid(context.ContextOuterClass.FiberId.Builder builderForValue) { - if (fiberUuidBuilder_ == null) { - fiberUuid_ = builderForValue.build(); - } else { - fiberUuidBuilder_.setMessage(builderForValue.build()); + @java.lang.Override + public int getSSlotsOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00000400; - onChanged(); - return this; + java.util.Map map = internalGetSSlots().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - public Builder mergeFiberUuid(context.ContextOuterClass.FiberId value) { - if (fiberUuidBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) && fiberUuid_ != null && fiberUuid_ != context.ContextOuterClass.FiberId.getDefaultInstance()) { - getFiberUuidBuilder().mergeFrom(value); - } else { - fiberUuid_ = value; - } - } else { - fiberUuidBuilder_.mergeFrom(value); + @java.lang.Override + public int getSSlotsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00000400; - onChanged(); + java.util.Map map = internalGetSSlots().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearSSlots() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableSSlots().getMutableMap().clear(); return this; } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - public Builder clearFiberUuid() { - bitField0_ = (bitField0_ & ~0x00000400); - fiberUuid_ = null; - if (fiberUuidBuilder_ != null) { - fiberUuidBuilder_.dispose(); - fiberUuidBuilder_ = null; + public Builder removeSSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - onChanged(); + internalGetMutableSSlots().getMutableMap().remove(key); return this; } /** - * .context.FiberId fiber_uuid = 11; + * Use alternate mutation accessors instead. */ - public context.ContextOuterClass.FiberId.Builder getFiberUuidBuilder() { - bitField0_ |= 0x00000400; - onChanged(); - return getFiberUuidFieldBuilder().getBuilder(); + @java.lang.Deprecated + public java.util.Map getMutableSSlots() { + bitField0_ |= 0x00000100; + return internalGetMutableSSlots().getMutableMap(); } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - public context.ContextOuterClass.FiberIdOrBuilder getFiberUuidOrBuilder() { - if (fiberUuidBuilder_ != null) { - return fiberUuidBuilder_.getMessageOrBuilder(); - } else { - return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; + public Builder putSSlots(java.lang.String key, int value) { + if (key == null) { + throw new NullPointerException("map key"); } + internalGetMutableSSlots().getMutableMap().put(key, value); + bitField0_ |= 0x00000100; + return this; } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - private com.google.protobuf.SingleFieldBuilderV3 getFiberUuidFieldBuilder() { - if (fiberUuidBuilder_ == null) { - fiberUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getFiberUuid(), getParentForChildren(), isClean()); - fiberUuid_ = null; - } - return fiberUuidBuilder_; + public Builder putAllSSlots(java.util.Map values) { + internalGetMutableSSlots().getMutableMap().putAll(values); + bitField0_ |= 0x00000100; + return this; } @java.lang.Override @@ -74323,24 +78706,24 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.Fiber) + // @@protoc_insertion_point(builder_scope:context.OpticalLinkDetails) } - // @@protoc_insertion_point(class_scope:context.Fiber) - private static final context.ContextOuterClass.Fiber DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalLinkDetails) + private static final context.ContextOuterClass.OpticalLinkDetails DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Fiber(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLinkDetails(); } - public static context.ContextOuterClass.Fiber getDefaultInstance() { + public static context.ContextOuterClass.OpticalLinkDetails getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public Fiber parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public OpticalLinkDetails parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); @@ -74355,246 +78738,270 @@ public final class ContextOuterClass { } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.Fiber getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalLinkDetails getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OpticalLinkDetailsOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLinkDetails) + public interface OpticalLinkOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLink) com.google.protobuf.MessageOrBuilder { /** - * float length = 1; - * @return The length. + * string name = 1; + * @return The name. */ - float getLength(); + java.lang.String getName(); + + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * .context.OpticalLinkDetails optical_details = 2; + * @return Whether the opticalDetails field is set. + */ + boolean hasOpticalDetails(); + + /** + * .context.OpticalLinkDetails optical_details = 2; + * @return The opticalDetails. + */ + context.ContextOuterClass.OpticalLinkDetails getOpticalDetails(); /** - * string source = 2; - * @return The source. + * .context.OpticalLinkDetails optical_details = 2; */ - java.lang.String getSource(); + context.ContextOuterClass.OpticalLinkDetailsOrBuilder getOpticalDetailsOrBuilder(); /** - * string source = 2; - * @return The bytes for source. + * .context.LinkId link_id = 3; + * @return Whether the linkId field is set. */ - com.google.protobuf.ByteString getSourceBytes(); + boolean hasLinkId(); /** - * string target = 3; - * @return The target. + * .context.LinkId link_id = 3; + * @return The linkId. */ - java.lang.String getTarget(); + context.ContextOuterClass.LinkId getLinkId(); /** - * string target = 3; - * @return The bytes for target. + * .context.LinkId link_id = 3; */ - com.google.protobuf.ByteString getTargetBytes(); + context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder(); /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - java.util.List getFibersList(); + java.util.List getLinkEndpointIdsList(); /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - context.ContextOuterClass.Fiber getFibers(int index); + context.ContextOuterClass.EndPointId getLinkEndpointIds(int index); /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - int getFibersCount(); + int getLinkEndpointIdsCount(); /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - java.util.List getFibersOrBuilderList(); + java.util.List getLinkEndpointIdsOrBuilderList(); /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - context.ContextOuterClass.FiberOrBuilder getFibersOrBuilder(int index); + context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index); } /** - * Protobuf type {@code context.OpticalLinkDetails} + * Protobuf type {@code context.OpticalLink} */ - public static final class OpticalLinkDetails extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLinkDetails) - OpticalLinkDetailsOrBuilder { + public static final class OpticalLink extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLink) + OpticalLinkOrBuilder { private static final long serialVersionUID = 0L; - // Use OpticalLinkDetails.newBuilder() to construct. - private OpticalLinkDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalLink.newBuilder() to construct. + private OpticalLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OpticalLinkDetails() { - source_ = ""; - target_ = ""; - fibers_ = java.util.Collections.emptyList(); + private OpticalLink() { + name_ = ""; + linkEndpointIds_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OpticalLinkDetails(); + return new OpticalLink(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkDetails.class, context.ContextOuterClass.OpticalLinkDetails.Builder.class); - } - - public static final int LENGTH_FIELD_NUMBER = 1; - - private float length_ = 0F; - - /** - * float length = 1; - * @return The length. - */ - @java.lang.Override - public float getLength() { - return length_; + return context.ContextOuterClass.internal_static_context_OpticalLink_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLink.class, context.ContextOuterClass.OpticalLink.Builder.class); } - public static final int SOURCE_FIELD_NUMBER = 2; + public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object source_ = ""; + private volatile java.lang.Object name_ = ""; /** - * string source = 2; - * @return The source. + * string name = 1; + * @return The name. */ @java.lang.Override - public java.lang.String getSource() { - java.lang.Object ref = source_; + public java.lang.String getName() { + java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - source_ = s; + name_ = s; return s; } } /** - * string source = 2; - * @return The bytes for source. + * string name = 1; + * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getSourceBytes() { - java.lang.Object ref = source_; + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - source_ = b; + name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int TARGET_FIELD_NUMBER = 3; + public static final int OPTICAL_DETAILS_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object target_ = ""; + private context.ContextOuterClass.OpticalLinkDetails opticalDetails_; /** - * string target = 3; - * @return The target. + * .context.OpticalLinkDetails optical_details = 2; + * @return Whether the opticalDetails field is set. */ @java.lang.Override - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } + public boolean hasOpticalDetails() { + return opticalDetails_ != null; } /** - * string target = 3; - * @return The bytes for target. + * .context.OpticalLinkDetails optical_details = 2; + * @return The opticalDetails. */ @java.lang.Override - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public context.ContextOuterClass.OpticalLinkDetails getOpticalDetails() { + return opticalDetails_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : opticalDetails_; + } + + /** + * .context.OpticalLinkDetails optical_details = 2; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLinkDetailsOrBuilder getOpticalDetailsOrBuilder() { + return opticalDetails_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : opticalDetails_; + } + + public static final int LINK_ID_FIELD_NUMBER = 3; + + private context.ContextOuterClass.LinkId linkId_; + + /** + * .context.LinkId link_id = 3; + * @return Whether the linkId field is set. + */ + @java.lang.Override + public boolean hasLinkId() { + return linkId_ != null; + } + + /** + * .context.LinkId link_id = 3; + * @return The linkId. + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkId() { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + + /** + * .context.LinkId link_id = 3; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; } - public static final int FIBERS_FIELD_NUMBER = 4; + public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 4; @SuppressWarnings("serial") - private java.util.List fibers_; + private java.util.List linkEndpointIds_; /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override - public java.util.List getFibersList() { - return fibers_; + public java.util.List getLinkEndpointIdsList() { + return linkEndpointIds_; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override - public java.util.List getFibersOrBuilderList() { - return fibers_; + public java.util.List getLinkEndpointIdsOrBuilderList() { + return linkEndpointIds_; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override - public int getFibersCount() { - return fibers_.size(); + public int getLinkEndpointIdsCount() { + return linkEndpointIds_.size(); } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override - public context.ContextOuterClass.Fiber getFibers(int index) { - return fibers_.get(index); + public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { + return linkEndpointIds_.get(index); } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override - public context.ContextOuterClass.FiberOrBuilder getFibersOrBuilder(int index) { - return fibers_.get(index); + public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { + return linkEndpointIds_.get(index); } private byte memoizedIsInitialized = -1; @@ -74612,17 +79019,17 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(length_) != 0) { - output.writeFloat(1, length_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); + if (opticalDetails_ != null) { + output.writeMessage(2, getOpticalDetails()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + if (linkId_ != null) { + output.writeMessage(3, getLinkId()); } - for (int i = 0; i < fibers_.size(); i++) { - output.writeMessage(4, fibers_.get(i)); + for (int i = 0; i < linkEndpointIds_.size(); i++) { + output.writeMessage(4, linkEndpointIds_.get(i)); } getUnknownFields().writeTo(output); } @@ -74633,17 +79040,17 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (java.lang.Float.floatToRawIntBits(length_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, length_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); + if (opticalDetails_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOpticalDetails()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + if (linkId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLinkId()); } - for (int i = 0; i < fibers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, fibers_.get(i)); + for (int i = 0; i < linkEndpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkEndpointIds_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -74655,17 +79062,25 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.OpticalLinkDetails)) { + if (!(obj instanceof context.ContextOuterClass.OpticalLink)) { return super.equals(obj); } - context.ContextOuterClass.OpticalLinkDetails other = (context.ContextOuterClass.OpticalLinkDetails) obj; - if (java.lang.Float.floatToIntBits(getLength()) != java.lang.Float.floatToIntBits(other.getLength())) + context.ContextOuterClass.OpticalLink other = (context.ContextOuterClass.OpticalLink) obj; + if (!getName().equals(other.getName())) return false; - if (!getSource().equals(other.getSource())) + if (hasOpticalDetails() != other.hasOpticalDetails()) return false; - if (!getTarget().equals(other.getTarget())) + if (hasOpticalDetails()) { + if (!getOpticalDetails().equals(other.getOpticalDetails())) + return false; + } + if (hasLinkId() != other.hasLinkId()) return false; - if (!getFibersList().equals(other.getFibersList())) + if (hasLinkId()) { + if (!getLinkId().equals(other.getLinkId())) + return false; + } + if (!getLinkEndpointIdsList().equals(other.getLinkEndpointIdsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -74679,66 +79094,70 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LENGTH_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getLength()); - hash = (37 * hash) + SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSource().hashCode(); - hash = (37 * hash) + TARGET_FIELD_NUMBER; - hash = (53 * hash) + getTarget().hashCode(); - if (getFibersCount() > 0) { - hash = (37 * hash) + FIBERS_FIELD_NUMBER; - hash = (53 * hash) + getFibersList().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasOpticalDetails()) { + hash = (37 * hash) + OPTICAL_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getOpticalDetails().hashCode(); + } + if (hasLinkId()) { + hash = (37 * hash) + LINK_ID_FIELD_NUMBER; + hash = (53 * hash) + getLinkId().hashCode(); + } + if (getLinkEndpointIdsCount() > 0) { + hash = (37 * hash) + LINK_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getLinkEndpointIdsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLink parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLink parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLink parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLink parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLink parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLink parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkDetails parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLink parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLinkDetails parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLink parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -74751,7 +79170,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.OpticalLinkDetails prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalLink prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -74767,21 +79186,21 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.OpticalLinkDetails} + * Protobuf type {@code context.OpticalLink} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLinkDetails) - context.ContextOuterClass.OpticalLinkDetailsOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLink) + context.ContextOuterClass.OpticalLinkOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkDetails.class, context.ContextOuterClass.OpticalLinkDetails.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalLink_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLink.class, context.ContextOuterClass.OpticalLink.Builder.class); } - // Construct using context.ContextOuterClass.OpticalLinkDetails.newBuilder() + // Construct using context.ContextOuterClass.OpticalLink.newBuilder() private Builder() { } @@ -74793,14 +79212,22 @@ public final class ContextOuterClass { public Builder clear() { super.clear(); bitField0_ = 0; - length_ = 0F; - source_ = ""; - target_ = ""; - if (fibersBuilder_ == null) { - fibers_ = java.util.Collections.emptyList(); + name_ = ""; + opticalDetails_ = null; + if (opticalDetailsBuilder_ != null) { + opticalDetailsBuilder_.dispose(); + opticalDetailsBuilder_ = null; + } + linkId_ = null; + if (linkIdBuilder_ != null) { + linkIdBuilder_.dispose(); + linkIdBuilder_ = null; + } + if (linkEndpointIdsBuilder_ == null) { + linkEndpointIds_ = java.util.Collections.emptyList(); } else { - fibers_ = null; - fibersBuilder_.clear(); + linkEndpointIds_ = null; + linkEndpointIdsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); return this; @@ -74808,17 +79235,17 @@ public final class ContextOuterClass { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; } @java.lang.Override - public context.ContextOuterClass.OpticalLinkDetails getDefaultInstanceForType() { - return context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance(); + public context.ContextOuterClass.OpticalLink getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalLink.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.OpticalLinkDetails build() { - context.ContextOuterClass.OpticalLinkDetails result = buildPartial(); + public context.ContextOuterClass.OpticalLink build() { + context.ContextOuterClass.OpticalLink result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -74826,8 +79253,8 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.OpticalLinkDetails buildPartial() { - context.ContextOuterClass.OpticalLinkDetails result = new context.ContextOuterClass.OpticalLinkDetails(this); + public context.ContextOuterClass.OpticalLink buildPartial() { + context.ContextOuterClass.OpticalLink result = new context.ContextOuterClass.OpticalLink(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); @@ -74836,78 +79263,76 @@ public final class ContextOuterClass { return result; } - private void buildPartialRepeatedFields(context.ContextOuterClass.OpticalLinkDetails result) { - if (fibersBuilder_ == null) { + private void buildPartialRepeatedFields(context.ContextOuterClass.OpticalLink result) { + if (linkEndpointIdsBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { - fibers_ = java.util.Collections.unmodifiableList(fibers_); + linkEndpointIds_ = java.util.Collections.unmodifiableList(linkEndpointIds_); bitField0_ = (bitField0_ & ~0x00000008); } - result.fibers_ = fibers_; + result.linkEndpointIds_ = linkEndpointIds_; } else { - result.fibers_ = fibersBuilder_.build(); + result.linkEndpointIds_ = linkEndpointIdsBuilder_.build(); } } - private void buildPartial0(context.ContextOuterClass.OpticalLinkDetails result) { + private void buildPartial0(context.ContextOuterClass.OpticalLink result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.length_ = length_; + result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.source_ = source_; + result.opticalDetails_ = opticalDetailsBuilder_ == null ? opticalDetails_ : opticalDetailsBuilder_.build(); } if (((from_bitField0_ & 0x00000004) != 0)) { - result.target_ = target_; + result.linkId_ = linkIdBuilder_ == null ? linkId_ : linkIdBuilder_.build(); } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.OpticalLinkDetails) { - return mergeFrom((context.ContextOuterClass.OpticalLinkDetails) other); + if (other instanceof context.ContextOuterClass.OpticalLink) { + return mergeFrom((context.ContextOuterClass.OpticalLink) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.OpticalLinkDetails other) { - if (other == context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalLink other) { + if (other == context.ContextOuterClass.OpticalLink.getDefaultInstance()) return this; - if (other.getLength() != 0F) { - setLength(other.getLength()); - } - if (!other.getSource().isEmpty()) { - source_ = other.source_; - bitField0_ |= 0x00000002; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } - if (!other.getTarget().isEmpty()) { - target_ = other.target_; - bitField0_ |= 0x00000004; - onChanged(); + if (other.hasOpticalDetails()) { + mergeOpticalDetails(other.getOpticalDetails()); + } + if (other.hasLinkId()) { + mergeLinkId(other.getLinkId()); } - if (fibersBuilder_ == null) { - if (!other.fibers_.isEmpty()) { - if (fibers_.isEmpty()) { - fibers_ = other.fibers_; + if (linkEndpointIdsBuilder_ == null) { + if (!other.linkEndpointIds_.isEmpty()) { + if (linkEndpointIds_.isEmpty()) { + linkEndpointIds_ = other.linkEndpointIds_; bitField0_ = (bitField0_ & ~0x00000008); } else { - ensureFibersIsMutable(); - fibers_.addAll(other.fibers_); + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.addAll(other.linkEndpointIds_); } onChanged(); } } else { - if (!other.fibers_.isEmpty()) { - if (fibersBuilder_.isEmpty()) { - fibersBuilder_.dispose(); - fibersBuilder_ = null; - fibers_ = other.fibers_; + if (!other.linkEndpointIds_.isEmpty()) { + if (linkEndpointIdsBuilder_.isEmpty()) { + linkEndpointIdsBuilder_.dispose(); + linkEndpointIdsBuilder_ = null; + linkEndpointIds_ = other.linkEndpointIds_; bitField0_ = (bitField0_ & ~0x00000008); - fibersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFibersFieldBuilder() : null; + linkEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkEndpointIdsFieldBuilder() : null; } else { - fibersBuilder_.addAllMessages(other.fibers_); + linkEndpointIdsBuilder_.addAllMessages(other.linkEndpointIds_); } } } @@ -74934,35 +79359,35 @@ public final class ContextOuterClass { case 0: done = true; break; - case 13: + case 10: { - length_ = input.readFloat(); + name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } - // case 13 + // case 10 case 18: { - source_ = input.readStringRequireUtf8(); + input.readMessage(getOpticalDetailsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - target_ = input.readStringRequireUtf8(); + input.readMessage(getLinkIdFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - context.ContextOuterClass.Fiber m = input.readMessage(context.ContextOuterClass.Fiber.parser(), extensionRegistry); - if (fibersBuilder_ == null) { - ensureFibersIsMutable(); - fibers_.add(m); + context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(m); } else { - fibersBuilder_.addMessage(m); + linkEndpointIdsBuilder_.addMessage(m); } break; } @@ -74990,425 +79415,552 @@ public final class ContextOuterClass { private int bitField0_; - private float length_; + private java.lang.Object name_ = ""; /** - * float length = 1; - * @return The length. + * string name = 1; + * @return The name. */ - @java.lang.Override - public float getLength() { - return length_; + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** - * float length = 1; - * @param value The length to set. + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 1; + * @param value The name to set. * @return This builder for chaining. */ - public Builder setLength(float value) { - length_ = value; + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** - * float length = 1; + * string name = 1; * @return This builder for chaining. */ - public Builder clearLength() { + public Builder clearName() { + name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); - length_ = 0F; onChanged(); return this; } - private java.lang.Object source_ = ""; + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private context.ContextOuterClass.OpticalLinkDetails opticalDetails_; + + private com.google.protobuf.SingleFieldBuilderV3 opticalDetailsBuilder_; /** - * string source = 2; - * @return The source. + * .context.OpticalLinkDetails optical_details = 2; + * @return Whether the opticalDetails field is set. */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - source_ = s; - return s; + public boolean hasOpticalDetails() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * .context.OpticalLinkDetails optical_details = 2; + * @return The opticalDetails. + */ + public context.ContextOuterClass.OpticalLinkDetails getOpticalDetails() { + if (opticalDetailsBuilder_ == null) { + return opticalDetails_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : opticalDetails_; } else { - return (java.lang.String) ref; + return opticalDetailsBuilder_.getMessage(); } } /** - * string source = 2; - * @return The bytes for source. + * .context.OpticalLinkDetails optical_details = 2; */ - public com.google.protobuf.ByteString getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - source_ = b; - return b; + public Builder setOpticalDetails(context.ContextOuterClass.OpticalLinkDetails value) { + if (opticalDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + opticalDetails_ = value; } else { - return (com.google.protobuf.ByteString) ref; + opticalDetailsBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); + return this; } /** - * string source = 2; - * @param value The source to set. - * @return This builder for chaining. + * .context.OpticalLinkDetails optical_details = 2; */ - public Builder setSource(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setOpticalDetails(context.ContextOuterClass.OpticalLinkDetails.Builder builderForValue) { + if (opticalDetailsBuilder_ == null) { + opticalDetails_ = builderForValue.build(); + } else { + opticalDetailsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * .context.OpticalLinkDetails optical_details = 2; + */ + public Builder mergeOpticalDetails(context.ContextOuterClass.OpticalLinkDetails value) { + if (opticalDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && opticalDetails_ != null && opticalDetails_ != context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance()) { + getOpticalDetailsBuilder().mergeFrom(value); + } else { + opticalDetails_ = value; + } + } else { + opticalDetailsBuilder_.mergeFrom(value); } - source_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** - * string source = 2; - * @return This builder for chaining. + * .context.OpticalLinkDetails optical_details = 2; + */ + public Builder clearOpticalDetails() { + bitField0_ = (bitField0_ & ~0x00000002); + opticalDetails_ = null; + if (opticalDetailsBuilder_ != null) { + opticalDetailsBuilder_.dispose(); + opticalDetailsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * .context.OpticalLinkDetails optical_details = 2; + */ + public context.ContextOuterClass.OpticalLinkDetails.Builder getOpticalDetailsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOpticalDetailsFieldBuilder().getBuilder(); + } + + /** + * .context.OpticalLinkDetails optical_details = 2; + */ + public context.ContextOuterClass.OpticalLinkDetailsOrBuilder getOpticalDetailsOrBuilder() { + if (opticalDetailsBuilder_ != null) { + return opticalDetailsBuilder_.getMessageOrBuilder(); + } else { + return opticalDetails_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : opticalDetails_; + } + } + + /** + * .context.OpticalLinkDetails optical_details = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getOpticalDetailsFieldBuilder() { + if (opticalDetailsBuilder_ == null) { + opticalDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalDetails(), getParentForChildren(), isClean()); + opticalDetails_ = null; + } + return opticalDetailsBuilder_; + } + + private context.ContextOuterClass.LinkId linkId_; + + private com.google.protobuf.SingleFieldBuilderV3 linkIdBuilder_; + + /** + * .context.LinkId link_id = 3; + * @return Whether the linkId field is set. + */ + public boolean hasLinkId() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * .context.LinkId link_id = 3; + * @return The linkId. + */ + public context.ContextOuterClass.LinkId getLinkId() { + if (linkIdBuilder_ == null) { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } else { + return linkIdBuilder_.getMessage(); + } + } + + /** + * .context.LinkId link_id = 3; */ - public Builder clearSource() { - source_ = getDefaultInstance().getSource(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder setLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkId_ = value; + } else { + linkIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; onChanged(); return this; } /** - * string source = 2; - * @param value The bytes for source to set. - * @return This builder for chaining. + * .context.LinkId link_id = 3; */ - public Builder setSourceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdBuilder_ == null) { + linkId_ = builderForValue.build(); + } else { + linkIdBuilder_.setMessage(builderForValue.build()); } - checkByteStringIsUtf8(value); - source_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } - private java.lang.Object target_ = ""; - /** - * string target = 3; - * @return The target. + * .context.LinkId link_id = 3; */ - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; + public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && linkId_ != null && linkId_ != context.ContextOuterClass.LinkId.getDefaultInstance()) { + getLinkIdBuilder().mergeFrom(value); + } else { + linkId_ = value; + } } else { - return (java.lang.String) ref; + linkIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000004; + onChanged(); + return this; } /** - * string target = 3; - * @return The bytes for target. + * .context.LinkId link_id = 3; */ - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public Builder clearLinkId() { + bitField0_ = (bitField0_ & ~0x00000004); + linkId_ = null; + if (linkIdBuilder_ != null) { + linkIdBuilder_.dispose(); + linkIdBuilder_ = null; } + onChanged(); + return this; } /** - * string target = 3; - * @param value The target to set. - * @return This builder for chaining. + * .context.LinkId link_id = 3; */ - public Builder setTarget(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - target_ = value; + public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { bitField0_ |= 0x00000004; onChanged(); - return this; + return getLinkIdFieldBuilder().getBuilder(); } /** - * string target = 3; - * @return This builder for chaining. + * .context.LinkId link_id = 3; */ - public Builder clearTarget() { - target_ = getDefaultInstance().getTarget(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + if (linkIdBuilder_ != null) { + return linkIdBuilder_.getMessageOrBuilder(); + } else { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } } /** - * string target = 3; - * @param value The bytes for target to set. - * @return This builder for chaining. + * .context.LinkId link_id = 3; */ - public Builder setTargetBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilderV3 getLinkIdFieldBuilder() { + if (linkIdBuilder_ == null) { + linkIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getLinkId(), getParentForChildren(), isClean()); + linkId_ = null; } - checkByteStringIsUtf8(value); - target_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + return linkIdBuilder_; } - private java.util.List fibers_ = java.util.Collections.emptyList(); + private java.util.List linkEndpointIds_ = java.util.Collections.emptyList(); - private void ensureFibersIsMutable() { + private void ensureLinkEndpointIdsIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { - fibers_ = new java.util.ArrayList(fibers_); + linkEndpointIds_ = new java.util.ArrayList(linkEndpointIds_); bitField0_ |= 0x00000008; } } - private com.google.protobuf.RepeatedFieldBuilderV3 fibersBuilder_; + private com.google.protobuf.RepeatedFieldBuilderV3 linkEndpointIdsBuilder_; /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public java.util.List getFibersList() { - if (fibersBuilder_ == null) { - return java.util.Collections.unmodifiableList(fibers_); + public java.util.List getLinkEndpointIdsList() { + if (linkEndpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(linkEndpointIds_); } else { - return fibersBuilder_.getMessageList(); + return linkEndpointIdsBuilder_.getMessageList(); } } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public int getFibersCount() { - if (fibersBuilder_ == null) { - return fibers_.size(); + public int getLinkEndpointIdsCount() { + if (linkEndpointIdsBuilder_ == null) { + return linkEndpointIds_.size(); } else { - return fibersBuilder_.getCount(); + return linkEndpointIdsBuilder_.getCount(); } } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public context.ContextOuterClass.Fiber getFibers(int index) { - if (fibersBuilder_ == null) { - return fibers_.get(index); + public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { + if (linkEndpointIdsBuilder_ == null) { + return linkEndpointIds_.get(index); } else { - return fibersBuilder_.getMessage(index); + return linkEndpointIdsBuilder_.getMessage(index); } } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder setFibers(int index, context.ContextOuterClass.Fiber value) { - if (fibersBuilder_ == null) { + public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (linkEndpointIdsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureFibersIsMutable(); - fibers_.set(index, value); + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.set(index, value); onChanged(); } else { - fibersBuilder_.setMessage(index, value); + linkEndpointIdsBuilder_.setMessage(index, value); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder setFibers(int index, context.ContextOuterClass.Fiber.Builder builderForValue) { - if (fibersBuilder_ == null) { - ensureFibersIsMutable(); - fibers_.set(index, builderForValue.build()); + public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.set(index, builderForValue.build()); onChanged(); } else { - fibersBuilder_.setMessage(index, builderForValue.build()); + linkEndpointIdsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder addFibers(context.ContextOuterClass.Fiber value) { - if (fibersBuilder_ == null) { + public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId value) { + if (linkEndpointIdsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureFibersIsMutable(); - fibers_.add(value); + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(value); onChanged(); } else { - fibersBuilder_.addMessage(value); + linkEndpointIdsBuilder_.addMessage(value); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder addFibers(int index, context.ContextOuterClass.Fiber value) { - if (fibersBuilder_ == null) { + public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (linkEndpointIdsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureFibersIsMutable(); - fibers_.add(index, value); + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(index, value); onChanged(); } else { - fibersBuilder_.addMessage(index, value); + linkEndpointIdsBuilder_.addMessage(index, value); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder addFibers(context.ContextOuterClass.Fiber.Builder builderForValue) { - if (fibersBuilder_ == null) { - ensureFibersIsMutable(); - fibers_.add(builderForValue.build()); + public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(builderForValue.build()); onChanged(); } else { - fibersBuilder_.addMessage(builderForValue.build()); + linkEndpointIdsBuilder_.addMessage(builderForValue.build()); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder addFibers(int index, context.ContextOuterClass.Fiber.Builder builderForValue) { - if (fibersBuilder_ == null) { - ensureFibersIsMutable(); - fibers_.add(index, builderForValue.build()); + public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(index, builderForValue.build()); onChanged(); } else { - fibersBuilder_.addMessage(index, builderForValue.build()); + linkEndpointIdsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder addAllFibers(java.lang.Iterable values) { - if (fibersBuilder_ == null) { - ensureFibersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fibers_); + public Builder addAllLinkEndpointIds(java.lang.Iterable values) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, linkEndpointIds_); onChanged(); } else { - fibersBuilder_.addAllMessages(values); + linkEndpointIdsBuilder_.addAllMessages(values); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder clearFibers() { - if (fibersBuilder_ == null) { - fibers_ = java.util.Collections.emptyList(); + public Builder clearLinkEndpointIds() { + if (linkEndpointIdsBuilder_ == null) { + linkEndpointIds_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { - fibersBuilder_.clear(); + linkEndpointIdsBuilder_.clear(); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder removeFibers(int index) { - if (fibersBuilder_ == null) { - ensureFibersIsMutable(); - fibers_.remove(index); + public Builder removeLinkEndpointIds(int index) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.remove(index); onChanged(); } else { - fibersBuilder_.remove(index); + linkEndpointIdsBuilder_.remove(index); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public context.ContextOuterClass.Fiber.Builder getFibersBuilder(int index) { - return getFibersFieldBuilder().getBuilder(index); + public context.ContextOuterClass.EndPointId.Builder getLinkEndpointIdsBuilder(int index) { + return getLinkEndpointIdsFieldBuilder().getBuilder(index); } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public context.ContextOuterClass.FiberOrBuilder getFibersOrBuilder(int index) { - if (fibersBuilder_ == null) { - return fibers_.get(index); + public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { + if (linkEndpointIdsBuilder_ == null) { + return linkEndpointIds_.get(index); } else { - return fibersBuilder_.getMessageOrBuilder(index); + return linkEndpointIdsBuilder_.getMessageOrBuilder(index); } } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public java.util.List getFibersOrBuilderList() { - if (fibersBuilder_ != null) { - return fibersBuilder_.getMessageOrBuilderList(); + public java.util.List getLinkEndpointIdsOrBuilderList() { + if (linkEndpointIdsBuilder_ != null) { + return linkEndpointIdsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(fibers_); + return java.util.Collections.unmodifiableList(linkEndpointIds_); } } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public context.ContextOuterClass.Fiber.Builder addFibersBuilder() { - return getFibersFieldBuilder().addBuilder(context.ContextOuterClass.Fiber.getDefaultInstance()); + public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder() { + return getLinkEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public context.ContextOuterClass.Fiber.Builder addFibersBuilder(int index) { - return getFibersFieldBuilder().addBuilder(index, context.ContextOuterClass.Fiber.getDefaultInstance()); + public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder(int index) { + return getLinkEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public java.util.List getFibersBuilderList() { - return getFibersFieldBuilder().getBuilderList(); + public java.util.List getLinkEndpointIdsBuilderList() { + return getLinkEndpointIdsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3 getFibersFieldBuilder() { - if (fibersBuilder_ == null) { - fibersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(fibers_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); - fibers_ = null; + private com.google.protobuf.RepeatedFieldBuilderV3 getLinkEndpointIdsFieldBuilder() { + if (linkEndpointIdsBuilder_ == null) { + linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkEndpointIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + linkEndpointIds_ = null; } - return fibersBuilder_; + return linkEndpointIdsBuilder_; } @java.lang.Override @@ -75420,24 +79972,24 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.OpticalLinkDetails) + // @@protoc_insertion_point(builder_scope:context.OpticalLink) } - // @@protoc_insertion_point(class_scope:context.OpticalLinkDetails) - private static final context.ContextOuterClass.OpticalLinkDetails DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalLink) + private static final context.ContextOuterClass.OpticalLink DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLinkDetails(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLink(); } - public static context.ContextOuterClass.OpticalLinkDetails getDefaultInstance() { + public static context.ContextOuterClass.OpticalLink getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public OpticalLinkDetails parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public OpticalLink parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); @@ -75452,199 +80004,148 @@ public final class ContextOuterClass { } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.OpticalLinkDetails getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalLink getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OpticalLinkOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLink) + public interface ServiceConfigRuleOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceConfigRule) com.google.protobuf.MessageOrBuilder { /** - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - - /** - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * .context.OpticalLinkDetails details = 2; - * @return Whether the details field is set. + * .context.ServiceId service_id = 1; + * @return Whether the serviceId field is set. */ - boolean hasDetails(); + boolean hasServiceId(); /** - * .context.OpticalLinkDetails details = 2; - * @return The details. + * .context.ServiceId service_id = 1; + * @return The serviceId. */ - context.ContextOuterClass.OpticalLinkDetails getDetails(); + context.ContextOuterClass.ServiceId getServiceId(); /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - context.ContextOuterClass.OpticalLinkDetailsOrBuilder getDetailsOrBuilder(); + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); /** - * .context.OpticalLinkId optical_link_uuid = 3; - * @return Whether the opticalLinkUuid field is set. + * .context.ConfigRule_Custom configrule_custom = 2; + * @return Whether the configruleCustom field is set. */ - boolean hasOpticalLinkUuid(); + boolean hasConfigruleCustom(); /** - * .context.OpticalLinkId optical_link_uuid = 3; - * @return The opticalLinkUuid. + * .context.ConfigRule_Custom configrule_custom = 2; + * @return The configruleCustom. */ - context.ContextOuterClass.OpticalLinkId getOpticalLinkUuid(); + context.ContextOuterClass.ConfigRule_Custom getConfigruleCustom(); /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - context.ContextOuterClass.OpticalLinkIdOrBuilder getOpticalLinkUuidOrBuilder(); + context.ContextOuterClass.ConfigRule_CustomOrBuilder getConfigruleCustomOrBuilder(); } /** - * Protobuf type {@code context.OpticalLink} + * Protobuf type {@code context.ServiceConfigRule} */ - public static final class OpticalLink extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLink) - OpticalLinkOrBuilder { + public static final class ServiceConfigRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceConfigRule) + ServiceConfigRuleOrBuilder { private static final long serialVersionUID = 0L; - // Use OpticalLink.newBuilder() to construct. - private OpticalLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ServiceConfigRule.newBuilder() to construct. + private ServiceConfigRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OpticalLink() { - name_ = ""; + private ServiceConfigRule() { } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OpticalLink(); + return new ServiceConfigRule(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; + return context.ContextOuterClass.internal_static_context_ServiceConfigRule_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalLink_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLink.class, context.ContextOuterClass.OpticalLink.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - - /** - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - - /** - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return context.ContextOuterClass.internal_static_context_ServiceConfigRule_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceConfigRule.class, context.ContextOuterClass.ServiceConfigRule.Builder.class); } - public static final int DETAILS_FIELD_NUMBER = 2; + public static final int SERVICE_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.OpticalLinkDetails details_; + private context.ContextOuterClass.ServiceId serviceId_; /** - * .context.OpticalLinkDetails details = 2; - * @return Whether the details field is set. + * .context.ServiceId service_id = 1; + * @return Whether the serviceId field is set. */ @java.lang.Override - public boolean hasDetails() { - return details_ != null; + public boolean hasServiceId() { + return serviceId_ != null; } /** - * .context.OpticalLinkDetails details = 2; - * @return The details. + * .context.ServiceId service_id = 1; + * @return The serviceId. */ @java.lang.Override - public context.ContextOuterClass.OpticalLinkDetails getDetails() { - return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; + public context.ContextOuterClass.ServiceId getServiceId() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ @java.lang.Override - public context.ContextOuterClass.OpticalLinkDetailsOrBuilder getDetailsOrBuilder() { - return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } - public static final int OPTICAL_LINK_UUID_FIELD_NUMBER = 3; + public static final int CONFIGRULE_CUSTOM_FIELD_NUMBER = 2; - private context.ContextOuterClass.OpticalLinkId opticalLinkUuid_; + private context.ContextOuterClass.ConfigRule_Custom configruleCustom_; /** - * .context.OpticalLinkId optical_link_uuid = 3; - * @return Whether the opticalLinkUuid field is set. + * .context.ConfigRule_Custom configrule_custom = 2; + * @return Whether the configruleCustom field is set. */ @java.lang.Override - public boolean hasOpticalLinkUuid() { - return opticalLinkUuid_ != null; + public boolean hasConfigruleCustom() { + return configruleCustom_ != null; } /** - * .context.OpticalLinkId optical_link_uuid = 3; - * @return The opticalLinkUuid. + * .context.ConfigRule_Custom configrule_custom = 2; + * @return The configruleCustom. */ @java.lang.Override - public context.ContextOuterClass.OpticalLinkId getOpticalLinkUuid() { - return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; + public context.ContextOuterClass.ConfigRule_Custom getConfigruleCustom() { + return configruleCustom_ == null ? context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance() : configruleCustom_; } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ @java.lang.Override - public context.ContextOuterClass.OpticalLinkIdOrBuilder getOpticalLinkUuidOrBuilder() { - return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; + public context.ContextOuterClass.ConfigRule_CustomOrBuilder getConfigruleCustomOrBuilder() { + return configruleCustom_ == null ? context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance() : configruleCustom_; } private byte memoizedIsInitialized = -1; @@ -75662,14 +80163,11 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (details_ != null) { - output.writeMessage(2, getDetails()); + if (serviceId_ != null) { + output.writeMessage(1, getServiceId()); } - if (opticalLinkUuid_ != null) { - output.writeMessage(3, getOpticalLinkUuid()); + if (configruleCustom_ != null) { + output.writeMessage(2, getConfigruleCustom()); } getUnknownFields().writeTo(output); } @@ -75680,14 +80178,11 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (details_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDetails()); + if (serviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getServiceId()); } - if (opticalLinkUuid_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOpticalLinkUuid()); + if (configruleCustom_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConfigruleCustom()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -75699,22 +80194,20 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.OpticalLink)) { + if (!(obj instanceof context.ContextOuterClass.ServiceConfigRule)) { return super.equals(obj); } - context.ContextOuterClass.OpticalLink other = (context.ContextOuterClass.OpticalLink) obj; - if (!getName().equals(other.getName())) - return false; - if (hasDetails() != other.hasDetails()) + context.ContextOuterClass.ServiceConfigRule other = (context.ContextOuterClass.ServiceConfigRule) obj; + if (hasServiceId() != other.hasServiceId()) return false; - if (hasDetails()) { - if (!getDetails().equals(other.getDetails())) + if (hasServiceId()) { + if (!getServiceId().equals(other.getServiceId())) return false; } - if (hasOpticalLinkUuid() != other.hasOpticalLinkUuid()) + if (hasConfigruleCustom() != other.hasConfigruleCustom()) return false; - if (hasOpticalLinkUuid()) { - if (!getOpticalLinkUuid().equals(other.getOpticalLinkUuid())) + if (hasConfigruleCustom()) { + if (!getConfigruleCustom().equals(other.getConfigruleCustom())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) @@ -75729,66 +80222,64 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasDetails()) { - hash = (37 * hash) + DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDetails().hashCode(); + if (hasServiceId()) { + hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); } - if (hasOpticalLinkUuid()) { - hash = (37 * hash) + OPTICAL_LINK_UUID_FIELD_NUMBER; - hash = (53 * hash) + getOpticalLinkUuid().hashCode(); + if (hasConfigruleCustom()) { + hash = (37 * hash) + CONFIGRULE_CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + getConfigruleCustom().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.OpticalLink parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLink parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLink parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLink parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLink parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLink parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalLink parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.ServiceConfigRule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLink parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.ServiceConfigRule parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -75801,7 +80292,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.OpticalLink prototype) { + public static Builder newBuilder(context.ContextOuterClass.ServiceConfigRule prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -75817,21 +80308,21 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.OpticalLink} + * Protobuf type {@code context.ServiceConfigRule} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLink) - context.ContextOuterClass.OpticalLinkOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceConfigRule) + context.ContextOuterClass.ServiceConfigRuleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; + return context.ContextOuterClass.internal_static_context_ServiceConfigRule_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalLink_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLink.class, context.ContextOuterClass.OpticalLink.Builder.class); + return context.ContextOuterClass.internal_static_context_ServiceConfigRule_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceConfigRule.class, context.ContextOuterClass.ServiceConfigRule.Builder.class); } - // Construct using context.ContextOuterClass.OpticalLink.newBuilder() + // Construct using context.ContextOuterClass.ServiceConfigRule.newBuilder() private Builder() { } @@ -75843,33 +80334,32 @@ public final class ContextOuterClass { public Builder clear() { super.clear(); bitField0_ = 0; - name_ = ""; - details_ = null; - if (detailsBuilder_ != null) { - detailsBuilder_.dispose(); - detailsBuilder_ = null; + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); + serviceIdBuilder_ = null; } - opticalLinkUuid_ = null; - if (opticalLinkUuidBuilder_ != null) { - opticalLinkUuidBuilder_.dispose(); - opticalLinkUuidBuilder_ = null; + configruleCustom_ = null; + if (configruleCustomBuilder_ != null) { + configruleCustomBuilder_.dispose(); + configruleCustomBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; + return context.ContextOuterClass.internal_static_context_ServiceConfigRule_descriptor; } @java.lang.Override - public context.ContextOuterClass.OpticalLink getDefaultInstanceForType() { - return context.ContextOuterClass.OpticalLink.getDefaultInstance(); + public context.ContextOuterClass.ServiceConfigRule getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceConfigRule.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.OpticalLink build() { - context.ContextOuterClass.OpticalLink result = buildPartial(); + public context.ContextOuterClass.ServiceConfigRule build() { + context.ContextOuterClass.ServiceConfigRule result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -75877,8 +80367,8 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.OpticalLink buildPartial() { - context.ContextOuterClass.OpticalLink result = new context.ContextOuterClass.OpticalLink(this); + public context.ContextOuterClass.ServiceConfigRule buildPartial() { + context.ContextOuterClass.ServiceConfigRule result = new context.ContextOuterClass.ServiceConfigRule(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -75886,42 +80376,34 @@ public final class ContextOuterClass { return result; } - private void buildPartial0(context.ContextOuterClass.OpticalLink result) { + private void buildPartial0(context.ContextOuterClass.ServiceConfigRule result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; + result.serviceId_ = serviceIdBuilder_ == null ? serviceId_ : serviceIdBuilder_.build(); } if (((from_bitField0_ & 0x00000002) != 0)) { - result.details_ = detailsBuilder_ == null ? details_ : detailsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.opticalLinkUuid_ = opticalLinkUuidBuilder_ == null ? opticalLinkUuid_ : opticalLinkUuidBuilder_.build(); + result.configruleCustom_ = configruleCustomBuilder_ == null ? configruleCustom_ : configruleCustomBuilder_.build(); } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.OpticalLink) { - return mergeFrom((context.ContextOuterClass.OpticalLink) other); + if (other instanceof context.ContextOuterClass.ServiceConfigRule) { + return mergeFrom((context.ContextOuterClass.ServiceConfigRule) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.OpticalLink other) { - if (other == context.ContextOuterClass.OpticalLink.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.ServiceConfigRule other) { + if (other == context.ContextOuterClass.ServiceConfigRule.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasDetails()) { - mergeDetails(other.getDetails()); + if (other.hasServiceId()) { + mergeServiceId(other.getServiceId()); } - if (other.hasOpticalLinkUuid()) { - mergeOpticalLinkUuid(other.getOpticalLinkUuid()); + if (other.hasConfigruleCustom()) { + mergeConfigruleCustom(other.getConfigruleCustom()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -75948,25 +80430,18 @@ public final class ContextOuterClass { break; case 10: { - name_ = input.readStringRequireUtf8(); + input.readMessage(getServiceIdFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getDetailsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(getConfigruleCustomFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 - case 26: - { - input.readMessage(getOpticalLinkUuidFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } - // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -75990,315 +80465,240 @@ public final class ContextOuterClass { private int bitField0_; - private java.lang.Object name_ = ""; - - /** - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private context.ContextOuterClass.OpticalLinkDetails details_; + private context.ContextOuterClass.ServiceId serviceId_; - private com.google.protobuf.SingleFieldBuilderV3 detailsBuilder_; + private com.google.protobuf.SingleFieldBuilderV3 serviceIdBuilder_; /** - * .context.OpticalLinkDetails details = 2; - * @return Whether the details field is set. + * .context.ServiceId service_id = 1; + * @return Whether the serviceId field is set. */ - public boolean hasDetails() { - return ((bitField0_ & 0x00000002) != 0); + public boolean hasServiceId() { + return ((bitField0_ & 0x00000001) != 0); } /** - * .context.OpticalLinkDetails details = 2; - * @return The details. + * .context.ServiceId service_id = 1; + * @return The serviceId. */ - public context.ContextOuterClass.OpticalLinkDetails getDetails() { - if (detailsBuilder_ == null) { - return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; + public context.ContextOuterClass.ServiceId getServiceId() { + if (serviceIdBuilder_ == null) { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } else { - return detailsBuilder_.getMessage(); + return serviceIdBuilder_.getMessage(); } } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - public Builder setDetails(context.ContextOuterClass.OpticalLinkDetails value) { - if (detailsBuilder_ == null) { + public Builder setServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - details_ = value; + serviceId_ = value; } else { - detailsBuilder_.setMessage(value); + serviceIdBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - public Builder setDetails(context.ContextOuterClass.OpticalLinkDetails.Builder builderForValue) { - if (detailsBuilder_ == null) { - details_ = builderForValue.build(); + public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdBuilder_ == null) { + serviceId_ = builderForValue.build(); } else { - detailsBuilder_.setMessage(builderForValue.build()); + serviceIdBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - public Builder mergeDetails(context.ContextOuterClass.OpticalLinkDetails value) { - if (detailsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && details_ != null && details_ != context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance()) { - getDetailsBuilder().mergeFrom(value); + public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && serviceId_ != null && serviceId_ != context.ContextOuterClass.ServiceId.getDefaultInstance()) { + getServiceIdBuilder().mergeFrom(value); } else { - details_ = value; + serviceId_ = value; } } else { - detailsBuilder_.mergeFrom(value); + serviceIdBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - public Builder clearDetails() { - bitField0_ = (bitField0_ & ~0x00000002); - details_ = null; - if (detailsBuilder_ != null) { - detailsBuilder_.dispose(); - detailsBuilder_ = null; + public Builder clearServiceId() { + bitField0_ = (bitField0_ & ~0x00000001); + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); + serviceIdBuilder_ = null; } onChanged(); return this; } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - public context.ContextOuterClass.OpticalLinkDetails.Builder getDetailsBuilder() { - bitField0_ |= 0x00000002; + public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); - return getDetailsFieldBuilder().getBuilder(); + return getServiceIdFieldBuilder().getBuilder(); } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - public context.ContextOuterClass.OpticalLinkDetailsOrBuilder getDetailsOrBuilder() { - if (detailsBuilder_ != null) { - return detailsBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + if (serviceIdBuilder_ != null) { + return serviceIdBuilder_.getMessageOrBuilder(); } else { - return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - private com.google.protobuf.SingleFieldBuilderV3 getDetailsFieldBuilder() { - if (detailsBuilder_ == null) { - detailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDetails(), getParentForChildren(), isClean()); - details_ = null; + private com.google.protobuf.SingleFieldBuilderV3 getServiceIdFieldBuilder() { + if (serviceIdBuilder_ == null) { + serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceId(), getParentForChildren(), isClean()); + serviceId_ = null; } - return detailsBuilder_; + return serviceIdBuilder_; } - private context.ContextOuterClass.OpticalLinkId opticalLinkUuid_; + private context.ContextOuterClass.ConfigRule_Custom configruleCustom_; - private com.google.protobuf.SingleFieldBuilderV3 opticalLinkUuidBuilder_; + private com.google.protobuf.SingleFieldBuilderV3 configruleCustomBuilder_; /** - * .context.OpticalLinkId optical_link_uuid = 3; - * @return Whether the opticalLinkUuid field is set. + * .context.ConfigRule_Custom configrule_custom = 2; + * @return Whether the configruleCustom field is set. */ - public boolean hasOpticalLinkUuid() { - return ((bitField0_ & 0x00000004) != 0); + public boolean hasConfigruleCustom() { + return ((bitField0_ & 0x00000002) != 0); } /** - * .context.OpticalLinkId optical_link_uuid = 3; - * @return The opticalLinkUuid. + * .context.ConfigRule_Custom configrule_custom = 2; + * @return The configruleCustom. */ - public context.ContextOuterClass.OpticalLinkId getOpticalLinkUuid() { - if (opticalLinkUuidBuilder_ == null) { - return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; + public context.ContextOuterClass.ConfigRule_Custom getConfigruleCustom() { + if (configruleCustomBuilder_ == null) { + return configruleCustom_ == null ? context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance() : configruleCustom_; } else { - return opticalLinkUuidBuilder_.getMessage(); + return configruleCustomBuilder_.getMessage(); } } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - public Builder setOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId value) { - if (opticalLinkUuidBuilder_ == null) { + public Builder setConfigruleCustom(context.ContextOuterClass.ConfigRule_Custom value) { + if (configruleCustomBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - opticalLinkUuid_ = value; + configruleCustom_ = value; } else { - opticalLinkUuidBuilder_.setMessage(value); + configruleCustomBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - public Builder setOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId.Builder builderForValue) { - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuid_ = builderForValue.build(); + public Builder setConfigruleCustom(context.ContextOuterClass.ConfigRule_Custom.Builder builderForValue) { + if (configruleCustomBuilder_ == null) { + configruleCustom_ = builderForValue.build(); } else { - opticalLinkUuidBuilder_.setMessage(builderForValue.build()); + configruleCustomBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - public Builder mergeOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId value) { - if (opticalLinkUuidBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && opticalLinkUuid_ != null && opticalLinkUuid_ != context.ContextOuterClass.OpticalLinkId.getDefaultInstance()) { - getOpticalLinkUuidBuilder().mergeFrom(value); + public Builder mergeConfigruleCustom(context.ContextOuterClass.ConfigRule_Custom value) { + if (configruleCustomBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && configruleCustom_ != null && configruleCustom_ != context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance()) { + getConfigruleCustomBuilder().mergeFrom(value); } else { - opticalLinkUuid_ = value; + configruleCustom_ = value; } } else { - opticalLinkUuidBuilder_.mergeFrom(value); + configruleCustomBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - public Builder clearOpticalLinkUuid() { - bitField0_ = (bitField0_ & ~0x00000004); - opticalLinkUuid_ = null; - if (opticalLinkUuidBuilder_ != null) { - opticalLinkUuidBuilder_.dispose(); - opticalLinkUuidBuilder_ = null; + public Builder clearConfigruleCustom() { + bitField0_ = (bitField0_ & ~0x00000002); + configruleCustom_ = null; + if (configruleCustomBuilder_ != null) { + configruleCustomBuilder_.dispose(); + configruleCustomBuilder_ = null; } onChanged(); return this; } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - public context.ContextOuterClass.OpticalLinkId.Builder getOpticalLinkUuidBuilder() { - bitField0_ |= 0x00000004; + public context.ContextOuterClass.ConfigRule_Custom.Builder getConfigruleCustomBuilder() { + bitField0_ |= 0x00000002; onChanged(); - return getOpticalLinkUuidFieldBuilder().getBuilder(); + return getConfigruleCustomFieldBuilder().getBuilder(); } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - public context.ContextOuterClass.OpticalLinkIdOrBuilder getOpticalLinkUuidOrBuilder() { - if (opticalLinkUuidBuilder_ != null) { - return opticalLinkUuidBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.ConfigRule_CustomOrBuilder getConfigruleCustomOrBuilder() { + if (configruleCustomBuilder_ != null) { + return configruleCustomBuilder_.getMessageOrBuilder(); } else { - return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; + return configruleCustom_ == null ? context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance() : configruleCustom_; } } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - private com.google.protobuf.SingleFieldBuilderV3 getOpticalLinkUuidFieldBuilder() { - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalLinkUuid(), getParentForChildren(), isClean()); - opticalLinkUuid_ = null; + private com.google.protobuf.SingleFieldBuilderV3 getConfigruleCustomFieldBuilder() { + if (configruleCustomBuilder_ == null) { + configruleCustomBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getConfigruleCustom(), getParentForChildren(), isClean()); + configruleCustom_ = null; } - return opticalLinkUuidBuilder_; + return configruleCustomBuilder_; } @java.lang.Override @@ -76310,24 +80710,24 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.OpticalLink) + // @@protoc_insertion_point(builder_scope:context.ServiceConfigRule) } - // @@protoc_insertion_point(class_scope:context.OpticalLink) - private static final context.ContextOuterClass.OpticalLink DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.ServiceConfigRule) + private static final context.ContextOuterClass.ServiceConfigRule DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLink(); + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceConfigRule(); } - public static context.ContextOuterClass.OpticalLink getDefaultInstance() { + public static context.ContextOuterClass.ServiceConfigRule getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public OpticalLink parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public ServiceConfigRule parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); @@ -76342,17 +80742,17 @@ public final class ContextOuterClass { } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.OpticalLink getDefaultInstanceForType() { + public context.ContextOuterClass.ServiceConfigRule getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -76593,6 +80993,10 @@ public final class ContextOuterClass { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPoint_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPoint_CapabilitiesEntry_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPoint_CapabilitiesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPointName_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPointName_fieldAccessorTable; @@ -76661,6 +81065,14 @@ public final class ContextOuterClass { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_Exclusions_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_QoSProfileId_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_QoSProfileId_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_QoSProfile_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_QoSProfile_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_fieldAccessorTable; @@ -76685,26 +81097,42 @@ public final class ContextOuterClass { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalConfigList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkId_descriptor; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalConfigEvent_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkId_fieldAccessorTable; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalConfigEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_FiberId_descriptor; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalEndPointId_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_FiberId_fieldAccessorTable; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalEndPointId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Fiber_descriptor; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkList_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Fiber_fieldAccessorTable; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkList_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkDetails_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkDetails_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkDetails_CSlotsEntry_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkDetails_CSlotsEntry_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkDetails_LSlotsEntry_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkDetails_LSlotsEntry_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkDetails_SSlotsEntry_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkDetails_SSlotsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLink_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLink_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceConfigRule_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceConfigRule_fieldAccessorTable; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } @@ -76712,8 +81140,8 @@ public final class ContextOuterClass { private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { "\n\rcontext.proto\022\007context\032\tacl.proto\032\026kpi" + "_sample_types.proto\"\007\n\005Empty\"\024\n\004Uuid\022\014\n\004" + "uuid\030\001 \001(\t\"\036\n\tTimestamp\022\021\n\ttimestamp\030\001 \001" + "(\001\"Z\n\005Event\022%\n\ttimestamp\030\001 \001(\0132\022.context" + ".Timestamp\022*\n\nevent_type\030\002 \001(\0162\026.context" + ".EventTypeEnum\"0\n\tContextId\022#\n\014context_u" + "uid\030\001 \001(\0132\r.context.Uuid\"\351\001\n\007Context\022&\n\n" + "context_id\030\001 \001(\0132\022.context.ContextId\022\014\n\004" + "name\030\002 \001(\t\022)\n\014topology_ids\030\003 \003(\0132\023.conte" + "xt.TopologyId\022\'\n\013service_ids\030\004 \003(\0132\022.con" + "text.ServiceId\022#\n\tslice_ids\030\005 \003(\0132\020.cont" + "ext.SliceId\022/\n\ncontroller\030\006 \001(\0132\033.contex" + "t.TeraFlowController\"8\n\rContextIdList\022\'\n" + "\013context_ids\030\001 \003(\0132\022.context.ContextId\"1" + "\n\013ContextList\022\"\n\010contexts\030\001 \003(\0132\020.contex" + "t.Context\"U\n\014ContextEvent\022\035\n\005event\030\001 \001(\013" + "2\016.context.Event\022&\n\ncontext_id\030\002 \001(\0132\022.c" + "ontext.ContextId\"Z\n\nTopologyId\022&\n\ncontex" + "t_id\030\001 \001(\0132\022.context.ContextId\022$\n\rtopolo" + "gy_uuid\030\002 \001(\0132\r.context.Uuid\"\214\001\n\010Topolog" + "y\022(\n\013topology_id\030\001 \001(\0132\023.context.Topolog" + "yId\022\014\n\004name\030\002 \001(\t\022%\n\ndevice_ids\030\003 \003(\0132\021." + "context.DeviceId\022!\n\010link_ids\030\004 \003(\0132\017.con" + "text.LinkId\"\211\001\n\017TopologyDetails\022(\n\013topol" + "ogy_id\030\001 \001(\0132\023.context.TopologyId\022\014\n\004nam" + "e\030\002 \001(\t\022 \n\007devices\030\003 \003(\0132\017.context.Devic" + "e\022\034\n\005links\030\004 \003(\0132\r.context.Link\";\n\016Topol" + "ogyIdList\022)\n\014topology_ids\030\001 \003(\0132\023.contex" + "t.TopologyId\"5\n\014TopologyList\022%\n\ntopologi" + "es\030\001 \003(\0132\021.context.Topology\"X\n\rTopologyE" + "vent\022\035\n\005event\030\001 \001(\0132\016.context.Event\022(\n\013t" + "opology_id\030\002 \001(\0132\023.context.TopologyId\".\n" + "\010DeviceId\022\"\n\013device_uuid\030\001 \001(\0132\r.context" + ".Uuid\"\372\002\n\006Device\022$\n\tdevice_id\030\001 \001(\0132\021.co" + "ntext.DeviceId\022\014\n\004name\030\002 \001(\t\022\023\n\013device_t" + "ype\030\003 \001(\t\022,\n\rdevice_config\030\004 \001(\0132\025.conte" + "xt.DeviceConfig\022G\n\031device_operational_st" + "atus\030\005 \001(\0162$.context.DeviceOperationalSt" + "atusEnum\0221\n\016device_drivers\030\006 \003(\0162\031.conte" + "xt.DeviceDriverEnum\022+\n\020device_endpoints\030" + "\007 \003(\0132\021.context.EndPoint\022&\n\ncomponents\030\010" + " \003(\0132\022.context.Component\022(\n\rcontroller_i" + "d\030\t \001(\0132\021.context.DeviceId\"\311\001\n\tComponent" + "\022%\n\016component_uuid\030\001 \001(\0132\r.context.Uuid\022" + "\014\n\004name\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\0226\n\nattribute" + "s\030\004 \003(\0132\".context.Component.AttributesEn" + "try\022\016\n\006parent\030\005 \001(\t\0321\n\017AttributesEntry\022\013" + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"9\n\014Device" + "Config\022)\n\014config_rules\030\001 \003(\0132\023.context.C" + "onfigRule\"5\n\014DeviceIdList\022%\n\ndevice_ids\030" + "\001 \003(\0132\021.context.DeviceId\".\n\nDeviceList\022 " + "\n\007devices\030\001 \003(\0132\017.context.Device\"\216\001\n\014Dev" + "iceFilter\022)\n\ndevice_ids\030\001 \001(\0132\025.context." + "DeviceIdList\022\031\n\021include_endpoints\030\002 \001(\010\022" + "\034\n\024include_config_rules\030\003 \001(\010\022\032\n\022include" + "_components\030\004 \001(\010\"\200\001\n\013DeviceEvent\022\035\n\005eve" + "nt\030\001 \001(\0132\016.context.Event\022$\n\tdevice_id\030\002 " + "\001(\0132\021.context.DeviceId\022,\n\rdevice_config\030" + "\003 \001(\0132\025.context.DeviceConfig\"*\n\006LinkId\022 " + "\n\tlink_uuid\030\001 \001(\0132\r.context.Uuid\"I\n\016Link" + "Attributes\022\033\n\023total_capacity_gbps\030\001 \001(\002\022" + "\032\n\022used_capacity_gbps\030\002 \001(\002\"\223\001\n\004Link\022 \n\007" + "link_id\030\001 \001(\0132\017.context.LinkId\022\014\n\004name\030\002" + " \001(\t\022.\n\021link_endpoint_ids\030\003 \003(\0132\023.contex" + "t.EndPointId\022+\n\nattributes\030\004 \001(\0132\027.conte" + "xt.LinkAttributes\"/\n\nLinkIdList\022!\n\010link_" + "ids\030\001 \003(\0132\017.context.LinkId\"(\n\010LinkList\022\034" + "\n\005links\030\001 \003(\0132\r.context.Link\"L\n\tLinkEven" + "t\022\035\n\005event\030\001 \001(\0132\016.context.Event\022 \n\007link" + "_id\030\002 \001(\0132\017.context.LinkId\"X\n\tServiceId\022" + "&\n\ncontext_id\030\001 \001(\0132\022.context.ContextId\022" + "#\n\014service_uuid\030\002 \001(\0132\r.context.Uuid\"\333\002\n" + "\007Service\022&\n\nservice_id\030\001 \001(\0132\022.context.S" + "erviceId\022\014\n\004name\030\002 \001(\t\022.\n\014service_type\030\003" + " \001(\0162\030.context.ServiceTypeEnum\0221\n\024servic" + "e_endpoint_ids\030\004 \003(\0132\023.context.EndPointI" + "d\0220\n\023service_constraints\030\005 \003(\0132\023.context" + ".Constraint\022.\n\016service_status\030\006 \001(\0132\026.co" + "ntext.ServiceStatus\022.\n\016service_config\030\007 " + "\001(\0132\026.context.ServiceConfig\022%\n\ttimestamp" + "\030\010 \001(\0132\022.context.Timestamp\"C\n\rServiceSta" + "tus\0222\n\016service_status\030\001 \001(\0162\032.context.Se" + "rviceStatusEnum\":\n\rServiceConfig\022)\n\014conf" + "ig_rules\030\001 \003(\0132\023.context.ConfigRule\"8\n\rS" + "erviceIdList\022\'\n\013service_ids\030\001 \003(\0132\022.cont" + "ext.ServiceId\"1\n\013ServiceList\022\"\n\010services" + "\030\001 \003(\0132\020.context.Service\"\225\001\n\rServiceFilt" + "er\022+\n\013service_ids\030\001 \001(\0132\026.context.Servic" + "eIdList\022\034\n\024include_endpoint_ids\030\002 \001(\010\022\033\n" + "\023include_constraints\030\003 \001(\010\022\034\n\024include_co" + "nfig_rules\030\004 \001(\010\"U\n\014ServiceEvent\022\035\n\005even" + "t\030\001 \001(\0132\016.context.Event\022&\n\nservice_id\030\002 " + "\001(\0132\022.context.ServiceId\"T\n\007SliceId\022&\n\nco" + "ntext_id\030\001 \001(\0132\022.context.ContextId\022!\n\nsl" + "ice_uuid\030\002 \001(\0132\r.context.Uuid\"\240\003\n\005Slice\022" + "\"\n\010slice_id\030\001 \001(\0132\020.context.SliceId\022\014\n\004n" + "ame\030\002 \001(\t\022/\n\022slice_endpoint_ids\030\003 \003(\0132\023." + "context.EndPointId\022.\n\021slice_constraints\030" + "\004 \003(\0132\023.context.Constraint\022-\n\021slice_serv" + "ice_ids\030\005 \003(\0132\022.context.ServiceId\022,\n\022sli" + "ce_subslice_ids\030\006 \003(\0132\020.context.SliceId\022" + "*\n\014slice_status\030\007 \001(\0132\024.context.SliceSta" + "tus\022*\n\014slice_config\030\010 \001(\0132\024.context.Slic" + "eConfig\022(\n\013slice_owner\030\t \001(\0132\023.context.S" + "liceOwner\022%\n\ttimestamp\030\n \001(\0132\022.context.T" + "imestamp\"E\n\nSliceOwner\022!\n\nowner_uuid\030\001 \001" + "(\0132\r.context.Uuid\022\024\n\014owner_string\030\002 \001(\t\"" + "=\n\013SliceStatus\022.\n\014slice_status\030\001 \001(\0162\030.c" + "ontext.SliceStatusEnum\"8\n\013SliceConfig\022)\n" + "\014config_rules\030\001 \003(\0132\023.context.ConfigRule" + "\"2\n\013SliceIdList\022#\n\tslice_ids\030\001 \003(\0132\020.con" + "text.SliceId\"+\n\tSliceList\022\036\n\006slices\030\001 \003(" + "\0132\016.context.Slice\"\312\001\n\013SliceFilter\022\'\n\tsli" + "ce_ids\030\001 \001(\0132\024.context.SliceIdList\022\034\n\024in" + "clude_endpoint_ids\030\002 \001(\010\022\033\n\023include_cons" + "traints\030\003 \001(\010\022\033\n\023include_service_ids\030\004 \001" + "(\010\022\034\n\024include_subslice_ids\030\005 \001(\010\022\034\n\024incl" + "ude_config_rules\030\006 \001(\010\"O\n\nSliceEvent\022\035\n\005" + "event\030\001 \001(\0132\016.context.Event\022\"\n\010slice_id\030" + "\002 \001(\0132\020.context.SliceId\"6\n\014ConnectionId\022" + "&\n\017connection_uuid\030\001 \001(\0132\r.context.Uuid\"" + "2\n\025ConnectionSettings_L0\022\031\n\021lsp_symbolic" + "_name\030\001 \001(\t\"\236\001\n\025ConnectionSettings_L2\022\027\n" + "\017src_mac_address\030\001 \001(\t\022\027\n\017dst_mac_addres" + "s\030\002 \001(\t\022\022\n\nether_type\030\003 \001(\r\022\017\n\007vlan_id\030\004" + " \001(\r\022\022\n\nmpls_label\030\005 \001(\r\022\032\n\022mpls_traffic" + "_class\030\006 \001(\r\"t\n\025ConnectionSettings_L3\022\026\n" + "\016src_ip_address\030\001 \001(\t\022\026\n\016dst_ip_address\030" + "\002 \001(\t\022\014\n\004dscp\030\003 \001(\r\022\020\n\010protocol\030\004 \001(\r\022\013\n" + "\003ttl\030\005 \001(\r\"[\n\025ConnectionSettings_L4\022\020\n\010s" + "rc_port\030\001 \001(\r\022\020\n\010dst_port\030\002 \001(\r\022\021\n\ttcp_f" + "lags\030\003 \001(\r\022\013\n\003ttl\030\004 \001(\r\"\304\001\n\022ConnectionSe" + "ttings\022*\n\002l0\030\001 \001(\0132\036.context.ConnectionS" + "ettings_L0\022*\n\002l2\030\002 \001(\0132\036.context.Connect" + "ionSettings_L2\022*\n\002l3\030\003 \001(\0132\036.context.Con" + "nectionSettings_L3\022*\n\002l4\030\004 \001(\0132\036.context" + ".ConnectionSettings_L4\"\363\001\n\nConnection\022,\n" + "\rconnection_id\030\001 \001(\0132\025.context.Connectio" + "nId\022&\n\nservice_id\030\002 \001(\0132\022.context.Servic" + "eId\0223\n\026path_hops_endpoint_ids\030\003 \003(\0132\023.co" + "ntext.EndPointId\022+\n\017sub_service_ids\030\004 \003(" + "\0132\022.context.ServiceId\022-\n\010settings\030\005 \001(\0132" + "\033.context.ConnectionSettings\"A\n\020Connecti" + "onIdList\022-\n\016connection_ids\030\001 \003(\0132\025.conte" + "xt.ConnectionId\":\n\016ConnectionList\022(\n\013con" + "nections\030\001 \003(\0132\023.context.Connection\"^\n\017C" + "onnectionEvent\022\035\n\005event\030\001 \001(\0132\016.context." + "Event\022,\n\rconnection_id\030\002 \001(\0132\025.context.C" + "onnectionId\"\202\001\n\nEndPointId\022(\n\013topology_i" + "d\030\001 \001(\0132\023.context.TopologyId\022$\n\tdevice_i" + "d\030\002 \001(\0132\021.context.DeviceId\022$\n\rendpoint_u" + "uid\030\003 \001(\0132\r.context.Uuid\"\302\001\n\010EndPoint\022(\n" + "\013endpoint_id\030\001 \001(\0132\023.context.EndPointId\022" + "\014\n\004name\030\002 \001(\t\022\025\n\rendpoint_type\030\003 \001(\t\0229\n\020" + "kpi_sample_types\030\004 \003(\0162\037.kpi_sample_type" + "s.KpiSampleType\022,\n\021endpoint_location\030\005 \001" + "(\0132\021.context.Location\"{\n\014EndPointName\022(\n" + "\013endpoint_id\030\001 \001(\0132\023.context.EndPointId\022" + "\023\n\013device_name\030\002 \001(\t\022\025\n\rendpoint_name\030\003 " + "\001(\t\022\025\n\rendpoint_type\030\004 \001(\t\";\n\016EndPointId" + "List\022)\n\014endpoint_ids\030\001 \003(\0132\023.context.End" + "PointId\"A\n\020EndPointNameList\022-\n\016endpoint_" + "names\030\001 \003(\0132\025.context.EndPointName\"A\n\021Co" + "nfigRule_Custom\022\024\n\014resource_key\030\001 \001(\t\022\026\n" + "\016resource_value\030\002 \001(\t\"]\n\016ConfigRule_ACL\022" + "(\n\013endpoint_id\030\001 \001(\0132\023.context.EndPointI" + "d\022!\n\010rule_set\030\002 \001(\0132\017.acl.AclRuleSet\"\234\001\n" + "\nConfigRule\022)\n\006action\030\001 \001(\0162\031.context.Co" + "nfigActionEnum\022,\n\006custom\030\002 \001(\0132\032.context" + ".ConfigRule_CustomH\000\022&\n\003acl\030\003 \001(\0132\027.cont" + "ext.ConfigRule_ACLH\000B\r\n\013config_rule\"F\n\021C" + "onstraint_Custom\022\027\n\017constraint_type\030\001 \001(" + "\t\022\030\n\020constraint_value\030\002 \001(\t\"E\n\023Constrain" + "t_Schedule\022\027\n\017start_timestamp\030\001 \001(\002\022\025\n\rd" + "uration_days\030\002 \001(\002\"3\n\014GPS_Position\022\020\n\010la" + "titude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001(\002\"W\n\010Locat" + "ion\022\020\n\006region\030\001 \001(\tH\000\022-\n\014gps_position\030\002 " + "\001(\0132\025.context.GPS_PositionH\000B\n\n\010location" + "\"l\n\033Constraint_EndPointLocation\022(\n\013endpo" + "int_id\030\001 \001(\0132\023.context.EndPointId\022#\n\010loc" + "ation\030\002 \001(\0132\021.context.Location\"Y\n\033Constr" + "aint_EndPointPriority\022(\n\013endpoint_id\030\001 \001" + "(\0132\023.context.EndPointId\022\020\n\010priority\030\002 \001(" + "\r\"0\n\026Constraint_SLA_Latency\022\026\n\016e2e_laten" + "cy_ms\030\001 \001(\002\"0\n\027Constraint_SLA_Capacity\022\025" + "\n\rcapacity_gbps\030\001 \001(\002\"c\n\033Constraint_SLA_" + "Availability\022\032\n\022num_disjoint_paths\030\001 \001(\r" + "\022\022\n\nall_active\030\002 \001(\010\022\024\n\014availability\030\003 \001" + "(\002\"V\n\036Constraint_SLA_Isolation_level\0224\n\017" + "isolation_level\030\001 \003(\0162\033.context.Isolatio" + "nLevelEnum\"\242\001\n\025Constraint_Exclusions\022\024\n\014" + "is_permanent\030\001 \001(\010\022%\n\ndevice_ids\030\002 \003(\0132\021" + ".context.DeviceId\022)\n\014endpoint_ids\030\003 \003(\0132" + "\023.context.EndPointId\022!\n\010link_ids\030\004 \003(\0132\017" + ".context.LinkId\"\333\004\n\nConstraint\022-\n\006action" + "\030\001 \001(\0162\035.context.ConstraintActionEnum\022,\n" + "\006custom\030\002 \001(\0132\032.context.Constraint_Custo" + "mH\000\0220\n\010schedule\030\003 \001(\0132\034.context.Constrai" + "nt_ScheduleH\000\022A\n\021endpoint_location\030\004 \001(\013" + "2$.context.Constraint_EndPointLocationH\000" + "\022A\n\021endpoint_priority\030\005 \001(\0132$.context.Co" + "nstraint_EndPointPriorityH\000\0228\n\014sla_capac" + "ity\030\006 \001(\0132 .context.Constraint_SLA_Capac" + "ityH\000\0226\n\013sla_latency\030\007 \001(\0132\037.context.Con" + "straint_SLA_LatencyH\000\022@\n\020sla_availabilit" + "y\030\010 \001(\0132$.context.Constraint_SLA_Availab" + "ilityH\000\022@\n\rsla_isolation\030\t \001(\0132\'.context" + ".Constraint_SLA_Isolation_levelH\000\0224\n\nexc" + "lusions\030\n \001(\0132\036.context.Constraint_Exclu" + "sionsH\000B\014\n\nconstraint\"^\n\022TeraFlowControl" + "ler\022&\n\ncontext_id\030\001 \001(\0132\022.context.Contex" + "tId\022\022\n\nip_address\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n" + "\024AuthenticationResult\022&\n\ncontext_id\030\001 \001(" + "\0132\022.context.ContextId\022\025\n\rauthenticated\030\002" + " \001(\010\"-\n\017OpticalConfigId\022\032\n\022opticalconfig" + "_uuid\030\001 \001(\t\"S\n\rOpticalConfig\0222\n\020opticalc" + "onfig_id\030\001 \001(\0132\030.context.OpticalConfigId" + "\022\016\n\006config\030\002 \001(\t\"C\n\021OpticalConfigList\022.\n" + "\016opticalconfigs\030\001 \003(\0132\026.context.OpticalC" + "onfig\"9\n\rOpticalLinkId\022(\n\021optical_link_u" + "uid\030\001 \001(\0132\r.context.Uuid\",\n\007FiberId\022!\n\nf" + "iber_uuid\030\001 \001(\0132\r.context.Uuid\"\341\001\n\005Fiber" + "\022\n\n\002ID\030\n \001(\t\022\020\n\010src_port\030\001 \001(\t\022\020\n\010dst_po" + "rt\030\002 \001(\t\022\027\n\017local_peer_port\030\003 \001(\t\022\030\n\020rem" + "ote_peer_port\030\004 \001(\t\022\017\n\007c_slots\030\005 \003(\005\022\017\n\007" + "l_slots\030\006 \003(\005\022\017\n\007s_slots\030\007 \003(\005\022\016\n\006length" + "\030\010 \001(\002\022\014\n\004used\030\t \001(\010\022$\n\nfiber_uuid\030\013 \001(\013" + "2\020.context.FiberId\"d\n\022OpticalLinkDetails" + "\022\016\n\006length\030\001 \001(\002\022\016\n\006source\030\002 \001(\t\022\016\n\006targ" + "et\030\003 \001(\t\022\036\n\006fibers\030\004 \003(\0132\016.context.Fiber" + "\"|\n\013OpticalLink\022\014\n\004name\030\001 \001(\t\022,\n\007details" + "\030\002 \001(\0132\033.context.OpticalLinkDetails\0221\n\021o" + "ptical_link_uuid\030\003 \001(\0132\026.context.Optical" + "LinkId*j\n\rEventTypeEnum\022\027\n\023EVENTTYPE_UND" + "EFINED\020\000\022\024\n\020EVENTTYPE_CREATE\020\001\022\024\n\020EVENTT" + "YPE_UPDATE\020\002\022\024\n\020EVENTTYPE_REMOVE\020\003*\376\002\n\020D" + "eviceDriverEnum\022\032\n\026DEVICEDRIVER_UNDEFINE" + "D\020\000\022\033\n\027DEVICEDRIVER_OPENCONFIG\020\001\022\036\n\032DEVI" + "CEDRIVER_TRANSPORT_API\020\002\022\023\n\017DEVICEDRIVER" + "_P4\020\003\022&\n\"DEVICEDRIVER_IETF_NETWORK_TOPOL" + "OGY\020\004\022\033\n\027DEVICEDRIVER_ONF_TR_532\020\005\022\023\n\017DE" + "VICEDRIVER_XR\020\006\022\033\n\027DEVICEDRIVER_IETF_L2V" + "PN\020\007\022 \n\034DEVICEDRIVER_GNMI_OPENCONFIG\020\010\022\034" + "\n\030DEVICEDRIVER_OPTICAL_TFS\020\t\022\032\n\026DEVICEDR" + "IVER_IETF_ACTN\020\n\022\023\n\017DEVICEDRIVER_OC\020\013\022\024\n" + "\020DEVICEDRIVER_QKD\020\014*\217\001\n\033DeviceOperationa" + "lStatusEnum\022%\n!DEVICEOPERATIONALSTATUS_U" + "NDEFINED\020\000\022$\n DEVICEOPERATIONALSTATUS_DI" + "SABLED\020\001\022#\n\037DEVICEOPERATIONALSTATUS_ENAB" + "LED\020\002*\345\001\n\017ServiceTypeEnum\022\027\n\023SERVICETYPE" + "_UNKNOWN\020\000\022\024\n\020SERVICETYPE_L3NM\020\001\022\024\n\020SERV" + "ICETYPE_L2NM\020\002\022)\n%SERVICETYPE_TAPI_CONNE" + "CTIVITY_SERVICE\020\003\022\022\n\016SERVICETYPE_TE\020\004\022\023\n" + "\017SERVICETYPE_E2E\020\005\022$\n SERVICETYPE_OPTICA" + "L_CONNECTIVITY\020\006\022\023\n\017SERVICETYPE_QKD\020\007*\304\001" + "\n\021ServiceStatusEnum\022\033\n\027SERVICESTATUS_UND" + "EFINED\020\000\022\031\n\025SERVICESTATUS_PLANNED\020\001\022\030\n\024S" + "ERVICESTATUS_ACTIVE\020\002\022\032\n\026SERVICESTATUS_U" + "PDATING\020\003\022!\n\035SERVICESTATUS_PENDING_REMOV" + "AL\020\004\022\036\n\032SERVICESTATUS_SLA_VIOLATED\020\005*\251\001\n" + "\017SliceStatusEnum\022\031\n\025SLICESTATUS_UNDEFINE" + "D\020\000\022\027\n\023SLICESTATUS_PLANNED\020\001\022\024\n\020SLICESTA" + "TUS_INIT\020\002\022\026\n\022SLICESTATUS_ACTIVE\020\003\022\026\n\022SL" + "ICESTATUS_DEINIT\020\004\022\034\n\030SLICESTATUS_SLA_VI" + "OLATED\020\005*]\n\020ConfigActionEnum\022\032\n\026CONFIGAC" + "TION_UNDEFINED\020\000\022\024\n\020CONFIGACTION_SET\020\001\022\027" + "\n\023CONFIGACTION_DELETE\020\002*m\n\024ConstraintAct" + "ionEnum\022\036\n\032CONSTRAINTACTION_UNDEFINED\020\000\022" + "\030\n\024CONSTRAINTACTION_SET\020\001\022\033\n\027CONSTRAINTA" + "CTION_DELETE\020\002*\203\002\n\022IsolationLevelEnum\022\020\n" + "\014NO_ISOLATION\020\000\022\026\n\022PHYSICAL_ISOLATION\020\001\022" + "\025\n\021LOGICAL_ISOLATION\020\002\022\025\n\021PROCESS_ISOLAT" + "ION\020\003\022\035\n\031PHYSICAL_MEMORY_ISOLATION\020\004\022\036\n\032" + "PHYSICAL_NETWORK_ISOLATION\020\005\022\036\n\032VIRTUAL_" + "RESOURCE_ISOLATION\020\006\022\037\n\033NETWORK_FUNCTION" + "S_ISOLATION\020\007\022\025\n\021SERVICE_ISOLATION\020\0102\246\031\n" + "\016ContextService\022:\n\016ListContextIds\022\016.cont" + "ext.Empty\032\026.context.ContextIdList\"\000\0226\n\014L" + "istContexts\022\016.context.Empty\032\024.context.Co" + "ntextList\"\000\0224\n\nGetContext\022\022.context.Cont" + "extId\032\020.context.Context\"\000\0224\n\nSetContext\022" + "\020.context.Context\032\022.context.ContextId\"\000\022" + "5\n\rRemoveContext\022\022.context.ContextId\032\016.c" + "ontext.Empty\"\000\022=\n\020GetContextEvents\022\016.con" + "text.Empty\032\025.context.ContextEvent\"\0000\001\022@\n" + "\017ListTopologyIds\022\022.context.ContextId\032\027.c" + "ontext.TopologyIdList\"\000\022=\n\016ListTopologie" + "s\022\022.context.ContextId\032\025.context.Topology" + "List\"\000\0227\n\013GetTopology\022\023.context.Topology" + "Id\032\021.context.Topology\"\000\022E\n\022GetTopologyDe" + "tails\022\023.context.TopologyId\032\030.context.Top" + "ologyDetails\"\000\0227\n\013SetTopology\022\021.context." + "Topology\032\023.context.TopologyId\"\000\0227\n\016Remov" + "eTopology\022\023.context.TopologyId\032\016.context" + ".Empty\"\000\022?\n\021GetTopologyEvents\022\016.context." + "Empty\032\026.context.TopologyEvent\"\0000\001\0228\n\rLis" + "tDeviceIds\022\016.context.Empty\032\025.context.Dev" + "iceIdList\"\000\0224\n\013ListDevices\022\016.context.Emp" + "ty\032\023.context.DeviceList\"\000\0221\n\tGetDevice\022\021" + ".context.DeviceId\032\017.context.Device\"\000\0221\n\t" + "SetDevice\022\017.context.Device\032\021.context.Dev" + "iceId\"\000\0223\n\014RemoveDevice\022\021.context.Device" + "Id\032\016.context.Empty\"\000\022;\n\017GetDeviceEvents\022" + "\016.context.Empty\032\024.context.DeviceEvent\"\0000" + "\001\022<\n\014SelectDevice\022\025.context.DeviceFilter" + "\032\023.context.DeviceList\"\000\022I\n\021ListEndPointN" + "ames\022\027.context.EndPointIdList\032\031.context." + "EndPointNameList\"\000\0224\n\013ListLinkIds\022\016.cont" + "ext.Empty\032\023.context.LinkIdList\"\000\0220\n\tList" + "Links\022\016.context.Empty\032\021.context.LinkList" + "\"\000\022+\n\007GetLink\022\017.context.LinkId\032\r.context" + ".Link\"\000\022+\n\007SetLink\022\r.context.Link\032\017.cont" + "ext.LinkId\"\000\022/\n\nRemoveLink\022\017.context.Lin" + "kId\032\016.context.Empty\"\000\0227\n\rGetLinkEvents\022\016" + ".context.Empty\032\022.context.LinkEvent\"\0000\001\022>" + "\n\016ListServiceIds\022\022.context.ContextId\032\026.c" + "ontext.ServiceIdList\"\000\022:\n\014ListServices\022\022" + ".context.ContextId\032\024.context.ServiceList" + "\"\000\0224\n\nGetService\022\022.context.ServiceId\032\020.c" + "ontext.Service\"\000\0224\n\nSetService\022\020.context" + ".Service\032\022.context.ServiceId\"\000\0226\n\014UnsetS" + "ervice\022\020.context.Service\032\022.context.Servi" + "ceId\"\000\0225\n\rRemoveService\022\022.context.Servic" + "eId\032\016.context.Empty\"\000\022=\n\020GetServiceEvent" + "s\022\016.context.Empty\032\025.context.ServiceEvent" + "\"\0000\001\022?\n\rSelectService\022\026.context.ServiceF" + "ilter\032\024.context.ServiceList\"\000\022:\n\014ListSli" + "ceIds\022\022.context.ContextId\032\024.context.Slic" + "eIdList\"\000\0226\n\nListSlices\022\022.context.Contex" + "tId\032\022.context.SliceList\"\000\022.\n\010GetSlice\022\020." + "context.SliceId\032\016.context.Slice\"\000\022.\n\010Set" + "Slice\022\016.context.Slice\032\020.context.SliceId\"" + "\000\0220\n\nUnsetSlice\022\016.context.Slice\032\020.contex" + "t.SliceId\"\000\0221\n\013RemoveSlice\022\020.context.Sli" + "ceId\032\016.context.Empty\"\000\0229\n\016GetSliceEvents" + "\022\016.context.Empty\032\023.context.SliceEvent\"\0000" + "\001\0229\n\013SelectSlice\022\024.context.SliceFilter\032\022" + ".context.SliceList\"\000\022D\n\021ListConnectionId" + "s\022\022.context.ServiceId\032\031.context.Connecti" + "onIdList\"\000\022@\n\017ListConnections\022\022.context." + "ServiceId\032\027.context.ConnectionList\"\000\022=\n\r" + "GetConnection\022\025.context.ConnectionId\032\023.c" + "ontext.Connection\"\000\022=\n\rSetConnection\022\023.c" + "ontext.Connection\032\025.context.ConnectionId" + "\"\000\022;\n\020RemoveConnection\022\025.context.Connect" + "ionId\032\016.context.Empty\"\000\022C\n\023GetConnection" + "Events\022\016.context.Empty\032\030.context.Connect" + "ionEvent\"\0000\001\022@\n\020GetOpticalConfig\022\016.conte" + "xt.Empty\032\032.context.OpticalConfigList\"\000\022F" + "\n\020SetOpticalConfig\022\026.context.OpticalConf" + "ig\032\030.context.OpticalConfigId\"\000\022I\n\023Select" + "OpticalConfig\022\030.context.OpticalConfigId\032" + "\026.context.OpticalConfig\"\000\0228\n\016SetOpticalL" + "ink\022\024.context.OpticalLink\032\016.context.Empt" + "y\"\000\022@\n\016GetOpticalLink\022\026.context.OpticalL" + "inkId\032\024.context.OpticalLink\"\000\022.\n\010GetFibe" + "r\022\020.context.FiberId\032\016.context.Fiber\"\000b\006p" + "roto3" }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { acl.Acl.getDescriptor(), kpi_sample_types.KpiSampleTypes.getDescriptor() }); + java.lang.String[] descriptorData = { "\n\rcontext.proto\022\007context\032\031google/protobu" + "f/any.proto\032\tacl.proto\032\026kpi_sample_types" + ".proto\"\007\n\005Empty\"\024\n\004Uuid\022\014\n\004uuid\030\001 \001(\t\"\036\n" + "\tTimestamp\022\021\n\ttimestamp\030\001 \001(\001\"Z\n\005Event\022%" + "\n\ttimestamp\030\001 \001(\0132\022.context.Timestamp\022*\n" + "\nevent_type\030\002 \001(\0162\026.context.EventTypeEnu" + "m\"0\n\tContextId\022#\n\014context_uuid\030\001 \001(\0132\r.c" + "ontext.Uuid\"\351\001\n\007Context\022&\n\ncontext_id\030\001 " + "\001(\0132\022.context.ContextId\022\014\n\004name\030\002 \001(\t\022)\n" + "\014topology_ids\030\003 \003(\0132\023.context.TopologyId" + "\022\'\n\013service_ids\030\004 \003(\0132\022.context.ServiceI" + "d\022#\n\tslice_ids\030\005 \003(\0132\020.context.SliceId\022/" + "\n\ncontroller\030\006 \001(\0132\033.context.TeraFlowCon" + "troller\"8\n\rContextIdList\022\'\n\013context_ids\030" + "\001 \003(\0132\022.context.ContextId\"1\n\013ContextList" + "\022\"\n\010contexts\030\001 \003(\0132\020.context.Context\"U\n\014" + "ContextEvent\022\035\n\005event\030\001 \001(\0132\016.context.Ev" + "ent\022&\n\ncontext_id\030\002 \001(\0132\022.context.Contex" + "tId\"Z\n\nTopologyId\022&\n\ncontext_id\030\001 \001(\0132\022." + "context.ContextId\022$\n\rtopology_uuid\030\002 \001(\013" + "2\r.context.Uuid\"\267\001\n\010Topology\022(\n\013topology" + "_id\030\001 \001(\0132\023.context.TopologyId\022\014\n\004name\030\002" + " \001(\t\022%\n\ndevice_ids\030\003 \003(\0132\021.context.Devic" + "eId\022!\n\010link_ids\030\004 \003(\0132\017.context.LinkId\022)" + "\n\020optical_link_ids\030\005 \003(\0132\017.context.LinkI" + "d\"\266\001\n\017TopologyDetails\022(\n\013topology_id\030\001 \001" + "(\0132\023.context.TopologyId\022\014\n\004name\030\002 \001(\t\022 \n" + "\007devices\030\003 \003(\0132\017.context.Device\022\034\n\005links" + "\030\004 \003(\0132\r.context.Link\022+\n\roptical_links\030\005" + " \003(\0132\024.context.OpticalLink\";\n\016TopologyId" + "List\022)\n\014topology_ids\030\001 \003(\0132\023.context.Top" + "ologyId\"5\n\014TopologyList\022%\n\ntopologies\030\001 " + "\003(\0132\021.context.Topology\"X\n\rTopologyEvent\022" + "\035\n\005event\030\001 \001(\0132\016.context.Event\022(\n\013topolo" + "gy_id\030\002 \001(\0132\023.context.TopologyId\".\n\010Devi" + "ceId\022\"\n\013device_uuid\030\001 \001(\0132\r.context.Uuid" + "\"\372\002\n\006Device\022$\n\tdevice_id\030\001 \001(\0132\021.context" + ".DeviceId\022\014\n\004name\030\002 \001(\t\022\023\n\013device_type\030\003" + " \001(\t\022,\n\rdevice_config\030\004 \001(\0132\025.context.De" + "viceConfig\022G\n\031device_operational_status\030" + "\005 \001(\0162$.context.DeviceOperationalStatusE" + "num\0221\n\016device_drivers\030\006 \003(\0162\031.context.De" + "viceDriverEnum\022+\n\020device_endpoints\030\007 \003(\013" + "2\021.context.EndPoint\022&\n\ncomponents\030\010 \003(\0132" + "\022.context.Component\022(\n\rcontroller_id\030\t \001" + "(\0132\021.context.DeviceId\"\311\001\n\tComponent\022%\n\016c" + "omponent_uuid\030\001 \001(\0132\r.context.Uuid\022\014\n\004na" + "me\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\0226\n\nattributes\030\004 \003" + "(\0132\".context.Component.AttributesEntry\022\016" + "\n\006parent\030\005 \001(\t\0321\n\017AttributesEntry\022\013\n\003key" + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"9\n\014DeviceConfi" + "g\022)\n\014config_rules\030\001 \003(\0132\023.context.Config" + "Rule\"5\n\014DeviceIdList\022%\n\ndevice_ids\030\001 \003(\013" + "2\021.context.DeviceId\".\n\nDeviceList\022 \n\007dev" + "ices\030\001 \003(\0132\017.context.Device\"\216\001\n\014DeviceFi" + "lter\022)\n\ndevice_ids\030\001 \001(\0132\025.context.Devic" + "eIdList\022\031\n\021include_endpoints\030\002 \001(\010\022\034\n\024in" + "clude_config_rules\030\003 \001(\010\022\032\n\022include_comp" + "onents\030\004 \001(\010\"\200\001\n\013DeviceEvent\022\035\n\005event\030\001 " + "\001(\0132\016.context.Event\022$\n\tdevice_id\030\002 \001(\0132\021" + ".context.DeviceId\022,\n\rdevice_config\030\003 \001(\013" + "2\025.context.DeviceConfig\"*\n\006LinkId\022 \n\tlin" + "k_uuid\030\001 \001(\0132\r.context.Uuid\"I\n\016LinkAttri" + "butes\022\033\n\023total_capacity_gbps\030\001 \001(\002\022\032\n\022us" + "ed_capacity_gbps\030\002 \001(\002\"\275\001\n\004Link\022 \n\007link_" + "id\030\001 \001(\0132\017.context.LinkId\022\014\n\004name\030\002 \001(\t\022" + "(\n\tlink_type\030\003 \001(\0162\025.context.LinkTypeEnu" + "m\022.\n\021link_endpoint_ids\030\004 \003(\0132\023.context.E" + "ndPointId\022+\n\nattributes\030\005 \001(\0132\027.context." + "LinkAttributes\"/\n\nLinkIdList\022!\n\010link_ids" + "\030\001 \003(\0132\017.context.LinkId\"(\n\010LinkList\022\034\n\005l" + "inks\030\001 \003(\0132\r.context.Link\"L\n\tLinkEvent\022\035" + "\n\005event\030\001 \001(\0132\016.context.Event\022 \n\007link_id" + "\030\002 \001(\0132\017.context.LinkId\"X\n\tServiceId\022&\n\n" + "context_id\030\001 \001(\0132\022.context.ContextId\022#\n\014" + "service_uuid\030\002 \001(\0132\r.context.Uuid\"\333\002\n\007Se" + "rvice\022&\n\nservice_id\030\001 \001(\0132\022.context.Serv" + "iceId\022\014\n\004name\030\002 \001(\t\022.\n\014service_type\030\003 \001(" + "\0162\030.context.ServiceTypeEnum\0221\n\024service_e" + "ndpoint_ids\030\004 \003(\0132\023.context.EndPointId\0220" + "\n\023service_constraints\030\005 \003(\0132\023.context.Co" + "nstraint\022.\n\016service_status\030\006 \001(\0132\026.conte" + "xt.ServiceStatus\022.\n\016service_config\030\007 \001(\013" + "2\026.context.ServiceConfig\022%\n\ttimestamp\030\010 " + "\001(\0132\022.context.Timestamp\"C\n\rServiceStatus" + "\0222\n\016service_status\030\001 \001(\0162\032.context.Servi" + "ceStatusEnum\":\n\rServiceConfig\022)\n\014config_" + "rules\030\001 \003(\0132\023.context.ConfigRule\"8\n\rServ" + "iceIdList\022\'\n\013service_ids\030\001 \003(\0132\022.context" + ".ServiceId\"1\n\013ServiceList\022\"\n\010services\030\001 " + "\003(\0132\020.context.Service\"\225\001\n\rServiceFilter\022" + "+\n\013service_ids\030\001 \001(\0132\026.context.ServiceId" + "List\022\034\n\024include_endpoint_ids\030\002 \001(\010\022\033\n\023in" + "clude_constraints\030\003 \001(\010\022\034\n\024include_confi" + "g_rules\030\004 \001(\010\"U\n\014ServiceEvent\022\035\n\005event\030\001" + " \001(\0132\016.context.Event\022&\n\nservice_id\030\002 \001(\013" + "2\022.context.ServiceId\"T\n\007SliceId\022&\n\nconte" + "xt_id\030\001 \001(\0132\022.context.ContextId\022!\n\nslice" + "_uuid\030\002 \001(\0132\r.context.Uuid\"\240\003\n\005Slice\022\"\n\010" + "slice_id\030\001 \001(\0132\020.context.SliceId\022\014\n\004name" + "\030\002 \001(\t\022/\n\022slice_endpoint_ids\030\003 \003(\0132\023.con" + "text.EndPointId\022.\n\021slice_constraints\030\004 \003" + "(\0132\023.context.Constraint\022-\n\021slice_service" + "_ids\030\005 \003(\0132\022.context.ServiceId\022,\n\022slice_" + "subslice_ids\030\006 \003(\0132\020.context.SliceId\022*\n\014" + "slice_status\030\007 \001(\0132\024.context.SliceStatus" + "\022*\n\014slice_config\030\010 \001(\0132\024.context.SliceCo" + "nfig\022(\n\013slice_owner\030\t \001(\0132\023.context.Slic" + "eOwner\022%\n\ttimestamp\030\n \001(\0132\022.context.Time" + "stamp\"E\n\nSliceOwner\022!\n\nowner_uuid\030\001 \001(\0132" + "\r.context.Uuid\022\024\n\014owner_string\030\002 \001(\t\"=\n\013" + "SliceStatus\022.\n\014slice_status\030\001 \001(\0162\030.cont" + "ext.SliceStatusEnum\"8\n\013SliceConfig\022)\n\014co" + "nfig_rules\030\001 \003(\0132\023.context.ConfigRule\"2\n" + "\013SliceIdList\022#\n\tslice_ids\030\001 \003(\0132\020.contex" + "t.SliceId\"+\n\tSliceList\022\036\n\006slices\030\001 \003(\0132\016" + ".context.Slice\"\312\001\n\013SliceFilter\022\'\n\tslice_" + "ids\030\001 \001(\0132\024.context.SliceIdList\022\034\n\024inclu" + "de_endpoint_ids\030\002 \001(\010\022\033\n\023include_constra" + "ints\030\003 \001(\010\022\033\n\023include_service_ids\030\004 \001(\010\022" + "\034\n\024include_subslice_ids\030\005 \001(\010\022\034\n\024include" + "_config_rules\030\006 \001(\010\"O\n\nSliceEvent\022\035\n\005eve" + "nt\030\001 \001(\0132\016.context.Event\022\"\n\010slice_id\030\002 \001" + "(\0132\020.context.SliceId\"6\n\014ConnectionId\022&\n\017" + "connection_uuid\030\001 \001(\0132\r.context.Uuid\"2\n\025" + "ConnectionSettings_L0\022\031\n\021lsp_symbolic_na" + "me\030\001 \001(\t\"\236\001\n\025ConnectionSettings_L2\022\027\n\017sr" + "c_mac_address\030\001 \001(\t\022\027\n\017dst_mac_address\030\002" + " \001(\t\022\022\n\nether_type\030\003 \001(\r\022\017\n\007vlan_id\030\004 \001(" + "\r\022\022\n\nmpls_label\030\005 \001(\r\022\032\n\022mpls_traffic_cl" + "ass\030\006 \001(\r\"t\n\025ConnectionSettings_L3\022\026\n\016sr" + "c_ip_address\030\001 \001(\t\022\026\n\016dst_ip_address\030\002 \001" + "(\t\022\014\n\004dscp\030\003 \001(\r\022\020\n\010protocol\030\004 \001(\r\022\013\n\003tt" + "l\030\005 \001(\r\"[\n\025ConnectionSettings_L4\022\020\n\010src_" + "port\030\001 \001(\r\022\020\n\010dst_port\030\002 \001(\r\022\021\n\ttcp_flag" + "s\030\003 \001(\r\022\013\n\003ttl\030\004 \001(\r\"\304\001\n\022ConnectionSetti" + "ngs\022*\n\002l0\030\001 \001(\0132\036.context.ConnectionSett" + "ings_L0\022*\n\002l2\030\002 \001(\0132\036.context.Connection" + "Settings_L2\022*\n\002l3\030\003 \001(\0132\036.context.Connec" + "tionSettings_L3\022*\n\002l4\030\004 \001(\0132\036.context.Co" + "nnectionSettings_L4\"\363\001\n\nConnection\022,\n\rco" + "nnection_id\030\001 \001(\0132\025.context.ConnectionId" + "\022&\n\nservice_id\030\002 \001(\0132\022.context.ServiceId" + "\0223\n\026path_hops_endpoint_ids\030\003 \003(\0132\023.conte" + "xt.EndPointId\022+\n\017sub_service_ids\030\004 \003(\0132\022" + ".context.ServiceId\022-\n\010settings\030\005 \001(\0132\033.c" + "ontext.ConnectionSettings\"A\n\020ConnectionI" + "dList\022-\n\016connection_ids\030\001 \003(\0132\025.context." + "ConnectionId\":\n\016ConnectionList\022(\n\013connec" + "tions\030\001 \003(\0132\023.context.Connection\"^\n\017Conn" + "ectionEvent\022\035\n\005event\030\001 \001(\0132\016.context.Eve" + "nt\022,\n\rconnection_id\030\002 \001(\0132\025.context.Conn" + "ectionId\"\202\001\n\nEndPointId\022(\n\013topology_id\030\001" + " \001(\0132\023.context.TopologyId\022$\n\tdevice_id\030\002" + " \001(\0132\021.context.DeviceId\022$\n\rendpoint_uuid" + "\030\003 \001(\0132\r.context.Uuid\"\310\002\n\010EndPoint\022(\n\013en" + "dpoint_id\030\001 \001(\0132\023.context.EndPointId\022\014\n\004" + "name\030\002 \001(\t\022\025\n\rendpoint_type\030\003 \001(\t\0229\n\020kpi" + "_sample_types\030\004 \003(\0162\037.kpi_sample_types.K" + "piSampleType\022,\n\021endpoint_location\030\005 \001(\0132" + "\021.context.Location\0229\n\014capabilities\030\006 \003(\013" + "2#.context.EndPoint.CapabilitiesEntry\032I\n" + "\021CapabilitiesEntry\022\013\n\003key\030\001 \001(\t\022#\n\005value" + "\030\002 \001(\0132\024.google.protobuf.Any:\0028\001\"{\n\014EndP" + "ointName\022(\n\013endpoint_id\030\001 \001(\0132\023.context." + "EndPointId\022\023\n\013device_name\030\002 \001(\t\022\025\n\rendpo" + "int_name\030\003 \001(\t\022\025\n\rendpoint_type\030\004 \001(\t\";\n" + "\016EndPointIdList\022)\n\014endpoint_ids\030\001 \003(\0132\023." + "context.EndPointId\"A\n\020EndPointNameList\022-" + "\n\016endpoint_names\030\001 \003(\0132\025.context.EndPoin" + "tName\"A\n\021ConfigRule_Custom\022\024\n\014resource_k" + "ey\030\001 \001(\t\022\026\n\016resource_value\030\002 \001(\t\"]\n\016Conf" + "igRule_ACL\022(\n\013endpoint_id\030\001 \001(\0132\023.contex" + "t.EndPointId\022!\n\010rule_set\030\002 \001(\0132\017.acl.Acl" + "RuleSet\"\234\001\n\nConfigRule\022)\n\006action\030\001 \001(\0162\031" + ".context.ConfigActionEnum\022,\n\006custom\030\002 \001(" + "\0132\032.context.ConfigRule_CustomH\000\022&\n\003acl\030\003" + " \001(\0132\027.context.ConfigRule_ACLH\000B\r\n\013confi" + "g_rule\"F\n\021Constraint_Custom\022\027\n\017constrain" + "t_type\030\001 \001(\t\022\030\n\020constraint_value\030\002 \001(\t\"E" + "\n\023Constraint_Schedule\022\027\n\017start_timestamp" + "\030\001 \001(\001\022\025\n\rduration_days\030\002 \001(\002\"3\n\014GPS_Pos" + "ition\022\020\n\010latitude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001" + "(\002\"\204\001\n\010Location\022\020\n\006region\030\001 \001(\tH\000\022-\n\014gps" + "_position\030\002 \001(\0132\025.context.GPS_PositionH\000" + "\022\023\n\tinterface\030\003 \001(\tH\000\022\026\n\014circuit_pack\030\004 " + "\001(\tH\000B\n\n\010location\"l\n\033Constraint_EndPoint" + "Location\022(\n\013endpoint_id\030\001 \001(\0132\023.context." + "EndPointId\022#\n\010location\030\002 \001(\0132\021.context.L" + "ocation\"Y\n\033Constraint_EndPointPriority\022(" + "\n\013endpoint_id\030\001 \001(\0132\023.context.EndPointId" + "\022\020\n\010priority\030\002 \001(\r\"0\n\026Constraint_SLA_Lat" + "ency\022\026\n\016e2e_latency_ms\030\001 \001(\002\"0\n\027Constrai" + "nt_SLA_Capacity\022\025\n\rcapacity_gbps\030\001 \001(\002\"c" + "\n\033Constraint_SLA_Availability\022\032\n\022num_dis" + "joint_paths\030\001 \001(\r\022\022\n\nall_active\030\002 \001(\010\022\024\n" + "\014availability\030\003 \001(\002\"V\n\036Constraint_SLA_Is" + "olation_level\0224\n\017isolation_level\030\001 \003(\0162\033" + ".context.IsolationLevelEnum\"\242\001\n\025Constrai" + "nt_Exclusions\022\024\n\014is_permanent\030\001 \001(\010\022%\n\nd" + "evice_ids\030\002 \003(\0132\021.context.DeviceId\022)\n\014en" + "dpoint_ids\030\003 \003(\0132\023.context.EndPointId\022!\n" + "\010link_ids\030\004 \003(\0132\017.context.LinkId\"5\n\014QoSP" + "rofileId\022%\n\016qos_profile_id\030\001 \001(\0132\r.conte" + "xt.Uuid\"`\n\025Constraint_QoSProfile\022-\n\016qos_" + "profile_id\030\001 \001(\0132\025.context.QoSProfileId\022" + "\030\n\020qos_profile_name\030\002 \001(\t\"\222\005\n\nConstraint" + "\022-\n\006action\030\001 \001(\0162\035.context.ConstraintAct" + "ionEnum\022,\n\006custom\030\002 \001(\0132\032.context.Constr" + "aint_CustomH\000\0220\n\010schedule\030\003 \001(\0132\034.contex" + "t.Constraint_ScheduleH\000\022A\n\021endpoint_loca" + "tion\030\004 \001(\0132$.context.Constraint_EndPoint" + "LocationH\000\022A\n\021endpoint_priority\030\005 \001(\0132$." + "context.Constraint_EndPointPriorityH\000\0228\n" + "\014sla_capacity\030\006 \001(\0132 .context.Constraint" + "_SLA_CapacityH\000\0226\n\013sla_latency\030\007 \001(\0132\037.c" + "ontext.Constraint_SLA_LatencyH\000\022@\n\020sla_a" + "vailability\030\010 \001(\0132$.context.Constraint_S" + "LA_AvailabilityH\000\022@\n\rsla_isolation\030\t \001(\013" + "2\'.context.Constraint_SLA_Isolation_leve" + "lH\000\0224\n\nexclusions\030\n \001(\0132\036.context.Constr" + "aint_ExclusionsH\000\0225\n\013qos_profile\030\013 \001(\0132\036" + ".context.Constraint_QoSProfileH\000B\014\n\ncons" + "traint\"^\n\022TeraFlowController\022&\n\ncontext_" + "id\030\001 \001(\0132\022.context.ContextId\022\022\n\nip_addre" + "ss\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n\024Authentication" + "Result\022&\n\ncontext_id\030\001 \001(\0132\022.context.Con" + "textId\022\025\n\rauthenticated\030\002 \001(\010\"-\n\017Optical" + "ConfigId\022\032\n\022opticalconfig_uuid\030\001 \001(\t\"y\n\r" + "OpticalConfig\0222\n\020opticalconfig_id\030\001 \001(\0132" + "\030.context.OpticalConfigId\022\016\n\006config\030\002 \001(" + "\t\022$\n\tdevice_id\030\003 \001(\0132\021.context.DeviceId\"" + "C\n\021OpticalConfigList\022.\n\016opticalconfigs\030\001" + " \003(\0132\026.context.OpticalConfig\"g\n\022OpticalC" + "onfigEvent\022\035\n\005event\030\001 \001(\0132\016.context.Even" + "t\0222\n\020opticalconfig_id\030\002 \001(\0132\030.context.Op" + "ticalConfigId\"_\n\021OpticalEndPointId\022$\n\tde" + "vice_id\030\002 \001(\0132\021.context.DeviceId\022$\n\rendp" + "oint_uuid\030\003 \001(\0132\r.context.Uuid\">\n\017Optica" + "lLinkList\022+\n\roptical_links\030\001 \003(\0132\024.conte" + "xt.OpticalLink\"\304\003\n\022OpticalLinkDetails\022\016\n" + "\006length\030\001 \001(\002\022\020\n\010src_port\030\002 \001(\t\022\020\n\010dst_p" + "ort\030\003 \001(\t\022\027\n\017local_peer_port\030\004 \001(\t\022\030\n\020re" + "mote_peer_port\030\005 \001(\t\022\014\n\004used\030\006 \001(\010\0228\n\007c_" + "slots\030\007 \003(\0132\'.context.OpticalLinkDetails" + ".CSlotsEntry\0228\n\007l_slots\030\010 \003(\0132\'.context." + "OpticalLinkDetails.LSlotsEntry\0228\n\007s_slot" + "s\030\t \003(\0132\'.context.OpticalLinkDetails.SSl" + "otsEntry\032-\n\013CSlotsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + "value\030\002 \001(\005:\0028\001\032-\n\013LSlotsEntry\022\013\n\003key\030\001 " + "\001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\032-\n\013SSlotsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\"\243\001\n\013Optica" + "lLink\022\014\n\004name\030\001 \001(\t\0224\n\017optical_details\030\002" + " \001(\0132\033.context.OpticalLinkDetails\022 \n\007lin" + "k_id\030\003 \001(\0132\017.context.LinkId\022.\n\021link_endp" + "oint_ids\030\004 \003(\0132\023.context.EndPointId\"r\n\021S" + "erviceConfigRule\022&\n\nservice_id\030\001 \001(\0132\022.c" + "ontext.ServiceId\0225\n\021configrule_custom\030\002 " + "\001(\0132\032.context.ConfigRule_Custom*j\n\rEvent" + "TypeEnum\022\027\n\023EVENTTYPE_UNDEFINED\020\000\022\024\n\020EVE" + "NTTYPE_CREATE\020\001\022\024\n\020EVENTTYPE_UPDATE\020\002\022\024\n" + "\020EVENTTYPE_REMOVE\020\003*\351\003\n\020DeviceDriverEnum" + "\022\032\n\026DEVICEDRIVER_UNDEFINED\020\000\022\033\n\027DEVICEDR" + "IVER_OPENCONFIG\020\001\022\036\n\032DEVICEDRIVER_TRANSP" + "ORT_API\020\002\022\023\n\017DEVICEDRIVER_P4\020\003\022&\n\"DEVICE" + "DRIVER_IETF_NETWORK_TOPOLOGY\020\004\022\033\n\027DEVICE" + "DRIVER_ONF_TR_532\020\005\022\023\n\017DEVICEDRIVER_XR\020\006" + "\022\033\n\027DEVICEDRIVER_IETF_L2VPN\020\007\022 \n\034DEVICED" + "RIVER_GNMI_OPENCONFIG\020\010\022\034\n\030DEVICEDRIVER_" + "OPTICAL_TFS\020\t\022\032\n\026DEVICEDRIVER_IETF_ACTN\020" + "\n\022\023\n\017DEVICEDRIVER_OC\020\013\022\024\n\020DEVICEDRIVER_Q" + "KD\020\014\022\033\n\027DEVICEDRIVER_IETF_L3VPN\020\r\022\033\n\027DEV" + "ICEDRIVER_IETF_SLICE\020\016\022\024\n\020DEVICEDRIVER_N" + "CE\020\017\022\031\n\025DEVICEDRIVER_SMARTNIC\020\020*\217\001\n\033Devi" + "ceOperationalStatusEnum\022%\n!DEVICEOPERATI" + "ONALSTATUS_UNDEFINED\020\000\022$\n DEVICEOPERATIO" + "NALSTATUS_DISABLED\020\001\022#\n\037DEVICEOPERATIONA" + "LSTATUS_ENABLED\020\002*w\n\014LinkTypeEnum\022\024\n\020LIN" + "KTYPE_UNKNOWN\020\000\022\023\n\017LINKTYPE_COPPER\020\001\022\022\n\016" + "LINKTYPE_FIBER\020\002\022\022\n\016LINKTYPE_RADIO\020\003\022\024\n\020" + "LINKTYPE_VIRTUAL\020\004*\345\001\n\017ServiceTypeEnum\022\027" + "\n\023SERVICETYPE_UNKNOWN\020\000\022\024\n\020SERVICETYPE_L" + "3NM\020\001\022\024\n\020SERVICETYPE_L2NM\020\002\022)\n%SERVICETY" + "PE_TAPI_CONNECTIVITY_SERVICE\020\003\022\022\n\016SERVIC" + "ETYPE_TE\020\004\022\023\n\017SERVICETYPE_E2E\020\005\022$\n SERVI" + "CETYPE_OPTICAL_CONNECTIVITY\020\006\022\023\n\017SERVICE" + "TYPE_QKD\020\007*\304\001\n\021ServiceStatusEnum\022\033\n\027SERV" + "ICESTATUS_UNDEFINED\020\000\022\031\n\025SERVICESTATUS_P" + "LANNED\020\001\022\030\n\024SERVICESTATUS_ACTIVE\020\002\022\032\n\026SE" + "RVICESTATUS_UPDATING\020\003\022!\n\035SERVICESTATUS_" + "PENDING_REMOVAL\020\004\022\036\n\032SERVICESTATUS_SLA_V" + "IOLATED\020\005*\251\001\n\017SliceStatusEnum\022\031\n\025SLICEST" + "ATUS_UNDEFINED\020\000\022\027\n\023SLICESTATUS_PLANNED\020" + "\001\022\024\n\020SLICESTATUS_INIT\020\002\022\026\n\022SLICESTATUS_A" + "CTIVE\020\003\022\026\n\022SLICESTATUS_DEINIT\020\004\022\034\n\030SLICE" + "STATUS_SLA_VIOLATED\020\005*]\n\020ConfigActionEnu" + "m\022\032\n\026CONFIGACTION_UNDEFINED\020\000\022\024\n\020CONFIGA" + "CTION_SET\020\001\022\027\n\023CONFIGACTION_DELETE\020\002*m\n\024" + "ConstraintActionEnum\022\036\n\032CONSTRAINTACTION" + "_UNDEFINED\020\000\022\030\n\024CONSTRAINTACTION_SET\020\001\022\033" + "\n\027CONSTRAINTACTION_DELETE\020\002*\203\002\n\022Isolatio" + "nLevelEnum\022\020\n\014NO_ISOLATION\020\000\022\026\n\022PHYSICAL" + "_ISOLATION\020\001\022\025\n\021LOGICAL_ISOLATION\020\002\022\025\n\021P" + "ROCESS_ISOLATION\020\003\022\035\n\031PHYSICAL_MEMORY_IS" + "OLATION\020\004\022\036\n\032PHYSICAL_NETWORK_ISOLATION\020" + "\005\022\036\n\032VIRTUAL_RESOURCE_ISOLATION\020\006\022\037\n\033NET" + "WORK_FUNCTIONS_ISOLATION\020\007\022\025\n\021SERVICE_IS" + "OLATION\020\0102\202\034\n\016ContextService\022:\n\016ListCont" + "extIds\022\016.context.Empty\032\026.context.Context" + "IdList\"\000\0226\n\014ListContexts\022\016.context.Empty" + "\032\024.context.ContextList\"\000\0224\n\nGetContext\022\022" + ".context.ContextId\032\020.context.Context\"\000\0224" + "\n\nSetContext\022\020.context.Context\032\022.context" + ".ContextId\"\000\0225\n\rRemoveContext\022\022.context." + "ContextId\032\016.context.Empty\"\000\022=\n\020GetContex" + "tEvents\022\016.context.Empty\032\025.context.Contex" + "tEvent\"\0000\001\022@\n\017ListTopologyIds\022\022.context." + "ContextId\032\027.context.TopologyIdList\"\000\022=\n\016" + "ListTopologies\022\022.context.ContextId\032\025.con" + "text.TopologyList\"\000\0227\n\013GetTopology\022\023.con" + "text.TopologyId\032\021.context.Topology\"\000\022E\n\022" + "GetTopologyDetails\022\023.context.TopologyId\032" + "\030.context.TopologyDetails\"\000\0227\n\013SetTopolo" + "gy\022\021.context.Topology\032\023.context.Topology" + "Id\"\000\0227\n\016RemoveTopology\022\023.context.Topolog" + "yId\032\016.context.Empty\"\000\022?\n\021GetTopologyEven" + "ts\022\016.context.Empty\032\026.context.TopologyEve" + "nt\"\0000\001\0228\n\rListDeviceIds\022\016.context.Empty\032" + "\025.context.DeviceIdList\"\000\0224\n\013ListDevices\022" + "\016.context.Empty\032\023.context.DeviceList\"\000\0221" + "\n\tGetDevice\022\021.context.DeviceId\032\017.context" + ".Device\"\000\0221\n\tSetDevice\022\017.context.Device\032" + "\021.context.DeviceId\"\000\0223\n\014RemoveDevice\022\021.c" + "ontext.DeviceId\032\016.context.Empty\"\000\022;\n\017Get" + "DeviceEvents\022\016.context.Empty\032\024.context.D" + "eviceEvent\"\0000\001\022<\n\014SelectDevice\022\025.context" + ".DeviceFilter\032\023.context.DeviceList\"\000\022I\n\021" + "ListEndPointNames\022\027.context.EndPointIdLi" + "st\032\031.context.EndPointNameList\"\000\0224\n\013ListL" + "inkIds\022\016.context.Empty\032\023.context.LinkIdL" + "ist\"\000\0220\n\tListLinks\022\016.context.Empty\032\021.con" + "text.LinkList\"\000\022+\n\007GetLink\022\017.context.Lin" + "kId\032\r.context.Link\"\000\022+\n\007SetLink\022\r.contex" + "t.Link\032\017.context.LinkId\"\000\022/\n\nRemoveLink\022" + "\017.context.LinkId\032\016.context.Empty\"\000\0227\n\rGe" + "tLinkEvents\022\016.context.Empty\032\022.context.Li" + "nkEvent\"\0000\001\022>\n\016ListServiceIds\022\022.context." + "ContextId\032\026.context.ServiceIdList\"\000\022:\n\014L" + "istServices\022\022.context.ContextId\032\024.contex" + "t.ServiceList\"\000\0224\n\nGetService\022\022.context." + "ServiceId\032\020.context.Service\"\000\0224\n\nSetServ" + "ice\022\020.context.Service\032\022.context.ServiceI" + "d\"\000\0226\n\014UnsetService\022\020.context.Service\032\022." + "context.ServiceId\"\000\0225\n\rRemoveService\022\022.c" + "ontext.ServiceId\032\016.context.Empty\"\000\022=\n\020Ge" + "tServiceEvents\022\016.context.Empty\032\025.context" + ".ServiceEvent\"\0000\001\022?\n\rSelectService\022\026.con" + "text.ServiceFilter\032\024.context.ServiceList" + "\"\000\022:\n\014ListSliceIds\022\022.context.ContextId\032\024" + ".context.SliceIdList\"\000\0226\n\nListSlices\022\022.c" + "ontext.ContextId\032\022.context.SliceList\"\000\022." + "\n\010GetSlice\022\020.context.SliceId\032\016.context.S" + "lice\"\000\022.\n\010SetSlice\022\016.context.Slice\032\020.con" + "text.SliceId\"\000\0220\n\nUnsetSlice\022\016.context.S" + "lice\032\020.context.SliceId\"\000\0221\n\013RemoveSlice\022" + "\020.context.SliceId\032\016.context.Empty\"\000\0229\n\016G" + "etSliceEvents\022\016.context.Empty\032\023.context." + "SliceEvent\"\0000\001\0229\n\013SelectSlice\022\024.context." + "SliceFilter\032\022.context.SliceList\"\000\022D\n\021Lis" + "tConnectionIds\022\022.context.ServiceId\032\031.con" + "text.ConnectionIdList\"\000\022@\n\017ListConnectio" + "ns\022\022.context.ServiceId\032\027.context.Connect" + "ionList\"\000\022=\n\rGetConnection\022\025.context.Con" + "nectionId\032\023.context.Connection\"\000\022=\n\rSetC" + "onnection\022\023.context.Connection\032\025.context" + ".ConnectionId\"\000\022;\n\020RemoveConnection\022\025.co" + "ntext.ConnectionId\032\016.context.Empty\"\000\022C\n\023" + "GetConnectionEvents\022\016.context.Empty\032\030.co" + "ntext.ConnectionEvent\"\0000\001\022@\n\020GetOpticalC" + "onfig\022\016.context.Empty\032\032.context.OpticalC" + "onfigList\"\000\022F\n\020SetOpticalConfig\022\026.contex" + "t.OpticalConfig\032\030.context.OpticalConfigI" + "d\"\000\022I\n\023UpdateOpticalConfig\022\026.context.Opt" + "icalConfig\032\030.context.OpticalConfigId\"\000\022I" + "\n\023SelectOpticalConfig\022\030.context.OpticalC" + "onfigId\032\026.context.OpticalConfig\"\000\022A\n\023Del" + "eteOpticalConfig\022\030.context.OpticalConfig" + "Id\032\016.context.Empty\"\000\022@\n\024DeleteOpticalCha" + "nnel\022\026.context.OpticalConfig\032\016.context.E" + "mpty\"\000\0228\n\016SetOpticalLink\022\024.context.Optic" + "alLink\032\016.context.Empty\"\000\0229\n\016GetOpticalLi" + "nk\022\017.context.LinkId\032\024.context.OpticalLin" + "k\"\000\0226\n\021DeleteOpticalLink\022\017.context.LinkI" + "d\032\016.context.Empty\"\000\022@\n\022GetOpticalLinkLis" + "t\022\016.context.Empty\032\030.context.OpticalLinkL" + "ist\"\000\022G\n\027DeleteServiceConfigRule\022\032.conte" + "xt.ServiceConfigRule\032\016.context.Empty\"\000b\006" + "proto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.AnyProto.getDescriptor(), acl.Acl.getDescriptor(), kpi_sample_types.KpiSampleTypes.getDescriptor() }); internal_static_context_Empty_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_context_Empty_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Empty_descriptor, new java.lang.String[] {}); internal_static_context_Uuid_descriptor = getDescriptor().getMessageTypes().get(1); @@ -76735,9 +81163,9 @@ public final class ContextOuterClass { internal_static_context_TopologyId_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_context_TopologyId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyId_descriptor, new java.lang.String[] { "ContextId", "TopologyUuid" }); internal_static_context_Topology_descriptor = getDescriptor().getMessageTypes().get(10); - internal_static_context_Topology_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Topology_descriptor, new java.lang.String[] { "TopologyId", "Name", "DeviceIds", "LinkIds" }); + internal_static_context_Topology_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Topology_descriptor, new java.lang.String[] { "TopologyId", "Name", "DeviceIds", "LinkIds", "OpticalLinkIds" }); internal_static_context_TopologyDetails_descriptor = getDescriptor().getMessageTypes().get(11); - internal_static_context_TopologyDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyDetails_descriptor, new java.lang.String[] { "TopologyId", "Name", "Devices", "Links" }); + internal_static_context_TopologyDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyDetails_descriptor, new java.lang.String[] { "TopologyId", "Name", "Devices", "Links", "OpticalLinks" }); internal_static_context_TopologyIdList_descriptor = getDescriptor().getMessageTypes().get(12); internal_static_context_TopologyIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyIdList_descriptor, new java.lang.String[] { "TopologyIds" }); internal_static_context_TopologyList_descriptor = getDescriptor().getMessageTypes().get(13); @@ -76767,7 +81195,7 @@ public final class ContextOuterClass { internal_static_context_LinkAttributes_descriptor = getDescriptor().getMessageTypes().get(24); internal_static_context_LinkAttributes_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkAttributes_descriptor, new java.lang.String[] { "TotalCapacityGbps", "UsedCapacityGbps" }); internal_static_context_Link_descriptor = getDescriptor().getMessageTypes().get(25); - internal_static_context_Link_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Link_descriptor, new java.lang.String[] { "LinkId", "Name", "LinkEndpointIds", "Attributes" }); + internal_static_context_Link_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Link_descriptor, new java.lang.String[] { "LinkId", "Name", "LinkType", "LinkEndpointIds", "Attributes" }); internal_static_context_LinkIdList_descriptor = getDescriptor().getMessageTypes().get(26); internal_static_context_LinkIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkIdList_descriptor, new java.lang.String[] { "LinkIds" }); internal_static_context_LinkList_descriptor = getDescriptor().getMessageTypes().get(27); @@ -76831,7 +81259,9 @@ public final class ContextOuterClass { internal_static_context_EndPointId_descriptor = getDescriptor().getMessageTypes().get(56); internal_static_context_EndPointId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPointId_descriptor, new java.lang.String[] { "TopologyId", "DeviceId", "EndpointUuid" }); internal_static_context_EndPoint_descriptor = getDescriptor().getMessageTypes().get(57); - internal_static_context_EndPoint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPoint_descriptor, new java.lang.String[] { "EndpointId", "Name", "EndpointType", "KpiSampleTypes", "EndpointLocation" }); + internal_static_context_EndPoint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPoint_descriptor, new java.lang.String[] { "EndpointId", "Name", "EndpointType", "KpiSampleTypes", "EndpointLocation", "Capabilities" }); + internal_static_context_EndPoint_CapabilitiesEntry_descriptor = internal_static_context_EndPoint_descriptor.getNestedTypes().get(0); + internal_static_context_EndPoint_CapabilitiesEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPoint_CapabilitiesEntry_descriptor, new java.lang.String[] { "Key", "Value" }); internal_static_context_EndPointName_descriptor = getDescriptor().getMessageTypes().get(58); internal_static_context_EndPointName_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPointName_descriptor, new java.lang.String[] { "EndpointId", "DeviceName", "EndpointName", "EndpointType" }); internal_static_context_EndPointIdList_descriptor = getDescriptor().getMessageTypes().get(59); @@ -76851,7 +81281,7 @@ public final class ContextOuterClass { internal_static_context_GPS_Position_descriptor = getDescriptor().getMessageTypes().get(66); internal_static_context_GPS_Position_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_GPS_Position_descriptor, new java.lang.String[] { "Latitude", "Longitude" }); internal_static_context_Location_descriptor = getDescriptor().getMessageTypes().get(67); - internal_static_context_Location_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Location_descriptor, new java.lang.String[] { "Region", "GpsPosition", "Location" }); + internal_static_context_Location_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Location_descriptor, new java.lang.String[] { "Region", "GpsPosition", "Interface", "CircuitPack", "Location" }); internal_static_context_Constraint_EndPointLocation_descriptor = getDescriptor().getMessageTypes().get(68); internal_static_context_Constraint_EndPointLocation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_EndPointLocation_descriptor, new java.lang.String[] { "EndpointId", "Location" }); internal_static_context_Constraint_EndPointPriority_descriptor = getDescriptor().getMessageTypes().get(69); @@ -76866,28 +81296,41 @@ public final class ContextOuterClass { internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_SLA_Isolation_level_descriptor, new java.lang.String[] { "IsolationLevel" }); internal_static_context_Constraint_Exclusions_descriptor = getDescriptor().getMessageTypes().get(74); internal_static_context_Constraint_Exclusions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_Exclusions_descriptor, new java.lang.String[] { "IsPermanent", "DeviceIds", "EndpointIds", "LinkIds" }); - internal_static_context_Constraint_descriptor = getDescriptor().getMessageTypes().get(75); - internal_static_context_Constraint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_descriptor, new java.lang.String[] { "Action", "Custom", "Schedule", "EndpointLocation", "EndpointPriority", "SlaCapacity", "SlaLatency", "SlaAvailability", "SlaIsolation", "Exclusions", "Constraint" }); - internal_static_context_TeraFlowController_descriptor = getDescriptor().getMessageTypes().get(76); + internal_static_context_QoSProfileId_descriptor = getDescriptor().getMessageTypes().get(75); + internal_static_context_QoSProfileId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_QoSProfileId_descriptor, new java.lang.String[] { "QosProfileId" }); + internal_static_context_Constraint_QoSProfile_descriptor = getDescriptor().getMessageTypes().get(76); + internal_static_context_Constraint_QoSProfile_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_QoSProfile_descriptor, new java.lang.String[] { "QosProfileId", "QosProfileName" }); + internal_static_context_Constraint_descriptor = getDescriptor().getMessageTypes().get(77); + internal_static_context_Constraint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_descriptor, new java.lang.String[] { "Action", "Custom", "Schedule", "EndpointLocation", "EndpointPriority", "SlaCapacity", "SlaLatency", "SlaAvailability", "SlaIsolation", "Exclusions", "QosProfile", "Constraint" }); + internal_static_context_TeraFlowController_descriptor = getDescriptor().getMessageTypes().get(78); internal_static_context_TeraFlowController_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TeraFlowController_descriptor, new java.lang.String[] { "ContextId", "IpAddress", "Port" }); - internal_static_context_AuthenticationResult_descriptor = getDescriptor().getMessageTypes().get(77); + internal_static_context_AuthenticationResult_descriptor = getDescriptor().getMessageTypes().get(79); internal_static_context_AuthenticationResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_AuthenticationResult_descriptor, new java.lang.String[] { "ContextId", "Authenticated" }); - internal_static_context_OpticalConfigId_descriptor = getDescriptor().getMessageTypes().get(78); + internal_static_context_OpticalConfigId_descriptor = getDescriptor().getMessageTypes().get(80); internal_static_context_OpticalConfigId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfigId_descriptor, new java.lang.String[] { "OpticalconfigUuid" }); - internal_static_context_OpticalConfig_descriptor = getDescriptor().getMessageTypes().get(79); - internal_static_context_OpticalConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfig_descriptor, new java.lang.String[] { "OpticalconfigId", "Config" }); - internal_static_context_OpticalConfigList_descriptor = getDescriptor().getMessageTypes().get(80); + internal_static_context_OpticalConfig_descriptor = getDescriptor().getMessageTypes().get(81); + internal_static_context_OpticalConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfig_descriptor, new java.lang.String[] { "OpticalconfigId", "Config", "DeviceId" }); + internal_static_context_OpticalConfigList_descriptor = getDescriptor().getMessageTypes().get(82); internal_static_context_OpticalConfigList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfigList_descriptor, new java.lang.String[] { "Opticalconfigs" }); - internal_static_context_OpticalLinkId_descriptor = getDescriptor().getMessageTypes().get(81); - internal_static_context_OpticalLinkId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkId_descriptor, new java.lang.String[] { "OpticalLinkUuid" }); - internal_static_context_FiberId_descriptor = getDescriptor().getMessageTypes().get(82); - internal_static_context_FiberId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_FiberId_descriptor, new java.lang.String[] { "FiberUuid" }); - internal_static_context_Fiber_descriptor = getDescriptor().getMessageTypes().get(83); - internal_static_context_Fiber_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Fiber_descriptor, new java.lang.String[] { "ID", "SrcPort", "DstPort", "LocalPeerPort", "RemotePeerPort", "CSlots", "LSlots", "SSlots", "Length", "Used", "FiberUuid" }); - internal_static_context_OpticalLinkDetails_descriptor = getDescriptor().getMessageTypes().get(84); - internal_static_context_OpticalLinkDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkDetails_descriptor, new java.lang.String[] { "Length", "Source", "Target", "Fibers" }); - internal_static_context_OpticalLink_descriptor = getDescriptor().getMessageTypes().get(85); - internal_static_context_OpticalLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLink_descriptor, new java.lang.String[] { "Name", "Details", "OpticalLinkUuid" }); + internal_static_context_OpticalConfigEvent_descriptor = getDescriptor().getMessageTypes().get(83); + internal_static_context_OpticalConfigEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfigEvent_descriptor, new java.lang.String[] { "Event", "OpticalconfigId" }); + internal_static_context_OpticalEndPointId_descriptor = getDescriptor().getMessageTypes().get(84); + internal_static_context_OpticalEndPointId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalEndPointId_descriptor, new java.lang.String[] { "DeviceId", "EndpointUuid" }); + internal_static_context_OpticalLinkList_descriptor = getDescriptor().getMessageTypes().get(85); + internal_static_context_OpticalLinkList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkList_descriptor, new java.lang.String[] { "OpticalLinks" }); + internal_static_context_OpticalLinkDetails_descriptor = getDescriptor().getMessageTypes().get(86); + internal_static_context_OpticalLinkDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkDetails_descriptor, new java.lang.String[] { "Length", "SrcPort", "DstPort", "LocalPeerPort", "RemotePeerPort", "Used", "CSlots", "LSlots", "SSlots" }); + internal_static_context_OpticalLinkDetails_CSlotsEntry_descriptor = internal_static_context_OpticalLinkDetails_descriptor.getNestedTypes().get(0); + internal_static_context_OpticalLinkDetails_CSlotsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkDetails_CSlotsEntry_descriptor, new java.lang.String[] { "Key", "Value" }); + internal_static_context_OpticalLinkDetails_LSlotsEntry_descriptor = internal_static_context_OpticalLinkDetails_descriptor.getNestedTypes().get(1); + internal_static_context_OpticalLinkDetails_LSlotsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkDetails_LSlotsEntry_descriptor, new java.lang.String[] { "Key", "Value" }); + internal_static_context_OpticalLinkDetails_SSlotsEntry_descriptor = internal_static_context_OpticalLinkDetails_descriptor.getNestedTypes().get(2); + internal_static_context_OpticalLinkDetails_SSlotsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkDetails_SSlotsEntry_descriptor, new java.lang.String[] { "Key", "Value" }); + internal_static_context_OpticalLink_descriptor = getDescriptor().getMessageTypes().get(87); + internal_static_context_OpticalLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLink_descriptor, new java.lang.String[] { "Name", "OpticalDetails", "LinkId", "LinkEndpointIds" }); + internal_static_context_ServiceConfigRule_descriptor = getDescriptor().getMessageTypes().get(88); + internal_static_context_ServiceConfigRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceConfigRule_descriptor, new java.lang.String[] { "ServiceId", "ConfigruleCustom" }); + com.google.protobuf.AnyProto.getDescriptor(); acl.Acl.getDescriptor(); kpi_sample_types.KpiSampleTypes.getDescriptor(); } diff --git a/src/policy/target/generated-sources/grpc/context/ContextService.java b/src/policy/target/generated-sources/grpc/context/ContextService.java index 32544e6be..d953e779f 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextService.java +++ b/src/policy/target/generated-sources/grpc/context/ContextService.java @@ -98,13 +98,23 @@ public interface ContextService extends MutinyService { io.smallrye.mutiny.Uni setOpticalConfig(context.ContextOuterClass.OpticalConfig request); + io.smallrye.mutiny.Uni updateOpticalConfig(context.ContextOuterClass.OpticalConfig request); + io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request); + io.smallrye.mutiny.Uni deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request); + + io.smallrye.mutiny.Uni deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request); + io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request); - io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request); + io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.LinkId request); + + io.smallrye.mutiny.Uni deleteOpticalLink(context.ContextOuterClass.LinkId request); + + io.smallrye.mutiny.Uni getOpticalLinkList(context.ContextOuterClass.Empty request); - io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request); + io.smallrye.mutiny.Uni deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request); io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request); diff --git a/src/policy/target/generated-sources/grpc/context/ContextServiceBean.java b/src/policy/target/generated-sources/grpc/context/ContextServiceBean.java index d3c1b6285..3809f8afb 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextServiceBean.java +++ b/src/policy/target/generated-sources/grpc/context/ContextServiceBean.java @@ -409,6 +409,15 @@ public class ContextServiceBean extends MutinyContextServiceGrpc.ContextServiceI } } + @Override + public io.smallrye.mutiny.Uni updateOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + try { + return delegate.updateOpticalConfig(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + @Override public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { try { @@ -418,6 +427,24 @@ public class ContextServiceBean extends MutinyContextServiceGrpc.ContextServiceI } } + @Override + public io.smallrye.mutiny.Uni deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + try { + return delegate.deleteOpticalConfig(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request) { + try { + return delegate.deleteOpticalChannel(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + @Override public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { try { @@ -428,7 +455,7 @@ public class ContextServiceBean extends MutinyContextServiceGrpc.ContextServiceI } @Override - public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.LinkId request) { try { return delegate.getOpticalLink(request); } catch (UnsupportedOperationException e) { @@ -437,9 +464,27 @@ public class ContextServiceBean extends MutinyContextServiceGrpc.ContextServiceI } @Override - public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { + public io.smallrye.mutiny.Uni deleteOpticalLink(context.ContextOuterClass.LinkId request) { + try { + return delegate.deleteOpticalLink(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni getOpticalLinkList(context.ContextOuterClass.Empty request) { + try { + return delegate.getOpticalLinkList(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request) { try { - return delegate.getFiber(request); + return delegate.deleteServiceConfigRule(request); } catch (UnsupportedOperationException e) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } diff --git a/src/policy/target/generated-sources/grpc/context/ContextServiceClient.java b/src/policy/target/generated-sources/grpc/context/ContextServiceClient.java index b1773578d..00e56c4f4 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextServiceClient.java +++ b/src/policy/target/generated-sources/grpc/context/ContextServiceClient.java @@ -245,24 +245,49 @@ public class ContextServiceClient implements ContextService, MutinyClient updateOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return stub.updateOpticalConfig(request); + } + @Override public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { return stub.selectOpticalConfig(request); } + @Override + public io.smallrye.mutiny.Uni deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return stub.deleteOpticalConfig(request); + } + + @Override + public io.smallrye.mutiny.Uni deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request) { + return stub.deleteOpticalChannel(request); + } + @Override public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { return stub.setOpticalLink(request); } @Override - public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.LinkId request) { return stub.getOpticalLink(request); } @Override - public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { - return stub.getFiber(request); + public io.smallrye.mutiny.Uni deleteOpticalLink(context.ContextOuterClass.LinkId request) { + return stub.deleteOpticalLink(request); + } + + @Override + public io.smallrye.mutiny.Uni getOpticalLinkList(context.ContextOuterClass.Empty request) { + return stub.getOpticalLinkList(request); + } + + @Override + public io.smallrye.mutiny.Uni deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request) { + return stub.deleteServiceConfigRule(request); } @Override diff --git a/src/policy/target/generated-sources/grpc/context/ContextServiceGrpc.java b/src/policy/target/generated-sources/grpc/context/ContextServiceGrpc.java index 233312dd7..73a440e7a 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/context/ContextServiceGrpc.java @@ -779,6 +779,21 @@ public final class ContextServiceGrpc { return getSetOpticalConfigMethod; } + private static volatile io.grpc.MethodDescriptor getUpdateOpticalConfigMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "UpdateOpticalConfig", requestType = context.ContextOuterClass.OpticalConfig.class, responseType = context.ContextOuterClass.OpticalConfigId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateOpticalConfigMethod() { + io.grpc.MethodDescriptor getUpdateOpticalConfigMethod; + if ((getUpdateOpticalConfigMethod = ContextServiceGrpc.getUpdateOpticalConfigMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getUpdateOpticalConfigMethod = ContextServiceGrpc.getUpdateOpticalConfigMethod) == null) { + ContextServiceGrpc.getUpdateOpticalConfigMethod = getUpdateOpticalConfigMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateOpticalConfig")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfig.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfigId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("UpdateOpticalConfig")).build(); + } + } + } + return getUpdateOpticalConfigMethod; + } + private static volatile io.grpc.MethodDescriptor getSelectOpticalConfigMethod; @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SelectOpticalConfig", requestType = context.ContextOuterClass.OpticalConfigId.class, responseType = context.ContextOuterClass.OpticalConfig.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) @@ -794,6 +809,36 @@ public final class ContextServiceGrpc { return getSelectOpticalConfigMethod; } + private static volatile io.grpc.MethodDescriptor getDeleteOpticalConfigMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteOpticalConfig", requestType = context.ContextOuterClass.OpticalConfigId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteOpticalConfigMethod() { + io.grpc.MethodDescriptor getDeleteOpticalConfigMethod; + if ((getDeleteOpticalConfigMethod = ContextServiceGrpc.getDeleteOpticalConfigMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getDeleteOpticalConfigMethod = ContextServiceGrpc.getDeleteOpticalConfigMethod) == null) { + ContextServiceGrpc.getDeleteOpticalConfigMethod = getDeleteOpticalConfigMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteOpticalConfig")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfigId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("DeleteOpticalConfig")).build(); + } + } + } + return getDeleteOpticalConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteOpticalChannelMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteOpticalChannel", requestType = context.ContextOuterClass.OpticalConfig.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteOpticalChannelMethod() { + io.grpc.MethodDescriptor getDeleteOpticalChannelMethod; + if ((getDeleteOpticalChannelMethod = ContextServiceGrpc.getDeleteOpticalChannelMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getDeleteOpticalChannelMethod = ContextServiceGrpc.getDeleteOpticalChannelMethod) == null) { + ContextServiceGrpc.getDeleteOpticalChannelMethod = getDeleteOpticalChannelMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteOpticalChannel")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfig.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("DeleteOpticalChannel")).build(); + } + } + } + return getDeleteOpticalChannelMethod; + } + private static volatile io.grpc.MethodDescriptor getSetOpticalLinkMethod; @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetOpticalLink", requestType = context.ContextOuterClass.OpticalLink.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) @@ -809,34 +854,64 @@ public final class ContextServiceGrpc { return getSetOpticalLinkMethod; } - private static volatile io.grpc.MethodDescriptor getGetOpticalLinkMethod; + private static volatile io.grpc.MethodDescriptor getGetOpticalLinkMethod; - @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetOpticalLink", requestType = context.ContextOuterClass.OpticalLinkId.class, responseType = context.ContextOuterClass.OpticalLink.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetOpticalLinkMethod() { - io.grpc.MethodDescriptor getGetOpticalLinkMethod; + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetOpticalLink", requestType = context.ContextOuterClass.LinkId.class, responseType = context.ContextOuterClass.OpticalLink.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetOpticalLinkMethod() { + io.grpc.MethodDescriptor getGetOpticalLinkMethod; if ((getGetOpticalLinkMethod = ContextServiceGrpc.getGetOpticalLinkMethod) == null) { synchronized (ContextServiceGrpc.class) { if ((getGetOpticalLinkMethod = ContextServiceGrpc.getGetOpticalLinkMethod) == null) { - ContextServiceGrpc.getGetOpticalLinkMethod = getGetOpticalLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOpticalLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLinkId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLink.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetOpticalLink")).build(); + ContextServiceGrpc.getGetOpticalLinkMethod = getGetOpticalLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOpticalLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLink.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetOpticalLink")).build(); } } } return getGetOpticalLinkMethod; } - private static volatile io.grpc.MethodDescriptor getGetFiberMethod; + private static volatile io.grpc.MethodDescriptor getDeleteOpticalLinkMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteOpticalLink", requestType = context.ContextOuterClass.LinkId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteOpticalLinkMethod() { + io.grpc.MethodDescriptor getDeleteOpticalLinkMethod; + if ((getDeleteOpticalLinkMethod = ContextServiceGrpc.getDeleteOpticalLinkMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getDeleteOpticalLinkMethod = ContextServiceGrpc.getDeleteOpticalLinkMethod) == null) { + ContextServiceGrpc.getDeleteOpticalLinkMethod = getDeleteOpticalLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteOpticalLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("DeleteOpticalLink")).build(); + } + } + } + return getDeleteOpticalLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetOpticalLinkListMethod; - @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetFiber", requestType = context.ContextOuterClass.FiberId.class, responseType = context.ContextOuterClass.Fiber.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetFiberMethod() { - io.grpc.MethodDescriptor getGetFiberMethod; - if ((getGetFiberMethod = ContextServiceGrpc.getGetFiberMethod) == null) { + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetOpticalLinkList", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.OpticalLinkList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetOpticalLinkListMethod() { + io.grpc.MethodDescriptor getGetOpticalLinkListMethod; + if ((getGetOpticalLinkListMethod = ContextServiceGrpc.getGetOpticalLinkListMethod) == null) { synchronized (ContextServiceGrpc.class) { - if ((getGetFiberMethod = ContextServiceGrpc.getGetFiberMethod) == null) { - ContextServiceGrpc.getGetFiberMethod = getGetFiberMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFiber")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.FiberId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Fiber.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetFiber")).build(); + if ((getGetOpticalLinkListMethod = ContextServiceGrpc.getGetOpticalLinkListMethod) == null) { + ContextServiceGrpc.getGetOpticalLinkListMethod = getGetOpticalLinkListMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOpticalLinkList")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLinkList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetOpticalLinkList")).build(); } } } - return getGetFiberMethod; + return getGetOpticalLinkListMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteServiceConfigRuleMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteServiceConfigRule", requestType = context.ContextOuterClass.ServiceConfigRule.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteServiceConfigRuleMethod() { + io.grpc.MethodDescriptor getDeleteServiceConfigRuleMethod; + if ((getDeleteServiceConfigRuleMethod = ContextServiceGrpc.getDeleteServiceConfigRuleMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getDeleteServiceConfigRuleMethod = ContextServiceGrpc.getDeleteServiceConfigRuleMethod) == null) { + ContextServiceGrpc.getDeleteServiceConfigRuleMethod = getDeleteServiceConfigRuleMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteServiceConfigRule")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceConfigRule.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("DeleteServiceConfigRule")).build(); + } + } + } + return getDeleteServiceConfigRuleMethod; } /** @@ -1194,12 +1269,30 @@ public final class ContextServiceGrpc { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetOpticalConfigMethod(), responseObserver); } + /** + */ + default void updateOpticalConfig(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateOpticalConfigMethod(), responseObserver); + } + /** */ default void selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectOpticalConfigMethod(), responseObserver); } + /** + */ + default void deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteOpticalConfigMethod(), responseObserver); + } + + /** + */ + default void deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteOpticalChannelMethod(), responseObserver); + } + /** */ default void setOpticalLink(context.ContextOuterClass.OpticalLink request, io.grpc.stub.StreamObserver responseObserver) { @@ -1208,14 +1301,26 @@ public final class ContextServiceGrpc { /** */ - default void getOpticalLink(context.ContextOuterClass.OpticalLinkId request, io.grpc.stub.StreamObserver responseObserver) { + default void getOpticalLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOpticalLinkMethod(), responseObserver); } /** */ - default void getFiber(context.ContextOuterClass.FiberId request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFiberMethod(), responseObserver); + default void deleteOpticalLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteOpticalLinkMethod(), responseObserver); + } + + /** + */ + default void getOpticalLinkList(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOpticalLinkListMethod(), responseObserver); + } + + /** + */ + default void deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteServiceConfigRuleMethod(), responseObserver); } } @@ -1553,12 +1658,30 @@ public final class ContextServiceGrpc { io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetOpticalConfigMethod(), getCallOptions()), request, responseObserver); } + /** + */ + public void updateOpticalConfig(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getUpdateOpticalConfigMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSelectOpticalConfigMethod(), getCallOptions()), request, responseObserver); } + /** + */ + public void deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteOpticalConfigMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteOpticalChannelMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void setOpticalLink(context.ContextOuterClass.OpticalLink request, io.grpc.stub.StreamObserver responseObserver) { @@ -1567,14 +1690,26 @@ public final class ContextServiceGrpc { /** */ - public void getOpticalLink(context.ContextOuterClass.OpticalLinkId request, io.grpc.stub.StreamObserver responseObserver) { + public void getOpticalLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetOpticalLinkMethod(), getCallOptions()), request, responseObserver); } /** */ - public void getFiber(context.ContextOuterClass.FiberId request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetFiberMethod(), getCallOptions()), request, responseObserver); + public void deleteOpticalLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteOpticalLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getOpticalLinkList(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetOpticalLinkListMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteServiceConfigRuleMethod(), getCallOptions()), request, responseObserver); } } @@ -1901,12 +2036,30 @@ public final class ContextServiceGrpc { return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetOpticalConfigMethod(), getCallOptions(), request); } + /** + */ + public context.ContextOuterClass.OpticalConfigId updateOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getUpdateOpticalConfigMethod(), getCallOptions(), request); + } + /** */ public context.ContextOuterClass.OpticalConfig selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSelectOpticalConfigMethod(), getCallOptions(), request); } + /** + */ + public context.ContextOuterClass.Empty deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteOpticalConfigMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteOpticalChannelMethod(), getCallOptions(), request); + } + /** */ public context.ContextOuterClass.Empty setOpticalLink(context.ContextOuterClass.OpticalLink request) { @@ -1915,14 +2068,26 @@ public final class ContextServiceGrpc { /** */ - public context.ContextOuterClass.OpticalLink getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + public context.ContextOuterClass.OpticalLink getOpticalLink(context.ContextOuterClass.LinkId request) { return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetOpticalLinkMethod(), getCallOptions(), request); } /** */ - public context.ContextOuterClass.Fiber getFiber(context.ContextOuterClass.FiberId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetFiberMethod(), getCallOptions(), request); + public context.ContextOuterClass.Empty deleteOpticalLink(context.ContextOuterClass.LinkId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteOpticalLinkMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.OpticalLinkList getOpticalLinkList(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetOpticalLinkListMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteServiceConfigRuleMethod(), getCallOptions(), request); } } @@ -2207,12 +2372,30 @@ public final class ContextServiceGrpc { return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetOpticalConfigMethod(), getCallOptions()), request); } + /** + */ + public com.google.common.util.concurrent.ListenableFuture updateOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getUpdateOpticalConfigMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSelectOpticalConfigMethod(), getCallOptions()), request); } + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteOpticalConfigMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteOpticalChannelMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture setOpticalLink(context.ContextOuterClass.OpticalLink request) { @@ -2221,14 +2404,26 @@ public final class ContextServiceGrpc { /** */ - public com.google.common.util.concurrent.ListenableFuture getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + public com.google.common.util.concurrent.ListenableFuture getOpticalLink(context.ContextOuterClass.LinkId request) { return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetOpticalLinkMethod(), getCallOptions()), request); } /** */ - public com.google.common.util.concurrent.ListenableFuture getFiber(context.ContextOuterClass.FiberId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetFiberMethod(), getCallOptions()), request); + public com.google.common.util.concurrent.ListenableFuture deleteOpticalLink(context.ContextOuterClass.LinkId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteOpticalLinkMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getOpticalLinkList(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetOpticalLinkListMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteServiceConfigRuleMethod(), getCallOptions()), request); } } @@ -2334,13 +2529,23 @@ public final class ContextServiceGrpc { private static final int METHODID_SET_OPTICAL_CONFIG = 50; - private static final int METHODID_SELECT_OPTICAL_CONFIG = 51; + private static final int METHODID_UPDATE_OPTICAL_CONFIG = 51; + + private static final int METHODID_SELECT_OPTICAL_CONFIG = 52; + + private static final int METHODID_DELETE_OPTICAL_CONFIG = 53; + + private static final int METHODID_DELETE_OPTICAL_CHANNEL = 54; - private static final int METHODID_SET_OPTICAL_LINK = 52; + private static final int METHODID_SET_OPTICAL_LINK = 55; - private static final int METHODID_GET_OPTICAL_LINK = 53; + private static final int METHODID_GET_OPTICAL_LINK = 56; - private static final int METHODID_GET_FIBER = 54; + private static final int METHODID_DELETE_OPTICAL_LINK = 57; + + private static final int METHODID_GET_OPTICAL_LINK_LIST = 58; + + private static final int METHODID_DELETE_SERVICE_CONFIG_RULE = 59; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { @@ -2510,17 +2715,32 @@ public final class ContextServiceGrpc { case METHODID_SET_OPTICAL_CONFIG: serviceImpl.setOpticalConfig((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_UPDATE_OPTICAL_CONFIG: + serviceImpl.updateOpticalConfig((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_SELECT_OPTICAL_CONFIG: serviceImpl.selectOpticalConfig((context.ContextOuterClass.OpticalConfigId) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_DELETE_OPTICAL_CONFIG: + serviceImpl.deleteOpticalConfig((context.ContextOuterClass.OpticalConfigId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_OPTICAL_CHANNEL: + serviceImpl.deleteOpticalChannel((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_SET_OPTICAL_LINK: serviceImpl.setOpticalLink((context.ContextOuterClass.OpticalLink) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_OPTICAL_LINK: - serviceImpl.getOpticalLink((context.ContextOuterClass.OpticalLinkId) request, (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.getOpticalLink((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_OPTICAL_LINK: + serviceImpl.deleteOpticalLink((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_OPTICAL_LINK_LIST: + serviceImpl.getOpticalLinkList((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); break; - case METHODID_GET_FIBER: - serviceImpl.getFiber((context.ContextOuterClass.FiberId) request, (io.grpc.stub.StreamObserver) responseObserver); + case METHODID_DELETE_SERVICE_CONFIG_RULE: + serviceImpl.deleteServiceConfigRule((context.ContextOuterClass.ServiceConfigRule) request, (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); @@ -2538,7 +2758,7 @@ public final class ContextServiceGrpc { } public static io.grpc.ServerServiceDefinition bindService(AsyncService service) { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getListContextIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_CONTEXT_IDS))).addMethod(getListContextsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_CONTEXTS))).addMethod(getGetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_CONTEXT))).addMethod(getSetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_CONTEXT))).addMethod(getRemoveContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_CONTEXT))).addMethod(getGetContextEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_CONTEXT_EVENTS))).addMethod(getListTopologyIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_TOPOLOGY_IDS))).addMethod(getListTopologiesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_TOPOLOGIES))).addMethod(getGetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_TOPOLOGY))).addMethod(getGetTopologyDetailsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_TOPOLOGY_DETAILS))).addMethod(getSetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_TOPOLOGY))).addMethod(getRemoveTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_TOPOLOGY))).addMethod(getGetTopologyEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_TOPOLOGY_EVENTS))).addMethod(getListDeviceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_DEVICE_IDS))).addMethod(getListDevicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_DEVICES))).addMethod(getGetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_DEVICE))).addMethod(getSetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_DEVICE))).addMethod(getRemoveDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_DEVICE))).addMethod(getGetDeviceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_DEVICE_EVENTS))).addMethod(getSelectDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SELECT_DEVICE))).addMethod(getListEndPointNamesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_END_POINT_NAMES))).addMethod(getListLinkIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_LINK_IDS))).addMethod(getListLinksMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_LINKS))).addMethod(getGetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_LINK))).addMethod(getSetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_LINK))).addMethod(getRemoveLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_LINK))).addMethod(getGetLinkEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_LINK_EVENTS))).addMethod(getListServiceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_SERVICE_IDS))).addMethod(getListServicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_SERVICES))).addMethod(getGetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_SERVICE))).addMethod(getSetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_SERVICE))).addMethod(getUnsetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_UNSET_SERVICE))).addMethod(getRemoveServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_SERVICE))).addMethod(getGetServiceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_SERVICE_EVENTS))).addMethod(getSelectServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SELECT_SERVICE))).addMethod(getListSliceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_SLICE_IDS))).addMethod(getListSlicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_SLICES))).addMethod(getGetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_SLICE))).addMethod(getSetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_SLICE))).addMethod(getUnsetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_UNSET_SLICE))).addMethod(getRemoveSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_SLICE))).addMethod(getGetSliceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_SLICE_EVENTS))).addMethod(getSelectSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SELECT_SLICE))).addMethod(getListConnectionIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_CONNECTION_IDS))).addMethod(getListConnectionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_CONNECTIONS))).addMethod(getGetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_CONNECTION))).addMethod(getSetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_CONNECTION))).addMethod(getRemoveConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_CONNECTION))).addMethod(getGetConnectionEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_CONNECTION_EVENTS))).addMethod(getGetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_OPTICAL_CONFIG))).addMethod(getSetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_OPTICAL_CONFIG))).addMethod(getSelectOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SELECT_OPTICAL_CONFIG))).addMethod(getSetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_OPTICAL_LINK))).addMethod(getGetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_OPTICAL_LINK))).addMethod(getGetFiberMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_FIBER))).build(); + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getListContextIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_CONTEXT_IDS))).addMethod(getListContextsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_CONTEXTS))).addMethod(getGetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_CONTEXT))).addMethod(getSetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_CONTEXT))).addMethod(getRemoveContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_CONTEXT))).addMethod(getGetContextEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_CONTEXT_EVENTS))).addMethod(getListTopologyIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_TOPOLOGY_IDS))).addMethod(getListTopologiesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_TOPOLOGIES))).addMethod(getGetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_TOPOLOGY))).addMethod(getGetTopologyDetailsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_TOPOLOGY_DETAILS))).addMethod(getSetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_TOPOLOGY))).addMethod(getRemoveTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_TOPOLOGY))).addMethod(getGetTopologyEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_TOPOLOGY_EVENTS))).addMethod(getListDeviceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_DEVICE_IDS))).addMethod(getListDevicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_DEVICES))).addMethod(getGetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_DEVICE))).addMethod(getSetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_DEVICE))).addMethod(getRemoveDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_DEVICE))).addMethod(getGetDeviceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_DEVICE_EVENTS))).addMethod(getSelectDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SELECT_DEVICE))).addMethod(getListEndPointNamesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_END_POINT_NAMES))).addMethod(getListLinkIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_LINK_IDS))).addMethod(getListLinksMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_LINKS))).addMethod(getGetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_LINK))).addMethod(getSetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_LINK))).addMethod(getRemoveLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_LINK))).addMethod(getGetLinkEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_LINK_EVENTS))).addMethod(getListServiceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_SERVICE_IDS))).addMethod(getListServicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_SERVICES))).addMethod(getGetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_SERVICE))).addMethod(getSetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_SERVICE))).addMethod(getUnsetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_UNSET_SERVICE))).addMethod(getRemoveServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_SERVICE))).addMethod(getGetServiceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_SERVICE_EVENTS))).addMethod(getSelectServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SELECT_SERVICE))).addMethod(getListSliceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_SLICE_IDS))).addMethod(getListSlicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_SLICES))).addMethod(getGetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_SLICE))).addMethod(getSetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_SLICE))).addMethod(getUnsetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_UNSET_SLICE))).addMethod(getRemoveSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_SLICE))).addMethod(getGetSliceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_SLICE_EVENTS))).addMethod(getSelectSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SELECT_SLICE))).addMethod(getListConnectionIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_CONNECTION_IDS))).addMethod(getListConnectionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_CONNECTIONS))).addMethod(getGetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_CONNECTION))).addMethod(getSetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_CONNECTION))).addMethod(getRemoveConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_CONNECTION))).addMethod(getGetConnectionEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_CONNECTION_EVENTS))).addMethod(getGetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_OPTICAL_CONFIG))).addMethod(getSetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_OPTICAL_CONFIG))).addMethod(getUpdateOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_UPDATE_OPTICAL_CONFIG))).addMethod(getSelectOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SELECT_OPTICAL_CONFIG))).addMethod(getDeleteOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_DELETE_OPTICAL_CONFIG))).addMethod(getDeleteOpticalChannelMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_DELETE_OPTICAL_CHANNEL))).addMethod(getSetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_OPTICAL_LINK))).addMethod(getGetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_OPTICAL_LINK))).addMethod(getDeleteOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_DELETE_OPTICAL_LINK))).addMethod(getGetOpticalLinkListMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_OPTICAL_LINK_LIST))).addMethod(getDeleteServiceConfigRuleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_DELETE_SERVICE_CONFIG_RULE))).build(); } private static abstract class ContextServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { @@ -2585,7 +2805,7 @@ public final class ContextServiceGrpc { synchronized (ContextServiceGrpc.class) { result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new ContextServiceFileDescriptorSupplier()).addMethod(getListContextIdsMethod()).addMethod(getListContextsMethod()).addMethod(getGetContextMethod()).addMethod(getSetContextMethod()).addMethod(getRemoveContextMethod()).addMethod(getGetContextEventsMethod()).addMethod(getListTopologyIdsMethod()).addMethod(getListTopologiesMethod()).addMethod(getGetTopologyMethod()).addMethod(getGetTopologyDetailsMethod()).addMethod(getSetTopologyMethod()).addMethod(getRemoveTopologyMethod()).addMethod(getGetTopologyEventsMethod()).addMethod(getListDeviceIdsMethod()).addMethod(getListDevicesMethod()).addMethod(getGetDeviceMethod()).addMethod(getSetDeviceMethod()).addMethod(getRemoveDeviceMethod()).addMethod(getGetDeviceEventsMethod()).addMethod(getSelectDeviceMethod()).addMethod(getListEndPointNamesMethod()).addMethod(getListLinkIdsMethod()).addMethod(getListLinksMethod()).addMethod(getGetLinkMethod()).addMethod(getSetLinkMethod()).addMethod(getRemoveLinkMethod()).addMethod(getGetLinkEventsMethod()).addMethod(getListServiceIdsMethod()).addMethod(getListServicesMethod()).addMethod(getGetServiceMethod()).addMethod(getSetServiceMethod()).addMethod(getUnsetServiceMethod()).addMethod(getRemoveServiceMethod()).addMethod(getGetServiceEventsMethod()).addMethod(getSelectServiceMethod()).addMethod(getListSliceIdsMethod()).addMethod(getListSlicesMethod()).addMethod(getGetSliceMethod()).addMethod(getSetSliceMethod()).addMethod(getUnsetSliceMethod()).addMethod(getRemoveSliceMethod()).addMethod(getGetSliceEventsMethod()).addMethod(getSelectSliceMethod()).addMethod(getListConnectionIdsMethod()).addMethod(getListConnectionsMethod()).addMethod(getGetConnectionMethod()).addMethod(getSetConnectionMethod()).addMethod(getRemoveConnectionMethod()).addMethod(getGetConnectionEventsMethod()).addMethod(getGetOpticalConfigMethod()).addMethod(getSetOpticalConfigMethod()).addMethod(getSelectOpticalConfigMethod()).addMethod(getSetOpticalLinkMethod()).addMethod(getGetOpticalLinkMethod()).addMethod(getGetFiberMethod()).build(); + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new ContextServiceFileDescriptorSupplier()).addMethod(getListContextIdsMethod()).addMethod(getListContextsMethod()).addMethod(getGetContextMethod()).addMethod(getSetContextMethod()).addMethod(getRemoveContextMethod()).addMethod(getGetContextEventsMethod()).addMethod(getListTopologyIdsMethod()).addMethod(getListTopologiesMethod()).addMethod(getGetTopologyMethod()).addMethod(getGetTopologyDetailsMethod()).addMethod(getSetTopologyMethod()).addMethod(getRemoveTopologyMethod()).addMethod(getGetTopologyEventsMethod()).addMethod(getListDeviceIdsMethod()).addMethod(getListDevicesMethod()).addMethod(getGetDeviceMethod()).addMethod(getSetDeviceMethod()).addMethod(getRemoveDeviceMethod()).addMethod(getGetDeviceEventsMethod()).addMethod(getSelectDeviceMethod()).addMethod(getListEndPointNamesMethod()).addMethod(getListLinkIdsMethod()).addMethod(getListLinksMethod()).addMethod(getGetLinkMethod()).addMethod(getSetLinkMethod()).addMethod(getRemoveLinkMethod()).addMethod(getGetLinkEventsMethod()).addMethod(getListServiceIdsMethod()).addMethod(getListServicesMethod()).addMethod(getGetServiceMethod()).addMethod(getSetServiceMethod()).addMethod(getUnsetServiceMethod()).addMethod(getRemoveServiceMethod()).addMethod(getGetServiceEventsMethod()).addMethod(getSelectServiceMethod()).addMethod(getListSliceIdsMethod()).addMethod(getListSlicesMethod()).addMethod(getGetSliceMethod()).addMethod(getSetSliceMethod()).addMethod(getUnsetSliceMethod()).addMethod(getRemoveSliceMethod()).addMethod(getGetSliceEventsMethod()).addMethod(getSelectSliceMethod()).addMethod(getListConnectionIdsMethod()).addMethod(getListConnectionsMethod()).addMethod(getGetConnectionMethod()).addMethod(getSetConnectionMethod()).addMethod(getRemoveConnectionMethod()).addMethod(getGetConnectionEventsMethod()).addMethod(getGetOpticalConfigMethod()).addMethod(getSetOpticalConfigMethod()).addMethod(getUpdateOpticalConfigMethod()).addMethod(getSelectOpticalConfigMethod()).addMethod(getDeleteOpticalConfigMethod()).addMethod(getDeleteOpticalChannelMethod()).addMethod(getSetOpticalLinkMethod()).addMethod(getGetOpticalLinkMethod()).addMethod(getDeleteOpticalLinkMethod()).addMethod(getGetOpticalLinkListMethod()).addMethod(getDeleteServiceConfigRuleMethod()).build(); } } } diff --git a/src/policy/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java b/src/policy/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java index c6dbb1e92..b97952a61 100644 --- a/src/policy/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java @@ -216,20 +216,40 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.MutinyGrp return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setOpticalConfig); } + public io.smallrye.mutiny.Uni updateOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::updateOpticalConfig); + } + public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::selectOpticalConfig); } + public io.smallrye.mutiny.Uni deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteOpticalConfig); + } + + public io.smallrye.mutiny.Uni deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteOpticalChannel); + } + public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setOpticalLink); } - public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.LinkId request) { return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getOpticalLink); } - public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { - return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getFiber); + public io.smallrye.mutiny.Uni deleteOpticalLink(context.ContextOuterClass.LinkId request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteOpticalLink); + } + + public io.smallrye.mutiny.Uni getOpticalLinkList(context.ContextOuterClass.Empty request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getOpticalLinkList); + } + + public io.smallrye.mutiny.Uni deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteServiceConfigRule); } public io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request) { @@ -456,19 +476,39 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.MutinyGrp throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } + public io.smallrye.mutiny.Uni updateOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } + public io.smallrye.mutiny.Uni deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.LinkId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { + public io.smallrye.mutiny.Uni deleteOpticalLink(context.ContextOuterClass.LinkId request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni getOpticalLinkList(context.ContextOuterClass.Empty request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @@ -502,7 +542,7 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.MutinyGrp @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(context.ContextServiceGrpc.getListContextIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXT_IDS, compression))).addMethod(context.ContextServiceGrpc.getListContextsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXTS, compression))).addMethod(context.ContextServiceGrpc.getGetContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getSetContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getRemoveContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getGetContextEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONTEXT_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListTopologyIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGY_IDS, compression))).addMethod(context.ContextServiceGrpc.getListTopologiesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGIES, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyDetailsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_DETAILS, compression))).addMethod(context.ContextServiceGrpc.getSetTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getRemoveTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListDeviceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListDevicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICES, compression))).addMethod(context.ContextServiceGrpc.getGetDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getSetDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getGetDeviceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_DEVICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getListEndPointNamesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_END_POINT_NAMES, compression))).addMethod(context.ContextServiceGrpc.getListLinkIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINK_IDS, compression))).addMethod(context.ContextServiceGrpc.getListLinksMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINKS, compression))).addMethod(context.ContextServiceGrpc.getGetLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_LINK, compression))).addMethod(context.ContextServiceGrpc.getSetLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_LINK, compression))).addMethod(context.ContextServiceGrpc.getRemoveLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetLinkEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_LINK_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListServiceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListServicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICES, compression))).addMethod(context.ContextServiceGrpc.getGetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getSetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getUnsetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getGetServiceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SERVICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getListSliceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListSlicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICES, compression))).addMethod(context.ContextServiceGrpc.getGetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getSetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getUnsetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SLICE, compression))).addMethod(context.ContextServiceGrpc.getGetSliceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SLICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SLICE, compression))).addMethod(context.ContextServiceGrpc.getListConnectionIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTION_IDS, compression))).addMethod(context.ContextServiceGrpc.getListConnectionsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTIONS, compression))).addMethod(context.ContextServiceGrpc.getGetConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getSetConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getRemoveConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getGetConnectionEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONNECTION_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSetOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSelectOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSetOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetFiberMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_FIBER, compression))).build(); + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(context.ContextServiceGrpc.getListContextIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXT_IDS, compression))).addMethod(context.ContextServiceGrpc.getListContextsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXTS, compression))).addMethod(context.ContextServiceGrpc.getGetContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getSetContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getRemoveContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getGetContextEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONTEXT_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListTopologyIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGY_IDS, compression))).addMethod(context.ContextServiceGrpc.getListTopologiesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGIES, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyDetailsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_DETAILS, compression))).addMethod(context.ContextServiceGrpc.getSetTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getRemoveTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListDeviceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListDevicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICES, compression))).addMethod(context.ContextServiceGrpc.getGetDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getSetDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getGetDeviceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_DEVICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getListEndPointNamesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_END_POINT_NAMES, compression))).addMethod(context.ContextServiceGrpc.getListLinkIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINK_IDS, compression))).addMethod(context.ContextServiceGrpc.getListLinksMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINKS, compression))).addMethod(context.ContextServiceGrpc.getGetLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_LINK, compression))).addMethod(context.ContextServiceGrpc.getSetLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_LINK, compression))).addMethod(context.ContextServiceGrpc.getRemoveLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetLinkEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_LINK_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListServiceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListServicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICES, compression))).addMethod(context.ContextServiceGrpc.getGetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getSetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getUnsetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getGetServiceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SERVICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getListSliceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListSlicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICES, compression))).addMethod(context.ContextServiceGrpc.getGetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getSetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getUnsetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SLICE, compression))).addMethod(context.ContextServiceGrpc.getGetSliceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SLICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SLICE, compression))).addMethod(context.ContextServiceGrpc.getListConnectionIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTION_IDS, compression))).addMethod(context.ContextServiceGrpc.getListConnectionsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTIONS, compression))).addMethod(context.ContextServiceGrpc.getGetConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getSetConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getRemoveConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getGetConnectionEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONNECTION_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSetOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getUpdateOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UPDATE_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSelectOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getDeleteOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getDeleteOpticalChannelMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_OPTICAL_CHANNEL, compression))).addMethod(context.ContextServiceGrpc.getSetOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getDeleteOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalLinkListMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_LINK_LIST, compression))).addMethod(context.ContextServiceGrpc.getDeleteServiceConfigRuleMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_SERVICE_CONFIG_RULE, compression))).build(); } } @@ -608,13 +648,23 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.MutinyGrp private static final int METHODID_SET_OPTICAL_CONFIG = 50; - private static final int METHODID_SELECT_OPTICAL_CONFIG = 51; + private static final int METHODID_UPDATE_OPTICAL_CONFIG = 51; + + private static final int METHODID_SELECT_OPTICAL_CONFIG = 52; + + private static final int METHODID_DELETE_OPTICAL_CONFIG = 53; - private static final int METHODID_SET_OPTICAL_LINK = 52; + private static final int METHODID_DELETE_OPTICAL_CHANNEL = 54; - private static final int METHODID_GET_OPTICAL_LINK = 53; + private static final int METHODID_SET_OPTICAL_LINK = 55; - private static final int METHODID_GET_FIBER = 54; + private static final int METHODID_GET_OPTICAL_LINK = 56; + + private static final int METHODID_DELETE_OPTICAL_LINK = 57; + + private static final int METHODID_GET_OPTICAL_LINK_LIST = 58; + + private static final int METHODID_DELETE_SERVICE_CONFIG_RULE = 59; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { @@ -787,17 +837,32 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.MutinyGrp case METHODID_SET_OPTICAL_CONFIG: io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setOpticalConfig); break; + case METHODID_UPDATE_OPTICAL_CONFIG: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::updateOpticalConfig); + break; case METHODID_SELECT_OPTICAL_CONFIG: io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfigId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::selectOpticalConfig); break; + case METHODID_DELETE_OPTICAL_CONFIG: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfigId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteOpticalConfig); + break; + case METHODID_DELETE_OPTICAL_CHANNEL: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteOpticalChannel); + break; case METHODID_SET_OPTICAL_LINK: io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalLink) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setOpticalLink); break; case METHODID_GET_OPTICAL_LINK: - io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalLinkId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getOpticalLink); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getOpticalLink); + break; + case METHODID_DELETE_OPTICAL_LINK: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteOpticalLink); + break; + case METHODID_GET_OPTICAL_LINK_LIST: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getOpticalLinkList); break; - case METHODID_GET_FIBER: - io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.FiberId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getFiber); + case METHODID_DELETE_SERVICE_CONFIG_RULE: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceConfigRule) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteServiceConfigRule); break; default: throw new java.lang.AssertionError(); diff --git a/src/policy/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java b/src/policy/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java index 9621efb4b..2a8a62593 100644 --- a/src/policy/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java +++ b/src/policy/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java @@ -95,6 +95,38 @@ public final class KpiSampleTypes { * KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; */ KPISAMPLETYPE_SERVICE_LATENCY_MS(701), + /** + *
+         * output KPIs
+         * 
+ * + * KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT = 1101; + */ + KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT(1101), + /** + * KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT = 1102; + */ + KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT(1102), + /** + * KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT = 1103; + */ + KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT(1103), + /** + * KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT = 1201; + */ + KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT(1201), + /** + * KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT = 1202; + */ + KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT(1202), + /** + * KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT = 1203; + */ + KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT(1203), + /** + * KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT = 1701; + */ + KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT(1701), UNRECOGNIZED(-1); /** @@ -190,6 +222,45 @@ public final class KpiSampleTypes { */ public static final int KPISAMPLETYPE_SERVICE_LATENCY_MS_VALUE = 701; + /** + *
+         * output KPIs
+         * 
+ * + * KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT = 1101; + */ + public static final int KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT_VALUE = 1101; + + /** + * KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT = 1102; + */ + public static final int KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT_VALUE = 1102; + + /** + * KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT = 1103; + */ + public static final int KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT_VALUE = 1103; + + /** + * KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT = 1201; + */ + public static final int KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT_VALUE = 1201; + + /** + * KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT = 1202; + */ + public static final int KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT_VALUE = 1202; + + /** + * KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT = 1203; + */ + public static final int KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT_VALUE = 1203; + + /** + * KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT = 1701; + */ + public static final int KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT_VALUE = 1701; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); @@ -247,6 +318,20 @@ public final class KpiSampleTypes { return KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO; case 701: return KPISAMPLETYPE_SERVICE_LATENCY_MS; + case 1101: + return KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT; + case 1102: + return KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT; + case 1103: + return KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT; + case 1201: + return KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT; + case 1202: + return KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT; + case 1203: + return KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT; + case 1701: + return KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT; default: return null; } @@ -304,7 +389,7 @@ public final class KpiSampleTypes { private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { "\n\026kpi_sample_types.proto\022\020kpi_sample_typ" + "es*\260\005\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + "KNOWN\020\000\022%\n!KPISAMPLETYPE_PACKETS_TRANSMI" + "TTED\020e\022\"\n\036KPISAMPLETYPE_PACKETS_RECEIVED" + "\020f\022!\n\035KPISAMPLETYPE_PACKETS_DROPPED\020g\022$\n" + "\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001\022!\n\034K" + "PISAMPLETYPE_BYTES_RECEIVED\020\312\001\022 \n\033KPISAM" + "PLETYPE_BYTES_DROPPED\020\313\001\022+\n&KPISAMPLETYP" + "E_LINK_TOTAL_CAPACITY_GBPS\020\255\002\022*\n%KPISAMP" + "LETYPE_LINK_USED_CAPACITY_GBPS\020\256\002\022 \n\033KPI" + "SAMPLETYPE_ML_CONFIDENCE\020\221\003\022*\n%KPISAMPLE" + "TYPE_OPTICAL_SECURITY_STATUS\020\365\003\022)\n$KPISA" + "MPLETYPE_L3_UNIQUE_ATTACK_CONNS\020\331\004\022*\n%KP" + "ISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS\020\332\004\022&" + "\n!KPISAMPLETYPE_L3_UNIQUE_ATTACKERS\020\333\004\0220" + "\n+KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CL" + "IENTS\020\334\004\022,\n\'KPISAMPLETYPE_L3_SECURITY_ST" + "ATUS_CRYPTO\020\335\004\022%\n KPISAMPLETYPE_SERVICE_" + "LATENCY_MS\020\275\005b\006proto3" }; + java.lang.String[] descriptorData = { "\n\026kpi_sample_types.proto\022\020kpi_sample_typ" + "es*\200\010\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + "KNOWN\020\000\022%\n!KPISAMPLETYPE_PACKETS_TRANSMI" + "TTED\020e\022\"\n\036KPISAMPLETYPE_PACKETS_RECEIVED" + "\020f\022!\n\035KPISAMPLETYPE_PACKETS_DROPPED\020g\022$\n" + "\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001\022!\n\034K" + "PISAMPLETYPE_BYTES_RECEIVED\020\312\001\022 \n\033KPISAM" + "PLETYPE_BYTES_DROPPED\020\313\001\022+\n&KPISAMPLETYP" + "E_LINK_TOTAL_CAPACITY_GBPS\020\255\002\022*\n%KPISAMP" + "LETYPE_LINK_USED_CAPACITY_GBPS\020\256\002\022 \n\033KPI" + "SAMPLETYPE_ML_CONFIDENCE\020\221\003\022*\n%KPISAMPLE" + "TYPE_OPTICAL_SECURITY_STATUS\020\365\003\022)\n$KPISA" + "MPLETYPE_L3_UNIQUE_ATTACK_CONNS\020\331\004\022*\n%KP" + "ISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS\020\332\004\022&" + "\n!KPISAMPLETYPE_L3_UNIQUE_ATTACKERS\020\333\004\0220" + "\n+KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CL" + "IENTS\020\334\004\022,\n\'KPISAMPLETYPE_L3_SECURITY_ST" + "ATUS_CRYPTO\020\335\004\022%\n KPISAMPLETYPE_SERVICE_" + "LATENCY_MS\020\275\005\0221\n,KPISAMPLETYPE_PACKETS_T" + "RANSMITTED_AGG_OUTPUT\020\315\010\022.\n)KPISAMPLETYP" + "E_PACKETS_RECEIVED_AGG_OUTPUT\020\316\010\022-\n(KPIS" + "AMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT\020\317\010\022" + "/\n*KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_O" + "UTPUT\020\261\t\022,\n\'KPISAMPLETYPE_BYTES_RECEIVED" + "_AGG_OUTPUT\020\262\t\022+\n&KPISAMPLETYPE_BYTES_DR" + "OPPED_AGG_OUTPUT\020\263\t\0220\n+KPISAMPLETYPE_SER" + "VICE_LATENCY_MS_AGG_OUTPUT\020\245\rb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); } // @@protoc_insertion_point(outer_class_scope) diff --git a/src/policy/target/kubernetes/kubernetes.yml b/src/policy/target/kubernetes/kubernetes.yml new file mode 100644 index 000000000..327338b7e --- /dev/null +++ b/src/policy/target/kubernetes/kubernetes.yml @@ -0,0 +1,135 @@ +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + app.quarkus.io/commit-id: 4a4c9dae464ba1919bca69eb213009c24385a759 + app.quarkus.io/build-timestamp: 2025-04-10 - 15:55:21 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + app.kubernetes.io/name: policyservice + app.kubernetes.io/version: 0.1.0 + app: policyservice + app.kubernetes.io/managed-by: quarkus + name: policyservice +spec: + ports: + - name: http + port: 9192 + protocol: TCP + targetPort: 8080 + - name: https + port: 443 + protocol: TCP + targetPort: 8443 + - name: grpc + port: 6060 + protocol: TCP + targetPort: 6060 + selector: + app.kubernetes.io/name: policyservice + type: ClusterIP +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + app.quarkus.io/commit-id: 4a4c9dae464ba1919bca69eb213009c24385a759 + app.quarkus.io/build-timestamp: 2025-04-10 - 15:55:21 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + app: policyservice + app.kubernetes.io/managed-by: quarkus + app.kubernetes.io/version: 0.1.0 + app.kubernetes.io/name: policyservice + name: policyservice +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: policyservice + template: + metadata: + annotations: + app.quarkus.io/commit-id: 4a4c9dae464ba1919bca69eb213009c24385a759 + app.quarkus.io/build-timestamp: 2025-04-10 - 15:55:21 +0000 + prometheus.io/scrape: "true" + prometheus.io/path: /q/metrics + prometheus.io/port: "8080" + prometheus.io/scheme: http + labels: + app: policyservice + app.kubernetes.io/managed-by: quarkus + app.kubernetes.io/version: 0.1.0 + app.kubernetes.io/name: policyservice + spec: + containers: + - env: + - name: KUBERNETES_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: SERVICE_SERVICE_HOST + value: serviceservice + - name: CONTEXT_SERVICE_HOST + value: contextservice + - name: MONITORING_SERVICE_HOST + value: monitoringservice + - name: KAFKA_BROKER_HOST + value: kafka-service.kafka.svc.cluster.local + image: labs.etsi.org:5050/tfs/controller/policy:0.1.0 + imagePullPolicy: Always + livenessProbe: + failureThreshold: 3 + httpGet: + path: /q/health/live + port: 8080 + scheme: HTTP + initialDelaySeconds: 2 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 10 + name: policyservice + ports: + - containerPort: 8080 + name: http + protocol: TCP + - containerPort: 8443 + name: https + protocol: TCP + - containerPort: 6060 + name: grpc + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /q/health/ready + port: 8080 + scheme: HTTP + initialDelaySeconds: 2 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 10 + resources: + limits: + cpu: 500m + memory: 2048Mi + requests: + cpu: 50m + memory: 512Mi + startupProbe: + failureThreshold: 3 + httpGet: + path: /q/health/started + port: 8080 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 10 diff --git a/src/ztp/target/generated-sources/grpc/acl/Acl.java b/src/ztp/target/generated-sources/grpc/acl/Acl.java index f1895fa72..037bd3858 100644 --- a/src/ztp/target/generated-sources/grpc/acl/Acl.java +++ b/src/ztp/target/generated-sources/grpc/acl/Acl.java @@ -459,6 +459,18 @@ public final class Acl { * @return The endMplsLabel. */ int getEndMplsLabel(); + + /** + * string tcp_flags = 9; + * @return The tcpFlags. + */ + java.lang.String getTcpFlags(); + + /** + * string tcp_flags = 9; + * @return The bytes for tcpFlags. + */ + com.google.protobuf.ByteString getTcpFlagsBytes(); } /** @@ -477,6 +489,7 @@ public final class Acl { private AclMatch() { srcAddress_ = ""; dstAddress_ = ""; + tcpFlags_ = ""; } @java.lang.Override @@ -485,86 +498,6 @@ public final class Acl { return new AclMatch(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AclMatch(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - dscp_ = input.readUInt32(); - break; - } - case 16: - { - protocol_ = input.readUInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - srcAddress_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - dstAddress_ = s; - break; - } - case 40: - { - srcPort_ = input.readUInt32(); - break; - } - case 48: - { - dstPort_ = input.readUInt32(); - break; - } - case 56: - { - startMplsLabel_ = input.readUInt32(); - break; - } - case 64: - { - endMplsLabel_ = input.readUInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return acl.Acl.internal_static_acl_AclMatch_descriptor; } @@ -576,7 +509,7 @@ public final class Acl { public static final int DSCP_FIELD_NUMBER = 1; - private int dscp_; + private int dscp_ = 0; /** * uint32 dscp = 1; @@ -589,7 +522,7 @@ public final class Acl { public static final int PROTOCOL_FIELD_NUMBER = 2; - private int protocol_; + private int protocol_ = 0; /** * uint32 protocol = 2; @@ -602,7 +535,8 @@ public final class Acl { public static final int SRC_ADDRESS_FIELD_NUMBER = 3; - private volatile java.lang.Object srcAddress_; + @SuppressWarnings("serial") + private volatile java.lang.Object srcAddress_ = ""; /** * string src_address = 3; @@ -639,7 +573,8 @@ public final class Acl { public static final int DST_ADDRESS_FIELD_NUMBER = 4; - private volatile java.lang.Object dstAddress_; + @SuppressWarnings("serial") + private volatile java.lang.Object dstAddress_ = ""; /** * string dst_address = 4; @@ -676,7 +611,7 @@ public final class Acl { public static final int SRC_PORT_FIELD_NUMBER = 5; - private int srcPort_; + private int srcPort_ = 0; /** * uint32 src_port = 5; @@ -689,7 +624,7 @@ public final class Acl { public static final int DST_PORT_FIELD_NUMBER = 6; - private int dstPort_; + private int dstPort_ = 0; /** * uint32 dst_port = 6; @@ -702,7 +637,7 @@ public final class Acl { public static final int START_MPLS_LABEL_FIELD_NUMBER = 7; - private int startMplsLabel_; + private int startMplsLabel_ = 0; /** * uint32 start_mpls_label = 7; @@ -715,7 +650,7 @@ public final class Acl { public static final int END_MPLS_LABEL_FIELD_NUMBER = 8; - private int endMplsLabel_; + private int endMplsLabel_ = 0; /** * uint32 end_mpls_label = 8; @@ -726,6 +661,44 @@ public final class Acl { return endMplsLabel_; } + public static final int TCP_FLAGS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object tcpFlags_ = ""; + + /** + * string tcp_flags = 9; + * @return The tcpFlags. + */ + @java.lang.Override + public java.lang.String getTcpFlags() { + java.lang.Object ref = tcpFlags_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tcpFlags_ = s; + return s; + } + } + + /** + * string tcp_flags = 9; + * @return The bytes for tcpFlags. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTcpFlagsBytes() { + java.lang.Object ref = tcpFlags_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tcpFlags_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -747,10 +720,10 @@ public final class Acl { if (protocol_ != 0) { output.writeUInt32(2, protocol_); } - if (!getSrcAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcAddress_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, srcAddress_); } - if (!getDstAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstAddress_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dstAddress_); } if (srcPort_ != 0) { @@ -765,7 +738,10 @@ public final class Acl { if (endMplsLabel_ != 0) { output.writeUInt32(8, endMplsLabel_); } - unknownFields.writeTo(output); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tcpFlags_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, tcpFlags_); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -780,10 +756,10 @@ public final class Acl { if (protocol_ != 0) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(2, protocol_); } - if (!getSrcAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcAddress_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, srcAddress_); } - if (!getDstAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstAddress_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dstAddress_); } if (srcPort_ != 0) { @@ -798,7 +774,10 @@ public final class Acl { if (endMplsLabel_ != 0) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(8, endMplsLabel_); } - size += unknownFields.getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tcpFlags_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, tcpFlags_); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -828,7 +807,9 @@ public final class Acl { return false; if (getEndMplsLabel() != other.getEndMplsLabel()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getTcpFlags().equals(other.getTcpFlags())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -856,7 +837,9 @@ public final class Acl { hash = (53 * hash) + getStartMplsLabel(); hash = (37 * hash) + END_MPLS_LABEL_FIELD_NUMBER; hash = (53 * hash) + getEndMplsLabel(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (37 * hash) + TCP_FLAGS_FIELD_NUMBER; + hash = (53 * hash) + getTcpFlags().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -950,22 +933,16 @@ public final class Acl { // Construct using acl.Acl.AclMatch.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; dscp_ = 0; protocol_ = 0; srcAddress_ = ""; @@ -974,6 +951,7 @@ public final class Acl { dstPort_ = 0; startMplsLabel_ = 0; endMplsLabel_ = 0; + tcpFlags_ = ""; return this; } @@ -999,46 +977,42 @@ public final class Acl { @java.lang.Override public acl.Acl.AclMatch buildPartial() { acl.Acl.AclMatch result = new acl.Acl.AclMatch(this); - result.dscp_ = dscp_; - result.protocol_ = protocol_; - result.srcAddress_ = srcAddress_; - result.dstAddress_ = dstAddress_; - result.srcPort_ = srcPort_; - result.dstPort_ = dstPort_; - result.startMplsLabel_ = startMplsLabel_; - result.endMplsLabel_ = endMplsLabel_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(acl.Acl.AclMatch result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dscp_ = dscp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.protocol_ = protocol_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.srcAddress_ = srcAddress_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dstAddress_ = dstAddress_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.srcPort_ = srcPort_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.dstPort_ = dstPort_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.startMplsLabel_ = startMplsLabel_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.endMplsLabel_ = endMplsLabel_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.tcpFlags_ = tcpFlags_; + } } @java.lang.Override @@ -1062,10 +1036,12 @@ public final class Acl { } if (!other.getSrcAddress().isEmpty()) { srcAddress_ = other.srcAddress_; + bitField0_ |= 0x00000004; onChanged(); } if (!other.getDstAddress().isEmpty()) { dstAddress_ = other.dstAddress_; + bitField0_ |= 0x00000008; onChanged(); } if (other.getSrcPort() != 0) { @@ -1080,7 +1056,12 @@ public final class Acl { if (other.getEndMplsLabel() != 0) { setEndMplsLabel(other.getEndMplsLabel()); } - this.mergeUnknownFields(other.unknownFields); + if (!other.getTcpFlags().isEmpty()) { + tcpFlags_ = other.tcpFlags_; + bitField0_ |= 0x00000100; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1092,20 +1073,103 @@ public final class Acl { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - acl.Acl.AclMatch parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + dscp_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 16: + { + protocol_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + case 26: + { + srcAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + dstAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } + // case 34 + case 40: + { + srcPort_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } + // case 40 + case 48: + { + dstPort_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } + // case 48 + case 56: + { + startMplsLabel_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } + // case 56 + case 64: + { + endMplsLabel_ = input.readUInt32(); + bitField0_ |= 0x00000080; + break; + } + // case 64 + case 74: + { + tcpFlags_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } + // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclMatch) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private int dscp_; /** @@ -1124,6 +1188,7 @@ public final class Acl { */ public Builder setDscp(int value) { dscp_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1133,6 +1198,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearDscp() { + bitField0_ = (bitField0_ & ~0x00000001); dscp_ = 0; onChanged(); return this; @@ -1156,6 +1222,7 @@ public final class Acl { */ public Builder setProtocol(int value) { protocol_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1165,6 +1232,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearProtocol() { + bitField0_ = (bitField0_ & ~0x00000002); protocol_ = 0; onChanged(); return this; @@ -1213,6 +1281,7 @@ public final class Acl { throw new NullPointerException(); } srcAddress_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1223,6 +1292,7 @@ public final class Acl { */ public Builder clearSrcAddress() { srcAddress_ = getDefaultInstance().getSrcAddress(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -1238,6 +1308,7 @@ public final class Acl { } checkByteStringIsUtf8(value); srcAddress_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1285,6 +1356,7 @@ public final class Acl { throw new NullPointerException(); } dstAddress_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1295,6 +1367,7 @@ public final class Acl { */ public Builder clearDstAddress() { dstAddress_ = getDefaultInstance().getDstAddress(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -1310,6 +1383,7 @@ public final class Acl { } checkByteStringIsUtf8(value); dstAddress_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1332,6 +1406,7 @@ public final class Acl { */ public Builder setSrcPort(int value) { srcPort_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1341,6 +1416,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearSrcPort() { + bitField0_ = (bitField0_ & ~0x00000010); srcPort_ = 0; onChanged(); return this; @@ -1364,6 +1440,7 @@ public final class Acl { */ public Builder setDstPort(int value) { dstPort_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1373,6 +1450,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearDstPort() { + bitField0_ = (bitField0_ & ~0x00000020); dstPort_ = 0; onChanged(); return this; @@ -1396,6 +1474,7 @@ public final class Acl { */ public Builder setStartMplsLabel(int value) { startMplsLabel_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1405,6 +1484,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearStartMplsLabel() { + bitField0_ = (bitField0_ & ~0x00000040); startMplsLabel_ = 0; onChanged(); return this; @@ -1428,6 +1508,7 @@ public final class Acl { */ public Builder setEndMplsLabel(int value) { endMplsLabel_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -1437,11 +1518,87 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearEndMplsLabel() { + bitField0_ = (bitField0_ & ~0x00000080); endMplsLabel_ = 0; onChanged(); return this; } + private java.lang.Object tcpFlags_ = ""; + + /** + * string tcp_flags = 9; + * @return The tcpFlags. + */ + public java.lang.String getTcpFlags() { + java.lang.Object ref = tcpFlags_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tcpFlags_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string tcp_flags = 9; + * @return The bytes for tcpFlags. + */ + public com.google.protobuf.ByteString getTcpFlagsBytes() { + java.lang.Object ref = tcpFlags_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tcpFlags_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string tcp_flags = 9; + * @param value The tcpFlags to set. + * @return This builder for chaining. + */ + public Builder setTcpFlags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tcpFlags_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * string tcp_flags = 9; + * @return This builder for chaining. + */ + public Builder clearTcpFlags() { + tcpFlags_ = getDefaultInstance().getTcpFlags(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * string tcp_flags = 9; + * @param value The bytes for tcpFlags to set. + * @return This builder for chaining. + */ + public Builder setTcpFlagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tcpFlags_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -1469,7 +1626,17 @@ public final class Acl { @java.lang.Override public AclMatch parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AclMatch(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1540,56 +1707,6 @@ public final class Acl { return new AclAction(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AclAction(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - forwardAction_ = rawValue; - break; - } - case 16: - { - int rawValue = input.readEnum(); - logAction_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return acl.Acl.internal_static_acl_AclAction_descriptor; } @@ -1601,7 +1718,7 @@ public final class Acl { public static final int FORWARD_ACTION_FIELD_NUMBER = 1; - private int forwardAction_; + private int forwardAction_ = 0; /** * .acl.AclForwardActionEnum forward_action = 1; @@ -1618,14 +1735,13 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclForwardActionEnum getForwardAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.valueOf(forwardAction_); + acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.forNumber(forwardAction_); return result == null ? acl.Acl.AclForwardActionEnum.UNRECOGNIZED : result; } public static final int LOG_ACTION_FIELD_NUMBER = 2; - private int logAction_; + private int logAction_ = 0; /** * .acl.AclLogActionEnum log_action = 2; @@ -1642,8 +1758,7 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclLogActionEnum getLogAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.valueOf(logAction_); + acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.forNumber(logAction_); return result == null ? acl.Acl.AclLogActionEnum.UNRECOGNIZED : result; } @@ -1668,7 +1783,7 @@ public final class Acl { if (logAction_ != acl.Acl.AclLogActionEnum.ACLLOGACTION_UNDEFINED.getNumber()) { output.writeEnum(2, logAction_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1683,7 +1798,7 @@ public final class Acl { if (logAction_ != acl.Acl.AclLogActionEnum.ACLLOGACTION_UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, logAction_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1701,7 +1816,7 @@ public final class Acl { return false; if (logAction_ != other.logAction_) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1717,7 +1832,7 @@ public final class Acl { hash = (53 * hash) + forwardAction_; hash = (37 * hash) + LOG_ACTION_FIELD_NUMBER; hash = (53 * hash) + logAction_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1811,22 +1926,16 @@ public final class Acl { // Construct using acl.Acl.AclAction.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; forwardAction_ = 0; logAction_ = 0; return this; @@ -1854,40 +1963,21 @@ public final class Acl { @java.lang.Override public acl.Acl.AclAction buildPartial() { acl.Acl.AclAction result = new acl.Acl.AclAction(this); - result.forwardAction_ = forwardAction_; - result.logAction_ = logAction_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(acl.Acl.AclAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.forwardAction_ = forwardAction_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.logAction_ = logAction_; + } } @java.lang.Override @@ -1909,7 +1999,7 @@ public final class Acl { if (other.logAction_ != 0) { setLogActionValue(other.getLogActionValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1921,20 +2011,54 @@ public final class Acl { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - acl.Acl.AclAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + forwardAction_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 16: + { + logAction_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private int forwardAction_ = 0; /** @@ -1953,6 +2077,7 @@ public final class Acl { */ public Builder setForwardActionValue(int value) { forwardAction_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1963,8 +2088,7 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclForwardActionEnum getForwardAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.valueOf(forwardAction_); + acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.forNumber(forwardAction_); return result == null ? acl.Acl.AclForwardActionEnum.UNRECOGNIZED : result; } @@ -1977,6 +2101,7 @@ public final class Acl { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000001; forwardAction_ = value.getNumber(); onChanged(); return this; @@ -1987,6 +2112,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearForwardAction() { + bitField0_ = (bitField0_ & ~0x00000001); forwardAction_ = 0; onChanged(); return this; @@ -2010,6 +2136,7 @@ public final class Acl { */ public Builder setLogActionValue(int value) { logAction_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2020,8 +2147,7 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclLogActionEnum getLogAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.valueOf(logAction_); + acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.forNumber(logAction_); return result == null ? acl.Acl.AclLogActionEnum.UNRECOGNIZED : result; } @@ -2034,6 +2160,7 @@ public final class Acl { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000002; logAction_ = value.getNumber(); onChanged(); return this; @@ -2044,6 +2171,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearLogAction() { + bitField0_ = (bitField0_ & ~0x00000002); logAction_ = 0; onChanged(); return this; @@ -2076,7 +2204,17 @@ public final class Acl { @java.lang.Override public AclAction parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AclAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2174,81 +2312,6 @@ public final class Acl { return new AclEntry(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AclEntry(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - sequenceId_ = input.readUInt32(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - description_ = s; - break; - } - case 26: - { - acl.Acl.AclMatch.Builder subBuilder = null; - if (match_ != null) { - subBuilder = match_.toBuilder(); - } - match_ = input.readMessage(acl.Acl.AclMatch.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(match_); - match_ = subBuilder.buildPartial(); - } - break; - } - case 34: - { - acl.Acl.AclAction.Builder subBuilder = null; - if (action_ != null) { - subBuilder = action_.toBuilder(); - } - action_ = input.readMessage(acl.Acl.AclAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(action_); - action_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return acl.Acl.internal_static_acl_AclEntry_descriptor; } @@ -2260,7 +2323,7 @@ public final class Acl { public static final int SEQUENCE_ID_FIELD_NUMBER = 1; - private int sequenceId_; + private int sequenceId_ = 0; /** * uint32 sequence_id = 1; @@ -2273,7 +2336,8 @@ public final class Acl { public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; /** * string description = 2; @@ -2335,7 +2399,7 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclMatchOrBuilder getMatchOrBuilder() { - return getMatch(); + return match_ == null ? acl.Acl.AclMatch.getDefaultInstance() : match_; } public static final int ACTION_FIELD_NUMBER = 4; @@ -2365,7 +2429,7 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclActionOrBuilder getActionOrBuilder() { - return getAction(); + return action_ == null ? acl.Acl.AclAction.getDefaultInstance() : action_; } private byte memoizedIsInitialized = -1; @@ -2386,7 +2450,7 @@ public final class Acl { if (sequenceId_ != 0) { output.writeUInt32(1, sequenceId_); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); } if (match_ != null) { @@ -2395,7 +2459,7 @@ public final class Acl { if (action_ != null) { output.writeMessage(4, getAction()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2407,7 +2471,7 @@ public final class Acl { if (sequenceId_ != 0) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(1, sequenceId_); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); } if (match_ != null) { @@ -2416,7 +2480,7 @@ public final class Acl { if (action_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAction()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2446,7 +2510,7 @@ public final class Acl { if (!getAction().equals(other.getAction())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2470,7 +2534,7 @@ public final class Acl { hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + getAction().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2564,34 +2628,26 @@ public final class Acl { // Construct using acl.Acl.AclEntry.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; sequenceId_ = 0; description_ = ""; - if (matchBuilder_ == null) { - match_ = null; - } else { - match_ = null; + match_ = null; + if (matchBuilder_ != null) { + matchBuilder_.dispose(); matchBuilder_ = null; } - if (actionBuilder_ == null) { - action_ = null; - } else { - action_ = null; + action_ = null; + if (actionBuilder_ != null) { + actionBuilder_.dispose(); actionBuilder_ = null; } return this; @@ -2619,50 +2675,27 @@ public final class Acl { @java.lang.Override public acl.Acl.AclEntry buildPartial() { acl.Acl.AclEntry result = new acl.Acl.AclEntry(this); - result.sequenceId_ = sequenceId_; - result.description_ = description_; - if (matchBuilder_ == null) { - result.match_ = match_; - } else { - result.match_ = matchBuilder_.build(); - } - if (actionBuilder_ == null) { - result.action_ = action_; - } else { - result.action_ = actionBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(acl.Acl.AclEntry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sequenceId_ = sequenceId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.match_ = matchBuilder_ == null ? match_ : matchBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.action_ = actionBuilder_ == null ? action_ : actionBuilder_.build(); + } } @java.lang.Override @@ -2683,6 +2716,7 @@ public final class Acl { } if (!other.getDescription().isEmpty()) { description_ = other.description_; + bitField0_ |= 0x00000002; onChanged(); } if (other.hasMatch()) { @@ -2691,7 +2725,7 @@ public final class Acl { if (other.hasAction()) { mergeAction(other.getAction()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2703,20 +2737,68 @@ public final class Acl { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - acl.Acl.AclEntry parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + sequenceId_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + input.readMessage(getMatchFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + input.readMessage(getActionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } + // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclEntry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private int sequenceId_; /** @@ -2735,6 +2817,7 @@ public final class Acl { */ public Builder setSequenceId(int value) { sequenceId_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2744,6 +2827,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearSequenceId() { + bitField0_ = (bitField0_ & ~0x00000001); sequenceId_ = 0; onChanged(); return this; @@ -2792,6 +2876,7 @@ public final class Acl { throw new NullPointerException(); } description_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2802,6 +2887,7 @@ public final class Acl { */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -2817,6 +2903,7 @@ public final class Acl { } checkByteStringIsUtf8(value); description_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2830,7 +2917,7 @@ public final class Acl { * @return Whether the match field is set. */ public boolean hasMatch() { - return matchBuilder_ != null || match_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** @@ -2854,10 +2941,11 @@ public final class Acl { throw new NullPointerException(); } match_ = value; - onChanged(); } else { matchBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -2867,10 +2955,11 @@ public final class Acl { public Builder setMatch(acl.Acl.AclMatch.Builder builderForValue) { if (matchBuilder_ == null) { match_ = builderForValue.build(); - onChanged(); } else { matchBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -2879,15 +2968,16 @@ public final class Acl { */ public Builder mergeMatch(acl.Acl.AclMatch value) { if (matchBuilder_ == null) { - if (match_ != null) { - match_ = acl.Acl.AclMatch.newBuilder(match_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000004) != 0) && match_ != null && match_ != acl.Acl.AclMatch.getDefaultInstance()) { + getMatchBuilder().mergeFrom(value); } else { match_ = value; } - onChanged(); } else { matchBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -2895,13 +2985,13 @@ public final class Acl { * .acl.AclMatch match = 3; */ public Builder clearMatch() { - if (matchBuilder_ == null) { - match_ = null; - onChanged(); - } else { - match_ = null; + bitField0_ = (bitField0_ & ~0x00000004); + match_ = null; + if (matchBuilder_ != null) { + matchBuilder_.dispose(); matchBuilder_ = null; } + onChanged(); return this; } @@ -2909,6 +2999,7 @@ public final class Acl { * .acl.AclMatch match = 3; */ public acl.Acl.AclMatch.Builder getMatchBuilder() { + bitField0_ |= 0x00000004; onChanged(); return getMatchFieldBuilder().getBuilder(); } @@ -2944,7 +3035,7 @@ public final class Acl { * @return Whether the action field is set. */ public boolean hasAction() { - return actionBuilder_ != null || action_ != null; + return ((bitField0_ & 0x00000008) != 0); } /** @@ -2968,10 +3059,11 @@ public final class Acl { throw new NullPointerException(); } action_ = value; - onChanged(); } else { actionBuilder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -2981,10 +3073,11 @@ public final class Acl { public Builder setAction(acl.Acl.AclAction.Builder builderForValue) { if (actionBuilder_ == null) { action_ = builderForValue.build(); - onChanged(); } else { actionBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -2993,15 +3086,16 @@ public final class Acl { */ public Builder mergeAction(acl.Acl.AclAction value) { if (actionBuilder_ == null) { - if (action_ != null) { - action_ = acl.Acl.AclAction.newBuilder(action_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000008) != 0) && action_ != null && action_ != acl.Acl.AclAction.getDefaultInstance()) { + getActionBuilder().mergeFrom(value); } else { action_ = value; } - onChanged(); } else { actionBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -3009,13 +3103,13 @@ public final class Acl { * .acl.AclAction action = 4; */ public Builder clearAction() { - if (actionBuilder_ == null) { - action_ = null; - onChanged(); - } else { - action_ = null; + bitField0_ = (bitField0_ & ~0x00000008); + action_ = null; + if (actionBuilder_ != null) { + actionBuilder_.dispose(); actionBuilder_ = null; } + onChanged(); return this; } @@ -3023,6 +3117,7 @@ public final class Acl { * .acl.AclAction action = 4; */ public acl.Acl.AclAction.Builder getActionBuilder() { + bitField0_ |= 0x00000008; onChanged(); return getActionFieldBuilder().getBuilder(); } @@ -3076,7 +3171,17 @@ public final class Acl { @java.lang.Override public AclEntry parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AclEntry(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3199,81 +3304,6 @@ public final class Acl { return new AclRuleSet(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AclRuleSet(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - type_ = rawValue; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - description_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - userId_ = s; - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - entries_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - entries_.add(input.readMessage(acl.Acl.AclEntry.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - entries_ = java.util.Collections.unmodifiableList(entries_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return acl.Acl.internal_static_acl_AclRuleSet_descriptor; } @@ -3285,7 +3315,8 @@ public final class Acl { public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * string name = 1; @@ -3322,7 +3353,7 @@ public final class Acl { public static final int TYPE_FIELD_NUMBER = 2; - private int type_; + private int type_ = 0; /** * .acl.AclRuleTypeEnum type = 2; @@ -3339,14 +3370,14 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclRuleTypeEnum getType() { - @SuppressWarnings("deprecation") - acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.valueOf(type_); + acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.forNumber(type_); return result == null ? acl.Acl.AclRuleTypeEnum.UNRECOGNIZED : result; } public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; /** * string description = 3; @@ -3383,7 +3414,8 @@ public final class Acl { public static final int USER_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object userId_; + @SuppressWarnings("serial") + private volatile java.lang.Object userId_ = ""; /** * string user_id = 4; @@ -3420,6 +3452,7 @@ public final class Acl { public static final int ENTRIES_FIELD_NUMBER = 5; + @SuppressWarnings("serial") private java.util.List entries_; /** @@ -3477,22 +3510,22 @@ public final class Acl { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (type_ != acl.Acl.AclRuleTypeEnum.ACLRULETYPE_UNDEFINED.getNumber()) { output.writeEnum(2, type_); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); } - if (!getUserIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userId_); } for (int i = 0; i < entries_.size(); i++) { output.writeMessage(5, entries_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3501,22 +3534,22 @@ public final class Acl { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (type_ != acl.Acl.AclRuleTypeEnum.ACLRULETYPE_UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); } - if (!getUserIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userId_); } for (int i = 0; i < entries_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, entries_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3540,7 +3573,7 @@ public final class Acl { return false; if (!getEntriesList().equals(other.getEntriesList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3564,7 +3597,7 @@ public final class Acl { hash = (37 * hash) + ENTRIES_FIELD_NUMBER; hash = (53 * hash) + getEntriesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3658,33 +3691,27 @@ public final class Acl { // Construct using acl.Acl.AclRuleSet.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEntriesFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = ""; type_ = 0; description_ = ""; userId_ = ""; if (entriesBuilder_ == null) { entries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + entries_ = null; entriesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -3710,52 +3737,40 @@ public final class Acl { @java.lang.Override public acl.Acl.AclRuleSet buildPartial() { acl.Acl.AclRuleSet result = new acl.Acl.AclRuleSet(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.type_ = type_; - result.description_ = description_; - result.userId_ = userId_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(acl.Acl.AclRuleSet result) { if (entriesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { entries_ = java.util.Collections.unmodifiableList(entries_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000010); } result.entries_ = entries_; } else { result.entries_ = entriesBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); } - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(acl.Acl.AclRuleSet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userId_ = userId_; + } } @java.lang.Override @@ -3773,6 +3788,7 @@ public final class Acl { return this; if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } if (other.type_ != 0) { @@ -3780,17 +3796,19 @@ public final class Acl { } if (!other.getDescription().isEmpty()) { description_ = other.description_; + bitField0_ |= 0x00000004; onChanged(); } if (!other.getUserId().isEmpty()) { userId_ = other.userId_; + bitField0_ |= 0x00000008; onChanged(); } if (entriesBuilder_ == null) { if (!other.entries_.isEmpty()) { if (entries_.isEmpty()) { entries_ = other.entries_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureEntriesIsMutable(); entries_.addAll(other.entries_); @@ -3803,14 +3821,14 @@ public final class Acl { entriesBuilder_.dispose(); entriesBuilder_ = null; entries_ = other.entries_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000010); entriesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEntriesFieldBuilder() : null; } else { entriesBuilder_.addAllMessages(other.entries_); } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3822,17 +3840,75 @@ public final class Acl { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - acl.Acl.AclRuleSet parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 16: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + userId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } + // case 34 + case 42: + { + acl.Acl.AclEntry m = input.readMessage(acl.Acl.AclEntry.parser(), extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } + // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclRuleSet) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -3881,6 +3957,7 @@ public final class Acl { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3891,6 +3968,7 @@ public final class Acl { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -3906,6 +3984,7 @@ public final class Acl { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3928,6 +4007,7 @@ public final class Acl { */ public Builder setTypeValue(int value) { type_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -3938,8 +4018,7 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclRuleTypeEnum getType() { - @SuppressWarnings("deprecation") - acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.valueOf(type_); + acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.forNumber(type_); return result == null ? acl.Acl.AclRuleTypeEnum.UNRECOGNIZED : result; } @@ -3952,6 +4031,7 @@ public final class Acl { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000002; type_ = value.getNumber(); onChanged(); return this; @@ -3962,6 +4042,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); type_ = 0; onChanged(); return this; @@ -4010,6 +4091,7 @@ public final class Acl { throw new NullPointerException(); } description_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -4020,6 +4102,7 @@ public final class Acl { */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -4035,6 +4118,7 @@ public final class Acl { } checkByteStringIsUtf8(value); description_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -4082,6 +4166,7 @@ public final class Acl { throw new NullPointerException(); } userId_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -4092,6 +4177,7 @@ public final class Acl { */ public Builder clearUserId() { userId_ = getDefaultInstance().getUserId(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -4107,6 +4193,7 @@ public final class Acl { } checkByteStringIsUtf8(value); userId_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -4114,9 +4201,9 @@ public final class Acl { private java.util.List entries_ = java.util.Collections.emptyList(); private void ensureEntriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000010) != 0)) { entries_ = new java.util.ArrayList(entries_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000010; } } @@ -4268,7 +4355,7 @@ public final class Acl { public Builder clearEntries() { if (entriesBuilder_ == null) { entries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { entriesBuilder_.clear(); @@ -4342,7 +4429,7 @@ public final class Acl { private com.google.protobuf.RepeatedFieldBuilderV3 getEntriesFieldBuilder() { if (entriesBuilder_ == null) { - entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(entries_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); entries_ = null; } return entriesBuilder_; @@ -4375,7 +4462,17 @@ public final class Acl { @java.lang.Override public AclRuleSet parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AclRuleSet(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4417,10 +4514,10 @@ public final class Acl { private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { "\n\tacl.proto\022\003acl\"\252\001\n\010AclMatch\022\014\n\004dscp\030\001 " + "\001(\r\022\020\n\010protocol\030\002 \001(\r\022\023\n\013src_address\030\003 \001" + "(\t\022\023\n\013dst_address\030\004 \001(\t\022\020\n\010src_port\030\005 \001(" + "\r\022\020\n\010dst_port\030\006 \001(\r\022\030\n\020start_mpls_label\030" + "\007 \001(\r\022\026\n\016end_mpls_label\030\010 \001(\r\"i\n\tAclActi" + "on\0221\n\016forward_action\030\001 \001(\0162\031.acl.AclForw" + "ardActionEnum\022)\n\nlog_action\030\002 \001(\0162\025.acl." + "AclLogActionEnum\"r\n\010AclEntry\022\023\n\013sequence" + "_id\030\001 \001(\r\022\023\n\013description\030\002 \001(\t\022\034\n\005match\030" + "\003 \001(\0132\r.acl.AclMatch\022\036\n\006action\030\004 \001(\0132\016.a" + "cl.AclAction\"\204\001\n\nAclRuleSet\022\014\n\004name\030\001 \001(" + "\t\022\"\n\004type\030\002 \001(\0162\024.acl.AclRuleTypeEnum\022\023\n" + "\013description\030\003 \001(\t\022\017\n\007user_id\030\004 \001(\t\022\036\n\007e" + "ntries\030\005 \003(\0132\r.acl.AclEntry*\231\001\n\017AclRuleT" + "ypeEnum\022\031\n\025ACLRULETYPE_UNDEFINED\020\000\022\024\n\020AC" + "LRULETYPE_IPV4\020\001\022\024\n\020ACLRULETYPE_IPV6\020\002\022\022" + "\n\016ACLRULETYPE_L2\020\003\022\024\n\020ACLRULETYPE_MPLS\020\004" + "\022\025\n\021ACLRULETYPE_MIXED\020\005*\227\001\n\024AclForwardAc" + "tionEnum\022!\n\035ACLFORWARDINGACTION_UNDEFINE" + "D\020\000\022\034\n\030ACLFORWARDINGACTION_DROP\020\001\022\036\n\032ACL" + "FORWARDINGACTION_ACCEPT\020\002\022\036\n\032ACLFORWARDI" + "NGACTION_REJECT\020\003*_\n\020AclLogActionEnum\022\032\n" + "\026ACLLOGACTION_UNDEFINED\020\000\022\026\n\022ACLLOGACTIO" + "N_NOLOG\020\001\022\027\n\023ACLLOGACTION_SYSLOG\020\002b\006prot" + "o3" }; + java.lang.String[] descriptorData = { "\n\tacl.proto\022\003acl\"\275\001\n\010AclMatch\022\014\n\004dscp\030\001 " + "\001(\r\022\020\n\010protocol\030\002 \001(\r\022\023\n\013src_address\030\003 \001" + "(\t\022\023\n\013dst_address\030\004 \001(\t\022\020\n\010src_port\030\005 \001(" + "\r\022\020\n\010dst_port\030\006 \001(\r\022\030\n\020start_mpls_label\030" + "\007 \001(\r\022\026\n\016end_mpls_label\030\010 \001(\r\022\021\n\ttcp_fla" + "gs\030\t \001(\t\"i\n\tAclAction\0221\n\016forward_action\030" + "\001 \001(\0162\031.acl.AclForwardActionEnum\022)\n\nlog_" + "action\030\002 \001(\0162\025.acl.AclLogActionEnum\"r\n\010A" + "clEntry\022\023\n\013sequence_id\030\001 \001(\r\022\023\n\013descript" + "ion\030\002 \001(\t\022\034\n\005match\030\003 \001(\0132\r.acl.AclMatch\022" + "\036\n\006action\030\004 \001(\0132\016.acl.AclAction\"\204\001\n\nAclR" + "uleSet\022\014\n\004name\030\001 \001(\t\022\"\n\004type\030\002 \001(\0162\024.acl" + ".AclRuleTypeEnum\022\023\n\013description\030\003 \001(\t\022\017\n" + "\007user_id\030\004 \001(\t\022\036\n\007entries\030\005 \003(\0132\r.acl.Ac" + "lEntry*\231\001\n\017AclRuleTypeEnum\022\031\n\025ACLRULETYP" + "E_UNDEFINED\020\000\022\024\n\020ACLRULETYPE_IPV4\020\001\022\024\n\020A" + "CLRULETYPE_IPV6\020\002\022\022\n\016ACLRULETYPE_L2\020\003\022\024\n" + "\020ACLRULETYPE_MPLS\020\004\022\025\n\021ACLRULETYPE_MIXED" + "\020\005*\227\001\n\024AclForwardActionEnum\022!\n\035ACLFORWAR" + "DINGACTION_UNDEFINED\020\000\022\034\n\030ACLFORWARDINGA" + "CTION_DROP\020\001\022\036\n\032ACLFORWARDINGACTION_ACCE" + "PT\020\002\022\036\n\032ACLFORWARDINGACTION_REJECT\020\003*_\n\020" + "AclLogActionEnum\022\032\n\026ACLLOGACTION_UNDEFIN" + "ED\020\000\022\026\n\022ACLLOGACTION_NOLOG\020\001\022\027\n\023ACLLOGAC" + "TION_SYSLOG\020\002b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); internal_static_acl_AclMatch_descriptor = getDescriptor().getMessageTypes().get(0); - internal_static_acl_AclMatch_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_acl_AclMatch_descriptor, new java.lang.String[] { "Dscp", "Protocol", "SrcAddress", "DstAddress", "SrcPort", "DstPort", "StartMplsLabel", "EndMplsLabel" }); + internal_static_acl_AclMatch_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_acl_AclMatch_descriptor, new java.lang.String[] { "Dscp", "Protocol", "SrcAddress", "DstAddress", "SrcPort", "DstPort", "StartMplsLabel", "EndMplsLabel", "TcpFlags" }); internal_static_acl_AclAction_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_acl_AclAction_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_acl_AclAction_descriptor, new java.lang.String[] { "ForwardAction", "LogAction" }); internal_static_acl_AclEntry_descriptor = getDescriptor().getMessageTypes().get(2); diff --git a/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java b/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java index 459377049..d85f89f6f 100644 --- a/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java @@ -195,6 +195,26 @@ public final class ContextOuterClass { * DEVICEDRIVER_OC = 11; */ DEVICEDRIVER_OC(11), + /** + * DEVICEDRIVER_QKD = 12; + */ + DEVICEDRIVER_QKD(12), + /** + * DEVICEDRIVER_IETF_L3VPN = 13; + */ + DEVICEDRIVER_IETF_L3VPN(13), + /** + * DEVICEDRIVER_IETF_SLICE = 14; + */ + DEVICEDRIVER_IETF_SLICE(14), + /** + * DEVICEDRIVER_NCE = 15; + */ + DEVICEDRIVER_NCE(15), + /** + * DEVICEDRIVER_SMARTNIC = 16; + */ + DEVICEDRIVER_SMARTNIC(16), UNRECOGNIZED(-1); /** @@ -261,6 +281,31 @@ public final class ContextOuterClass { */ public static final int DEVICEDRIVER_OC_VALUE = 11; + /** + * DEVICEDRIVER_QKD = 12; + */ + public static final int DEVICEDRIVER_QKD_VALUE = 12; + + /** + * DEVICEDRIVER_IETF_L3VPN = 13; + */ + public static final int DEVICEDRIVER_IETF_L3VPN_VALUE = 13; + + /** + * DEVICEDRIVER_IETF_SLICE = 14; + */ + public static final int DEVICEDRIVER_IETF_SLICE_VALUE = 14; + + /** + * DEVICEDRIVER_NCE = 15; + */ + public static final int DEVICEDRIVER_NCE_VALUE = 15; + + /** + * DEVICEDRIVER_SMARTNIC = 16; + */ + public static final int DEVICEDRIVER_SMARTNIC_VALUE = 16; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); @@ -308,6 +353,16 @@ public final class ContextOuterClass { return DEVICEDRIVER_IETF_ACTN; case 11: return DEVICEDRIVER_OC; + case 12: + return DEVICEDRIVER_QKD; + case 13: + return DEVICEDRIVER_IETF_L3VPN; + case 14: + return DEVICEDRIVER_IETF_SLICE; + case 15: + return DEVICEDRIVER_NCE; + case 16: + return DEVICEDRIVER_SMARTNIC; default: return null; } @@ -471,6 +526,141 @@ public final class ContextOuterClass { } } + /** + * Protobuf enum {@code context.LinkTypeEnum} + */ + public enum LinkTypeEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * LINKTYPE_UNKNOWN = 0; + */ + LINKTYPE_UNKNOWN(0), + /** + * LINKTYPE_COPPER = 1; + */ + LINKTYPE_COPPER(1), + /** + * LINKTYPE_FIBER = 2; + */ + LINKTYPE_FIBER(2), + /** + * LINKTYPE_RADIO = 3; + */ + LINKTYPE_RADIO(3), + /** + * LINKTYPE_VIRTUAL = 4; + */ + LINKTYPE_VIRTUAL(4), + UNRECOGNIZED(-1); + + /** + * LINKTYPE_UNKNOWN = 0; + */ + public static final int LINKTYPE_UNKNOWN_VALUE = 0; + + /** + * LINKTYPE_COPPER = 1; + */ + public static final int LINKTYPE_COPPER_VALUE = 1; + + /** + * LINKTYPE_FIBER = 2; + */ + public static final int LINKTYPE_FIBER_VALUE = 2; + + /** + * LINKTYPE_RADIO = 3; + */ + public static final int LINKTYPE_RADIO_VALUE = 3; + + /** + * LINKTYPE_VIRTUAL = 4; + */ + public static final int LINKTYPE_VIRTUAL_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LinkTypeEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LinkTypeEnum forNumber(int value) { + switch(value) { + case 0: + return LINKTYPE_UNKNOWN; + case 1: + return LINKTYPE_COPPER; + case 2: + return LINKTYPE_FIBER; + case 3: + return LINKTYPE_RADIO; + case 4: + return LINKTYPE_VIRTUAL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { + + public LinkTypeEnum findValueByNumber(int number) { + return LinkTypeEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(3); + } + + private static final LinkTypeEnum[] VALUES = values(); + + public static LinkTypeEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LinkTypeEnum(int value) { + this.value = value; + } + } + /** * Protobuf enum {@code context.ServiceTypeEnum} */ @@ -504,6 +694,10 @@ public final class ContextOuterClass { * SERVICETYPE_OPTICAL_CONNECTIVITY = 6; */ SERVICETYPE_OPTICAL_CONNECTIVITY(6), + /** + * SERVICETYPE_QKD = 7; + */ + SERVICETYPE_QKD(7), UNRECOGNIZED(-1); /** @@ -541,6 +735,11 @@ public final class ContextOuterClass { */ public static final int SERVICETYPE_OPTICAL_CONNECTIVITY_VALUE = 6; + /** + * SERVICETYPE_QKD = 7; + */ + public static final int SERVICETYPE_QKD_VALUE = 7; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); @@ -578,6 +777,8 @@ public final class ContextOuterClass { return SERVICETYPE_E2E; case 6: return SERVICETYPE_OPTICAL_CONNECTIVITY; + case 7: + return SERVICETYPE_QKD; default: return null; } @@ -606,7 +807,7 @@ public final class ContextOuterClass { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(3); + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(4); } private static final ServiceTypeEnum[] VALUES = values(); @@ -752,7 +953,7 @@ public final class ContextOuterClass { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(4); + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(5); } private static final ServiceStatusEnum[] VALUES = values(); @@ -898,7 +1099,7 @@ public final class ContextOuterClass { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(5); + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(6); } private static final SliceStatusEnum[] VALUES = values(); @@ -1015,7 +1216,7 @@ public final class ContextOuterClass { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(6); + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(7); } private static final ConfigActionEnum[] VALUES = values(); @@ -1132,7 +1333,7 @@ public final class ContextOuterClass { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(7); + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(8); } private static final ConstraintActionEnum[] VALUES = values(); @@ -1311,7 +1512,7 @@ public final class ContextOuterClass { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(8); + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(9); } private static final IsolationLevelEnum[] VALUES = values(); @@ -1363,44 +1564,6 @@ public final class ContextOuterClass { return new Empty(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Empty(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Empty_descriptor; } @@ -1425,7 +1588,7 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1434,7 +1597,7 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1448,7 +1611,7 @@ public final class ContextOuterClass { return super.equals(obj); } context.ContextOuterClass.Empty other = (context.ContextOuterClass.Empty) obj; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1460,7 +1623,7 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1558,17 +1721,10 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Empty.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override @@ -1603,36 +1759,6 @@ public final class ContextOuterClass { return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof context.ContextOuterClass.Empty) { @@ -1646,7 +1772,7 @@ public final class ContextOuterClass { public Builder mergeFrom(context.ContextOuterClass.Empty other) { if (other == context.ContextOuterClass.Empty.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1658,17 +1784,35 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Empty parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Empty) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -1699,7 +1843,17 @@ public final class ContextOuterClass { @java.lang.Override public Empty parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Empty(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1757,50 +1911,6 @@ public final class ContextOuterClass { return new Uuid(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Uuid(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - uuid_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Uuid_descriptor; } @@ -1812,7 +1922,8 @@ public final class ContextOuterClass { public static final int UUID_FIELD_NUMBER = 1; - private volatile java.lang.Object uuid_; + @SuppressWarnings("serial") + private volatile java.lang.Object uuid_ = ""; /** * string uuid = 1; @@ -1862,10 +1973,10 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getUuidBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uuid_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1874,10 +1985,10 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!getUuidBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uuid_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1893,7 +2004,7 @@ public final class ContextOuterClass { context.ContextOuterClass.Uuid other = (context.ContextOuterClass.Uuid) obj; if (!getUuid().equals(other.getUuid())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1907,7 +2018,7 @@ public final class ContextOuterClass { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + UUID_FIELD_NUMBER; hash = (53 * hash) + getUuid().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2001,22 +2112,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Uuid.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; uuid_ = ""; return this; } @@ -2043,39 +2148,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Uuid buildPartial() { context.ContextOuterClass.Uuid result = new context.ContextOuterClass.Uuid(this); - result.uuid_ = uuid_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Uuid result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uuid_ = uuid_; + } } @java.lang.Override @@ -2093,9 +2177,10 @@ public final class ContextOuterClass { return this; if (!other.getUuid().isEmpty()) { uuid_ = other.uuid_; + bitField0_ |= 0x00000001; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2107,20 +2192,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Uuid parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + uuid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Uuid) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private java.lang.Object uuid_ = ""; /** @@ -2164,6 +2276,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } uuid_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2174,6 +2287,7 @@ public final class ContextOuterClass { */ public Builder clearUuid() { uuid_ = getDefaultInstance().getUuid(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -2189,6 +2303,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); uuid_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2220,7 +2335,17 @@ public final class ContextOuterClass { @java.lang.Override public Uuid parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Uuid(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2271,49 +2396,6 @@ public final class ContextOuterClass { return new Timestamp(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Timestamp(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 9: - { - timestamp_ = input.readDouble(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Timestamp_descriptor; } @@ -2325,7 +2407,7 @@ public final class ContextOuterClass { public static final int TIMESTAMP_FIELD_NUMBER = 1; - private double timestamp_; + private double timestamp_ = 0D; /** * double timestamp = 1; @@ -2351,10 +2433,10 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (timestamp_ != 0D) { + if (java.lang.Double.doubleToRawLongBits(timestamp_) != 0) { output.writeDouble(1, timestamp_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2363,10 +2445,10 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (timestamp_ != 0D) { + if (java.lang.Double.doubleToRawLongBits(timestamp_) != 0) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, timestamp_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2382,7 +2464,7 @@ public final class ContextOuterClass { context.ContextOuterClass.Timestamp other = (context.ContextOuterClass.Timestamp) obj; if (java.lang.Double.doubleToLongBits(getTimestamp()) != java.lang.Double.doubleToLongBits(other.getTimestamp())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2396,7 +2478,7 @@ public final class ContextOuterClass { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getTimestamp())); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2490,22 +2572,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Timestamp.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; timestamp_ = 0D; return this; } @@ -2532,39 +2608,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Timestamp buildPartial() { context.ContextOuterClass.Timestamp result = new context.ContextOuterClass.Timestamp(this); - result.timestamp_ = timestamp_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Timestamp result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timestamp_ = timestamp_; + } } @java.lang.Override @@ -2583,7 +2638,7 @@ public final class ContextOuterClass { if (other.getTimestamp() != 0D) { setTimestamp(other.getTimestamp()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2595,20 +2650,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Timestamp parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 9: + { + timestamp_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } + // case 9 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Timestamp) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private double timestamp_; /** @@ -2627,6 +2709,7 @@ public final class ContextOuterClass { */ public Builder setTimestamp(double value) { timestamp_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2636,6 +2719,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); timestamp_ = 0D; onChanged(); return this; @@ -2668,7 +2752,17 @@ public final class ContextOuterClass { @java.lang.Override public Timestamp parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Timestamp(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2743,63 +2837,6 @@ public final class ContextOuterClass { return new Event(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Event(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Timestamp.Builder subBuilder = null; - if (timestamp_ != null) { - subBuilder = timestamp_.toBuilder(); - } - timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timestamp_); - timestamp_ = subBuilder.buildPartial(); - } - break; - } - case 16: - { - int rawValue = input.readEnum(); - eventType_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Event_descriptor; } @@ -2836,12 +2873,12 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; } public static final int EVENT_TYPE_FIELD_NUMBER = 2; - private int eventType_; + private int eventType_ = 0; /** * .context.EventTypeEnum event_type = 2; @@ -2858,8 +2895,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EventTypeEnum getEventType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.valueOf(eventType_); + context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.forNumber(eventType_); return result == null ? context.ContextOuterClass.EventTypeEnum.UNRECOGNIZED : result; } @@ -2884,7 +2920,7 @@ public final class ContextOuterClass { if (eventType_ != context.ContextOuterClass.EventTypeEnum.EVENTTYPE_UNDEFINED.getNumber()) { output.writeEnum(2, eventType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2899,7 +2935,7 @@ public final class ContextOuterClass { if (eventType_ != context.ContextOuterClass.EventTypeEnum.EVENTTYPE_UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, eventType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2921,7 +2957,7 @@ public final class ContextOuterClass { } if (eventType_ != other.eventType_) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2939,7 +2975,7 @@ public final class ContextOuterClass { } hash = (37 * hash) + EVENT_TYPE_FIELD_NUMBER; hash = (53 * hash) + eventType_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3033,26 +3069,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Event.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; + bitField0_ = 0; + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } eventType_ = 0; @@ -3081,44 +3110,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Event buildPartial() { context.ContextOuterClass.Event result = new context.ContextOuterClass.Event(this); - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; - } else { - result.timestamp_ = timestampBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.eventType_ = eventType_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Event result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.eventType_ = eventType_; + } } @java.lang.Override @@ -3140,7 +3146,7 @@ public final class ContextOuterClass { if (other.eventType_ != 0) { setEventTypeValue(other.getEventTypeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3152,20 +3158,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Event parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 16: + { + eventType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Event) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Timestamp timestamp_; private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_; @@ -3175,7 +3215,7 @@ public final class ContextOuterClass { * @return Whether the timestamp field is set. */ public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -3199,10 +3239,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } timestamp_ = value; - onChanged(); } else { timestampBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3212,10 +3253,11 @@ public final class ContextOuterClass { public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { if (timestampBuilder_ == null) { timestamp_ = builderForValue.build(); - onChanged(); } else { timestampBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3224,15 +3266,16 @@ public final class ContextOuterClass { */ public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && timestamp_ != null && timestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); } else { timestamp_ = value; } - onChanged(); } else { timestampBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3240,13 +3283,13 @@ public final class ContextOuterClass { * .context.Timestamp timestamp = 1; */ public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } + onChanged(); return this; } @@ -3254,6 +3297,7 @@ public final class ContextOuterClass { * .context.Timestamp timestamp = 1; */ public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getTimestampFieldBuilder().getBuilder(); } @@ -3298,6 +3342,7 @@ public final class ContextOuterClass { */ public Builder setEventTypeValue(int value) { eventType_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -3308,8 +3353,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EventTypeEnum getEventType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.valueOf(eventType_); + context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.forNumber(eventType_); return result == null ? context.ContextOuterClass.EventTypeEnum.UNRECOGNIZED : result; } @@ -3322,6 +3366,7 @@ public final class ContextOuterClass { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000002; eventType_ = value.getNumber(); onChanged(); return this; @@ -3332,6 +3377,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearEventType() { + bitField0_ = (bitField0_ & ~0x00000002); eventType_ = 0; onChanged(); return this; @@ -3364,7 +3410,17 @@ public final class ContextOuterClass { @java.lang.Override public Event parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Event(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3430,57 +3486,6 @@ public final class ContextOuterClass { return new ContextId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ContextId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (contextUuid_ != null) { - subBuilder = contextUuid_.toBuilder(); - } - contextUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextUuid_); - contextUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ContextId_descriptor; } @@ -3517,7 +3522,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder() { - return getContextUuid(); + return contextUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; } private byte memoizedIsInitialized = -1; @@ -3538,7 +3543,7 @@ public final class ContextOuterClass { if (contextUuid_ != null) { output.writeMessage(1, getContextUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3550,7 +3555,7 @@ public final class ContextOuterClass { if (contextUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3570,7 +3575,7 @@ public final class ContextOuterClass { if (!getContextUuid().equals(other.getContextUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3586,7 +3591,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTEXT_UUID_FIELD_NUMBER; hash = (53 * hash) + getContextUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3684,26 +3689,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ContextId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (contextUuidBuilder_ == null) { - contextUuid_ = null; - } else { - contextUuid_ = null; + bitField0_ = 0; + contextUuid_ = null; + if (contextUuidBuilder_ != null) { + contextUuidBuilder_.dispose(); contextUuidBuilder_ = null; } return this; @@ -3731,43 +3729,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ContextId buildPartial() { context.ContextOuterClass.ContextId result = new context.ContextOuterClass.ContextId(this); - if (contextUuidBuilder_ == null) { - result.contextUuid_ = contextUuid_; - } else { - result.contextUuid_ = contextUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ContextId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextUuid_ = contextUuidBuilder_ == null ? contextUuid_ : contextUuidBuilder_.build(); + } } @java.lang.Override @@ -3786,7 +3759,7 @@ public final class ContextOuterClass { if (other.hasContextUuid()) { mergeContextUuid(other.getContextUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3798,20 +3771,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ContextId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Uuid contextUuid_; private com.google.protobuf.SingleFieldBuilderV3 contextUuidBuilder_; @@ -3821,7 +3821,7 @@ public final class ContextOuterClass { * @return Whether the contextUuid field is set. */ public boolean hasContextUuid() { - return contextUuidBuilder_ != null || contextUuid_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -3845,10 +3845,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } contextUuid_ = value; - onChanged(); } else { contextUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3858,10 +3859,11 @@ public final class ContextOuterClass { public Builder setContextUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (contextUuidBuilder_ == null) { contextUuid_ = builderForValue.build(); - onChanged(); } else { contextUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3870,15 +3872,16 @@ public final class ContextOuterClass { */ public Builder mergeContextUuid(context.ContextOuterClass.Uuid value) { if (contextUuidBuilder_ == null) { - if (contextUuid_ != null) { - contextUuid_ = context.ContextOuterClass.Uuid.newBuilder(contextUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && contextUuid_ != null && contextUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getContextUuidBuilder().mergeFrom(value); } else { contextUuid_ = value; } - onChanged(); } else { contextUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3886,13 +3889,13 @@ public final class ContextOuterClass { * .context.Uuid context_uuid = 1; */ public Builder clearContextUuid() { - if (contextUuidBuilder_ == null) { - contextUuid_ = null; - onChanged(); - } else { - contextUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + contextUuid_ = null; + if (contextUuidBuilder_ != null) { + contextUuidBuilder_.dispose(); contextUuidBuilder_ = null; } + onChanged(); return this; } @@ -3900,6 +3903,7 @@ public final class ContextOuterClass { * .context.Uuid context_uuid = 1; */ public context.ContextOuterClass.Uuid.Builder getContextUuidBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getContextUuidFieldBuilder().getBuilder(); } @@ -3953,7 +3957,17 @@ public final class ContextOuterClass { @java.lang.Override public ContextId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ContextId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4123,113 +4137,6 @@ public final class ContextOuterClass { return new Context(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Context(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ContextId.Builder subBuilder = null; - if (contextId_ != null) { - subBuilder = contextId_.toBuilder(); - } - contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextId_); - contextId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - topologyIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - topologyIds_.add(input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry)); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - serviceIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - serviceIds_.add(input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry)); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - sliceIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - sliceIds_.add(input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry)); - break; - } - case 50: - { - context.ContextOuterClass.TeraFlowController.Builder subBuilder = null; - if (controller_ != null) { - subBuilder = controller_.toBuilder(); - } - controller_ = input.readMessage(context.ContextOuterClass.TeraFlowController.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(controller_); - controller_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Context_descriptor; } @@ -4266,12 +4173,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * string name = 2; @@ -4308,6 +4216,7 @@ public final class ContextOuterClass { public static final int TOPOLOGY_IDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List topologyIds_; /** @@ -4352,6 +4261,7 @@ public final class ContextOuterClass { public static final int SERVICE_IDS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List serviceIds_; /** @@ -4396,6 +4306,7 @@ public final class ContextOuterClass { public static final int SLICE_IDS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") private java.util.List sliceIds_; /** @@ -4465,7 +4376,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder() { - return getController(); + return controller_ == null ? context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; } private byte memoizedIsInitialized = -1; @@ -4486,7 +4397,7 @@ public final class ContextOuterClass { if (contextId_ != null) { output.writeMessage(1, getContextId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } for (int i = 0; i < topologyIds_.size(); i++) { @@ -4501,7 +4412,7 @@ public final class ContextOuterClass { if (controller_ != null) { output.writeMessage(6, getController()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4513,7 +4424,7 @@ public final class ContextOuterClass { if (contextId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } for (int i = 0; i < topologyIds_.size(); i++) { @@ -4528,7 +4439,7 @@ public final class ContextOuterClass { if (controller_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getController()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4562,7 +4473,7 @@ public final class ContextOuterClass { if (!getController().equals(other.getController())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4596,7 +4507,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTROLLER_FIELD_NUMBER; hash = (53 * hash) + getController().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4690,54 +4601,46 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Context.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTopologyIdsFieldBuilder(); - getServiceIdsFieldBuilder(); - getSliceIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; + bitField0_ = 0; + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } name_ = ""; if (topologyIdsBuilder_ == null) { topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + topologyIds_ = null; topologyIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (serviceIdsBuilder_ == null) { serviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + serviceIds_ = null; serviceIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); if (sliceIdsBuilder_ == null) { sliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + sliceIds_ = null; sliceIdsBuilder_.clear(); } - if (controllerBuilder_ == null) { - controller_ = null; - } else { - controller_ = null; + bitField0_ = (bitField0_ & ~0x00000010); + controller_ = null; + if (controllerBuilder_ != null) { + controllerBuilder_.dispose(); controllerBuilder_ = null; } return this; @@ -4765,77 +4668,55 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Context buildPartial() { context.ContextOuterClass.Context result = new context.ContextOuterClass.Context(this); - int from_bitField0_ = bitField0_; - if (contextIdBuilder_ == null) { - result.contextId_ = contextId_; - } else { - result.contextId_ = contextIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.name_ = name_; + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.Context result) { if (topologyIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } result.topologyIds_ = topologyIds_; } else { result.topologyIds_ = topologyIdsBuilder_.build(); } if (serviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } result.serviceIds_ = serviceIds_; } else { result.serviceIds_ = serviceIdsBuilder_.build(); } if (sliceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); } result.sliceIds_ = sliceIds_; } else { result.sliceIds_ = sliceIdsBuilder_.build(); } - if (controllerBuilder_ == null) { - result.controller_ = controller_; - } else { - result.controller_ = controllerBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Context result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.controller_ = controllerBuilder_ == null ? controller_ : controllerBuilder_.build(); + } } @java.lang.Override @@ -4856,13 +4737,14 @@ public final class ContextOuterClass { } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000002; onChanged(); } if (topologyIdsBuilder_ == null) { if (!other.topologyIds_.isEmpty()) { if (topologyIds_.isEmpty()) { topologyIds_ = other.topologyIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureTopologyIdsIsMutable(); topologyIds_.addAll(other.topologyIds_); @@ -4875,7 +4757,7 @@ public final class ContextOuterClass { topologyIdsBuilder_.dispose(); topologyIdsBuilder_ = null; topologyIds_ = other.topologyIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); topologyIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTopologyIdsFieldBuilder() : null; } else { topologyIdsBuilder_.addAllMessages(other.topologyIds_); @@ -4886,7 +4768,7 @@ public final class ContextOuterClass { if (!other.serviceIds_.isEmpty()) { if (serviceIds_.isEmpty()) { serviceIds_ = other.serviceIds_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureServiceIdsIsMutable(); serviceIds_.addAll(other.serviceIds_); @@ -4899,7 +4781,7 @@ public final class ContextOuterClass { serviceIdsBuilder_.dispose(); serviceIdsBuilder_ = null; serviceIds_ = other.serviceIds_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); serviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceIdsFieldBuilder() : null; } else { serviceIdsBuilder_.addAllMessages(other.serviceIds_); @@ -4910,7 +4792,7 @@ public final class ContextOuterClass { if (!other.sliceIds_.isEmpty()) { if (sliceIds_.isEmpty()) { sliceIds_ = other.sliceIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureSliceIdsIsMutable(); sliceIds_.addAll(other.sliceIds_); @@ -4923,7 +4805,7 @@ public final class ContextOuterClass { sliceIdsBuilder_.dispose(); sliceIdsBuilder_ = null; sliceIds_ = other.sliceIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); sliceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceIdsFieldBuilder() : null; } else { sliceIdsBuilder_.addAllMessages(other.sliceIds_); @@ -4933,7 +4815,7 @@ public final class ContextOuterClass { if (other.hasController()) { mergeController(other.getController()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4945,17 +4827,92 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Context parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + context.ContextOuterClass.TopologyId m = input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry); + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.add(m); + } else { + topologyIdsBuilder_.addMessage(m); + } + break; + } + // case 26 + case 34: + { + context.ContextOuterClass.ServiceId m = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry); + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.add(m); + } else { + serviceIdsBuilder_.addMessage(m); + } + break; + } + // case 34 + case 42: + { + context.ContextOuterClass.SliceId m = input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry); + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.add(m); + } else { + sliceIdsBuilder_.addMessage(m); + } + break; + } + // case 42 + case 50: + { + input.readMessage(getControllerFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } + // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Context) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -4970,7 +4927,7 @@ public final class ContextOuterClass { * @return Whether the contextId field is set. */ public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -4994,10 +4951,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } contextId_ = value; - onChanged(); } else { contextIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -5007,10 +4965,11 @@ public final class ContextOuterClass { public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { if (contextIdBuilder_ == null) { contextId_ = builderForValue.build(); - onChanged(); } else { contextIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -5019,15 +4978,16 @@ public final class ContextOuterClass { */ public Builder mergeContextId(context.ContextOuterClass.ContextId value) { if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { + getContextIdBuilder().mergeFrom(value); } else { contextId_ = value; } - onChanged(); } else { contextIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -5035,13 +4995,13 @@ public final class ContextOuterClass { * .context.ContextId context_id = 1; */ public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } + onChanged(); return this; } @@ -5049,6 +5009,7 @@ public final class ContextOuterClass { * .context.ContextId context_id = 1; */ public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getContextIdFieldBuilder().getBuilder(); } @@ -5118,6 +5079,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -5128,6 +5090,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -5143,6 +5106,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -5150,9 +5114,9 @@ public final class ContextOuterClass { private java.util.List topologyIds_ = java.util.Collections.emptyList(); private void ensureTopologyIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { topologyIds_ = new java.util.ArrayList(topologyIds_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; } } @@ -5304,7 +5268,7 @@ public final class ContextOuterClass { public Builder clearTopologyIds() { if (topologyIdsBuilder_ == null) { topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { topologyIdsBuilder_.clear(); @@ -5378,7 +5342,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3 getTopologyIdsFieldBuilder() { if (topologyIdsBuilder_ == null) { - topologyIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(topologyIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + topologyIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(topologyIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); topologyIds_ = null; } return topologyIdsBuilder_; @@ -5387,9 +5351,9 @@ public final class ContextOuterClass { private java.util.List serviceIds_ = java.util.Collections.emptyList(); private void ensureServiceIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { serviceIds_ = new java.util.ArrayList(serviceIds_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; } } @@ -5541,7 +5505,7 @@ public final class ContextOuterClass { public Builder clearServiceIds() { if (serviceIdsBuilder_ == null) { serviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { serviceIdsBuilder_.clear(); @@ -5615,7 +5579,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3 getServiceIdsFieldBuilder() { if (serviceIdsBuilder_ == null) { - serviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + serviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); serviceIds_ = null; } return serviceIdsBuilder_; @@ -5624,9 +5588,9 @@ public final class ContextOuterClass { private java.util.List sliceIds_ = java.util.Collections.emptyList(); private void ensureSliceIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000010) != 0)) { sliceIds_ = new java.util.ArrayList(sliceIds_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; } } @@ -5778,7 +5742,7 @@ public final class ContextOuterClass { public Builder clearSliceIds() { if (sliceIdsBuilder_ == null) { sliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { sliceIdsBuilder_.clear(); @@ -5852,7 +5816,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3 getSliceIdsFieldBuilder() { if (sliceIdsBuilder_ == null) { - sliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + sliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceIds_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); sliceIds_ = null; } return sliceIdsBuilder_; @@ -5867,7 +5831,7 @@ public final class ContextOuterClass { * @return Whether the controller field is set. */ public boolean hasController() { - return controllerBuilder_ != null || controller_ != null; + return ((bitField0_ & 0x00000020) != 0); } /** @@ -5891,10 +5855,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } controller_ = value; - onChanged(); } else { controllerBuilder_.setMessage(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -5904,10 +5869,11 @@ public final class ContextOuterClass { public Builder setController(context.ContextOuterClass.TeraFlowController.Builder builderForValue) { if (controllerBuilder_ == null) { controller_ = builderForValue.build(); - onChanged(); } else { controllerBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -5916,15 +5882,16 @@ public final class ContextOuterClass { */ public Builder mergeController(context.ContextOuterClass.TeraFlowController value) { if (controllerBuilder_ == null) { - if (controller_ != null) { - controller_ = context.ContextOuterClass.TeraFlowController.newBuilder(controller_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000020) != 0) && controller_ != null && controller_ != context.ContextOuterClass.TeraFlowController.getDefaultInstance()) { + getControllerBuilder().mergeFrom(value); } else { controller_ = value; } - onChanged(); } else { controllerBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -5932,13 +5899,13 @@ public final class ContextOuterClass { * .context.TeraFlowController controller = 6; */ public Builder clearController() { - if (controllerBuilder_ == null) { - controller_ = null; - onChanged(); - } else { - controller_ = null; + bitField0_ = (bitField0_ & ~0x00000020); + controller_ = null; + if (controllerBuilder_ != null) { + controllerBuilder_.dispose(); controllerBuilder_ = null; } + onChanged(); return this; } @@ -5946,6 +5913,7 @@ public final class ContextOuterClass { * .context.TeraFlowController controller = 6; */ public context.ContextOuterClass.TeraFlowController.Builder getControllerBuilder() { + bitField0_ |= 0x00000020; onChanged(); return getControllerFieldBuilder().getBuilder(); } @@ -5999,7 +5967,17 @@ public final class ContextOuterClass { @java.lang.Override public Context parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Context(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6070,57 +6048,6 @@ public final class ContextOuterClass { return new ContextIdList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ContextIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - contextIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - contextIds_.add(input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - contextIds_ = java.util.Collections.unmodifiableList(contextIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ContextIdList_descriptor; } @@ -6132,6 +6059,7 @@ public final class ContextOuterClass { public static final int CONTEXT_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List contextIds_; /** @@ -6192,7 +6120,7 @@ public final class ContextOuterClass { for (int i = 0; i < contextIds_.size(); i++) { output.writeMessage(1, contextIds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6204,7 +6132,7 @@ public final class ContextOuterClass { for (int i = 0; i < contextIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, contextIds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6220,7 +6148,7 @@ public final class ContextOuterClass { context.ContextOuterClass.ContextIdList other = (context.ContextOuterClass.ContextIdList) obj; if (!getContextIdsList().equals(other.getContextIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6236,7 +6164,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTEXT_IDS_FIELD_NUMBER; hash = (53 * hash) + getContextIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6330,29 +6258,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ContextIdList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getContextIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (contextIdsBuilder_ == null) { contextIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + contextIds_ = null; contextIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -6378,7 +6300,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ContextIdList buildPartial() { context.ContextOuterClass.ContextIdList result = new context.ContextOuterClass.ContextIdList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.ContextIdList result) { if (contextIdsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { contextIds_ = java.util.Collections.unmodifiableList(contextIds_); @@ -6388,38 +6318,10 @@ public final class ContextOuterClass { } else { result.contextIds_ = contextIdsBuilder_.build(); } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ContextIdList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -6459,7 +6361,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6471,17 +6373,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ContextIdList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.ContextId m = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); + if (contextIdsBuilder_ == null) { + ensureContextIdsIsMutable(); + contextIds_.add(m); + } else { + contextIdsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextIdList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -6751,7 +6683,17 @@ public final class ContextOuterClass { @java.lang.Override public ContextIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ContextIdList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6822,57 +6764,6 @@ public final class ContextOuterClass { return new ContextList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ContextList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - contexts_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - contexts_.add(input.readMessage(context.ContextOuterClass.Context.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - contexts_ = java.util.Collections.unmodifiableList(contexts_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ContextList_descriptor; } @@ -6884,6 +6775,7 @@ public final class ContextOuterClass { public static final int CONTEXTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List contexts_; /** @@ -6944,7 +6836,7 @@ public final class ContextOuterClass { for (int i = 0; i < contexts_.size(); i++) { output.writeMessage(1, contexts_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6956,7 +6848,7 @@ public final class ContextOuterClass { for (int i = 0; i < contexts_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, contexts_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6972,7 +6864,7 @@ public final class ContextOuterClass { context.ContextOuterClass.ContextList other = (context.ContextOuterClass.ContextList) obj; if (!getContextsList().equals(other.getContextsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6988,7 +6880,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTEXTS_FIELD_NUMBER; hash = (53 * hash) + getContextsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7082,29 +6974,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ContextList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getContextsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (contextsBuilder_ == null) { contexts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + contexts_ = null; contextsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -7130,7 +7016,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ContextList buildPartial() { context.ContextOuterClass.ContextList result = new context.ContextOuterClass.ContextList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.ContextList result) { if (contextsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { contexts_ = java.util.Collections.unmodifiableList(contexts_); @@ -7140,38 +7034,10 @@ public final class ContextOuterClass { } else { result.contexts_ = contextsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ContextList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -7211,7 +7077,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7223,17 +7089,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ContextList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.Context m = input.readMessage(context.ContextOuterClass.Context.parser(), extensionRegistry); + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.add(m); + } else { + contextsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -7503,7 +7399,17 @@ public final class ContextOuterClass { @java.lang.Override public ContextList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ContextList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7582,70 +7488,6 @@ public final class ContextOuterClass { return new ContextEvent(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ContextEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Event.Builder subBuilder = null; - if (event_ != null) { - subBuilder = event_.toBuilder(); - } - event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(event_); - event_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.ContextId.Builder subBuilder = null; - if (contextId_ != null) { - subBuilder = contextId_.toBuilder(); - } - contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextId_); - contextId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ContextEvent_descriptor; } @@ -7682,7 +7524,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } public static final int CONTEXT_ID_FIELD_NUMBER = 2; @@ -7712,7 +7554,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } private byte memoizedIsInitialized = -1; @@ -7736,7 +7578,7 @@ public final class ContextOuterClass { if (contextId_ != null) { output.writeMessage(2, getContextId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7751,7 +7593,7 @@ public final class ContextOuterClass { if (contextId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContextId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7777,7 +7619,7 @@ public final class ContextOuterClass { if (!getContextId().equals(other.getContextId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7797,7 +7639,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; hash = (53 * hash) + getContextId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7891,32 +7733,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ContextEvent.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (eventBuilder_ == null) { - event_ = null; - } else { - event_ = null; + bitField0_ = 0; + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } return this; @@ -7944,48 +7778,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ContextEvent buildPartial() { context.ContextOuterClass.ContextEvent result = new context.ContextOuterClass.ContextEvent(this); - if (eventBuilder_ == null) { - result.event_ = event_; - } else { - result.event_ = eventBuilder_.build(); - } - if (contextIdBuilder_ == null) { - result.contextId_ = contextId_; - } else { - result.contextId_ = contextIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ContextEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); + } } @java.lang.Override @@ -8007,7 +7814,7 @@ public final class ContextOuterClass { if (other.hasContextId()) { mergeContextId(other.getContextId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8019,20 +7826,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ContextEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Event event_; private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; @@ -8042,7 +7883,7 @@ public final class ContextOuterClass { * @return Whether the event field is set. */ public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -8066,10 +7907,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } event_ = value; - onChanged(); } else { eventBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8079,10 +7921,11 @@ public final class ContextOuterClass { public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { if (eventBuilder_ == null) { event_ = builderForValue.build(); - onChanged(); } else { eventBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8091,15 +7934,16 @@ public final class ContextOuterClass { */ public Builder mergeEvent(context.ContextOuterClass.Event value) { if (eventBuilder_ == null) { - if (event_ != null) { - event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); } else { event_ = value; } - onChanged(); } else { eventBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8107,13 +7951,13 @@ public final class ContextOuterClass { * .context.Event event = 1; */ public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } + onChanged(); return this; } @@ -8121,6 +7965,7 @@ public final class ContextOuterClass { * .context.Event event = 1; */ public context.ContextOuterClass.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEventFieldBuilder().getBuilder(); } @@ -8156,7 +8001,7 @@ public final class ContextOuterClass { * @return Whether the contextId field is set. */ public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -8180,10 +8025,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } contextId_ = value; - onChanged(); } else { contextIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -8193,10 +8039,11 @@ public final class ContextOuterClass { public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { if (contextIdBuilder_ == null) { contextId_ = builderForValue.build(); - onChanged(); } else { contextIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -8205,15 +8052,16 @@ public final class ContextOuterClass { */ public Builder mergeContextId(context.ContextOuterClass.ContextId value) { if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { + getContextIdBuilder().mergeFrom(value); } else { contextId_ = value; } - onChanged(); } else { contextIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -8221,13 +8069,13 @@ public final class ContextOuterClass { * .context.ContextId context_id = 2; */ public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } + onChanged(); return this; } @@ -8235,6 +8083,7 @@ public final class ContextOuterClass { * .context.ContextId context_id = 2; */ public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getContextIdFieldBuilder().getBuilder(); } @@ -8288,7 +8137,17 @@ public final class ContextOuterClass { @java.lang.Override public ContextEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ContextEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -8371,70 +8230,6 @@ public final class ContextOuterClass { return new TopologyId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TopologyId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ContextId.Builder subBuilder = null; - if (contextId_ != null) { - subBuilder = contextId_.toBuilder(); - } - contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextId_); - contextId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (topologyUuid_ != null) { - subBuilder = topologyUuid_.toBuilder(); - } - topologyUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(topologyUuid_); - topologyUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_TopologyId_descriptor; } @@ -8471,7 +8266,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } public static final int TOPOLOGY_UUID_FIELD_NUMBER = 2; @@ -8501,7 +8296,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder() { - return getTopologyUuid(); + return topologyUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; } private byte memoizedIsInitialized = -1; @@ -8525,7 +8320,7 @@ public final class ContextOuterClass { if (topologyUuid_ != null) { output.writeMessage(2, getTopologyUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -8540,7 +8335,7 @@ public final class ContextOuterClass { if (topologyUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTopologyUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8566,7 +8361,7 @@ public final class ContextOuterClass { if (!getTopologyUuid().equals(other.getTopologyUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8586,7 +8381,7 @@ public final class ContextOuterClass { hash = (37 * hash) + TOPOLOGY_UUID_FIELD_NUMBER; hash = (53 * hash) + getTopologyUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8684,32 +8479,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.TopologyId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; + bitField0_ = 0; + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } - if (topologyUuidBuilder_ == null) { - topologyUuid_ = null; - } else { - topologyUuid_ = null; + topologyUuid_ = null; + if (topologyUuidBuilder_ != null) { + topologyUuidBuilder_.dispose(); topologyUuidBuilder_ = null; } return this; @@ -8737,48 +8524,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.TopologyId buildPartial() { context.ContextOuterClass.TopologyId result = new context.ContextOuterClass.TopologyId(this); - if (contextIdBuilder_ == null) { - result.contextId_ = contextId_; - } else { - result.contextId_ = contextIdBuilder_.build(); - } - if (topologyUuidBuilder_ == null) { - result.topologyUuid_ = topologyUuid_; - } else { - result.topologyUuid_ = topologyUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.TopologyId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.topologyUuid_ = topologyUuidBuilder_ == null ? topologyUuid_ : topologyUuidBuilder_.build(); + } } @java.lang.Override @@ -8800,7 +8560,7 @@ public final class ContextOuterClass { if (other.hasTopologyUuid()) { mergeTopologyUuid(other.getTopologyUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8812,20 +8572,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.TopologyId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getTopologyUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.ContextId contextId_; private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; @@ -8835,7 +8629,7 @@ public final class ContextOuterClass { * @return Whether the contextId field is set. */ public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -8859,10 +8653,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } contextId_ = value; - onChanged(); } else { contextIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8872,10 +8667,11 @@ public final class ContextOuterClass { public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { if (contextIdBuilder_ == null) { contextId_ = builderForValue.build(); - onChanged(); } else { contextIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8884,15 +8680,16 @@ public final class ContextOuterClass { */ public Builder mergeContextId(context.ContextOuterClass.ContextId value) { if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { + getContextIdBuilder().mergeFrom(value); } else { contextId_ = value; } - onChanged(); } else { contextIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8900,13 +8697,13 @@ public final class ContextOuterClass { * .context.ContextId context_id = 1; */ public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } + onChanged(); return this; } @@ -8914,6 +8711,7 @@ public final class ContextOuterClass { * .context.ContextId context_id = 1; */ public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getContextIdFieldBuilder().getBuilder(); } @@ -8949,7 +8747,7 @@ public final class ContextOuterClass { * @return Whether the topologyUuid field is set. */ public boolean hasTopologyUuid() { - return topologyUuidBuilder_ != null || topologyUuid_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -8973,10 +8771,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } topologyUuid_ = value; - onChanged(); } else { topologyUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -8986,10 +8785,11 @@ public final class ContextOuterClass { public Builder setTopologyUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (topologyUuidBuilder_ == null) { topologyUuid_ = builderForValue.build(); - onChanged(); } else { topologyUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -8998,15 +8798,16 @@ public final class ContextOuterClass { */ public Builder mergeTopologyUuid(context.ContextOuterClass.Uuid value) { if (topologyUuidBuilder_ == null) { - if (topologyUuid_ != null) { - topologyUuid_ = context.ContextOuterClass.Uuid.newBuilder(topologyUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && topologyUuid_ != null && topologyUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getTopologyUuidBuilder().mergeFrom(value); } else { topologyUuid_ = value; } - onChanged(); } else { topologyUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -9014,13 +8815,13 @@ public final class ContextOuterClass { * .context.Uuid topology_uuid = 2; */ public Builder clearTopologyUuid() { - if (topologyUuidBuilder_ == null) { - topologyUuid_ = null; - onChanged(); - } else { - topologyUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + topologyUuid_ = null; + if (topologyUuidBuilder_ != null) { + topologyUuidBuilder_.dispose(); topologyUuidBuilder_ = null; } + onChanged(); return this; } @@ -9028,6 +8829,7 @@ public final class ContextOuterClass { * .context.Uuid topology_uuid = 2; */ public context.ContextOuterClass.Uuid.Builder getTopologyUuidBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getTopologyUuidFieldBuilder().getBuilder(); } @@ -9081,7 +8883,17 @@ public final class ContextOuterClass { @java.lang.Override public TopologyId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TopologyId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -9181,6 +8993,31 @@ public final class ContextOuterClass { * repeated .context.LinkId link_ids = 4; */ context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index); + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + java.util.List getOpticalLinkIdsList(); + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + context.ContextOuterClass.LinkId getOpticalLinkIds(int index); + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + int getOpticalLinkIdsCount(); + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + java.util.List getOpticalLinkIdsOrBuilderList(); + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + context.ContextOuterClass.LinkIdOrBuilder getOpticalLinkIdsOrBuilder(int index); } /** @@ -9200,6 +9037,7 @@ public final class ContextOuterClass { name_ = ""; deviceIds_ = java.util.Collections.emptyList(); linkIds_ = java.util.Collections.emptyList(); + opticalLinkIds_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -9208,88 +9046,6 @@ public final class ContextOuterClass { return new Topology(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Topology(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.TopologyId.Builder subBuilder = null; - if (topologyId_ != null) { - subBuilder = topologyId_.toBuilder(); - } - topologyId_ = input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(topologyId_); - topologyId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deviceIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - deviceIds_.add(input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry)); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - linkIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - linkIds_.add(input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - linkIds_ = java.util.Collections.unmodifiableList(linkIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Topology_descriptor; } @@ -9326,12 +9082,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; } public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * string name = 2; @@ -9368,6 +9125,7 @@ public final class ContextOuterClass { public static final int DEVICE_IDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List deviceIds_; /** @@ -9412,6 +9170,7 @@ public final class ContextOuterClass { public static final int LINK_IDS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List linkIds_; /** @@ -9454,6 +9213,51 @@ public final class ContextOuterClass { return linkIds_.get(index); } + public static final int OPTICAL_LINK_IDS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List opticalLinkIds_; + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + @java.lang.Override + public java.util.List getOpticalLinkIdsList() { + return opticalLinkIds_; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + @java.lang.Override + public java.util.List getOpticalLinkIdsOrBuilderList() { + return opticalLinkIds_; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + @java.lang.Override + public int getOpticalLinkIdsCount() { + return opticalLinkIds_.size(); + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getOpticalLinkIds(int index) { + return opticalLinkIds_.get(index); + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getOpticalLinkIdsOrBuilder(int index) { + return opticalLinkIds_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -9472,7 +9276,7 @@ public final class ContextOuterClass { if (topologyId_ != null) { output.writeMessage(1, getTopologyId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } for (int i = 0; i < deviceIds_.size(); i++) { @@ -9481,7 +9285,10 @@ public final class ContextOuterClass { for (int i = 0; i < linkIds_.size(); i++) { output.writeMessage(4, linkIds_.get(i)); } - unknownFields.writeTo(output); + for (int i = 0; i < opticalLinkIds_.size(); i++) { + output.writeMessage(5, opticalLinkIds_.get(i)); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -9493,7 +9300,7 @@ public final class ContextOuterClass { if (topologyId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTopologyId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } for (int i = 0; i < deviceIds_.size(); i++) { @@ -9502,7 +9309,10 @@ public final class ContextOuterClass { for (int i = 0; i < linkIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkIds_.get(i)); } - size += unknownFields.getSerializedSize(); + for (int i = 0; i < opticalLinkIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, opticalLinkIds_.get(i)); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -9528,7 +9338,9 @@ public final class ContextOuterClass { return false; if (!getLinkIdsList().equals(other.getLinkIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getOpticalLinkIdsList().equals(other.getOpticalLinkIdsList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9554,7 +9366,11 @@ public final class ContextOuterClass { hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; hash = (53 * hash) + getLinkIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + if (getOpticalLinkIdsCount() > 0) { + hash = (37 * hash) + OPTICAL_LINK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getOpticalLinkIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -9648,43 +9464,43 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Topology.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDeviceIdsFieldBuilder(); - getLinkIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (topologyIdBuilder_ == null) { - topologyId_ = null; - } else { - topologyId_ = null; + bitField0_ = 0; + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } name_ = ""; if (deviceIdsBuilder_ == null) { deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + deviceIds_ = null; deviceIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (linkIdsBuilder_ == null) { linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + linkIds_ = null; linkIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); + if (opticalLinkIdsBuilder_ == null) { + opticalLinkIds_ = java.util.Collections.emptyList(); + } else { + opticalLinkIds_ = null; + opticalLinkIdsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -9710,63 +9526,52 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Topology buildPartial() { context.ContextOuterClass.Topology result = new context.ContextOuterClass.Topology(this); - int from_bitField0_ = bitField0_; - if (topologyIdBuilder_ == null) { - result.topologyId_ = topologyId_; - } else { - result.topologyId_ = topologyIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.name_ = name_; + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.Topology result) { if (deviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } result.deviceIds_ = deviceIds_; } else { result.deviceIds_ = deviceIdsBuilder_.build(); } if (linkIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { linkIds_ = java.util.Collections.unmodifiableList(linkIds_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } result.linkIds_ = linkIds_; } else { result.linkIds_ = linkIdsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + if (opticalLinkIdsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + opticalLinkIds_ = java.util.Collections.unmodifiableList(opticalLinkIds_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.opticalLinkIds_ = opticalLinkIds_; + } else { + result.opticalLinkIds_ = opticalLinkIdsBuilder_.build(); + } } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Topology result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.topologyId_ = topologyIdBuilder_ == null ? topologyId_ : topologyIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } } @java.lang.Override @@ -9787,13 +9592,14 @@ public final class ContextOuterClass { } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000002; onChanged(); } if (deviceIdsBuilder_ == null) { if (!other.deviceIds_.isEmpty()) { if (deviceIds_.isEmpty()) { deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureDeviceIdsIsMutable(); deviceIds_.addAll(other.deviceIds_); @@ -9806,7 +9612,7 @@ public final class ContextOuterClass { deviceIdsBuilder_.dispose(); deviceIdsBuilder_ = null; deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); deviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceIdsFieldBuilder() : null; } else { deviceIdsBuilder_.addAllMessages(other.deviceIds_); @@ -9817,7 +9623,7 @@ public final class ContextOuterClass { if (!other.linkIds_.isEmpty()) { if (linkIds_.isEmpty()) { linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureLinkIdsIsMutable(); linkIds_.addAll(other.linkIds_); @@ -9830,14 +9636,38 @@ public final class ContextOuterClass { linkIdsBuilder_.dispose(); linkIdsBuilder_ = null; linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); linkIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkIdsFieldBuilder() : null; } else { linkIdsBuilder_.addAllMessages(other.linkIds_); } } } - this.mergeUnknownFields(other.unknownFields); + if (opticalLinkIdsBuilder_ == null) { + if (!other.opticalLinkIds_.isEmpty()) { + if (opticalLinkIds_.isEmpty()) { + opticalLinkIds_ = other.opticalLinkIds_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.addAll(other.opticalLinkIds_); + } + onChanged(); + } + } else { + if (!other.opticalLinkIds_.isEmpty()) { + if (opticalLinkIdsBuilder_.isEmpty()) { + opticalLinkIdsBuilder_.dispose(); + opticalLinkIdsBuilder_ = null; + opticalLinkIds_ = other.opticalLinkIds_; + bitField0_ = (bitField0_ & ~0x00000010); + opticalLinkIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOpticalLinkIdsFieldBuilder() : null; + } else { + opticalLinkIdsBuilder_.addAllMessages(other.opticalLinkIds_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9849,17 +9679,85 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Topology parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTopologyIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + context.ContextOuterClass.DeviceId m = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(m); + } else { + deviceIdsBuilder_.addMessage(m); + } + break; + } + // case 26 + case 34: + { + context.ContextOuterClass.LinkId m = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry); + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(m); + } else { + linkIdsBuilder_.addMessage(m); + } + break; + } + // case 34 + case 42: + { + context.ContextOuterClass.LinkId m = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry); + if (opticalLinkIdsBuilder_ == null) { + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.add(m); + } else { + opticalLinkIdsBuilder_.addMessage(m); + } + break; + } + // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Topology) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -9874,7 +9772,7 @@ public final class ContextOuterClass { * @return Whether the topologyId field is set. */ public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -9898,10 +9796,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } topologyId_ = value; - onChanged(); } else { topologyIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -9911,10 +9810,11 @@ public final class ContextOuterClass { public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { if (topologyIdBuilder_ == null) { topologyId_ = builderForValue.build(); - onChanged(); } else { topologyIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -9923,15 +9823,16 @@ public final class ContextOuterClass { */ public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && topologyId_ != null && topologyId_ != context.ContextOuterClass.TopologyId.getDefaultInstance()) { + getTopologyIdBuilder().mergeFrom(value); } else { topologyId_ = value; } - onChanged(); } else { topologyIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -9939,13 +9840,13 @@ public final class ContextOuterClass { * .context.TopologyId topology_id = 1; */ public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } + onChanged(); return this; } @@ -9953,6 +9854,7 @@ public final class ContextOuterClass { * .context.TopologyId topology_id = 1; */ public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getTopologyIdFieldBuilder().getBuilder(); } @@ -10022,6 +9924,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -10032,6 +9935,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -10047,6 +9951,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -10054,9 +9959,9 @@ public final class ContextOuterClass { private java.util.List deviceIds_ = java.util.Collections.emptyList(); private void ensureDeviceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { deviceIds_ = new java.util.ArrayList(deviceIds_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; } } @@ -10208,7 +10113,7 @@ public final class ContextOuterClass { public Builder clearDeviceIds() { if (deviceIdsBuilder_ == null) { deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { deviceIdsBuilder_.clear(); @@ -10282,7 +10187,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3 getDeviceIdsFieldBuilder() { if (deviceIdsBuilder_ == null) { - deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); deviceIds_ = null; } return deviceIdsBuilder_; @@ -10291,9 +10196,9 @@ public final class ContextOuterClass { private java.util.List linkIds_ = java.util.Collections.emptyList(); private void ensureLinkIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { linkIds_ = new java.util.ArrayList(linkIds_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; } } @@ -10445,7 +10350,7 @@ public final class ContextOuterClass { public Builder clearLinkIds() { if (linkIdsBuilder_ == null) { linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { linkIdsBuilder_.clear(); @@ -10519,12 +10424,249 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3 getLinkIdsFieldBuilder() { if (linkIdsBuilder_ == null) { - linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); linkIds_ = null; } return linkIdsBuilder_; } + private java.util.List opticalLinkIds_ = java.util.Collections.emptyList(); + + private void ensureOpticalLinkIdsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + opticalLinkIds_ = new java.util.ArrayList(opticalLinkIds_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 opticalLinkIdsBuilder_; + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public java.util.List getOpticalLinkIdsList() { + if (opticalLinkIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(opticalLinkIds_); + } else { + return opticalLinkIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public int getOpticalLinkIdsCount() { + if (opticalLinkIdsBuilder_ == null) { + return opticalLinkIds_.size(); + } else { + return opticalLinkIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public context.ContextOuterClass.LinkId getOpticalLinkIds(int index) { + if (opticalLinkIdsBuilder_ == null) { + return opticalLinkIds_.get(index); + } else { + return opticalLinkIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder setOpticalLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (opticalLinkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.set(index, value); + onChanged(); + } else { + opticalLinkIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder setOpticalLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (opticalLinkIdsBuilder_ == null) { + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.set(index, builderForValue.build()); + onChanged(); + } else { + opticalLinkIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder addOpticalLinkIds(context.ContextOuterClass.LinkId value) { + if (opticalLinkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.add(value); + onChanged(); + } else { + opticalLinkIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder addOpticalLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (opticalLinkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.add(index, value); + onChanged(); + } else { + opticalLinkIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder addOpticalLinkIds(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (opticalLinkIdsBuilder_ == null) { + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.add(builderForValue.build()); + onChanged(); + } else { + opticalLinkIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder addOpticalLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (opticalLinkIdsBuilder_ == null) { + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.add(index, builderForValue.build()); + onChanged(); + } else { + opticalLinkIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder addAllOpticalLinkIds(java.lang.Iterable values) { + if (opticalLinkIdsBuilder_ == null) { + ensureOpticalLinkIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, opticalLinkIds_); + onChanged(); + } else { + opticalLinkIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder clearOpticalLinkIds() { + if (opticalLinkIdsBuilder_ == null) { + opticalLinkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + opticalLinkIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public Builder removeOpticalLinkIds(int index) { + if (opticalLinkIdsBuilder_ == null) { + ensureOpticalLinkIdsIsMutable(); + opticalLinkIds_.remove(index); + onChanged(); + } else { + opticalLinkIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public context.ContextOuterClass.LinkId.Builder getOpticalLinkIdsBuilder(int index) { + return getOpticalLinkIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public context.ContextOuterClass.LinkIdOrBuilder getOpticalLinkIdsOrBuilder(int index) { + if (opticalLinkIdsBuilder_ == null) { + return opticalLinkIds_.get(index); + } else { + return opticalLinkIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public java.util.List getOpticalLinkIdsOrBuilderList() { + if (opticalLinkIdsBuilder_ != null) { + return opticalLinkIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(opticalLinkIds_); + } + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public context.ContextOuterClass.LinkId.Builder addOpticalLinkIdsBuilder() { + return getOpticalLinkIdsFieldBuilder().addBuilder(context.ContextOuterClass.LinkId.getDefaultInstance()); + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public context.ContextOuterClass.LinkId.Builder addOpticalLinkIdsBuilder(int index) { + return getOpticalLinkIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.LinkId.getDefaultInstance()); + } + + /** + * repeated .context.LinkId optical_link_ids = 5; + */ + public java.util.List getOpticalLinkIdsBuilderList() { + return getOpticalLinkIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getOpticalLinkIdsFieldBuilder() { + if (opticalLinkIdsBuilder_ == null) { + opticalLinkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(opticalLinkIds_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + opticalLinkIds_ = null; + } + return opticalLinkIdsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -10552,7 +10694,17 @@ public final class ContextOuterClass { @java.lang.Override public Topology parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Topology(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -10652,6 +10804,31 @@ public final class ContextOuterClass { * repeated .context.Link links = 4; */ context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index); + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + java.util.List getOpticalLinksList(); + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + context.ContextOuterClass.OpticalLink getOpticalLinks(int index); + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + int getOpticalLinksCount(); + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + java.util.List getOpticalLinksOrBuilderList(); + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + context.ContextOuterClass.OpticalLinkOrBuilder getOpticalLinksOrBuilder(int index); } /** @@ -10671,6 +10848,7 @@ public final class ContextOuterClass { name_ = ""; devices_ = java.util.Collections.emptyList(); links_ = java.util.Collections.emptyList(); + opticalLinks_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -10679,88 +10857,6 @@ public final class ContextOuterClass { return new TopologyDetails(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TopologyDetails(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.TopologyId.Builder subBuilder = null; - if (topologyId_ != null) { - subBuilder = topologyId_.toBuilder(); - } - topologyId_ = input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(topologyId_); - topologyId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - devices_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - devices_.add(input.readMessage(context.ContextOuterClass.Device.parser(), extensionRegistry)); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - links_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - links_.add(input.readMessage(context.ContextOuterClass.Link.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - devices_ = java.util.Collections.unmodifiableList(devices_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - links_ = java.util.Collections.unmodifiableList(links_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_TopologyDetails_descriptor; } @@ -10797,12 +10893,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; } public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * string name = 2; @@ -10839,6 +10936,7 @@ public final class ContextOuterClass { public static final int DEVICES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List devices_; /** @@ -10883,6 +10981,7 @@ public final class ContextOuterClass { public static final int LINKS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List links_; /** @@ -10925,6 +11024,51 @@ public final class ContextOuterClass { return links_.get(index); } + public static final int OPTICAL_LINKS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List opticalLinks_; + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + @java.lang.Override + public java.util.List getOpticalLinksList() { + return opticalLinks_; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + @java.lang.Override + public java.util.List getOpticalLinksOrBuilderList() { + return opticalLinks_; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + @java.lang.Override + public int getOpticalLinksCount() { + return opticalLinks_.size(); + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLink getOpticalLinks(int index) { + return opticalLinks_.get(index); + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLinkOrBuilder getOpticalLinksOrBuilder(int index) { + return opticalLinks_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -10943,7 +11087,7 @@ public final class ContextOuterClass { if (topologyId_ != null) { output.writeMessage(1, getTopologyId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } for (int i = 0; i < devices_.size(); i++) { @@ -10952,7 +11096,10 @@ public final class ContextOuterClass { for (int i = 0; i < links_.size(); i++) { output.writeMessage(4, links_.get(i)); } - unknownFields.writeTo(output); + for (int i = 0; i < opticalLinks_.size(); i++) { + output.writeMessage(5, opticalLinks_.get(i)); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -10964,7 +11111,7 @@ public final class ContextOuterClass { if (topologyId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTopologyId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } for (int i = 0; i < devices_.size(); i++) { @@ -10973,7 +11120,10 @@ public final class ContextOuterClass { for (int i = 0; i < links_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, links_.get(i)); } - size += unknownFields.getSerializedSize(); + for (int i = 0; i < opticalLinks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, opticalLinks_.get(i)); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -10999,7 +11149,9 @@ public final class ContextOuterClass { return false; if (!getLinksList().equals(other.getLinksList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getOpticalLinksList().equals(other.getOpticalLinksList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11025,7 +11177,11 @@ public final class ContextOuterClass { hash = (37 * hash) + LINKS_FIELD_NUMBER; hash = (53 * hash) + getLinksList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + if (getOpticalLinksCount() > 0) { + hash = (37 * hash) + OPTICAL_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getOpticalLinksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -11119,43 +11275,43 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.TopologyDetails.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDevicesFieldBuilder(); - getLinksFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (topologyIdBuilder_ == null) { - topologyId_ = null; - } else { - topologyId_ = null; + bitField0_ = 0; + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } name_ = ""; if (devicesBuilder_ == null) { devices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + devices_ = null; devicesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (linksBuilder_ == null) { links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + links_ = null; linksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); + if (opticalLinksBuilder_ == null) { + opticalLinks_ = java.util.Collections.emptyList(); + } else { + opticalLinks_ = null; + opticalLinksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -11181,63 +11337,52 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.TopologyDetails buildPartial() { context.ContextOuterClass.TopologyDetails result = new context.ContextOuterClass.TopologyDetails(this); - int from_bitField0_ = bitField0_; - if (topologyIdBuilder_ == null) { - result.topologyId_ = topologyId_; - } else { - result.topologyId_ = topologyIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.name_ = name_; + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.TopologyDetails result) { if (devicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { devices_ = java.util.Collections.unmodifiableList(devices_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } result.devices_ = devices_; } else { result.devices_ = devicesBuilder_.build(); } if (linksBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { links_ = java.util.Collections.unmodifiableList(links_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } result.links_ = links_; } else { result.links_ = linksBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + if (opticalLinksBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + opticalLinks_ = java.util.Collections.unmodifiableList(opticalLinks_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.opticalLinks_ = opticalLinks_; + } else { + result.opticalLinks_ = opticalLinksBuilder_.build(); + } } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.TopologyDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.topologyId_ = topologyIdBuilder_ == null ? topologyId_ : topologyIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } } @java.lang.Override @@ -11258,13 +11403,14 @@ public final class ContextOuterClass { } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000002; onChanged(); } if (devicesBuilder_ == null) { if (!other.devices_.isEmpty()) { if (devices_.isEmpty()) { devices_ = other.devices_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureDevicesIsMutable(); devices_.addAll(other.devices_); @@ -11277,7 +11423,7 @@ public final class ContextOuterClass { devicesBuilder_.dispose(); devicesBuilder_ = null; devices_ = other.devices_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); devicesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDevicesFieldBuilder() : null; } else { devicesBuilder_.addAllMessages(other.devices_); @@ -11288,7 +11434,7 @@ public final class ContextOuterClass { if (!other.links_.isEmpty()) { if (links_.isEmpty()) { links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureLinksIsMutable(); links_.addAll(other.links_); @@ -11301,14 +11447,38 @@ public final class ContextOuterClass { linksBuilder_.dispose(); linksBuilder_ = null; links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); linksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinksFieldBuilder() : null; } else { linksBuilder_.addAllMessages(other.links_); } } } - this.mergeUnknownFields(other.unknownFields); + if (opticalLinksBuilder_ == null) { + if (!other.opticalLinks_.isEmpty()) { + if (opticalLinks_.isEmpty()) { + opticalLinks_ = other.opticalLinks_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureOpticalLinksIsMutable(); + opticalLinks_.addAll(other.opticalLinks_); + } + onChanged(); + } + } else { + if (!other.opticalLinks_.isEmpty()) { + if (opticalLinksBuilder_.isEmpty()) { + opticalLinksBuilder_.dispose(); + opticalLinksBuilder_ = null; + opticalLinks_ = other.opticalLinks_; + bitField0_ = (bitField0_ & ~0x00000010); + opticalLinksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOpticalLinksFieldBuilder() : null; + } else { + opticalLinksBuilder_.addAllMessages(other.opticalLinks_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -11320,17 +11490,85 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.TopologyDetails parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTopologyIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + context.ContextOuterClass.Device m = input.readMessage(context.ContextOuterClass.Device.parser(), extensionRegistry); + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(m); + } else { + devicesBuilder_.addMessage(m); + } + break; + } + // case 26 + case 34: + { + context.ContextOuterClass.Link m = input.readMessage(context.ContextOuterClass.Link.parser(), extensionRegistry); + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(m); + } else { + linksBuilder_.addMessage(m); + } + break; + } + // case 34 + case 42: + { + context.ContextOuterClass.OpticalLink m = input.readMessage(context.ContextOuterClass.OpticalLink.parser(), extensionRegistry); + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.add(m); + } else { + opticalLinksBuilder_.addMessage(m); + } + break; + } + // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyDetails) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -11345,7 +11583,7 @@ public final class ContextOuterClass { * @return Whether the topologyId field is set. */ public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -11369,10 +11607,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } topologyId_ = value; - onChanged(); } else { topologyIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -11382,10 +11621,11 @@ public final class ContextOuterClass { public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { if (topologyIdBuilder_ == null) { topologyId_ = builderForValue.build(); - onChanged(); } else { topologyIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -11394,15 +11634,16 @@ public final class ContextOuterClass { */ public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && topologyId_ != null && topologyId_ != context.ContextOuterClass.TopologyId.getDefaultInstance()) { + getTopologyIdBuilder().mergeFrom(value); } else { topologyId_ = value; } - onChanged(); } else { topologyIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -11410,13 +11651,13 @@ public final class ContextOuterClass { * .context.TopologyId topology_id = 1; */ public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } + onChanged(); return this; } @@ -11424,6 +11665,7 @@ public final class ContextOuterClass { * .context.TopologyId topology_id = 1; */ public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getTopologyIdFieldBuilder().getBuilder(); } @@ -11493,6 +11735,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -11503,6 +11746,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -11518,6 +11762,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -11525,9 +11770,9 @@ public final class ContextOuterClass { private java.util.List devices_ = java.util.Collections.emptyList(); private void ensureDevicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { devices_ = new java.util.ArrayList(devices_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; } } @@ -11679,7 +11924,7 @@ public final class ContextOuterClass { public Builder clearDevices() { if (devicesBuilder_ == null) { devices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { devicesBuilder_.clear(); @@ -11753,7 +11998,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3 getDevicesFieldBuilder() { if (devicesBuilder_ == null) { - devicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(devices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + devicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(devices_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); devices_ = null; } return devicesBuilder_; @@ -11762,9 +12007,9 @@ public final class ContextOuterClass { private java.util.List links_ = java.util.Collections.emptyList(); private void ensureLinksIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { links_ = new java.util.ArrayList(links_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; } } @@ -11916,7 +12161,7 @@ public final class ContextOuterClass { public Builder clearLinks() { if (linksBuilder_ == null) { links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { linksBuilder_.clear(); @@ -11990,12 +12235,249 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3 getLinksFieldBuilder() { if (linksBuilder_ == null) { - linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(links_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(links_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); links_ = null; } return linksBuilder_; } + private java.util.List opticalLinks_ = java.util.Collections.emptyList(); + + private void ensureOpticalLinksIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + opticalLinks_ = new java.util.ArrayList(opticalLinks_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 opticalLinksBuilder_; + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public java.util.List getOpticalLinksList() { + if (opticalLinksBuilder_ == null) { + return java.util.Collections.unmodifiableList(opticalLinks_); + } else { + return opticalLinksBuilder_.getMessageList(); + } + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public int getOpticalLinksCount() { + if (opticalLinksBuilder_ == null) { + return opticalLinks_.size(); + } else { + return opticalLinksBuilder_.getCount(); + } + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public context.ContextOuterClass.OpticalLink getOpticalLinks(int index) { + if (opticalLinksBuilder_ == null) { + return opticalLinks_.get(index); + } else { + return opticalLinksBuilder_.getMessage(index); + } + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder setOpticalLinks(int index, context.ContextOuterClass.OpticalLink value) { + if (opticalLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinksIsMutable(); + opticalLinks_.set(index, value); + onChanged(); + } else { + opticalLinksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder setOpticalLinks(int index, context.ContextOuterClass.OpticalLink.Builder builderForValue) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.set(index, builderForValue.build()); + onChanged(); + } else { + opticalLinksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder addOpticalLinks(context.ContextOuterClass.OpticalLink value) { + if (opticalLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinksIsMutable(); + opticalLinks_.add(value); + onChanged(); + } else { + opticalLinksBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder addOpticalLinks(int index, context.ContextOuterClass.OpticalLink value) { + if (opticalLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinksIsMutable(); + opticalLinks_.add(index, value); + onChanged(); + } else { + opticalLinksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder addOpticalLinks(context.ContextOuterClass.OpticalLink.Builder builderForValue) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.add(builderForValue.build()); + onChanged(); + } else { + opticalLinksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder addOpticalLinks(int index, context.ContextOuterClass.OpticalLink.Builder builderForValue) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.add(index, builderForValue.build()); + onChanged(); + } else { + opticalLinksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder addAllOpticalLinks(java.lang.Iterable values) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, opticalLinks_); + onChanged(); + } else { + opticalLinksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder clearOpticalLinks() { + if (opticalLinksBuilder_ == null) { + opticalLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + opticalLinksBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public Builder removeOpticalLinks(int index) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.remove(index); + onChanged(); + } else { + opticalLinksBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public context.ContextOuterClass.OpticalLink.Builder getOpticalLinksBuilder(int index) { + return getOpticalLinksFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public context.ContextOuterClass.OpticalLinkOrBuilder getOpticalLinksOrBuilder(int index) { + if (opticalLinksBuilder_ == null) { + return opticalLinks_.get(index); + } else { + return opticalLinksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public java.util.List getOpticalLinksOrBuilderList() { + if (opticalLinksBuilder_ != null) { + return opticalLinksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(opticalLinks_); + } + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public context.ContextOuterClass.OpticalLink.Builder addOpticalLinksBuilder() { + return getOpticalLinksFieldBuilder().addBuilder(context.ContextOuterClass.OpticalLink.getDefaultInstance()); + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public context.ContextOuterClass.OpticalLink.Builder addOpticalLinksBuilder(int index) { + return getOpticalLinksFieldBuilder().addBuilder(index, context.ContextOuterClass.OpticalLink.getDefaultInstance()); + } + + /** + * repeated .context.OpticalLink optical_links = 5; + */ + public java.util.List getOpticalLinksBuilderList() { + return getOpticalLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getOpticalLinksFieldBuilder() { + if (opticalLinksBuilder_ == null) { + opticalLinksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(opticalLinks_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + opticalLinks_ = null; + } + return opticalLinksBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -12023,7 +12505,17 @@ public final class ContextOuterClass { @java.lang.Override public TopologyDetails parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TopologyDetails(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -12094,57 +12586,6 @@ public final class ContextOuterClass { return new TopologyIdList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TopologyIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - topologyIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - topologyIds_.add(input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_TopologyIdList_descriptor; } @@ -12156,6 +12597,7 @@ public final class ContextOuterClass { public static final int TOPOLOGY_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List topologyIds_; /** @@ -12216,7 +12658,7 @@ public final class ContextOuterClass { for (int i = 0; i < topologyIds_.size(); i++) { output.writeMessage(1, topologyIds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -12228,7 +12670,7 @@ public final class ContextOuterClass { for (int i = 0; i < topologyIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, topologyIds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -12244,7 +12686,7 @@ public final class ContextOuterClass { context.ContextOuterClass.TopologyIdList other = (context.ContextOuterClass.TopologyIdList) obj; if (!getTopologyIdsList().equals(other.getTopologyIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -12260,7 +12702,7 @@ public final class ContextOuterClass { hash = (37 * hash) + TOPOLOGY_IDS_FIELD_NUMBER; hash = (53 * hash) + getTopologyIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -12354,29 +12796,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.TopologyIdList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTopologyIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (topologyIdsBuilder_ == null) { topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + topologyIds_ = null; topologyIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -12402,7 +12838,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.TopologyIdList buildPartial() { context.ContextOuterClass.TopologyIdList result = new context.ContextOuterClass.TopologyIdList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.TopologyIdList result) { if (topologyIdsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); @@ -12412,38 +12856,10 @@ public final class ContextOuterClass { } else { result.topologyIds_ = topologyIdsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.TopologyIdList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -12483,7 +12899,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -12495,17 +12911,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.TopologyIdList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.TopologyId m = input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry); + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.add(m); + } else { + topologyIdsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyIdList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -12775,7 +13221,17 @@ public final class ContextOuterClass { @java.lang.Override public TopologyIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TopologyIdList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -12846,57 +13302,6 @@ public final class ContextOuterClass { return new TopologyList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TopologyList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - topologies_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - topologies_.add(input.readMessage(context.ContextOuterClass.Topology.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - topologies_ = java.util.Collections.unmodifiableList(topologies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_TopologyList_descriptor; } @@ -12908,6 +13313,7 @@ public final class ContextOuterClass { public static final int TOPOLOGIES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List topologies_; /** @@ -12968,7 +13374,7 @@ public final class ContextOuterClass { for (int i = 0; i < topologies_.size(); i++) { output.writeMessage(1, topologies_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -12980,7 +13386,7 @@ public final class ContextOuterClass { for (int i = 0; i < topologies_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, topologies_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -12996,7 +13402,7 @@ public final class ContextOuterClass { context.ContextOuterClass.TopologyList other = (context.ContextOuterClass.TopologyList) obj; if (!getTopologiesList().equals(other.getTopologiesList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13012,7 +13418,7 @@ public final class ContextOuterClass { hash = (37 * hash) + TOPOLOGIES_FIELD_NUMBER; hash = (53 * hash) + getTopologiesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -13106,29 +13512,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.TopologyList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTopologiesFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (topologiesBuilder_ == null) { topologies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + topologies_ = null; topologiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -13154,7 +13554,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.TopologyList buildPartial() { context.ContextOuterClass.TopologyList result = new context.ContextOuterClass.TopologyList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.TopologyList result) { if (topologiesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { topologies_ = java.util.Collections.unmodifiableList(topologies_); @@ -13164,38 +13572,10 @@ public final class ContextOuterClass { } else { result.topologies_ = topologiesBuilder_.build(); } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.TopologyList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -13235,7 +13615,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -13247,17 +13627,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.TopologyList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.Topology m = input.readMessage(context.ContextOuterClass.Topology.parser(), extensionRegistry); + if (topologiesBuilder_ == null) { + ensureTopologiesIsMutable(); + topologies_.add(m); + } else { + topologiesBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -13527,7 +13937,17 @@ public final class ContextOuterClass { @java.lang.Override public TopologyList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TopologyList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -13606,70 +14026,6 @@ public final class ContextOuterClass { return new TopologyEvent(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TopologyEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Event.Builder subBuilder = null; - if (event_ != null) { - subBuilder = event_.toBuilder(); - } - event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(event_); - event_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.TopologyId.Builder subBuilder = null; - if (topologyId_ != null) { - subBuilder = topologyId_.toBuilder(); - } - topologyId_ = input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(topologyId_); - topologyId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_TopologyEvent_descriptor; } @@ -13706,7 +14062,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } public static final int TOPOLOGY_ID_FIELD_NUMBER = 2; @@ -13736,7 +14092,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; } private byte memoizedIsInitialized = -1; @@ -13760,7 +14116,7 @@ public final class ContextOuterClass { if (topologyId_ != null) { output.writeMessage(2, getTopologyId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -13775,7 +14131,7 @@ public final class ContextOuterClass { if (topologyId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTopologyId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -13801,7 +14157,7 @@ public final class ContextOuterClass { if (!getTopologyId().equals(other.getTopologyId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13821,7 +14177,7 @@ public final class ContextOuterClass { hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; hash = (53 * hash) + getTopologyId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -13915,32 +14271,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.TopologyEvent.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (eventBuilder_ == null) { - event_ = null; - } else { - event_ = null; + bitField0_ = 0; + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } - if (topologyIdBuilder_ == null) { - topologyId_ = null; - } else { - topologyId_ = null; + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } return this; @@ -13968,48 +14316,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.TopologyEvent buildPartial() { context.ContextOuterClass.TopologyEvent result = new context.ContextOuterClass.TopologyEvent(this); - if (eventBuilder_ == null) { - result.event_ = event_; - } else { - result.event_ = eventBuilder_.build(); - } - if (topologyIdBuilder_ == null) { - result.topologyId_ = topologyId_; - } else { - result.topologyId_ = topologyIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.TopologyEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.topologyId_ = topologyIdBuilder_ == null ? topologyId_ : topologyIdBuilder_.build(); + } } @java.lang.Override @@ -14031,7 +14352,7 @@ public final class ContextOuterClass { if (other.hasTopologyId()) { mergeTopologyId(other.getTopologyId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -14043,20 +14364,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.TopologyEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getTopologyIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Event event_; private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; @@ -14066,7 +14421,7 @@ public final class ContextOuterClass { * @return Whether the event field is set. */ public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -14090,10 +14445,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } event_ = value; - onChanged(); } else { eventBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14103,10 +14459,11 @@ public final class ContextOuterClass { public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { if (eventBuilder_ == null) { event_ = builderForValue.build(); - onChanged(); } else { eventBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14115,15 +14472,16 @@ public final class ContextOuterClass { */ public Builder mergeEvent(context.ContextOuterClass.Event value) { if (eventBuilder_ == null) { - if (event_ != null) { - event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); } else { event_ = value; } - onChanged(); } else { eventBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14131,13 +14489,13 @@ public final class ContextOuterClass { * .context.Event event = 1; */ public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } + onChanged(); return this; } @@ -14145,6 +14503,7 @@ public final class ContextOuterClass { * .context.Event event = 1; */ public context.ContextOuterClass.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEventFieldBuilder().getBuilder(); } @@ -14180,7 +14539,7 @@ public final class ContextOuterClass { * @return Whether the topologyId field is set. */ public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -14204,10 +14563,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } topologyId_ = value; - onChanged(); } else { topologyIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -14217,10 +14577,11 @@ public final class ContextOuterClass { public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { if (topologyIdBuilder_ == null) { topologyId_ = builderForValue.build(); - onChanged(); } else { topologyIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -14229,15 +14590,16 @@ public final class ContextOuterClass { */ public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && topologyId_ != null && topologyId_ != context.ContextOuterClass.TopologyId.getDefaultInstance()) { + getTopologyIdBuilder().mergeFrom(value); } else { topologyId_ = value; } - onChanged(); } else { topologyIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -14245,13 +14607,13 @@ public final class ContextOuterClass { * .context.TopologyId topology_id = 2; */ public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } + onChanged(); return this; } @@ -14259,6 +14621,7 @@ public final class ContextOuterClass { * .context.TopologyId topology_id = 2; */ public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getTopologyIdFieldBuilder().getBuilder(); } @@ -14312,7 +14675,17 @@ public final class ContextOuterClass { @java.lang.Override public TopologyEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TopologyEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -14378,57 +14751,6 @@ public final class ContextOuterClass { return new DeviceId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeviceId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (deviceUuid_ != null) { - subBuilder = deviceUuid_.toBuilder(); - } - deviceUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deviceUuid_); - deviceUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_DeviceId_descriptor; } @@ -14465,7 +14787,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder() { - return getDeviceUuid(); + return deviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; } private byte memoizedIsInitialized = -1; @@ -14486,7 +14808,7 @@ public final class ContextOuterClass { if (deviceUuid_ != null) { output.writeMessage(1, getDeviceUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -14498,7 +14820,7 @@ public final class ContextOuterClass { if (deviceUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeviceUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -14518,7 +14840,7 @@ public final class ContextOuterClass { if (!getDeviceUuid().equals(other.getDeviceUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -14534,7 +14856,7 @@ public final class ContextOuterClass { hash = (37 * hash) + DEVICE_UUID_FIELD_NUMBER; hash = (53 * hash) + getDeviceUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -14632,26 +14954,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.DeviceId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (deviceUuidBuilder_ == null) { - deviceUuid_ = null; - } else { - deviceUuid_ = null; + bitField0_ = 0; + deviceUuid_ = null; + if (deviceUuidBuilder_ != null) { + deviceUuidBuilder_.dispose(); deviceUuidBuilder_ = null; } return this; @@ -14679,43 +14994,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.DeviceId buildPartial() { context.ContextOuterClass.DeviceId result = new context.ContextOuterClass.DeviceId(this); - if (deviceUuidBuilder_ == null) { - result.deviceUuid_ = deviceUuid_; - } else { - result.deviceUuid_ = deviceUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.DeviceId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.deviceUuid_ = deviceUuidBuilder_ == null ? deviceUuid_ : deviceUuidBuilder_.build(); + } } @java.lang.Override @@ -14734,7 +15024,7 @@ public final class ContextOuterClass { if (other.hasDeviceUuid()) { mergeDeviceUuid(other.getDeviceUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -14746,20 +15036,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.DeviceId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getDeviceUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Uuid deviceUuid_; private com.google.protobuf.SingleFieldBuilderV3 deviceUuidBuilder_; @@ -14769,7 +15086,7 @@ public final class ContextOuterClass { * @return Whether the deviceUuid field is set. */ public boolean hasDeviceUuid() { - return deviceUuidBuilder_ != null || deviceUuid_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -14793,10 +15110,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } deviceUuid_ = value; - onChanged(); } else { deviceUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14806,10 +15124,11 @@ public final class ContextOuterClass { public Builder setDeviceUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (deviceUuidBuilder_ == null) { deviceUuid_ = builderForValue.build(); - onChanged(); } else { deviceUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14818,15 +15137,16 @@ public final class ContextOuterClass { */ public Builder mergeDeviceUuid(context.ContextOuterClass.Uuid value) { if (deviceUuidBuilder_ == null) { - if (deviceUuid_ != null) { - deviceUuid_ = context.ContextOuterClass.Uuid.newBuilder(deviceUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && deviceUuid_ != null && deviceUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getDeviceUuidBuilder().mergeFrom(value); } else { deviceUuid_ = value; } - onChanged(); } else { deviceUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14834,13 +15154,13 @@ public final class ContextOuterClass { * .context.Uuid device_uuid = 1; */ public Builder clearDeviceUuid() { - if (deviceUuidBuilder_ == null) { - deviceUuid_ = null; - onChanged(); - } else { - deviceUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + deviceUuid_ = null; + if (deviceUuidBuilder_ != null) { + deviceUuidBuilder_.dispose(); deviceUuidBuilder_ = null; } + onChanged(); return this; } @@ -14848,6 +15168,7 @@ public final class ContextOuterClass { * .context.Uuid device_uuid = 1; */ public context.ContextOuterClass.Uuid.Builder getDeviceUuidBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getDeviceUuidFieldBuilder().getBuilder(); } @@ -14901,7 +15222,17 @@ public final class ContextOuterClass { @java.lang.Override public DeviceId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeviceId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -15153,154 +15484,6 @@ public final class ContextOuterClass { return new Device(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Device(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.DeviceId.Builder subBuilder = null; - if (deviceId_ != null) { - subBuilder = deviceId_.toBuilder(); - } - deviceId_ = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deviceId_); - deviceId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - deviceType_ = s; - break; - } - case 34: - { - context.ContextOuterClass.DeviceConfig.Builder subBuilder = null; - if (deviceConfig_ != null) { - subBuilder = deviceConfig_.toBuilder(); - } - deviceConfig_ = input.readMessage(context.ContextOuterClass.DeviceConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deviceConfig_); - deviceConfig_ = subBuilder.buildPartial(); - } - break; - } - case 40: - { - int rawValue = input.readEnum(); - deviceOperationalStatus_ = rawValue; - break; - } - case 48: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deviceDrivers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - deviceDrivers_.add(rawValue); - break; - } - case 50: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deviceDrivers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - deviceDrivers_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - deviceEndpoints_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - deviceEndpoints_.add(input.readMessage(context.ContextOuterClass.EndPoint.parser(), extensionRegistry)); - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - components_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - components_.add(input.readMessage(context.ContextOuterClass.Component.parser(), extensionRegistry)); - break; - } - case 74: - { - context.ContextOuterClass.DeviceId.Builder subBuilder = null; - if (controllerId_ != null) { - subBuilder = controllerId_.toBuilder(); - } - controllerId_ = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(controllerId_); - controllerId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deviceDrivers_ = java.util.Collections.unmodifiableList(deviceDrivers_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - deviceEndpoints_ = java.util.Collections.unmodifiableList(deviceEndpoints_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - components_ = java.util.Collections.unmodifiableList(components_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Device_descriptor; } @@ -15337,12 +15520,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; } public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * string name = 2; @@ -15379,7 +15563,8 @@ public final class ContextOuterClass { public static final int DEVICE_TYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object deviceType_; + @SuppressWarnings("serial") + private volatile java.lang.Object deviceType_ = ""; /** * string device_type = 3; @@ -15441,12 +15626,12 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { - return getDeviceConfig(); + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; } public static final int DEVICE_OPERATIONAL_STATUS_FIELD_NUMBER = 5; - private int deviceOperationalStatus_; + private int deviceOperationalStatus_ = 0; /** * .context.DeviceOperationalStatusEnum device_operational_status = 5; @@ -15463,20 +15648,19 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.valueOf(deviceOperationalStatus_); + context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.forNumber(deviceOperationalStatus_); return result == null ? context.ContextOuterClass.DeviceOperationalStatusEnum.UNRECOGNIZED : result; } public static final int DEVICE_DRIVERS_FIELD_NUMBER = 6; + @SuppressWarnings("serial") private java.util.List deviceDrivers_; private static final com.google.protobuf.Internal.ListAdapter.Converter deviceDrivers_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter() { public context.ContextOuterClass.DeviceDriverEnum convert(java.lang.Integer from) { - @SuppressWarnings("deprecation") - context.ContextOuterClass.DeviceDriverEnum result = context.ContextOuterClass.DeviceDriverEnum.valueOf(from); + context.ContextOuterClass.DeviceDriverEnum result = context.ContextOuterClass.DeviceDriverEnum.forNumber(from); return result == null ? context.ContextOuterClass.DeviceDriverEnum.UNRECOGNIZED : result; } }; @@ -15532,6 +15716,7 @@ public final class ContextOuterClass { public static final int DEVICE_ENDPOINTS_FIELD_NUMBER = 7; + @SuppressWarnings("serial") private java.util.List deviceEndpoints_; /** @@ -15576,6 +15761,7 @@ public final class ContextOuterClass { public static final int COMPONENTS_FIELD_NUMBER = 8; + @SuppressWarnings("serial") private java.util.List components_; /** @@ -15677,7 +15863,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder() { - return getControllerId(); + return controllerId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; } private byte memoizedIsInitialized = -1; @@ -15699,10 +15885,10 @@ public final class ContextOuterClass { if (deviceId_ != null) { output.writeMessage(1, getDeviceId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } - if (!getDeviceTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceType_); } if (deviceConfig_ != null) { @@ -15727,7 +15913,7 @@ public final class ContextOuterClass { if (controllerId_ != null) { output.writeMessage(9, getControllerId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -15739,10 +15925,10 @@ public final class ContextOuterClass { if (deviceId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeviceId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } - if (!getDeviceTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceType_); } if (deviceConfig_ != null) { @@ -15772,7 +15958,7 @@ public final class ContextOuterClass { if (controllerId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getControllerId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -15816,7 +16002,7 @@ public final class ContextOuterClass { if (!getControllerId().equals(other.getControllerId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -15858,7 +16044,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTROLLER_ID_FIELD_NUMBER; hash = (53 * hash) + getControllerId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -15952,57 +16138,48 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Device.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDeviceEndpointsFieldBuilder(); - getComponentsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (deviceIdBuilder_ == null) { - deviceId_ = null; - } else { - deviceId_ = null; + bitField0_ = 0; + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); deviceIdBuilder_ = null; } name_ = ""; deviceType_ = ""; - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - } else { - deviceConfig_ = null; + deviceConfig_ = null; + if (deviceConfigBuilder_ != null) { + deviceConfigBuilder_.dispose(); deviceConfigBuilder_ = null; } deviceOperationalStatus_ = 0; deviceDrivers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000020); if (deviceEndpointsBuilder_ == null) { deviceEndpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + deviceEndpoints_ = null; deviceEndpointsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); if (componentsBuilder_ == null) { components_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + components_ = null; componentsBuilder_.clear(); } - if (controllerIdBuilder_ == null) { - controllerId_ = null; - } else { - controllerId_ = null; + bitField0_ = (bitField0_ & ~0x00000080); + controllerId_ = null; + if (controllerIdBuilder_ != null) { + controllerIdBuilder_.dispose(); controllerIdBuilder_ = null; } return this; @@ -16030,80 +16207,60 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Device buildPartial() { context.ContextOuterClass.Device result = new context.ContextOuterClass.Device(this); - int from_bitField0_ = bitField0_; - if (deviceIdBuilder_ == null) { - result.deviceId_ = deviceId_; - } else { - result.deviceId_ = deviceIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.name_ = name_; - result.deviceType_ = deviceType_; - if (deviceConfigBuilder_ == null) { - result.deviceConfig_ = deviceConfig_; - } else { - result.deviceConfig_ = deviceConfigBuilder_.build(); - } - result.deviceOperationalStatus_ = deviceOperationalStatus_; - if (((bitField0_ & 0x00000001) != 0)) { + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.Device result) { + if (((bitField0_ & 0x00000020) != 0)) { deviceDrivers_ = java.util.Collections.unmodifiableList(deviceDrivers_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000020); } result.deviceDrivers_ = deviceDrivers_; if (deviceEndpointsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { deviceEndpoints_ = java.util.Collections.unmodifiableList(deviceEndpoints_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); } result.deviceEndpoints_ = deviceEndpoints_; } else { result.deviceEndpoints_ = deviceEndpointsBuilder_.build(); } if (componentsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { components_ = java.util.Collections.unmodifiableList(components_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000080); } result.components_ = components_; } else { result.components_ = componentsBuilder_.build(); } - if (controllerIdBuilder_ == null) { - result.controllerId_ = controllerId_; - } else { - result.controllerId_ = controllerIdBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); } - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Device result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.deviceId_ = deviceIdBuilder_ == null ? deviceId_ : deviceIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deviceType_ = deviceType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.deviceConfig_ = deviceConfigBuilder_ == null ? deviceConfig_ : deviceConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.deviceOperationalStatus_ = deviceOperationalStatus_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.controllerId_ = controllerIdBuilder_ == null ? controllerId_ : controllerIdBuilder_.build(); + } } @java.lang.Override @@ -16124,10 +16281,12 @@ public final class ContextOuterClass { } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getDeviceType().isEmpty()) { deviceType_ = other.deviceType_; + bitField0_ |= 0x00000004; onChanged(); } if (other.hasDeviceConfig()) { @@ -16139,7 +16298,7 @@ public final class ContextOuterClass { if (!other.deviceDrivers_.isEmpty()) { if (deviceDrivers_.isEmpty()) { deviceDrivers_ = other.deviceDrivers_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000020); } else { ensureDeviceDriversIsMutable(); deviceDrivers_.addAll(other.deviceDrivers_); @@ -16150,7 +16309,7 @@ public final class ContextOuterClass { if (!other.deviceEndpoints_.isEmpty()) { if (deviceEndpoints_.isEmpty()) { deviceEndpoints_ = other.deviceEndpoints_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); } else { ensureDeviceEndpointsIsMutable(); deviceEndpoints_.addAll(other.deviceEndpoints_); @@ -16163,7 +16322,7 @@ public final class ContextOuterClass { deviceEndpointsBuilder_.dispose(); deviceEndpointsBuilder_ = null; deviceEndpoints_ = other.deviceEndpoints_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); deviceEndpointsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceEndpointsFieldBuilder() : null; } else { deviceEndpointsBuilder_.addAllMessages(other.deviceEndpoints_); @@ -16174,7 +16333,7 @@ public final class ContextOuterClass { if (!other.components_.isEmpty()) { if (components_.isEmpty()) { components_ = other.components_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000080); } else { ensureComponentsIsMutable(); components_.addAll(other.components_); @@ -16187,7 +16346,7 @@ public final class ContextOuterClass { componentsBuilder_.dispose(); componentsBuilder_ = null; components_ = other.components_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000080); componentsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getComponentsFieldBuilder() : null; } else { componentsBuilder_.addAllMessages(other.components_); @@ -16197,7 +16356,7 @@ public final class ContextOuterClass { if (other.hasControllerId()) { mergeControllerId(other.getControllerId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -16209,17 +16368,122 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Device parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getDeviceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + deviceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + input.readMessage(getDeviceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } + // case 34 + case 40: + { + deviceOperationalStatus_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } + // case 40 + case 48: + { + int tmpRaw = input.readEnum(); + ensureDeviceDriversIsMutable(); + deviceDrivers_.add(tmpRaw); + break; + } + // case 48 + case 50: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureDeviceDriversIsMutable(); + deviceDrivers_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } + // case 50 + case 58: + { + context.ContextOuterClass.EndPoint m = input.readMessage(context.ContextOuterClass.EndPoint.parser(), extensionRegistry); + if (deviceEndpointsBuilder_ == null) { + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.add(m); + } else { + deviceEndpointsBuilder_.addMessage(m); + } + break; + } + // case 58 + case 66: + { + context.ContextOuterClass.Component m = input.readMessage(context.ContextOuterClass.Component.parser(), extensionRegistry); + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(m); + } else { + componentsBuilder_.addMessage(m); + } + break; + } + // case 66 + case 74: + { + input.readMessage(getControllerIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } + // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Device) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -16234,7 +16498,7 @@ public final class ContextOuterClass { * @return Whether the deviceId field is set. */ public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -16258,10 +16522,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } deviceId_ = value; - onChanged(); } else { deviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -16271,10 +16536,11 @@ public final class ContextOuterClass { public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { if (deviceIdBuilder_ == null) { deviceId_ = builderForValue.build(); - onChanged(); } else { deviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -16283,15 +16549,16 @@ public final class ContextOuterClass { */ public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && deviceId_ != null && deviceId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) { + getDeviceIdBuilder().mergeFrom(value); } else { deviceId_ = value; } - onChanged(); } else { deviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -16299,13 +16566,13 @@ public final class ContextOuterClass { * .context.DeviceId device_id = 1; */ public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); deviceIdBuilder_ = null; } + onChanged(); return this; } @@ -16313,6 +16580,7 @@ public final class ContextOuterClass { * .context.DeviceId device_id = 1; */ public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getDeviceIdFieldBuilder().getBuilder(); } @@ -16382,6 +16650,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -16392,6 +16661,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -16407,6 +16677,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -16454,6 +16725,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } deviceType_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -16464,6 +16736,7 @@ public final class ContextOuterClass { */ public Builder clearDeviceType() { deviceType_ = getDefaultInstance().getDeviceType(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -16479,6 +16752,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); deviceType_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -16492,7 +16766,7 @@ public final class ContextOuterClass { * @return Whether the deviceConfig field is set. */ public boolean hasDeviceConfig() { - return deviceConfigBuilder_ != null || deviceConfig_ != null; + return ((bitField0_ & 0x00000008) != 0); } /** @@ -16516,10 +16790,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } deviceConfig_ = value; - onChanged(); } else { deviceConfigBuilder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -16529,10 +16804,11 @@ public final class ContextOuterClass { public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig.Builder builderForValue) { if (deviceConfigBuilder_ == null) { deviceConfig_ = builderForValue.build(); - onChanged(); } else { deviceConfigBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -16541,15 +16817,16 @@ public final class ContextOuterClass { */ public Builder mergeDeviceConfig(context.ContextOuterClass.DeviceConfig value) { if (deviceConfigBuilder_ == null) { - if (deviceConfig_ != null) { - deviceConfig_ = context.ContextOuterClass.DeviceConfig.newBuilder(deviceConfig_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000008) != 0) && deviceConfig_ != null && deviceConfig_ != context.ContextOuterClass.DeviceConfig.getDefaultInstance()) { + getDeviceConfigBuilder().mergeFrom(value); } else { deviceConfig_ = value; } - onChanged(); } else { deviceConfigBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -16557,13 +16834,13 @@ public final class ContextOuterClass { * .context.DeviceConfig device_config = 4; */ public Builder clearDeviceConfig() { - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - onChanged(); - } else { - deviceConfig_ = null; + bitField0_ = (bitField0_ & ~0x00000008); + deviceConfig_ = null; + if (deviceConfigBuilder_ != null) { + deviceConfigBuilder_.dispose(); deviceConfigBuilder_ = null; } + onChanged(); return this; } @@ -16571,6 +16848,7 @@ public final class ContextOuterClass { * .context.DeviceConfig device_config = 4; */ public context.ContextOuterClass.DeviceConfig.Builder getDeviceConfigBuilder() { + bitField0_ |= 0x00000008; onChanged(); return getDeviceConfigFieldBuilder().getBuilder(); } @@ -16615,6 +16893,7 @@ public final class ContextOuterClass { */ public Builder setDeviceOperationalStatusValue(int value) { deviceOperationalStatus_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -16625,8 +16904,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.valueOf(deviceOperationalStatus_); + context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.forNumber(deviceOperationalStatus_); return result == null ? context.ContextOuterClass.DeviceOperationalStatusEnum.UNRECOGNIZED : result; } @@ -16639,6 +16917,7 @@ public final class ContextOuterClass { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000010; deviceOperationalStatus_ = value.getNumber(); onChanged(); return this; @@ -16649,6 +16928,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearDeviceOperationalStatus() { + bitField0_ = (bitField0_ & ~0x00000010); deviceOperationalStatus_ = 0; onChanged(); return this; @@ -16657,9 +16937,9 @@ public final class ContextOuterClass { private java.util.List deviceDrivers_ = java.util.Collections.emptyList(); private void ensureDeviceDriversIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000020) != 0)) { deviceDrivers_ = new java.util.ArrayList(deviceDrivers_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000020; } } @@ -16739,7 +17019,7 @@ public final class ContextOuterClass { */ public Builder clearDeviceDrivers() { deviceDrivers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -16763,8 +17043,8 @@ public final class ContextOuterClass { /** * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of deviceDrivers at the given index. + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for deviceDrivers to set. * @return This builder for chaining. */ public Builder setDeviceDriversValue(int index, int value) { @@ -16803,9 +17083,9 @@ public final class ContextOuterClass { private java.util.List deviceEndpoints_ = java.util.Collections.emptyList(); private void ensureDeviceEndpointsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000040) != 0)) { deviceEndpoints_ = new java.util.ArrayList(deviceEndpoints_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000040; } } @@ -16957,7 +17237,7 @@ public final class ContextOuterClass { public Builder clearDeviceEndpoints() { if (deviceEndpointsBuilder_ == null) { deviceEndpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { deviceEndpointsBuilder_.clear(); @@ -17031,7 +17311,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3 getDeviceEndpointsFieldBuilder() { if (deviceEndpointsBuilder_ == null) { - deviceEndpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceEndpoints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + deviceEndpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceEndpoints_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); deviceEndpoints_ = null; } return deviceEndpointsBuilder_; @@ -17040,9 +17320,9 @@ public final class ContextOuterClass { private java.util.List components_ = java.util.Collections.emptyList(); private void ensureComponentsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000080) != 0)) { components_ = new java.util.ArrayList(components_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000080; } } @@ -17238,7 +17518,7 @@ public final class ContextOuterClass { public Builder clearComponents() { if (componentsBuilder_ == null) { components_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); } else { componentsBuilder_.clear(); @@ -17340,7 +17620,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3 getComponentsFieldBuilder() { if (componentsBuilder_ == null) { - componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(components_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(components_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); components_ = null; } return componentsBuilder_; @@ -17359,7 +17639,7 @@ public final class ContextOuterClass { * @return Whether the controllerId field is set. */ public boolean hasControllerId() { - return controllerIdBuilder_ != null || controllerId_ != null; + return ((bitField0_ & 0x00000100) != 0); } /** @@ -17391,10 +17671,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } controllerId_ = value; - onChanged(); } else { controllerIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -17408,10 +17689,11 @@ public final class ContextOuterClass { public Builder setControllerId(context.ContextOuterClass.DeviceId.Builder builderForValue) { if (controllerIdBuilder_ == null) { controllerId_ = builderForValue.build(); - onChanged(); } else { controllerIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -17424,15 +17706,16 @@ public final class ContextOuterClass { */ public Builder mergeControllerId(context.ContextOuterClass.DeviceId value) { if (controllerIdBuilder_ == null) { - if (controllerId_ != null) { - controllerId_ = context.ContextOuterClass.DeviceId.newBuilder(controllerId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000100) != 0) && controllerId_ != null && controllerId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) { + getControllerIdBuilder().mergeFrom(value); } else { controllerId_ = value; } - onChanged(); } else { controllerIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -17444,13 +17727,13 @@ public final class ContextOuterClass { * .context.DeviceId controller_id = 9; */ public Builder clearControllerId() { - if (controllerIdBuilder_ == null) { - controllerId_ = null; - onChanged(); - } else { - controllerId_ = null; + bitField0_ = (bitField0_ & ~0x00000100); + controllerId_ = null; + if (controllerIdBuilder_ != null) { + controllerIdBuilder_.dispose(); controllerIdBuilder_ = null; } + onChanged(); return this; } @@ -17462,6 +17745,7 @@ public final class ContextOuterClass { * .context.DeviceId controller_id = 9; */ public context.ContextOuterClass.DeviceId.Builder getControllerIdBuilder() { + bitField0_ |= 0x00000100; onChanged(); return getControllerIdFieldBuilder().getBuilder(); } @@ -17523,7 +17807,17 @@ public final class ContextOuterClass { @java.lang.Override public Device parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Device(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -17626,7 +17920,9 @@ public final class ContextOuterClass { * * map<string, string> attributes = 4; */ - java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue); + /* nullable */ + java.lang.String getAttributesOrDefault(java.lang.String key, /* nullable */ + java.lang.String defaultValue); /** *
@@ -17679,86 +17975,6 @@ public final class ContextOuterClass {
             return new Component();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Component(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Uuid.Builder subBuilder = null;
-                                if (componentUuid_ != null) {
-                                    subBuilder = componentUuid_.toBuilder();
-                                }
-                                componentUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(componentUuid_);
-                                    componentUuid_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                name_ = s;
-                                break;
-                            }
-                        case 26:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                type_ = s;
-                                break;
-                            }
-                        case 34:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    attributes_ = com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry);
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                com.google.protobuf.MapEntry attributes__ = input.readMessage(AttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
-                                attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue());
-                                break;
-                            }
-                        case 42:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                parent_ = s;
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Component_descriptor;
         }
@@ -17806,12 +18022,13 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder() {
-            return getComponentUuid();
+            return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_;
         }
 
         public static final int NAME_FIELD_NUMBER = 2;
 
-        private volatile java.lang.Object name_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object name_ = "";
 
         /**
          * string name = 2;
@@ -17848,7 +18065,8 @@ public final class ContextOuterClass {
 
         public static final int TYPE_FIELD_NUMBER = 3;
 
-        private volatile java.lang.Object type_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object type_ = "";
 
         /**
          * string type = 3;
@@ -17890,6 +18108,7 @@ public final class ContextOuterClass {
             static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance(context.ContextOuterClass.internal_static_context_Component_AttributesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, "");
         }
 
+        @SuppressWarnings("serial")
         private com.google.protobuf.MapField attributes_;
 
         private com.google.protobuf.MapField internalGetAttributes() {
@@ -17913,7 +18132,7 @@ public final class ContextOuterClass {
         @java.lang.Override
         public boolean containsAttributes(java.lang.String key) {
             if (key == null) {
-                throw new java.lang.NullPointerException();
+                throw new NullPointerException("map key");
             }
             return internalGetAttributes().getMap().containsKey(key);
         }
@@ -17947,9 +18166,11 @@ public final class ContextOuterClass {
          * map<string, string> attributes = 4;
          */
         @java.lang.Override
-        public java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue) {
+        public /* nullable */
+        java.lang.String getAttributesOrDefault(java.lang.String key, /* nullable */
+        java.lang.String defaultValue) {
             if (key == null) {
-                throw new java.lang.NullPointerException();
+                throw new NullPointerException("map key");
             }
             java.util.Map map = internalGetAttributes().getMap();
             return map.containsKey(key) ? map.get(key) : defaultValue;
@@ -17965,7 +18186,7 @@ public final class ContextOuterClass {
         @java.lang.Override
         public java.lang.String getAttributesOrThrow(java.lang.String key) {
             if (key == null) {
-                throw new java.lang.NullPointerException();
+                throw new NullPointerException("map key");
             }
             java.util.Map map = internalGetAttributes().getMap();
             if (!map.containsKey(key)) {
@@ -17976,7 +18197,8 @@ public final class ContextOuterClass {
 
         public static final int PARENT_FIELD_NUMBER = 5;
 
-        private volatile java.lang.Object parent_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object parent_ = "";
 
         /**
          * string parent = 5;
@@ -18029,17 +18251,17 @@ public final class ContextOuterClass {
             if (componentUuid_ != null) {
                 output.writeMessage(1, getComponentUuid());
             }
-            if (!getNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
             }
-            if (!getTypeBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_);
             }
             com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 4);
-            if (!getParentBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -18051,20 +18273,20 @@ public final class ContextOuterClass {
             if (componentUuid_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getComponentUuid());
             }
-            if (!getNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
             }
-            if (!getTypeBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_);
             }
             for (java.util.Map.Entry entry : internalGetAttributes().getMap().entrySet()) {
                 com.google.protobuf.MapEntry attributes__ = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType().setKey(entry.getKey()).setValue(entry.getValue()).build();
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, attributes__);
             }
-            if (!getParentBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -18092,7 +18314,7 @@ public final class ContextOuterClass {
                 return false;
             if (!getParent().equals(other.getParent()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -18118,7 +18340,7 @@ public final class ContextOuterClass {
             }
             hash = (37 * hash) + PARENT_FIELD_NUMBER;
             hash = (53 * hash) + getParent().hashCode();
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -18236,26 +18458,19 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Component.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (componentUuidBuilder_ == null) {
-                    componentUuid_ = null;
-                } else {
-                    componentUuid_ = null;
+                bitField0_ = 0;
+                componentUuid_ = null;
+                if (componentUuidBuilder_ != null) {
+                    componentUuidBuilder_.dispose();
                     componentUuidBuilder_ = null;
                 }
                 name_ = "";
@@ -18287,49 +18502,31 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Component buildPartial() {
                 context.ContextOuterClass.Component result = new context.ContextOuterClass.Component(this);
-                int from_bitField0_ = bitField0_;
-                if (componentUuidBuilder_ == null) {
-                    result.componentUuid_ = componentUuid_;
-                } else {
-                    result.componentUuid_ = componentUuidBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.name_ = name_;
-                result.type_ = type_;
-                result.attributes_ = internalGetAttributes();
-                result.attributes_.makeImmutable();
-                result.parent_ = parent_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.Component result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.componentUuid_ = componentUuidBuilder_ == null ? componentUuid_ : componentUuidBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.name_ = name_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.type_ = type_;
+                }
+                if (((from_bitField0_ & 0x00000008) != 0)) {
+                    result.attributes_ = internalGetAttributes();
+                    result.attributes_.makeImmutable();
+                }
+                if (((from_bitField0_ & 0x00000010) != 0)) {
+                    result.parent_ = parent_;
+                }
             }
 
             @java.lang.Override
@@ -18350,18 +18547,22 @@ public final class ContextOuterClass {
                 }
                 if (!other.getName().isEmpty()) {
                     name_ = other.name_;
+                    bitField0_ |= 0x00000002;
                     onChanged();
                 }
                 if (!other.getType().isEmpty()) {
                     type_ = other.type_;
+                    bitField0_ |= 0x00000004;
                     onChanged();
                 }
                 internalGetMutableAttributes().mergeFrom(other.internalGetAttributes());
+                bitField0_ |= 0x00000008;
                 if (!other.getParent().isEmpty()) {
                     parent_ = other.parent_;
+                    bitField0_ |= 0x00000010;
                     onChanged();
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -18373,17 +18574,71 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Component parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getComponentUuidFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    name_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    type_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 26
+                            case 34:
+                                {
+                                    com.google.protobuf.MapEntry attributes__ = input.readMessage(AttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+                                    internalGetMutableAttributes().getMutableMap().put(attributes__.getKey(), attributes__.getValue());
+                                    bitField0_ |= 0x00000008;
+                                    break;
+                                }
+                            // case 34
+                            case 42:
+                                {
+                                    parent_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000010;
+                                    break;
+                                }
+                            // case 42
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Component) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -18398,7 +18653,7 @@ public final class ContextOuterClass {
              * @return Whether the componentUuid field is set.
              */
             public boolean hasComponentUuid() {
-                return componentUuidBuilder_ != null || componentUuid_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -18422,10 +18677,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     componentUuid_ = value;
-                    onChanged();
                 } else {
                     componentUuidBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -18435,10 +18691,11 @@ public final class ContextOuterClass {
             public Builder setComponentUuid(context.ContextOuterClass.Uuid.Builder builderForValue) {
                 if (componentUuidBuilder_ == null) {
                     componentUuid_ = builderForValue.build();
-                    onChanged();
                 } else {
                     componentUuidBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -18447,15 +18704,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeComponentUuid(context.ContextOuterClass.Uuid value) {
                 if (componentUuidBuilder_ == null) {
-                    if (componentUuid_ != null) {
-                        componentUuid_ = context.ContextOuterClass.Uuid.newBuilder(componentUuid_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && componentUuid_ != null && componentUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) {
+                        getComponentUuidBuilder().mergeFrom(value);
                     } else {
                         componentUuid_ = value;
                     }
-                    onChanged();
                 } else {
                     componentUuidBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -18463,13 +18721,13 @@ public final class ContextOuterClass {
              * .context.Uuid component_uuid = 1;
              */
             public Builder clearComponentUuid() {
-                if (componentUuidBuilder_ == null) {
-                    componentUuid_ = null;
-                    onChanged();
-                } else {
-                    componentUuid_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                componentUuid_ = null;
+                if (componentUuidBuilder_ != null) {
+                    componentUuidBuilder_.dispose();
                     componentUuidBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -18477,6 +18735,7 @@ public final class ContextOuterClass {
              * .context.Uuid component_uuid = 1;
              */
             public context.ContextOuterClass.Uuid.Builder getComponentUuidBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getComponentUuidFieldBuilder().getBuilder();
             }
@@ -18546,6 +18805,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 name_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -18556,6 +18816,7 @@ public final class ContextOuterClass {
              */
             public Builder clearName() {
                 name_ = getDefaultInstance().getName();
+                bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
             }
@@ -18571,6 +18832,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 name_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -18618,6 +18880,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 type_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -18628,6 +18891,7 @@ public final class ContextOuterClass {
              */
             public Builder clearType() {
                 type_ = getDefaultInstance().getType();
+                bitField0_ = (bitField0_ & ~0x00000004);
                 onChanged();
                 return this;
             }
@@ -18643,6 +18907,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 type_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -18657,14 +18922,14 @@ public final class ContextOuterClass {
             }
 
             private com.google.protobuf.MapField internalGetMutableAttributes() {
-                onChanged();
-                ;
                 if (attributes_ == null) {
                     attributes_ = com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry);
                 }
                 if (!attributes_.isMutable()) {
                     attributes_ = attributes_.copy();
                 }
+                bitField0_ |= 0x00000008;
+                onChanged();
                 return attributes_;
             }
 
@@ -18682,7 +18947,7 @@ public final class ContextOuterClass {
             @java.lang.Override
             public boolean containsAttributes(java.lang.String key) {
                 if (key == null) {
-                    throw new java.lang.NullPointerException();
+                    throw new NullPointerException("map key");
                 }
                 return internalGetAttributes().getMap().containsKey(key);
             }
@@ -18716,9 +18981,11 @@ public final class ContextOuterClass {
              * map<string, string> attributes = 4;
              */
             @java.lang.Override
-            public java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue) {
+            public /* nullable */
+            java.lang.String getAttributesOrDefault(java.lang.String key, /* nullable */
+            java.lang.String defaultValue) {
                 if (key == null) {
-                    throw new java.lang.NullPointerException();
+                    throw new NullPointerException("map key");
                 }
                 java.util.Map map = internalGetAttributes().getMap();
                 return map.containsKey(key) ? map.get(key) : defaultValue;
@@ -18734,7 +19001,7 @@ public final class ContextOuterClass {
             @java.lang.Override
             public java.lang.String getAttributesOrThrow(java.lang.String key) {
                 if (key == null) {
-                    throw new java.lang.NullPointerException();
+                    throw new NullPointerException("map key");
                 }
                 java.util.Map map = internalGetAttributes().getMap();
                 if (!map.containsKey(key)) {
@@ -18744,6 +19011,7 @@ public final class ContextOuterClass {
             }
 
             public Builder clearAttributes() {
+                bitField0_ = (bitField0_ & ~0x00000008);
                 internalGetMutableAttributes().getMutableMap().clear();
                 return this;
             }
@@ -18757,7 +19025,7 @@ public final class ContextOuterClass {
              */
             public Builder removeAttributes(java.lang.String key) {
                 if (key == null) {
-                    throw new java.lang.NullPointerException();
+                    throw new NullPointerException("map key");
                 }
                 internalGetMutableAttributes().getMutableMap().remove(key);
                 return this;
@@ -18768,6 +19036,7 @@ public final class ContextOuterClass {
              */
             @java.lang.Deprecated
             public java.util.Map getMutableAttributes() {
+                bitField0_ |= 0x00000008;
                 return internalGetMutableAttributes().getMutableMap();
             }
 
@@ -18780,12 +19049,13 @@ public final class ContextOuterClass {
              */
             public Builder putAttributes(java.lang.String key, java.lang.String value) {
                 if (key == null) {
-                    throw new java.lang.NullPointerException();
+                    throw new NullPointerException("map key");
                 }
                 if (value == null) {
-                    throw new java.lang.NullPointerException();
+                    throw new NullPointerException("map value");
                 }
                 internalGetMutableAttributes().getMutableMap().put(key, value);
+                bitField0_ |= 0x00000008;
                 return this;
             }
 
@@ -18798,6 +19068,7 @@ public final class ContextOuterClass {
              */
             public Builder putAllAttributes(java.util.Map values) {
                 internalGetMutableAttributes().getMutableMap().putAll(values);
+                bitField0_ |= 0x00000008;
                 return this;
             }
 
@@ -18844,6 +19115,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 parent_ = value;
+                bitField0_ |= 0x00000010;
                 onChanged();
                 return this;
             }
@@ -18854,6 +19126,7 @@ public final class ContextOuterClass {
              */
             public Builder clearParent() {
                 parent_ = getDefaultInstance().getParent();
+                bitField0_ = (bitField0_ & ~0x00000010);
                 onChanged();
                 return this;
             }
@@ -18869,6 +19142,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 parent_ = value;
+                bitField0_ |= 0x00000010;
                 onChanged();
                 return this;
             }
@@ -18900,7 +19174,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Component parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Component(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -18971,57 +19255,6 @@ public final class ContextOuterClass {
             return new DeviceConfig();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private DeviceConfig(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    configRules_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                configRules_.add(input.readMessage(context.ContextOuterClass.ConfigRule.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    configRules_ = java.util.Collections.unmodifiableList(configRules_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_DeviceConfig_descriptor;
         }
@@ -19033,6 +19266,7 @@ public final class ContextOuterClass {
 
         public static final int CONFIG_RULES_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List configRules_;
 
         /**
@@ -19093,7 +19327,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < configRules_.size(); i++) {
                 output.writeMessage(1, configRules_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -19105,7 +19339,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < configRules_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configRules_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -19121,7 +19355,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.DeviceConfig other = (context.ContextOuterClass.DeviceConfig) obj;
             if (!getConfigRulesList().equals(other.getConfigRulesList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -19137,7 +19371,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER;
                 hash = (53 * hash) + getConfigRulesList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -19231,29 +19465,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.DeviceConfig.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getConfigRulesFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (configRulesBuilder_ == null) {
                     configRules_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    configRules_ = null;
                     configRulesBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -19279,7 +19507,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.DeviceConfig buildPartial() {
                 context.ContextOuterClass.DeviceConfig result = new context.ContextOuterClass.DeviceConfig(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.DeviceConfig result) {
                 if (configRulesBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         configRules_ = java.util.Collections.unmodifiableList(configRules_);
@@ -19289,38 +19525,10 @@ public final class ContextOuterClass {
                 } else {
                     result.configRules_ = configRulesBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
             }
 
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.DeviceConfig result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -19360,7 +19568,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -19372,17 +19580,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.DeviceConfig parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.ConfigRule m = input.readMessage(context.ContextOuterClass.ConfigRule.parser(), extensionRegistry);
+                                    if (configRulesBuilder_ == null) {
+                                        ensureConfigRulesIsMutable();
+                                        configRules_.add(m);
+                                    } else {
+                                        configRulesBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.DeviceConfig) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -19652,7 +19890,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public DeviceConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new DeviceConfig(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -19723,57 +19971,6 @@ public final class ContextOuterClass {
             return new DeviceIdList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private DeviceIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    deviceIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                deviceIds_.add(input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_DeviceIdList_descriptor;
         }
@@ -19785,6 +19982,7 @@ public final class ContextOuterClass {
 
         public static final int DEVICE_IDS_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List deviceIds_;
 
         /**
@@ -19845,7 +20043,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < deviceIds_.size(); i++) {
                 output.writeMessage(1, deviceIds_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -19857,7 +20055,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < deviceIds_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, deviceIds_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -19873,7 +20071,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.DeviceIdList other = (context.ContextOuterClass.DeviceIdList) obj;
             if (!getDeviceIdsList().equals(other.getDeviceIdsList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -19889,7 +20087,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER;
                 hash = (53 * hash) + getDeviceIdsList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -19983,29 +20181,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.DeviceIdList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getDeviceIdsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (deviceIdsBuilder_ == null) {
                     deviceIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    deviceIds_ = null;
                     deviceIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -20031,7 +20223,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.DeviceIdList buildPartial() {
                 context.ContextOuterClass.DeviceIdList result = new context.ContextOuterClass.DeviceIdList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.DeviceIdList result) {
                 if (deviceIdsBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_);
@@ -20041,38 +20241,10 @@ public final class ContextOuterClass {
                 } else {
                     result.deviceIds_ = deviceIdsBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
             }
 
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.DeviceIdList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -20112,7 +20284,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -20124,17 +20296,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.DeviceIdList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.DeviceId m = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry);
+                                    if (deviceIdsBuilder_ == null) {
+                                        ensureDeviceIdsIsMutable();
+                                        deviceIds_.add(m);
+                                    } else {
+                                        deviceIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.DeviceIdList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -20404,7 +20606,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public DeviceIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new DeviceIdList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -20475,57 +20687,6 @@ public final class ContextOuterClass {
             return new DeviceList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private DeviceList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    devices_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                devices_.add(input.readMessage(context.ContextOuterClass.Device.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    devices_ = java.util.Collections.unmodifiableList(devices_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_DeviceList_descriptor;
         }
@@ -20537,6 +20698,7 @@ public final class ContextOuterClass {
 
         public static final int DEVICES_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List devices_;
 
         /**
@@ -20597,7 +20759,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < devices_.size(); i++) {
                 output.writeMessage(1, devices_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -20609,7 +20771,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < devices_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, devices_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -20625,7 +20787,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.DeviceList other = (context.ContextOuterClass.DeviceList) obj;
             if (!getDevicesList().equals(other.getDevicesList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -20641,7 +20803,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + DEVICES_FIELD_NUMBER;
                 hash = (53 * hash) + getDevicesList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -20735,29 +20897,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.DeviceList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getDevicesFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (devicesBuilder_ == null) {
                     devices_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    devices_ = null;
                     devicesBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -20783,7 +20939,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.DeviceList buildPartial() {
                 context.ContextOuterClass.DeviceList result = new context.ContextOuterClass.DeviceList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.DeviceList result) {
                 if (devicesBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         devices_ = java.util.Collections.unmodifiableList(devices_);
@@ -20793,38 +20957,10 @@ public final class ContextOuterClass {
                 } else {
                     result.devices_ = devicesBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
             }
 
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.DeviceList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -20864,7 +21000,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -20876,17 +21012,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.DeviceList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.Device m = input.readMessage(context.ContextOuterClass.Device.parser(), extensionRegistry);
+                                    if (devicesBuilder_ == null) {
+                                        ensureDevicesIsMutable();
+                                        devices_.add(m);
+                                    } else {
+                                        devicesBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.DeviceList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -21156,7 +21322,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public DeviceList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new DeviceList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -21236,72 +21412,6 @@ public final class ContextOuterClass {
             return new DeviceFilter();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private DeviceFilter(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.DeviceIdList.Builder subBuilder = null;
-                                if (deviceIds_ != null) {
-                                    subBuilder = deviceIds_.toBuilder();
-                                }
-                                deviceIds_ = input.readMessage(context.ContextOuterClass.DeviceIdList.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(deviceIds_);
-                                    deviceIds_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 16:
-                            {
-                                includeEndpoints_ = input.readBool();
-                                break;
-                            }
-                        case 24:
-                            {
-                                includeConfigRules_ = input.readBool();
-                                break;
-                            }
-                        case 32:
-                            {
-                                includeComponents_ = input.readBool();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_DeviceFilter_descriptor;
         }
@@ -21338,12 +21448,12 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder() {
-            return getDeviceIds();
+            return deviceIds_ == null ? context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_;
         }
 
         public static final int INCLUDE_ENDPOINTS_FIELD_NUMBER = 2;
 
-        private boolean includeEndpoints_;
+        private boolean includeEndpoints_ = false;
 
         /**
          * bool include_endpoints = 2;
@@ -21356,7 +21466,7 @@ public final class ContextOuterClass {
 
         public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 3;
 
-        private boolean includeConfigRules_;
+        private boolean includeConfigRules_ = false;
 
         /**
          * bool include_config_rules = 3;
@@ -21369,7 +21479,7 @@ public final class ContextOuterClass {
 
         public static final int INCLUDE_COMPONENTS_FIELD_NUMBER = 4;
 
-        private boolean includeComponents_;
+        private boolean includeComponents_ = false;
 
         /**
          * bool include_components = 4;
@@ -21407,7 +21517,7 @@ public final class ContextOuterClass {
             if (includeComponents_ != false) {
                 output.writeBool(4, includeComponents_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -21428,7 +21538,7 @@ public final class ContextOuterClass {
             if (includeComponents_ != false) {
                 size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includeComponents_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -21454,7 +21564,7 @@ public final class ContextOuterClass {
                 return false;
             if (getIncludeComponents() != other.getIncludeComponents())
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -21476,7 +21586,7 @@ public final class ContextOuterClass {
             hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeConfigRules());
             hash = (37 * hash) + INCLUDE_COMPONENTS_FIELD_NUMBER;
             hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeComponents());
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -21570,26 +21680,19 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.DeviceFilter.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (deviceIdsBuilder_ == null) {
-                    deviceIds_ = null;
-                } else {
-                    deviceIds_ = null;
+                bitField0_ = 0;
+                deviceIds_ = null;
+                if (deviceIdsBuilder_ != null) {
+                    deviceIdsBuilder_.dispose();
                     deviceIdsBuilder_ = null;
                 }
                 includeEndpoints_ = false;
@@ -21620,46 +21723,27 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.DeviceFilter buildPartial() {
                 context.ContextOuterClass.DeviceFilter result = new context.ContextOuterClass.DeviceFilter(this);
-                if (deviceIdsBuilder_ == null) {
-                    result.deviceIds_ = deviceIds_;
-                } else {
-                    result.deviceIds_ = deviceIdsBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.includeEndpoints_ = includeEndpoints_;
-                result.includeConfigRules_ = includeConfigRules_;
-                result.includeComponents_ = includeComponents_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.DeviceFilter result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.deviceIds_ = deviceIdsBuilder_ == null ? deviceIds_ : deviceIdsBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.includeEndpoints_ = includeEndpoints_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.includeConfigRules_ = includeConfigRules_;
+                }
+                if (((from_bitField0_ & 0x00000008) != 0)) {
+                    result.includeComponents_ = includeComponents_;
+                }
             }
 
             @java.lang.Override
@@ -21687,7 +21771,7 @@ public final class ContextOuterClass {
                 if (other.getIncludeComponents() != false) {
                     setIncludeComponents(other.getIncludeComponents());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -21699,20 +21783,68 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.DeviceFilter parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getDeviceIdsFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 16:
+                                {
+                                    includeEndpoints_ = input.readBool();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 16
+                            case 24:
+                                {
+                                    includeConfigRules_ = input.readBool();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 24
+                            case 32:
+                                {
+                                    includeComponents_ = input.readBool();
+                                    bitField0_ |= 0x00000008;
+                                    break;
+                                }
+                            // case 32
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.DeviceFilter) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.DeviceIdList deviceIds_;
 
             private com.google.protobuf.SingleFieldBuilderV3 deviceIdsBuilder_;
@@ -21722,7 +21854,7 @@ public final class ContextOuterClass {
              * @return Whether the deviceIds field is set.
              */
             public boolean hasDeviceIds() {
-                return deviceIdsBuilder_ != null || deviceIds_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -21746,10 +21878,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     deviceIds_ = value;
-                    onChanged();
                 } else {
                     deviceIdsBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -21759,10 +21892,11 @@ public final class ContextOuterClass {
             public Builder setDeviceIds(context.ContextOuterClass.DeviceIdList.Builder builderForValue) {
                 if (deviceIdsBuilder_ == null) {
                     deviceIds_ = builderForValue.build();
-                    onChanged();
                 } else {
                     deviceIdsBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -21771,15 +21905,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeDeviceIds(context.ContextOuterClass.DeviceIdList value) {
                 if (deviceIdsBuilder_ == null) {
-                    if (deviceIds_ != null) {
-                        deviceIds_ = context.ContextOuterClass.DeviceIdList.newBuilder(deviceIds_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && deviceIds_ != null && deviceIds_ != context.ContextOuterClass.DeviceIdList.getDefaultInstance()) {
+                        getDeviceIdsBuilder().mergeFrom(value);
                     } else {
                         deviceIds_ = value;
                     }
-                    onChanged();
                 } else {
                     deviceIdsBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -21787,13 +21922,13 @@ public final class ContextOuterClass {
              * .context.DeviceIdList device_ids = 1;
              */
             public Builder clearDeviceIds() {
-                if (deviceIdsBuilder_ == null) {
-                    deviceIds_ = null;
-                    onChanged();
-                } else {
-                    deviceIds_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                deviceIds_ = null;
+                if (deviceIdsBuilder_ != null) {
+                    deviceIdsBuilder_.dispose();
                     deviceIdsBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -21801,6 +21936,7 @@ public final class ContextOuterClass {
              * .context.DeviceIdList device_ids = 1;
              */
             public context.ContextOuterClass.DeviceIdList.Builder getDeviceIdsBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getDeviceIdsFieldBuilder().getBuilder();
             }
@@ -21845,6 +21981,7 @@ public final class ContextOuterClass {
              */
             public Builder setIncludeEndpoints(boolean value) {
                 includeEndpoints_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -21854,6 +21991,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearIncludeEndpoints() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 includeEndpoints_ = false;
                 onChanged();
                 return this;
@@ -21877,6 +22015,7 @@ public final class ContextOuterClass {
              */
             public Builder setIncludeConfigRules(boolean value) {
                 includeConfigRules_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -21886,6 +22025,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearIncludeConfigRules() {
+                bitField0_ = (bitField0_ & ~0x00000004);
                 includeConfigRules_ = false;
                 onChanged();
                 return this;
@@ -21909,6 +22049,7 @@ public final class ContextOuterClass {
              */
             public Builder setIncludeComponents(boolean value) {
                 includeComponents_ = value;
+                bitField0_ |= 0x00000008;
                 onChanged();
                 return this;
             }
@@ -21918,6 +22059,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearIncludeComponents() {
+                bitField0_ = (bitField0_ & ~0x00000008);
                 includeComponents_ = false;
                 onChanged();
                 return this;
@@ -21950,7 +22092,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public DeviceFilter parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new DeviceFilter(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -22046,83 +22198,6 @@ public final class ContextOuterClass {
             return new DeviceEvent();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private DeviceEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Event.Builder subBuilder = null;
-                                if (event_ != null) {
-                                    subBuilder = event_.toBuilder();
-                                }
-                                event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(event_);
-                                    event_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.DeviceId.Builder subBuilder = null;
-                                if (deviceId_ != null) {
-                                    subBuilder = deviceId_.toBuilder();
-                                }
-                                deviceId_ = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(deviceId_);
-                                    deviceId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 26:
-                            {
-                                context.ContextOuterClass.DeviceConfig.Builder subBuilder = null;
-                                if (deviceConfig_ != null) {
-                                    subBuilder = deviceConfig_.toBuilder();
-                                }
-                                deviceConfig_ = input.readMessage(context.ContextOuterClass.DeviceConfig.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(deviceConfig_);
-                                    deviceConfig_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_DeviceEvent_descriptor;
         }
@@ -22159,7 +22234,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() {
-            return getEvent();
+            return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_;
         }
 
         public static final int DEVICE_ID_FIELD_NUMBER = 2;
@@ -22189,7 +22264,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() {
-            return getDeviceId();
+            return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_;
         }
 
         public static final int DEVICE_CONFIG_FIELD_NUMBER = 3;
@@ -22219,7 +22294,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() {
-            return getDeviceConfig();
+            return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -22246,7 +22321,7 @@ public final class ContextOuterClass {
             if (deviceConfig_ != null) {
                 output.writeMessage(3, getDeviceConfig());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -22264,7 +22339,7 @@ public final class ContextOuterClass {
             if (deviceConfig_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDeviceConfig());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -22296,7 +22371,7 @@ public final class ContextOuterClass {
                 if (!getDeviceConfig().equals(other.getDeviceConfig()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -22320,7 +22395,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + DEVICE_CONFIG_FIELD_NUMBER;
                 hash = (53 * hash) + getDeviceConfig().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -22414,38 +22489,29 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.DeviceEvent.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (eventBuilder_ == null) {
-                    event_ = null;
-                } else {
-                    event_ = null;
+                bitField0_ = 0;
+                event_ = null;
+                if (eventBuilder_ != null) {
+                    eventBuilder_.dispose();
                     eventBuilder_ = null;
                 }
-                if (deviceIdBuilder_ == null) {
-                    deviceId_ = null;
-                } else {
-                    deviceId_ = null;
+                deviceId_ = null;
+                if (deviceIdBuilder_ != null) {
+                    deviceIdBuilder_.dispose();
                     deviceIdBuilder_ = null;
                 }
-                if (deviceConfigBuilder_ == null) {
-                    deviceConfig_ = null;
-                } else {
-                    deviceConfig_ = null;
+                deviceConfig_ = null;
+                if (deviceConfigBuilder_ != null) {
+                    deviceConfigBuilder_.dispose();
                     deviceConfigBuilder_ = null;
                 }
                 return this;
@@ -22473,53 +22539,24 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.DeviceEvent buildPartial() {
                 context.ContextOuterClass.DeviceEvent result = new context.ContextOuterClass.DeviceEvent(this);
-                if (eventBuilder_ == null) {
-                    result.event_ = event_;
-                } else {
-                    result.event_ = eventBuilder_.build();
-                }
-                if (deviceIdBuilder_ == null) {
-                    result.deviceId_ = deviceId_;
-                } else {
-                    result.deviceId_ = deviceIdBuilder_.build();
-                }
-                if (deviceConfigBuilder_ == null) {
-                    result.deviceConfig_ = deviceConfig_;
-                } else {
-                    result.deviceConfig_ = deviceConfigBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.DeviceEvent result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.deviceId_ = deviceIdBuilder_ == null ? deviceId_ : deviceIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.deviceConfig_ = deviceConfigBuilder_ == null ? deviceConfig_ : deviceConfigBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -22544,7 +22581,7 @@ public final class ContextOuterClass {
                 if (other.hasDeviceConfig()) {
                     mergeDeviceConfig(other.getDeviceConfig());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -22556,20 +22593,61 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.DeviceEvent parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getDeviceIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    input.readMessage(getDeviceConfigFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 26
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.DeviceEvent) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.Event event_;
 
             private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_;
@@ -22579,7 +22657,7 @@ public final class ContextOuterClass {
              * @return Whether the event field is set.
              */
             public boolean hasEvent() {
-                return eventBuilder_ != null || event_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -22603,10 +22681,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     event_ = value;
-                    onChanged();
                 } else {
                     eventBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -22616,10 +22695,11 @@ public final class ContextOuterClass {
             public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) {
                 if (eventBuilder_ == null) {
                     event_ = builderForValue.build();
-                    onChanged();
                 } else {
                     eventBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -22628,15 +22708,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeEvent(context.ContextOuterClass.Event value) {
                 if (eventBuilder_ == null) {
-                    if (event_ != null) {
-                        event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) {
+                        getEventBuilder().mergeFrom(value);
                     } else {
                         event_ = value;
                     }
-                    onChanged();
                 } else {
                     eventBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -22644,13 +22725,13 @@ public final class ContextOuterClass {
              * .context.Event event = 1;
              */
             public Builder clearEvent() {
-                if (eventBuilder_ == null) {
-                    event_ = null;
-                    onChanged();
-                } else {
-                    event_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                event_ = null;
+                if (eventBuilder_ != null) {
+                    eventBuilder_.dispose();
                     eventBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -22658,6 +22739,7 @@ public final class ContextOuterClass {
              * .context.Event event = 1;
              */
             public context.ContextOuterClass.Event.Builder getEventBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getEventFieldBuilder().getBuilder();
             }
@@ -22693,7 +22775,7 @@ public final class ContextOuterClass {
              * @return Whether the deviceId field is set.
              */
             public boolean hasDeviceId() {
-                return deviceIdBuilder_ != null || deviceId_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -22717,10 +22799,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     deviceId_ = value;
-                    onChanged();
                 } else {
                     deviceIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -22730,10 +22813,11 @@ public final class ContextOuterClass {
             public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) {
                 if (deviceIdBuilder_ == null) {
                     deviceId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     deviceIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -22742,15 +22826,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) {
                 if (deviceIdBuilder_ == null) {
-                    if (deviceId_ != null) {
-                        deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && deviceId_ != null && deviceId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) {
+                        getDeviceIdBuilder().mergeFrom(value);
                     } else {
                         deviceId_ = value;
                     }
-                    onChanged();
                 } else {
                     deviceIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -22758,13 +22843,13 @@ public final class ContextOuterClass {
              * .context.DeviceId device_id = 2;
              */
             public Builder clearDeviceId() {
-                if (deviceIdBuilder_ == null) {
-                    deviceId_ = null;
-                    onChanged();
-                } else {
-                    deviceId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                deviceId_ = null;
+                if (deviceIdBuilder_ != null) {
+                    deviceIdBuilder_.dispose();
                     deviceIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -22772,6 +22857,7 @@ public final class ContextOuterClass {
              * .context.DeviceId device_id = 2;
              */
             public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getDeviceIdFieldBuilder().getBuilder();
             }
@@ -22807,7 +22893,7 @@ public final class ContextOuterClass {
              * @return Whether the deviceConfig field is set.
              */
             public boolean hasDeviceConfig() {
-                return deviceConfigBuilder_ != null || deviceConfig_ != null;
+                return ((bitField0_ & 0x00000004) != 0);
             }
 
             /**
@@ -22831,10 +22917,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     deviceConfig_ = value;
-                    onChanged();
                 } else {
                     deviceConfigBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -22844,10 +22931,11 @@ public final class ContextOuterClass {
             public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig.Builder builderForValue) {
                 if (deviceConfigBuilder_ == null) {
                     deviceConfig_ = builderForValue.build();
-                    onChanged();
                 } else {
                     deviceConfigBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -22856,15 +22944,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeDeviceConfig(context.ContextOuterClass.DeviceConfig value) {
                 if (deviceConfigBuilder_ == null) {
-                    if (deviceConfig_ != null) {
-                        deviceConfig_ = context.ContextOuterClass.DeviceConfig.newBuilder(deviceConfig_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000004) != 0) && deviceConfig_ != null && deviceConfig_ != context.ContextOuterClass.DeviceConfig.getDefaultInstance()) {
+                        getDeviceConfigBuilder().mergeFrom(value);
                     } else {
                         deviceConfig_ = value;
                     }
-                    onChanged();
                 } else {
                     deviceConfigBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -22872,13 +22961,13 @@ public final class ContextOuterClass {
              * .context.DeviceConfig device_config = 3;
              */
             public Builder clearDeviceConfig() {
-                if (deviceConfigBuilder_ == null) {
-                    deviceConfig_ = null;
-                    onChanged();
-                } else {
-                    deviceConfig_ = null;
+                bitField0_ = (bitField0_ & ~0x00000004);
+                deviceConfig_ = null;
+                if (deviceConfigBuilder_ != null) {
+                    deviceConfigBuilder_.dispose();
                     deviceConfigBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -22886,6 +22975,7 @@ public final class ContextOuterClass {
              * .context.DeviceConfig device_config = 3;
              */
             public context.ContextOuterClass.DeviceConfig.Builder getDeviceConfigBuilder() {
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return getDeviceConfigFieldBuilder().getBuilder();
             }
@@ -22939,7 +23029,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public DeviceEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new DeviceEvent(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -23005,57 +23105,6 @@ public final class ContextOuterClass {
             return new LinkId();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private LinkId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Uuid.Builder subBuilder = null;
-                                if (linkUuid_ != null) {
-                                    subBuilder = linkUuid_.toBuilder();
-                                }
-                                linkUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(linkUuid_);
-                                    linkUuid_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_LinkId_descriptor;
         }
@@ -23092,7 +23141,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder() {
-            return getLinkUuid();
+            return linkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -23113,7 +23162,7 @@ public final class ContextOuterClass {
             if (linkUuid_ != null) {
                 output.writeMessage(1, getLinkUuid());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -23125,7 +23174,7 @@ public final class ContextOuterClass {
             if (linkUuid_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLinkUuid());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -23145,7 +23194,7 @@ public final class ContextOuterClass {
                 if (!getLinkUuid().equals(other.getLinkUuid()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -23161,7 +23210,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + LINK_UUID_FIELD_NUMBER;
                 hash = (53 * hash) + getLinkUuid().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -23259,26 +23308,19 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.LinkId.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (linkUuidBuilder_ == null) {
-                    linkUuid_ = null;
-                } else {
-                    linkUuid_ = null;
+                bitField0_ = 0;
+                linkUuid_ = null;
+                if (linkUuidBuilder_ != null) {
+                    linkUuidBuilder_.dispose();
                     linkUuidBuilder_ = null;
                 }
                 return this;
@@ -23306,43 +23348,18 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.LinkId buildPartial() {
                 context.ContextOuterClass.LinkId result = new context.ContextOuterClass.LinkId(this);
-                if (linkUuidBuilder_ == null) {
-                    result.linkUuid_ = linkUuid_;
-                } else {
-                    result.linkUuid_ = linkUuidBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.LinkId result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.linkUuid_ = linkUuidBuilder_ == null ? linkUuid_ : linkUuidBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -23361,7 +23378,7 @@ public final class ContextOuterClass {
                 if (other.hasLinkUuid()) {
                     mergeLinkUuid(other.getLinkUuid());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -23373,20 +23390,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.LinkId parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getLinkUuidFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.LinkId) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.Uuid linkUuid_;
 
             private com.google.protobuf.SingleFieldBuilderV3 linkUuidBuilder_;
@@ -23396,7 +23440,7 @@ public final class ContextOuterClass {
              * @return Whether the linkUuid field is set.
              */
             public boolean hasLinkUuid() {
-                return linkUuidBuilder_ != null || linkUuid_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -23420,10 +23464,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     linkUuid_ = value;
-                    onChanged();
                 } else {
                     linkUuidBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -23433,10 +23478,11 @@ public final class ContextOuterClass {
             public Builder setLinkUuid(context.ContextOuterClass.Uuid.Builder builderForValue) {
                 if (linkUuidBuilder_ == null) {
                     linkUuid_ = builderForValue.build();
-                    onChanged();
                 } else {
                     linkUuidBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -23445,15 +23491,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeLinkUuid(context.ContextOuterClass.Uuid value) {
                 if (linkUuidBuilder_ == null) {
-                    if (linkUuid_ != null) {
-                        linkUuid_ = context.ContextOuterClass.Uuid.newBuilder(linkUuid_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && linkUuid_ != null && linkUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) {
+                        getLinkUuidBuilder().mergeFrom(value);
                     } else {
                         linkUuid_ = value;
                     }
-                    onChanged();
                 } else {
                     linkUuidBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -23461,13 +23508,13 @@ public final class ContextOuterClass {
              * .context.Uuid link_uuid = 1;
              */
             public Builder clearLinkUuid() {
-                if (linkUuidBuilder_ == null) {
-                    linkUuid_ = null;
-                    onChanged();
-                } else {
-                    linkUuid_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                linkUuid_ = null;
+                if (linkUuidBuilder_ != null) {
+                    linkUuidBuilder_.dispose();
                     linkUuidBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -23475,6 +23522,7 @@ public final class ContextOuterClass {
              * .context.Uuid link_uuid = 1;
              */
             public context.ContextOuterClass.Uuid.Builder getLinkUuidBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getLinkUuidFieldBuilder().getBuilder();
             }
@@ -23528,7 +23576,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public LinkId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new LinkId(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -23585,54 +23643,6 @@ public final class ContextOuterClass {
             return new LinkAttributes();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private LinkAttributes(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 13:
-                            {
-                                totalCapacityGbps_ = input.readFloat();
-                                break;
-                            }
-                        case 21:
-                            {
-                                usedCapacityGbps_ = input.readFloat();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_LinkAttributes_descriptor;
         }
@@ -23644,7 +23654,7 @@ public final class ContextOuterClass {
 
         public static final int TOTAL_CAPACITY_GBPS_FIELD_NUMBER = 1;
 
-        private float totalCapacityGbps_;
+        private float totalCapacityGbps_ = 0F;
 
         /**
          * float total_capacity_gbps = 1;
@@ -23657,7 +23667,7 @@ public final class ContextOuterClass {
 
         public static final int USED_CAPACITY_GBPS_FIELD_NUMBER = 2;
 
-        private float usedCapacityGbps_;
+        private float usedCapacityGbps_ = 0F;
 
         /**
          * float used_capacity_gbps = 2;
@@ -23683,13 +23693,13 @@ public final class ContextOuterClass {
 
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-            if (totalCapacityGbps_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(totalCapacityGbps_) != 0) {
                 output.writeFloat(1, totalCapacityGbps_);
             }
-            if (usedCapacityGbps_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(usedCapacityGbps_) != 0) {
                 output.writeFloat(2, usedCapacityGbps_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -23698,13 +23708,13 @@ public final class ContextOuterClass {
             if (size != -1)
                 return size;
             size = 0;
-            if (totalCapacityGbps_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(totalCapacityGbps_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, totalCapacityGbps_);
             }
-            if (usedCapacityGbps_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(usedCapacityGbps_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, usedCapacityGbps_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -23722,7 +23732,7 @@ public final class ContextOuterClass {
                 return false;
             if (java.lang.Float.floatToIntBits(getUsedCapacityGbps()) != java.lang.Float.floatToIntBits(other.getUsedCapacityGbps()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -23738,7 +23748,7 @@ public final class ContextOuterClass {
             hash = (53 * hash) + java.lang.Float.floatToIntBits(getTotalCapacityGbps());
             hash = (37 * hash) + USED_CAPACITY_GBPS_FIELD_NUMBER;
             hash = (53 * hash) + java.lang.Float.floatToIntBits(getUsedCapacityGbps());
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -23832,22 +23842,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.LinkAttributes.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 totalCapacityGbps_ = 0F;
                 usedCapacityGbps_ = 0F;
                 return this;
@@ -23875,40 +23879,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.LinkAttributes buildPartial() {
                 context.ContextOuterClass.LinkAttributes result = new context.ContextOuterClass.LinkAttributes(this);
-                result.totalCapacityGbps_ = totalCapacityGbps_;
-                result.usedCapacityGbps_ = usedCapacityGbps_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.LinkAttributes result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.totalCapacityGbps_ = totalCapacityGbps_;
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.usedCapacityGbps_ = usedCapacityGbps_;
+                }
             }
 
             @java.lang.Override
@@ -23930,7 +23915,7 @@ public final class ContextOuterClass {
                 if (other.getUsedCapacityGbps() != 0F) {
                     setUsedCapacityGbps(other.getUsedCapacityGbps());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -23942,20 +23927,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.LinkAttributes parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 13:
+                                {
+                                    totalCapacityGbps_ = input.readFloat();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 13
+                            case 21:
+                                {
+                                    usedCapacityGbps_ = input.readFloat();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 21
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.LinkAttributes) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private float totalCapacityGbps_;
 
             /**
@@ -23974,6 +23993,7 @@ public final class ContextOuterClass {
              */
             public Builder setTotalCapacityGbps(float value) {
                 totalCapacityGbps_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -23983,6 +24003,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearTotalCapacityGbps() {
+                bitField0_ = (bitField0_ & ~0x00000001);
                 totalCapacityGbps_ = 0F;
                 onChanged();
                 return this;
@@ -24006,6 +24027,7 @@ public final class ContextOuterClass {
              */
             public Builder setUsedCapacityGbps(float value) {
                 usedCapacityGbps_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -24015,6 +24037,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearUsedCapacityGbps() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 usedCapacityGbps_ = 0F;
                 onChanged();
                 return this;
@@ -24047,7 +24070,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public LinkAttributes parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new LinkAttributes(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -24099,44 +24132,56 @@ public final class ContextOuterClass {
         com.google.protobuf.ByteString getNameBytes();
 
         /**
-         * repeated .context.EndPointId link_endpoint_ids = 3;
+         * .context.LinkTypeEnum link_type = 3;
+         * @return The enum numeric value on the wire for linkType.
+         */
+        int getLinkTypeValue();
+
+        /**
+         * .context.LinkTypeEnum link_type = 3;
+         * @return The linkType.
+         */
+        context.ContextOuterClass.LinkTypeEnum getLinkType();
+
+        /**
+         * repeated .context.EndPointId link_endpoint_ids = 4;
          */
         java.util.List getLinkEndpointIdsList();
 
         /**
-         * repeated .context.EndPointId link_endpoint_ids = 3;
+         * repeated .context.EndPointId link_endpoint_ids = 4;
          */
         context.ContextOuterClass.EndPointId getLinkEndpointIds(int index);
 
         /**
-         * repeated .context.EndPointId link_endpoint_ids = 3;
+         * repeated .context.EndPointId link_endpoint_ids = 4;
          */
         int getLinkEndpointIdsCount();
 
         /**
-         * repeated .context.EndPointId link_endpoint_ids = 3;
+         * repeated .context.EndPointId link_endpoint_ids = 4;
          */
         java.util.List getLinkEndpointIdsOrBuilderList();
 
         /**
-         * repeated .context.EndPointId link_endpoint_ids = 3;
+         * repeated .context.EndPointId link_endpoint_ids = 4;
          */
         context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index);
 
         /**
-         * .context.LinkAttributes attributes = 4;
+         * .context.LinkAttributes attributes = 5;
          * @return Whether the attributes field is set.
          */
         boolean hasAttributes();
 
         /**
-         * .context.LinkAttributes attributes = 4;
+         * .context.LinkAttributes attributes = 5;
          * @return The attributes.
          */
         context.ContextOuterClass.LinkAttributes getAttributes();
 
         /**
-         * .context.LinkAttributes attributes = 4;
+         * .context.LinkAttributes attributes = 5;
          */
         context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder();
     }
@@ -24156,6 +24201,7 @@ public final class ContextOuterClass {
 
         private Link() {
             name_ = "";
+            linkType_ = 0;
             linkEndpointIds_ = java.util.Collections.emptyList();
         }
 
@@ -24165,89 +24211,6 @@ public final class ContextOuterClass {
             return new Link();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Link(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.LinkId.Builder subBuilder = null;
-                                if (linkId_ != null) {
-                                    subBuilder = linkId_.toBuilder();
-                                }
-                                linkId_ = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(linkId_);
-                                    linkId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                name_ = s;
-                                break;
-                            }
-                        case 26:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    linkEndpointIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                linkEndpointIds_.add(input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry));
-                                break;
-                            }
-                        case 34:
-                            {
-                                context.ContextOuterClass.LinkAttributes.Builder subBuilder = null;
-                                if (attributes_ != null) {
-                                    subBuilder = attributes_.toBuilder();
-                                }
-                                attributes_ = input.readMessage(context.ContextOuterClass.LinkAttributes.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(attributes_);
-                                    attributes_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    linkEndpointIds_ = java.util.Collections.unmodifiableList(linkEndpointIds_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Link_descriptor;
         }
@@ -24284,12 +24247,13 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() {
-            return getLinkId();
+            return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_;
         }
 
         public static final int NAME_FIELD_NUMBER = 2;
 
-        private volatile java.lang.Object name_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object name_ = "";
 
         /**
          * string name = 2;
@@ -24324,12 +24288,36 @@ public final class ContextOuterClass {
             }
         }
 
-        public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 3;
+        public static final int LINK_TYPE_FIELD_NUMBER = 3;
 
+        private int linkType_ = 0;
+
+        /**
+         * .context.LinkTypeEnum link_type = 3;
+         * @return The enum numeric value on the wire for linkType.
+         */
+        @java.lang.Override
+        public int getLinkTypeValue() {
+            return linkType_;
+        }
+
+        /**
+         * .context.LinkTypeEnum link_type = 3;
+         * @return The linkType.
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.LinkTypeEnum getLinkType() {
+            context.ContextOuterClass.LinkTypeEnum result = context.ContextOuterClass.LinkTypeEnum.forNumber(linkType_);
+            return result == null ? context.ContextOuterClass.LinkTypeEnum.UNRECOGNIZED : result;
+        }
+
+        public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 4;
+
+        @SuppressWarnings("serial")
         private java.util.List linkEndpointIds_;
 
         /**
-         * repeated .context.EndPointId link_endpoint_ids = 3;
+         * repeated .context.EndPointId link_endpoint_ids = 4;
          */
         @java.lang.Override
         public java.util.List getLinkEndpointIdsList() {
@@ -24337,7 +24325,7 @@ public final class ContextOuterClass {
         }
 
         /**
-         * repeated .context.EndPointId link_endpoint_ids = 3;
+         * repeated .context.EndPointId link_endpoint_ids = 4;
          */
         @java.lang.Override
         public java.util.List getLinkEndpointIdsOrBuilderList() {
@@ -24345,7 +24333,7 @@ public final class ContextOuterClass {
         }
 
         /**
-         * repeated .context.EndPointId link_endpoint_ids = 3;
+         * repeated .context.EndPointId link_endpoint_ids = 4;
          */
         @java.lang.Override
         public int getLinkEndpointIdsCount() {
@@ -24353,7 +24341,7 @@ public final class ContextOuterClass {
         }
 
         /**
-         * repeated .context.EndPointId link_endpoint_ids = 3;
+         * repeated .context.EndPointId link_endpoint_ids = 4;
          */
         @java.lang.Override
         public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) {
@@ -24361,19 +24349,19 @@ public final class ContextOuterClass {
         }
 
         /**
-         * repeated .context.EndPointId link_endpoint_ids = 3;
+         * repeated .context.EndPointId link_endpoint_ids = 4;
          */
         @java.lang.Override
         public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) {
             return linkEndpointIds_.get(index);
         }
 
-        public static final int ATTRIBUTES_FIELD_NUMBER = 4;
+        public static final int ATTRIBUTES_FIELD_NUMBER = 5;
 
         private context.ContextOuterClass.LinkAttributes attributes_;
 
         /**
-         * .context.LinkAttributes attributes = 4;
+         * .context.LinkAttributes attributes = 5;
          * @return Whether the attributes field is set.
          */
         @java.lang.Override
@@ -24382,7 +24370,7 @@ public final class ContextOuterClass {
         }
 
         /**
-         * .context.LinkAttributes attributes = 4;
+         * .context.LinkAttributes attributes = 5;
          * @return The attributes.
          */
         @java.lang.Override
@@ -24391,11 +24379,11 @@ public final class ContextOuterClass {
         }
 
         /**
-         * .context.LinkAttributes attributes = 4;
+         * .context.LinkAttributes attributes = 5;
          */
         @java.lang.Override
         public context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder() {
-            return getAttributes();
+            return attributes_ == null ? context.ContextOuterClass.LinkAttributes.getDefaultInstance() : attributes_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -24416,16 +24404,19 @@ public final class ContextOuterClass {
             if (linkId_ != null) {
                 output.writeMessage(1, getLinkId());
             }
-            if (!getNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
             }
+            if (linkType_ != context.ContextOuterClass.LinkTypeEnum.LINKTYPE_UNKNOWN.getNumber()) {
+                output.writeEnum(3, linkType_);
+            }
             for (int i = 0; i < linkEndpointIds_.size(); i++) {
-                output.writeMessage(3, linkEndpointIds_.get(i));
+                output.writeMessage(4, linkEndpointIds_.get(i));
             }
             if (attributes_ != null) {
-                output.writeMessage(4, getAttributes());
+                output.writeMessage(5, getAttributes());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -24437,16 +24428,19 @@ public final class ContextOuterClass {
             if (linkId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLinkId());
             }
-            if (!getNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
             }
+            if (linkType_ != context.ContextOuterClass.LinkTypeEnum.LINKTYPE_UNKNOWN.getNumber()) {
+                size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, linkType_);
+            }
             for (int i = 0; i < linkEndpointIds_.size(); i++) {
-                size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, linkEndpointIds_.get(i));
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkEndpointIds_.get(i));
             }
             if (attributes_ != null) {
-                size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAttributes());
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAttributes());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -24468,6 +24462,8 @@ public final class ContextOuterClass {
             }
             if (!getName().equals(other.getName()))
                 return false;
+            if (linkType_ != other.linkType_)
+                return false;
             if (!getLinkEndpointIdsList().equals(other.getLinkEndpointIdsList()))
                 return false;
             if (hasAttributes() != other.hasAttributes())
@@ -24476,7 +24472,7 @@ public final class ContextOuterClass {
                 if (!getAttributes().equals(other.getAttributes()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -24494,6 +24490,8 @@ public final class ContextOuterClass {
             }
             hash = (37 * hash) + NAME_FIELD_NUMBER;
             hash = (53 * hash) + getName().hashCode();
+            hash = (37 * hash) + LINK_TYPE_FIELD_NUMBER;
+            hash = (53 * hash) + linkType_;
             if (getLinkEndpointIdsCount() > 0) {
                 hash = (37 * hash) + LINK_ENDPOINT_IDS_FIELD_NUMBER;
                 hash = (53 * hash) + getLinkEndpointIdsList().hashCode();
@@ -24502,7 +24500,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER;
                 hash = (53 * hash) + getAttributes().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -24596,40 +24594,33 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Link.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getLinkEndpointIdsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (linkIdBuilder_ == null) {
-                    linkId_ = null;
-                } else {
-                    linkId_ = null;
+                bitField0_ = 0;
+                linkId_ = null;
+                if (linkIdBuilder_ != null) {
+                    linkIdBuilder_.dispose();
                     linkIdBuilder_ = null;
                 }
                 name_ = "";
+                linkType_ = 0;
                 if (linkEndpointIdsBuilder_ == null) {
                     linkEndpointIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    linkEndpointIds_ = null;
                     linkEndpointIdsBuilder_.clear();
                 }
-                if (attributesBuilder_ == null) {
-                    attributes_ = null;
-                } else {
-                    attributes_ = null;
+                bitField0_ = (bitField0_ & ~0x00000008);
+                attributes_ = null;
+                if (attributesBuilder_ != null) {
+                    attributesBuilder_.dispose();
                     attributesBuilder_ = null;
                 }
                 return this;
@@ -24657,59 +24648,40 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Link buildPartial() {
                 context.ContextOuterClass.Link result = new context.ContextOuterClass.Link(this);
-                int from_bitField0_ = bitField0_;
-                if (linkIdBuilder_ == null) {
-                    result.linkId_ = linkId_;
-                } else {
-                    result.linkId_ = linkIdBuilder_.build();
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.name_ = name_;
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.Link result) {
                 if (linkEndpointIdsBuilder_ == null) {
-                    if (((bitField0_ & 0x00000001) != 0)) {
+                    if (((bitField0_ & 0x00000008) != 0)) {
                         linkEndpointIds_ = java.util.Collections.unmodifiableList(linkEndpointIds_);
-                        bitField0_ = (bitField0_ & ~0x00000001);
+                        bitField0_ = (bitField0_ & ~0x00000008);
                     }
                     result.linkEndpointIds_ = linkEndpointIds_;
                 } else {
                     result.linkEndpointIds_ = linkEndpointIdsBuilder_.build();
                 }
-                if (attributesBuilder_ == null) {
-                    result.attributes_ = attributes_;
-                } else {
-                    result.attributes_ = attributesBuilder_.build();
-                }
-                onBuilt();
-                return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.Link result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.linkId_ = linkIdBuilder_ == null ? linkId_ : linkIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.name_ = name_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.linkType_ = linkType_;
+                }
+                if (((from_bitField0_ & 0x00000010) != 0)) {
+                    result.attributes_ = attributesBuilder_ == null ? attributes_ : attributesBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -24730,13 +24702,17 @@ public final class ContextOuterClass {
                 }
                 if (!other.getName().isEmpty()) {
                     name_ = other.name_;
+                    bitField0_ |= 0x00000002;
                     onChanged();
                 }
+                if (other.linkType_ != 0) {
+                    setLinkTypeValue(other.getLinkTypeValue());
+                }
                 if (linkEndpointIdsBuilder_ == null) {
                     if (!other.linkEndpointIds_.isEmpty()) {
                         if (linkEndpointIds_.isEmpty()) {
                             linkEndpointIds_ = other.linkEndpointIds_;
-                            bitField0_ = (bitField0_ & ~0x00000001);
+                            bitField0_ = (bitField0_ & ~0x00000008);
                         } else {
                             ensureLinkEndpointIdsIsMutable();
                             linkEndpointIds_.addAll(other.linkEndpointIds_);
@@ -24749,7 +24725,7 @@ public final class ContextOuterClass {
                             linkEndpointIdsBuilder_.dispose();
                             linkEndpointIdsBuilder_ = null;
                             linkEndpointIds_ = other.linkEndpointIds_;
-                            bitField0_ = (bitField0_ & ~0x00000001);
+                            bitField0_ = (bitField0_ & ~0x00000008);
                             linkEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkEndpointIdsFieldBuilder() : null;
                         } else {
                             linkEndpointIdsBuilder_.addAllMessages(other.linkEndpointIds_);
@@ -24759,7 +24735,7 @@ public final class ContextOuterClass {
                 if (other.hasAttributes()) {
                     mergeAttributes(other.getAttributes());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -24771,17 +24747,75 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Link parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getLinkIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    name_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 24:
+                                {
+                                    linkType_ = input.readEnum();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 24
+                            case 34:
+                                {
+                                    context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry);
+                                    if (linkEndpointIdsBuilder_ == null) {
+                                        ensureLinkEndpointIdsIsMutable();
+                                        linkEndpointIds_.add(m);
+                                    } else {
+                                        linkEndpointIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 34
+                            case 42:
+                                {
+                                    input.readMessage(getAttributesFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000010;
+                                    break;
+                                }
+                            // case 42
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Link) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -24796,7 +24830,7 @@ public final class ContextOuterClass {
              * @return Whether the linkId field is set.
              */
             public boolean hasLinkId() {
-                return linkIdBuilder_ != null || linkId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -24820,10 +24854,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     linkId_ = value;
-                    onChanged();
                 } else {
                     linkIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -24833,10 +24868,11 @@ public final class ContextOuterClass {
             public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) {
                 if (linkIdBuilder_ == null) {
                     linkId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     linkIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -24845,15 +24881,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeLinkId(context.ContextOuterClass.LinkId value) {
                 if (linkIdBuilder_ == null) {
-                    if (linkId_ != null) {
-                        linkId_ = context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && linkId_ != null && linkId_ != context.ContextOuterClass.LinkId.getDefaultInstance()) {
+                        getLinkIdBuilder().mergeFrom(value);
                     } else {
                         linkId_ = value;
                     }
-                    onChanged();
                 } else {
                     linkIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -24861,13 +24898,13 @@ public final class ContextOuterClass {
              * .context.LinkId link_id = 1;
              */
             public Builder clearLinkId() {
-                if (linkIdBuilder_ == null) {
-                    linkId_ = null;
-                    onChanged();
-                } else {
-                    linkId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                linkId_ = null;
+                if (linkIdBuilder_ != null) {
+                    linkIdBuilder_.dispose();
                     linkIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -24875,6 +24912,7 @@ public final class ContextOuterClass {
              * .context.LinkId link_id = 1;
              */
             public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getLinkIdFieldBuilder().getBuilder();
             }
@@ -24944,6 +24982,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 name_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -24954,6 +24993,7 @@ public final class ContextOuterClass {
              */
             public Builder clearName() {
                 name_ = getDefaultInstance().getName();
+                bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
             }
@@ -24969,6 +25009,66 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 name_ = value;
+                bitField0_ |= 0x00000002;
+                onChanged();
+                return this;
+            }
+
+            private int linkType_ = 0;
+
+            /**
+             * .context.LinkTypeEnum link_type = 3;
+             * @return The enum numeric value on the wire for linkType.
+             */
+            @java.lang.Override
+            public int getLinkTypeValue() {
+                return linkType_;
+            }
+
+            /**
+             * .context.LinkTypeEnum link_type = 3;
+             * @param value The enum numeric value on the wire for linkType to set.
+             * @return This builder for chaining.
+             */
+            public Builder setLinkTypeValue(int value) {
+                linkType_ = value;
+                bitField0_ |= 0x00000004;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * .context.LinkTypeEnum link_type = 3;
+             * @return The linkType.
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.LinkTypeEnum getLinkType() {
+                context.ContextOuterClass.LinkTypeEnum result = context.ContextOuterClass.LinkTypeEnum.forNumber(linkType_);
+                return result == null ? context.ContextOuterClass.LinkTypeEnum.UNRECOGNIZED : result;
+            }
+
+            /**
+             * .context.LinkTypeEnum link_type = 3;
+             * @param value The linkType to set.
+             * @return This builder for chaining.
+             */
+            public Builder setLinkType(context.ContextOuterClass.LinkTypeEnum value) {
+                if (value == null) {
+                    throw new NullPointerException();
+                }
+                bitField0_ |= 0x00000004;
+                linkType_ = value.getNumber();
+                onChanged();
+                return this;
+            }
+
+            /**
+             * .context.LinkTypeEnum link_type = 3;
+             * @return This builder for chaining.
+             */
+            public Builder clearLinkType() {
+                bitField0_ = (bitField0_ & ~0x00000004);
+                linkType_ = 0;
                 onChanged();
                 return this;
             }
@@ -24976,16 +25076,16 @@ public final class ContextOuterClass {
             private java.util.List linkEndpointIds_ = java.util.Collections.emptyList();
 
             private void ensureLinkEndpointIdsIsMutable() {
-                if (!((bitField0_ & 0x00000001) != 0)) {
+                if (!((bitField0_ & 0x00000008) != 0)) {
                     linkEndpointIds_ = new java.util.ArrayList(linkEndpointIds_);
-                    bitField0_ |= 0x00000001;
+                    bitField0_ |= 0x00000008;
                 }
             }
 
             private com.google.protobuf.RepeatedFieldBuilderV3 linkEndpointIdsBuilder_;
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public java.util.List getLinkEndpointIdsList() {
                 if (linkEndpointIdsBuilder_ == null) {
@@ -24996,7 +25096,7 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public int getLinkEndpointIdsCount() {
                 if (linkEndpointIdsBuilder_ == null) {
@@ -25007,7 +25107,7 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) {
                 if (linkEndpointIdsBuilder_ == null) {
@@ -25018,7 +25118,7 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) {
                 if (linkEndpointIdsBuilder_ == null) {
@@ -25035,7 +25135,7 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) {
                 if (linkEndpointIdsBuilder_ == null) {
@@ -25049,7 +25149,7 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId value) {
                 if (linkEndpointIdsBuilder_ == null) {
@@ -25066,7 +25166,7 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) {
                 if (linkEndpointIdsBuilder_ == null) {
@@ -25083,7 +25183,7 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) {
                 if (linkEndpointIdsBuilder_ == null) {
@@ -25097,7 +25197,7 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) {
                 if (linkEndpointIdsBuilder_ == null) {
@@ -25111,7 +25211,7 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public Builder addAllLinkEndpointIds(java.lang.Iterable values) {
                 if (linkEndpointIdsBuilder_ == null) {
@@ -25125,12 +25225,12 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public Builder clearLinkEndpointIds() {
                 if (linkEndpointIdsBuilder_ == null) {
                     linkEndpointIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
+                    bitField0_ = (bitField0_ & ~0x00000008);
                     onChanged();
                 } else {
                     linkEndpointIdsBuilder_.clear();
@@ -25139,7 +25239,7 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public Builder removeLinkEndpointIds(int index) {
                 if (linkEndpointIdsBuilder_ == null) {
@@ -25153,14 +25253,14 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public context.ContextOuterClass.EndPointId.Builder getLinkEndpointIdsBuilder(int index) {
                 return getLinkEndpointIdsFieldBuilder().getBuilder(index);
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) {
                 if (linkEndpointIdsBuilder_ == null) {
@@ -25171,7 +25271,7 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public java.util.List getLinkEndpointIdsOrBuilderList() {
                 if (linkEndpointIdsBuilder_ != null) {
@@ -25182,21 +25282,21 @@ public final class ContextOuterClass {
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder() {
                 return getLinkEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance());
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder(int index) {
                 return getLinkEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance());
             }
 
             /**
-             * repeated .context.EndPointId link_endpoint_ids = 3;
+             * repeated .context.EndPointId link_endpoint_ids = 4;
              */
             public java.util.List getLinkEndpointIdsBuilderList() {
                 return getLinkEndpointIdsFieldBuilder().getBuilderList();
@@ -25204,7 +25304,7 @@ public final class ContextOuterClass {
 
             private com.google.protobuf.RepeatedFieldBuilderV3 getLinkEndpointIdsFieldBuilder() {
                 if (linkEndpointIdsBuilder_ == null) {
-                    linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
+                    linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkEndpointIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
                     linkEndpointIds_ = null;
                 }
                 return linkEndpointIdsBuilder_;
@@ -25215,15 +25315,15 @@ public final class ContextOuterClass {
             private com.google.protobuf.SingleFieldBuilderV3 attributesBuilder_;
 
             /**
-             * .context.LinkAttributes attributes = 4;
+             * .context.LinkAttributes attributes = 5;
              * @return Whether the attributes field is set.
              */
             public boolean hasAttributes() {
-                return attributesBuilder_ != null || attributes_ != null;
+                return ((bitField0_ & 0x00000010) != 0);
             }
 
             /**
-             * .context.LinkAttributes attributes = 4;
+             * .context.LinkAttributes attributes = 5;
              * @return The attributes.
              */
             public context.ContextOuterClass.LinkAttributes getAttributes() {
@@ -25235,7 +25335,7 @@ public final class ContextOuterClass {
             }
 
             /**
-             * .context.LinkAttributes attributes = 4;
+             * .context.LinkAttributes attributes = 5;
              */
             public Builder setAttributes(context.ContextOuterClass.LinkAttributes value) {
                 if (attributesBuilder_ == null) {
@@ -25243,67 +25343,71 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     attributes_ = value;
-                    onChanged();
                 } else {
                     attributesBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
             /**
-             * .context.LinkAttributes attributes = 4;
+             * .context.LinkAttributes attributes = 5;
              */
             public Builder setAttributes(context.ContextOuterClass.LinkAttributes.Builder builderForValue) {
                 if (attributesBuilder_ == null) {
                     attributes_ = builderForValue.build();
-                    onChanged();
                 } else {
                     attributesBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
             /**
-             * .context.LinkAttributes attributes = 4;
+             * .context.LinkAttributes attributes = 5;
              */
             public Builder mergeAttributes(context.ContextOuterClass.LinkAttributes value) {
                 if (attributesBuilder_ == null) {
-                    if (attributes_ != null) {
-                        attributes_ = context.ContextOuterClass.LinkAttributes.newBuilder(attributes_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000010) != 0) && attributes_ != null && attributes_ != context.ContextOuterClass.LinkAttributes.getDefaultInstance()) {
+                        getAttributesBuilder().mergeFrom(value);
                     } else {
                         attributes_ = value;
                     }
-                    onChanged();
                 } else {
                     attributesBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
             /**
-             * .context.LinkAttributes attributes = 4;
+             * .context.LinkAttributes attributes = 5;
              */
             public Builder clearAttributes() {
-                if (attributesBuilder_ == null) {
-                    attributes_ = null;
-                    onChanged();
-                } else {
-                    attributes_ = null;
+                bitField0_ = (bitField0_ & ~0x00000010);
+                attributes_ = null;
+                if (attributesBuilder_ != null) {
+                    attributesBuilder_.dispose();
                     attributesBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
             /**
-             * .context.LinkAttributes attributes = 4;
+             * .context.LinkAttributes attributes = 5;
              */
             public context.ContextOuterClass.LinkAttributes.Builder getAttributesBuilder() {
+                bitField0_ |= 0x00000010;
                 onChanged();
                 return getAttributesFieldBuilder().getBuilder();
             }
 
             /**
-             * .context.LinkAttributes attributes = 4;
+             * .context.LinkAttributes attributes = 5;
              */
             public context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder() {
                 if (attributesBuilder_ != null) {
@@ -25314,7 +25418,7 @@ public final class ContextOuterClass {
             }
 
             /**
-             * .context.LinkAttributes attributes = 4;
+             * .context.LinkAttributes attributes = 5;
              */
             private com.google.protobuf.SingleFieldBuilderV3 getAttributesFieldBuilder() {
                 if (attributesBuilder_ == null) {
@@ -25351,7 +25455,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Link parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Link(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -25422,57 +25536,6 @@ public final class ContextOuterClass {
             return new LinkIdList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private LinkIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    linkIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                linkIds_.add(input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    linkIds_ = java.util.Collections.unmodifiableList(linkIds_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_LinkIdList_descriptor;
         }
@@ -25484,6 +25547,7 @@ public final class ContextOuterClass {
 
         public static final int LINK_IDS_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List linkIds_;
 
         /**
@@ -25544,7 +25608,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < linkIds_.size(); i++) {
                 output.writeMessage(1, linkIds_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -25556,7 +25620,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < linkIds_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, linkIds_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -25572,7 +25636,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.LinkIdList other = (context.ContextOuterClass.LinkIdList) obj;
             if (!getLinkIdsList().equals(other.getLinkIdsList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -25588,7 +25652,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + LINK_IDS_FIELD_NUMBER;
                 hash = (53 * hash) + getLinkIdsList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -25682,29 +25746,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.LinkIdList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getLinkIdsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (linkIdsBuilder_ == null) {
                     linkIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    linkIds_ = null;
                     linkIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -25730,7 +25788,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.LinkIdList buildPartial() {
                 context.ContextOuterClass.LinkIdList result = new context.ContextOuterClass.LinkIdList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.LinkIdList result) {
                 if (linkIdsBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         linkIds_ = java.util.Collections.unmodifiableList(linkIds_);
@@ -25740,38 +25806,10 @@ public final class ContextOuterClass {
                 } else {
                     result.linkIds_ = linkIdsBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
             }
 
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.LinkIdList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -25811,7 +25849,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -25823,17 +25861,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.LinkIdList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.LinkId m = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry);
+                                    if (linkIdsBuilder_ == null) {
+                                        ensureLinkIdsIsMutable();
+                                        linkIds_.add(m);
+                                    } else {
+                                        linkIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.LinkIdList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -26103,7 +26171,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public LinkIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new LinkIdList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -26174,57 +26252,6 @@ public final class ContextOuterClass {
             return new LinkList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private LinkList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    links_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                links_.add(input.readMessage(context.ContextOuterClass.Link.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    links_ = java.util.Collections.unmodifiableList(links_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_LinkList_descriptor;
         }
@@ -26236,6 +26263,7 @@ public final class ContextOuterClass {
 
         public static final int LINKS_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List links_;
 
         /**
@@ -26296,7 +26324,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < links_.size(); i++) {
                 output.writeMessage(1, links_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -26308,7 +26336,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < links_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, links_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -26324,7 +26352,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.LinkList other = (context.ContextOuterClass.LinkList) obj;
             if (!getLinksList().equals(other.getLinksList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -26340,7 +26368,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + LINKS_FIELD_NUMBER;
                 hash = (53 * hash) + getLinksList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -26434,29 +26462,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.LinkList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getLinksFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (linksBuilder_ == null) {
                     links_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    links_ = null;
                     linksBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -26482,7 +26504,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.LinkList buildPartial() {
                 context.ContextOuterClass.LinkList result = new context.ContextOuterClass.LinkList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.LinkList result) {
                 if (linksBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         links_ = java.util.Collections.unmodifiableList(links_);
@@ -26492,38 +26522,10 @@ public final class ContextOuterClass {
                 } else {
                     result.links_ = linksBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
             }
 
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.LinkList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -26563,7 +26565,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -26575,17 +26577,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.LinkList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.Link m = input.readMessage(context.ContextOuterClass.Link.parser(), extensionRegistry);
+                                    if (linksBuilder_ == null) {
+                                        ensureLinksIsMutable();
+                                        links_.add(m);
+                                    } else {
+                                        linksBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.LinkList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -26855,7 +26887,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public LinkList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new LinkList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -26934,70 +26976,6 @@ public final class ContextOuterClass {
             return new LinkEvent();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private LinkEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Event.Builder subBuilder = null;
-                                if (event_ != null) {
-                                    subBuilder = event_.toBuilder();
-                                }
-                                event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(event_);
-                                    event_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.LinkId.Builder subBuilder = null;
-                                if (linkId_ != null) {
-                                    subBuilder = linkId_.toBuilder();
-                                }
-                                linkId_ = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(linkId_);
-                                    linkId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_LinkEvent_descriptor;
         }
@@ -27034,7 +27012,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() {
-            return getEvent();
+            return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_;
         }
 
         public static final int LINK_ID_FIELD_NUMBER = 2;
@@ -27064,7 +27042,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() {
-            return getLinkId();
+            return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -27088,7 +27066,7 @@ public final class ContextOuterClass {
             if (linkId_ != null) {
                 output.writeMessage(2, getLinkId());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -27103,7 +27081,7 @@ public final class ContextOuterClass {
             if (linkId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLinkId());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -27129,7 +27107,7 @@ public final class ContextOuterClass {
                 if (!getLinkId().equals(other.getLinkId()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -27149,7 +27127,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + LINK_ID_FIELD_NUMBER;
                 hash = (53 * hash) + getLinkId().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -27243,32 +27221,24 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.LinkEvent.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (eventBuilder_ == null) {
-                    event_ = null;
-                } else {
-                    event_ = null;
+                bitField0_ = 0;
+                event_ = null;
+                if (eventBuilder_ != null) {
+                    eventBuilder_.dispose();
                     eventBuilder_ = null;
                 }
-                if (linkIdBuilder_ == null) {
-                    linkId_ = null;
-                } else {
-                    linkId_ = null;
+                linkId_ = null;
+                if (linkIdBuilder_ != null) {
+                    linkIdBuilder_.dispose();
                     linkIdBuilder_ = null;
                 }
                 return this;
@@ -27296,48 +27266,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.LinkEvent buildPartial() {
                 context.ContextOuterClass.LinkEvent result = new context.ContextOuterClass.LinkEvent(this);
-                if (eventBuilder_ == null) {
-                    result.event_ = event_;
-                } else {
-                    result.event_ = eventBuilder_.build();
-                }
-                if (linkIdBuilder_ == null) {
-                    result.linkId_ = linkId_;
-                } else {
-                    result.linkId_ = linkIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.LinkEvent result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.linkId_ = linkIdBuilder_ == null ? linkId_ : linkIdBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -27359,7 +27302,7 @@ public final class ContextOuterClass {
                 if (other.hasLinkId()) {
                     mergeLinkId(other.getLinkId());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -27371,20 +27314,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.LinkEvent parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getLinkIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.LinkEvent) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.Event event_;
 
             private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_;
@@ -27394,7 +27371,7 @@ public final class ContextOuterClass {
              * @return Whether the event field is set.
              */
             public boolean hasEvent() {
-                return eventBuilder_ != null || event_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -27418,10 +27395,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     event_ = value;
-                    onChanged();
                 } else {
                     eventBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -27431,10 +27409,11 @@ public final class ContextOuterClass {
             public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) {
                 if (eventBuilder_ == null) {
                     event_ = builderForValue.build();
-                    onChanged();
                 } else {
                     eventBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -27443,15 +27422,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeEvent(context.ContextOuterClass.Event value) {
                 if (eventBuilder_ == null) {
-                    if (event_ != null) {
-                        event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) {
+                        getEventBuilder().mergeFrom(value);
                     } else {
                         event_ = value;
                     }
-                    onChanged();
                 } else {
                     eventBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -27459,13 +27439,13 @@ public final class ContextOuterClass {
              * .context.Event event = 1;
              */
             public Builder clearEvent() {
-                if (eventBuilder_ == null) {
-                    event_ = null;
-                    onChanged();
-                } else {
-                    event_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                event_ = null;
+                if (eventBuilder_ != null) {
+                    eventBuilder_.dispose();
                     eventBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -27473,6 +27453,7 @@ public final class ContextOuterClass {
              * .context.Event event = 1;
              */
             public context.ContextOuterClass.Event.Builder getEventBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getEventFieldBuilder().getBuilder();
             }
@@ -27508,7 +27489,7 @@ public final class ContextOuterClass {
              * @return Whether the linkId field is set.
              */
             public boolean hasLinkId() {
-                return linkIdBuilder_ != null || linkId_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -27532,10 +27513,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     linkId_ = value;
-                    onChanged();
                 } else {
                     linkIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -27545,10 +27527,11 @@ public final class ContextOuterClass {
             public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) {
                 if (linkIdBuilder_ == null) {
                     linkId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     linkIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -27557,15 +27540,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeLinkId(context.ContextOuterClass.LinkId value) {
                 if (linkIdBuilder_ == null) {
-                    if (linkId_ != null) {
-                        linkId_ = context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && linkId_ != null && linkId_ != context.ContextOuterClass.LinkId.getDefaultInstance()) {
+                        getLinkIdBuilder().mergeFrom(value);
                     } else {
                         linkId_ = value;
                     }
-                    onChanged();
                 } else {
                     linkIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -27573,13 +27557,13 @@ public final class ContextOuterClass {
              * .context.LinkId link_id = 2;
              */
             public Builder clearLinkId() {
-                if (linkIdBuilder_ == null) {
-                    linkId_ = null;
-                    onChanged();
-                } else {
-                    linkId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                linkId_ = null;
+                if (linkIdBuilder_ != null) {
+                    linkIdBuilder_.dispose();
                     linkIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -27587,6 +27571,7 @@ public final class ContextOuterClass {
              * .context.LinkId link_id = 2;
              */
             public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getLinkIdFieldBuilder().getBuilder();
             }
@@ -27640,7 +27625,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public LinkEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new LinkEvent(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -27723,70 +27718,6 @@ public final class ContextOuterClass {
             return new ServiceId();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ServiceId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.ContextId.Builder subBuilder = null;
-                                if (contextId_ != null) {
-                                    subBuilder = contextId_.toBuilder();
-                                }
-                                contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(contextId_);
-                                    contextId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.Uuid.Builder subBuilder = null;
-                                if (serviceUuid_ != null) {
-                                    subBuilder = serviceUuid_.toBuilder();
-                                }
-                                serviceUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(serviceUuid_);
-                                    serviceUuid_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ServiceId_descriptor;
         }
@@ -27823,7 +27754,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() {
-            return getContextId();
+            return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_;
         }
 
         public static final int SERVICE_UUID_FIELD_NUMBER = 2;
@@ -27853,7 +27784,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder() {
-            return getServiceUuid();
+            return serviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -27877,7 +27808,7 @@ public final class ContextOuterClass {
             if (serviceUuid_ != null) {
                 output.writeMessage(2, getServiceUuid());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -27892,7 +27823,7 @@ public final class ContextOuterClass {
             if (serviceUuid_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServiceUuid());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -27918,7 +27849,7 @@ public final class ContextOuterClass {
                 if (!getServiceUuid().equals(other.getServiceUuid()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -27938,7 +27869,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + SERVICE_UUID_FIELD_NUMBER;
                 hash = (53 * hash) + getServiceUuid().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -28036,32 +27967,24 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ServiceId.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (contextIdBuilder_ == null) {
-                    contextId_ = null;
-                } else {
-                    contextId_ = null;
+                bitField0_ = 0;
+                contextId_ = null;
+                if (contextIdBuilder_ != null) {
+                    contextIdBuilder_.dispose();
                     contextIdBuilder_ = null;
                 }
-                if (serviceUuidBuilder_ == null) {
-                    serviceUuid_ = null;
-                } else {
-                    serviceUuid_ = null;
+                serviceUuid_ = null;
+                if (serviceUuidBuilder_ != null) {
+                    serviceUuidBuilder_.dispose();
                     serviceUuidBuilder_ = null;
                 }
                 return this;
@@ -28089,48 +28012,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ServiceId buildPartial() {
                 context.ContextOuterClass.ServiceId result = new context.ContextOuterClass.ServiceId(this);
-                if (contextIdBuilder_ == null) {
-                    result.contextId_ = contextId_;
-                } else {
-                    result.contextId_ = contextIdBuilder_.build();
-                }
-                if (serviceUuidBuilder_ == null) {
-                    result.serviceUuid_ = serviceUuid_;
-                } else {
-                    result.serviceUuid_ = serviceUuidBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ServiceId result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.serviceUuid_ = serviceUuidBuilder_ == null ? serviceUuid_ : serviceUuidBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -28152,7 +28048,7 @@ public final class ContextOuterClass {
                 if (other.hasServiceUuid()) {
                     mergeServiceUuid(other.getServiceUuid());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -28164,20 +28060,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ServiceId parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getServiceUuidFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ServiceId) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.ContextId contextId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_;
@@ -28187,7 +28117,7 @@ public final class ContextOuterClass {
              * @return Whether the contextId field is set.
              */
             public boolean hasContextId() {
-                return contextIdBuilder_ != null || contextId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -28211,10 +28141,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     contextId_ = value;
-                    onChanged();
                 } else {
                     contextIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -28224,10 +28155,11 @@ public final class ContextOuterClass {
             public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) {
                 if (contextIdBuilder_ == null) {
                     contextId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     contextIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -28236,15 +28168,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeContextId(context.ContextOuterClass.ContextId value) {
                 if (contextIdBuilder_ == null) {
-                    if (contextId_ != null) {
-                        contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) {
+                        getContextIdBuilder().mergeFrom(value);
                     } else {
                         contextId_ = value;
                     }
-                    onChanged();
                 } else {
                     contextIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -28252,13 +28185,13 @@ public final class ContextOuterClass {
              * .context.ContextId context_id = 1;
              */
             public Builder clearContextId() {
-                if (contextIdBuilder_ == null) {
-                    contextId_ = null;
-                    onChanged();
-                } else {
-                    contextId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                contextId_ = null;
+                if (contextIdBuilder_ != null) {
+                    contextIdBuilder_.dispose();
                     contextIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -28266,6 +28199,7 @@ public final class ContextOuterClass {
              * .context.ContextId context_id = 1;
              */
             public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getContextIdFieldBuilder().getBuilder();
             }
@@ -28301,7 +28235,7 @@ public final class ContextOuterClass {
              * @return Whether the serviceUuid field is set.
              */
             public boolean hasServiceUuid() {
-                return serviceUuidBuilder_ != null || serviceUuid_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -28325,10 +28259,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     serviceUuid_ = value;
-                    onChanged();
                 } else {
                     serviceUuidBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -28338,10 +28273,11 @@ public final class ContextOuterClass {
             public Builder setServiceUuid(context.ContextOuterClass.Uuid.Builder builderForValue) {
                 if (serviceUuidBuilder_ == null) {
                     serviceUuid_ = builderForValue.build();
-                    onChanged();
                 } else {
                     serviceUuidBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -28350,15 +28286,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeServiceUuid(context.ContextOuterClass.Uuid value) {
                 if (serviceUuidBuilder_ == null) {
-                    if (serviceUuid_ != null) {
-                        serviceUuid_ = context.ContextOuterClass.Uuid.newBuilder(serviceUuid_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && serviceUuid_ != null && serviceUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) {
+                        getServiceUuidBuilder().mergeFrom(value);
                     } else {
                         serviceUuid_ = value;
                     }
-                    onChanged();
                 } else {
                     serviceUuidBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -28366,13 +28303,13 @@ public final class ContextOuterClass {
              * .context.Uuid service_uuid = 2;
              */
             public Builder clearServiceUuid() {
-                if (serviceUuidBuilder_ == null) {
-                    serviceUuid_ = null;
-                    onChanged();
-                } else {
-                    serviceUuid_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                serviceUuid_ = null;
+                if (serviceUuidBuilder_ != null) {
+                    serviceUuidBuilder_.dispose();
                     serviceUuidBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -28380,6 +28317,7 @@ public final class ContextOuterClass {
              * .context.Uuid service_uuid = 2;
              */
             public context.ContextOuterClass.Uuid.Builder getServiceUuidBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getServiceUuidFieldBuilder().getBuilder();
             }
@@ -28433,7 +28371,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ServiceId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ServiceId(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -28624,133 +28572,6 @@ public final class ContextOuterClass {
             return new Service();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Service(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.ServiceId.Builder subBuilder = null;
-                                if (serviceId_ != null) {
-                                    subBuilder = serviceId_.toBuilder();
-                                }
-                                serviceId_ = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(serviceId_);
-                                    serviceId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                name_ = s;
-                                break;
-                            }
-                        case 24:
-                            {
-                                int rawValue = input.readEnum();
-                                serviceType_ = rawValue;
-                                break;
-                            }
-                        case 34:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    serviceEndpointIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                serviceEndpointIds_.add(input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry));
-                                break;
-                            }
-                        case 42:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000002) != 0)) {
-                                    serviceConstraints_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000002;
-                                }
-                                serviceConstraints_.add(input.readMessage(context.ContextOuterClass.Constraint.parser(), extensionRegistry));
-                                break;
-                            }
-                        case 50:
-                            {
-                                context.ContextOuterClass.ServiceStatus.Builder subBuilder = null;
-                                if (serviceStatus_ != null) {
-                                    subBuilder = serviceStatus_.toBuilder();
-                                }
-                                serviceStatus_ = input.readMessage(context.ContextOuterClass.ServiceStatus.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(serviceStatus_);
-                                    serviceStatus_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 58:
-                            {
-                                context.ContextOuterClass.ServiceConfig.Builder subBuilder = null;
-                                if (serviceConfig_ != null) {
-                                    subBuilder = serviceConfig_.toBuilder();
-                                }
-                                serviceConfig_ = input.readMessage(context.ContextOuterClass.ServiceConfig.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(serviceConfig_);
-                                    serviceConfig_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 66:
-                            {
-                                context.ContextOuterClass.Timestamp.Builder subBuilder = null;
-                                if (timestamp_ != null) {
-                                    subBuilder = timestamp_.toBuilder();
-                                }
-                                timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(timestamp_);
-                                    timestamp_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    serviceEndpointIds_ = java.util.Collections.unmodifiableList(serviceEndpointIds_);
-                }
-                if (((mutable_bitField0_ & 0x00000002) != 0)) {
-                    serviceConstraints_ = java.util.Collections.unmodifiableList(serviceConstraints_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Service_descriptor;
         }
@@ -28787,12 +28608,13 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() {
-            return getServiceId();
+            return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_;
         }
 
         public static final int NAME_FIELD_NUMBER = 2;
 
-        private volatile java.lang.Object name_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object name_ = "";
 
         /**
          * string name = 2;
@@ -28829,7 +28651,7 @@ public final class ContextOuterClass {
 
         public static final int SERVICE_TYPE_FIELD_NUMBER = 3;
 
-        private int serviceType_;
+        private int serviceType_ = 0;
 
         /**
          * .context.ServiceTypeEnum service_type = 3;
@@ -28846,13 +28668,13 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ServiceTypeEnum getServiceType() {
-            @SuppressWarnings("deprecation")
-            context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.valueOf(serviceType_);
+            context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.forNumber(serviceType_);
             return result == null ? context.ContextOuterClass.ServiceTypeEnum.UNRECOGNIZED : result;
         }
 
         public static final int SERVICE_ENDPOINT_IDS_FIELD_NUMBER = 4;
 
+        @SuppressWarnings("serial")
         private java.util.List serviceEndpointIds_;
 
         /**
@@ -28897,6 +28719,7 @@ public final class ContextOuterClass {
 
         public static final int SERVICE_CONSTRAINTS_FIELD_NUMBER = 5;
 
+        @SuppressWarnings("serial")
         private java.util.List serviceConstraints_;
 
         /**
@@ -28966,7 +28789,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder() {
-            return getServiceStatus();
+            return serviceStatus_ == null ? context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_;
         }
 
         public static final int SERVICE_CONFIG_FIELD_NUMBER = 7;
@@ -28996,7 +28819,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder() {
-            return getServiceConfig();
+            return serviceConfig_ == null ? context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_;
         }
 
         public static final int TIMESTAMP_FIELD_NUMBER = 8;
@@ -29026,7 +28849,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() {
-            return getTimestamp();
+            return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -29047,7 +28870,7 @@ public final class ContextOuterClass {
             if (serviceId_ != null) {
                 output.writeMessage(1, getServiceId());
             }
-            if (!getNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
             }
             if (serviceType_ != context.ContextOuterClass.ServiceTypeEnum.SERVICETYPE_UNKNOWN.getNumber()) {
@@ -29068,7 +28891,7 @@ public final class ContextOuterClass {
             if (timestamp_ != null) {
                 output.writeMessage(8, getTimestamp());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -29080,7 +28903,7 @@ public final class ContextOuterClass {
             if (serviceId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getServiceId());
             }
-            if (!getNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
             }
             if (serviceType_ != context.ContextOuterClass.ServiceTypeEnum.SERVICETYPE_UNKNOWN.getNumber()) {
@@ -29101,7 +28924,7 @@ public final class ContextOuterClass {
             if (timestamp_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getTimestamp());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -29147,7 +28970,7 @@ public final class ContextOuterClass {
                 if (!getTimestamp().equals(other.getTimestamp()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -29187,7 +29010,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
                 hash = (53 * hash) + getTimestamp().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -29281,60 +29104,50 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Service.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getServiceEndpointIdsFieldBuilder();
-                    getServiceConstraintsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (serviceIdBuilder_ == null) {
-                    serviceId_ = null;
-                } else {
-                    serviceId_ = null;
+                bitField0_ = 0;
+                serviceId_ = null;
+                if (serviceIdBuilder_ != null) {
+                    serviceIdBuilder_.dispose();
                     serviceIdBuilder_ = null;
                 }
                 name_ = "";
                 serviceType_ = 0;
                 if (serviceEndpointIdsBuilder_ == null) {
                     serviceEndpointIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    serviceEndpointIds_ = null;
                     serviceEndpointIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000008);
                 if (serviceConstraintsBuilder_ == null) {
                     serviceConstraints_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000002);
                 } else {
+                    serviceConstraints_ = null;
                     serviceConstraintsBuilder_.clear();
                 }
-                if (serviceStatusBuilder_ == null) {
-                    serviceStatus_ = null;
-                } else {
-                    serviceStatus_ = null;
+                bitField0_ = (bitField0_ & ~0x00000010);
+                serviceStatus_ = null;
+                if (serviceStatusBuilder_ != null) {
+                    serviceStatusBuilder_.dispose();
                     serviceStatusBuilder_ = null;
                 }
-                if (serviceConfigBuilder_ == null) {
-                    serviceConfig_ = null;
-                } else {
-                    serviceConfig_ = null;
+                serviceConfig_ = null;
+                if (serviceConfigBuilder_ != null) {
+                    serviceConfigBuilder_.dispose();
                     serviceConfigBuilder_ = null;
                 }
-                if (timestampBuilder_ == null) {
-                    timestamp_ = null;
-                } else {
-                    timestamp_ = null;
+                timestamp_ = null;
+                if (timestampBuilder_ != null) {
+                    timestampBuilder_.dispose();
                     timestampBuilder_ = null;
                 }
                 return this;
@@ -29362,79 +29175,55 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Service buildPartial() {
                 context.ContextOuterClass.Service result = new context.ContextOuterClass.Service(this);
-                int from_bitField0_ = bitField0_;
-                if (serviceIdBuilder_ == null) {
-                    result.serviceId_ = serviceId_;
-                } else {
-                    result.serviceId_ = serviceIdBuilder_.build();
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.name_ = name_;
-                result.serviceType_ = serviceType_;
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.Service result) {
                 if (serviceEndpointIdsBuilder_ == null) {
-                    if (((bitField0_ & 0x00000001) != 0)) {
+                    if (((bitField0_ & 0x00000008) != 0)) {
                         serviceEndpointIds_ = java.util.Collections.unmodifiableList(serviceEndpointIds_);
-                        bitField0_ = (bitField0_ & ~0x00000001);
+                        bitField0_ = (bitField0_ & ~0x00000008);
                     }
                     result.serviceEndpointIds_ = serviceEndpointIds_;
                 } else {
                     result.serviceEndpointIds_ = serviceEndpointIdsBuilder_.build();
                 }
                 if (serviceConstraintsBuilder_ == null) {
-                    if (((bitField0_ & 0x00000002) != 0)) {
+                    if (((bitField0_ & 0x00000010) != 0)) {
                         serviceConstraints_ = java.util.Collections.unmodifiableList(serviceConstraints_);
-                        bitField0_ = (bitField0_ & ~0x00000002);
+                        bitField0_ = (bitField0_ & ~0x00000010);
                     }
                     result.serviceConstraints_ = serviceConstraints_;
                 } else {
                     result.serviceConstraints_ = serviceConstraintsBuilder_.build();
                 }
-                if (serviceStatusBuilder_ == null) {
-                    result.serviceStatus_ = serviceStatus_;
-                } else {
-                    result.serviceStatus_ = serviceStatusBuilder_.build();
+            }
+
+            private void buildPartial0(context.ContextOuterClass.Service result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.serviceId_ = serviceIdBuilder_ == null ? serviceId_ : serviceIdBuilder_.build();
                 }
-                if (serviceConfigBuilder_ == null) {
-                    result.serviceConfig_ = serviceConfig_;
-                } else {
-                    result.serviceConfig_ = serviceConfigBuilder_.build();
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.name_ = name_;
                 }
-                if (timestampBuilder_ == null) {
-                    result.timestamp_ = timestamp_;
-                } else {
-                    result.timestamp_ = timestampBuilder_.build();
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.serviceType_ = serviceType_;
+                }
+                if (((from_bitField0_ & 0x00000020) != 0)) {
+                    result.serviceStatus_ = serviceStatusBuilder_ == null ? serviceStatus_ : serviceStatusBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000040) != 0)) {
+                    result.serviceConfig_ = serviceConfigBuilder_ == null ? serviceConfig_ : serviceConfigBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000080) != 0)) {
+                    result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
             }
 
             @java.lang.Override
@@ -29455,6 +29244,7 @@ public final class ContextOuterClass {
                 }
                 if (!other.getName().isEmpty()) {
                     name_ = other.name_;
+                    bitField0_ |= 0x00000002;
                     onChanged();
                 }
                 if (other.serviceType_ != 0) {
@@ -29464,7 +29254,7 @@ public final class ContextOuterClass {
                     if (!other.serviceEndpointIds_.isEmpty()) {
                         if (serviceEndpointIds_.isEmpty()) {
                             serviceEndpointIds_ = other.serviceEndpointIds_;
-                            bitField0_ = (bitField0_ & ~0x00000001);
+                            bitField0_ = (bitField0_ & ~0x00000008);
                         } else {
                             ensureServiceEndpointIdsIsMutable();
                             serviceEndpointIds_.addAll(other.serviceEndpointIds_);
@@ -29477,7 +29267,7 @@ public final class ContextOuterClass {
                             serviceEndpointIdsBuilder_.dispose();
                             serviceEndpointIdsBuilder_ = null;
                             serviceEndpointIds_ = other.serviceEndpointIds_;
-                            bitField0_ = (bitField0_ & ~0x00000001);
+                            bitField0_ = (bitField0_ & ~0x00000008);
                             serviceEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceEndpointIdsFieldBuilder() : null;
                         } else {
                             serviceEndpointIdsBuilder_.addAllMessages(other.serviceEndpointIds_);
@@ -29488,7 +29278,7 @@ public final class ContextOuterClass {
                     if (!other.serviceConstraints_.isEmpty()) {
                         if (serviceConstraints_.isEmpty()) {
                             serviceConstraints_ = other.serviceConstraints_;
-                            bitField0_ = (bitField0_ & ~0x00000002);
+                            bitField0_ = (bitField0_ & ~0x00000010);
                         } else {
                             ensureServiceConstraintsIsMutable();
                             serviceConstraints_.addAll(other.serviceConstraints_);
@@ -29501,7 +29291,7 @@ public final class ContextOuterClass {
                             serviceConstraintsBuilder_.dispose();
                             serviceConstraintsBuilder_ = null;
                             serviceConstraints_ = other.serviceConstraints_;
-                            bitField0_ = (bitField0_ & ~0x00000002);
+                            bitField0_ = (bitField0_ & ~0x00000010);
                             serviceConstraintsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceConstraintsFieldBuilder() : null;
                         } else {
                             serviceConstraintsBuilder_.addAllMessages(other.serviceConstraints_);
@@ -29517,7 +29307,7 @@ public final class ContextOuterClass {
                 if (other.hasTimestamp()) {
                     mergeTimestamp(other.getTimestamp());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -29529,17 +29319,101 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Service parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getServiceIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    name_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 24:
+                                {
+                                    serviceType_ = input.readEnum();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 24
+                            case 34:
+                                {
+                                    context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry);
+                                    if (serviceEndpointIdsBuilder_ == null) {
+                                        ensureServiceEndpointIdsIsMutable();
+                                        serviceEndpointIds_.add(m);
+                                    } else {
+                                        serviceEndpointIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 34
+                            case 42:
+                                {
+                                    context.ContextOuterClass.Constraint m = input.readMessage(context.ContextOuterClass.Constraint.parser(), extensionRegistry);
+                                    if (serviceConstraintsBuilder_ == null) {
+                                        ensureServiceConstraintsIsMutable();
+                                        serviceConstraints_.add(m);
+                                    } else {
+                                        serviceConstraintsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 42
+                            case 50:
+                                {
+                                    input.readMessage(getServiceStatusFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000020;
+                                    break;
+                                }
+                            // case 50
+                            case 58:
+                                {
+                                    input.readMessage(getServiceConfigFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000040;
+                                    break;
+                                }
+                            // case 58
+                            case 66:
+                                {
+                                    input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000080;
+                                    break;
+                                }
+                            // case 66
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Service) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -29554,7 +29428,7 @@ public final class ContextOuterClass {
              * @return Whether the serviceId field is set.
              */
             public boolean hasServiceId() {
-                return serviceIdBuilder_ != null || serviceId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -29578,10 +29452,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     serviceId_ = value;
-                    onChanged();
                 } else {
                     serviceIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -29591,10 +29466,11 @@ public final class ContextOuterClass {
             public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) {
                 if (serviceIdBuilder_ == null) {
                     serviceId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     serviceIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -29603,15 +29479,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) {
                 if (serviceIdBuilder_ == null) {
-                    if (serviceId_ != null) {
-                        serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && serviceId_ != null && serviceId_ != context.ContextOuterClass.ServiceId.getDefaultInstance()) {
+                        getServiceIdBuilder().mergeFrom(value);
                     } else {
                         serviceId_ = value;
                     }
-                    onChanged();
                 } else {
                     serviceIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -29619,13 +29496,13 @@ public final class ContextOuterClass {
              * .context.ServiceId service_id = 1;
              */
             public Builder clearServiceId() {
-                if (serviceIdBuilder_ == null) {
-                    serviceId_ = null;
-                    onChanged();
-                } else {
-                    serviceId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                serviceId_ = null;
+                if (serviceIdBuilder_ != null) {
+                    serviceIdBuilder_.dispose();
                     serviceIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -29633,6 +29510,7 @@ public final class ContextOuterClass {
              * .context.ServiceId service_id = 1;
              */
             public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getServiceIdFieldBuilder().getBuilder();
             }
@@ -29702,6 +29580,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 name_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -29712,6 +29591,7 @@ public final class ContextOuterClass {
              */
             public Builder clearName() {
                 name_ = getDefaultInstance().getName();
+                bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
             }
@@ -29727,6 +29607,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 name_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -29749,6 +29630,7 @@ public final class ContextOuterClass {
              */
             public Builder setServiceTypeValue(int value) {
                 serviceType_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -29759,8 +29641,7 @@ public final class ContextOuterClass {
              */
             @java.lang.Override
             public context.ContextOuterClass.ServiceTypeEnum getServiceType() {
-                @SuppressWarnings("deprecation")
-                context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.valueOf(serviceType_);
+                context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.forNumber(serviceType_);
                 return result == null ? context.ContextOuterClass.ServiceTypeEnum.UNRECOGNIZED : result;
             }
 
@@ -29773,6 +29654,7 @@ public final class ContextOuterClass {
                 if (value == null) {
                     throw new NullPointerException();
                 }
+                bitField0_ |= 0x00000004;
                 serviceType_ = value.getNumber();
                 onChanged();
                 return this;
@@ -29783,6 +29665,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearServiceType() {
+                bitField0_ = (bitField0_ & ~0x00000004);
                 serviceType_ = 0;
                 onChanged();
                 return this;
@@ -29791,9 +29674,9 @@ public final class ContextOuterClass {
             private java.util.List serviceEndpointIds_ = java.util.Collections.emptyList();
 
             private void ensureServiceEndpointIdsIsMutable() {
-                if (!((bitField0_ & 0x00000001) != 0)) {
+                if (!((bitField0_ & 0x00000008) != 0)) {
                     serviceEndpointIds_ = new java.util.ArrayList(serviceEndpointIds_);
-                    bitField0_ |= 0x00000001;
+                    bitField0_ |= 0x00000008;
                 }
             }
 
@@ -29945,7 +29828,7 @@ public final class ContextOuterClass {
             public Builder clearServiceEndpointIds() {
                 if (serviceEndpointIdsBuilder_ == null) {
                     serviceEndpointIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
+                    bitField0_ = (bitField0_ & ~0x00000008);
                     onChanged();
                 } else {
                     serviceEndpointIdsBuilder_.clear();
@@ -30019,7 +29902,7 @@ public final class ContextOuterClass {
 
             private com.google.protobuf.RepeatedFieldBuilderV3 getServiceEndpointIdsFieldBuilder() {
                 if (serviceEndpointIdsBuilder_ == null) {
-                    serviceEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
+                    serviceEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceEndpointIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
                     serviceEndpointIds_ = null;
                 }
                 return serviceEndpointIdsBuilder_;
@@ -30028,9 +29911,9 @@ public final class ContextOuterClass {
             private java.util.List serviceConstraints_ = java.util.Collections.emptyList();
 
             private void ensureServiceConstraintsIsMutable() {
-                if (!((bitField0_ & 0x00000002) != 0)) {
+                if (!((bitField0_ & 0x00000010) != 0)) {
                     serviceConstraints_ = new java.util.ArrayList(serviceConstraints_);
-                    bitField0_ |= 0x00000002;
+                    bitField0_ |= 0x00000010;
                 }
             }
 
@@ -30182,7 +30065,7 @@ public final class ContextOuterClass {
             public Builder clearServiceConstraints() {
                 if (serviceConstraintsBuilder_ == null) {
                     serviceConstraints_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000002);
+                    bitField0_ = (bitField0_ & ~0x00000010);
                     onChanged();
                 } else {
                     serviceConstraintsBuilder_.clear();
@@ -30256,7 +30139,7 @@ public final class ContextOuterClass {
 
             private com.google.protobuf.RepeatedFieldBuilderV3 getServiceConstraintsFieldBuilder() {
                 if (serviceConstraintsBuilder_ == null) {
-                    serviceConstraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceConstraints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
+                    serviceConstraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceConstraints_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean());
                     serviceConstraints_ = null;
                 }
                 return serviceConstraintsBuilder_;
@@ -30271,7 +30154,7 @@ public final class ContextOuterClass {
              * @return Whether the serviceStatus field is set.
              */
             public boolean hasServiceStatus() {
-                return serviceStatusBuilder_ != null || serviceStatus_ != null;
+                return ((bitField0_ & 0x00000020) != 0);
             }
 
             /**
@@ -30295,10 +30178,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     serviceStatus_ = value;
-                    onChanged();
                 } else {
                     serviceStatusBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000020;
+                onChanged();
                 return this;
             }
 
@@ -30308,10 +30192,11 @@ public final class ContextOuterClass {
             public Builder setServiceStatus(context.ContextOuterClass.ServiceStatus.Builder builderForValue) {
                 if (serviceStatusBuilder_ == null) {
                     serviceStatus_ = builderForValue.build();
-                    onChanged();
                 } else {
                     serviceStatusBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000020;
+                onChanged();
                 return this;
             }
 
@@ -30320,15 +30205,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeServiceStatus(context.ContextOuterClass.ServiceStatus value) {
                 if (serviceStatusBuilder_ == null) {
-                    if (serviceStatus_ != null) {
-                        serviceStatus_ = context.ContextOuterClass.ServiceStatus.newBuilder(serviceStatus_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000020) != 0) && serviceStatus_ != null && serviceStatus_ != context.ContextOuterClass.ServiceStatus.getDefaultInstance()) {
+                        getServiceStatusBuilder().mergeFrom(value);
                     } else {
                         serviceStatus_ = value;
                     }
-                    onChanged();
                 } else {
                     serviceStatusBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000020;
+                onChanged();
                 return this;
             }
 
@@ -30336,13 +30222,13 @@ public final class ContextOuterClass {
              * .context.ServiceStatus service_status = 6;
              */
             public Builder clearServiceStatus() {
-                if (serviceStatusBuilder_ == null) {
-                    serviceStatus_ = null;
-                    onChanged();
-                } else {
-                    serviceStatus_ = null;
+                bitField0_ = (bitField0_ & ~0x00000020);
+                serviceStatus_ = null;
+                if (serviceStatusBuilder_ != null) {
+                    serviceStatusBuilder_.dispose();
                     serviceStatusBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -30350,6 +30236,7 @@ public final class ContextOuterClass {
              * .context.ServiceStatus service_status = 6;
              */
             public context.ContextOuterClass.ServiceStatus.Builder getServiceStatusBuilder() {
+                bitField0_ |= 0x00000020;
                 onChanged();
                 return getServiceStatusFieldBuilder().getBuilder();
             }
@@ -30385,7 +30272,7 @@ public final class ContextOuterClass {
              * @return Whether the serviceConfig field is set.
              */
             public boolean hasServiceConfig() {
-                return serviceConfigBuilder_ != null || serviceConfig_ != null;
+                return ((bitField0_ & 0x00000040) != 0);
             }
 
             /**
@@ -30409,10 +30296,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     serviceConfig_ = value;
-                    onChanged();
                 } else {
                     serviceConfigBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000040;
+                onChanged();
                 return this;
             }
 
@@ -30422,10 +30310,11 @@ public final class ContextOuterClass {
             public Builder setServiceConfig(context.ContextOuterClass.ServiceConfig.Builder builderForValue) {
                 if (serviceConfigBuilder_ == null) {
                     serviceConfig_ = builderForValue.build();
-                    onChanged();
                 } else {
                     serviceConfigBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000040;
+                onChanged();
                 return this;
             }
 
@@ -30434,15 +30323,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeServiceConfig(context.ContextOuterClass.ServiceConfig value) {
                 if (serviceConfigBuilder_ == null) {
-                    if (serviceConfig_ != null) {
-                        serviceConfig_ = context.ContextOuterClass.ServiceConfig.newBuilder(serviceConfig_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000040) != 0) && serviceConfig_ != null && serviceConfig_ != context.ContextOuterClass.ServiceConfig.getDefaultInstance()) {
+                        getServiceConfigBuilder().mergeFrom(value);
                     } else {
                         serviceConfig_ = value;
                     }
-                    onChanged();
                 } else {
                     serviceConfigBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000040;
+                onChanged();
                 return this;
             }
 
@@ -30450,13 +30340,13 @@ public final class ContextOuterClass {
              * .context.ServiceConfig service_config = 7;
              */
             public Builder clearServiceConfig() {
-                if (serviceConfigBuilder_ == null) {
-                    serviceConfig_ = null;
-                    onChanged();
-                } else {
-                    serviceConfig_ = null;
+                bitField0_ = (bitField0_ & ~0x00000040);
+                serviceConfig_ = null;
+                if (serviceConfigBuilder_ != null) {
+                    serviceConfigBuilder_.dispose();
                     serviceConfigBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -30464,6 +30354,7 @@ public final class ContextOuterClass {
              * .context.ServiceConfig service_config = 7;
              */
             public context.ContextOuterClass.ServiceConfig.Builder getServiceConfigBuilder() {
+                bitField0_ |= 0x00000040;
                 onChanged();
                 return getServiceConfigFieldBuilder().getBuilder();
             }
@@ -30499,7 +30390,7 @@ public final class ContextOuterClass {
              * @return Whether the timestamp field is set.
              */
             public boolean hasTimestamp() {
-                return timestampBuilder_ != null || timestamp_ != null;
+                return ((bitField0_ & 0x00000080) != 0);
             }
 
             /**
@@ -30523,10 +30414,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     timestamp_ = value;
-                    onChanged();
                 } else {
                     timestampBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000080;
+                onChanged();
                 return this;
             }
 
@@ -30536,10 +30428,11 @@ public final class ContextOuterClass {
             public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) {
                 if (timestampBuilder_ == null) {
                     timestamp_ = builderForValue.build();
-                    onChanged();
                 } else {
                     timestampBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000080;
+                onChanged();
                 return this;
             }
 
@@ -30548,15 +30441,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) {
                 if (timestampBuilder_ == null) {
-                    if (timestamp_ != null) {
-                        timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000080) != 0) && timestamp_ != null && timestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) {
+                        getTimestampBuilder().mergeFrom(value);
                     } else {
                         timestamp_ = value;
                     }
-                    onChanged();
                 } else {
                     timestampBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000080;
+                onChanged();
                 return this;
             }
 
@@ -30564,13 +30458,13 @@ public final class ContextOuterClass {
              * .context.Timestamp timestamp = 8;
              */
             public Builder clearTimestamp() {
-                if (timestampBuilder_ == null) {
-                    timestamp_ = null;
-                    onChanged();
-                } else {
-                    timestamp_ = null;
+                bitField0_ = (bitField0_ & ~0x00000080);
+                timestamp_ = null;
+                if (timestampBuilder_ != null) {
+                    timestampBuilder_.dispose();
                     timestampBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -30578,6 +30472,7 @@ public final class ContextOuterClass {
              * .context.Timestamp timestamp = 8;
              */
             public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() {
+                bitField0_ |= 0x00000080;
                 onChanged();
                 return getTimestampFieldBuilder().getBuilder();
             }
@@ -30631,7 +30526,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Service parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Service(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -30689,50 +30594,6 @@ public final class ContextOuterClass {
             return new ServiceStatus();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ServiceStatus(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 8:
-                            {
-                                int rawValue = input.readEnum();
-                                serviceStatus_ = rawValue;
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ServiceStatus_descriptor;
         }
@@ -30744,7 +30605,7 @@ public final class ContextOuterClass {
 
         public static final int SERVICE_STATUS_FIELD_NUMBER = 1;
 
-        private int serviceStatus_;
+        private int serviceStatus_ = 0;
 
         /**
          * .context.ServiceStatusEnum service_status = 1;
@@ -30761,8 +30622,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ServiceStatusEnum getServiceStatus() {
-            @SuppressWarnings("deprecation")
-            context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.valueOf(serviceStatus_);
+            context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.forNumber(serviceStatus_);
             return result == null ? context.ContextOuterClass.ServiceStatusEnum.UNRECOGNIZED : result;
         }
 
@@ -30784,7 +30644,7 @@ public final class ContextOuterClass {
             if (serviceStatus_ != context.ContextOuterClass.ServiceStatusEnum.SERVICESTATUS_UNDEFINED.getNumber()) {
                 output.writeEnum(1, serviceStatus_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -30796,7 +30656,7 @@ public final class ContextOuterClass {
             if (serviceStatus_ != context.ContextOuterClass.ServiceStatusEnum.SERVICESTATUS_UNDEFINED.getNumber()) {
                 size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, serviceStatus_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -30812,7 +30672,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.ServiceStatus other = (context.ContextOuterClass.ServiceStatus) obj;
             if (serviceStatus_ != other.serviceStatus_)
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -30826,7 +30686,7 @@ public final class ContextOuterClass {
             hash = (19 * hash) + getDescriptor().hashCode();
             hash = (37 * hash) + SERVICE_STATUS_FIELD_NUMBER;
             hash = (53 * hash) + serviceStatus_;
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -30920,22 +30780,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ServiceStatus.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 serviceStatus_ = 0;
                 return this;
             }
@@ -30962,39 +30816,18 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ServiceStatus buildPartial() {
                 context.ContextOuterClass.ServiceStatus result = new context.ContextOuterClass.ServiceStatus(this);
-                result.serviceStatus_ = serviceStatus_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ServiceStatus result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.serviceStatus_ = serviceStatus_;
+                }
             }
 
             @java.lang.Override
@@ -31013,7 +30846,7 @@ public final class ContextOuterClass {
                 if (other.serviceStatus_ != 0) {
                     setServiceStatusValue(other.getServiceStatusValue());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -31025,20 +30858,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ServiceStatus parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 8:
+                                {
+                                    serviceStatus_ = input.readEnum();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 8
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ServiceStatus) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private int serviceStatus_ = 0;
 
             /**
@@ -31057,6 +30917,7 @@ public final class ContextOuterClass {
              */
             public Builder setServiceStatusValue(int value) {
                 serviceStatus_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -31067,8 +30928,7 @@ public final class ContextOuterClass {
              */
             @java.lang.Override
             public context.ContextOuterClass.ServiceStatusEnum getServiceStatus() {
-                @SuppressWarnings("deprecation")
-                context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.valueOf(serviceStatus_);
+                context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.forNumber(serviceStatus_);
                 return result == null ? context.ContextOuterClass.ServiceStatusEnum.UNRECOGNIZED : result;
             }
 
@@ -31081,6 +30941,7 @@ public final class ContextOuterClass {
                 if (value == null) {
                     throw new NullPointerException();
                 }
+                bitField0_ |= 0x00000001;
                 serviceStatus_ = value.getNumber();
                 onChanged();
                 return this;
@@ -31091,6 +30952,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearServiceStatus() {
+                bitField0_ = (bitField0_ & ~0x00000001);
                 serviceStatus_ = 0;
                 onChanged();
                 return this;
@@ -31123,7 +30985,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ServiceStatus parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ServiceStatus(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -31194,57 +31066,6 @@ public final class ContextOuterClass {
             return new ServiceConfig();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ServiceConfig(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    configRules_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                configRules_.add(input.readMessage(context.ContextOuterClass.ConfigRule.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    configRules_ = java.util.Collections.unmodifiableList(configRules_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ServiceConfig_descriptor;
         }
@@ -31256,6 +31077,7 @@ public final class ContextOuterClass {
 
         public static final int CONFIG_RULES_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List configRules_;
 
         /**
@@ -31316,7 +31138,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < configRules_.size(); i++) {
                 output.writeMessage(1, configRules_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -31328,7 +31150,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < configRules_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configRules_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -31344,7 +31166,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.ServiceConfig other = (context.ContextOuterClass.ServiceConfig) obj;
             if (!getConfigRulesList().equals(other.getConfigRulesList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -31360,7 +31182,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER;
                 hash = (53 * hash) + getConfigRulesList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -31454,29 +31276,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ServiceConfig.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getConfigRulesFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (configRulesBuilder_ == null) {
                     configRules_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    configRules_ = null;
                     configRulesBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -31502,7 +31318,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ServiceConfig buildPartial() {
                 context.ContextOuterClass.ServiceConfig result = new context.ContextOuterClass.ServiceConfig(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.ServiceConfig result) {
                 if (configRulesBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         configRules_ = java.util.Collections.unmodifiableList(configRules_);
@@ -31512,38 +31336,10 @@ public final class ContextOuterClass {
                 } else {
                     result.configRules_ = configRulesBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
             }
 
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ServiceConfig result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -31583,7 +31379,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -31595,17 +31391,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ServiceConfig parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.ConfigRule m = input.readMessage(context.ContextOuterClass.ConfigRule.parser(), extensionRegistry);
+                                    if (configRulesBuilder_ == null) {
+                                        ensureConfigRulesIsMutable();
+                                        configRules_.add(m);
+                                    } else {
+                                        configRulesBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ServiceConfig) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -31875,7 +31701,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ServiceConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ServiceConfig(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -31946,57 +31782,6 @@ public final class ContextOuterClass {
             return new ServiceIdList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ServiceIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    serviceIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                serviceIds_.add(input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ServiceIdList_descriptor;
         }
@@ -32008,6 +31793,7 @@ public final class ContextOuterClass {
 
         public static final int SERVICE_IDS_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List serviceIds_;
 
         /**
@@ -32068,7 +31854,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < serviceIds_.size(); i++) {
                 output.writeMessage(1, serviceIds_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -32080,7 +31866,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < serviceIds_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, serviceIds_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -32096,7 +31882,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.ServiceIdList other = (context.ContextOuterClass.ServiceIdList) obj;
             if (!getServiceIdsList().equals(other.getServiceIdsList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -32112,7 +31898,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER;
                 hash = (53 * hash) + getServiceIdsList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -32206,29 +31992,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ServiceIdList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getServiceIdsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (serviceIdsBuilder_ == null) {
                     serviceIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    serviceIds_ = null;
                     serviceIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -32254,7 +32034,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ServiceIdList buildPartial() {
                 context.ContextOuterClass.ServiceIdList result = new context.ContextOuterClass.ServiceIdList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.ServiceIdList result) {
                 if (serviceIdsBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_);
@@ -32264,38 +32052,10 @@ public final class ContextOuterClass {
                 } else {
                     result.serviceIds_ = serviceIdsBuilder_.build();
                 }
-                onBuilt();
-                return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ServiceIdList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -32335,7 +32095,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -32347,17 +32107,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ServiceIdList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.ServiceId m = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry);
+                                    if (serviceIdsBuilder_ == null) {
+                                        ensureServiceIdsIsMutable();
+                                        serviceIds_.add(m);
+                                    } else {
+                                        serviceIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ServiceIdList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -32627,7 +32417,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ServiceIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ServiceIdList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -32698,57 +32498,6 @@ public final class ContextOuterClass {
             return new ServiceList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ServiceList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    services_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                services_.add(input.readMessage(context.ContextOuterClass.Service.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    services_ = java.util.Collections.unmodifiableList(services_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ServiceList_descriptor;
         }
@@ -32760,6 +32509,7 @@ public final class ContextOuterClass {
 
         public static final int SERVICES_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List services_;
 
         /**
@@ -32820,7 +32570,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < services_.size(); i++) {
                 output.writeMessage(1, services_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -32832,7 +32582,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < services_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, services_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -32848,7 +32598,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.ServiceList other = (context.ContextOuterClass.ServiceList) obj;
             if (!getServicesList().equals(other.getServicesList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -32864,7 +32614,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + SERVICES_FIELD_NUMBER;
                 hash = (53 * hash) + getServicesList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -32958,29 +32708,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ServiceList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getServicesFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (servicesBuilder_ == null) {
                     services_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    services_ = null;
                     servicesBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -33006,7 +32750,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ServiceList buildPartial() {
                 context.ContextOuterClass.ServiceList result = new context.ContextOuterClass.ServiceList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.ServiceList result) {
                 if (servicesBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         services_ = java.util.Collections.unmodifiableList(services_);
@@ -33016,38 +32768,10 @@ public final class ContextOuterClass {
                 } else {
                     result.services_ = servicesBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
             }
 
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ServiceList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -33087,7 +32811,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -33099,17 +32823,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ServiceList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.Service m = input.readMessage(context.ContextOuterClass.Service.parser(), extensionRegistry);
+                                    if (servicesBuilder_ == null) {
+                                        ensureServicesIsMutable();
+                                        services_.add(m);
+                                    } else {
+                                        servicesBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ServiceList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -33379,7 +33133,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ServiceList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ServiceList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -33459,72 +33223,6 @@ public final class ContextOuterClass {
             return new ServiceFilter();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ServiceFilter(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.ServiceIdList.Builder subBuilder = null;
-                                if (serviceIds_ != null) {
-                                    subBuilder = serviceIds_.toBuilder();
-                                }
-                                serviceIds_ = input.readMessage(context.ContextOuterClass.ServiceIdList.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(serviceIds_);
-                                    serviceIds_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 16:
-                            {
-                                includeEndpointIds_ = input.readBool();
-                                break;
-                            }
-                        case 24:
-                            {
-                                includeConstraints_ = input.readBool();
-                                break;
-                            }
-                        case 32:
-                            {
-                                includeConfigRules_ = input.readBool();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ServiceFilter_descriptor;
         }
@@ -33561,12 +33259,12 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder() {
-            return getServiceIds();
+            return serviceIds_ == null ? context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_;
         }
 
         public static final int INCLUDE_ENDPOINT_IDS_FIELD_NUMBER = 2;
 
-        private boolean includeEndpointIds_;
+        private boolean includeEndpointIds_ = false;
 
         /**
          * bool include_endpoint_ids = 2;
@@ -33579,7 +33277,7 @@ public final class ContextOuterClass {
 
         public static final int INCLUDE_CONSTRAINTS_FIELD_NUMBER = 3;
 
-        private boolean includeConstraints_;
+        private boolean includeConstraints_ = false;
 
         /**
          * bool include_constraints = 3;
@@ -33592,7 +33290,7 @@ public final class ContextOuterClass {
 
         public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 4;
 
-        private boolean includeConfigRules_;
+        private boolean includeConfigRules_ = false;
 
         /**
          * bool include_config_rules = 4;
@@ -33630,7 +33328,7 @@ public final class ContextOuterClass {
             if (includeConfigRules_ != false) {
                 output.writeBool(4, includeConfigRules_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -33651,7 +33349,7 @@ public final class ContextOuterClass {
             if (includeConfigRules_ != false) {
                 size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includeConfigRules_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -33677,7 +33375,7 @@ public final class ContextOuterClass {
                 return false;
             if (getIncludeConfigRules() != other.getIncludeConfigRules())
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -33699,7 +33397,7 @@ public final class ContextOuterClass {
             hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeConstraints());
             hash = (37 * hash) + INCLUDE_CONFIG_RULES_FIELD_NUMBER;
             hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeConfigRules());
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -33793,26 +33491,19 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ServiceFilter.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (serviceIdsBuilder_ == null) {
-                    serviceIds_ = null;
-                } else {
-                    serviceIds_ = null;
+                bitField0_ = 0;
+                serviceIds_ = null;
+                if (serviceIdsBuilder_ != null) {
+                    serviceIdsBuilder_.dispose();
                     serviceIdsBuilder_ = null;
                 }
                 includeEndpointIds_ = false;
@@ -33843,46 +33534,27 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ServiceFilter buildPartial() {
                 context.ContextOuterClass.ServiceFilter result = new context.ContextOuterClass.ServiceFilter(this);
-                if (serviceIdsBuilder_ == null) {
-                    result.serviceIds_ = serviceIds_;
-                } else {
-                    result.serviceIds_ = serviceIdsBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.includeEndpointIds_ = includeEndpointIds_;
-                result.includeConstraints_ = includeConstraints_;
-                result.includeConfigRules_ = includeConfigRules_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ServiceFilter result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.serviceIds_ = serviceIdsBuilder_ == null ? serviceIds_ : serviceIdsBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.includeEndpointIds_ = includeEndpointIds_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.includeConstraints_ = includeConstraints_;
+                }
+                if (((from_bitField0_ & 0x00000008) != 0)) {
+                    result.includeConfigRules_ = includeConfigRules_;
+                }
             }
 
             @java.lang.Override
@@ -33910,7 +33582,7 @@ public final class ContextOuterClass {
                 if (other.getIncludeConfigRules() != false) {
                     setIncludeConfigRules(other.getIncludeConfigRules());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -33922,20 +33594,68 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ServiceFilter parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getServiceIdsFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 16:
+                                {
+                                    includeEndpointIds_ = input.readBool();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 16
+                            case 24:
+                                {
+                                    includeConstraints_ = input.readBool();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 24
+                            case 32:
+                                {
+                                    includeConfigRules_ = input.readBool();
+                                    bitField0_ |= 0x00000008;
+                                    break;
+                                }
+                            // case 32
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ServiceFilter) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.ServiceIdList serviceIds_;
 
             private com.google.protobuf.SingleFieldBuilderV3 serviceIdsBuilder_;
@@ -33945,7 +33665,7 @@ public final class ContextOuterClass {
              * @return Whether the serviceIds field is set.
              */
             public boolean hasServiceIds() {
-                return serviceIdsBuilder_ != null || serviceIds_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -33969,10 +33689,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     serviceIds_ = value;
-                    onChanged();
                 } else {
                     serviceIdsBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -33982,10 +33703,11 @@ public final class ContextOuterClass {
             public Builder setServiceIds(context.ContextOuterClass.ServiceIdList.Builder builderForValue) {
                 if (serviceIdsBuilder_ == null) {
                     serviceIds_ = builderForValue.build();
-                    onChanged();
                 } else {
                     serviceIdsBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -33994,15 +33716,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeServiceIds(context.ContextOuterClass.ServiceIdList value) {
                 if (serviceIdsBuilder_ == null) {
-                    if (serviceIds_ != null) {
-                        serviceIds_ = context.ContextOuterClass.ServiceIdList.newBuilder(serviceIds_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && serviceIds_ != null && serviceIds_ != context.ContextOuterClass.ServiceIdList.getDefaultInstance()) {
+                        getServiceIdsBuilder().mergeFrom(value);
                     } else {
                         serviceIds_ = value;
                     }
-                    onChanged();
                 } else {
                     serviceIdsBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -34010,13 +33733,13 @@ public final class ContextOuterClass {
              * .context.ServiceIdList service_ids = 1;
              */
             public Builder clearServiceIds() {
-                if (serviceIdsBuilder_ == null) {
-                    serviceIds_ = null;
-                    onChanged();
-                } else {
-                    serviceIds_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                serviceIds_ = null;
+                if (serviceIdsBuilder_ != null) {
+                    serviceIdsBuilder_.dispose();
                     serviceIdsBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -34024,6 +33747,7 @@ public final class ContextOuterClass {
              * .context.ServiceIdList service_ids = 1;
              */
             public context.ContextOuterClass.ServiceIdList.Builder getServiceIdsBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getServiceIdsFieldBuilder().getBuilder();
             }
@@ -34068,6 +33792,7 @@ public final class ContextOuterClass {
              */
             public Builder setIncludeEndpointIds(boolean value) {
                 includeEndpointIds_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -34077,6 +33802,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearIncludeEndpointIds() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 includeEndpointIds_ = false;
                 onChanged();
                 return this;
@@ -34100,6 +33826,7 @@ public final class ContextOuterClass {
              */
             public Builder setIncludeConstraints(boolean value) {
                 includeConstraints_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -34109,6 +33836,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearIncludeConstraints() {
+                bitField0_ = (bitField0_ & ~0x00000004);
                 includeConstraints_ = false;
                 onChanged();
                 return this;
@@ -34132,6 +33860,7 @@ public final class ContextOuterClass {
              */
             public Builder setIncludeConfigRules(boolean value) {
                 includeConfigRules_ = value;
+                bitField0_ |= 0x00000008;
                 onChanged();
                 return this;
             }
@@ -34141,6 +33870,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearIncludeConfigRules() {
+                bitField0_ = (bitField0_ & ~0x00000008);
                 includeConfigRules_ = false;
                 onChanged();
                 return this;
@@ -34173,7 +33903,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ServiceFilter parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ServiceFilter(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -34252,70 +33992,6 @@ public final class ContextOuterClass {
             return new ServiceEvent();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ServiceEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Event.Builder subBuilder = null;
-                                if (event_ != null) {
-                                    subBuilder = event_.toBuilder();
-                                }
-                                event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(event_);
-                                    event_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.ServiceId.Builder subBuilder = null;
-                                if (serviceId_ != null) {
-                                    subBuilder = serviceId_.toBuilder();
-                                }
-                                serviceId_ = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(serviceId_);
-                                    serviceId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ServiceEvent_descriptor;
         }
@@ -34352,7 +34028,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() {
-            return getEvent();
+            return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_;
         }
 
         public static final int SERVICE_ID_FIELD_NUMBER = 2;
@@ -34382,7 +34058,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() {
-            return getServiceId();
+            return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -34406,7 +34082,7 @@ public final class ContextOuterClass {
             if (serviceId_ != null) {
                 output.writeMessage(2, getServiceId());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -34421,7 +34097,7 @@ public final class ContextOuterClass {
             if (serviceId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServiceId());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -34447,7 +34123,7 @@ public final class ContextOuterClass {
                 if (!getServiceId().equals(other.getServiceId()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -34467,7 +34143,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER;
                 hash = (53 * hash) + getServiceId().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -34561,32 +34237,24 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ServiceEvent.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (eventBuilder_ == null) {
-                    event_ = null;
-                } else {
-                    event_ = null;
+                bitField0_ = 0;
+                event_ = null;
+                if (eventBuilder_ != null) {
+                    eventBuilder_.dispose();
                     eventBuilder_ = null;
                 }
-                if (serviceIdBuilder_ == null) {
-                    serviceId_ = null;
-                } else {
-                    serviceId_ = null;
+                serviceId_ = null;
+                if (serviceIdBuilder_ != null) {
+                    serviceIdBuilder_.dispose();
                     serviceIdBuilder_ = null;
                 }
                 return this;
@@ -34614,48 +34282,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ServiceEvent buildPartial() {
                 context.ContextOuterClass.ServiceEvent result = new context.ContextOuterClass.ServiceEvent(this);
-                if (eventBuilder_ == null) {
-                    result.event_ = event_;
-                } else {
-                    result.event_ = eventBuilder_.build();
-                }
-                if (serviceIdBuilder_ == null) {
-                    result.serviceId_ = serviceId_;
-                } else {
-                    result.serviceId_ = serviceIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ServiceEvent result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.serviceId_ = serviceIdBuilder_ == null ? serviceId_ : serviceIdBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -34677,7 +34318,7 @@ public final class ContextOuterClass {
                 if (other.hasServiceId()) {
                     mergeServiceId(other.getServiceId());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -34689,20 +34330,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ServiceEvent parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getServiceIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ServiceEvent) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.Event event_;
 
             private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_;
@@ -34712,7 +34387,7 @@ public final class ContextOuterClass {
              * @return Whether the event field is set.
              */
             public boolean hasEvent() {
-                return eventBuilder_ != null || event_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -34736,10 +34411,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     event_ = value;
-                    onChanged();
                 } else {
                     eventBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -34749,10 +34425,11 @@ public final class ContextOuterClass {
             public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) {
                 if (eventBuilder_ == null) {
                     event_ = builderForValue.build();
-                    onChanged();
                 } else {
                     eventBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -34761,15 +34438,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeEvent(context.ContextOuterClass.Event value) {
                 if (eventBuilder_ == null) {
-                    if (event_ != null) {
-                        event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) {
+                        getEventBuilder().mergeFrom(value);
                     } else {
                         event_ = value;
                     }
-                    onChanged();
                 } else {
                     eventBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -34777,13 +34455,13 @@ public final class ContextOuterClass {
              * .context.Event event = 1;
              */
             public Builder clearEvent() {
-                if (eventBuilder_ == null) {
-                    event_ = null;
-                    onChanged();
-                } else {
-                    event_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                event_ = null;
+                if (eventBuilder_ != null) {
+                    eventBuilder_.dispose();
                     eventBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -34791,6 +34469,7 @@ public final class ContextOuterClass {
              * .context.Event event = 1;
              */
             public context.ContextOuterClass.Event.Builder getEventBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getEventFieldBuilder().getBuilder();
             }
@@ -34826,7 +34505,7 @@ public final class ContextOuterClass {
              * @return Whether the serviceId field is set.
              */
             public boolean hasServiceId() {
-                return serviceIdBuilder_ != null || serviceId_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -34850,10 +34529,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     serviceId_ = value;
-                    onChanged();
                 } else {
                     serviceIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -34863,10 +34543,11 @@ public final class ContextOuterClass {
             public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) {
                 if (serviceIdBuilder_ == null) {
                     serviceId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     serviceIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -34875,15 +34556,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) {
                 if (serviceIdBuilder_ == null) {
-                    if (serviceId_ != null) {
-                        serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && serviceId_ != null && serviceId_ != context.ContextOuterClass.ServiceId.getDefaultInstance()) {
+                        getServiceIdBuilder().mergeFrom(value);
                     } else {
                         serviceId_ = value;
                     }
-                    onChanged();
                 } else {
                     serviceIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -34891,13 +34573,13 @@ public final class ContextOuterClass {
              * .context.ServiceId service_id = 2;
              */
             public Builder clearServiceId() {
-                if (serviceIdBuilder_ == null) {
-                    serviceId_ = null;
-                    onChanged();
-                } else {
-                    serviceId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                serviceId_ = null;
+                if (serviceIdBuilder_ != null) {
+                    serviceIdBuilder_.dispose();
                     serviceIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -34905,6 +34587,7 @@ public final class ContextOuterClass {
              * .context.ServiceId service_id = 2;
              */
             public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getServiceIdFieldBuilder().getBuilder();
             }
@@ -34958,7 +34641,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ServiceEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ServiceEvent(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -35041,70 +34734,6 @@ public final class ContextOuterClass {
             return new SliceId();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private SliceId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.ContextId.Builder subBuilder = null;
-                                if (contextId_ != null) {
-                                    subBuilder = contextId_.toBuilder();
-                                }
-                                contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(contextId_);
-                                    contextId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.Uuid.Builder subBuilder = null;
-                                if (sliceUuid_ != null) {
-                                    subBuilder = sliceUuid_.toBuilder();
-                                }
-                                sliceUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(sliceUuid_);
-                                    sliceUuid_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_SliceId_descriptor;
         }
@@ -35141,7 +34770,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() {
-            return getContextId();
+            return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_;
         }
 
         public static final int SLICE_UUID_FIELD_NUMBER = 2;
@@ -35171,7 +34800,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder() {
-            return getSliceUuid();
+            return sliceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -35195,7 +34824,7 @@ public final class ContextOuterClass {
             if (sliceUuid_ != null) {
                 output.writeMessage(2, getSliceUuid());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -35210,7 +34839,7 @@ public final class ContextOuterClass {
             if (sliceUuid_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSliceUuid());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -35236,7 +34865,7 @@ public final class ContextOuterClass {
                 if (!getSliceUuid().equals(other.getSliceUuid()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -35256,7 +34885,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + SLICE_UUID_FIELD_NUMBER;
                 hash = (53 * hash) + getSliceUuid().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -35354,32 +34983,24 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.SliceId.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (contextIdBuilder_ == null) {
-                    contextId_ = null;
-                } else {
-                    contextId_ = null;
+                bitField0_ = 0;
+                contextId_ = null;
+                if (contextIdBuilder_ != null) {
+                    contextIdBuilder_.dispose();
                     contextIdBuilder_ = null;
                 }
-                if (sliceUuidBuilder_ == null) {
-                    sliceUuid_ = null;
-                } else {
-                    sliceUuid_ = null;
+                sliceUuid_ = null;
+                if (sliceUuidBuilder_ != null) {
+                    sliceUuidBuilder_.dispose();
                     sliceUuidBuilder_ = null;
                 }
                 return this;
@@ -35407,48 +35028,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.SliceId buildPartial() {
                 context.ContextOuterClass.SliceId result = new context.ContextOuterClass.SliceId(this);
-                if (contextIdBuilder_ == null) {
-                    result.contextId_ = contextId_;
-                } else {
-                    result.contextId_ = contextIdBuilder_.build();
-                }
-                if (sliceUuidBuilder_ == null) {
-                    result.sliceUuid_ = sliceUuid_;
-                } else {
-                    result.sliceUuid_ = sliceUuidBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.SliceId result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.sliceUuid_ = sliceUuidBuilder_ == null ? sliceUuid_ : sliceUuidBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -35470,7 +35064,7 @@ public final class ContextOuterClass {
                 if (other.hasSliceUuid()) {
                     mergeSliceUuid(other.getSliceUuid());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -35482,20 +35076,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.SliceId parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getSliceUuidFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.SliceId) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.ContextId contextId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_;
@@ -35505,7 +35133,7 @@ public final class ContextOuterClass {
              * @return Whether the contextId field is set.
              */
             public boolean hasContextId() {
-                return contextIdBuilder_ != null || contextId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -35529,10 +35157,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     contextId_ = value;
-                    onChanged();
                 } else {
                     contextIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -35542,10 +35171,11 @@ public final class ContextOuterClass {
             public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) {
                 if (contextIdBuilder_ == null) {
                     contextId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     contextIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -35554,15 +35184,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeContextId(context.ContextOuterClass.ContextId value) {
                 if (contextIdBuilder_ == null) {
-                    if (contextId_ != null) {
-                        contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) {
+                        getContextIdBuilder().mergeFrom(value);
                     } else {
                         contextId_ = value;
                     }
-                    onChanged();
                 } else {
                     contextIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -35570,13 +35201,13 @@ public final class ContextOuterClass {
              * .context.ContextId context_id = 1;
              */
             public Builder clearContextId() {
-                if (contextIdBuilder_ == null) {
-                    contextId_ = null;
-                    onChanged();
-                } else {
-                    contextId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                contextId_ = null;
+                if (contextIdBuilder_ != null) {
+                    contextIdBuilder_.dispose();
                     contextIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -35584,6 +35215,7 @@ public final class ContextOuterClass {
              * .context.ContextId context_id = 1;
              */
             public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getContextIdFieldBuilder().getBuilder();
             }
@@ -35619,7 +35251,7 @@ public final class ContextOuterClass {
              * @return Whether the sliceUuid field is set.
              */
             public boolean hasSliceUuid() {
-                return sliceUuidBuilder_ != null || sliceUuid_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -35643,10 +35275,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     sliceUuid_ = value;
-                    onChanged();
                 } else {
                     sliceUuidBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -35656,10 +35289,11 @@ public final class ContextOuterClass {
             public Builder setSliceUuid(context.ContextOuterClass.Uuid.Builder builderForValue) {
                 if (sliceUuidBuilder_ == null) {
                     sliceUuid_ = builderForValue.build();
-                    onChanged();
                 } else {
                     sliceUuidBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -35668,15 +35302,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeSliceUuid(context.ContextOuterClass.Uuid value) {
                 if (sliceUuidBuilder_ == null) {
-                    if (sliceUuid_ != null) {
-                        sliceUuid_ = context.ContextOuterClass.Uuid.newBuilder(sliceUuid_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && sliceUuid_ != null && sliceUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) {
+                        getSliceUuidBuilder().mergeFrom(value);
                     } else {
                         sliceUuid_ = value;
                     }
-                    onChanged();
                 } else {
                     sliceUuidBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -35684,13 +35319,13 @@ public final class ContextOuterClass {
              * .context.Uuid slice_uuid = 2;
              */
             public Builder clearSliceUuid() {
-                if (sliceUuidBuilder_ == null) {
-                    sliceUuid_ = null;
-                    onChanged();
-                } else {
-                    sliceUuid_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                sliceUuid_ = null;
+                if (sliceUuidBuilder_ != null) {
+                    sliceUuidBuilder_.dispose();
                     sliceUuidBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -35698,6 +35333,7 @@ public final class ContextOuterClass {
              * .context.Uuid slice_uuid = 2;
              */
             public context.ContextOuterClass.Uuid.Builder getSliceUuidBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getSliceUuidFieldBuilder().getBuilder();
             }
@@ -35751,7 +35387,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public SliceId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new SliceId(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -35998,164 +35644,6 @@ public final class ContextOuterClass {
             return new Slice();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Slice(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.SliceId.Builder subBuilder = null;
-                                if (sliceId_ != null) {
-                                    subBuilder = sliceId_.toBuilder();
-                                }
-                                sliceId_ = input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(sliceId_);
-                                    sliceId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                name_ = s;
-                                break;
-                            }
-                        case 26:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    sliceEndpointIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                sliceEndpointIds_.add(input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry));
-                                break;
-                            }
-                        case 34:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000002) != 0)) {
-                                    sliceConstraints_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000002;
-                                }
-                                sliceConstraints_.add(input.readMessage(context.ContextOuterClass.Constraint.parser(), extensionRegistry));
-                                break;
-                            }
-                        case 42:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000004) != 0)) {
-                                    sliceServiceIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000004;
-                                }
-                                sliceServiceIds_.add(input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry));
-                                break;
-                            }
-                        case 50:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000008) != 0)) {
-                                    sliceSubsliceIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000008;
-                                }
-                                sliceSubsliceIds_.add(input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry));
-                                break;
-                            }
-                        case 58:
-                            {
-                                context.ContextOuterClass.SliceStatus.Builder subBuilder = null;
-                                if (sliceStatus_ != null) {
-                                    subBuilder = sliceStatus_.toBuilder();
-                                }
-                                sliceStatus_ = input.readMessage(context.ContextOuterClass.SliceStatus.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(sliceStatus_);
-                                    sliceStatus_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 66:
-                            {
-                                context.ContextOuterClass.SliceConfig.Builder subBuilder = null;
-                                if (sliceConfig_ != null) {
-                                    subBuilder = sliceConfig_.toBuilder();
-                                }
-                                sliceConfig_ = input.readMessage(context.ContextOuterClass.SliceConfig.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(sliceConfig_);
-                                    sliceConfig_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 74:
-                            {
-                                context.ContextOuterClass.SliceOwner.Builder subBuilder = null;
-                                if (sliceOwner_ != null) {
-                                    subBuilder = sliceOwner_.toBuilder();
-                                }
-                                sliceOwner_ = input.readMessage(context.ContextOuterClass.SliceOwner.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(sliceOwner_);
-                                    sliceOwner_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 82:
-                            {
-                                context.ContextOuterClass.Timestamp.Builder subBuilder = null;
-                                if (timestamp_ != null) {
-                                    subBuilder = timestamp_.toBuilder();
-                                }
-                                timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(timestamp_);
-                                    timestamp_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    sliceEndpointIds_ = java.util.Collections.unmodifiableList(sliceEndpointIds_);
-                }
-                if (((mutable_bitField0_ & 0x00000002) != 0)) {
-                    sliceConstraints_ = java.util.Collections.unmodifiableList(sliceConstraints_);
-                }
-                if (((mutable_bitField0_ & 0x00000004) != 0)) {
-                    sliceServiceIds_ = java.util.Collections.unmodifiableList(sliceServiceIds_);
-                }
-                if (((mutable_bitField0_ & 0x00000008) != 0)) {
-                    sliceSubsliceIds_ = java.util.Collections.unmodifiableList(sliceSubsliceIds_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Slice_descriptor;
         }
@@ -36192,12 +35680,13 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() {
-            return getSliceId();
+            return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_;
         }
 
         public static final int NAME_FIELD_NUMBER = 2;
 
-        private volatile java.lang.Object name_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object name_ = "";
 
         /**
          * string name = 2;
@@ -36234,6 +35723,7 @@ public final class ContextOuterClass {
 
         public static final int SLICE_ENDPOINT_IDS_FIELD_NUMBER = 3;
 
+        @SuppressWarnings("serial")
         private java.util.List sliceEndpointIds_;
 
         /**
@@ -36278,6 +35768,7 @@ public final class ContextOuterClass {
 
         public static final int SLICE_CONSTRAINTS_FIELD_NUMBER = 4;
 
+        @SuppressWarnings("serial")
         private java.util.List sliceConstraints_;
 
         /**
@@ -36322,6 +35813,7 @@ public final class ContextOuterClass {
 
         public static final int SLICE_SERVICE_IDS_FIELD_NUMBER = 5;
 
+        @SuppressWarnings("serial")
         private java.util.List sliceServiceIds_;
 
         /**
@@ -36366,6 +35858,7 @@ public final class ContextOuterClass {
 
         public static final int SLICE_SUBSLICE_IDS_FIELD_NUMBER = 6;
 
+        @SuppressWarnings("serial")
         private java.util.List sliceSubsliceIds_;
 
         /**
@@ -36435,7 +35928,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder() {
-            return getSliceStatus();
+            return sliceStatus_ == null ? context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_;
         }
 
         public static final int SLICE_CONFIG_FIELD_NUMBER = 8;
@@ -36465,7 +35958,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder() {
-            return getSliceConfig();
+            return sliceConfig_ == null ? context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_;
         }
 
         public static final int SLICE_OWNER_FIELD_NUMBER = 9;
@@ -36495,7 +35988,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder() {
-            return getSliceOwner();
+            return sliceOwner_ == null ? context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_;
         }
 
         public static final int TIMESTAMP_FIELD_NUMBER = 10;
@@ -36525,7 +36018,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() {
-            return getTimestamp();
+            return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -36546,7 +36039,7 @@ public final class ContextOuterClass {
             if (sliceId_ != null) {
                 output.writeMessage(1, getSliceId());
             }
-            if (!getNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
             }
             for (int i = 0; i < sliceEndpointIds_.size(); i++) {
@@ -36573,7 +36066,7 @@ public final class ContextOuterClass {
             if (timestamp_ != null) {
                 output.writeMessage(10, getTimestamp());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -36585,7 +36078,7 @@ public final class ContextOuterClass {
             if (sliceId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSliceId());
             }
-            if (!getNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
             }
             for (int i = 0; i < sliceEndpointIds_.size(); i++) {
@@ -36612,7 +36105,7 @@ public final class ContextOuterClass {
             if (timestamp_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getTimestamp());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -36666,7 +36159,7 @@ public final class ContextOuterClass {
                 if (!getTimestamp().equals(other.getTimestamp()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -36716,7 +36209,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
                 hash = (53 * hash) + getTimestamp().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -36810,79 +36303,68 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Slice.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getSliceEndpointIdsFieldBuilder();
-                    getSliceConstraintsFieldBuilder();
-                    getSliceServiceIdsFieldBuilder();
-                    getSliceSubsliceIdsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (sliceIdBuilder_ == null) {
-                    sliceId_ = null;
-                } else {
-                    sliceId_ = null;
+                bitField0_ = 0;
+                sliceId_ = null;
+                if (sliceIdBuilder_ != null) {
+                    sliceIdBuilder_.dispose();
                     sliceIdBuilder_ = null;
                 }
                 name_ = "";
                 if (sliceEndpointIdsBuilder_ == null) {
                     sliceEndpointIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    sliceEndpointIds_ = null;
                     sliceEndpointIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000004);
                 if (sliceConstraintsBuilder_ == null) {
                     sliceConstraints_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000002);
                 } else {
+                    sliceConstraints_ = null;
                     sliceConstraintsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000008);
                 if (sliceServiceIdsBuilder_ == null) {
                     sliceServiceIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000004);
                 } else {
+                    sliceServiceIds_ = null;
                     sliceServiceIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000010);
                 if (sliceSubsliceIdsBuilder_ == null) {
                     sliceSubsliceIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000008);
                 } else {
+                    sliceSubsliceIds_ = null;
                     sliceSubsliceIdsBuilder_.clear();
                 }
-                if (sliceStatusBuilder_ == null) {
-                    sliceStatus_ = null;
-                } else {
-                    sliceStatus_ = null;
+                bitField0_ = (bitField0_ & ~0x00000020);
+                sliceStatus_ = null;
+                if (sliceStatusBuilder_ != null) {
+                    sliceStatusBuilder_.dispose();
                     sliceStatusBuilder_ = null;
                 }
-                if (sliceConfigBuilder_ == null) {
-                    sliceConfig_ = null;
-                } else {
-                    sliceConfig_ = null;
+                sliceConfig_ = null;
+                if (sliceConfigBuilder_ != null) {
+                    sliceConfigBuilder_.dispose();
                     sliceConfigBuilder_ = null;
                 }
-                if (sliceOwnerBuilder_ == null) {
-                    sliceOwner_ = null;
-                } else {
-                    sliceOwner_ = null;
+                sliceOwner_ = null;
+                if (sliceOwnerBuilder_ != null) {
+                    sliceOwnerBuilder_.dispose();
                     sliceOwnerBuilder_ = null;
                 }
-                if (timestampBuilder_ == null) {
-                    timestamp_ = null;
-                } else {
-                    timestamp_ = null;
+                timestamp_ = null;
+                if (timestampBuilder_ != null) {
+                    timestampBuilder_.dispose();
                     timestampBuilder_ = null;
                 }
                 return this;
@@ -36910,101 +36392,73 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Slice buildPartial() {
                 context.ContextOuterClass.Slice result = new context.ContextOuterClass.Slice(this);
-                int from_bitField0_ = bitField0_;
-                if (sliceIdBuilder_ == null) {
-                    result.sliceId_ = sliceId_;
-                } else {
-                    result.sliceId_ = sliceIdBuilder_.build();
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.name_ = name_;
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.Slice result) {
                 if (sliceEndpointIdsBuilder_ == null) {
-                    if (((bitField0_ & 0x00000001) != 0)) {
+                    if (((bitField0_ & 0x00000004) != 0)) {
                         sliceEndpointIds_ = java.util.Collections.unmodifiableList(sliceEndpointIds_);
-                        bitField0_ = (bitField0_ & ~0x00000001);
+                        bitField0_ = (bitField0_ & ~0x00000004);
                     }
                     result.sliceEndpointIds_ = sliceEndpointIds_;
                 } else {
                     result.sliceEndpointIds_ = sliceEndpointIdsBuilder_.build();
                 }
                 if (sliceConstraintsBuilder_ == null) {
-                    if (((bitField0_ & 0x00000002) != 0)) {
+                    if (((bitField0_ & 0x00000008) != 0)) {
                         sliceConstraints_ = java.util.Collections.unmodifiableList(sliceConstraints_);
-                        bitField0_ = (bitField0_ & ~0x00000002);
+                        bitField0_ = (bitField0_ & ~0x00000008);
                     }
                     result.sliceConstraints_ = sliceConstraints_;
                 } else {
                     result.sliceConstraints_ = sliceConstraintsBuilder_.build();
                 }
                 if (sliceServiceIdsBuilder_ == null) {
-                    if (((bitField0_ & 0x00000004) != 0)) {
+                    if (((bitField0_ & 0x00000010) != 0)) {
                         sliceServiceIds_ = java.util.Collections.unmodifiableList(sliceServiceIds_);
-                        bitField0_ = (bitField0_ & ~0x00000004);
+                        bitField0_ = (bitField0_ & ~0x00000010);
                     }
                     result.sliceServiceIds_ = sliceServiceIds_;
                 } else {
                     result.sliceServiceIds_ = sliceServiceIdsBuilder_.build();
                 }
                 if (sliceSubsliceIdsBuilder_ == null) {
-                    if (((bitField0_ & 0x00000008) != 0)) {
+                    if (((bitField0_ & 0x00000020) != 0)) {
                         sliceSubsliceIds_ = java.util.Collections.unmodifiableList(sliceSubsliceIds_);
-                        bitField0_ = (bitField0_ & ~0x00000008);
+                        bitField0_ = (bitField0_ & ~0x00000020);
                     }
                     result.sliceSubsliceIds_ = sliceSubsliceIds_;
                 } else {
                     result.sliceSubsliceIds_ = sliceSubsliceIdsBuilder_.build();
                 }
-                if (sliceStatusBuilder_ == null) {
-                    result.sliceStatus_ = sliceStatus_;
-                } else {
-                    result.sliceStatus_ = sliceStatusBuilder_.build();
+            }
+
+            private void buildPartial0(context.ContextOuterClass.Slice result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.sliceId_ = sliceIdBuilder_ == null ? sliceId_ : sliceIdBuilder_.build();
                 }
-                if (sliceConfigBuilder_ == null) {
-                    result.sliceConfig_ = sliceConfig_;
-                } else {
-                    result.sliceConfig_ = sliceConfigBuilder_.build();
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.name_ = name_;
                 }
-                if (sliceOwnerBuilder_ == null) {
-                    result.sliceOwner_ = sliceOwner_;
-                } else {
-                    result.sliceOwner_ = sliceOwnerBuilder_.build();
+                if (((from_bitField0_ & 0x00000040) != 0)) {
+                    result.sliceStatus_ = sliceStatusBuilder_ == null ? sliceStatus_ : sliceStatusBuilder_.build();
                 }
-                if (timestampBuilder_ == null) {
-                    result.timestamp_ = timestamp_;
-                } else {
-                    result.timestamp_ = timestampBuilder_.build();
+                if (((from_bitField0_ & 0x00000080) != 0)) {
+                    result.sliceConfig_ = sliceConfigBuilder_ == null ? sliceConfig_ : sliceConfigBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000100) != 0)) {
+                    result.sliceOwner_ = sliceOwnerBuilder_ == null ? sliceOwner_ : sliceOwnerBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000200) != 0)) {
+                    result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
             }
 
             @java.lang.Override
@@ -37025,13 +36479,14 @@ public final class ContextOuterClass {
                 }
                 if (!other.getName().isEmpty()) {
                     name_ = other.name_;
+                    bitField0_ |= 0x00000002;
                     onChanged();
                 }
                 if (sliceEndpointIdsBuilder_ == null) {
                     if (!other.sliceEndpointIds_.isEmpty()) {
                         if (sliceEndpointIds_.isEmpty()) {
                             sliceEndpointIds_ = other.sliceEndpointIds_;
-                            bitField0_ = (bitField0_ & ~0x00000001);
+                            bitField0_ = (bitField0_ & ~0x00000004);
                         } else {
                             ensureSliceEndpointIdsIsMutable();
                             sliceEndpointIds_.addAll(other.sliceEndpointIds_);
@@ -37044,7 +36499,7 @@ public final class ContextOuterClass {
                             sliceEndpointIdsBuilder_.dispose();
                             sliceEndpointIdsBuilder_ = null;
                             sliceEndpointIds_ = other.sliceEndpointIds_;
-                            bitField0_ = (bitField0_ & ~0x00000001);
+                            bitField0_ = (bitField0_ & ~0x00000004);
                             sliceEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceEndpointIdsFieldBuilder() : null;
                         } else {
                             sliceEndpointIdsBuilder_.addAllMessages(other.sliceEndpointIds_);
@@ -37055,7 +36510,7 @@ public final class ContextOuterClass {
                     if (!other.sliceConstraints_.isEmpty()) {
                         if (sliceConstraints_.isEmpty()) {
                             sliceConstraints_ = other.sliceConstraints_;
-                            bitField0_ = (bitField0_ & ~0x00000002);
+                            bitField0_ = (bitField0_ & ~0x00000008);
                         } else {
                             ensureSliceConstraintsIsMutable();
                             sliceConstraints_.addAll(other.sliceConstraints_);
@@ -37068,7 +36523,7 @@ public final class ContextOuterClass {
                             sliceConstraintsBuilder_.dispose();
                             sliceConstraintsBuilder_ = null;
                             sliceConstraints_ = other.sliceConstraints_;
-                            bitField0_ = (bitField0_ & ~0x00000002);
+                            bitField0_ = (bitField0_ & ~0x00000008);
                             sliceConstraintsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceConstraintsFieldBuilder() : null;
                         } else {
                             sliceConstraintsBuilder_.addAllMessages(other.sliceConstraints_);
@@ -37079,7 +36534,7 @@ public final class ContextOuterClass {
                     if (!other.sliceServiceIds_.isEmpty()) {
                         if (sliceServiceIds_.isEmpty()) {
                             sliceServiceIds_ = other.sliceServiceIds_;
-                            bitField0_ = (bitField0_ & ~0x00000004);
+                            bitField0_ = (bitField0_ & ~0x00000010);
                         } else {
                             ensureSliceServiceIdsIsMutable();
                             sliceServiceIds_.addAll(other.sliceServiceIds_);
@@ -37092,7 +36547,7 @@ public final class ContextOuterClass {
                             sliceServiceIdsBuilder_.dispose();
                             sliceServiceIdsBuilder_ = null;
                             sliceServiceIds_ = other.sliceServiceIds_;
-                            bitField0_ = (bitField0_ & ~0x00000004);
+                            bitField0_ = (bitField0_ & ~0x00000010);
                             sliceServiceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceServiceIdsFieldBuilder() : null;
                         } else {
                             sliceServiceIdsBuilder_.addAllMessages(other.sliceServiceIds_);
@@ -37103,7 +36558,7 @@ public final class ContextOuterClass {
                     if (!other.sliceSubsliceIds_.isEmpty()) {
                         if (sliceSubsliceIds_.isEmpty()) {
                             sliceSubsliceIds_ = other.sliceSubsliceIds_;
-                            bitField0_ = (bitField0_ & ~0x00000008);
+                            bitField0_ = (bitField0_ & ~0x00000020);
                         } else {
                             ensureSliceSubsliceIdsIsMutable();
                             sliceSubsliceIds_.addAll(other.sliceSubsliceIds_);
@@ -37116,7 +36571,7 @@ public final class ContextOuterClass {
                             sliceSubsliceIdsBuilder_.dispose();
                             sliceSubsliceIdsBuilder_ = null;
                             sliceSubsliceIds_ = other.sliceSubsliceIds_;
-                            bitField0_ = (bitField0_ & ~0x00000008);
+                            bitField0_ = (bitField0_ & ~0x00000020);
                             sliceSubsliceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceSubsliceIdsFieldBuilder() : null;
                         } else {
                             sliceSubsliceIdsBuilder_.addAllMessages(other.sliceSubsliceIds_);
@@ -37135,7 +36590,7 @@ public final class ContextOuterClass {
                 if (other.hasTimestamp()) {
                     mergeTimestamp(other.getTimestamp());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -37147,17 +36602,125 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Slice parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getSliceIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    name_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry);
+                                    if (sliceEndpointIdsBuilder_ == null) {
+                                        ensureSliceEndpointIdsIsMutable();
+                                        sliceEndpointIds_.add(m);
+                                    } else {
+                                        sliceEndpointIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 26
+                            case 34:
+                                {
+                                    context.ContextOuterClass.Constraint m = input.readMessage(context.ContextOuterClass.Constraint.parser(), extensionRegistry);
+                                    if (sliceConstraintsBuilder_ == null) {
+                                        ensureSliceConstraintsIsMutable();
+                                        sliceConstraints_.add(m);
+                                    } else {
+                                        sliceConstraintsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 34
+                            case 42:
+                                {
+                                    context.ContextOuterClass.ServiceId m = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry);
+                                    if (sliceServiceIdsBuilder_ == null) {
+                                        ensureSliceServiceIdsIsMutable();
+                                        sliceServiceIds_.add(m);
+                                    } else {
+                                        sliceServiceIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 42
+                            case 50:
+                                {
+                                    context.ContextOuterClass.SliceId m = input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry);
+                                    if (sliceSubsliceIdsBuilder_ == null) {
+                                        ensureSliceSubsliceIdsIsMutable();
+                                        sliceSubsliceIds_.add(m);
+                                    } else {
+                                        sliceSubsliceIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 50
+                            case 58:
+                                {
+                                    input.readMessage(getSliceStatusFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000040;
+                                    break;
+                                }
+                            // case 58
+                            case 66:
+                                {
+                                    input.readMessage(getSliceConfigFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000080;
+                                    break;
+                                }
+                            // case 66
+                            case 74:
+                                {
+                                    input.readMessage(getSliceOwnerFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000100;
+                                    break;
+                                }
+                            // case 74
+                            case 82:
+                                {
+                                    input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000200;
+                                    break;
+                                }
+                            // case 82
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Slice) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -37172,7 +36735,7 @@ public final class ContextOuterClass {
              * @return Whether the sliceId field is set.
              */
             public boolean hasSliceId() {
-                return sliceIdBuilder_ != null || sliceId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -37196,10 +36759,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     sliceId_ = value;
-                    onChanged();
                 } else {
                     sliceIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -37209,10 +36773,11 @@ public final class ContextOuterClass {
             public Builder setSliceId(context.ContextOuterClass.SliceId.Builder builderForValue) {
                 if (sliceIdBuilder_ == null) {
                     sliceId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     sliceIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -37221,15 +36786,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeSliceId(context.ContextOuterClass.SliceId value) {
                 if (sliceIdBuilder_ == null) {
-                    if (sliceId_ != null) {
-                        sliceId_ = context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && sliceId_ != null && sliceId_ != context.ContextOuterClass.SliceId.getDefaultInstance()) {
+                        getSliceIdBuilder().mergeFrom(value);
                     } else {
                         sliceId_ = value;
                     }
-                    onChanged();
                 } else {
                     sliceIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -37237,13 +36803,13 @@ public final class ContextOuterClass {
              * .context.SliceId slice_id = 1;
              */
             public Builder clearSliceId() {
-                if (sliceIdBuilder_ == null) {
-                    sliceId_ = null;
-                    onChanged();
-                } else {
-                    sliceId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                sliceId_ = null;
+                if (sliceIdBuilder_ != null) {
+                    sliceIdBuilder_.dispose();
                     sliceIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -37251,6 +36817,7 @@ public final class ContextOuterClass {
              * .context.SliceId slice_id = 1;
              */
             public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getSliceIdFieldBuilder().getBuilder();
             }
@@ -37320,6 +36887,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 name_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -37330,6 +36898,7 @@ public final class ContextOuterClass {
              */
             public Builder clearName() {
                 name_ = getDefaultInstance().getName();
+                bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
             }
@@ -37345,6 +36914,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 name_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -37352,9 +36922,9 @@ public final class ContextOuterClass {
             private java.util.List sliceEndpointIds_ = java.util.Collections.emptyList();
 
             private void ensureSliceEndpointIdsIsMutable() {
-                if (!((bitField0_ & 0x00000001) != 0)) {
+                if (!((bitField0_ & 0x00000004) != 0)) {
                     sliceEndpointIds_ = new java.util.ArrayList(sliceEndpointIds_);
-                    bitField0_ |= 0x00000001;
+                    bitField0_ |= 0x00000004;
                 }
             }
 
@@ -37506,7 +37076,7 @@ public final class ContextOuterClass {
             public Builder clearSliceEndpointIds() {
                 if (sliceEndpointIdsBuilder_ == null) {
                     sliceEndpointIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
+                    bitField0_ = (bitField0_ & ~0x00000004);
                     onChanged();
                 } else {
                     sliceEndpointIdsBuilder_.clear();
@@ -37580,7 +37150,7 @@ public final class ContextOuterClass {
 
             private com.google.protobuf.RepeatedFieldBuilderV3 getSliceEndpointIdsFieldBuilder() {
                 if (sliceEndpointIdsBuilder_ == null) {
-                    sliceEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
+                    sliceEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceEndpointIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean());
                     sliceEndpointIds_ = null;
                 }
                 return sliceEndpointIdsBuilder_;
@@ -37589,9 +37159,9 @@ public final class ContextOuterClass {
             private java.util.List sliceConstraints_ = java.util.Collections.emptyList();
 
             private void ensureSliceConstraintsIsMutable() {
-                if (!((bitField0_ & 0x00000002) != 0)) {
+                if (!((bitField0_ & 0x00000008) != 0)) {
                     sliceConstraints_ = new java.util.ArrayList(sliceConstraints_);
-                    bitField0_ |= 0x00000002;
+                    bitField0_ |= 0x00000008;
                 }
             }
 
@@ -37743,7 +37313,7 @@ public final class ContextOuterClass {
             public Builder clearSliceConstraints() {
                 if (sliceConstraintsBuilder_ == null) {
                     sliceConstraints_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000002);
+                    bitField0_ = (bitField0_ & ~0x00000008);
                     onChanged();
                 } else {
                     sliceConstraintsBuilder_.clear();
@@ -37817,7 +37387,7 @@ public final class ContextOuterClass {
 
             private com.google.protobuf.RepeatedFieldBuilderV3 getSliceConstraintsFieldBuilder() {
                 if (sliceConstraintsBuilder_ == null) {
-                    sliceConstraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceConstraints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
+                    sliceConstraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceConstraints_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
                     sliceConstraints_ = null;
                 }
                 return sliceConstraintsBuilder_;
@@ -37826,9 +37396,9 @@ public final class ContextOuterClass {
             private java.util.List sliceServiceIds_ = java.util.Collections.emptyList();
 
             private void ensureSliceServiceIdsIsMutable() {
-                if (!((bitField0_ & 0x00000004) != 0)) {
+                if (!((bitField0_ & 0x00000010) != 0)) {
                     sliceServiceIds_ = new java.util.ArrayList(sliceServiceIds_);
-                    bitField0_ |= 0x00000004;
+                    bitField0_ |= 0x00000010;
                 }
             }
 
@@ -37980,7 +37550,7 @@ public final class ContextOuterClass {
             public Builder clearSliceServiceIds() {
                 if (sliceServiceIdsBuilder_ == null) {
                     sliceServiceIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000004);
+                    bitField0_ = (bitField0_ & ~0x00000010);
                     onChanged();
                 } else {
                     sliceServiceIdsBuilder_.clear();
@@ -38054,7 +37624,7 @@ public final class ContextOuterClass {
 
             private com.google.protobuf.RepeatedFieldBuilderV3 getSliceServiceIdsFieldBuilder() {
                 if (sliceServiceIdsBuilder_ == null) {
-                    sliceServiceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceServiceIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean());
+                    sliceServiceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceServiceIds_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean());
                     sliceServiceIds_ = null;
                 }
                 return sliceServiceIdsBuilder_;
@@ -38063,9 +37633,9 @@ public final class ContextOuterClass {
             private java.util.List sliceSubsliceIds_ = java.util.Collections.emptyList();
 
             private void ensureSliceSubsliceIdsIsMutable() {
-                if (!((bitField0_ & 0x00000008) != 0)) {
+                if (!((bitField0_ & 0x00000020) != 0)) {
                     sliceSubsliceIds_ = new java.util.ArrayList(sliceSubsliceIds_);
-                    bitField0_ |= 0x00000008;
+                    bitField0_ |= 0x00000020;
                 }
             }
 
@@ -38217,7 +37787,7 @@ public final class ContextOuterClass {
             public Builder clearSliceSubsliceIds() {
                 if (sliceSubsliceIdsBuilder_ == null) {
                     sliceSubsliceIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000008);
+                    bitField0_ = (bitField0_ & ~0x00000020);
                     onChanged();
                 } else {
                     sliceSubsliceIdsBuilder_.clear();
@@ -38291,7 +37861,7 @@ public final class ContextOuterClass {
 
             private com.google.protobuf.RepeatedFieldBuilderV3 getSliceSubsliceIdsFieldBuilder() {
                 if (sliceSubsliceIdsBuilder_ == null) {
-                    sliceSubsliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceSubsliceIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
+                    sliceSubsliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceSubsliceIds_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean());
                     sliceSubsliceIds_ = null;
                 }
                 return sliceSubsliceIdsBuilder_;
@@ -38306,7 +37876,7 @@ public final class ContextOuterClass {
              * @return Whether the sliceStatus field is set.
              */
             public boolean hasSliceStatus() {
-                return sliceStatusBuilder_ != null || sliceStatus_ != null;
+                return ((bitField0_ & 0x00000040) != 0);
             }
 
             /**
@@ -38330,10 +37900,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     sliceStatus_ = value;
-                    onChanged();
                 } else {
                     sliceStatusBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000040;
+                onChanged();
                 return this;
             }
 
@@ -38343,10 +37914,11 @@ public final class ContextOuterClass {
             public Builder setSliceStatus(context.ContextOuterClass.SliceStatus.Builder builderForValue) {
                 if (sliceStatusBuilder_ == null) {
                     sliceStatus_ = builderForValue.build();
-                    onChanged();
                 } else {
                     sliceStatusBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000040;
+                onChanged();
                 return this;
             }
 
@@ -38355,15 +37927,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeSliceStatus(context.ContextOuterClass.SliceStatus value) {
                 if (sliceStatusBuilder_ == null) {
-                    if (sliceStatus_ != null) {
-                        sliceStatus_ = context.ContextOuterClass.SliceStatus.newBuilder(sliceStatus_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000040) != 0) && sliceStatus_ != null && sliceStatus_ != context.ContextOuterClass.SliceStatus.getDefaultInstance()) {
+                        getSliceStatusBuilder().mergeFrom(value);
                     } else {
                         sliceStatus_ = value;
                     }
-                    onChanged();
                 } else {
                     sliceStatusBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000040;
+                onChanged();
                 return this;
             }
 
@@ -38371,13 +37944,13 @@ public final class ContextOuterClass {
              * .context.SliceStatus slice_status = 7;
              */
             public Builder clearSliceStatus() {
-                if (sliceStatusBuilder_ == null) {
-                    sliceStatus_ = null;
-                    onChanged();
-                } else {
-                    sliceStatus_ = null;
+                bitField0_ = (bitField0_ & ~0x00000040);
+                sliceStatus_ = null;
+                if (sliceStatusBuilder_ != null) {
+                    sliceStatusBuilder_.dispose();
                     sliceStatusBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -38385,6 +37958,7 @@ public final class ContextOuterClass {
              * .context.SliceStatus slice_status = 7;
              */
             public context.ContextOuterClass.SliceStatus.Builder getSliceStatusBuilder() {
+                bitField0_ |= 0x00000040;
                 onChanged();
                 return getSliceStatusFieldBuilder().getBuilder();
             }
@@ -38420,7 +37994,7 @@ public final class ContextOuterClass {
              * @return Whether the sliceConfig field is set.
              */
             public boolean hasSliceConfig() {
-                return sliceConfigBuilder_ != null || sliceConfig_ != null;
+                return ((bitField0_ & 0x00000080) != 0);
             }
 
             /**
@@ -38444,10 +38018,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     sliceConfig_ = value;
-                    onChanged();
                 } else {
                     sliceConfigBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000080;
+                onChanged();
                 return this;
             }
 
@@ -38457,10 +38032,11 @@ public final class ContextOuterClass {
             public Builder setSliceConfig(context.ContextOuterClass.SliceConfig.Builder builderForValue) {
                 if (sliceConfigBuilder_ == null) {
                     sliceConfig_ = builderForValue.build();
-                    onChanged();
                 } else {
                     sliceConfigBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000080;
+                onChanged();
                 return this;
             }
 
@@ -38469,15 +38045,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeSliceConfig(context.ContextOuterClass.SliceConfig value) {
                 if (sliceConfigBuilder_ == null) {
-                    if (sliceConfig_ != null) {
-                        sliceConfig_ = context.ContextOuterClass.SliceConfig.newBuilder(sliceConfig_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000080) != 0) && sliceConfig_ != null && sliceConfig_ != context.ContextOuterClass.SliceConfig.getDefaultInstance()) {
+                        getSliceConfigBuilder().mergeFrom(value);
                     } else {
                         sliceConfig_ = value;
                     }
-                    onChanged();
                 } else {
                     sliceConfigBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000080;
+                onChanged();
                 return this;
             }
 
@@ -38485,13 +38062,13 @@ public final class ContextOuterClass {
              * .context.SliceConfig slice_config = 8;
              */
             public Builder clearSliceConfig() {
-                if (sliceConfigBuilder_ == null) {
-                    sliceConfig_ = null;
-                    onChanged();
-                } else {
-                    sliceConfig_ = null;
+                bitField0_ = (bitField0_ & ~0x00000080);
+                sliceConfig_ = null;
+                if (sliceConfigBuilder_ != null) {
+                    sliceConfigBuilder_.dispose();
                     sliceConfigBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -38499,6 +38076,7 @@ public final class ContextOuterClass {
              * .context.SliceConfig slice_config = 8;
              */
             public context.ContextOuterClass.SliceConfig.Builder getSliceConfigBuilder() {
+                bitField0_ |= 0x00000080;
                 onChanged();
                 return getSliceConfigFieldBuilder().getBuilder();
             }
@@ -38534,7 +38112,7 @@ public final class ContextOuterClass {
              * @return Whether the sliceOwner field is set.
              */
             public boolean hasSliceOwner() {
-                return sliceOwnerBuilder_ != null || sliceOwner_ != null;
+                return ((bitField0_ & 0x00000100) != 0);
             }
 
             /**
@@ -38558,10 +38136,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     sliceOwner_ = value;
-                    onChanged();
                 } else {
                     sliceOwnerBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000100;
+                onChanged();
                 return this;
             }
 
@@ -38571,10 +38150,11 @@ public final class ContextOuterClass {
             public Builder setSliceOwner(context.ContextOuterClass.SliceOwner.Builder builderForValue) {
                 if (sliceOwnerBuilder_ == null) {
                     sliceOwner_ = builderForValue.build();
-                    onChanged();
                 } else {
                     sliceOwnerBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000100;
+                onChanged();
                 return this;
             }
 
@@ -38583,15 +38163,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeSliceOwner(context.ContextOuterClass.SliceOwner value) {
                 if (sliceOwnerBuilder_ == null) {
-                    if (sliceOwner_ != null) {
-                        sliceOwner_ = context.ContextOuterClass.SliceOwner.newBuilder(sliceOwner_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000100) != 0) && sliceOwner_ != null && sliceOwner_ != context.ContextOuterClass.SliceOwner.getDefaultInstance()) {
+                        getSliceOwnerBuilder().mergeFrom(value);
                     } else {
                         sliceOwner_ = value;
                     }
-                    onChanged();
                 } else {
                     sliceOwnerBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000100;
+                onChanged();
                 return this;
             }
 
@@ -38599,13 +38180,13 @@ public final class ContextOuterClass {
              * .context.SliceOwner slice_owner = 9;
              */
             public Builder clearSliceOwner() {
-                if (sliceOwnerBuilder_ == null) {
-                    sliceOwner_ = null;
-                    onChanged();
-                } else {
-                    sliceOwner_ = null;
+                bitField0_ = (bitField0_ & ~0x00000100);
+                sliceOwner_ = null;
+                if (sliceOwnerBuilder_ != null) {
+                    sliceOwnerBuilder_.dispose();
                     sliceOwnerBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -38613,6 +38194,7 @@ public final class ContextOuterClass {
              * .context.SliceOwner slice_owner = 9;
              */
             public context.ContextOuterClass.SliceOwner.Builder getSliceOwnerBuilder() {
+                bitField0_ |= 0x00000100;
                 onChanged();
                 return getSliceOwnerFieldBuilder().getBuilder();
             }
@@ -38648,7 +38230,7 @@ public final class ContextOuterClass {
              * @return Whether the timestamp field is set.
              */
             public boolean hasTimestamp() {
-                return timestampBuilder_ != null || timestamp_ != null;
+                return ((bitField0_ & 0x00000200) != 0);
             }
 
             /**
@@ -38672,10 +38254,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     timestamp_ = value;
-                    onChanged();
                 } else {
                     timestampBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000200;
+                onChanged();
                 return this;
             }
 
@@ -38685,10 +38268,11 @@ public final class ContextOuterClass {
             public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) {
                 if (timestampBuilder_ == null) {
                     timestamp_ = builderForValue.build();
-                    onChanged();
                 } else {
                     timestampBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000200;
+                onChanged();
                 return this;
             }
 
@@ -38697,15 +38281,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) {
                 if (timestampBuilder_ == null) {
-                    if (timestamp_ != null) {
-                        timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000200) != 0) && timestamp_ != null && timestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) {
+                        getTimestampBuilder().mergeFrom(value);
                     } else {
                         timestamp_ = value;
                     }
-                    onChanged();
                 } else {
                     timestampBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000200;
+                onChanged();
                 return this;
             }
 
@@ -38713,13 +38298,13 @@ public final class ContextOuterClass {
              * .context.Timestamp timestamp = 10;
              */
             public Builder clearTimestamp() {
-                if (timestampBuilder_ == null) {
-                    timestamp_ = null;
-                    onChanged();
-                } else {
-                    timestamp_ = null;
+                bitField0_ = (bitField0_ & ~0x00000200);
+                timestamp_ = null;
+                if (timestampBuilder_ != null) {
+                    timestampBuilder_.dispose();
                     timestampBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -38727,6 +38312,7 @@ public final class ContextOuterClass {
              * .context.Timestamp timestamp = 10;
              */
             public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() {
+                bitField0_ |= 0x00000200;
                 onChanged();
                 return getTimestampFieldBuilder().getBuilder();
             }
@@ -38780,7 +38366,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Slice parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Slice(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -38855,63 +38451,6 @@ public final class ContextOuterClass {
             return new SliceOwner();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private SliceOwner(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Uuid.Builder subBuilder = null;
-                                if (ownerUuid_ != null) {
-                                    subBuilder = ownerUuid_.toBuilder();
-                                }
-                                ownerUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(ownerUuid_);
-                                    ownerUuid_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                ownerString_ = s;
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_SliceOwner_descriptor;
         }
@@ -38948,12 +38487,13 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder() {
-            return getOwnerUuid();
+            return ownerUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_;
         }
 
         public static final int OWNER_STRING_FIELD_NUMBER = 2;
 
-        private volatile java.lang.Object ownerString_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object ownerString_ = "";
 
         /**
          * string owner_string = 2;
@@ -39006,10 +38546,10 @@ public final class ContextOuterClass {
             if (ownerUuid_ != null) {
                 output.writeMessage(1, getOwnerUuid());
             }
-            if (!getOwnerStringBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ownerString_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ownerString_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -39021,10 +38561,10 @@ public final class ContextOuterClass {
             if (ownerUuid_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOwnerUuid());
             }
-            if (!getOwnerStringBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ownerString_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ownerString_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -39046,7 +38586,7 @@ public final class ContextOuterClass {
             }
             if (!getOwnerString().equals(other.getOwnerString()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -39064,7 +38604,7 @@ public final class ContextOuterClass {
             }
             hash = (37 * hash) + OWNER_STRING_FIELD_NUMBER;
             hash = (53 * hash) + getOwnerString().hashCode();
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -39158,26 +38698,19 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.SliceOwner.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (ownerUuidBuilder_ == null) {
-                    ownerUuid_ = null;
-                } else {
-                    ownerUuid_ = null;
+                bitField0_ = 0;
+                ownerUuid_ = null;
+                if (ownerUuidBuilder_ != null) {
+                    ownerUuidBuilder_.dispose();
                     ownerUuidBuilder_ = null;
                 }
                 ownerString_ = "";
@@ -39206,44 +38739,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.SliceOwner buildPartial() {
                 context.ContextOuterClass.SliceOwner result = new context.ContextOuterClass.SliceOwner(this);
-                if (ownerUuidBuilder_ == null) {
-                    result.ownerUuid_ = ownerUuid_;
-                } else {
-                    result.ownerUuid_ = ownerUuidBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.ownerString_ = ownerString_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.SliceOwner result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.ownerUuid_ = ownerUuidBuilder_ == null ? ownerUuid_ : ownerUuidBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.ownerString_ = ownerString_;
+                }
             }
 
             @java.lang.Override
@@ -39264,9 +38774,10 @@ public final class ContextOuterClass {
                 }
                 if (!other.getOwnerString().isEmpty()) {
                     ownerString_ = other.ownerString_;
+                    bitField0_ |= 0x00000002;
                     onChanged();
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -39278,20 +38789,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.SliceOwner parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getOwnerUuidFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    ownerString_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.SliceOwner) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.Uuid ownerUuid_;
 
             private com.google.protobuf.SingleFieldBuilderV3 ownerUuidBuilder_;
@@ -39301,7 +38846,7 @@ public final class ContextOuterClass {
              * @return Whether the ownerUuid field is set.
              */
             public boolean hasOwnerUuid() {
-                return ownerUuidBuilder_ != null || ownerUuid_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -39325,10 +38870,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     ownerUuid_ = value;
-                    onChanged();
                 } else {
                     ownerUuidBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -39338,10 +38884,11 @@ public final class ContextOuterClass {
             public Builder setOwnerUuid(context.ContextOuterClass.Uuid.Builder builderForValue) {
                 if (ownerUuidBuilder_ == null) {
                     ownerUuid_ = builderForValue.build();
-                    onChanged();
                 } else {
                     ownerUuidBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -39350,15 +38897,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeOwnerUuid(context.ContextOuterClass.Uuid value) {
                 if (ownerUuidBuilder_ == null) {
-                    if (ownerUuid_ != null) {
-                        ownerUuid_ = context.ContextOuterClass.Uuid.newBuilder(ownerUuid_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && ownerUuid_ != null && ownerUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) {
+                        getOwnerUuidBuilder().mergeFrom(value);
                     } else {
                         ownerUuid_ = value;
                     }
-                    onChanged();
                 } else {
                     ownerUuidBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -39366,13 +38914,13 @@ public final class ContextOuterClass {
              * .context.Uuid owner_uuid = 1;
              */
             public Builder clearOwnerUuid() {
-                if (ownerUuidBuilder_ == null) {
-                    ownerUuid_ = null;
-                    onChanged();
-                } else {
-                    ownerUuid_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                ownerUuid_ = null;
+                if (ownerUuidBuilder_ != null) {
+                    ownerUuidBuilder_.dispose();
                     ownerUuidBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -39380,6 +38928,7 @@ public final class ContextOuterClass {
              * .context.Uuid owner_uuid = 1;
              */
             public context.ContextOuterClass.Uuid.Builder getOwnerUuidBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getOwnerUuidFieldBuilder().getBuilder();
             }
@@ -39449,6 +38998,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 ownerString_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -39459,6 +39009,7 @@ public final class ContextOuterClass {
              */
             public Builder clearOwnerString() {
                 ownerString_ = getDefaultInstance().getOwnerString();
+                bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
             }
@@ -39474,6 +39025,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 ownerString_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -39505,7 +39057,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public SliceOwner parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new SliceOwner(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -39563,50 +39125,6 @@ public final class ContextOuterClass {
             return new SliceStatus();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private SliceStatus(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 8:
-                            {
-                                int rawValue = input.readEnum();
-                                sliceStatus_ = rawValue;
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_SliceStatus_descriptor;
         }
@@ -39618,7 +39136,7 @@ public final class ContextOuterClass {
 
         public static final int SLICE_STATUS_FIELD_NUMBER = 1;
 
-        private int sliceStatus_;
+        private int sliceStatus_ = 0;
 
         /**
          * .context.SliceStatusEnum slice_status = 1;
@@ -39635,8 +39153,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.SliceStatusEnum getSliceStatus() {
-            @SuppressWarnings("deprecation")
-            context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.valueOf(sliceStatus_);
+            context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.forNumber(sliceStatus_);
             return result == null ? context.ContextOuterClass.SliceStatusEnum.UNRECOGNIZED : result;
         }
 
@@ -39658,7 +39175,7 @@ public final class ContextOuterClass {
             if (sliceStatus_ != context.ContextOuterClass.SliceStatusEnum.SLICESTATUS_UNDEFINED.getNumber()) {
                 output.writeEnum(1, sliceStatus_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -39670,7 +39187,7 @@ public final class ContextOuterClass {
             if (sliceStatus_ != context.ContextOuterClass.SliceStatusEnum.SLICESTATUS_UNDEFINED.getNumber()) {
                 size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, sliceStatus_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -39686,7 +39203,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.SliceStatus other = (context.ContextOuterClass.SliceStatus) obj;
             if (sliceStatus_ != other.sliceStatus_)
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -39700,7 +39217,7 @@ public final class ContextOuterClass {
             hash = (19 * hash) + getDescriptor().hashCode();
             hash = (37 * hash) + SLICE_STATUS_FIELD_NUMBER;
             hash = (53 * hash) + sliceStatus_;
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -39794,22 +39311,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.SliceStatus.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 sliceStatus_ = 0;
                 return this;
             }
@@ -39836,39 +39347,18 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.SliceStatus buildPartial() {
                 context.ContextOuterClass.SliceStatus result = new context.ContextOuterClass.SliceStatus(this);
-                result.sliceStatus_ = sliceStatus_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.SliceStatus result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.sliceStatus_ = sliceStatus_;
+                }
             }
 
             @java.lang.Override
@@ -39887,7 +39377,7 @@ public final class ContextOuterClass {
                 if (other.sliceStatus_ != 0) {
                     setSliceStatusValue(other.getSliceStatusValue());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -39899,20 +39389,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.SliceStatus parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 8:
+                                {
+                                    sliceStatus_ = input.readEnum();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 8
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.SliceStatus) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private int sliceStatus_ = 0;
 
             /**
@@ -39931,6 +39448,7 @@ public final class ContextOuterClass {
              */
             public Builder setSliceStatusValue(int value) {
                 sliceStatus_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -39941,8 +39459,7 @@ public final class ContextOuterClass {
              */
             @java.lang.Override
             public context.ContextOuterClass.SliceStatusEnum getSliceStatus() {
-                @SuppressWarnings("deprecation")
-                context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.valueOf(sliceStatus_);
+                context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.forNumber(sliceStatus_);
                 return result == null ? context.ContextOuterClass.SliceStatusEnum.UNRECOGNIZED : result;
             }
 
@@ -39955,6 +39472,7 @@ public final class ContextOuterClass {
                 if (value == null) {
                     throw new NullPointerException();
                 }
+                bitField0_ |= 0x00000001;
                 sliceStatus_ = value.getNumber();
                 onChanged();
                 return this;
@@ -39965,6 +39483,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearSliceStatus() {
+                bitField0_ = (bitField0_ & ~0x00000001);
                 sliceStatus_ = 0;
                 onChanged();
                 return this;
@@ -39997,7 +39516,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public SliceStatus parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new SliceStatus(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -40068,57 +39597,6 @@ public final class ContextOuterClass {
             return new SliceConfig();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private SliceConfig(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    configRules_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                configRules_.add(input.readMessage(context.ContextOuterClass.ConfigRule.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    configRules_ = java.util.Collections.unmodifiableList(configRules_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_SliceConfig_descriptor;
         }
@@ -40130,6 +39608,7 @@ public final class ContextOuterClass {
 
         public static final int CONFIG_RULES_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List configRules_;
 
         /**
@@ -40190,7 +39669,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < configRules_.size(); i++) {
                 output.writeMessage(1, configRules_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -40202,7 +39681,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < configRules_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configRules_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -40218,7 +39697,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.SliceConfig other = (context.ContextOuterClass.SliceConfig) obj;
             if (!getConfigRulesList().equals(other.getConfigRulesList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -40234,7 +39713,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER;
                 hash = (53 * hash) + getConfigRulesList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -40328,29 +39807,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.SliceConfig.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getConfigRulesFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (configRulesBuilder_ == null) {
                     configRules_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    configRules_ = null;
                     configRulesBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -40376,7 +39849,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.SliceConfig buildPartial() {
                 context.ContextOuterClass.SliceConfig result = new context.ContextOuterClass.SliceConfig(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.SliceConfig result) {
                 if (configRulesBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         configRules_ = java.util.Collections.unmodifiableList(configRules_);
@@ -40386,38 +39867,10 @@ public final class ContextOuterClass {
                 } else {
                     result.configRules_ = configRulesBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
             }
 
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.SliceConfig result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -40457,7 +39910,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -40469,17 +39922,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.SliceConfig parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.ConfigRule m = input.readMessage(context.ContextOuterClass.ConfigRule.parser(), extensionRegistry);
+                                    if (configRulesBuilder_ == null) {
+                                        ensureConfigRulesIsMutable();
+                                        configRules_.add(m);
+                                    } else {
+                                        configRulesBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.SliceConfig) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -40749,7 +40232,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public SliceConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new SliceConfig(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -40820,57 +40313,6 @@ public final class ContextOuterClass {
             return new SliceIdList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private SliceIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    sliceIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                sliceIds_.add(input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_SliceIdList_descriptor;
         }
@@ -40882,6 +40324,7 @@ public final class ContextOuterClass {
 
         public static final int SLICE_IDS_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List sliceIds_;
 
         /**
@@ -40942,7 +40385,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < sliceIds_.size(); i++) {
                 output.writeMessage(1, sliceIds_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -40954,7 +40397,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < sliceIds_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, sliceIds_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -40970,7 +40413,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.SliceIdList other = (context.ContextOuterClass.SliceIdList) obj;
             if (!getSliceIdsList().equals(other.getSliceIdsList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -40986,7 +40429,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER;
                 hash = (53 * hash) + getSliceIdsList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -41080,29 +40523,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.SliceIdList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getSliceIdsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (sliceIdsBuilder_ == null) {
                     sliceIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    sliceIds_ = null;
                     sliceIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -41128,7 +40565,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.SliceIdList buildPartial() {
                 context.ContextOuterClass.SliceIdList result = new context.ContextOuterClass.SliceIdList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.SliceIdList result) {
                 if (sliceIdsBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_);
@@ -41138,38 +40583,10 @@ public final class ContextOuterClass {
                 } else {
                     result.sliceIds_ = sliceIdsBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
             }
 
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.SliceIdList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -41209,7 +40626,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -41221,17 +40638,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.SliceIdList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.SliceId m = input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry);
+                                    if (sliceIdsBuilder_ == null) {
+                                        ensureSliceIdsIsMutable();
+                                        sliceIds_.add(m);
+                                    } else {
+                                        sliceIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.SliceIdList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -41501,7 +40948,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public SliceIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new SliceIdList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -41572,57 +41029,6 @@ public final class ContextOuterClass {
             return new SliceList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private SliceList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    slices_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                slices_.add(input.readMessage(context.ContextOuterClass.Slice.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    slices_ = java.util.Collections.unmodifiableList(slices_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_SliceList_descriptor;
         }
@@ -41634,6 +41040,7 @@ public final class ContextOuterClass {
 
         public static final int SLICES_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List slices_;
 
         /**
@@ -41694,7 +41101,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < slices_.size(); i++) {
                 output.writeMessage(1, slices_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -41706,7 +41113,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < slices_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, slices_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -41722,7 +41129,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.SliceList other = (context.ContextOuterClass.SliceList) obj;
             if (!getSlicesList().equals(other.getSlicesList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -41738,7 +41145,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + SLICES_FIELD_NUMBER;
                 hash = (53 * hash) + getSlicesList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -41832,29 +41239,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.SliceList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getSlicesFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (slicesBuilder_ == null) {
                     slices_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    slices_ = null;
                     slicesBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -41880,7 +41281,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.SliceList buildPartial() {
                 context.ContextOuterClass.SliceList result = new context.ContextOuterClass.SliceList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.SliceList result) {
                 if (slicesBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         slices_ = java.util.Collections.unmodifiableList(slices_);
@@ -41890,38 +41299,10 @@ public final class ContextOuterClass {
                 } else {
                     result.slices_ = slicesBuilder_.build();
                 }
-                onBuilt();
-                return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.SliceList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -41961,7 +41342,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -41973,17 +41354,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.SliceList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.Slice m = input.readMessage(context.ContextOuterClass.Slice.parser(), extensionRegistry);
+                                    if (slicesBuilder_ == null) {
+                                        ensureSlicesIsMutable();
+                                        slices_.add(m);
+                                    } else {
+                                        slicesBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.SliceList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -42253,7 +41664,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public SliceList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new SliceList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -42345,82 +41766,6 @@ public final class ContextOuterClass {
             return new SliceFilter();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private SliceFilter(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.SliceIdList.Builder subBuilder = null;
-                                if (sliceIds_ != null) {
-                                    subBuilder = sliceIds_.toBuilder();
-                                }
-                                sliceIds_ = input.readMessage(context.ContextOuterClass.SliceIdList.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(sliceIds_);
-                                    sliceIds_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 16:
-                            {
-                                includeEndpointIds_ = input.readBool();
-                                break;
-                            }
-                        case 24:
-                            {
-                                includeConstraints_ = input.readBool();
-                                break;
-                            }
-                        case 32:
-                            {
-                                includeServiceIds_ = input.readBool();
-                                break;
-                            }
-                        case 40:
-                            {
-                                includeSubsliceIds_ = input.readBool();
-                                break;
-                            }
-                        case 48:
-                            {
-                                includeConfigRules_ = input.readBool();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_SliceFilter_descriptor;
         }
@@ -42457,12 +41802,12 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder() {
-            return getSliceIds();
+            return sliceIds_ == null ? context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_;
         }
 
         public static final int INCLUDE_ENDPOINT_IDS_FIELD_NUMBER = 2;
 
-        private boolean includeEndpointIds_;
+        private boolean includeEndpointIds_ = false;
 
         /**
          * bool include_endpoint_ids = 2;
@@ -42475,7 +41820,7 @@ public final class ContextOuterClass {
 
         public static final int INCLUDE_CONSTRAINTS_FIELD_NUMBER = 3;
 
-        private boolean includeConstraints_;
+        private boolean includeConstraints_ = false;
 
         /**
          * bool include_constraints = 3;
@@ -42488,7 +41833,7 @@ public final class ContextOuterClass {
 
         public static final int INCLUDE_SERVICE_IDS_FIELD_NUMBER = 4;
 
-        private boolean includeServiceIds_;
+        private boolean includeServiceIds_ = false;
 
         /**
          * bool include_service_ids = 4;
@@ -42501,7 +41846,7 @@ public final class ContextOuterClass {
 
         public static final int INCLUDE_SUBSLICE_IDS_FIELD_NUMBER = 5;
 
-        private boolean includeSubsliceIds_;
+        private boolean includeSubsliceIds_ = false;
 
         /**
          * bool include_subslice_ids = 5;
@@ -42514,7 +41859,7 @@ public final class ContextOuterClass {
 
         public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 6;
 
-        private boolean includeConfigRules_;
+        private boolean includeConfigRules_ = false;
 
         /**
          * bool include_config_rules = 6;
@@ -42558,7 +41903,7 @@ public final class ContextOuterClass {
             if (includeConfigRules_ != false) {
                 output.writeBool(6, includeConfigRules_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -42585,7 +41930,7 @@ public final class ContextOuterClass {
             if (includeConfigRules_ != false) {
                 size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, includeConfigRules_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -42615,7 +41960,7 @@ public final class ContextOuterClass {
                 return false;
             if (getIncludeConfigRules() != other.getIncludeConfigRules())
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -42641,7 +41986,7 @@ public final class ContextOuterClass {
             hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeSubsliceIds());
             hash = (37 * hash) + INCLUDE_CONFIG_RULES_FIELD_NUMBER;
             hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeConfigRules());
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -42735,26 +42080,19 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.SliceFilter.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (sliceIdsBuilder_ == null) {
-                    sliceIds_ = null;
-                } else {
-                    sliceIds_ = null;
+                bitField0_ = 0;
+                sliceIds_ = null;
+                if (sliceIdsBuilder_ != null) {
+                    sliceIdsBuilder_.dispose();
                     sliceIdsBuilder_ = null;
                 }
                 includeEndpointIds_ = false;
@@ -42787,48 +42125,33 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.SliceFilter buildPartial() {
                 context.ContextOuterClass.SliceFilter result = new context.ContextOuterClass.SliceFilter(this);
-                if (sliceIdsBuilder_ == null) {
-                    result.sliceIds_ = sliceIds_;
-                } else {
-                    result.sliceIds_ = sliceIdsBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.includeEndpointIds_ = includeEndpointIds_;
-                result.includeConstraints_ = includeConstraints_;
-                result.includeServiceIds_ = includeServiceIds_;
-                result.includeSubsliceIds_ = includeSubsliceIds_;
-                result.includeConfigRules_ = includeConfigRules_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.SliceFilter result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.sliceIds_ = sliceIdsBuilder_ == null ? sliceIds_ : sliceIdsBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.includeEndpointIds_ = includeEndpointIds_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.includeConstraints_ = includeConstraints_;
+                }
+                if (((from_bitField0_ & 0x00000008) != 0)) {
+                    result.includeServiceIds_ = includeServiceIds_;
+                }
+                if (((from_bitField0_ & 0x00000010) != 0)) {
+                    result.includeSubsliceIds_ = includeSubsliceIds_;
+                }
+                if (((from_bitField0_ & 0x00000020) != 0)) {
+                    result.includeConfigRules_ = includeConfigRules_;
+                }
             }
 
             @java.lang.Override
@@ -42862,7 +42185,7 @@ public final class ContextOuterClass {
                 if (other.getIncludeConfigRules() != false) {
                     setIncludeConfigRules(other.getIncludeConfigRules());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -42874,20 +42197,82 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.SliceFilter parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getSliceIdsFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 16:
+                                {
+                                    includeEndpointIds_ = input.readBool();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 16
+                            case 24:
+                                {
+                                    includeConstraints_ = input.readBool();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 24
+                            case 32:
+                                {
+                                    includeServiceIds_ = input.readBool();
+                                    bitField0_ |= 0x00000008;
+                                    break;
+                                }
+                            // case 32
+                            case 40:
+                                {
+                                    includeSubsliceIds_ = input.readBool();
+                                    bitField0_ |= 0x00000010;
+                                    break;
+                                }
+                            // case 40
+                            case 48:
+                                {
+                                    includeConfigRules_ = input.readBool();
+                                    bitField0_ |= 0x00000020;
+                                    break;
+                                }
+                            // case 48
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.SliceFilter) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.SliceIdList sliceIds_;
 
             private com.google.protobuf.SingleFieldBuilderV3 sliceIdsBuilder_;
@@ -42897,7 +42282,7 @@ public final class ContextOuterClass {
              * @return Whether the sliceIds field is set.
              */
             public boolean hasSliceIds() {
-                return sliceIdsBuilder_ != null || sliceIds_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -42921,10 +42306,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     sliceIds_ = value;
-                    onChanged();
                 } else {
                     sliceIdsBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -42934,10 +42320,11 @@ public final class ContextOuterClass {
             public Builder setSliceIds(context.ContextOuterClass.SliceIdList.Builder builderForValue) {
                 if (sliceIdsBuilder_ == null) {
                     sliceIds_ = builderForValue.build();
-                    onChanged();
                 } else {
                     sliceIdsBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -42946,15 +42333,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeSliceIds(context.ContextOuterClass.SliceIdList value) {
                 if (sliceIdsBuilder_ == null) {
-                    if (sliceIds_ != null) {
-                        sliceIds_ = context.ContextOuterClass.SliceIdList.newBuilder(sliceIds_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && sliceIds_ != null && sliceIds_ != context.ContextOuterClass.SliceIdList.getDefaultInstance()) {
+                        getSliceIdsBuilder().mergeFrom(value);
                     } else {
                         sliceIds_ = value;
                     }
-                    onChanged();
                 } else {
                     sliceIdsBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -42962,13 +42350,13 @@ public final class ContextOuterClass {
              * .context.SliceIdList slice_ids = 1;
              */
             public Builder clearSliceIds() {
-                if (sliceIdsBuilder_ == null) {
-                    sliceIds_ = null;
-                    onChanged();
-                } else {
-                    sliceIds_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                sliceIds_ = null;
+                if (sliceIdsBuilder_ != null) {
+                    sliceIdsBuilder_.dispose();
                     sliceIdsBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -42976,6 +42364,7 @@ public final class ContextOuterClass {
              * .context.SliceIdList slice_ids = 1;
              */
             public context.ContextOuterClass.SliceIdList.Builder getSliceIdsBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getSliceIdsFieldBuilder().getBuilder();
             }
@@ -43020,6 +42409,7 @@ public final class ContextOuterClass {
              */
             public Builder setIncludeEndpointIds(boolean value) {
                 includeEndpointIds_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -43029,6 +42419,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearIncludeEndpointIds() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 includeEndpointIds_ = false;
                 onChanged();
                 return this;
@@ -43052,6 +42443,7 @@ public final class ContextOuterClass {
              */
             public Builder setIncludeConstraints(boolean value) {
                 includeConstraints_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -43061,6 +42453,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearIncludeConstraints() {
+                bitField0_ = (bitField0_ & ~0x00000004);
                 includeConstraints_ = false;
                 onChanged();
                 return this;
@@ -43084,6 +42477,7 @@ public final class ContextOuterClass {
              */
             public Builder setIncludeServiceIds(boolean value) {
                 includeServiceIds_ = value;
+                bitField0_ |= 0x00000008;
                 onChanged();
                 return this;
             }
@@ -43093,6 +42487,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearIncludeServiceIds() {
+                bitField0_ = (bitField0_ & ~0x00000008);
                 includeServiceIds_ = false;
                 onChanged();
                 return this;
@@ -43116,6 +42511,7 @@ public final class ContextOuterClass {
              */
             public Builder setIncludeSubsliceIds(boolean value) {
                 includeSubsliceIds_ = value;
+                bitField0_ |= 0x00000010;
                 onChanged();
                 return this;
             }
@@ -43125,6 +42521,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearIncludeSubsliceIds() {
+                bitField0_ = (bitField0_ & ~0x00000010);
                 includeSubsliceIds_ = false;
                 onChanged();
                 return this;
@@ -43148,6 +42545,7 @@ public final class ContextOuterClass {
              */
             public Builder setIncludeConfigRules(boolean value) {
                 includeConfigRules_ = value;
+                bitField0_ |= 0x00000020;
                 onChanged();
                 return this;
             }
@@ -43157,6 +42555,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearIncludeConfigRules() {
+                bitField0_ = (bitField0_ & ~0x00000020);
                 includeConfigRules_ = false;
                 onChanged();
                 return this;
@@ -43189,7 +42588,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public SliceFilter parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new SliceFilter(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -43268,70 +42677,6 @@ public final class ContextOuterClass {
             return new SliceEvent();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private SliceEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Event.Builder subBuilder = null;
-                                if (event_ != null) {
-                                    subBuilder = event_.toBuilder();
-                                }
-                                event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(event_);
-                                    event_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.SliceId.Builder subBuilder = null;
-                                if (sliceId_ != null) {
-                                    subBuilder = sliceId_.toBuilder();
-                                }
-                                sliceId_ = input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(sliceId_);
-                                    sliceId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_SliceEvent_descriptor;
         }
@@ -43368,7 +42713,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() {
-            return getEvent();
+            return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_;
         }
 
         public static final int SLICE_ID_FIELD_NUMBER = 2;
@@ -43398,7 +42743,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() {
-            return getSliceId();
+            return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -43422,7 +42767,7 @@ public final class ContextOuterClass {
             if (sliceId_ != null) {
                 output.writeMessage(2, getSliceId());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -43437,7 +42782,7 @@ public final class ContextOuterClass {
             if (sliceId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSliceId());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -43463,7 +42808,7 @@ public final class ContextOuterClass {
                 if (!getSliceId().equals(other.getSliceId()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -43483,7 +42828,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + SLICE_ID_FIELD_NUMBER;
                 hash = (53 * hash) + getSliceId().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -43577,32 +42922,24 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.SliceEvent.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (eventBuilder_ == null) {
-                    event_ = null;
-                } else {
-                    event_ = null;
+                bitField0_ = 0;
+                event_ = null;
+                if (eventBuilder_ != null) {
+                    eventBuilder_.dispose();
                     eventBuilder_ = null;
                 }
-                if (sliceIdBuilder_ == null) {
-                    sliceId_ = null;
-                } else {
-                    sliceId_ = null;
+                sliceId_ = null;
+                if (sliceIdBuilder_ != null) {
+                    sliceIdBuilder_.dispose();
                     sliceIdBuilder_ = null;
                 }
                 return this;
@@ -43630,48 +42967,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.SliceEvent buildPartial() {
                 context.ContextOuterClass.SliceEvent result = new context.ContextOuterClass.SliceEvent(this);
-                if (eventBuilder_ == null) {
-                    result.event_ = event_;
-                } else {
-                    result.event_ = eventBuilder_.build();
-                }
-                if (sliceIdBuilder_ == null) {
-                    result.sliceId_ = sliceId_;
-                } else {
-                    result.sliceId_ = sliceIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.SliceEvent result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.sliceId_ = sliceIdBuilder_ == null ? sliceId_ : sliceIdBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -43693,7 +43003,7 @@ public final class ContextOuterClass {
                 if (other.hasSliceId()) {
                     mergeSliceId(other.getSliceId());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -43705,20 +43015,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.SliceEvent parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getSliceIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.SliceEvent) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.Event event_;
 
             private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_;
@@ -43728,7 +43072,7 @@ public final class ContextOuterClass {
              * @return Whether the event field is set.
              */
             public boolean hasEvent() {
-                return eventBuilder_ != null || event_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -43752,10 +43096,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     event_ = value;
-                    onChanged();
                 } else {
                     eventBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -43765,10 +43110,11 @@ public final class ContextOuterClass {
             public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) {
                 if (eventBuilder_ == null) {
                     event_ = builderForValue.build();
-                    onChanged();
                 } else {
                     eventBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -43777,15 +43123,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeEvent(context.ContextOuterClass.Event value) {
                 if (eventBuilder_ == null) {
-                    if (event_ != null) {
-                        event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) {
+                        getEventBuilder().mergeFrom(value);
                     } else {
                         event_ = value;
                     }
-                    onChanged();
                 } else {
                     eventBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -43793,13 +43140,13 @@ public final class ContextOuterClass {
              * .context.Event event = 1;
              */
             public Builder clearEvent() {
-                if (eventBuilder_ == null) {
-                    event_ = null;
-                    onChanged();
-                } else {
-                    event_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                event_ = null;
+                if (eventBuilder_ != null) {
+                    eventBuilder_.dispose();
                     eventBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -43807,6 +43154,7 @@ public final class ContextOuterClass {
              * .context.Event event = 1;
              */
             public context.ContextOuterClass.Event.Builder getEventBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getEventFieldBuilder().getBuilder();
             }
@@ -43842,7 +43190,7 @@ public final class ContextOuterClass {
              * @return Whether the sliceId field is set.
              */
             public boolean hasSliceId() {
-                return sliceIdBuilder_ != null || sliceId_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -43866,10 +43214,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     sliceId_ = value;
-                    onChanged();
                 } else {
                     sliceIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -43879,10 +43228,11 @@ public final class ContextOuterClass {
             public Builder setSliceId(context.ContextOuterClass.SliceId.Builder builderForValue) {
                 if (sliceIdBuilder_ == null) {
                     sliceId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     sliceIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -43891,15 +43241,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeSliceId(context.ContextOuterClass.SliceId value) {
                 if (sliceIdBuilder_ == null) {
-                    if (sliceId_ != null) {
-                        sliceId_ = context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && sliceId_ != null && sliceId_ != context.ContextOuterClass.SliceId.getDefaultInstance()) {
+                        getSliceIdBuilder().mergeFrom(value);
                     } else {
                         sliceId_ = value;
                     }
-                    onChanged();
                 } else {
                     sliceIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -43907,13 +43258,13 @@ public final class ContextOuterClass {
              * .context.SliceId slice_id = 2;
              */
             public Builder clearSliceId() {
-                if (sliceIdBuilder_ == null) {
-                    sliceId_ = null;
-                    onChanged();
-                } else {
-                    sliceId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                sliceId_ = null;
+                if (sliceIdBuilder_ != null) {
+                    sliceIdBuilder_.dispose();
                     sliceIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -43921,6 +43272,7 @@ public final class ContextOuterClass {
              * .context.SliceId slice_id = 2;
              */
             public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getSliceIdFieldBuilder().getBuilder();
             }
@@ -43974,7 +43326,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public SliceEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new SliceEvent(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -44040,57 +43402,6 @@ public final class ContextOuterClass {
             return new ConnectionId();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ConnectionId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Uuid.Builder subBuilder = null;
-                                if (connectionUuid_ != null) {
-                                    subBuilder = connectionUuid_.toBuilder();
-                                }
-                                connectionUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(connectionUuid_);
-                                    connectionUuid_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ConnectionId_descriptor;
         }
@@ -44127,7 +43438,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder() {
-            return getConnectionUuid();
+            return connectionUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -44148,7 +43459,7 @@ public final class ContextOuterClass {
             if (connectionUuid_ != null) {
                 output.writeMessage(1, getConnectionUuid());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -44160,7 +43471,7 @@ public final class ContextOuterClass {
             if (connectionUuid_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getConnectionUuid());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -44180,7 +43491,7 @@ public final class ContextOuterClass {
                 if (!getConnectionUuid().equals(other.getConnectionUuid()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -44196,7 +43507,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + CONNECTION_UUID_FIELD_NUMBER;
                 hash = (53 * hash) + getConnectionUuid().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -44294,26 +43605,19 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ConnectionId.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (connectionUuidBuilder_ == null) {
-                    connectionUuid_ = null;
-                } else {
-                    connectionUuid_ = null;
+                bitField0_ = 0;
+                connectionUuid_ = null;
+                if (connectionUuidBuilder_ != null) {
+                    connectionUuidBuilder_.dispose();
                     connectionUuidBuilder_ = null;
                 }
                 return this;
@@ -44341,43 +43645,18 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ConnectionId buildPartial() {
                 context.ContextOuterClass.ConnectionId result = new context.ContextOuterClass.ConnectionId(this);
-                if (connectionUuidBuilder_ == null) {
-                    result.connectionUuid_ = connectionUuid_;
-                } else {
-                    result.connectionUuid_ = connectionUuidBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ConnectionId result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.connectionUuid_ = connectionUuidBuilder_ == null ? connectionUuid_ : connectionUuidBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -44396,7 +43675,7 @@ public final class ContextOuterClass {
                 if (other.hasConnectionUuid()) {
                     mergeConnectionUuid(other.getConnectionUuid());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -44408,20 +43687,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ConnectionId parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getConnectionUuidFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ConnectionId) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.Uuid connectionUuid_;
 
             private com.google.protobuf.SingleFieldBuilderV3 connectionUuidBuilder_;
@@ -44431,7 +43737,7 @@ public final class ContextOuterClass {
              * @return Whether the connectionUuid field is set.
              */
             public boolean hasConnectionUuid() {
-                return connectionUuidBuilder_ != null || connectionUuid_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -44455,10 +43761,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     connectionUuid_ = value;
-                    onChanged();
                 } else {
                     connectionUuidBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -44468,10 +43775,11 @@ public final class ContextOuterClass {
             public Builder setConnectionUuid(context.ContextOuterClass.Uuid.Builder builderForValue) {
                 if (connectionUuidBuilder_ == null) {
                     connectionUuid_ = builderForValue.build();
-                    onChanged();
                 } else {
                     connectionUuidBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -44480,15 +43788,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeConnectionUuid(context.ContextOuterClass.Uuid value) {
                 if (connectionUuidBuilder_ == null) {
-                    if (connectionUuid_ != null) {
-                        connectionUuid_ = context.ContextOuterClass.Uuid.newBuilder(connectionUuid_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && connectionUuid_ != null && connectionUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) {
+                        getConnectionUuidBuilder().mergeFrom(value);
                     } else {
                         connectionUuid_ = value;
                     }
-                    onChanged();
                 } else {
                     connectionUuidBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -44496,13 +43805,13 @@ public final class ContextOuterClass {
              * .context.Uuid connection_uuid = 1;
              */
             public Builder clearConnectionUuid() {
-                if (connectionUuidBuilder_ == null) {
-                    connectionUuid_ = null;
-                    onChanged();
-                } else {
-                    connectionUuid_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                connectionUuid_ = null;
+                if (connectionUuidBuilder_ != null) {
+                    connectionUuidBuilder_.dispose();
                     connectionUuidBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -44510,6 +43819,7 @@ public final class ContextOuterClass {
              * .context.Uuid connection_uuid = 1;
              */
             public context.ContextOuterClass.Uuid.Builder getConnectionUuidBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getConnectionUuidFieldBuilder().getBuilder();
             }
@@ -44563,7 +43873,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ConnectionId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ConnectionId(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -44621,50 +43941,6 @@ public final class ContextOuterClass {
             return new ConnectionSettings_L0();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ConnectionSettings_L0(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                lspSymbolicName_ = s;
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_descriptor;
         }
@@ -44676,7 +43952,8 @@ public final class ContextOuterClass {
 
         public static final int LSP_SYMBOLIC_NAME_FIELD_NUMBER = 1;
 
-        private volatile java.lang.Object lspSymbolicName_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object lspSymbolicName_ = "";
 
         /**
          * string lsp_symbolic_name = 1;
@@ -44726,10 +44003,10 @@ public final class ContextOuterClass {
 
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-            if (!getLspSymbolicNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lspSymbolicName_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, lspSymbolicName_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -44738,10 +44015,10 @@ public final class ContextOuterClass {
             if (size != -1)
                 return size;
             size = 0;
-            if (!getLspSymbolicNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lspSymbolicName_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, lspSymbolicName_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -44757,7 +44034,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.ConnectionSettings_L0 other = (context.ContextOuterClass.ConnectionSettings_L0) obj;
             if (!getLspSymbolicName().equals(other.getLspSymbolicName()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -44771,7 +44048,7 @@ public final class ContextOuterClass {
             hash = (19 * hash) + getDescriptor().hashCode();
             hash = (37 * hash) + LSP_SYMBOLIC_NAME_FIELD_NUMBER;
             hash = (53 * hash) + getLspSymbolicName().hashCode();
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -44865,22 +44142,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ConnectionSettings_L0.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 lspSymbolicName_ = "";
                 return this;
             }
@@ -44907,39 +44178,18 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ConnectionSettings_L0 buildPartial() {
                 context.ContextOuterClass.ConnectionSettings_L0 result = new context.ContextOuterClass.ConnectionSettings_L0(this);
-                result.lspSymbolicName_ = lspSymbolicName_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ConnectionSettings_L0 result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.lspSymbolicName_ = lspSymbolicName_;
+                }
             }
 
             @java.lang.Override
@@ -44957,9 +44207,10 @@ public final class ContextOuterClass {
                     return this;
                 if (!other.getLspSymbolicName().isEmpty()) {
                     lspSymbolicName_ = other.lspSymbolicName_;
+                    bitField0_ |= 0x00000001;
                     onChanged();
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -44971,20 +44222,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ConnectionSettings_L0 parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    lspSymbolicName_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ConnectionSettings_L0) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private java.lang.Object lspSymbolicName_ = "";
 
             /**
@@ -45028,6 +44306,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 lspSymbolicName_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -45038,6 +44317,7 @@ public final class ContextOuterClass {
              */
             public Builder clearLspSymbolicName() {
                 lspSymbolicName_ = getDefaultInstance().getLspSymbolicName();
+                bitField0_ = (bitField0_ & ~0x00000001);
                 onChanged();
                 return this;
             }
@@ -45053,6 +44333,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 lspSymbolicName_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -45084,7 +44365,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ConnectionSettings_L0 parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ConnectionSettings_L0(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -45179,76 +44470,6 @@ public final class ContextOuterClass {
             return new ConnectionSettings_L2();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ConnectionSettings_L2(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                srcMacAddress_ = s;
-                                break;
-                            }
-                        case 18:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                dstMacAddress_ = s;
-                                break;
-                            }
-                        case 24:
-                            {
-                                etherType_ = input.readUInt32();
-                                break;
-                            }
-                        case 32:
-                            {
-                                vlanId_ = input.readUInt32();
-                                break;
-                            }
-                        case 40:
-                            {
-                                mplsLabel_ = input.readUInt32();
-                                break;
-                            }
-                        case 48:
-                            {
-                                mplsTrafficClass_ = input.readUInt32();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_descriptor;
         }
@@ -45260,7 +44481,8 @@ public final class ContextOuterClass {
 
         public static final int SRC_MAC_ADDRESS_FIELD_NUMBER = 1;
 
-        private volatile java.lang.Object srcMacAddress_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object srcMacAddress_ = "";
 
         /**
          * string src_mac_address = 1;
@@ -45297,7 +44519,8 @@ public final class ContextOuterClass {
 
         public static final int DST_MAC_ADDRESS_FIELD_NUMBER = 2;
 
-        private volatile java.lang.Object dstMacAddress_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object dstMacAddress_ = "";
 
         /**
          * string dst_mac_address = 2;
@@ -45334,7 +44557,7 @@ public final class ContextOuterClass {
 
         public static final int ETHER_TYPE_FIELD_NUMBER = 3;
 
-        private int etherType_;
+        private int etherType_ = 0;
 
         /**
          * uint32 ether_type = 3;
@@ -45347,7 +44570,7 @@ public final class ContextOuterClass {
 
         public static final int VLAN_ID_FIELD_NUMBER = 4;
 
-        private int vlanId_;
+        private int vlanId_ = 0;
 
         /**
          * uint32 vlan_id = 4;
@@ -45360,7 +44583,7 @@ public final class ContextOuterClass {
 
         public static final int MPLS_LABEL_FIELD_NUMBER = 5;
 
-        private int mplsLabel_;
+        private int mplsLabel_ = 0;
 
         /**
          * uint32 mpls_label = 5;
@@ -45373,7 +44596,7 @@ public final class ContextOuterClass {
 
         public static final int MPLS_TRAFFIC_CLASS_FIELD_NUMBER = 6;
 
-        private int mplsTrafficClass_;
+        private int mplsTrafficClass_ = 0;
 
         /**
          * uint32 mpls_traffic_class = 6;
@@ -45399,10 +44622,10 @@ public final class ContextOuterClass {
 
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-            if (!getSrcMacAddressBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcMacAddress_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcMacAddress_);
             }
-            if (!getDstMacAddressBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstMacAddress_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstMacAddress_);
             }
             if (etherType_ != 0) {
@@ -45417,7 +44640,7 @@ public final class ContextOuterClass {
             if (mplsTrafficClass_ != 0) {
                 output.writeUInt32(6, mplsTrafficClass_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -45426,10 +44649,10 @@ public final class ContextOuterClass {
             if (size != -1)
                 return size;
             size = 0;
-            if (!getSrcMacAddressBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcMacAddress_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcMacAddress_);
             }
-            if (!getDstMacAddressBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstMacAddress_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstMacAddress_);
             }
             if (etherType_ != 0) {
@@ -45444,7 +44667,7 @@ public final class ContextOuterClass {
             if (mplsTrafficClass_ != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeUInt32Size(6, mplsTrafficClass_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -45470,7 +44693,7 @@ public final class ContextOuterClass {
                 return false;
             if (getMplsTrafficClass() != other.getMplsTrafficClass())
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -45494,7 +44717,7 @@ public final class ContextOuterClass {
             hash = (53 * hash) + getMplsLabel();
             hash = (37 * hash) + MPLS_TRAFFIC_CLASS_FIELD_NUMBER;
             hash = (53 * hash) + getMplsTrafficClass();
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -45588,22 +44811,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ConnectionSettings_L2.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 srcMacAddress_ = "";
                 dstMacAddress_ = "";
                 etherType_ = 0;
@@ -45635,44 +44852,33 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ConnectionSettings_L2 buildPartial() {
                 context.ContextOuterClass.ConnectionSettings_L2 result = new context.ContextOuterClass.ConnectionSettings_L2(this);
-                result.srcMacAddress_ = srcMacAddress_;
-                result.dstMacAddress_ = dstMacAddress_;
-                result.etherType_ = etherType_;
-                result.vlanId_ = vlanId_;
-                result.mplsLabel_ = mplsLabel_;
-                result.mplsTrafficClass_ = mplsTrafficClass_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ConnectionSettings_L2 result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.srcMacAddress_ = srcMacAddress_;
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.dstMacAddress_ = dstMacAddress_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.etherType_ = etherType_;
+                }
+                if (((from_bitField0_ & 0x00000008) != 0)) {
+                    result.vlanId_ = vlanId_;
+                }
+                if (((from_bitField0_ & 0x00000010) != 0)) {
+                    result.mplsLabel_ = mplsLabel_;
+                }
+                if (((from_bitField0_ & 0x00000020) != 0)) {
+                    result.mplsTrafficClass_ = mplsTrafficClass_;
+                }
             }
 
             @java.lang.Override
@@ -45690,10 +44896,12 @@ public final class ContextOuterClass {
                     return this;
                 if (!other.getSrcMacAddress().isEmpty()) {
                     srcMacAddress_ = other.srcMacAddress_;
+                    bitField0_ |= 0x00000001;
                     onChanged();
                 }
                 if (!other.getDstMacAddress().isEmpty()) {
                     dstMacAddress_ = other.dstMacAddress_;
+                    bitField0_ |= 0x00000002;
                     onChanged();
                 }
                 if (other.getEtherType() != 0) {
@@ -45708,7 +44916,7 @@ public final class ContextOuterClass {
                 if (other.getMplsTrafficClass() != 0) {
                     setMplsTrafficClass(other.getMplsTrafficClass());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -45720,20 +44928,82 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ConnectionSettings_L2 parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    srcMacAddress_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    dstMacAddress_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 24:
+                                {
+                                    etherType_ = input.readUInt32();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 24
+                            case 32:
+                                {
+                                    vlanId_ = input.readUInt32();
+                                    bitField0_ |= 0x00000008;
+                                    break;
+                                }
+                            // case 32
+                            case 40:
+                                {
+                                    mplsLabel_ = input.readUInt32();
+                                    bitField0_ |= 0x00000010;
+                                    break;
+                                }
+                            // case 40
+                            case 48:
+                                {
+                                    mplsTrafficClass_ = input.readUInt32();
+                                    bitField0_ |= 0x00000020;
+                                    break;
+                                }
+                            // case 48
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ConnectionSettings_L2) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private java.lang.Object srcMacAddress_ = "";
 
             /**
@@ -45777,6 +45047,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 srcMacAddress_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -45787,6 +45058,7 @@ public final class ContextOuterClass {
              */
             public Builder clearSrcMacAddress() {
                 srcMacAddress_ = getDefaultInstance().getSrcMacAddress();
+                bitField0_ = (bitField0_ & ~0x00000001);
                 onChanged();
                 return this;
             }
@@ -45802,6 +45074,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 srcMacAddress_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -45849,6 +45122,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 dstMacAddress_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -45859,6 +45133,7 @@ public final class ContextOuterClass {
              */
             public Builder clearDstMacAddress() {
                 dstMacAddress_ = getDefaultInstance().getDstMacAddress();
+                bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
             }
@@ -45874,6 +45149,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 dstMacAddress_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -45896,6 +45172,7 @@ public final class ContextOuterClass {
              */
             public Builder setEtherType(int value) {
                 etherType_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -45905,6 +45182,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearEtherType() {
+                bitField0_ = (bitField0_ & ~0x00000004);
                 etherType_ = 0;
                 onChanged();
                 return this;
@@ -45928,6 +45206,7 @@ public final class ContextOuterClass {
              */
             public Builder setVlanId(int value) {
                 vlanId_ = value;
+                bitField0_ |= 0x00000008;
                 onChanged();
                 return this;
             }
@@ -45937,6 +45216,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearVlanId() {
+                bitField0_ = (bitField0_ & ~0x00000008);
                 vlanId_ = 0;
                 onChanged();
                 return this;
@@ -45960,6 +45240,7 @@ public final class ContextOuterClass {
              */
             public Builder setMplsLabel(int value) {
                 mplsLabel_ = value;
+                bitField0_ |= 0x00000010;
                 onChanged();
                 return this;
             }
@@ -45969,6 +45250,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearMplsLabel() {
+                bitField0_ = (bitField0_ & ~0x00000010);
                 mplsLabel_ = 0;
                 onChanged();
                 return this;
@@ -45992,6 +45274,7 @@ public final class ContextOuterClass {
              */
             public Builder setMplsTrafficClass(int value) {
                 mplsTrafficClass_ = value;
+                bitField0_ |= 0x00000020;
                 onChanged();
                 return this;
             }
@@ -46001,6 +45284,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearMplsTrafficClass() {
+                bitField0_ = (bitField0_ & ~0x00000020);
                 mplsTrafficClass_ = 0;
                 onChanged();
                 return this;
@@ -46033,7 +45317,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ConnectionSettings_L2 parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ConnectionSettings_L2(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -46122,71 +45416,6 @@ public final class ContextOuterClass {
             return new ConnectionSettings_L3();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ConnectionSettings_L3(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                srcIpAddress_ = s;
-                                break;
-                            }
-                        case 18:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                dstIpAddress_ = s;
-                                break;
-                            }
-                        case 24:
-                            {
-                                dscp_ = input.readUInt32();
-                                break;
-                            }
-                        case 32:
-                            {
-                                protocol_ = input.readUInt32();
-                                break;
-                            }
-                        case 40:
-                            {
-                                ttl_ = input.readUInt32();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_descriptor;
         }
@@ -46198,7 +45427,8 @@ public final class ContextOuterClass {
 
         public static final int SRC_IP_ADDRESS_FIELD_NUMBER = 1;
 
-        private volatile java.lang.Object srcIpAddress_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object srcIpAddress_ = "";
 
         /**
          * string src_ip_address = 1;
@@ -46235,7 +45465,8 @@ public final class ContextOuterClass {
 
         public static final int DST_IP_ADDRESS_FIELD_NUMBER = 2;
 
-        private volatile java.lang.Object dstIpAddress_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object dstIpAddress_ = "";
 
         /**
          * string dst_ip_address = 2;
@@ -46272,7 +45503,7 @@ public final class ContextOuterClass {
 
         public static final int DSCP_FIELD_NUMBER = 3;
 
-        private int dscp_;
+        private int dscp_ = 0;
 
         /**
          * uint32 dscp = 3;
@@ -46285,7 +45516,7 @@ public final class ContextOuterClass {
 
         public static final int PROTOCOL_FIELD_NUMBER = 4;
 
-        private int protocol_;
+        private int protocol_ = 0;
 
         /**
          * uint32 protocol = 4;
@@ -46298,7 +45529,7 @@ public final class ContextOuterClass {
 
         public static final int TTL_FIELD_NUMBER = 5;
 
-        private int ttl_;
+        private int ttl_ = 0;
 
         /**
          * uint32 ttl = 5;
@@ -46324,10 +45555,10 @@ public final class ContextOuterClass {
 
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-            if (!getSrcIpAddressBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcIpAddress_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcIpAddress_);
             }
-            if (!getDstIpAddressBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstIpAddress_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstIpAddress_);
             }
             if (dscp_ != 0) {
@@ -46339,7 +45570,7 @@ public final class ContextOuterClass {
             if (ttl_ != 0) {
                 output.writeUInt32(5, ttl_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -46348,10 +45579,10 @@ public final class ContextOuterClass {
             if (size != -1)
                 return size;
             size = 0;
-            if (!getSrcIpAddressBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcIpAddress_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcIpAddress_);
             }
-            if (!getDstIpAddressBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstIpAddress_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstIpAddress_);
             }
             if (dscp_ != 0) {
@@ -46363,7 +45594,7 @@ public final class ContextOuterClass {
             if (ttl_ != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeUInt32Size(5, ttl_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -46387,7 +45618,7 @@ public final class ContextOuterClass {
                 return false;
             if (getTtl() != other.getTtl())
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -46409,7 +45640,7 @@ public final class ContextOuterClass {
             hash = (53 * hash) + getProtocol();
             hash = (37 * hash) + TTL_FIELD_NUMBER;
             hash = (53 * hash) + getTtl();
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -46503,22 +45734,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ConnectionSettings_L3.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 srcIpAddress_ = "";
                 dstIpAddress_ = "";
                 dscp_ = 0;
@@ -46549,43 +45774,30 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ConnectionSettings_L3 buildPartial() {
                 context.ContextOuterClass.ConnectionSettings_L3 result = new context.ContextOuterClass.ConnectionSettings_L3(this);
-                result.srcIpAddress_ = srcIpAddress_;
-                result.dstIpAddress_ = dstIpAddress_;
-                result.dscp_ = dscp_;
-                result.protocol_ = protocol_;
-                result.ttl_ = ttl_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ConnectionSettings_L3 result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.srcIpAddress_ = srcIpAddress_;
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.dstIpAddress_ = dstIpAddress_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.dscp_ = dscp_;
+                }
+                if (((from_bitField0_ & 0x00000008) != 0)) {
+                    result.protocol_ = protocol_;
+                }
+                if (((from_bitField0_ & 0x00000010) != 0)) {
+                    result.ttl_ = ttl_;
+                }
             }
 
             @java.lang.Override
@@ -46603,10 +45815,12 @@ public final class ContextOuterClass {
                     return this;
                 if (!other.getSrcIpAddress().isEmpty()) {
                     srcIpAddress_ = other.srcIpAddress_;
+                    bitField0_ |= 0x00000001;
                     onChanged();
                 }
                 if (!other.getDstIpAddress().isEmpty()) {
                     dstIpAddress_ = other.dstIpAddress_;
+                    bitField0_ |= 0x00000002;
                     onChanged();
                 }
                 if (other.getDscp() != 0) {
@@ -46618,7 +45832,7 @@ public final class ContextOuterClass {
                 if (other.getTtl() != 0) {
                     setTtl(other.getTtl());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -46630,20 +45844,75 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ConnectionSettings_L3 parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    srcIpAddress_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    dstIpAddress_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 24:
+                                {
+                                    dscp_ = input.readUInt32();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 24
+                            case 32:
+                                {
+                                    protocol_ = input.readUInt32();
+                                    bitField0_ |= 0x00000008;
+                                    break;
+                                }
+                            // case 32
+                            case 40:
+                                {
+                                    ttl_ = input.readUInt32();
+                                    bitField0_ |= 0x00000010;
+                                    break;
+                                }
+                            // case 40
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ConnectionSettings_L3) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private java.lang.Object srcIpAddress_ = "";
 
             /**
@@ -46687,6 +45956,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 srcIpAddress_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -46697,6 +45967,7 @@ public final class ContextOuterClass {
              */
             public Builder clearSrcIpAddress() {
                 srcIpAddress_ = getDefaultInstance().getSrcIpAddress();
+                bitField0_ = (bitField0_ & ~0x00000001);
                 onChanged();
                 return this;
             }
@@ -46712,6 +45983,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 srcIpAddress_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -46759,6 +46031,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 dstIpAddress_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -46769,6 +46042,7 @@ public final class ContextOuterClass {
              */
             public Builder clearDstIpAddress() {
                 dstIpAddress_ = getDefaultInstance().getDstIpAddress();
+                bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
             }
@@ -46784,6 +46058,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 dstIpAddress_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -46806,6 +46081,7 @@ public final class ContextOuterClass {
              */
             public Builder setDscp(int value) {
                 dscp_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -46815,6 +46091,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearDscp() {
+                bitField0_ = (bitField0_ & ~0x00000004);
                 dscp_ = 0;
                 onChanged();
                 return this;
@@ -46838,6 +46115,7 @@ public final class ContextOuterClass {
              */
             public Builder setProtocol(int value) {
                 protocol_ = value;
+                bitField0_ |= 0x00000008;
                 onChanged();
                 return this;
             }
@@ -46847,6 +46125,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearProtocol() {
+                bitField0_ = (bitField0_ & ~0x00000008);
                 protocol_ = 0;
                 onChanged();
                 return this;
@@ -46870,6 +46149,7 @@ public final class ContextOuterClass {
              */
             public Builder setTtl(int value) {
                 ttl_ = value;
+                bitField0_ |= 0x00000010;
                 onChanged();
                 return this;
             }
@@ -46879,6 +46159,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearTtl() {
+                bitField0_ = (bitField0_ & ~0x00000010);
                 ttl_ = 0;
                 onChanged();
                 return this;
@@ -46911,7 +46192,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ConnectionSettings_L3 parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ConnectionSettings_L3(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -46980,64 +46271,6 @@ public final class ContextOuterClass {
             return new ConnectionSettings_L4();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ConnectionSettings_L4(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 8:
-                            {
-                                srcPort_ = input.readUInt32();
-                                break;
-                            }
-                        case 16:
-                            {
-                                dstPort_ = input.readUInt32();
-                                break;
-                            }
-                        case 24:
-                            {
-                                tcpFlags_ = input.readUInt32();
-                                break;
-                            }
-                        case 32:
-                            {
-                                ttl_ = input.readUInt32();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_descriptor;
         }
@@ -47049,7 +46282,7 @@ public final class ContextOuterClass {
 
         public static final int SRC_PORT_FIELD_NUMBER = 1;
 
-        private int srcPort_;
+        private int srcPort_ = 0;
 
         /**
          * uint32 src_port = 1;
@@ -47062,7 +46295,7 @@ public final class ContextOuterClass {
 
         public static final int DST_PORT_FIELD_NUMBER = 2;
 
-        private int dstPort_;
+        private int dstPort_ = 0;
 
         /**
          * uint32 dst_port = 2;
@@ -47075,7 +46308,7 @@ public final class ContextOuterClass {
 
         public static final int TCP_FLAGS_FIELD_NUMBER = 3;
 
-        private int tcpFlags_;
+        private int tcpFlags_ = 0;
 
         /**
          * uint32 tcp_flags = 3;
@@ -47088,7 +46321,7 @@ public final class ContextOuterClass {
 
         public static final int TTL_FIELD_NUMBER = 4;
 
-        private int ttl_;
+        private int ttl_ = 0;
 
         /**
          * uint32 ttl = 4;
@@ -47126,7 +46359,7 @@ public final class ContextOuterClass {
             if (ttl_ != 0) {
                 output.writeUInt32(4, ttl_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -47147,7 +46380,7 @@ public final class ContextOuterClass {
             if (ttl_ != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeUInt32Size(4, ttl_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -47169,7 +46402,7 @@ public final class ContextOuterClass {
                 return false;
             if (getTtl() != other.getTtl())
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -47189,7 +46422,7 @@ public final class ContextOuterClass {
             hash = (53 * hash) + getTcpFlags();
             hash = (37 * hash) + TTL_FIELD_NUMBER;
             hash = (53 * hash) + getTtl();
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -47283,22 +46516,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ConnectionSettings_L4.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 srcPort_ = 0;
                 dstPort_ = 0;
                 tcpFlags_ = 0;
@@ -47328,42 +46555,27 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ConnectionSettings_L4 buildPartial() {
                 context.ContextOuterClass.ConnectionSettings_L4 result = new context.ContextOuterClass.ConnectionSettings_L4(this);
-                result.srcPort_ = srcPort_;
-                result.dstPort_ = dstPort_;
-                result.tcpFlags_ = tcpFlags_;
-                result.ttl_ = ttl_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ConnectionSettings_L4 result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.srcPort_ = srcPort_;
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.dstPort_ = dstPort_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.tcpFlags_ = tcpFlags_;
+                }
+                if (((from_bitField0_ & 0x00000008) != 0)) {
+                    result.ttl_ = ttl_;
+                }
             }
 
             @java.lang.Override
@@ -47391,7 +46603,7 @@ public final class ContextOuterClass {
                 if (other.getTtl() != 0) {
                     setTtl(other.getTtl());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -47403,20 +46615,68 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ConnectionSettings_L4 parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 8:
+                                {
+                                    srcPort_ = input.readUInt32();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 8
+                            case 16:
+                                {
+                                    dstPort_ = input.readUInt32();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 16
+                            case 24:
+                                {
+                                    tcpFlags_ = input.readUInt32();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 24
+                            case 32:
+                                {
+                                    ttl_ = input.readUInt32();
+                                    bitField0_ |= 0x00000008;
+                                    break;
+                                }
+                            // case 32
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ConnectionSettings_L4) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private int srcPort_;
 
             /**
@@ -47435,6 +46695,7 @@ public final class ContextOuterClass {
              */
             public Builder setSrcPort(int value) {
                 srcPort_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -47444,6 +46705,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearSrcPort() {
+                bitField0_ = (bitField0_ & ~0x00000001);
                 srcPort_ = 0;
                 onChanged();
                 return this;
@@ -47467,6 +46729,7 @@ public final class ContextOuterClass {
              */
             public Builder setDstPort(int value) {
                 dstPort_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -47476,6 +46739,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearDstPort() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 dstPort_ = 0;
                 onChanged();
                 return this;
@@ -47499,6 +46763,7 @@ public final class ContextOuterClass {
              */
             public Builder setTcpFlags(int value) {
                 tcpFlags_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -47508,6 +46773,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearTcpFlags() {
+                bitField0_ = (bitField0_ & ~0x00000004);
                 tcpFlags_ = 0;
                 onChanged();
                 return this;
@@ -47531,6 +46797,7 @@ public final class ContextOuterClass {
              */
             public Builder setTtl(int value) {
                 ttl_ = value;
+                bitField0_ |= 0x00000008;
                 onChanged();
                 return this;
             }
@@ -47540,6 +46807,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearTtl() {
+                bitField0_ = (bitField0_ & ~0x00000008);
                 ttl_ = 0;
                 onChanged();
                 return this;
@@ -47572,7 +46840,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ConnectionSettings_L4 parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ConnectionSettings_L4(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -47685,96 +46963,6 @@ public final class ContextOuterClass {
             return new ConnectionSettings();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ConnectionSettings(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.ConnectionSettings_L0.Builder subBuilder = null;
-                                if (l0_ != null) {
-                                    subBuilder = l0_.toBuilder();
-                                }
-                                l0_ = input.readMessage(context.ContextOuterClass.ConnectionSettings_L0.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(l0_);
-                                    l0_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.ConnectionSettings_L2.Builder subBuilder = null;
-                                if (l2_ != null) {
-                                    subBuilder = l2_.toBuilder();
-                                }
-                                l2_ = input.readMessage(context.ContextOuterClass.ConnectionSettings_L2.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(l2_);
-                                    l2_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 26:
-                            {
-                                context.ContextOuterClass.ConnectionSettings_L3.Builder subBuilder = null;
-                                if (l3_ != null) {
-                                    subBuilder = l3_.toBuilder();
-                                }
-                                l3_ = input.readMessage(context.ContextOuterClass.ConnectionSettings_L3.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(l3_);
-                                    l3_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 34:
-                            {
-                                context.ContextOuterClass.ConnectionSettings_L4.Builder subBuilder = null;
-                                if (l4_ != null) {
-                                    subBuilder = l4_.toBuilder();
-                                }
-                                l4_ = input.readMessage(context.ContextOuterClass.ConnectionSettings_L4.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(l4_);
-                                    l4_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ConnectionSettings_descriptor;
         }
@@ -47811,7 +46999,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder() {
-            return getL0();
+            return l0_ == null ? context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_;
         }
 
         public static final int L2_FIELD_NUMBER = 2;
@@ -47841,7 +47029,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder() {
-            return getL2();
+            return l2_ == null ? context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_;
         }
 
         public static final int L3_FIELD_NUMBER = 3;
@@ -47871,7 +47059,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder() {
-            return getL3();
+            return l3_ == null ? context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_;
         }
 
         public static final int L4_FIELD_NUMBER = 4;
@@ -47901,7 +47089,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder() {
-            return getL4();
+            return l4_ == null ? context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -47931,7 +47119,7 @@ public final class ContextOuterClass {
             if (l4_ != null) {
                 output.writeMessage(4, getL4());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -47952,7 +47140,7 @@ public final class ContextOuterClass {
             if (l4_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getL4());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -47990,7 +47178,7 @@ public final class ContextOuterClass {
                 if (!getL4().equals(other.getL4()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -48018,7 +47206,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + L4_FIELD_NUMBER;
                 hash = (53 * hash) + getL4().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -48112,44 +47300,34 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ConnectionSettings.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (l0Builder_ == null) {
-                    l0_ = null;
-                } else {
-                    l0_ = null;
+                bitField0_ = 0;
+                l0_ = null;
+                if (l0Builder_ != null) {
+                    l0Builder_.dispose();
                     l0Builder_ = null;
                 }
-                if (l2Builder_ == null) {
-                    l2_ = null;
-                } else {
-                    l2_ = null;
+                l2_ = null;
+                if (l2Builder_ != null) {
+                    l2Builder_.dispose();
                     l2Builder_ = null;
                 }
-                if (l3Builder_ == null) {
-                    l3_ = null;
-                } else {
-                    l3_ = null;
+                l3_ = null;
+                if (l3Builder_ != null) {
+                    l3Builder_.dispose();
                     l3Builder_ = null;
                 }
-                if (l4Builder_ == null) {
-                    l4_ = null;
-                } else {
-                    l4_ = null;
+                l4_ = null;
+                if (l4Builder_ != null) {
+                    l4Builder_.dispose();
                     l4Builder_ = null;
                 }
                 return this;
@@ -48177,58 +47355,27 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ConnectionSettings buildPartial() {
                 context.ContextOuterClass.ConnectionSettings result = new context.ContextOuterClass.ConnectionSettings(this);
-                if (l0Builder_ == null) {
-                    result.l0_ = l0_;
-                } else {
-                    result.l0_ = l0Builder_.build();
-                }
-                if (l2Builder_ == null) {
-                    result.l2_ = l2_;
-                } else {
-                    result.l2_ = l2Builder_.build();
-                }
-                if (l3Builder_ == null) {
-                    result.l3_ = l3_;
-                } else {
-                    result.l3_ = l3Builder_.build();
-                }
-                if (l4Builder_ == null) {
-                    result.l4_ = l4_;
-                } else {
-                    result.l4_ = l4Builder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ConnectionSettings result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.l0_ = l0Builder_ == null ? l0_ : l0Builder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.l2_ = l2Builder_ == null ? l2_ : l2Builder_.build();
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.l3_ = l3Builder_ == null ? l3_ : l3Builder_.build();
+                }
+                if (((from_bitField0_ & 0x00000008) != 0)) {
+                    result.l4_ = l4Builder_ == null ? l4_ : l4Builder_.build();
+                }
             }
 
             @java.lang.Override
@@ -48256,7 +47403,7 @@ public final class ContextOuterClass {
                 if (other.hasL4()) {
                     mergeL4(other.getL4());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -48268,20 +47415,68 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ConnectionSettings parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getL0FieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getL2FieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    input.readMessage(getL3FieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 26
+                            case 34:
+                                {
+                                    input.readMessage(getL4FieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000008;
+                                    break;
+                                }
+                            // case 34
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ConnectionSettings) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.ConnectionSettings_L0 l0_;
 
             private com.google.protobuf.SingleFieldBuilderV3 l0Builder_;
@@ -48291,7 +47486,7 @@ public final class ContextOuterClass {
              * @return Whether the l0 field is set.
              */
             public boolean hasL0() {
-                return l0Builder_ != null || l0_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -48315,10 +47510,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     l0_ = value;
-                    onChanged();
                 } else {
                     l0Builder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -48328,10 +47524,11 @@ public final class ContextOuterClass {
             public Builder setL0(context.ContextOuterClass.ConnectionSettings_L0.Builder builderForValue) {
                 if (l0Builder_ == null) {
                     l0_ = builderForValue.build();
-                    onChanged();
                 } else {
                     l0Builder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -48340,15 +47537,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeL0(context.ContextOuterClass.ConnectionSettings_L0 value) {
                 if (l0Builder_ == null) {
-                    if (l0_ != null) {
-                        l0_ = context.ContextOuterClass.ConnectionSettings_L0.newBuilder(l0_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && l0_ != null && l0_ != context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance()) {
+                        getL0Builder().mergeFrom(value);
                     } else {
                         l0_ = value;
                     }
-                    onChanged();
                 } else {
                     l0Builder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -48356,13 +47554,13 @@ public final class ContextOuterClass {
              * .context.ConnectionSettings_L0 l0 = 1;
              */
             public Builder clearL0() {
-                if (l0Builder_ == null) {
-                    l0_ = null;
-                    onChanged();
-                } else {
-                    l0_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                l0_ = null;
+                if (l0Builder_ != null) {
+                    l0Builder_.dispose();
                     l0Builder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -48370,6 +47568,7 @@ public final class ContextOuterClass {
              * .context.ConnectionSettings_L0 l0 = 1;
              */
             public context.ContextOuterClass.ConnectionSettings_L0.Builder getL0Builder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getL0FieldBuilder().getBuilder();
             }
@@ -48405,7 +47604,7 @@ public final class ContextOuterClass {
              * @return Whether the l2 field is set.
              */
             public boolean hasL2() {
-                return l2Builder_ != null || l2_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -48429,10 +47628,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     l2_ = value;
-                    onChanged();
                 } else {
                     l2Builder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -48442,10 +47642,11 @@ public final class ContextOuterClass {
             public Builder setL2(context.ContextOuterClass.ConnectionSettings_L2.Builder builderForValue) {
                 if (l2Builder_ == null) {
                     l2_ = builderForValue.build();
-                    onChanged();
                 } else {
                     l2Builder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -48454,15 +47655,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeL2(context.ContextOuterClass.ConnectionSettings_L2 value) {
                 if (l2Builder_ == null) {
-                    if (l2_ != null) {
-                        l2_ = context.ContextOuterClass.ConnectionSettings_L2.newBuilder(l2_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && l2_ != null && l2_ != context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance()) {
+                        getL2Builder().mergeFrom(value);
                     } else {
                         l2_ = value;
                     }
-                    onChanged();
                 } else {
                     l2Builder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -48470,13 +47672,13 @@ public final class ContextOuterClass {
              * .context.ConnectionSettings_L2 l2 = 2;
              */
             public Builder clearL2() {
-                if (l2Builder_ == null) {
-                    l2_ = null;
-                    onChanged();
-                } else {
-                    l2_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                l2_ = null;
+                if (l2Builder_ != null) {
+                    l2Builder_.dispose();
                     l2Builder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -48484,6 +47686,7 @@ public final class ContextOuterClass {
              * .context.ConnectionSettings_L2 l2 = 2;
              */
             public context.ContextOuterClass.ConnectionSettings_L2.Builder getL2Builder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getL2FieldBuilder().getBuilder();
             }
@@ -48519,7 +47722,7 @@ public final class ContextOuterClass {
              * @return Whether the l3 field is set.
              */
             public boolean hasL3() {
-                return l3Builder_ != null || l3_ != null;
+                return ((bitField0_ & 0x00000004) != 0);
             }
 
             /**
@@ -48543,10 +47746,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     l3_ = value;
-                    onChanged();
                 } else {
                     l3Builder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -48556,10 +47760,11 @@ public final class ContextOuterClass {
             public Builder setL3(context.ContextOuterClass.ConnectionSettings_L3.Builder builderForValue) {
                 if (l3Builder_ == null) {
                     l3_ = builderForValue.build();
-                    onChanged();
                 } else {
                     l3Builder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -48568,15 +47773,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeL3(context.ContextOuterClass.ConnectionSettings_L3 value) {
                 if (l3Builder_ == null) {
-                    if (l3_ != null) {
-                        l3_ = context.ContextOuterClass.ConnectionSettings_L3.newBuilder(l3_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000004) != 0) && l3_ != null && l3_ != context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance()) {
+                        getL3Builder().mergeFrom(value);
                     } else {
                         l3_ = value;
                     }
-                    onChanged();
                 } else {
                     l3Builder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -48584,13 +47790,13 @@ public final class ContextOuterClass {
              * .context.ConnectionSettings_L3 l3 = 3;
              */
             public Builder clearL3() {
-                if (l3Builder_ == null) {
-                    l3_ = null;
-                    onChanged();
-                } else {
-                    l3_ = null;
+                bitField0_ = (bitField0_ & ~0x00000004);
+                l3_ = null;
+                if (l3Builder_ != null) {
+                    l3Builder_.dispose();
                     l3Builder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -48598,6 +47804,7 @@ public final class ContextOuterClass {
              * .context.ConnectionSettings_L3 l3 = 3;
              */
             public context.ContextOuterClass.ConnectionSettings_L3.Builder getL3Builder() {
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return getL3FieldBuilder().getBuilder();
             }
@@ -48633,7 +47840,7 @@ public final class ContextOuterClass {
              * @return Whether the l4 field is set.
              */
             public boolean hasL4() {
-                return l4Builder_ != null || l4_ != null;
+                return ((bitField0_ & 0x00000008) != 0);
             }
 
             /**
@@ -48657,10 +47864,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     l4_ = value;
-                    onChanged();
                 } else {
                     l4Builder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000008;
+                onChanged();
                 return this;
             }
 
@@ -48670,10 +47878,11 @@ public final class ContextOuterClass {
             public Builder setL4(context.ContextOuterClass.ConnectionSettings_L4.Builder builderForValue) {
                 if (l4Builder_ == null) {
                     l4_ = builderForValue.build();
-                    onChanged();
                 } else {
                     l4Builder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000008;
+                onChanged();
                 return this;
             }
 
@@ -48682,15 +47891,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeL4(context.ContextOuterClass.ConnectionSettings_L4 value) {
                 if (l4Builder_ == null) {
-                    if (l4_ != null) {
-                        l4_ = context.ContextOuterClass.ConnectionSettings_L4.newBuilder(l4_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000008) != 0) && l4_ != null && l4_ != context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance()) {
+                        getL4Builder().mergeFrom(value);
                     } else {
                         l4_ = value;
                     }
-                    onChanged();
                 } else {
                     l4Builder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000008;
+                onChanged();
                 return this;
             }
 
@@ -48698,13 +47908,13 @@ public final class ContextOuterClass {
              * .context.ConnectionSettings_L4 l4 = 4;
              */
             public Builder clearL4() {
-                if (l4Builder_ == null) {
-                    l4_ = null;
-                    onChanged();
-                } else {
-                    l4_ = null;
+                bitField0_ = (bitField0_ & ~0x00000008);
+                l4_ = null;
+                if (l4Builder_ != null) {
+                    l4Builder_.dispose();
                     l4Builder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -48712,6 +47922,7 @@ public final class ContextOuterClass {
              * .context.ConnectionSettings_L4 l4 = 4;
              */
             public context.ContextOuterClass.ConnectionSettings_L4.Builder getL4Builder() {
+                bitField0_ |= 0x00000008;
                 onChanged();
                 return getL4FieldBuilder().getBuilder();
             }
@@ -48765,7 +47976,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ConnectionSettings parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ConnectionSettings(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -48913,108 +48134,6 @@ public final class ContextOuterClass {
             return new Connection();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Connection(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.ConnectionId.Builder subBuilder = null;
-                                if (connectionId_ != null) {
-                                    subBuilder = connectionId_.toBuilder();
-                                }
-                                connectionId_ = input.readMessage(context.ContextOuterClass.ConnectionId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(connectionId_);
-                                    connectionId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.ServiceId.Builder subBuilder = null;
-                                if (serviceId_ != null) {
-                                    subBuilder = serviceId_.toBuilder();
-                                }
-                                serviceId_ = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(serviceId_);
-                                    serviceId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 26:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    pathHopsEndpointIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                pathHopsEndpointIds_.add(input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry));
-                                break;
-                            }
-                        case 34:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000002) != 0)) {
-                                    subServiceIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000002;
-                                }
-                                subServiceIds_.add(input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry));
-                                break;
-                            }
-                        case 42:
-                            {
-                                context.ContextOuterClass.ConnectionSettings.Builder subBuilder = null;
-                                if (settings_ != null) {
-                                    subBuilder = settings_.toBuilder();
-                                }
-                                settings_ = input.readMessage(context.ContextOuterClass.ConnectionSettings.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(settings_);
-                                    settings_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    pathHopsEndpointIds_ = java.util.Collections.unmodifiableList(pathHopsEndpointIds_);
-                }
-                if (((mutable_bitField0_ & 0x00000002) != 0)) {
-                    subServiceIds_ = java.util.Collections.unmodifiableList(subServiceIds_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Connection_descriptor;
         }
@@ -49051,7 +48170,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() {
-            return getConnectionId();
+            return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_;
         }
 
         public static final int SERVICE_ID_FIELD_NUMBER = 2;
@@ -49081,11 +48200,12 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() {
-            return getServiceId();
+            return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_;
         }
 
         public static final int PATH_HOPS_ENDPOINT_IDS_FIELD_NUMBER = 3;
 
+        @SuppressWarnings("serial")
         private java.util.List pathHopsEndpointIds_;
 
         /**
@@ -49130,6 +48250,7 @@ public final class ContextOuterClass {
 
         public static final int SUB_SERVICE_IDS_FIELD_NUMBER = 4;
 
+        @SuppressWarnings("serial")
         private java.util.List subServiceIds_;
 
         /**
@@ -49199,7 +48320,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder() {
-            return getSettings();
+            return settings_ == null ? context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -49232,7 +48353,7 @@ public final class ContextOuterClass {
             if (settings_ != null) {
                 output.writeMessage(5, getSettings());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -49256,7 +48377,7 @@ public final class ContextOuterClass {
             if (settings_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSettings());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -49292,7 +48413,7 @@ public final class ContextOuterClass {
                 if (!getSettings().equals(other.getSettings()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -49324,7 +48445,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + SETTINGS_FIELD_NUMBER;
                 hash = (53 * hash) + getSettings().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -49418,52 +48539,43 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Connection.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getPathHopsEndpointIdsFieldBuilder();
-                    getSubServiceIdsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (connectionIdBuilder_ == null) {
-                    connectionId_ = null;
-                } else {
-                    connectionId_ = null;
+                bitField0_ = 0;
+                connectionId_ = null;
+                if (connectionIdBuilder_ != null) {
+                    connectionIdBuilder_.dispose();
                     connectionIdBuilder_ = null;
                 }
-                if (serviceIdBuilder_ == null) {
-                    serviceId_ = null;
-                } else {
-                    serviceId_ = null;
+                serviceId_ = null;
+                if (serviceIdBuilder_ != null) {
+                    serviceIdBuilder_.dispose();
                     serviceIdBuilder_ = null;
                 }
                 if (pathHopsEndpointIdsBuilder_ == null) {
                     pathHopsEndpointIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    pathHopsEndpointIds_ = null;
                     pathHopsEndpointIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000004);
                 if (subServiceIdsBuilder_ == null) {
                     subServiceIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000002);
                 } else {
+                    subServiceIds_ = null;
                     subServiceIdsBuilder_.clear();
                 }
-                if (settingsBuilder_ == null) {
-                    settings_ = null;
-                } else {
-                    settings_ = null;
+                bitField0_ = (bitField0_ & ~0x00000008);
+                settings_ = null;
+                if (settingsBuilder_ != null) {
+                    settingsBuilder_.dispose();
                     settingsBuilder_ = null;
                 }
                 return this;
@@ -49491,72 +48603,46 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Connection buildPartial() {
                 context.ContextOuterClass.Connection result = new context.ContextOuterClass.Connection(this);
-                int from_bitField0_ = bitField0_;
-                if (connectionIdBuilder_ == null) {
-                    result.connectionId_ = connectionId_;
-                } else {
-                    result.connectionId_ = connectionIdBuilder_.build();
-                }
-                if (serviceIdBuilder_ == null) {
-                    result.serviceId_ = serviceId_;
-                } else {
-                    result.serviceId_ = serviceIdBuilder_.build();
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.Connection result) {
                 if (pathHopsEndpointIdsBuilder_ == null) {
-                    if (((bitField0_ & 0x00000001) != 0)) {
+                    if (((bitField0_ & 0x00000004) != 0)) {
                         pathHopsEndpointIds_ = java.util.Collections.unmodifiableList(pathHopsEndpointIds_);
-                        bitField0_ = (bitField0_ & ~0x00000001);
+                        bitField0_ = (bitField0_ & ~0x00000004);
                     }
                     result.pathHopsEndpointIds_ = pathHopsEndpointIds_;
                 } else {
                     result.pathHopsEndpointIds_ = pathHopsEndpointIdsBuilder_.build();
                 }
                 if (subServiceIdsBuilder_ == null) {
-                    if (((bitField0_ & 0x00000002) != 0)) {
+                    if (((bitField0_ & 0x00000008) != 0)) {
                         subServiceIds_ = java.util.Collections.unmodifiableList(subServiceIds_);
-                        bitField0_ = (bitField0_ & ~0x00000002);
+                        bitField0_ = (bitField0_ & ~0x00000008);
                     }
                     result.subServiceIds_ = subServiceIds_;
                 } else {
                     result.subServiceIds_ = subServiceIdsBuilder_.build();
                 }
-                if (settingsBuilder_ == null) {
-                    result.settings_ = settings_;
-                } else {
-                    result.settings_ = settingsBuilder_.build();
-                }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
             }
 
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.Connection result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.connectionId_ = connectionIdBuilder_ == null ? connectionId_ : connectionIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.serviceId_ = serviceIdBuilder_ == null ? serviceId_ : serviceIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000010) != 0)) {
+                    result.settings_ = settingsBuilder_ == null ? settings_ : settingsBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -49582,7 +48668,7 @@ public final class ContextOuterClass {
                     if (!other.pathHopsEndpointIds_.isEmpty()) {
                         if (pathHopsEndpointIds_.isEmpty()) {
                             pathHopsEndpointIds_ = other.pathHopsEndpointIds_;
-                            bitField0_ = (bitField0_ & ~0x00000001);
+                            bitField0_ = (bitField0_ & ~0x00000004);
                         } else {
                             ensurePathHopsEndpointIdsIsMutable();
                             pathHopsEndpointIds_.addAll(other.pathHopsEndpointIds_);
@@ -49595,7 +48681,7 @@ public final class ContextOuterClass {
                             pathHopsEndpointIdsBuilder_.dispose();
                             pathHopsEndpointIdsBuilder_ = null;
                             pathHopsEndpointIds_ = other.pathHopsEndpointIds_;
-                            bitField0_ = (bitField0_ & ~0x00000001);
+                            bitField0_ = (bitField0_ & ~0x00000004);
                             pathHopsEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPathHopsEndpointIdsFieldBuilder() : null;
                         } else {
                             pathHopsEndpointIdsBuilder_.addAllMessages(other.pathHopsEndpointIds_);
@@ -49606,7 +48692,7 @@ public final class ContextOuterClass {
                     if (!other.subServiceIds_.isEmpty()) {
                         if (subServiceIds_.isEmpty()) {
                             subServiceIds_ = other.subServiceIds_;
-                            bitField0_ = (bitField0_ & ~0x00000002);
+                            bitField0_ = (bitField0_ & ~0x00000008);
                         } else {
                             ensureSubServiceIdsIsMutable();
                             subServiceIds_.addAll(other.subServiceIds_);
@@ -49619,7 +48705,7 @@ public final class ContextOuterClass {
                             subServiceIdsBuilder_.dispose();
                             subServiceIdsBuilder_ = null;
                             subServiceIds_ = other.subServiceIds_;
-                            bitField0_ = (bitField0_ & ~0x00000002);
+                            bitField0_ = (bitField0_ & ~0x00000008);
                             subServiceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSubServiceIdsFieldBuilder() : null;
                         } else {
                             subServiceIdsBuilder_.addAllMessages(other.subServiceIds_);
@@ -49629,7 +48715,7 @@ public final class ContextOuterClass {
                 if (other.hasSettings()) {
                     mergeSettings(other.getSettings());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -49641,17 +48727,80 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Connection parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getConnectionIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getServiceIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry);
+                                    if (pathHopsEndpointIdsBuilder_ == null) {
+                                        ensurePathHopsEndpointIdsIsMutable();
+                                        pathHopsEndpointIds_.add(m);
+                                    } else {
+                                        pathHopsEndpointIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 26
+                            case 34:
+                                {
+                                    context.ContextOuterClass.ServiceId m = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry);
+                                    if (subServiceIdsBuilder_ == null) {
+                                        ensureSubServiceIdsIsMutable();
+                                        subServiceIds_.add(m);
+                                    } else {
+                                        subServiceIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 34
+                            case 42:
+                                {
+                                    input.readMessage(getSettingsFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000010;
+                                    break;
+                                }
+                            // case 42
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Connection) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -49666,7 +48815,7 @@ public final class ContextOuterClass {
              * @return Whether the connectionId field is set.
              */
             public boolean hasConnectionId() {
-                return connectionIdBuilder_ != null || connectionId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -49690,10 +48839,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     connectionId_ = value;
-                    onChanged();
                 } else {
                     connectionIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -49703,10 +48853,11 @@ public final class ContextOuterClass {
             public Builder setConnectionId(context.ContextOuterClass.ConnectionId.Builder builderForValue) {
                 if (connectionIdBuilder_ == null) {
                     connectionId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     connectionIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -49715,15 +48866,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) {
                 if (connectionIdBuilder_ == null) {
-                    if (connectionId_ != null) {
-                        connectionId_ = context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && connectionId_ != null && connectionId_ != context.ContextOuterClass.ConnectionId.getDefaultInstance()) {
+                        getConnectionIdBuilder().mergeFrom(value);
                     } else {
                         connectionId_ = value;
                     }
-                    onChanged();
                 } else {
                     connectionIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -49731,13 +48883,13 @@ public final class ContextOuterClass {
              * .context.ConnectionId connection_id = 1;
              */
             public Builder clearConnectionId() {
-                if (connectionIdBuilder_ == null) {
-                    connectionId_ = null;
-                    onChanged();
-                } else {
-                    connectionId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                connectionId_ = null;
+                if (connectionIdBuilder_ != null) {
+                    connectionIdBuilder_.dispose();
                     connectionIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -49745,6 +48897,7 @@ public final class ContextOuterClass {
              * .context.ConnectionId connection_id = 1;
              */
             public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getConnectionIdFieldBuilder().getBuilder();
             }
@@ -49780,7 +48933,7 @@ public final class ContextOuterClass {
              * @return Whether the serviceId field is set.
              */
             public boolean hasServiceId() {
-                return serviceIdBuilder_ != null || serviceId_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -49804,10 +48957,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     serviceId_ = value;
-                    onChanged();
                 } else {
                     serviceIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -49817,10 +48971,11 @@ public final class ContextOuterClass {
             public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) {
                 if (serviceIdBuilder_ == null) {
                     serviceId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     serviceIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -49829,15 +48984,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) {
                 if (serviceIdBuilder_ == null) {
-                    if (serviceId_ != null) {
-                        serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && serviceId_ != null && serviceId_ != context.ContextOuterClass.ServiceId.getDefaultInstance()) {
+                        getServiceIdBuilder().mergeFrom(value);
                     } else {
                         serviceId_ = value;
                     }
-                    onChanged();
                 } else {
                     serviceIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -49845,13 +49001,13 @@ public final class ContextOuterClass {
              * .context.ServiceId service_id = 2;
              */
             public Builder clearServiceId() {
-                if (serviceIdBuilder_ == null) {
-                    serviceId_ = null;
-                    onChanged();
-                } else {
-                    serviceId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                serviceId_ = null;
+                if (serviceIdBuilder_ != null) {
+                    serviceIdBuilder_.dispose();
                     serviceIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -49859,6 +49015,7 @@ public final class ContextOuterClass {
              * .context.ServiceId service_id = 2;
              */
             public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getServiceIdFieldBuilder().getBuilder();
             }
@@ -49888,9 +49045,9 @@ public final class ContextOuterClass {
             private java.util.List pathHopsEndpointIds_ = java.util.Collections.emptyList();
 
             private void ensurePathHopsEndpointIdsIsMutable() {
-                if (!((bitField0_ & 0x00000001) != 0)) {
+                if (!((bitField0_ & 0x00000004) != 0)) {
                     pathHopsEndpointIds_ = new java.util.ArrayList(pathHopsEndpointIds_);
-                    bitField0_ |= 0x00000001;
+                    bitField0_ |= 0x00000004;
                 }
             }
 
@@ -50042,7 +49199,7 @@ public final class ContextOuterClass {
             public Builder clearPathHopsEndpointIds() {
                 if (pathHopsEndpointIdsBuilder_ == null) {
                     pathHopsEndpointIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
+                    bitField0_ = (bitField0_ & ~0x00000004);
                     onChanged();
                 } else {
                     pathHopsEndpointIdsBuilder_.clear();
@@ -50116,7 +49273,7 @@ public final class ContextOuterClass {
 
             private com.google.protobuf.RepeatedFieldBuilderV3 getPathHopsEndpointIdsFieldBuilder() {
                 if (pathHopsEndpointIdsBuilder_ == null) {
-                    pathHopsEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(pathHopsEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
+                    pathHopsEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(pathHopsEndpointIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean());
                     pathHopsEndpointIds_ = null;
                 }
                 return pathHopsEndpointIdsBuilder_;
@@ -50125,9 +49282,9 @@ public final class ContextOuterClass {
             private java.util.List subServiceIds_ = java.util.Collections.emptyList();
 
             private void ensureSubServiceIdsIsMutable() {
-                if (!((bitField0_ & 0x00000002) != 0)) {
+                if (!((bitField0_ & 0x00000008) != 0)) {
                     subServiceIds_ = new java.util.ArrayList(subServiceIds_);
-                    bitField0_ |= 0x00000002;
+                    bitField0_ |= 0x00000008;
                 }
             }
 
@@ -50279,7 +49436,7 @@ public final class ContextOuterClass {
             public Builder clearSubServiceIds() {
                 if (subServiceIdsBuilder_ == null) {
                     subServiceIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000002);
+                    bitField0_ = (bitField0_ & ~0x00000008);
                     onChanged();
                 } else {
                     subServiceIdsBuilder_.clear();
@@ -50353,7 +49510,7 @@ public final class ContextOuterClass {
 
             private com.google.protobuf.RepeatedFieldBuilderV3 getSubServiceIdsFieldBuilder() {
                 if (subServiceIdsBuilder_ == null) {
-                    subServiceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(subServiceIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
+                    subServiceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(subServiceIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
                     subServiceIds_ = null;
                 }
                 return subServiceIdsBuilder_;
@@ -50368,7 +49525,7 @@ public final class ContextOuterClass {
              * @return Whether the settings field is set.
              */
             public boolean hasSettings() {
-                return settingsBuilder_ != null || settings_ != null;
+                return ((bitField0_ & 0x00000010) != 0);
             }
 
             /**
@@ -50392,10 +49549,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     settings_ = value;
-                    onChanged();
                 } else {
                     settingsBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -50405,10 +49563,11 @@ public final class ContextOuterClass {
             public Builder setSettings(context.ContextOuterClass.ConnectionSettings.Builder builderForValue) {
                 if (settingsBuilder_ == null) {
                     settings_ = builderForValue.build();
-                    onChanged();
                 } else {
                     settingsBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -50417,15 +49576,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeSettings(context.ContextOuterClass.ConnectionSettings value) {
                 if (settingsBuilder_ == null) {
-                    if (settings_ != null) {
-                        settings_ = context.ContextOuterClass.ConnectionSettings.newBuilder(settings_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000010) != 0) && settings_ != null && settings_ != context.ContextOuterClass.ConnectionSettings.getDefaultInstance()) {
+                        getSettingsBuilder().mergeFrom(value);
                     } else {
                         settings_ = value;
                     }
-                    onChanged();
                 } else {
                     settingsBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -50433,13 +49593,13 @@ public final class ContextOuterClass {
              * .context.ConnectionSettings settings = 5;
              */
             public Builder clearSettings() {
-                if (settingsBuilder_ == null) {
-                    settings_ = null;
-                    onChanged();
-                } else {
-                    settings_ = null;
+                bitField0_ = (bitField0_ & ~0x00000010);
+                settings_ = null;
+                if (settingsBuilder_ != null) {
+                    settingsBuilder_.dispose();
                     settingsBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -50447,6 +49607,7 @@ public final class ContextOuterClass {
              * .context.ConnectionSettings settings = 5;
              */
             public context.ContextOuterClass.ConnectionSettings.Builder getSettingsBuilder() {
+                bitField0_ |= 0x00000010;
                 onChanged();
                 return getSettingsFieldBuilder().getBuilder();
             }
@@ -50500,7 +49661,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Connection parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Connection(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -50571,57 +49742,6 @@ public final class ContextOuterClass {
             return new ConnectionIdList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ConnectionIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    connectionIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                connectionIds_.add(input.readMessage(context.ContextOuterClass.ConnectionId.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    connectionIds_ = java.util.Collections.unmodifiableList(connectionIds_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ConnectionIdList_descriptor;
         }
@@ -50633,6 +49753,7 @@ public final class ContextOuterClass {
 
         public static final int CONNECTION_IDS_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List connectionIds_;
 
         /**
@@ -50693,7 +49814,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < connectionIds_.size(); i++) {
                 output.writeMessage(1, connectionIds_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -50705,7 +49826,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < connectionIds_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, connectionIds_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -50721,7 +49842,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.ConnectionIdList other = (context.ContextOuterClass.ConnectionIdList) obj;
             if (!getConnectionIdsList().equals(other.getConnectionIdsList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -50737,7 +49858,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + CONNECTION_IDS_FIELD_NUMBER;
                 hash = (53 * hash) + getConnectionIdsList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -50831,29 +49952,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ConnectionIdList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getConnectionIdsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (connectionIdsBuilder_ == null) {
                     connectionIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    connectionIds_ = null;
                     connectionIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -50879,7 +49994,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ConnectionIdList buildPartial() {
                 context.ContextOuterClass.ConnectionIdList result = new context.ContextOuterClass.ConnectionIdList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.ConnectionIdList result) {
                 if (connectionIdsBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         connectionIds_ = java.util.Collections.unmodifiableList(connectionIds_);
@@ -50889,38 +50012,10 @@ public final class ContextOuterClass {
                 } else {
                     result.connectionIds_ = connectionIdsBuilder_.build();
                 }
-                onBuilt();
-                return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ConnectionIdList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -50960,7 +50055,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -50972,17 +50067,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ConnectionIdList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.ConnectionId m = input.readMessage(context.ContextOuterClass.ConnectionId.parser(), extensionRegistry);
+                                    if (connectionIdsBuilder_ == null) {
+                                        ensureConnectionIdsIsMutable();
+                                        connectionIds_.add(m);
+                                    } else {
+                                        connectionIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ConnectionIdList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -51252,7 +50377,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ConnectionIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ConnectionIdList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -51323,57 +50458,6 @@ public final class ContextOuterClass {
             return new ConnectionList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ConnectionList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    connections_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                connections_.add(input.readMessage(context.ContextOuterClass.Connection.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    connections_ = java.util.Collections.unmodifiableList(connections_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ConnectionList_descriptor;
         }
@@ -51385,6 +50469,7 @@ public final class ContextOuterClass {
 
         public static final int CONNECTIONS_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List connections_;
 
         /**
@@ -51445,7 +50530,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < connections_.size(); i++) {
                 output.writeMessage(1, connections_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -51457,7 +50542,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < connections_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, connections_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -51473,7 +50558,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.ConnectionList other = (context.ContextOuterClass.ConnectionList) obj;
             if (!getConnectionsList().equals(other.getConnectionsList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -51489,7 +50574,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + CONNECTIONS_FIELD_NUMBER;
                 hash = (53 * hash) + getConnectionsList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -51583,29 +50668,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ConnectionList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getConnectionsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (connectionsBuilder_ == null) {
                     connections_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    connections_ = null;
                     connectionsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -51631,7 +50710,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ConnectionList buildPartial() {
                 context.ContextOuterClass.ConnectionList result = new context.ContextOuterClass.ConnectionList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.ConnectionList result) {
                 if (connectionsBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         connections_ = java.util.Collections.unmodifiableList(connections_);
@@ -51641,38 +50728,10 @@ public final class ContextOuterClass {
                 } else {
                     result.connections_ = connectionsBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
             }
 
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ConnectionList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -51712,7 +50771,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -51724,17 +50783,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ConnectionList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.Connection m = input.readMessage(context.ContextOuterClass.Connection.parser(), extensionRegistry);
+                                    if (connectionsBuilder_ == null) {
+                                        ensureConnectionsIsMutable();
+                                        connections_.add(m);
+                                    } else {
+                                        connectionsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ConnectionList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -52004,7 +51093,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ConnectionList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ConnectionList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -52083,70 +51182,6 @@ public final class ContextOuterClass {
             return new ConnectionEvent();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ConnectionEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Event.Builder subBuilder = null;
-                                if (event_ != null) {
-                                    subBuilder = event_.toBuilder();
-                                }
-                                event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(event_);
-                                    event_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.ConnectionId.Builder subBuilder = null;
-                                if (connectionId_ != null) {
-                                    subBuilder = connectionId_.toBuilder();
-                                }
-                                connectionId_ = input.readMessage(context.ContextOuterClass.ConnectionId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(connectionId_);
-                                    connectionId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ConnectionEvent_descriptor;
         }
@@ -52183,7 +51218,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() {
-            return getEvent();
+            return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_;
         }
 
         public static final int CONNECTION_ID_FIELD_NUMBER = 2;
@@ -52213,7 +51248,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() {
-            return getConnectionId();
+            return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -52237,7 +51272,7 @@ public final class ContextOuterClass {
             if (connectionId_ != null) {
                 output.writeMessage(2, getConnectionId());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -52252,7 +51287,7 @@ public final class ContextOuterClass {
             if (connectionId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConnectionId());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -52278,7 +51313,7 @@ public final class ContextOuterClass {
                 if (!getConnectionId().equals(other.getConnectionId()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -52298,7 +51333,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER;
                 hash = (53 * hash) + getConnectionId().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -52392,32 +51427,24 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ConnectionEvent.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (eventBuilder_ == null) {
-                    event_ = null;
-                } else {
-                    event_ = null;
+                bitField0_ = 0;
+                event_ = null;
+                if (eventBuilder_ != null) {
+                    eventBuilder_.dispose();
                     eventBuilder_ = null;
                 }
-                if (connectionIdBuilder_ == null) {
-                    connectionId_ = null;
-                } else {
-                    connectionId_ = null;
+                connectionId_ = null;
+                if (connectionIdBuilder_ != null) {
+                    connectionIdBuilder_.dispose();
                     connectionIdBuilder_ = null;
                 }
                 return this;
@@ -52445,48 +51472,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ConnectionEvent buildPartial() {
                 context.ContextOuterClass.ConnectionEvent result = new context.ContextOuterClass.ConnectionEvent(this);
-                if (eventBuilder_ == null) {
-                    result.event_ = event_;
-                } else {
-                    result.event_ = eventBuilder_.build();
-                }
-                if (connectionIdBuilder_ == null) {
-                    result.connectionId_ = connectionId_;
-                } else {
-                    result.connectionId_ = connectionIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ConnectionEvent result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.connectionId_ = connectionIdBuilder_ == null ? connectionId_ : connectionIdBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -52508,7 +51508,7 @@ public final class ContextOuterClass {
                 if (other.hasConnectionId()) {
                     mergeConnectionId(other.getConnectionId());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -52520,20 +51520,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ConnectionEvent parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getConnectionIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ConnectionEvent) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.Event event_;
 
             private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_;
@@ -52543,7 +51577,7 @@ public final class ContextOuterClass {
              * @return Whether the event field is set.
              */
             public boolean hasEvent() {
-                return eventBuilder_ != null || event_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -52567,10 +51601,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     event_ = value;
-                    onChanged();
                 } else {
                     eventBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -52580,10 +51615,11 @@ public final class ContextOuterClass {
             public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) {
                 if (eventBuilder_ == null) {
                     event_ = builderForValue.build();
-                    onChanged();
                 } else {
                     eventBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -52592,15 +51628,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeEvent(context.ContextOuterClass.Event value) {
                 if (eventBuilder_ == null) {
-                    if (event_ != null) {
-                        event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) {
+                        getEventBuilder().mergeFrom(value);
                     } else {
                         event_ = value;
                     }
-                    onChanged();
                 } else {
                     eventBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -52608,13 +51645,13 @@ public final class ContextOuterClass {
              * .context.Event event = 1;
              */
             public Builder clearEvent() {
-                if (eventBuilder_ == null) {
-                    event_ = null;
-                    onChanged();
-                } else {
-                    event_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                event_ = null;
+                if (eventBuilder_ != null) {
+                    eventBuilder_.dispose();
                     eventBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -52622,6 +51659,7 @@ public final class ContextOuterClass {
              * .context.Event event = 1;
              */
             public context.ContextOuterClass.Event.Builder getEventBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getEventFieldBuilder().getBuilder();
             }
@@ -52657,7 +51695,7 @@ public final class ContextOuterClass {
              * @return Whether the connectionId field is set.
              */
             public boolean hasConnectionId() {
-                return connectionIdBuilder_ != null || connectionId_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -52681,10 +51719,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     connectionId_ = value;
-                    onChanged();
                 } else {
                     connectionIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -52694,10 +51733,11 @@ public final class ContextOuterClass {
             public Builder setConnectionId(context.ContextOuterClass.ConnectionId.Builder builderForValue) {
                 if (connectionIdBuilder_ == null) {
                     connectionId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     connectionIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -52706,15 +51746,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) {
                 if (connectionIdBuilder_ == null) {
-                    if (connectionId_ != null) {
-                        connectionId_ = context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && connectionId_ != null && connectionId_ != context.ContextOuterClass.ConnectionId.getDefaultInstance()) {
+                        getConnectionIdBuilder().mergeFrom(value);
                     } else {
                         connectionId_ = value;
                     }
-                    onChanged();
                 } else {
                     connectionIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -52722,13 +51763,13 @@ public final class ContextOuterClass {
              * .context.ConnectionId connection_id = 2;
              */
             public Builder clearConnectionId() {
-                if (connectionIdBuilder_ == null) {
-                    connectionId_ = null;
-                    onChanged();
-                } else {
-                    connectionId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                connectionId_ = null;
+                if (connectionIdBuilder_ != null) {
+                    connectionIdBuilder_.dispose();
                     connectionIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -52736,6 +51777,7 @@ public final class ContextOuterClass {
              * .context.ConnectionId connection_id = 2;
              */
             public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getConnectionIdFieldBuilder().getBuilder();
             }
@@ -52789,7 +51831,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ConnectionEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ConnectionEvent(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -52889,83 +51941,6 @@ public final class ContextOuterClass {
             return new EndPointId();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private EndPointId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.TopologyId.Builder subBuilder = null;
-                                if (topologyId_ != null) {
-                                    subBuilder = topologyId_.toBuilder();
-                                }
-                                topologyId_ = input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(topologyId_);
-                                    topologyId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.DeviceId.Builder subBuilder = null;
-                                if (deviceId_ != null) {
-                                    subBuilder = deviceId_.toBuilder();
-                                }
-                                deviceId_ = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(deviceId_);
-                                    deviceId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 26:
-                            {
-                                context.ContextOuterClass.Uuid.Builder subBuilder = null;
-                                if (endpointUuid_ != null) {
-                                    subBuilder = endpointUuid_.toBuilder();
-                                }
-                                endpointUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(endpointUuid_);
-                                    endpointUuid_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_EndPointId_descriptor;
         }
@@ -53002,7 +51977,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() {
-            return getTopologyId();
+            return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_;
         }
 
         public static final int DEVICE_ID_FIELD_NUMBER = 2;
@@ -53032,7 +52007,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() {
-            return getDeviceId();
+            return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_;
         }
 
         public static final int ENDPOINT_UUID_FIELD_NUMBER = 3;
@@ -53062,7 +52037,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() {
-            return getEndpointUuid();
+            return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -53089,7 +52064,7 @@ public final class ContextOuterClass {
             if (endpointUuid_ != null) {
                 output.writeMessage(3, getEndpointUuid());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -53107,7 +52082,7 @@ public final class ContextOuterClass {
             if (endpointUuid_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndpointUuid());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -53139,7 +52114,7 @@ public final class ContextOuterClass {
                 if (!getEndpointUuid().equals(other.getEndpointUuid()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -53163,7 +52138,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + ENDPOINT_UUID_FIELD_NUMBER;
                 hash = (53 * hash) + getEndpointUuid().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -53261,38 +52236,29 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.EndPointId.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (topologyIdBuilder_ == null) {
-                    topologyId_ = null;
-                } else {
-                    topologyId_ = null;
+                bitField0_ = 0;
+                topologyId_ = null;
+                if (topologyIdBuilder_ != null) {
+                    topologyIdBuilder_.dispose();
                     topologyIdBuilder_ = null;
                 }
-                if (deviceIdBuilder_ == null) {
-                    deviceId_ = null;
-                } else {
-                    deviceId_ = null;
+                deviceId_ = null;
+                if (deviceIdBuilder_ != null) {
+                    deviceIdBuilder_.dispose();
                     deviceIdBuilder_ = null;
                 }
-                if (endpointUuidBuilder_ == null) {
-                    endpointUuid_ = null;
-                } else {
-                    endpointUuid_ = null;
+                endpointUuid_ = null;
+                if (endpointUuidBuilder_ != null) {
+                    endpointUuidBuilder_.dispose();
                     endpointUuidBuilder_ = null;
                 }
                 return this;
@@ -53320,53 +52286,24 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.EndPointId buildPartial() {
                 context.ContextOuterClass.EndPointId result = new context.ContextOuterClass.EndPointId(this);
-                if (topologyIdBuilder_ == null) {
-                    result.topologyId_ = topologyId_;
-                } else {
-                    result.topologyId_ = topologyIdBuilder_.build();
-                }
-                if (deviceIdBuilder_ == null) {
-                    result.deviceId_ = deviceId_;
-                } else {
-                    result.deviceId_ = deviceIdBuilder_.build();
-                }
-                if (endpointUuidBuilder_ == null) {
-                    result.endpointUuid_ = endpointUuid_;
-                } else {
-                    result.endpointUuid_ = endpointUuidBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.EndPointId result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.topologyId_ = topologyIdBuilder_ == null ? topologyId_ : topologyIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.deviceId_ = deviceIdBuilder_ == null ? deviceId_ : deviceIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.endpointUuid_ = endpointUuidBuilder_ == null ? endpointUuid_ : endpointUuidBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -53391,7 +52328,7 @@ public final class ContextOuterClass {
                 if (other.hasEndpointUuid()) {
                     mergeEndpointUuid(other.getEndpointUuid());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -53403,20 +52340,61 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.EndPointId parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getTopologyIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getDeviceIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    input.readMessage(getEndpointUuidFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 26
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.EndPointId) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.TopologyId topologyId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 topologyIdBuilder_;
@@ -53426,7 +52404,7 @@ public final class ContextOuterClass {
              * @return Whether the topologyId field is set.
              */
             public boolean hasTopologyId() {
-                return topologyIdBuilder_ != null || topologyId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -53450,10 +52428,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     topologyId_ = value;
-                    onChanged();
                 } else {
                     topologyIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -53463,10 +52442,11 @@ public final class ContextOuterClass {
             public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) {
                 if (topologyIdBuilder_ == null) {
                     topologyId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     topologyIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -53475,15 +52455,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) {
                 if (topologyIdBuilder_ == null) {
-                    if (topologyId_ != null) {
-                        topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && topologyId_ != null && topologyId_ != context.ContextOuterClass.TopologyId.getDefaultInstance()) {
+                        getTopologyIdBuilder().mergeFrom(value);
                     } else {
                         topologyId_ = value;
                     }
-                    onChanged();
                 } else {
                     topologyIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -53491,13 +52472,13 @@ public final class ContextOuterClass {
              * .context.TopologyId topology_id = 1;
              */
             public Builder clearTopologyId() {
-                if (topologyIdBuilder_ == null) {
-                    topologyId_ = null;
-                    onChanged();
-                } else {
-                    topologyId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                topologyId_ = null;
+                if (topologyIdBuilder_ != null) {
+                    topologyIdBuilder_.dispose();
                     topologyIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -53505,6 +52486,7 @@ public final class ContextOuterClass {
              * .context.TopologyId topology_id = 1;
              */
             public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getTopologyIdFieldBuilder().getBuilder();
             }
@@ -53540,7 +52522,7 @@ public final class ContextOuterClass {
              * @return Whether the deviceId field is set.
              */
             public boolean hasDeviceId() {
-                return deviceIdBuilder_ != null || deviceId_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -53564,10 +52546,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     deviceId_ = value;
-                    onChanged();
                 } else {
                     deviceIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -53577,10 +52560,11 @@ public final class ContextOuterClass {
             public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) {
                 if (deviceIdBuilder_ == null) {
                     deviceId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     deviceIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -53589,15 +52573,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) {
                 if (deviceIdBuilder_ == null) {
-                    if (deviceId_ != null) {
-                        deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && deviceId_ != null && deviceId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) {
+                        getDeviceIdBuilder().mergeFrom(value);
                     } else {
                         deviceId_ = value;
                     }
-                    onChanged();
                 } else {
                     deviceIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -53605,13 +52590,13 @@ public final class ContextOuterClass {
              * .context.DeviceId device_id = 2;
              */
             public Builder clearDeviceId() {
-                if (deviceIdBuilder_ == null) {
-                    deviceId_ = null;
-                    onChanged();
-                } else {
-                    deviceId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                deviceId_ = null;
+                if (deviceIdBuilder_ != null) {
+                    deviceIdBuilder_.dispose();
                     deviceIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -53619,6 +52604,7 @@ public final class ContextOuterClass {
              * .context.DeviceId device_id = 2;
              */
             public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getDeviceIdFieldBuilder().getBuilder();
             }
@@ -53654,7 +52640,7 @@ public final class ContextOuterClass {
              * @return Whether the endpointUuid field is set.
              */
             public boolean hasEndpointUuid() {
-                return endpointUuidBuilder_ != null || endpointUuid_ != null;
+                return ((bitField0_ & 0x00000004) != 0);
             }
 
             /**
@@ -53678,10 +52664,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     endpointUuid_ = value;
-                    onChanged();
                 } else {
                     endpointUuidBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -53691,10 +52678,11 @@ public final class ContextOuterClass {
             public Builder setEndpointUuid(context.ContextOuterClass.Uuid.Builder builderForValue) {
                 if (endpointUuidBuilder_ == null) {
                     endpointUuid_ = builderForValue.build();
-                    onChanged();
                 } else {
                     endpointUuidBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -53703,15 +52691,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeEndpointUuid(context.ContextOuterClass.Uuid value) {
                 if (endpointUuidBuilder_ == null) {
-                    if (endpointUuid_ != null) {
-                        endpointUuid_ = context.ContextOuterClass.Uuid.newBuilder(endpointUuid_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000004) != 0) && endpointUuid_ != null && endpointUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) {
+                        getEndpointUuidBuilder().mergeFrom(value);
                     } else {
                         endpointUuid_ = value;
                     }
-                    onChanged();
                 } else {
                     endpointUuidBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -53719,13 +52708,13 @@ public final class ContextOuterClass {
              * .context.Uuid endpoint_uuid = 3;
              */
             public Builder clearEndpointUuid() {
-                if (endpointUuidBuilder_ == null) {
-                    endpointUuid_ = null;
-                    onChanged();
-                } else {
-                    endpointUuid_ = null;
+                bitField0_ = (bitField0_ & ~0x00000004);
+                endpointUuid_ = null;
+                if (endpointUuidBuilder_ != null) {
+                    endpointUuidBuilder_.dispose();
                     endpointUuidBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -53733,6 +52722,7 @@ public final class ContextOuterClass {
              * .context.Uuid endpoint_uuid = 3;
              */
             public context.ContextOuterClass.Uuid.Builder getEndpointUuidBuilder() {
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return getEndpointUuidFieldBuilder().getBuilder();
             }
@@ -53786,7 +52776,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public EndPointId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new EndPointId(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -53897,6 +52897,39 @@ public final class ContextOuterClass {
          * .context.Location endpoint_location = 5;
          */
         context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder();
+
+        /**
+         * map<string, .google.protobuf.Any> capabilities = 6;
+         */
+        int getCapabilitiesCount();
+
+        /**
+         * map<string, .google.protobuf.Any> capabilities = 6;
+         */
+        boolean containsCapabilities(java.lang.String key);
+
+        /**
+         * Use {@link #getCapabilitiesMap()} instead.
+         */
+        @java.lang.Deprecated
+        java.util.Map getCapabilities();
+
+        /**
+         * map<string, .google.protobuf.Any> capabilities = 6;
+         */
+        java.util.Map getCapabilitiesMap();
+
+        /**
+         * map<string, .google.protobuf.Any> capabilities = 6;
+         */
+        /* nullable */
+        com.google.protobuf.Any getCapabilitiesOrDefault(java.lang.String key, /* nullable */
+        com.google.protobuf.Any defaultValue);
+
+        /**
+         * map<string, .google.protobuf.Any> capabilities = 6;
+         */
+        com.google.protobuf.Any getCapabilitiesOrThrow(java.lang.String key);
     }
 
     /**
@@ -53924,115 +52957,21 @@ public final class ContextOuterClass {
             return new EndPoint();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
+        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+            return context.ContextOuterClass.internal_static_context_EndPoint_descriptor;
         }
 
-        private EndPoint(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.EndPointId.Builder subBuilder = null;
-                                if (endpointId_ != null) {
-                                    subBuilder = endpointId_.toBuilder();
-                                }
-                                endpointId_ = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(endpointId_);
-                                    endpointId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                name_ = s;
-                                break;
-                            }
-                        case 26:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                endpointType_ = s;
-                                break;
-                            }
-                        case 32:
-                            {
-                                int rawValue = input.readEnum();
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    kpiSampleTypes_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                kpiSampleTypes_.add(rawValue);
-                                break;
-                            }
-                        case 34:
-                            {
-                                int length = input.readRawVarint32();
-                                int oldLimit = input.pushLimit(length);
-                                while (input.getBytesUntilLimit() > 0) {
-                                    int rawValue = input.readEnum();
-                                    if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                        kpiSampleTypes_ = new java.util.ArrayList();
-                                        mutable_bitField0_ |= 0x00000001;
-                                    }
-                                    kpiSampleTypes_.add(rawValue);
-                                }
-                                input.popLimit(oldLimit);
-                                break;
-                            }
-                        case 42:
-                            {
-                                context.ContextOuterClass.Location.Builder subBuilder = null;
-                                if (endpointLocation_ != null) {
-                                    subBuilder = endpointLocation_.toBuilder();
-                                }
-                                endpointLocation_ = input.readMessage(context.ContextOuterClass.Location.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(endpointLocation_);
-                                    endpointLocation_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    kpiSampleTypes_ = java.util.Collections.unmodifiableList(kpiSampleTypes_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
+        @SuppressWarnings({ "rawtypes" })
+        @java.lang.Override
+        protected com.google.protobuf.MapField internalGetMapField(int number) {
+            switch(number) {
+                case 6:
+                    return internalGetCapabilities();
+                default:
+                    throw new RuntimeException("Invalid map field number: " + number);
             }
         }
 
-        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-            return context.ContextOuterClass.internal_static_context_EndPoint_descriptor;
-        }
-
         @java.lang.Override
         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
             return context.ContextOuterClass.internal_static_context_EndPoint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPoint.class, context.ContextOuterClass.EndPoint.Builder.class);
@@ -54065,12 +53004,13 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() {
-            return getEndpointId();
+            return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_;
         }
 
         public static final int NAME_FIELD_NUMBER = 2;
 
-        private volatile java.lang.Object name_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object name_ = "";
 
         /**
          * string name = 2;
@@ -54107,7 +53047,8 @@ public final class ContextOuterClass {
 
         public static final int ENDPOINT_TYPE_FIELD_NUMBER = 3;
 
-        private volatile java.lang.Object endpointType_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object endpointType_ = "";
 
         /**
          * string endpoint_type = 3;
@@ -54144,13 +53085,13 @@ public final class ContextOuterClass {
 
         public static final int KPI_SAMPLE_TYPES_FIELD_NUMBER = 4;
 
+        @SuppressWarnings("serial")
         private java.util.List kpiSampleTypes_;
 
         private static final com.google.protobuf.Internal.ListAdapter.Converter kpiSampleTypes_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter() {
 
             public kpi_sample_types.KpiSampleTypes.KpiSampleType convert(java.lang.Integer from) {
-                @SuppressWarnings("deprecation")
-                kpi_sample_types.KpiSampleTypes.KpiSampleType result = kpi_sample_types.KpiSampleTypes.KpiSampleType.valueOf(from);
+                kpi_sample_types.KpiSampleTypes.KpiSampleType result = kpi_sample_types.KpiSampleTypes.KpiSampleType.forNumber(from);
                 return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result;
             }
         };
@@ -54231,7 +53172,85 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder() {
-            return getEndpointLocation();
+            return endpointLocation_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_;
+        }
+
+        public static final int CAPABILITIES_FIELD_NUMBER = 6;
+
+        private static final class CapabilitiesDefaultEntryHolder {
+
+            static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance(context.ContextOuterClass.internal_static_context_EndPoint_CapabilitiesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, com.google.protobuf.Any.getDefaultInstance());
+        }
+
+        @SuppressWarnings("serial")
+        private com.google.protobuf.MapField capabilities_;
+
+        private com.google.protobuf.MapField internalGetCapabilities() {
+            if (capabilities_ == null) {
+                return com.google.protobuf.MapField.emptyMapField(CapabilitiesDefaultEntryHolder.defaultEntry);
+            }
+            return capabilities_;
+        }
+
+        public int getCapabilitiesCount() {
+            return internalGetCapabilities().getMap().size();
+        }
+
+        /**
+         * map<string, .google.protobuf.Any> capabilities = 6;
+         */
+        @java.lang.Override
+        public boolean containsCapabilities(java.lang.String key) {
+            if (key == null) {
+                throw new NullPointerException("map key");
+            }
+            return internalGetCapabilities().getMap().containsKey(key);
+        }
+
+        /**
+         * Use {@link #getCapabilitiesMap()} instead.
+         */
+        @java.lang.Override
+        @java.lang.Deprecated
+        public java.util.Map getCapabilities() {
+            return getCapabilitiesMap();
+        }
+
+        /**
+         * map<string, .google.protobuf.Any> capabilities = 6;
+         */
+        @java.lang.Override
+        public java.util.Map getCapabilitiesMap() {
+            return internalGetCapabilities().getMap();
+        }
+
+        /**
+         * map<string, .google.protobuf.Any> capabilities = 6;
+         */
+        @java.lang.Override
+        public /* nullable */
+        com.google.protobuf.Any getCapabilitiesOrDefault(java.lang.String key, /* nullable */
+        com.google.protobuf.Any defaultValue) {
+            if (key == null) {
+                throw new NullPointerException("map key");
+            }
+            java.util.Map map = internalGetCapabilities().getMap();
+            return map.containsKey(key) ? map.get(key) : defaultValue;
+        }
+
+        /**
+         * map<string, .google.protobuf.Any> capabilities = 6;
+         */
+        @java.lang.Override
+        public com.google.protobuf.Any getCapabilitiesOrThrow(java.lang.String key) {
+            if (key == null) {
+                throw new NullPointerException("map key");
+            }
+            java.util.Map map = internalGetCapabilities().getMap();
+            if (!map.containsKey(key)) {
+                throw new java.lang.IllegalArgumentException();
+            }
+            return map.get(key);
         }
 
         private byte memoizedIsInitialized = -1;
@@ -54253,10 +53272,10 @@ public final class ContextOuterClass {
             if (endpointId_ != null) {
                 output.writeMessage(1, getEndpointId());
             }
-            if (!getNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
             }
-            if (!getEndpointTypeBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointType_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointType_);
             }
             if (getKpiSampleTypesList().size() > 0) {
@@ -54269,7 +53288,8 @@ public final class ContextOuterClass {
             if (endpointLocation_ != null) {
                 output.writeMessage(5, getEndpointLocation());
             }
-            unknownFields.writeTo(output);
+            com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(output, internalGetCapabilities(), CapabilitiesDefaultEntryHolder.defaultEntry, 6);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -54281,10 +53301,10 @@ public final class ContextOuterClass {
             if (endpointId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId());
             }
-            if (!getNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
             }
-            if (!getEndpointTypeBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointType_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointType_);
             }
             {
@@ -54302,7 +53322,11 @@ public final class ContextOuterClass {
             if (endpointLocation_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndpointLocation());
             }
-            size += unknownFields.getSerializedSize();
+            for (java.util.Map.Entry entry : internalGetCapabilities().getMap().entrySet()) {
+                com.google.protobuf.MapEntry capabilities__ = CapabilitiesDefaultEntryHolder.defaultEntry.newBuilderForType().setKey(entry.getKey()).setValue(entry.getValue()).build();
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, capabilities__);
+            }
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -54334,7 +53358,9 @@ public final class ContextOuterClass {
                 if (!getEndpointLocation().equals(other.getEndpointLocation()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!internalGetCapabilities().equals(other.internalGetCapabilities()))
+                return false;
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -54362,7 +53388,11 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER;
                 hash = (53 * hash) + getEndpointLocation().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            if (!internalGetCapabilities().getMap().isEmpty()) {
+                hash = (37 * hash) + CAPABILITIES_FIELD_NUMBER;
+                hash = (53 * hash) + internalGetCapabilities().hashCode();
+            }
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -54449,6 +53479,26 @@ public final class ContextOuterClass {
                 return context.ContextOuterClass.internal_static_context_EndPoint_descriptor;
             }
 
+            @SuppressWarnings({ "rawtypes" })
+            protected com.google.protobuf.MapField internalGetMapField(int number) {
+                switch(number) {
+                    case 6:
+                        return internalGetCapabilities();
+                    default:
+                        throw new RuntimeException("Invalid map field number: " + number);
+                }
+            }
+
+            @SuppressWarnings({ "rawtypes" })
+            protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
+                switch(number) {
+                    case 6:
+                        return internalGetMutableCapabilities();
+                    default:
+                        throw new RuntimeException("Invalid map field number: " + number);
+                }
+            }
+
             @java.lang.Override
             protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
                 return context.ContextOuterClass.internal_static_context_EndPoint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPoint.class, context.ContextOuterClass.EndPoint.Builder.class);
@@ -54456,38 +53506,31 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.EndPoint.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (endpointIdBuilder_ == null) {
-                    endpointId_ = null;
-                } else {
-                    endpointId_ = null;
+                bitField0_ = 0;
+                endpointId_ = null;
+                if (endpointIdBuilder_ != null) {
+                    endpointIdBuilder_.dispose();
                     endpointIdBuilder_ = null;
                 }
                 name_ = "";
                 endpointType_ = "";
                 kpiSampleTypes_ = java.util.Collections.emptyList();
-                bitField0_ = (bitField0_ & ~0x00000001);
-                if (endpointLocationBuilder_ == null) {
-                    endpointLocation_ = null;
-                } else {
-                    endpointLocation_ = null;
+                bitField0_ = (bitField0_ & ~0x00000008);
+                endpointLocation_ = null;
+                if (endpointLocationBuilder_ != null) {
+                    endpointLocationBuilder_.dispose();
                     endpointLocationBuilder_ = null;
                 }
+                internalGetMutableCapabilities().clear();
                 return this;
             }
 
@@ -54513,56 +53556,40 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.EndPoint buildPartial() {
                 context.ContextOuterClass.EndPoint result = new context.ContextOuterClass.EndPoint(this);
-                int from_bitField0_ = bitField0_;
-                if (endpointIdBuilder_ == null) {
-                    result.endpointId_ = endpointId_;
-                } else {
-                    result.endpointId_ = endpointIdBuilder_.build();
-                }
-                result.name_ = name_;
-                result.endpointType_ = endpointType_;
-                if (((bitField0_ & 0x00000001) != 0)) {
-                    kpiSampleTypes_ = java.util.Collections.unmodifiableList(kpiSampleTypes_);
-                    bitField0_ = (bitField0_ & ~0x00000001);
-                }
-                result.kpiSampleTypes_ = kpiSampleTypes_;
-                if (endpointLocationBuilder_ == null) {
-                    result.endpointLocation_ = endpointLocation_;
-                } else {
-                    result.endpointLocation_ = endpointLocationBuilder_.build();
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
+            private void buildPartialRepeatedFields(context.ContextOuterClass.EndPoint result) {
+                if (((bitField0_ & 0x00000008) != 0)) {
+                    kpiSampleTypes_ = java.util.Collections.unmodifiableList(kpiSampleTypes_);
+                    bitField0_ = (bitField0_ & ~0x00000008);
+                }
+                result.kpiSampleTypes_ = kpiSampleTypes_;
             }
 
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.EndPoint result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.endpointId_ = endpointIdBuilder_ == null ? endpointId_ : endpointIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.name_ = name_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.endpointType_ = endpointType_;
+                }
+                if (((from_bitField0_ & 0x00000010) != 0)) {
+                    result.endpointLocation_ = endpointLocationBuilder_ == null ? endpointLocation_ : endpointLocationBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000020) != 0)) {
+                    result.capabilities_ = internalGetCapabilities();
+                    result.capabilities_.makeImmutable();
+                }
             }
 
             @java.lang.Override
@@ -54583,16 +53610,18 @@ public final class ContextOuterClass {
                 }
                 if (!other.getName().isEmpty()) {
                     name_ = other.name_;
+                    bitField0_ |= 0x00000002;
                     onChanged();
                 }
                 if (!other.getEndpointType().isEmpty()) {
                     endpointType_ = other.endpointType_;
+                    bitField0_ |= 0x00000004;
                     onChanged();
                 }
                 if (!other.kpiSampleTypes_.isEmpty()) {
                     if (kpiSampleTypes_.isEmpty()) {
                         kpiSampleTypes_ = other.kpiSampleTypes_;
-                        bitField0_ = (bitField0_ & ~0x00000001);
+                        bitField0_ = (bitField0_ & ~0x00000008);
                     } else {
                         ensureKpiSampleTypesIsMutable();
                         kpiSampleTypes_.addAll(other.kpiSampleTypes_);
@@ -54602,7 +53631,9 @@ public final class ContextOuterClass {
                 if (other.hasEndpointLocation()) {
                     mergeEndpointLocation(other.getEndpointLocation());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                internalGetMutableCapabilities().mergeFrom(other.internalGetCapabilities());
+                bitField0_ |= 0x00000020;
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -54614,17 +53645,92 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.EndPoint parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getEndpointIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    name_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    endpointType_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 26
+                            case 32:
+                                {
+                                    int tmpRaw = input.readEnum();
+                                    ensureKpiSampleTypesIsMutable();
+                                    kpiSampleTypes_.add(tmpRaw);
+                                    break;
+                                }
+                            // case 32
+                            case 34:
+                                {
+                                    int length = input.readRawVarint32();
+                                    int oldLimit = input.pushLimit(length);
+                                    while (input.getBytesUntilLimit() > 0) {
+                                        int tmpRaw = input.readEnum();
+                                        ensureKpiSampleTypesIsMutable();
+                                        kpiSampleTypes_.add(tmpRaw);
+                                    }
+                                    input.popLimit(oldLimit);
+                                    break;
+                                }
+                            // case 34
+                            case 42:
+                                {
+                                    input.readMessage(getEndpointLocationFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000010;
+                                    break;
+                                }
+                            // case 42
+                            case 50:
+                                {
+                                    com.google.protobuf.MapEntry capabilities__ = input.readMessage(CapabilitiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+                                    internalGetMutableCapabilities().getMutableMap().put(capabilities__.getKey(), capabilities__.getValue());
+                                    bitField0_ |= 0x00000020;
+                                    break;
+                                }
+                            // case 50
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.EndPoint) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -54639,7 +53745,7 @@ public final class ContextOuterClass {
              * @return Whether the endpointId field is set.
              */
             public boolean hasEndpointId() {
-                return endpointIdBuilder_ != null || endpointId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -54663,10 +53769,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     endpointId_ = value;
-                    onChanged();
                 } else {
                     endpointIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -54676,10 +53783,11 @@ public final class ContextOuterClass {
             public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) {
                 if (endpointIdBuilder_ == null) {
                     endpointId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     endpointIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -54688,15 +53796,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) {
                 if (endpointIdBuilder_ == null) {
-                    if (endpointId_ != null) {
-                        endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && endpointId_ != null && endpointId_ != context.ContextOuterClass.EndPointId.getDefaultInstance()) {
+                        getEndpointIdBuilder().mergeFrom(value);
                     } else {
                         endpointId_ = value;
                     }
-                    onChanged();
                 } else {
                     endpointIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -54704,13 +53813,13 @@ public final class ContextOuterClass {
              * .context.EndPointId endpoint_id = 1;
              */
             public Builder clearEndpointId() {
-                if (endpointIdBuilder_ == null) {
-                    endpointId_ = null;
-                    onChanged();
-                } else {
-                    endpointId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                endpointId_ = null;
+                if (endpointIdBuilder_ != null) {
+                    endpointIdBuilder_.dispose();
                     endpointIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -54718,6 +53827,7 @@ public final class ContextOuterClass {
              * .context.EndPointId endpoint_id = 1;
              */
             public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getEndpointIdFieldBuilder().getBuilder();
             }
@@ -54787,6 +53897,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 name_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -54797,6 +53908,7 @@ public final class ContextOuterClass {
              */
             public Builder clearName() {
                 name_ = getDefaultInstance().getName();
+                bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
             }
@@ -54812,6 +53924,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 name_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -54859,6 +53972,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 endpointType_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -54869,6 +53983,7 @@ public final class ContextOuterClass {
              */
             public Builder clearEndpointType() {
                 endpointType_ = getDefaultInstance().getEndpointType();
+                bitField0_ = (bitField0_ & ~0x00000004);
                 onChanged();
                 return this;
             }
@@ -54884,6 +53999,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 endpointType_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -54891,9 +54007,9 @@ public final class ContextOuterClass {
             private java.util.List kpiSampleTypes_ = java.util.Collections.emptyList();
 
             private void ensureKpiSampleTypesIsMutable() {
-                if (!((bitField0_ & 0x00000001) != 0)) {
+                if (!((bitField0_ & 0x00000008) != 0)) {
                     kpiSampleTypes_ = new java.util.ArrayList(kpiSampleTypes_);
-                    bitField0_ |= 0x00000001;
+                    bitField0_ |= 0x00000008;
                 }
             }
 
@@ -54973,7 +54089,7 @@ public final class ContextOuterClass {
              */
             public Builder clearKpiSampleTypes() {
                 kpiSampleTypes_ = java.util.Collections.emptyList();
-                bitField0_ = (bitField0_ & ~0x00000001);
+                bitField0_ = (bitField0_ & ~0x00000008);
                 onChanged();
                 return this;
             }
@@ -54997,8 +54113,8 @@ public final class ContextOuterClass {
 
             /**
              * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4;
-             * @param index The index of the value to return.
-             * @return The enum numeric value on the wire of kpiSampleTypes at the given index.
+             * @param index The index to set the value at.
+             * @param value The enum numeric value on the wire for kpiSampleTypes to set.
              * @return This builder for chaining.
              */
             public Builder setKpiSampleTypesValue(int index, int value) {
@@ -55043,7 +54159,7 @@ public final class ContextOuterClass {
              * @return Whether the endpointLocation field is set.
              */
             public boolean hasEndpointLocation() {
-                return endpointLocationBuilder_ != null || endpointLocation_ != null;
+                return ((bitField0_ & 0x00000010) != 0);
             }
 
             /**
@@ -55067,10 +54183,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     endpointLocation_ = value;
-                    onChanged();
                 } else {
                     endpointLocationBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -55080,10 +54197,11 @@ public final class ContextOuterClass {
             public Builder setEndpointLocation(context.ContextOuterClass.Location.Builder builderForValue) {
                 if (endpointLocationBuilder_ == null) {
                     endpointLocation_ = builderForValue.build();
-                    onChanged();
                 } else {
                     endpointLocationBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -55092,15 +54210,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeEndpointLocation(context.ContextOuterClass.Location value) {
                 if (endpointLocationBuilder_ == null) {
-                    if (endpointLocation_ != null) {
-                        endpointLocation_ = context.ContextOuterClass.Location.newBuilder(endpointLocation_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000010) != 0) && endpointLocation_ != null && endpointLocation_ != context.ContextOuterClass.Location.getDefaultInstance()) {
+                        getEndpointLocationBuilder().mergeFrom(value);
                     } else {
                         endpointLocation_ = value;
                     }
-                    onChanged();
                 } else {
                     endpointLocationBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -55108,13 +54227,13 @@ public final class ContextOuterClass {
              * .context.Location endpoint_location = 5;
              */
             public Builder clearEndpointLocation() {
-                if (endpointLocationBuilder_ == null) {
-                    endpointLocation_ = null;
-                    onChanged();
-                } else {
-                    endpointLocation_ = null;
+                bitField0_ = (bitField0_ & ~0x00000010);
+                endpointLocation_ = null;
+                if (endpointLocationBuilder_ != null) {
+                    endpointLocationBuilder_.dispose();
                     endpointLocationBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -55122,6 +54241,7 @@ public final class ContextOuterClass {
              * .context.Location endpoint_location = 5;
              */
             public context.ContextOuterClass.Location.Builder getEndpointLocationBuilder() {
+                bitField0_ |= 0x00000010;
                 onChanged();
                 return getEndpointLocationFieldBuilder().getBuilder();
             }
@@ -55148,6 +54268,138 @@ public final class ContextOuterClass {
                 return endpointLocationBuilder_;
             }
 
+            private com.google.protobuf.MapField capabilities_;
+
+            private com.google.protobuf.MapField internalGetCapabilities() {
+                if (capabilities_ == null) {
+                    return com.google.protobuf.MapField.emptyMapField(CapabilitiesDefaultEntryHolder.defaultEntry);
+                }
+                return capabilities_;
+            }
+
+            private com.google.protobuf.MapField internalGetMutableCapabilities() {
+                if (capabilities_ == null) {
+                    capabilities_ = com.google.protobuf.MapField.newMapField(CapabilitiesDefaultEntryHolder.defaultEntry);
+                }
+                if (!capabilities_.isMutable()) {
+                    capabilities_ = capabilities_.copy();
+                }
+                bitField0_ |= 0x00000020;
+                onChanged();
+                return capabilities_;
+            }
+
+            public int getCapabilitiesCount() {
+                return internalGetCapabilities().getMap().size();
+            }
+
+            /**
+             * map<string, .google.protobuf.Any> capabilities = 6;
+             */
+            @java.lang.Override
+            public boolean containsCapabilities(java.lang.String key) {
+                if (key == null) {
+                    throw new NullPointerException("map key");
+                }
+                return internalGetCapabilities().getMap().containsKey(key);
+            }
+
+            /**
+             * Use {@link #getCapabilitiesMap()} instead.
+             */
+            @java.lang.Override
+            @java.lang.Deprecated
+            public java.util.Map getCapabilities() {
+                return getCapabilitiesMap();
+            }
+
+            /**
+             * map<string, .google.protobuf.Any> capabilities = 6;
+             */
+            @java.lang.Override
+            public java.util.Map getCapabilitiesMap() {
+                return internalGetCapabilities().getMap();
+            }
+
+            /**
+             * map<string, .google.protobuf.Any> capabilities = 6;
+             */
+            @java.lang.Override
+            public /* nullable */
+            com.google.protobuf.Any getCapabilitiesOrDefault(java.lang.String key, /* nullable */
+            com.google.protobuf.Any defaultValue) {
+                if (key == null) {
+                    throw new NullPointerException("map key");
+                }
+                java.util.Map map = internalGetCapabilities().getMap();
+                return map.containsKey(key) ? map.get(key) : defaultValue;
+            }
+
+            /**
+             * map<string, .google.protobuf.Any> capabilities = 6;
+             */
+            @java.lang.Override
+            public com.google.protobuf.Any getCapabilitiesOrThrow(java.lang.String key) {
+                if (key == null) {
+                    throw new NullPointerException("map key");
+                }
+                java.util.Map map = internalGetCapabilities().getMap();
+                if (!map.containsKey(key)) {
+                    throw new java.lang.IllegalArgumentException();
+                }
+                return map.get(key);
+            }
+
+            public Builder clearCapabilities() {
+                bitField0_ = (bitField0_ & ~0x00000020);
+                internalGetMutableCapabilities().getMutableMap().clear();
+                return this;
+            }
+
+            /**
+             * map<string, .google.protobuf.Any> capabilities = 6;
+             */
+            public Builder removeCapabilities(java.lang.String key) {
+                if (key == null) {
+                    throw new NullPointerException("map key");
+                }
+                internalGetMutableCapabilities().getMutableMap().remove(key);
+                return this;
+            }
+
+            /**
+             * Use alternate mutation accessors instead.
+             */
+            @java.lang.Deprecated
+            public java.util.Map getMutableCapabilities() {
+                bitField0_ |= 0x00000020;
+                return internalGetMutableCapabilities().getMutableMap();
+            }
+
+            /**
+             * map<string, .google.protobuf.Any> capabilities = 6;
+             */
+            public Builder putCapabilities(java.lang.String key, com.google.protobuf.Any value) {
+                if (key == null) {
+                    throw new NullPointerException("map key");
+                }
+                if (value == null) {
+                    throw new NullPointerException("map value");
+                }
+                internalGetMutableCapabilities().getMutableMap().put(key, value);
+                bitField0_ |= 0x00000020;
+                return this;
+            }
+
+            /**
+             * map<string, .google.protobuf.Any> capabilities = 6;
+             */
+            public Builder putAllCapabilities(java.util.Map values) {
+                internalGetMutableCapabilities().getMutableMap().putAll(values);
+                bitField0_ |= 0x00000020;
+                return this;
+            }
+
             @java.lang.Override
             public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
                 return super.setUnknownFields(unknownFields);
@@ -55175,7 +54427,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public EndPoint parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new EndPoint(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -55276,75 +54538,6 @@ public final class ContextOuterClass {
             return new EndPointName();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private EndPointName(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.EndPointId.Builder subBuilder = null;
-                                if (endpointId_ != null) {
-                                    subBuilder = endpointId_.toBuilder();
-                                }
-                                endpointId_ = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(endpointId_);
-                                    endpointId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                deviceName_ = s;
-                                break;
-                            }
-                        case 26:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                endpointName_ = s;
-                                break;
-                            }
-                        case 34:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                endpointType_ = s;
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_EndPointName_descriptor;
         }
@@ -55381,12 +54574,13 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() {
-            return getEndpointId();
+            return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_;
         }
 
         public static final int DEVICE_NAME_FIELD_NUMBER = 2;
 
-        private volatile java.lang.Object deviceName_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object deviceName_ = "";
 
         /**
          * string device_name = 2;
@@ -55423,7 +54617,8 @@ public final class ContextOuterClass {
 
         public static final int ENDPOINT_NAME_FIELD_NUMBER = 3;
 
-        private volatile java.lang.Object endpointName_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object endpointName_ = "";
 
         /**
          * string endpoint_name = 3;
@@ -55460,7 +54655,8 @@ public final class ContextOuterClass {
 
         public static final int ENDPOINT_TYPE_FIELD_NUMBER = 4;
 
-        private volatile java.lang.Object endpointType_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object endpointType_ = "";
 
         /**
          * string endpoint_type = 4;
@@ -55513,16 +54709,16 @@ public final class ContextOuterClass {
             if (endpointId_ != null) {
                 output.writeMessage(1, getEndpointId());
             }
-            if (!getDeviceNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceName_);
             }
-            if (!getEndpointNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointName_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointName_);
             }
-            if (!getEndpointTypeBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointType_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 4, endpointType_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -55534,16 +54730,16 @@ public final class ContextOuterClass {
             if (endpointId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId());
             }
-            if (!getDeviceNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceName_);
             }
-            if (!getEndpointNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointName_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointName_);
             }
-            if (!getEndpointTypeBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointType_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, endpointType_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -55569,7 +54765,7 @@ public final class ContextOuterClass {
                 return false;
             if (!getEndpointType().equals(other.getEndpointType()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -55591,7 +54787,7 @@ public final class ContextOuterClass {
             hash = (53 * hash) + getEndpointName().hashCode();
             hash = (37 * hash) + ENDPOINT_TYPE_FIELD_NUMBER;
             hash = (53 * hash) + getEndpointType().hashCode();
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -55685,26 +54881,19 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.EndPointName.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (endpointIdBuilder_ == null) {
-                    endpointId_ = null;
-                } else {
-                    endpointId_ = null;
+                bitField0_ = 0;
+                endpointId_ = null;
+                if (endpointIdBuilder_ != null) {
+                    endpointIdBuilder_.dispose();
                     endpointIdBuilder_ = null;
                 }
                 deviceName_ = "";
@@ -55735,46 +54924,27 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.EndPointName buildPartial() {
                 context.ContextOuterClass.EndPointName result = new context.ContextOuterClass.EndPointName(this);
-                if (endpointIdBuilder_ == null) {
-                    result.endpointId_ = endpointId_;
-                } else {
-                    result.endpointId_ = endpointIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.deviceName_ = deviceName_;
-                result.endpointName_ = endpointName_;
-                result.endpointType_ = endpointType_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.EndPointName result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.endpointId_ = endpointIdBuilder_ == null ? endpointId_ : endpointIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.deviceName_ = deviceName_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.endpointName_ = endpointName_;
+                }
+                if (((from_bitField0_ & 0x00000008) != 0)) {
+                    result.endpointType_ = endpointType_;
+                }
             }
 
             @java.lang.Override
@@ -55795,17 +54965,20 @@ public final class ContextOuterClass {
                 }
                 if (!other.getDeviceName().isEmpty()) {
                     deviceName_ = other.deviceName_;
+                    bitField0_ |= 0x00000002;
                     onChanged();
                 }
                 if (!other.getEndpointName().isEmpty()) {
                     endpointName_ = other.endpointName_;
+                    bitField0_ |= 0x00000004;
                     onChanged();
                 }
                 if (!other.getEndpointType().isEmpty()) {
                     endpointType_ = other.endpointType_;
+                    bitField0_ |= 0x00000008;
                     onChanged();
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -55817,20 +54990,68 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.EndPointName parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getEndpointIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    deviceName_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    endpointName_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 26
+                            case 34:
+                                {
+                                    endpointType_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000008;
+                                    break;
+                                }
+                            // case 34
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.EndPointName) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.EndPointId endpointId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_;
@@ -55840,7 +55061,7 @@ public final class ContextOuterClass {
              * @return Whether the endpointId field is set.
              */
             public boolean hasEndpointId() {
-                return endpointIdBuilder_ != null || endpointId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -55864,10 +55085,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     endpointId_ = value;
-                    onChanged();
                 } else {
                     endpointIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -55877,10 +55099,11 @@ public final class ContextOuterClass {
             public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) {
                 if (endpointIdBuilder_ == null) {
                     endpointId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     endpointIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -55889,15 +55112,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) {
                 if (endpointIdBuilder_ == null) {
-                    if (endpointId_ != null) {
-                        endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && endpointId_ != null && endpointId_ != context.ContextOuterClass.EndPointId.getDefaultInstance()) {
+                        getEndpointIdBuilder().mergeFrom(value);
                     } else {
                         endpointId_ = value;
                     }
-                    onChanged();
                 } else {
                     endpointIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -55905,13 +55129,13 @@ public final class ContextOuterClass {
              * .context.EndPointId endpoint_id = 1;
              */
             public Builder clearEndpointId() {
-                if (endpointIdBuilder_ == null) {
-                    endpointId_ = null;
-                    onChanged();
-                } else {
-                    endpointId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                endpointId_ = null;
+                if (endpointIdBuilder_ != null) {
+                    endpointIdBuilder_.dispose();
                     endpointIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -55919,6 +55143,7 @@ public final class ContextOuterClass {
              * .context.EndPointId endpoint_id = 1;
              */
             public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getEndpointIdFieldBuilder().getBuilder();
             }
@@ -55988,6 +55213,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 deviceName_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -55998,6 +55224,7 @@ public final class ContextOuterClass {
              */
             public Builder clearDeviceName() {
                 deviceName_ = getDefaultInstance().getDeviceName();
+                bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
             }
@@ -56013,6 +55240,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 deviceName_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -56060,6 +55288,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 endpointName_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -56070,6 +55299,7 @@ public final class ContextOuterClass {
              */
             public Builder clearEndpointName() {
                 endpointName_ = getDefaultInstance().getEndpointName();
+                bitField0_ = (bitField0_ & ~0x00000004);
                 onChanged();
                 return this;
             }
@@ -56085,6 +55315,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 endpointName_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -56132,6 +55363,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 endpointType_ = value;
+                bitField0_ |= 0x00000008;
                 onChanged();
                 return this;
             }
@@ -56142,6 +55374,7 @@ public final class ContextOuterClass {
              */
             public Builder clearEndpointType() {
                 endpointType_ = getDefaultInstance().getEndpointType();
+                bitField0_ = (bitField0_ & ~0x00000008);
                 onChanged();
                 return this;
             }
@@ -56157,6 +55390,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 endpointType_ = value;
+                bitField0_ |= 0x00000008;
                 onChanged();
                 return this;
             }
@@ -56188,7 +55422,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public EndPointName parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new EndPointName(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -56259,57 +55503,6 @@ public final class ContextOuterClass {
             return new EndPointIdList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private EndPointIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    endpointIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                endpointIds_.add(input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_EndPointIdList_descriptor;
         }
@@ -56321,6 +55514,7 @@ public final class ContextOuterClass {
 
         public static final int ENDPOINT_IDS_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List endpointIds_;
 
         /**
@@ -56381,7 +55575,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < endpointIds_.size(); i++) {
                 output.writeMessage(1, endpointIds_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -56393,7 +55587,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < endpointIds_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpointIds_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -56409,7 +55603,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.EndPointIdList other = (context.ContextOuterClass.EndPointIdList) obj;
             if (!getEndpointIdsList().equals(other.getEndpointIdsList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -56425,7 +55619,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + ENDPOINT_IDS_FIELD_NUMBER;
                 hash = (53 * hash) + getEndpointIdsList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -56519,29 +55713,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.EndPointIdList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getEndpointIdsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (endpointIdsBuilder_ == null) {
                     endpointIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    endpointIds_ = null;
                     endpointIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -56567,7 +55755,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.EndPointIdList buildPartial() {
                 context.ContextOuterClass.EndPointIdList result = new context.ContextOuterClass.EndPointIdList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.EndPointIdList result) {
                 if (endpointIdsBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_);
@@ -56577,38 +55773,10 @@ public final class ContextOuterClass {
                 } else {
                     result.endpointIds_ = endpointIdsBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
             }
 
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.EndPointIdList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -56648,7 +55816,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -56660,17 +55828,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.EndPointIdList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry);
+                                    if (endpointIdsBuilder_ == null) {
+                                        ensureEndpointIdsIsMutable();
+                                        endpointIds_.add(m);
+                                    } else {
+                                        endpointIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.EndPointIdList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -56940,7 +56138,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public EndPointIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new EndPointIdList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -57011,57 +56219,6 @@ public final class ContextOuterClass {
             return new EndPointNameList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private EndPointNameList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    endpointNames_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                endpointNames_.add(input.readMessage(context.ContextOuterClass.EndPointName.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    endpointNames_ = java.util.Collections.unmodifiableList(endpointNames_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_EndPointNameList_descriptor;
         }
@@ -57073,6 +56230,7 @@ public final class ContextOuterClass {
 
         public static final int ENDPOINT_NAMES_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List endpointNames_;
 
         /**
@@ -57133,7 +56291,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < endpointNames_.size(); i++) {
                 output.writeMessage(1, endpointNames_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -57145,7 +56303,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < endpointNames_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpointNames_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -57161,7 +56319,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.EndPointNameList other = (context.ContextOuterClass.EndPointNameList) obj;
             if (!getEndpointNamesList().equals(other.getEndpointNamesList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -57177,7 +56335,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + ENDPOINT_NAMES_FIELD_NUMBER;
                 hash = (53 * hash) + getEndpointNamesList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -57271,29 +56429,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.EndPointNameList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getEndpointNamesFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (endpointNamesBuilder_ == null) {
                     endpointNames_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    endpointNames_ = null;
                     endpointNamesBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -57319,7 +56471,15 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.EndPointNameList buildPartial() {
                 context.ContextOuterClass.EndPointNameList result = new context.ContextOuterClass.EndPointNameList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.EndPointNameList result) {
                 if (endpointNamesBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         endpointNames_ = java.util.Collections.unmodifiableList(endpointNames_);
@@ -57329,38 +56489,10 @@ public final class ContextOuterClass {
                 } else {
                     result.endpointNames_ = endpointNamesBuilder_.build();
                 }
-                onBuilt();
-                return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.EndPointNameList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -57400,7 +56532,7 @@ public final class ContextOuterClass {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -57412,17 +56544,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.EndPointNameList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    context.ContextOuterClass.EndPointName m = input.readMessage(context.ContextOuterClass.EndPointName.parser(), extensionRegistry);
+                                    if (endpointNamesBuilder_ == null) {
+                                        ensureEndpointNamesIsMutable();
+                                        endpointNames_.add(m);
+                                    } else {
+                                        endpointNamesBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.EndPointNameList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -57692,7 +56854,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public EndPointNameList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new EndPointNameList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -57763,56 +56935,6 @@ public final class ContextOuterClass {
             return new ConfigRule_Custom();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ConfigRule_Custom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                resourceKey_ = s;
-                                break;
-                            }
-                        case 18:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                resourceValue_ = s;
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_descriptor;
         }
@@ -57824,7 +56946,8 @@ public final class ContextOuterClass {
 
         public static final int RESOURCE_KEY_FIELD_NUMBER = 1;
 
-        private volatile java.lang.Object resourceKey_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object resourceKey_ = "";
 
         /**
          * string resource_key = 1;
@@ -57861,7 +56984,8 @@ public final class ContextOuterClass {
 
         public static final int RESOURCE_VALUE_FIELD_NUMBER = 2;
 
-        private volatile java.lang.Object resourceValue_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object resourceValue_ = "";
 
         /**
          * string resource_value = 2;
@@ -57911,13 +57035,13 @@ public final class ContextOuterClass {
 
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-            if (!getResourceKeyBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceKey_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceKey_);
             }
-            if (!getResourceValueBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceValue_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceValue_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -57926,13 +57050,13 @@ public final class ContextOuterClass {
             if (size != -1)
                 return size;
             size = 0;
-            if (!getResourceKeyBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceKey_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceKey_);
             }
-            if (!getResourceValueBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceValue_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceValue_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -57950,7 +57074,7 @@ public final class ContextOuterClass {
                 return false;
             if (!getResourceValue().equals(other.getResourceValue()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -57966,7 +57090,7 @@ public final class ContextOuterClass {
             hash = (53 * hash) + getResourceKey().hashCode();
             hash = (37 * hash) + RESOURCE_VALUE_FIELD_NUMBER;
             hash = (53 * hash) + getResourceValue().hashCode();
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -58060,22 +57184,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ConfigRule_Custom.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 resourceKey_ = "";
                 resourceValue_ = "";
                 return this;
@@ -58103,40 +57221,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ConfigRule_Custom buildPartial() {
                 context.ContextOuterClass.ConfigRule_Custom result = new context.ContextOuterClass.ConfigRule_Custom(this);
-                result.resourceKey_ = resourceKey_;
-                result.resourceValue_ = resourceValue_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ConfigRule_Custom result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.resourceKey_ = resourceKey_;
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.resourceValue_ = resourceValue_;
+                }
             }
 
             @java.lang.Override
@@ -58154,13 +57253,15 @@ public final class ContextOuterClass {
                     return this;
                 if (!other.getResourceKey().isEmpty()) {
                     resourceKey_ = other.resourceKey_;
+                    bitField0_ |= 0x00000001;
                     onChanged();
                 }
                 if (!other.getResourceValue().isEmpty()) {
                     resourceValue_ = other.resourceValue_;
+                    bitField0_ |= 0x00000002;
                     onChanged();
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -58172,20 +57273,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ConfigRule_Custom parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    resourceKey_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    resourceValue_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ConfigRule_Custom) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private java.lang.Object resourceKey_ = "";
 
             /**
@@ -58229,6 +57364,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 resourceKey_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -58239,6 +57375,7 @@ public final class ContextOuterClass {
              */
             public Builder clearResourceKey() {
                 resourceKey_ = getDefaultInstance().getResourceKey();
+                bitField0_ = (bitField0_ & ~0x00000001);
                 onChanged();
                 return this;
             }
@@ -58254,6 +57391,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 resourceKey_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -58301,6 +57439,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 resourceValue_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -58311,6 +57450,7 @@ public final class ContextOuterClass {
              */
             public Builder clearResourceValue() {
                 resourceValue_ = getDefaultInstance().getResourceValue();
+                bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
             }
@@ -58326,6 +57466,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 resourceValue_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -58357,7 +57498,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ConfigRule_Custom parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ConfigRule_Custom(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -58436,70 +57587,6 @@ public final class ContextOuterClass {
             return new ConfigRule_ACL();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ConfigRule_ACL(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.EndPointId.Builder subBuilder = null;
-                                if (endpointId_ != null) {
-                                    subBuilder = endpointId_.toBuilder();
-                                }
-                                endpointId_ = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(endpointId_);
-                                    endpointId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                acl.Acl.AclRuleSet.Builder subBuilder = null;
-                                if (ruleSet_ != null) {
-                                    subBuilder = ruleSet_.toBuilder();
-                                }
-                                ruleSet_ = input.readMessage(acl.Acl.AclRuleSet.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(ruleSet_);
-                                    ruleSet_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_descriptor;
         }
@@ -58536,7 +57623,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() {
-            return getEndpointId();
+            return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_;
         }
 
         public static final int RULE_SET_FIELD_NUMBER = 2;
@@ -58566,7 +57653,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder() {
-            return getRuleSet();
+            return ruleSet_ == null ? acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -58590,7 +57677,7 @@ public final class ContextOuterClass {
             if (ruleSet_ != null) {
                 output.writeMessage(2, getRuleSet());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -58605,7 +57692,7 @@ public final class ContextOuterClass {
             if (ruleSet_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRuleSet());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -58631,7 +57718,7 @@ public final class ContextOuterClass {
                 if (!getRuleSet().equals(other.getRuleSet()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -58651,7 +57738,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + RULE_SET_FIELD_NUMBER;
                 hash = (53 * hash) + getRuleSet().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -58745,32 +57832,24 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ConfigRule_ACL.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (endpointIdBuilder_ == null) {
-                    endpointId_ = null;
-                } else {
-                    endpointId_ = null;
+                bitField0_ = 0;
+                endpointId_ = null;
+                if (endpointIdBuilder_ != null) {
+                    endpointIdBuilder_.dispose();
                     endpointIdBuilder_ = null;
                 }
-                if (ruleSetBuilder_ == null) {
-                    ruleSet_ = null;
-                } else {
-                    ruleSet_ = null;
+                ruleSet_ = null;
+                if (ruleSetBuilder_ != null) {
+                    ruleSetBuilder_.dispose();
                     ruleSetBuilder_ = null;
                 }
                 return this;
@@ -58798,48 +57877,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ConfigRule_ACL buildPartial() {
                 context.ContextOuterClass.ConfigRule_ACL result = new context.ContextOuterClass.ConfigRule_ACL(this);
-                if (endpointIdBuilder_ == null) {
-                    result.endpointId_ = endpointId_;
-                } else {
-                    result.endpointId_ = endpointIdBuilder_.build();
-                }
-                if (ruleSetBuilder_ == null) {
-                    result.ruleSet_ = ruleSet_;
-                } else {
-                    result.ruleSet_ = ruleSetBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.ConfigRule_ACL result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.endpointId_ = endpointIdBuilder_ == null ? endpointId_ : endpointIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.ruleSet_ = ruleSetBuilder_ == null ? ruleSet_ : ruleSetBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -58861,7 +57913,7 @@ public final class ContextOuterClass {
                 if (other.hasRuleSet()) {
                     mergeRuleSet(other.getRuleSet());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -58873,20 +57925,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ConfigRule_ACL parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getEndpointIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getRuleSetFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ConfigRule_ACL) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.EndPointId endpointId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_;
@@ -58896,7 +57982,7 @@ public final class ContextOuterClass {
              * @return Whether the endpointId field is set.
              */
             public boolean hasEndpointId() {
-                return endpointIdBuilder_ != null || endpointId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -58920,10 +58006,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     endpointId_ = value;
-                    onChanged();
                 } else {
                     endpointIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -58933,10 +58020,11 @@ public final class ContextOuterClass {
             public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) {
                 if (endpointIdBuilder_ == null) {
                     endpointId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     endpointIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -58945,15 +58033,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) {
                 if (endpointIdBuilder_ == null) {
-                    if (endpointId_ != null) {
-                        endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && endpointId_ != null && endpointId_ != context.ContextOuterClass.EndPointId.getDefaultInstance()) {
+                        getEndpointIdBuilder().mergeFrom(value);
                     } else {
                         endpointId_ = value;
                     }
-                    onChanged();
                 } else {
                     endpointIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -58961,13 +58050,13 @@ public final class ContextOuterClass {
              * .context.EndPointId endpoint_id = 1;
              */
             public Builder clearEndpointId() {
-                if (endpointIdBuilder_ == null) {
-                    endpointId_ = null;
-                    onChanged();
-                } else {
-                    endpointId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                endpointId_ = null;
+                if (endpointIdBuilder_ != null) {
+                    endpointIdBuilder_.dispose();
                     endpointIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -58975,6 +58064,7 @@ public final class ContextOuterClass {
              * .context.EndPointId endpoint_id = 1;
              */
             public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getEndpointIdFieldBuilder().getBuilder();
             }
@@ -59010,7 +58100,7 @@ public final class ContextOuterClass {
              * @return Whether the ruleSet field is set.
              */
             public boolean hasRuleSet() {
-                return ruleSetBuilder_ != null || ruleSet_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -59034,10 +58124,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     ruleSet_ = value;
-                    onChanged();
                 } else {
                     ruleSetBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -59047,10 +58138,11 @@ public final class ContextOuterClass {
             public Builder setRuleSet(acl.Acl.AclRuleSet.Builder builderForValue) {
                 if (ruleSetBuilder_ == null) {
                     ruleSet_ = builderForValue.build();
-                    onChanged();
                 } else {
                     ruleSetBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -59059,15 +58151,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeRuleSet(acl.Acl.AclRuleSet value) {
                 if (ruleSetBuilder_ == null) {
-                    if (ruleSet_ != null) {
-                        ruleSet_ = acl.Acl.AclRuleSet.newBuilder(ruleSet_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && ruleSet_ != null && ruleSet_ != acl.Acl.AclRuleSet.getDefaultInstance()) {
+                        getRuleSetBuilder().mergeFrom(value);
                     } else {
                         ruleSet_ = value;
                     }
-                    onChanged();
                 } else {
                     ruleSetBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -59075,13 +58168,13 @@ public final class ContextOuterClass {
              * .acl.AclRuleSet rule_set = 2;
              */
             public Builder clearRuleSet() {
-                if (ruleSetBuilder_ == null) {
-                    ruleSet_ = null;
-                    onChanged();
-                } else {
-                    ruleSet_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                ruleSet_ = null;
+                if (ruleSetBuilder_ != null) {
+                    ruleSetBuilder_.dispose();
                     ruleSetBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -59089,6 +58182,7 @@ public final class ContextOuterClass {
              * .acl.AclRuleSet rule_set = 2;
              */
             public acl.Acl.AclRuleSet.Builder getRuleSetBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getRuleSetFieldBuilder().getBuilder();
             }
@@ -59142,7 +58236,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ConfigRule_ACL parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ConfigRule_ACL(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -59210,7 +58314,7 @@ public final class ContextOuterClass {
          */
         context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder();
 
-        public context.ContextOuterClass.ConfigRule.ConfigRuleCase getConfigRuleCase();
+        context.ContextOuterClass.ConfigRule.ConfigRuleCase getConfigRuleCase();
     }
 
     /**
@@ -59236,78 +58340,6 @@ public final class ContextOuterClass {
             return new ConfigRule();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private ConfigRule(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 8:
-                            {
-                                int rawValue = input.readEnum();
-                                action_ = rawValue;
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.ConfigRule_Custom.Builder subBuilder = null;
-                                if (configRuleCase_ == 2) {
-                                    subBuilder = ((context.ContextOuterClass.ConfigRule_Custom) configRule_).toBuilder();
-                                }
-                                configRule_ = input.readMessage(context.ContextOuterClass.ConfigRule_Custom.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom((context.ContextOuterClass.ConfigRule_Custom) configRule_);
-                                    configRule_ = subBuilder.buildPartial();
-                                }
-                                configRuleCase_ = 2;
-                                break;
-                            }
-                        case 26:
-                            {
-                                context.ContextOuterClass.ConfigRule_ACL.Builder subBuilder = null;
-                                if (configRuleCase_ == 3) {
-                                    subBuilder = ((context.ContextOuterClass.ConfigRule_ACL) configRule_).toBuilder();
-                                }
-                                configRule_ = input.readMessage(context.ContextOuterClass.ConfigRule_ACL.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom((context.ContextOuterClass.ConfigRule_ACL) configRule_);
-                                    configRule_ = subBuilder.buildPartial();
-                                }
-                                configRuleCase_ = 3;
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_ConfigRule_descriptor;
         }
@@ -59319,6 +58351,7 @@ public final class ContextOuterClass {
 
         private int configRuleCase_ = 0;
 
+        @SuppressWarnings("serial")
         private java.lang.Object configRule_;
 
         public enum ConfigRuleCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum {
@@ -59365,7 +58398,7 @@ public final class ContextOuterClass {
 
         public static final int ACTION_FIELD_NUMBER = 1;
 
-        private int action_;
+        private int action_ = 0;
 
         /**
          * .context.ConfigActionEnum action = 1;
@@ -59382,8 +58415,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.ConfigActionEnum getAction() {
-            @SuppressWarnings("deprecation")
-            context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.valueOf(action_);
+            context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.forNumber(action_);
             return result == null ? context.ContextOuterClass.ConfigActionEnum.UNRECOGNIZED : result;
         }
 
@@ -59479,7 +58511,7 @@ public final class ContextOuterClass {
             if (configRuleCase_ == 3) {
                 output.writeMessage(3, (context.ContextOuterClass.ConfigRule_ACL) configRule_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -59497,7 +58529,7 @@ public final class ContextOuterClass {
             if (configRuleCase_ == 3) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, (context.ContextOuterClass.ConfigRule_ACL) configRule_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -59527,7 +58559,7 @@ public final class ContextOuterClass {
                 case 0:
                 default:
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -59553,7 +58585,7 @@ public final class ContextOuterClass {
                 case 0:
                 default:
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -59647,23 +58679,23 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.ConfigRule.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 action_ = 0;
+                if (customBuilder_ != null) {
+                    customBuilder_.clear();
+                }
+                if (aclBuilder_ != null) {
+                    aclBuilder_.clear();
+                }
                 configRuleCase_ = 0;
                 configRule_ = null;
                 return this;
@@ -59691,54 +58723,30 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.ConfigRule buildPartial() {
                 context.ContextOuterClass.ConfigRule result = new context.ContextOuterClass.ConfigRule(this);
-                result.action_ = action_;
-                if (configRuleCase_ == 2) {
-                    if (customBuilder_ == null) {
-                        result.configRule_ = configRule_;
-                    } else {
-                        result.configRule_ = customBuilder_.build();
-                    }
-                }
-                if (configRuleCase_ == 3) {
-                    if (aclBuilder_ == null) {
-                        result.configRule_ = configRule_;
-                    } else {
-                        result.configRule_ = aclBuilder_.build();
-                    }
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.configRuleCase_ = configRuleCase_;
+                buildPartialOneofs(result);
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
+            private void buildPartial0(context.ContextOuterClass.ConfigRule result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.action_ = action_;
+                }
             }
 
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartialOneofs(context.ContextOuterClass.ConfigRule result) {
+                result.configRuleCase_ = configRuleCase_;
+                result.configRule_ = this.configRule_;
+                if (configRuleCase_ == 2 && customBuilder_ != null) {
+                    result.configRule_ = customBuilder_.build();
+                }
+                if (configRuleCase_ == 3 && aclBuilder_ != null) {
+                    result.configRule_ = aclBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -59773,7 +58781,7 @@ public final class ContextOuterClass {
                             break;
                         }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -59785,17 +58793,56 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.ConfigRule parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 8:
+                                {
+                                    action_ = input.readEnum();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 8
+                            case 18:
+                                {
+                                    input.readMessage(getCustomFieldBuilder().getBuilder(), extensionRegistry);
+                                    configRuleCase_ = 2;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    input.readMessage(getAclFieldBuilder().getBuilder(), extensionRegistry);
+                                    configRuleCase_ = 3;
+                                    break;
+                                }
+                            // case 26
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.ConfigRule) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -59814,6 +58861,8 @@ public final class ContextOuterClass {
                 return this;
             }
 
+            private int bitField0_;
+
             private int action_ = 0;
 
             /**
@@ -59832,6 +58881,7 @@ public final class ContextOuterClass {
              */
             public Builder setActionValue(int value) {
                 action_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -59842,8 +58892,7 @@ public final class ContextOuterClass {
              */
             @java.lang.Override
             public context.ContextOuterClass.ConfigActionEnum getAction() {
-                @SuppressWarnings("deprecation")
-                context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.valueOf(action_);
+                context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.forNumber(action_);
                 return result == null ? context.ContextOuterClass.ConfigActionEnum.UNRECOGNIZED : result;
             }
 
@@ -59856,6 +58905,7 @@ public final class ContextOuterClass {
                 if (value == null) {
                     throw new NullPointerException();
                 }
+                bitField0_ |= 0x00000001;
                 action_ = value.getNumber();
                 onChanged();
                 return this;
@@ -59866,6 +58916,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearAction() {
+                bitField0_ = (bitField0_ & ~0x00000001);
                 action_ = 0;
                 onChanged();
                 return this;
@@ -59946,8 +58997,9 @@ public final class ContextOuterClass {
                 } else {
                     if (configRuleCase_ == 2) {
                         customBuilder_.mergeFrom(value);
+                    } else {
+                        customBuilder_.setMessage(value);
                     }
-                    customBuilder_.setMessage(value);
                 }
                 configRuleCase_ = 2;
                 return this;
@@ -60008,7 +59060,6 @@ public final class ContextOuterClass {
                 }
                 configRuleCase_ = 2;
                 onChanged();
-                ;
                 return customBuilder_;
             }
 
@@ -60087,8 +59138,9 @@ public final class ContextOuterClass {
                 } else {
                     if (configRuleCase_ == 3) {
                         aclBuilder_.mergeFrom(value);
+                    } else {
+                        aclBuilder_.setMessage(value);
                     }
-                    aclBuilder_.setMessage(value);
                 }
                 configRuleCase_ = 3;
                 return this;
@@ -60149,7 +59201,6 @@ public final class ContextOuterClass {
                 }
                 configRuleCase_ = 3;
                 onChanged();
-                ;
                 return aclBuilder_;
             }
 
@@ -60180,7 +59231,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public ConfigRule parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new ConfigRule(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -60251,56 +59312,6 @@ public final class ContextOuterClass {
             return new Constraint_Custom();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Constraint_Custom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                constraintType_ = s;
-                                break;
-                            }
-                        case 18:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                constraintValue_ = s;
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Constraint_Custom_descriptor;
         }
@@ -60312,7 +59323,8 @@ public final class ContextOuterClass {
 
         public static final int CONSTRAINT_TYPE_FIELD_NUMBER = 1;
 
-        private volatile java.lang.Object constraintType_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object constraintType_ = "";
 
         /**
          * string constraint_type = 1;
@@ -60349,7 +59361,8 @@ public final class ContextOuterClass {
 
         public static final int CONSTRAINT_VALUE_FIELD_NUMBER = 2;
 
-        private volatile java.lang.Object constraintValue_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object constraintValue_ = "";
 
         /**
          * string constraint_value = 2;
@@ -60399,13 +59412,13 @@ public final class ContextOuterClass {
 
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-            if (!getConstraintTypeBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(constraintType_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, constraintType_);
             }
-            if (!getConstraintValueBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(constraintValue_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, constraintValue_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -60414,13 +59427,13 @@ public final class ContextOuterClass {
             if (size != -1)
                 return size;
             size = 0;
-            if (!getConstraintTypeBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(constraintType_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, constraintType_);
             }
-            if (!getConstraintValueBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(constraintValue_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, constraintValue_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -60438,7 +59451,7 @@ public final class ContextOuterClass {
                 return false;
             if (!getConstraintValue().equals(other.getConstraintValue()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -60454,7 +59467,7 @@ public final class ContextOuterClass {
             hash = (53 * hash) + getConstraintType().hashCode();
             hash = (37 * hash) + CONSTRAINT_VALUE_FIELD_NUMBER;
             hash = (53 * hash) + getConstraintValue().hashCode();
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -60548,22 +59561,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Constraint_Custom.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 constraintType_ = "";
                 constraintValue_ = "";
                 return this;
@@ -60591,40 +59598,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Constraint_Custom buildPartial() {
                 context.ContextOuterClass.Constraint_Custom result = new context.ContextOuterClass.Constraint_Custom(this);
-                result.constraintType_ = constraintType_;
-                result.constraintValue_ = constraintValue_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.Constraint_Custom result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.constraintType_ = constraintType_;
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.constraintValue_ = constraintValue_;
+                }
             }
 
             @java.lang.Override
@@ -60642,13 +59630,15 @@ public final class ContextOuterClass {
                     return this;
                 if (!other.getConstraintType().isEmpty()) {
                     constraintType_ = other.constraintType_;
+                    bitField0_ |= 0x00000001;
                     onChanged();
                 }
                 if (!other.getConstraintValue().isEmpty()) {
                     constraintValue_ = other.constraintValue_;
+                    bitField0_ |= 0x00000002;
                     onChanged();
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -60660,20 +59650,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Constraint_Custom parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    constraintType_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    constraintValue_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Constraint_Custom) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private java.lang.Object constraintType_ = "";
 
             /**
@@ -60717,6 +59741,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 constraintType_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -60727,6 +59752,7 @@ public final class ContextOuterClass {
              */
             public Builder clearConstraintType() {
                 constraintType_ = getDefaultInstance().getConstraintType();
+                bitField0_ = (bitField0_ & ~0x00000001);
                 onChanged();
                 return this;
             }
@@ -60742,6 +59768,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 constraintType_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -60789,6 +59816,7 @@ public final class ContextOuterClass {
                     throw new NullPointerException();
                 }
                 constraintValue_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -60799,6 +59827,7 @@ public final class ContextOuterClass {
              */
             public Builder clearConstraintValue() {
                 constraintValue_ = getDefaultInstance().getConstraintValue();
+                bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
             }
@@ -60814,6 +59843,7 @@ public final class ContextOuterClass {
                 }
                 checkByteStringIsUtf8(value);
                 constraintValue_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -60845,7 +59875,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Constraint_Custom parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Constraint_Custom(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -60868,10 +59908,10 @@ public final class ContextOuterClass {
     com.google.protobuf.MessageOrBuilder {
 
         /**
-         * float start_timestamp = 1;
+         * double start_timestamp = 1;
          * @return The startTimestamp.
          */
-        float getStartTimestamp();
+        double getStartTimestamp();
 
         /**
          * float duration_days = 2;
@@ -60902,54 +59942,6 @@ public final class ContextOuterClass {
             return new Constraint_Schedule();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Constraint_Schedule(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 13:
-                            {
-                                startTimestamp_ = input.readFloat();
-                                break;
-                            }
-                        case 21:
-                            {
-                                durationDays_ = input.readFloat();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Constraint_Schedule_descriptor;
         }
@@ -60961,20 +59953,20 @@ public final class ContextOuterClass {
 
         public static final int START_TIMESTAMP_FIELD_NUMBER = 1;
 
-        private float startTimestamp_;
+        private double startTimestamp_ = 0D;
 
         /**
-         * float start_timestamp = 1;
+         * double start_timestamp = 1;
          * @return The startTimestamp.
          */
         @java.lang.Override
-        public float getStartTimestamp() {
+        public double getStartTimestamp() {
             return startTimestamp_;
         }
 
         public static final int DURATION_DAYS_FIELD_NUMBER = 2;
 
-        private float durationDays_;
+        private float durationDays_ = 0F;
 
         /**
          * float duration_days = 2;
@@ -61000,13 +59992,13 @@ public final class ContextOuterClass {
 
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-            if (startTimestamp_ != 0F) {
-                output.writeFloat(1, startTimestamp_);
+            if (java.lang.Double.doubleToRawLongBits(startTimestamp_) != 0) {
+                output.writeDouble(1, startTimestamp_);
             }
-            if (durationDays_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(durationDays_) != 0) {
                 output.writeFloat(2, durationDays_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -61015,13 +60007,13 @@ public final class ContextOuterClass {
             if (size != -1)
                 return size;
             size = 0;
-            if (startTimestamp_ != 0F) {
-                size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, startTimestamp_);
+            if (java.lang.Double.doubleToRawLongBits(startTimestamp_) != 0) {
+                size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, startTimestamp_);
             }
-            if (durationDays_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(durationDays_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, durationDays_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -61035,11 +60027,11 @@ public final class ContextOuterClass {
                 return super.equals(obj);
             }
             context.ContextOuterClass.Constraint_Schedule other = (context.ContextOuterClass.Constraint_Schedule) obj;
-            if (java.lang.Float.floatToIntBits(getStartTimestamp()) != java.lang.Float.floatToIntBits(other.getStartTimestamp()))
+            if (java.lang.Double.doubleToLongBits(getStartTimestamp()) != java.lang.Double.doubleToLongBits(other.getStartTimestamp()))
                 return false;
             if (java.lang.Float.floatToIntBits(getDurationDays()) != java.lang.Float.floatToIntBits(other.getDurationDays()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -61052,10 +60044,10 @@ public final class ContextOuterClass {
             int hash = 41;
             hash = (19 * hash) + getDescriptor().hashCode();
             hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER;
-            hash = (53 * hash) + java.lang.Float.floatToIntBits(getStartTimestamp());
+            hash = (53 * hash) + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getStartTimestamp()));
             hash = (37 * hash) + DURATION_DAYS_FIELD_NUMBER;
             hash = (53 * hash) + java.lang.Float.floatToIntBits(getDurationDays());
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -61149,23 +60141,17 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Constraint_Schedule.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                startTimestamp_ = 0F;
+                bitField0_ = 0;
+                startTimestamp_ = 0D;
                 durationDays_ = 0F;
                 return this;
             }
@@ -61192,40 +60178,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Constraint_Schedule buildPartial() {
                 context.ContextOuterClass.Constraint_Schedule result = new context.ContextOuterClass.Constraint_Schedule(this);
-                result.startTimestamp_ = startTimestamp_;
-                result.durationDays_ = durationDays_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.Constraint_Schedule result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.startTimestamp_ = startTimestamp_;
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.durationDays_ = durationDays_;
+                }
             }
 
             @java.lang.Override
@@ -61241,13 +60208,13 @@ public final class ContextOuterClass {
             public Builder mergeFrom(context.ContextOuterClass.Constraint_Schedule other) {
                 if (other == context.ContextOuterClass.Constraint_Schedule.getDefaultInstance())
                     return this;
-                if (other.getStartTimestamp() != 0F) {
+                if (other.getStartTimestamp() != 0D) {
                     setStartTimestamp(other.getStartTimestamp());
                 }
                 if (other.getDurationDays() != 0F) {
                     setDurationDays(other.getDurationDays());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -61259,48 +60226,84 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Constraint_Schedule parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 9:
+                                {
+                                    startTimestamp_ = input.readDouble();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 9
+                            case 21:
+                                {
+                                    durationDays_ = input.readFloat();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 21
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Constraint_Schedule) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
-            private float startTimestamp_;
+            private int bitField0_;
+
+            private double startTimestamp_;
 
             /**
-             * float start_timestamp = 1;
+             * double start_timestamp = 1;
              * @return The startTimestamp.
              */
             @java.lang.Override
-            public float getStartTimestamp() {
+            public double getStartTimestamp() {
                 return startTimestamp_;
             }
 
             /**
-             * float start_timestamp = 1;
+             * double start_timestamp = 1;
              * @param value The startTimestamp to set.
              * @return This builder for chaining.
              */
-            public Builder setStartTimestamp(float value) {
+            public Builder setStartTimestamp(double value) {
                 startTimestamp_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
 
             /**
-             * float start_timestamp = 1;
+             * double start_timestamp = 1;
              * @return This builder for chaining.
              */
             public Builder clearStartTimestamp() {
-                startTimestamp_ = 0F;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                startTimestamp_ = 0D;
                 onChanged();
                 return this;
             }
@@ -61323,6 +60326,7 @@ public final class ContextOuterClass {
              */
             public Builder setDurationDays(float value) {
                 durationDays_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -61332,6 +60336,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearDurationDays() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 durationDays_ = 0F;
                 onChanged();
                 return this;
@@ -61364,7 +60369,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Constraint_Schedule parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Constraint_Schedule(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -61421,54 +60436,6 @@ public final class ContextOuterClass {
             return new GPS_Position();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private GPS_Position(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 13:
-                            {
-                                latitude_ = input.readFloat();
-                                break;
-                            }
-                        case 21:
-                            {
-                                longitude_ = input.readFloat();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_GPS_Position_descriptor;
         }
@@ -61480,7 +60447,7 @@ public final class ContextOuterClass {
 
         public static final int LATITUDE_FIELD_NUMBER = 1;
 
-        private float latitude_;
+        private float latitude_ = 0F;
 
         /**
          * float latitude = 1;
@@ -61493,7 +60460,7 @@ public final class ContextOuterClass {
 
         public static final int LONGITUDE_FIELD_NUMBER = 2;
 
-        private float longitude_;
+        private float longitude_ = 0F;
 
         /**
          * float longitude = 2;
@@ -61519,13 +60486,13 @@ public final class ContextOuterClass {
 
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-            if (latitude_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(latitude_) != 0) {
                 output.writeFloat(1, latitude_);
             }
-            if (longitude_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(longitude_) != 0) {
                 output.writeFloat(2, longitude_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -61534,13 +60501,13 @@ public final class ContextOuterClass {
             if (size != -1)
                 return size;
             size = 0;
-            if (latitude_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(latitude_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, latitude_);
             }
-            if (longitude_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(longitude_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, longitude_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -61558,7 +60525,7 @@ public final class ContextOuterClass {
                 return false;
             if (java.lang.Float.floatToIntBits(getLongitude()) != java.lang.Float.floatToIntBits(other.getLongitude()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -61574,7 +60541,7 @@ public final class ContextOuterClass {
             hash = (53 * hash) + java.lang.Float.floatToIntBits(getLatitude());
             hash = (37 * hash) + LONGITUDE_FIELD_NUMBER;
             hash = (53 * hash) + java.lang.Float.floatToIntBits(getLongitude());
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -61668,22 +60635,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.GPS_Position.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 latitude_ = 0F;
                 longitude_ = 0F;
                 return this;
@@ -61711,40 +60672,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.GPS_Position buildPartial() {
                 context.ContextOuterClass.GPS_Position result = new context.ContextOuterClass.GPS_Position(this);
-                result.latitude_ = latitude_;
-                result.longitude_ = longitude_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.GPS_Position result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.latitude_ = latitude_;
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.longitude_ = longitude_;
+                }
             }
 
             @java.lang.Override
@@ -61766,7 +60708,7 @@ public final class ContextOuterClass {
                 if (other.getLongitude() != 0F) {
                     setLongitude(other.getLongitude());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -61778,20 +60720,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.GPS_Position parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 13:
+                                {
+                                    latitude_ = input.readFloat();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 13
+                            case 21:
+                                {
+                                    longitude_ = input.readFloat();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 21
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.GPS_Position) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private float latitude_;
 
             /**
@@ -61810,6 +60786,7 @@ public final class ContextOuterClass {
              */
             public Builder setLatitude(float value) {
                 latitude_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -61819,6 +60796,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearLatitude() {
+                bitField0_ = (bitField0_ & ~0x00000001);
                 latitude_ = 0F;
                 onChanged();
                 return this;
@@ -61842,6 +60820,7 @@ public final class ContextOuterClass {
              */
             public Builder setLongitude(float value) {
                 longitude_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -61851,6 +60830,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearLongitude() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 longitude_ = 0F;
                 onChanged();
                 return this;
@@ -61883,7 +60863,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public GPS_Position parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new GPS_Position(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -61940,7 +60930,43 @@ public final class ContextOuterClass {
          */
         context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder();
 
-        public context.ContextOuterClass.Location.LocationCase getLocationCase();
+        /**
+         * string interface = 3;
+         * @return Whether the interface field is set.
+         */
+        boolean hasInterface();
+
+        /**
+         * string interface = 3;
+         * @return The interface.
+         */
+        java.lang.String getInterface();
+
+        /**
+         * string interface = 3;
+         * @return The bytes for interface.
+         */
+        com.google.protobuf.ByteString getInterfaceBytes();
+
+        /**
+         * string circuit_pack = 4;
+         * @return Whether the circuitPack field is set.
+         */
+        boolean hasCircuitPack();
+
+        /**
+         * string circuit_pack = 4;
+         * @return The circuitPack.
+         */
+        java.lang.String getCircuitPack();
+
+        /**
+         * string circuit_pack = 4;
+         * @return The bytes for circuitPack.
+         */
+        com.google.protobuf.ByteString getCircuitPackBytes();
+
+        context.ContextOuterClass.Location.LocationCase getLocationCase();
     }
 
     /**
@@ -61965,65 +60991,6 @@ public final class ContextOuterClass {
             return new Location();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Location(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                locationCase_ = 1;
-                                location_ = s;
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.GPS_Position.Builder subBuilder = null;
-                                if (locationCase_ == 2) {
-                                    subBuilder = ((context.ContextOuterClass.GPS_Position) location_).toBuilder();
-                                }
-                                location_ = input.readMessage(context.ContextOuterClass.GPS_Position.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom((context.ContextOuterClass.GPS_Position) location_);
-                                    location_ = subBuilder.buildPartial();
-                                }
-                                locationCase_ = 2;
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Location_descriptor;
         }
@@ -62035,11 +61002,12 @@ public final class ContextOuterClass {
 
         private int locationCase_ = 0;
 
+        @SuppressWarnings("serial")
         private java.lang.Object location_;
 
         public enum LocationCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum {
 
-            REGION(1), GPS_POSITION(2), LOCATION_NOT_SET(0);
+            REGION(1), GPS_POSITION(2), INTERFACE(3), CIRCUIT_PACK(4), LOCATION_NOT_SET(0);
 
             private final int value;
 
@@ -62063,6 +61031,10 @@ public final class ContextOuterClass {
                         return REGION;
                     case 2:
                         return GPS_POSITION;
+                    case 3:
+                        return INTERFACE;
+                    case 4:
+                        return CIRCUIT_PACK;
                     case 0:
                         return LOCATION_NOT_SET;
                     default:
@@ -62164,6 +61136,108 @@ public final class ContextOuterClass {
             return context.ContextOuterClass.GPS_Position.getDefaultInstance();
         }
 
+        public static final int INTERFACE_FIELD_NUMBER = 3;
+
+        /**
+         * string interface = 3;
+         * @return Whether the interface field is set.
+         */
+        public boolean hasInterface() {
+            return locationCase_ == 3;
+        }
+
+        /**
+         * string interface = 3;
+         * @return The interface.
+         */
+        public java.lang.String getInterface() {
+            java.lang.Object ref = "";
+            if (locationCase_ == 3) {
+                ref = location_;
+            }
+            if (ref instanceof java.lang.String) {
+                return (java.lang.String) ref;
+            } else {
+                com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+                java.lang.String s = bs.toStringUtf8();
+                if (locationCase_ == 3) {
+                    location_ = s;
+                }
+                return s;
+            }
+        }
+
+        /**
+         * string interface = 3;
+         * @return The bytes for interface.
+         */
+        public com.google.protobuf.ByteString getInterfaceBytes() {
+            java.lang.Object ref = "";
+            if (locationCase_ == 3) {
+                ref = location_;
+            }
+            if (ref instanceof java.lang.String) {
+                com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+                if (locationCase_ == 3) {
+                    location_ = b;
+                }
+                return b;
+            } else {
+                return (com.google.protobuf.ByteString) ref;
+            }
+        }
+
+        public static final int CIRCUIT_PACK_FIELD_NUMBER = 4;
+
+        /**
+         * string circuit_pack = 4;
+         * @return Whether the circuitPack field is set.
+         */
+        public boolean hasCircuitPack() {
+            return locationCase_ == 4;
+        }
+
+        /**
+         * string circuit_pack = 4;
+         * @return The circuitPack.
+         */
+        public java.lang.String getCircuitPack() {
+            java.lang.Object ref = "";
+            if (locationCase_ == 4) {
+                ref = location_;
+            }
+            if (ref instanceof java.lang.String) {
+                return (java.lang.String) ref;
+            } else {
+                com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+                java.lang.String s = bs.toStringUtf8();
+                if (locationCase_ == 4) {
+                    location_ = s;
+                }
+                return s;
+            }
+        }
+
+        /**
+         * string circuit_pack = 4;
+         * @return The bytes for circuitPack.
+         */
+        public com.google.protobuf.ByteString getCircuitPackBytes() {
+            java.lang.Object ref = "";
+            if (locationCase_ == 4) {
+                ref = location_;
+            }
+            if (ref instanceof java.lang.String) {
+                com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+                if (locationCase_ == 4) {
+                    location_ = b;
+                }
+                return b;
+            } else {
+                return (com.google.protobuf.ByteString) ref;
+            }
+        }
+
         private byte memoizedIsInitialized = -1;
 
         @java.lang.Override
@@ -62185,7 +61259,13 @@ public final class ContextOuterClass {
             if (locationCase_ == 2) {
                 output.writeMessage(2, (context.ContextOuterClass.GPS_Position) location_);
             }
-            unknownFields.writeTo(output);
+            if (locationCase_ == 3) {
+                com.google.protobuf.GeneratedMessageV3.writeString(output, 3, location_);
+            }
+            if (locationCase_ == 4) {
+                com.google.protobuf.GeneratedMessageV3.writeString(output, 4, location_);
+            }
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -62200,7 +61280,13 @@ public final class ContextOuterClass {
             if (locationCase_ == 2) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (context.ContextOuterClass.GPS_Position) location_);
             }
-            size += unknownFields.getSerializedSize();
+            if (locationCase_ == 3) {
+                size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, location_);
+            }
+            if (locationCase_ == 4) {
+                size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, location_);
+            }
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -62225,10 +61311,18 @@ public final class ContextOuterClass {
                     if (!getGpsPosition().equals(other.getGpsPosition()))
                         return false;
                     break;
+                case 3:
+                    if (!getInterface().equals(other.getInterface()))
+                        return false;
+                    break;
+                case 4:
+                    if (!getCircuitPack().equals(other.getCircuitPack()))
+                        return false;
+                    break;
                 case 0:
                 default:
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -62249,10 +61343,18 @@ public final class ContextOuterClass {
                     hash = (37 * hash) + GPS_POSITION_FIELD_NUMBER;
                     hash = (53 * hash) + getGpsPosition().hashCode();
                     break;
+                case 3:
+                    hash = (37 * hash) + INTERFACE_FIELD_NUMBER;
+                    hash = (53 * hash) + getInterface().hashCode();
+                    break;
+                case 4:
+                    hash = (37 * hash) + CIRCUIT_PACK_FIELD_NUMBER;
+                    hash = (53 * hash) + getCircuitPack().hashCode();
+                    break;
                 case 0:
                 default:
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -62346,22 +61448,19 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Location.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
+                if (gpsPositionBuilder_ != null) {
+                    gpsPositionBuilder_.clear();
+                }
                 locationCase_ = 0;
                 location_ = null;
                 return this;
@@ -62389,49 +61488,24 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Location buildPartial() {
                 context.ContextOuterClass.Location result = new context.ContextOuterClass.Location(this);
-                if (locationCase_ == 1) {
-                    result.location_ = location_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                if (locationCase_ == 2) {
-                    if (gpsPositionBuilder_ == null) {
-                        result.location_ = location_;
-                    } else {
-                        result.location_ = gpsPositionBuilder_.build();
-                    }
-                }
-                result.locationCase_ = locationCase_;
+                buildPartialOneofs(result);
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
+            private void buildPartial0(context.ContextOuterClass.Location result) {
+                int from_bitField0_ = bitField0_;
             }
 
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartialOneofs(context.ContextOuterClass.Location result) {
+                result.locationCase_ = locationCase_;
+                result.location_ = this.location_;
+                if (locationCase_ == 2 && gpsPositionBuilder_ != null) {
+                    result.location_ = gpsPositionBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -62460,12 +61534,26 @@ public final class ContextOuterClass {
                             mergeGpsPosition(other.getGpsPosition());
                             break;
                         }
+                    case INTERFACE:
+                        {
+                            locationCase_ = 3;
+                            location_ = other.location_;
+                            onChanged();
+                            break;
+                        }
+                    case CIRCUIT_PACK:
+                        {
+                            locationCase_ = 4;
+                            location_ = other.location_;
+                            onChanged();
+                            break;
+                        }
                     case LOCATION_NOT_SET:
                         {
                             break;
                         }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -62477,17 +61565,66 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Location parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    java.lang.String s = input.readStringRequireUtf8();
+                                    locationCase_ = 1;
+                                    location_ = s;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getGpsPositionFieldBuilder().getBuilder(), extensionRegistry);
+                                    locationCase_ = 2;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    java.lang.String s = input.readStringRequireUtf8();
+                                    locationCase_ = 3;
+                                    location_ = s;
+                                    break;
+                                }
+                            // case 26
+                            case 34:
+                                {
+                                    java.lang.String s = input.readStringRequireUtf8();
+                                    locationCase_ = 4;
+                                    location_ = s;
+                                    break;
+                                }
+                            // case 34
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Location) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -62506,6 +61643,8 @@ public final class ContextOuterClass {
                 return this;
             }
 
+            private int bitField0_;
+
             /**
              * string region = 1;
              * @return Whether the region field is set.
@@ -62677,8 +61816,9 @@ public final class ContextOuterClass {
                 } else {
                     if (locationCase_ == 2) {
                         gpsPositionBuilder_.mergeFrom(value);
+                    } else {
+                        gpsPositionBuilder_.setMessage(value);
                     }
-                    gpsPositionBuilder_.setMessage(value);
                 }
                 locationCase_ = 2;
                 return this;
@@ -62739,10 +61879,201 @@ public final class ContextOuterClass {
                 }
                 locationCase_ = 2;
                 onChanged();
-                ;
                 return gpsPositionBuilder_;
             }
 
+            /**
+             * string interface = 3;
+             * @return Whether the interface field is set.
+             */
+            @java.lang.Override
+            public boolean hasInterface() {
+                return locationCase_ == 3;
+            }
+
+            /**
+             * string interface = 3;
+             * @return The interface.
+             */
+            @java.lang.Override
+            public java.lang.String getInterface() {
+                java.lang.Object ref = "";
+                if (locationCase_ == 3) {
+                    ref = location_;
+                }
+                if (!(ref instanceof java.lang.String)) {
+                    com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+                    java.lang.String s = bs.toStringUtf8();
+                    if (locationCase_ == 3) {
+                        location_ = s;
+                    }
+                    return s;
+                } else {
+                    return (java.lang.String) ref;
+                }
+            }
+
+            /**
+             * string interface = 3;
+             * @return The bytes for interface.
+             */
+            @java.lang.Override
+            public com.google.protobuf.ByteString getInterfaceBytes() {
+                java.lang.Object ref = "";
+                if (locationCase_ == 3) {
+                    ref = location_;
+                }
+                if (ref instanceof String) {
+                    com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+                    if (locationCase_ == 3) {
+                        location_ = b;
+                    }
+                    return b;
+                } else {
+                    return (com.google.protobuf.ByteString) ref;
+                }
+            }
+
+            /**
+             * string interface = 3;
+             * @param value The interface to set.
+             * @return This builder for chaining.
+             */
+            public Builder setInterface(java.lang.String value) {
+                if (value == null) {
+                    throw new NullPointerException();
+                }
+                locationCase_ = 3;
+                location_ = value;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string interface = 3;
+             * @return This builder for chaining.
+             */
+            public Builder clearInterface() {
+                if (locationCase_ == 3) {
+                    locationCase_ = 0;
+                    location_ = null;
+                    onChanged();
+                }
+                return this;
+            }
+
+            /**
+             * string interface = 3;
+             * @param value The bytes for interface to set.
+             * @return This builder for chaining.
+             */
+            public Builder setInterfaceBytes(com.google.protobuf.ByteString value) {
+                if (value == null) {
+                    throw new NullPointerException();
+                }
+                checkByteStringIsUtf8(value);
+                locationCase_ = 3;
+                location_ = value;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string circuit_pack = 4;
+             * @return Whether the circuitPack field is set.
+             */
+            @java.lang.Override
+            public boolean hasCircuitPack() {
+                return locationCase_ == 4;
+            }
+
+            /**
+             * string circuit_pack = 4;
+             * @return The circuitPack.
+             */
+            @java.lang.Override
+            public java.lang.String getCircuitPack() {
+                java.lang.Object ref = "";
+                if (locationCase_ == 4) {
+                    ref = location_;
+                }
+                if (!(ref instanceof java.lang.String)) {
+                    com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+                    java.lang.String s = bs.toStringUtf8();
+                    if (locationCase_ == 4) {
+                        location_ = s;
+                    }
+                    return s;
+                } else {
+                    return (java.lang.String) ref;
+                }
+            }
+
+            /**
+             * string circuit_pack = 4;
+             * @return The bytes for circuitPack.
+             */
+            @java.lang.Override
+            public com.google.protobuf.ByteString getCircuitPackBytes() {
+                java.lang.Object ref = "";
+                if (locationCase_ == 4) {
+                    ref = location_;
+                }
+                if (ref instanceof String) {
+                    com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+                    if (locationCase_ == 4) {
+                        location_ = b;
+                    }
+                    return b;
+                } else {
+                    return (com.google.protobuf.ByteString) ref;
+                }
+            }
+
+            /**
+             * string circuit_pack = 4;
+             * @param value The circuitPack to set.
+             * @return This builder for chaining.
+             */
+            public Builder setCircuitPack(java.lang.String value) {
+                if (value == null) {
+                    throw new NullPointerException();
+                }
+                locationCase_ = 4;
+                location_ = value;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * string circuit_pack = 4;
+             * @return This builder for chaining.
+             */
+            public Builder clearCircuitPack() {
+                if (locationCase_ == 4) {
+                    locationCase_ = 0;
+                    location_ = null;
+                    onChanged();
+                }
+                return this;
+            }
+
+            /**
+             * string circuit_pack = 4;
+             * @param value The bytes for circuitPack to set.
+             * @return This builder for chaining.
+             */
+            public Builder setCircuitPackBytes(com.google.protobuf.ByteString value) {
+                if (value == null) {
+                    throw new NullPointerException();
+                }
+                checkByteStringIsUtf8(value);
+                locationCase_ = 4;
+                location_ = value;
+                onChanged();
+                return this;
+            }
+
             @java.lang.Override
             public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
                 return super.setUnknownFields(unknownFields);
@@ -62770,7 +62101,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Location parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Location(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -62849,70 +62190,6 @@ public final class ContextOuterClass {
             return new Constraint_EndPointLocation();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Constraint_EndPointLocation(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.EndPointId.Builder subBuilder = null;
-                                if (endpointId_ != null) {
-                                    subBuilder = endpointId_.toBuilder();
-                                }
-                                endpointId_ = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(endpointId_);
-                                    endpointId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.Location.Builder subBuilder = null;
-                                if (location_ != null) {
-                                    subBuilder = location_.toBuilder();
-                                }
-                                location_ = input.readMessage(context.ContextOuterClass.Location.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(location_);
-                                    location_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_descriptor;
         }
@@ -62949,7 +62226,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() {
-            return getEndpointId();
+            return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_;
         }
 
         public static final int LOCATION_FIELD_NUMBER = 2;
@@ -62979,7 +62256,7 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder() {
-            return getLocation();
+            return location_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : location_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -63003,7 +62280,7 @@ public final class ContextOuterClass {
             if (location_ != null) {
                 output.writeMessage(2, getLocation());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -63018,7 +62295,7 @@ public final class ContextOuterClass {
             if (location_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLocation());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -63044,7 +62321,7 @@ public final class ContextOuterClass {
                 if (!getLocation().equals(other.getLocation()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -63064,7 +62341,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + LOCATION_FIELD_NUMBER;
                 hash = (53 * hash) + getLocation().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -63158,32 +62435,24 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Constraint_EndPointLocation.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (endpointIdBuilder_ == null) {
-                    endpointId_ = null;
-                } else {
-                    endpointId_ = null;
+                bitField0_ = 0;
+                endpointId_ = null;
+                if (endpointIdBuilder_ != null) {
+                    endpointIdBuilder_.dispose();
                     endpointIdBuilder_ = null;
                 }
-                if (locationBuilder_ == null) {
-                    location_ = null;
-                } else {
-                    location_ = null;
+                location_ = null;
+                if (locationBuilder_ != null) {
+                    locationBuilder_.dispose();
                     locationBuilder_ = null;
                 }
                 return this;
@@ -63211,48 +62480,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Constraint_EndPointLocation buildPartial() {
                 context.ContextOuterClass.Constraint_EndPointLocation result = new context.ContextOuterClass.Constraint_EndPointLocation(this);
-                if (endpointIdBuilder_ == null) {
-                    result.endpointId_ = endpointId_;
-                } else {
-                    result.endpointId_ = endpointIdBuilder_.build();
-                }
-                if (locationBuilder_ == null) {
-                    result.location_ = location_;
-                } else {
-                    result.location_ = locationBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.Constraint_EndPointLocation result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.endpointId_ = endpointIdBuilder_ == null ? endpointId_ : endpointIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.location_ = locationBuilder_ == null ? location_ : locationBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -63274,7 +62516,7 @@ public final class ContextOuterClass {
                 if (other.hasLocation()) {
                     mergeLocation(other.getLocation());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -63286,20 +62528,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Constraint_EndPointLocation parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getEndpointIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getLocationFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Constraint_EndPointLocation) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.EndPointId endpointId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_;
@@ -63309,7 +62585,7 @@ public final class ContextOuterClass {
              * @return Whether the endpointId field is set.
              */
             public boolean hasEndpointId() {
-                return endpointIdBuilder_ != null || endpointId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -63333,10 +62609,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     endpointId_ = value;
-                    onChanged();
                 } else {
                     endpointIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -63346,10 +62623,11 @@ public final class ContextOuterClass {
             public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) {
                 if (endpointIdBuilder_ == null) {
                     endpointId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     endpointIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -63358,15 +62636,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) {
                 if (endpointIdBuilder_ == null) {
-                    if (endpointId_ != null) {
-                        endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && endpointId_ != null && endpointId_ != context.ContextOuterClass.EndPointId.getDefaultInstance()) {
+                        getEndpointIdBuilder().mergeFrom(value);
                     } else {
                         endpointId_ = value;
                     }
-                    onChanged();
                 } else {
                     endpointIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -63374,13 +62653,13 @@ public final class ContextOuterClass {
              * .context.EndPointId endpoint_id = 1;
              */
             public Builder clearEndpointId() {
-                if (endpointIdBuilder_ == null) {
-                    endpointId_ = null;
-                    onChanged();
-                } else {
-                    endpointId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                endpointId_ = null;
+                if (endpointIdBuilder_ != null) {
+                    endpointIdBuilder_.dispose();
                     endpointIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -63388,6 +62667,7 @@ public final class ContextOuterClass {
              * .context.EndPointId endpoint_id = 1;
              */
             public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getEndpointIdFieldBuilder().getBuilder();
             }
@@ -63423,7 +62703,7 @@ public final class ContextOuterClass {
              * @return Whether the location field is set.
              */
             public boolean hasLocation() {
-                return locationBuilder_ != null || location_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -63447,10 +62727,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     location_ = value;
-                    onChanged();
                 } else {
                     locationBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -63460,10 +62741,11 @@ public final class ContextOuterClass {
             public Builder setLocation(context.ContextOuterClass.Location.Builder builderForValue) {
                 if (locationBuilder_ == null) {
                     location_ = builderForValue.build();
-                    onChanged();
                 } else {
                     locationBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -63472,15 +62754,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeLocation(context.ContextOuterClass.Location value) {
                 if (locationBuilder_ == null) {
-                    if (location_ != null) {
-                        location_ = context.ContextOuterClass.Location.newBuilder(location_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && location_ != null && location_ != context.ContextOuterClass.Location.getDefaultInstance()) {
+                        getLocationBuilder().mergeFrom(value);
                     } else {
                         location_ = value;
                     }
-                    onChanged();
                 } else {
                     locationBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -63488,13 +62771,13 @@ public final class ContextOuterClass {
              * .context.Location location = 2;
              */
             public Builder clearLocation() {
-                if (locationBuilder_ == null) {
-                    location_ = null;
-                    onChanged();
-                } else {
-                    location_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                location_ = null;
+                if (locationBuilder_ != null) {
+                    locationBuilder_.dispose();
                     locationBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -63502,6 +62785,7 @@ public final class ContextOuterClass {
              * .context.Location location = 2;
              */
             public context.ContextOuterClass.Location.Builder getLocationBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getLocationFieldBuilder().getBuilder();
             }
@@ -63555,7 +62839,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Constraint_EndPointLocation parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Constraint_EndPointLocation(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -63623,62 +62917,6 @@ public final class ContextOuterClass {
             return new Constraint_EndPointPriority();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Constraint_EndPointPriority(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.EndPointId.Builder subBuilder = null;
-                                if (endpointId_ != null) {
-                                    subBuilder = endpointId_.toBuilder();
-                                }
-                                endpointId_ = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(endpointId_);
-                                    endpointId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 16:
-                            {
-                                priority_ = input.readUInt32();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_descriptor;
         }
@@ -63715,12 +62953,12 @@ public final class ContextOuterClass {
          */
         @java.lang.Override
         public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() {
-            return getEndpointId();
+            return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_;
         }
 
         public static final int PRIORITY_FIELD_NUMBER = 2;
 
-        private int priority_;
+        private int priority_ = 0;
 
         /**
          * uint32 priority = 2;
@@ -63752,7 +62990,7 @@ public final class ContextOuterClass {
             if (priority_ != 0) {
                 output.writeUInt32(2, priority_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -63767,7 +63005,7 @@ public final class ContextOuterClass {
             if (priority_ != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeUInt32Size(2, priority_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -63789,7 +63027,7 @@ public final class ContextOuterClass {
             }
             if (getPriority() != other.getPriority())
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -63807,7 +63045,7 @@ public final class ContextOuterClass {
             }
             hash = (37 * hash) + PRIORITY_FIELD_NUMBER;
             hash = (53 * hash) + getPriority();
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -63901,26 +63139,19 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Constraint_EndPointPriority.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (endpointIdBuilder_ == null) {
-                    endpointId_ = null;
-                } else {
-                    endpointId_ = null;
+                bitField0_ = 0;
+                endpointId_ = null;
+                if (endpointIdBuilder_ != null) {
+                    endpointIdBuilder_.dispose();
                     endpointIdBuilder_ = null;
                 }
                 priority_ = 0;
@@ -63949,44 +63180,21 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Constraint_EndPointPriority buildPartial() {
                 context.ContextOuterClass.Constraint_EndPointPriority result = new context.ContextOuterClass.Constraint_EndPointPriority(this);
-                if (endpointIdBuilder_ == null) {
-                    result.endpointId_ = endpointId_;
-                } else {
-                    result.endpointId_ = endpointIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.priority_ = priority_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.Constraint_EndPointPriority result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.endpointId_ = endpointIdBuilder_ == null ? endpointId_ : endpointIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.priority_ = priority_;
+                }
             }
 
             @java.lang.Override
@@ -64008,7 +63216,7 @@ public final class ContextOuterClass {
                 if (other.getPriority() != 0) {
                     setPriority(other.getPriority());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -64020,20 +63228,54 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Constraint_EndPointPriority parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getEndpointIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 16:
+                                {
+                                    priority_ = input.readUInt32();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 16
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Constraint_EndPointPriority) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.EndPointId endpointId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_;
@@ -64043,7 +63285,7 @@ public final class ContextOuterClass {
              * @return Whether the endpointId field is set.
              */
             public boolean hasEndpointId() {
-                return endpointIdBuilder_ != null || endpointId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -64067,10 +63309,11 @@ public final class ContextOuterClass {
                         throw new NullPointerException();
                     }
                     endpointId_ = value;
-                    onChanged();
                 } else {
                     endpointIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -64080,10 +63323,11 @@ public final class ContextOuterClass {
             public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) {
                 if (endpointIdBuilder_ == null) {
                     endpointId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     endpointIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -64092,15 +63336,16 @@ public final class ContextOuterClass {
              */
             public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) {
                 if (endpointIdBuilder_ == null) {
-                    if (endpointId_ != null) {
-                        endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && endpointId_ != null && endpointId_ != context.ContextOuterClass.EndPointId.getDefaultInstance()) {
+                        getEndpointIdBuilder().mergeFrom(value);
                     } else {
                         endpointId_ = value;
                     }
-                    onChanged();
                 } else {
                     endpointIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -64108,13 +63353,13 @@ public final class ContextOuterClass {
              * .context.EndPointId endpoint_id = 1;
              */
             public Builder clearEndpointId() {
-                if (endpointIdBuilder_ == null) {
-                    endpointId_ = null;
-                    onChanged();
-                } else {
-                    endpointId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                endpointId_ = null;
+                if (endpointIdBuilder_ != null) {
+                    endpointIdBuilder_.dispose();
                     endpointIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -64122,6 +63367,7 @@ public final class ContextOuterClass {
              * .context.EndPointId endpoint_id = 1;
              */
             public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getEndpointIdFieldBuilder().getBuilder();
             }
@@ -64166,6 +63412,7 @@ public final class ContextOuterClass {
              */
             public Builder setPriority(int value) {
                 priority_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -64175,6 +63422,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearPriority() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 priority_ = 0;
                 onChanged();
                 return this;
@@ -64207,7 +63455,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Constraint_EndPointPriority parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Constraint_EndPointPriority(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -64258,49 +63516,6 @@ public final class ContextOuterClass {
             return new Constraint_SLA_Latency();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Constraint_SLA_Latency(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 13:
-                            {
-                                e2ELatencyMs_ = input.readFloat();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_descriptor;
         }
@@ -64312,7 +63527,7 @@ public final class ContextOuterClass {
 
         public static final int E2E_LATENCY_MS_FIELD_NUMBER = 1;
 
-        private float e2ELatencyMs_;
+        private float e2ELatencyMs_ = 0F;
 
         /**
          * float e2e_latency_ms = 1;
@@ -64338,10 +63553,10 @@ public final class ContextOuterClass {
 
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-            if (e2ELatencyMs_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(e2ELatencyMs_) != 0) {
                 output.writeFloat(1, e2ELatencyMs_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -64350,10 +63565,10 @@ public final class ContextOuterClass {
             if (size != -1)
                 return size;
             size = 0;
-            if (e2ELatencyMs_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(e2ELatencyMs_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, e2ELatencyMs_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -64369,7 +63584,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.Constraint_SLA_Latency other = (context.ContextOuterClass.Constraint_SLA_Latency) obj;
             if (java.lang.Float.floatToIntBits(getE2ELatencyMs()) != java.lang.Float.floatToIntBits(other.getE2ELatencyMs()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -64383,7 +63598,7 @@ public final class ContextOuterClass {
             hash = (19 * hash) + getDescriptor().hashCode();
             hash = (37 * hash) + E2E_LATENCY_MS_FIELD_NUMBER;
             hash = (53 * hash) + java.lang.Float.floatToIntBits(getE2ELatencyMs());
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -64477,22 +63692,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Constraint_SLA_Latency.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 e2ELatencyMs_ = 0F;
                 return this;
             }
@@ -64519,39 +63728,18 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Constraint_SLA_Latency buildPartial() {
                 context.ContextOuterClass.Constraint_SLA_Latency result = new context.ContextOuterClass.Constraint_SLA_Latency(this);
-                result.e2ELatencyMs_ = e2ELatencyMs_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.Constraint_SLA_Latency result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.e2ELatencyMs_ = e2ELatencyMs_;
+                }
             }
 
             @java.lang.Override
@@ -64570,7 +63758,7 @@ public final class ContextOuterClass {
                 if (other.getE2ELatencyMs() != 0F) {
                     setE2ELatencyMs(other.getE2ELatencyMs());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -64582,20 +63770,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Constraint_SLA_Latency parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 13:
+                                {
+                                    e2ELatencyMs_ = input.readFloat();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 13
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Constraint_SLA_Latency) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private float e2ELatencyMs_;
 
             /**
@@ -64614,6 +63829,7 @@ public final class ContextOuterClass {
              */
             public Builder setE2ELatencyMs(float value) {
                 e2ELatencyMs_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -64623,6 +63839,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearE2ELatencyMs() {
+                bitField0_ = (bitField0_ & ~0x00000001);
                 e2ELatencyMs_ = 0F;
                 onChanged();
                 return this;
@@ -64655,7 +63872,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Constraint_SLA_Latency parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Constraint_SLA_Latency(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -64706,49 +63933,6 @@ public final class ContextOuterClass {
             return new Constraint_SLA_Capacity();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Constraint_SLA_Capacity(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 13:
-                            {
-                                capacityGbps_ = input.readFloat();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_descriptor;
         }
@@ -64760,7 +63944,7 @@ public final class ContextOuterClass {
 
         public static final int CAPACITY_GBPS_FIELD_NUMBER = 1;
 
-        private float capacityGbps_;
+        private float capacityGbps_ = 0F;
 
         /**
          * float capacity_gbps = 1;
@@ -64786,10 +63970,10 @@ public final class ContextOuterClass {
 
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-            if (capacityGbps_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(capacityGbps_) != 0) {
                 output.writeFloat(1, capacityGbps_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -64798,10 +63982,10 @@ public final class ContextOuterClass {
             if (size != -1)
                 return size;
             size = 0;
-            if (capacityGbps_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(capacityGbps_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, capacityGbps_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -64817,7 +64001,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.Constraint_SLA_Capacity other = (context.ContextOuterClass.Constraint_SLA_Capacity) obj;
             if (java.lang.Float.floatToIntBits(getCapacityGbps()) != java.lang.Float.floatToIntBits(other.getCapacityGbps()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -64831,7 +64015,7 @@ public final class ContextOuterClass {
             hash = (19 * hash) + getDescriptor().hashCode();
             hash = (37 * hash) + CAPACITY_GBPS_FIELD_NUMBER;
             hash = (53 * hash) + java.lang.Float.floatToIntBits(getCapacityGbps());
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -64925,22 +64109,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Constraint_SLA_Capacity.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 capacityGbps_ = 0F;
                 return this;
             }
@@ -64967,39 +64145,18 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Constraint_SLA_Capacity buildPartial() {
                 context.ContextOuterClass.Constraint_SLA_Capacity result = new context.ContextOuterClass.Constraint_SLA_Capacity(this);
-                result.capacityGbps_ = capacityGbps_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.Constraint_SLA_Capacity result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.capacityGbps_ = capacityGbps_;
+                }
             }
 
             @java.lang.Override
@@ -65018,7 +64175,7 @@ public final class ContextOuterClass {
                 if (other.getCapacityGbps() != 0F) {
                     setCapacityGbps(other.getCapacityGbps());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -65030,20 +64187,47 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Constraint_SLA_Capacity parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 13:
+                                {
+                                    capacityGbps_ = input.readFloat();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 13
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Constraint_SLA_Capacity) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private float capacityGbps_;
 
             /**
@@ -65062,6 +64246,7 @@ public final class ContextOuterClass {
              */
             public Builder setCapacityGbps(float value) {
                 capacityGbps_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -65071,6 +64256,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearCapacityGbps() {
+                bitField0_ = (bitField0_ & ~0x00000001);
                 capacityGbps_ = 0F;
                 onChanged();
                 return this;
@@ -65103,7 +64289,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Constraint_SLA_Capacity parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Constraint_SLA_Capacity(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -65170,59 +64366,6 @@ public final class ContextOuterClass {
             return new Constraint_SLA_Availability();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Constraint_SLA_Availability(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 8:
-                            {
-                                numDisjointPaths_ = input.readUInt32();
-                                break;
-                            }
-                        case 16:
-                            {
-                                allActive_ = input.readBool();
-                                break;
-                            }
-                        case 29:
-                            {
-                                availability_ = input.readFloat();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_descriptor;
         }
@@ -65234,7 +64377,7 @@ public final class ContextOuterClass {
 
         public static final int NUM_DISJOINT_PATHS_FIELD_NUMBER = 1;
 
-        private int numDisjointPaths_;
+        private int numDisjointPaths_ = 0;
 
         /**
          * uint32 num_disjoint_paths = 1;
@@ -65247,7 +64390,7 @@ public final class ContextOuterClass {
 
         public static final int ALL_ACTIVE_FIELD_NUMBER = 2;
 
-        private boolean allActive_;
+        private boolean allActive_ = false;
 
         /**
          * bool all_active = 2;
@@ -65260,7 +64403,7 @@ public final class ContextOuterClass {
 
         public static final int AVAILABILITY_FIELD_NUMBER = 3;
 
-        private float availability_;
+        private float availability_ = 0F;
 
         /**
          * 
@@ -65296,10 +64439,10 @@ public final class ContextOuterClass {
             if (allActive_ != false) {
                 output.writeBool(2, allActive_);
             }
-            if (availability_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(availability_) != 0) {
                 output.writeFloat(3, availability_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -65314,10 +64457,10 @@ public final class ContextOuterClass {
             if (allActive_ != false) {
                 size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allActive_);
             }
-            if (availability_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(availability_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, availability_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -65337,7 +64480,7 @@ public final class ContextOuterClass {
                 return false;
             if (java.lang.Float.floatToIntBits(getAvailability()) != java.lang.Float.floatToIntBits(other.getAvailability()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -65355,7 +64498,7 @@ public final class ContextOuterClass {
             hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllActive());
             hash = (37 * hash) + AVAILABILITY_FIELD_NUMBER;
             hash = (53 * hash) + java.lang.Float.floatToIntBits(getAvailability());
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -65449,22 +64592,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Constraint_SLA_Availability.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 numDisjointPaths_ = 0;
                 allActive_ = false;
                 availability_ = 0F;
@@ -65493,41 +64630,24 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Constraint_SLA_Availability buildPartial() {
                 context.ContextOuterClass.Constraint_SLA_Availability result = new context.ContextOuterClass.Constraint_SLA_Availability(this);
-                result.numDisjointPaths_ = numDisjointPaths_;
-                result.allActive_ = allActive_;
-                result.availability_ = availability_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.Constraint_SLA_Availability result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.numDisjointPaths_ = numDisjointPaths_;
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.allActive_ = allActive_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.availability_ = availability_;
+                }
             }
 
             @java.lang.Override
@@ -65552,7 +64672,7 @@ public final class ContextOuterClass {
                 if (other.getAvailability() != 0F) {
                     setAvailability(other.getAvailability());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -65564,20 +64684,61 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Constraint_SLA_Availability parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 8:
+                                {
+                                    numDisjointPaths_ = input.readUInt32();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 8
+                            case 16:
+                                {
+                                    allActive_ = input.readBool();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 16
+                            case 29:
+                                {
+                                    availability_ = input.readFloat();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 29
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Constraint_SLA_Availability) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private int numDisjointPaths_;
 
             /**
@@ -65596,6 +64757,7 @@ public final class ContextOuterClass {
              */
             public Builder setNumDisjointPaths(int value) {
                 numDisjointPaths_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -65605,6 +64767,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearNumDisjointPaths() {
+                bitField0_ = (bitField0_ & ~0x00000001);
                 numDisjointPaths_ = 0;
                 onChanged();
                 return this;
@@ -65628,6 +64791,7 @@ public final class ContextOuterClass {
              */
             public Builder setAllActive(boolean value) {
                 allActive_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -65637,6 +64801,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearAllActive() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 allActive_ = false;
                 onChanged();
                 return this;
@@ -65668,6 +64833,7 @@ public final class ContextOuterClass {
              */
             public Builder setAvailability(float value) {
                 availability_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -65681,6 +64847,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearAvailability() {
+                bitField0_ = (bitField0_ & ~0x00000004);
                 availability_ = 0F;
                 onChanged();
                 return this;
@@ -65713,7 +64880,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Constraint_SLA_Availability parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Constraint_SLA_Availability(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -65791,73 +64968,6 @@ public final class ContextOuterClass {
             return new Constraint_SLA_Isolation_level();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Constraint_SLA_Isolation_level(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 8:
-                            {
-                                int rawValue = input.readEnum();
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    isolationLevel_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                isolationLevel_.add(rawValue);
-                                break;
-                            }
-                        case 10:
-                            {
-                                int length = input.readRawVarint32();
-                                int oldLimit = input.pushLimit(length);
-                                while (input.getBytesUntilLimit() > 0) {
-                                    int rawValue = input.readEnum();
-                                    if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                        isolationLevel_ = new java.util.ArrayList();
-                                        mutable_bitField0_ |= 0x00000001;
-                                    }
-                                    isolationLevel_.add(rawValue);
-                                }
-                                input.popLimit(oldLimit);
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    isolationLevel_ = java.util.Collections.unmodifiableList(isolationLevel_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_descriptor;
         }
@@ -65869,13 +64979,13 @@ public final class ContextOuterClass {
 
         public static final int ISOLATION_LEVEL_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List isolationLevel_;
 
         private static final com.google.protobuf.Internal.ListAdapter.Converter isolationLevel_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter() {
 
             public context.ContextOuterClass.IsolationLevelEnum convert(java.lang.Integer from) {
-                @SuppressWarnings("deprecation")
-                context.ContextOuterClass.IsolationLevelEnum result = context.ContextOuterClass.IsolationLevelEnum.valueOf(from);
+                context.ContextOuterClass.IsolationLevelEnum result = context.ContextOuterClass.IsolationLevelEnum.forNumber(from);
                 return result == null ? context.ContextOuterClass.IsolationLevelEnum.UNRECOGNIZED : result;
             }
         };
@@ -65952,7 +65062,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < isolationLevel_.size(); i++) {
                 output.writeEnumNoTag(isolationLevel_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -65973,7 +65083,7 @@ public final class ContextOuterClass {
                 }
                 isolationLevelMemoizedSerializedSize = dataSize;
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -65989,7 +65099,7 @@ public final class ContextOuterClass {
             context.ContextOuterClass.Constraint_SLA_Isolation_level other = (context.ContextOuterClass.Constraint_SLA_Isolation_level) obj;
             if (!isolationLevel_.equals(other.isolationLevel_))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -66005,7 +65115,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + ISOLATION_LEVEL_FIELD_NUMBER;
                 hash = (53 * hash) + isolationLevel_.hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -66099,22 +65209,16 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Constraint_SLA_Isolation_level.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 isolationLevel_ = java.util.Collections.emptyList();
                 bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
@@ -66142,44 +65246,24 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Constraint_SLA_Isolation_level buildPartial() {
                 context.ContextOuterClass.Constraint_SLA_Isolation_level result = new context.ContextOuterClass.Constraint_SLA_Isolation_level(this);
-                int from_bitField0_ = bitField0_;
-                if (((bitField0_ & 0x00000001) != 0)) {
-                    isolationLevel_ = java.util.Collections.unmodifiableList(isolationLevel_);
-                    bitField0_ = (bitField0_ & ~0x00000001);
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.isolationLevel_ = isolationLevel_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
+            private void buildPartialRepeatedFields(context.ContextOuterClass.Constraint_SLA_Isolation_level result) {
+                if (((bitField0_ & 0x00000001) != 0)) {
+                    isolationLevel_ = java.util.Collections.unmodifiableList(isolationLevel_);
+                    bitField0_ = (bitField0_ & ~0x00000001);
+                }
+                result.isolationLevel_ = isolationLevel_;
             }
 
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.Constraint_SLA_Isolation_level result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -66205,7 +65289,7 @@ public final class ContextOuterClass {
                     }
                     onChanged();
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -66217,17 +65301,56 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Constraint_SLA_Isolation_level parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 8:
+                                {
+                                    int tmpRaw = input.readEnum();
+                                    ensureIsolationLevelIsMutable();
+                                    isolationLevel_.add(tmpRaw);
+                                    break;
+                                }
+                            // case 8
+                            case 10:
+                                {
+                                    int length = input.readRawVarint32();
+                                    int oldLimit = input.pushLimit(length);
+                                    while (input.getBytesUntilLimit() > 0) {
+                                        int tmpRaw = input.readEnum();
+                                        ensureIsolationLevelIsMutable();
+                                        isolationLevel_.add(tmpRaw);
+                                    }
+                                    input.popLimit(oldLimit);
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Constraint_SLA_Isolation_level) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -66342,8 +65465,8 @@ public final class ContextOuterClass {
 
             /**
              * repeated .context.IsolationLevelEnum isolation_level = 1;
-             * @param index The index of the value to return.
-             * @return The enum numeric value on the wire of isolationLevel at the given index.
+             * @param index The index to set the value at.
+             * @param value The enum numeric value on the wire for isolationLevel to set.
              * @return This builder for chaining.
              */
             public Builder setIsolationLevelValue(int index, int value) {
@@ -66406,7 +65529,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Constraint_SLA_Isolation_level parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Constraint_SLA_Isolation_level(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -66535,86 +65668,6 @@ public final class ContextOuterClass {
             return new Constraint_Exclusions();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Constraint_Exclusions(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 8:
-                            {
-                                isPermanent_ = input.readBool();
-                                break;
-                            }
-                        case 18:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    deviceIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                deviceIds_.add(input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry));
-                                break;
-                            }
-                        case 26:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000002) != 0)) {
-                                    endpointIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000002;
-                                }
-                                endpointIds_.add(input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry));
-                                break;
-                            }
-                        case 34:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000004) != 0)) {
-                                    linkIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000004;
-                                }
-                                linkIds_.add(input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_);
-                }
-                if (((mutable_bitField0_ & 0x00000002) != 0)) {
-                    endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_);
-                }
-                if (((mutable_bitField0_ & 0x00000004) != 0)) {
-                    linkIds_ = java.util.Collections.unmodifiableList(linkIds_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_descriptor;
         }
@@ -66626,7 +65679,7 @@ public final class ContextOuterClass {
 
         public static final int IS_PERMANENT_FIELD_NUMBER = 1;
 
-        private boolean isPermanent_;
+        private boolean isPermanent_ = false;
 
         /**
          * bool is_permanent = 1;
@@ -66639,6 +65692,7 @@ public final class ContextOuterClass {
 
         public static final int DEVICE_IDS_FIELD_NUMBER = 2;
 
+        @SuppressWarnings("serial")
         private java.util.List deviceIds_;
 
         /**
@@ -66683,6 +65737,7 @@ public final class ContextOuterClass {
 
         public static final int ENDPOINT_IDS_FIELD_NUMBER = 3;
 
+        @SuppressWarnings("serial")
         private java.util.List endpointIds_;
 
         /**
@@ -66727,6 +65782,7 @@ public final class ContextOuterClass {
 
         public static final int LINK_IDS_FIELD_NUMBER = 4;
 
+        @SuppressWarnings("serial")
         private java.util.List linkIds_;
 
         /**
@@ -66796,7 +65852,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < linkIds_.size(); i++) {
                 output.writeMessage(4, linkIds_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -66817,7 +65873,7 @@ public final class ContextOuterClass {
             for (int i = 0; i < linkIds_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkIds_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -66839,7 +65895,7 @@ public final class ContextOuterClass {
                 return false;
             if (!getLinkIdsList().equals(other.getLinkIdsList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -66865,7 +65921,7 @@ public final class ContextOuterClass {
                 hash = (37 * hash) + LINK_IDS_FIELD_NUMBER;
                 hash = (53 * hash) + getLinkIdsList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -66959,44 +66015,38 @@ public final class ContextOuterClass {
 
             // Construct using context.ContextOuterClass.Constraint_Exclusions.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getDeviceIdsFieldBuilder();
-                    getEndpointIdsFieldBuilder();
-                    getLinkIdsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 isPermanent_ = false;
                 if (deviceIdsBuilder_ == null) {
                     deviceIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    deviceIds_ = null;
                     deviceIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000002);
                 if (endpointIdsBuilder_ == null) {
                     endpointIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000002);
                 } else {
+                    endpointIds_ = null;
                     endpointIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000004);
                 if (linkIdsBuilder_ == null) {
                     linkIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000004);
                 } else {
+                    linkIds_ = null;
                     linkIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000008);
                 return this;
             }
 
@@ -67022,67 +66072,49 @@ public final class ContextOuterClass {
             @java.lang.Override
             public context.ContextOuterClass.Constraint_Exclusions buildPartial() {
                 context.ContextOuterClass.Constraint_Exclusions result = new context.ContextOuterClass.Constraint_Exclusions(this);
-                int from_bitField0_ = bitField0_;
-                result.isPermanent_ = isPermanent_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(context.ContextOuterClass.Constraint_Exclusions result) {
                 if (deviceIdsBuilder_ == null) {
-                    if (((bitField0_ & 0x00000001) != 0)) {
+                    if (((bitField0_ & 0x00000002) != 0)) {
                         deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_);
-                        bitField0_ = (bitField0_ & ~0x00000001);
+                        bitField0_ = (bitField0_ & ~0x00000002);
                     }
                     result.deviceIds_ = deviceIds_;
                 } else {
                     result.deviceIds_ = deviceIdsBuilder_.build();
                 }
                 if (endpointIdsBuilder_ == null) {
-                    if (((bitField0_ & 0x00000002) != 0)) {
+                    if (((bitField0_ & 0x00000004) != 0)) {
                         endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_);
-                        bitField0_ = (bitField0_ & ~0x00000002);
+                        bitField0_ = (bitField0_ & ~0x00000004);
                     }
                     result.endpointIds_ = endpointIds_;
                 } else {
                     result.endpointIds_ = endpointIdsBuilder_.build();
                 }
                 if (linkIdsBuilder_ == null) {
-                    if (((bitField0_ & 0x00000004) != 0)) {
+                    if (((bitField0_ & 0x00000008) != 0)) {
                         linkIds_ = java.util.Collections.unmodifiableList(linkIds_);
-                        bitField0_ = (bitField0_ & ~0x00000004);
+                        bitField0_ = (bitField0_ & ~0x00000008);
                     }
                     result.linkIds_ = linkIds_;
                 } else {
                     result.linkIds_ = linkIdsBuilder_.build();
                 }
-                onBuilt();
-                return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.Constraint_Exclusions result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.isPermanent_ = isPermanent_;
+                }
             }
 
             @java.lang.Override
@@ -67105,7 +66137,7 @@ public final class ContextOuterClass {
                     if (!other.deviceIds_.isEmpty()) {
                         if (deviceIds_.isEmpty()) {
                             deviceIds_ = other.deviceIds_;
-                            bitField0_ = (bitField0_ & ~0x00000001);
+                            bitField0_ = (bitField0_ & ~0x00000002);
                         } else {
                             ensureDeviceIdsIsMutable();
                             deviceIds_.addAll(other.deviceIds_);
@@ -67118,7 +66150,7 @@ public final class ContextOuterClass {
                             deviceIdsBuilder_.dispose();
                             deviceIdsBuilder_ = null;
                             deviceIds_ = other.deviceIds_;
-                            bitField0_ = (bitField0_ & ~0x00000001);
+                            bitField0_ = (bitField0_ & ~0x00000002);
                             deviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceIdsFieldBuilder() : null;
                         } else {
                             deviceIdsBuilder_.addAllMessages(other.deviceIds_);
@@ -67129,7 +66161,7 @@ public final class ContextOuterClass {
                     if (!other.endpointIds_.isEmpty()) {
                         if (endpointIds_.isEmpty()) {
                             endpointIds_ = other.endpointIds_;
-                            bitField0_ = (bitField0_ & ~0x00000002);
+                            bitField0_ = (bitField0_ & ~0x00000004);
                         } else {
                             ensureEndpointIdsIsMutable();
                             endpointIds_.addAll(other.endpointIds_);
@@ -67142,7 +66174,7 @@ public final class ContextOuterClass {
                             endpointIdsBuilder_.dispose();
                             endpointIdsBuilder_ = null;
                             endpointIds_ = other.endpointIds_;
-                            bitField0_ = (bitField0_ & ~0x00000002);
+                            bitField0_ = (bitField0_ & ~0x00000004);
                             endpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEndpointIdsFieldBuilder() : null;
                         } else {
                             endpointIdsBuilder_.addAllMessages(other.endpointIds_);
@@ -67153,7 +66185,7 @@ public final class ContextOuterClass {
                     if (!other.linkIds_.isEmpty()) {
                         if (linkIds_.isEmpty()) {
                             linkIds_ = other.linkIds_;
-                            bitField0_ = (bitField0_ & ~0x00000004);
+                            bitField0_ = (bitField0_ & ~0x00000008);
                         } else {
                             ensureLinkIdsIsMutable();
                             linkIds_.addAll(other.linkIds_);
@@ -67166,14 +66198,14 @@ public final class ContextOuterClass {
                             linkIdsBuilder_.dispose();
                             linkIdsBuilder_ = null;
                             linkIds_ = other.linkIds_;
-                            bitField0_ = (bitField0_ & ~0x00000004);
+                            bitField0_ = (bitField0_ & ~0x00000008);
                             linkIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkIdsFieldBuilder() : null;
                         } else {
                             linkIdsBuilder_.addAllMessages(other.linkIds_);
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -67185,17 +66217,78 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Constraint_Exclusions parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 8:
+                                {
+                                    isPermanent_ = input.readBool();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 8
+                            case 18:
+                                {
+                                    context.ContextOuterClass.DeviceId m = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry);
+                                    if (deviceIdsBuilder_ == null) {
+                                        ensureDeviceIdsIsMutable();
+                                        deviceIds_.add(m);
+                                    } else {
+                                        deviceIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry);
+                                    if (endpointIdsBuilder_ == null) {
+                                        ensureEndpointIdsIsMutable();
+                                        endpointIds_.add(m);
+                                    } else {
+                                        endpointIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 26
+                            case 34:
+                                {
+                                    context.ContextOuterClass.LinkId m = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry);
+                                    if (linkIdsBuilder_ == null) {
+                                        ensureLinkIdsIsMutable();
+                                        linkIds_.add(m);
+                                    } else {
+                                        linkIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 34
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Constraint_Exclusions) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -67219,6 +66312,7 @@ public final class ContextOuterClass {
              */
             public Builder setIsPermanent(boolean value) {
                 isPermanent_ = value;
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -67228,6 +66322,7 @@ public final class ContextOuterClass {
              * @return This builder for chaining.
              */
             public Builder clearIsPermanent() {
+                bitField0_ = (bitField0_ & ~0x00000001);
                 isPermanent_ = false;
                 onChanged();
                 return this;
@@ -67236,9 +66331,9 @@ public final class ContextOuterClass {
             private java.util.List deviceIds_ = java.util.Collections.emptyList();
 
             private void ensureDeviceIdsIsMutable() {
-                if (!((bitField0_ & 0x00000001) != 0)) {
+                if (!((bitField0_ & 0x00000002) != 0)) {
                     deviceIds_ = new java.util.ArrayList(deviceIds_);
-                    bitField0_ |= 0x00000001;
+                    bitField0_ |= 0x00000002;
                 }
             }
 
@@ -67390,7 +66485,7 @@ public final class ContextOuterClass {
             public Builder clearDeviceIds() {
                 if (deviceIdsBuilder_ == null) {
                     deviceIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
+                    bitField0_ = (bitField0_ & ~0x00000002);
                     onChanged();
                 } else {
                     deviceIdsBuilder_.clear();
@@ -67464,7 +66559,7 @@ public final class ContextOuterClass {
 
             private com.google.protobuf.RepeatedFieldBuilderV3 getDeviceIdsFieldBuilder() {
                 if (deviceIdsBuilder_ == null) {
-                    deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
+                    deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
                     deviceIds_ = null;
                 }
                 return deviceIdsBuilder_;
@@ -67473,9 +66568,9 @@ public final class ContextOuterClass {
             private java.util.List endpointIds_ = java.util.Collections.emptyList();
 
             private void ensureEndpointIdsIsMutable() {
-                if (!((bitField0_ & 0x00000002) != 0)) {
+                if (!((bitField0_ & 0x00000004) != 0)) {
                     endpointIds_ = new java.util.ArrayList(endpointIds_);
-                    bitField0_ |= 0x00000002;
+                    bitField0_ |= 0x00000004;
                 }
             }
 
@@ -67627,7 +66722,7 @@ public final class ContextOuterClass {
             public Builder clearEndpointIds() {
                 if (endpointIdsBuilder_ == null) {
                     endpointIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000002);
+                    bitField0_ = (bitField0_ & ~0x00000004);
                     onChanged();
                 } else {
                     endpointIdsBuilder_.clear();
@@ -67701,7 +66796,7 @@ public final class ContextOuterClass {
 
             private com.google.protobuf.RepeatedFieldBuilderV3 getEndpointIdsFieldBuilder() {
                 if (endpointIdsBuilder_ == null) {
-                    endpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(endpointIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
+                    endpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(endpointIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean());
                     endpointIds_ = null;
                 }
                 return endpointIdsBuilder_;
@@ -67710,9 +66805,9 @@ public final class ContextOuterClass {
             private java.util.List linkIds_ = java.util.Collections.emptyList();
 
             private void ensureLinkIdsIsMutable() {
-                if (!((bitField0_ & 0x00000004) != 0)) {
+                if (!((bitField0_ & 0x00000008) != 0)) {
                     linkIds_ = new java.util.ArrayList(linkIds_);
-                    bitField0_ |= 0x00000004;
+                    bitField0_ |= 0x00000008;
                 }
             }
 
@@ -67864,7 +66959,7 @@ public final class ContextOuterClass {
             public Builder clearLinkIds() {
                 if (linkIdsBuilder_ == null) {
                     linkIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000004);
+                    bitField0_ = (bitField0_ & ~0x00000008);
                     onChanged();
                 } else {
                     linkIdsBuilder_.clear();
@@ -67938,7 +67033,7 @@ public final class ContextOuterClass {
 
             private com.google.protobuf.RepeatedFieldBuilderV3 getLinkIdsFieldBuilder() {
                 if (linkIdsBuilder_ == null) {
-                    linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean());
+                    linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
                     linkIds_ = null;
                 }
                 return linkIdsBuilder_;
@@ -67971,7 +67066,17 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Constraint_Exclusions parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Constraint_Exclusions(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -67990,776 +67095,676 @@ public final class ContextOuterClass {
         }
     }
 
-    public interface ConstraintOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint)
+    public interface QoSProfileIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.QoSProfileId)
     com.google.protobuf.MessageOrBuilder {
 
         /**
-         * .context.ConstraintActionEnum action = 1;
-         * @return The enum numeric value on the wire for action.
-         */
-        int getActionValue();
-
-        /**
-         * .context.ConstraintActionEnum action = 1;
-         * @return The action.
-         */
-        context.ContextOuterClass.ConstraintActionEnum getAction();
-
-        /**
-         * .context.Constraint_Custom custom = 2;
-         * @return Whether the custom field is set.
-         */
-        boolean hasCustom();
-
-        /**
-         * .context.Constraint_Custom custom = 2;
-         * @return The custom.
-         */
-        context.ContextOuterClass.Constraint_Custom getCustom();
-
-        /**
-         * .context.Constraint_Custom custom = 2;
-         */
-        context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder();
-
-        /**
-         * .context.Constraint_Schedule schedule = 3;
-         * @return Whether the schedule field is set.
-         */
-        boolean hasSchedule();
-
-        /**
-         * .context.Constraint_Schedule schedule = 3;
-         * @return The schedule.
-         */
-        context.ContextOuterClass.Constraint_Schedule getSchedule();
-
-        /**
-         * .context.Constraint_Schedule schedule = 3;
-         */
-        context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder();
-
-        /**
-         * .context.Constraint_EndPointLocation endpoint_location = 4;
-         * @return Whether the endpointLocation field is set.
-         */
-        boolean hasEndpointLocation();
-
-        /**
-         * .context.Constraint_EndPointLocation endpoint_location = 4;
-         * @return The endpointLocation.
-         */
-        context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation();
-
-        /**
-         * .context.Constraint_EndPointLocation endpoint_location = 4;
-         */
-        context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder();
-
-        /**
-         * .context.Constraint_EndPointPriority endpoint_priority = 5;
-         * @return Whether the endpointPriority field is set.
-         */
-        boolean hasEndpointPriority();
-
-        /**
-         * .context.Constraint_EndPointPriority endpoint_priority = 5;
-         * @return The endpointPriority.
-         */
-        context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority();
-
-        /**
-         * .context.Constraint_EndPointPriority endpoint_priority = 5;
-         */
-        context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder();
-
-        /**
-         * .context.Constraint_SLA_Capacity sla_capacity = 6;
-         * @return Whether the slaCapacity field is set.
-         */
-        boolean hasSlaCapacity();
-
-        /**
-         * .context.Constraint_SLA_Capacity sla_capacity = 6;
-         * @return The slaCapacity.
-         */
-        context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity();
-
-        /**
-         * .context.Constraint_SLA_Capacity sla_capacity = 6;
-         */
-        context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder();
-
-        /**
-         * .context.Constraint_SLA_Latency sla_latency = 7;
-         * @return Whether the slaLatency field is set.
-         */
-        boolean hasSlaLatency();
-
-        /**
-         * .context.Constraint_SLA_Latency sla_latency = 7;
-         * @return The slaLatency.
-         */
-        context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency();
-
-        /**
-         * .context.Constraint_SLA_Latency sla_latency = 7;
-         */
-        context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder();
-
-        /**
-         * .context.Constraint_SLA_Availability sla_availability = 8;
-         * @return Whether the slaAvailability field is set.
-         */
-        boolean hasSlaAvailability();
-
-        /**
-         * .context.Constraint_SLA_Availability sla_availability = 8;
-         * @return The slaAvailability.
-         */
-        context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability();
-
-        /**
-         * .context.Constraint_SLA_Availability sla_availability = 8;
-         */
-        context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder();
-
-        /**
-         * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
-         * @return Whether the slaIsolation field is set.
-         */
-        boolean hasSlaIsolation();
-
-        /**
-         * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
-         * @return The slaIsolation.
-         */
-        context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation();
-
-        /**
-         * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
-         */
-        context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder();
-
-        /**
-         * .context.Constraint_Exclusions exclusions = 10;
-         * @return Whether the exclusions field is set.
+         * .context.Uuid qos_profile_id = 1;
+         * @return Whether the qosProfileId field is set.
          */
-        boolean hasExclusions();
+        boolean hasQosProfileId();
 
         /**
-         * .context.Constraint_Exclusions exclusions = 10;
-         * @return The exclusions.
+         * .context.Uuid qos_profile_id = 1;
+         * @return The qosProfileId.
          */
-        context.ContextOuterClass.Constraint_Exclusions getExclusions();
+        context.ContextOuterClass.Uuid getQosProfileId();
 
         /**
-         * .context.Constraint_Exclusions exclusions = 10;
+         * .context.Uuid qos_profile_id = 1;
          */
-        context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder();
-
-        public context.ContextOuterClass.Constraint.ConstraintCase getConstraintCase();
+        context.ContextOuterClass.UuidOrBuilder getQosProfileIdOrBuilder();
     }
 
     /**
-     * Protobuf type {@code context.Constraint}
+     * Protobuf type {@code context.QoSProfileId}
      */
-    public static final class Constraint extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint)
-    ConstraintOrBuilder {
+    public static final class QoSProfileId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.QoSProfileId)
+    QoSProfileIdOrBuilder {
 
         private static final long serialVersionUID = 0L;
 
-        // Use Constraint.newBuilder() to construct.
-        private Constraint(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+        // Use QoSProfileId.newBuilder() to construct.
+        private QoSProfileId(com.google.protobuf.GeneratedMessageV3.Builder builder) {
             super(builder);
         }
 
-        private Constraint() {
-            action_ = 0;
+        private QoSProfileId() {
         }
 
         @java.lang.Override
         @SuppressWarnings({ "unused" })
         protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
-            return new Constraint();
-        }
-
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Constraint(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 8:
-                            {
-                                int rawValue = input.readEnum();
-                                action_ = rawValue;
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.Constraint_Custom.Builder subBuilder = null;
-                                if (constraintCase_ == 2) {
-                                    subBuilder = ((context.ContextOuterClass.Constraint_Custom) constraint_).toBuilder();
-                                }
-                                constraint_ = input.readMessage(context.ContextOuterClass.Constraint_Custom.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom((context.ContextOuterClass.Constraint_Custom) constraint_);
-                                    constraint_ = subBuilder.buildPartial();
-                                }
-                                constraintCase_ = 2;
-                                break;
-                            }
-                        case 26:
-                            {
-                                context.ContextOuterClass.Constraint_Schedule.Builder subBuilder = null;
-                                if (constraintCase_ == 3) {
-                                    subBuilder = ((context.ContextOuterClass.Constraint_Schedule) constraint_).toBuilder();
-                                }
-                                constraint_ = input.readMessage(context.ContextOuterClass.Constraint_Schedule.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom((context.ContextOuterClass.Constraint_Schedule) constraint_);
-                                    constraint_ = subBuilder.buildPartial();
-                                }
-                                constraintCase_ = 3;
-                                break;
-                            }
-                        case 34:
-                            {
-                                context.ContextOuterClass.Constraint_EndPointLocation.Builder subBuilder = null;
-                                if (constraintCase_ == 4) {
-                                    subBuilder = ((context.ContextOuterClass.Constraint_EndPointLocation) constraint_).toBuilder();
-                                }
-                                constraint_ = input.readMessage(context.ContextOuterClass.Constraint_EndPointLocation.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom((context.ContextOuterClass.Constraint_EndPointLocation) constraint_);
-                                    constraint_ = subBuilder.buildPartial();
-                                }
-                                constraintCase_ = 4;
-                                break;
-                            }
-                        case 42:
-                            {
-                                context.ContextOuterClass.Constraint_EndPointPriority.Builder subBuilder = null;
-                                if (constraintCase_ == 5) {
-                                    subBuilder = ((context.ContextOuterClass.Constraint_EndPointPriority) constraint_).toBuilder();
-                                }
-                                constraint_ = input.readMessage(context.ContextOuterClass.Constraint_EndPointPriority.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom((context.ContextOuterClass.Constraint_EndPointPriority) constraint_);
-                                    constraint_ = subBuilder.buildPartial();
-                                }
-                                constraintCase_ = 5;
-                                break;
-                            }
-                        case 50:
-                            {
-                                context.ContextOuterClass.Constraint_SLA_Capacity.Builder subBuilder = null;
-                                if (constraintCase_ == 6) {
-                                    subBuilder = ((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_).toBuilder();
-                                }
-                                constraint_ = input.readMessage(context.ContextOuterClass.Constraint_SLA_Capacity.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_);
-                                    constraint_ = subBuilder.buildPartial();
-                                }
-                                constraintCase_ = 6;
-                                break;
-                            }
-                        case 58:
-                            {
-                                context.ContextOuterClass.Constraint_SLA_Latency.Builder subBuilder = null;
-                                if (constraintCase_ == 7) {
-                                    subBuilder = ((context.ContextOuterClass.Constraint_SLA_Latency) constraint_).toBuilder();
-                                }
-                                constraint_ = input.readMessage(context.ContextOuterClass.Constraint_SLA_Latency.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom((context.ContextOuterClass.Constraint_SLA_Latency) constraint_);
-                                    constraint_ = subBuilder.buildPartial();
-                                }
-                                constraintCase_ = 7;
-                                break;
-                            }
-                        case 66:
-                            {
-                                context.ContextOuterClass.Constraint_SLA_Availability.Builder subBuilder = null;
-                                if (constraintCase_ == 8) {
-                                    subBuilder = ((context.ContextOuterClass.Constraint_SLA_Availability) constraint_).toBuilder();
-                                }
-                                constraint_ = input.readMessage(context.ContextOuterClass.Constraint_SLA_Availability.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom((context.ContextOuterClass.Constraint_SLA_Availability) constraint_);
-                                    constraint_ = subBuilder.buildPartial();
-                                }
-                                constraintCase_ = 8;
-                                break;
-                            }
-                        case 74:
-                            {
-                                context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder subBuilder = null;
-                                if (constraintCase_ == 9) {
-                                    subBuilder = ((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_).toBuilder();
-                                }
-                                constraint_ = input.readMessage(context.ContextOuterClass.Constraint_SLA_Isolation_level.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_);
-                                    constraint_ = subBuilder.buildPartial();
-                                }
-                                constraintCase_ = 9;
-                                break;
-                            }
-                        case 82:
-                            {
-                                context.ContextOuterClass.Constraint_Exclusions.Builder subBuilder = null;
-                                if (constraintCase_ == 10) {
-                                    subBuilder = ((context.ContextOuterClass.Constraint_Exclusions) constraint_).toBuilder();
-                                }
-                                constraint_ = input.readMessage(context.ContextOuterClass.Constraint_Exclusions.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom((context.ContextOuterClass.Constraint_Exclusions) constraint_);
-                                    constraint_ = subBuilder.buildPartial();
-                                }
-                                constraintCase_ = 10;
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
+            return new QoSProfileId();
         }
 
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-            return context.ContextOuterClass.internal_static_context_Constraint_descriptor;
+            return context.ContextOuterClass.internal_static_context_QoSProfileId_descriptor;
         }
 
         @java.lang.Override
         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
-            return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class);
-        }
-
-        private int constraintCase_ = 0;
-
-        private java.lang.Object constraint_;
-
-        public enum ConstraintCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum {
-
-            CUSTOM(2),
-            SCHEDULE(3),
-            ENDPOINT_LOCATION(4),
-            ENDPOINT_PRIORITY(5),
-            SLA_CAPACITY(6),
-            SLA_LATENCY(7),
-            SLA_AVAILABILITY(8),
-            SLA_ISOLATION(9),
-            EXCLUSIONS(10),
-            CONSTRAINT_NOT_SET(0);
-
-            private final int value;
-
-            private ConstraintCase(int value) {
-                this.value = value;
-            }
-
-            /**
-             * @param value The number of the enum to look for.
-             * @return The enum associated with the given number.
-             * @deprecated Use {@link #forNumber(int)} instead.
-             */
-            @java.lang.Deprecated
-            public static ConstraintCase valueOf(int value) {
-                return forNumber(value);
-            }
-
-            public static ConstraintCase forNumber(int value) {
-                switch(value) {
-                    case 2:
-                        return CUSTOM;
-                    case 3:
-                        return SCHEDULE;
-                    case 4:
-                        return ENDPOINT_LOCATION;
-                    case 5:
-                        return ENDPOINT_PRIORITY;
-                    case 6:
-                        return SLA_CAPACITY;
-                    case 7:
-                        return SLA_LATENCY;
-                    case 8:
-                        return SLA_AVAILABILITY;
-                    case 9:
-                        return SLA_ISOLATION;
-                    case 10:
-                        return EXCLUSIONS;
-                    case 0:
-                        return CONSTRAINT_NOT_SET;
-                    default:
-                        return null;
-                }
-            }
-
-            public int getNumber() {
-                return this.value;
-            }
-        }
-
-        public ConstraintCase getConstraintCase() {
-            return ConstraintCase.forNumber(constraintCase_);
+            return context.ContextOuterClass.internal_static_context_QoSProfileId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.QoSProfileId.class, context.ContextOuterClass.QoSProfileId.Builder.class);
         }
 
-        public static final int ACTION_FIELD_NUMBER = 1;
+        public static final int QOS_PROFILE_ID_FIELD_NUMBER = 1;
 
-        private int action_;
+        private context.ContextOuterClass.Uuid qosProfileId_;
 
         /**
-         * .context.ConstraintActionEnum action = 1;
-         * @return The enum numeric value on the wire for action.
+         * .context.Uuid qos_profile_id = 1;
+         * @return Whether the qosProfileId field is set.
          */
         @java.lang.Override
-        public int getActionValue() {
-            return action_;
+        public boolean hasQosProfileId() {
+            return qosProfileId_ != null;
         }
 
         /**
-         * .context.ConstraintActionEnum action = 1;
-         * @return The action.
+         * .context.Uuid qos_profile_id = 1;
+         * @return The qosProfileId.
          */
         @java.lang.Override
-        public context.ContextOuterClass.ConstraintActionEnum getAction() {
-            @SuppressWarnings("deprecation")
-            context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.valueOf(action_);
-            return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result;
+        public context.ContextOuterClass.Uuid getQosProfileId() {
+            return qosProfileId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : qosProfileId_;
         }
 
-        public static final int CUSTOM_FIELD_NUMBER = 2;
-
         /**
-         * .context.Constraint_Custom custom = 2;
-         * @return Whether the custom field is set.
+         * .context.Uuid qos_profile_id = 1;
          */
         @java.lang.Override
-        public boolean hasCustom() {
-            return constraintCase_ == 2;
+        public context.ContextOuterClass.UuidOrBuilder getQosProfileIdOrBuilder() {
+            return qosProfileId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : qosProfileId_;
         }
 
-        /**
-         * .context.Constraint_Custom custom = 2;
-         * @return The custom.
-         */
+        private byte memoizedIsInitialized = -1;
+
         @java.lang.Override
-        public context.ContextOuterClass.Constraint_Custom getCustom() {
-            if (constraintCase_ == 2) {
-                return (context.ContextOuterClass.Constraint_Custom) constraint_;
-            }
-            return context.ContextOuterClass.Constraint_Custom.getDefaultInstance();
+        public final boolean isInitialized() {
+            byte isInitialized = memoizedIsInitialized;
+            if (isInitialized == 1)
+                return true;
+            if (isInitialized == 0)
+                return false;
+            memoizedIsInitialized = 1;
+            return true;
         }
 
-        /**
-         * .context.Constraint_Custom custom = 2;
-         */
         @java.lang.Override
-        public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() {
-            if (constraintCase_ == 2) {
-                return (context.ContextOuterClass.Constraint_Custom) constraint_;
+        public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+            if (qosProfileId_ != null) {
+                output.writeMessage(1, getQosProfileId());
             }
-            return context.ContextOuterClass.Constraint_Custom.getDefaultInstance();
+            getUnknownFields().writeTo(output);
         }
 
-        public static final int SCHEDULE_FIELD_NUMBER = 3;
-
-        /**
-         * .context.Constraint_Schedule schedule = 3;
-         * @return Whether the schedule field is set.
-         */
         @java.lang.Override
-        public boolean hasSchedule() {
-            return constraintCase_ == 3;
+        public int getSerializedSize() {
+            int size = memoizedSize;
+            if (size != -1)
+                return size;
+            size = 0;
+            if (qosProfileId_ != null) {
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getQosProfileId());
+            }
+            size += getUnknownFields().getSerializedSize();
+            memoizedSize = size;
+            return size;
         }
 
-        /**
-         * .context.Constraint_Schedule schedule = 3;
-         * @return The schedule.
-         */
         @java.lang.Override
-        public context.ContextOuterClass.Constraint_Schedule getSchedule() {
-            if (constraintCase_ == 3) {
-                return (context.ContextOuterClass.Constraint_Schedule) constraint_;
+        public boolean equals(final java.lang.Object obj) {
+            if (obj == this) {
+                return true;
             }
-            return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance();
+            if (!(obj instanceof context.ContextOuterClass.QoSProfileId)) {
+                return super.equals(obj);
+            }
+            context.ContextOuterClass.QoSProfileId other = (context.ContextOuterClass.QoSProfileId) obj;
+            if (hasQosProfileId() != other.hasQosProfileId())
+                return false;
+            if (hasQosProfileId()) {
+                if (!getQosProfileId().equals(other.getQosProfileId()))
+                    return false;
+            }
+            if (!getUnknownFields().equals(other.getUnknownFields()))
+                return false;
+            return true;
         }
 
-        /**
-         * .context.Constraint_Schedule schedule = 3;
-         */
         @java.lang.Override
-        public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() {
-            if (constraintCase_ == 3) {
-                return (context.ContextOuterClass.Constraint_Schedule) constraint_;
+        public int hashCode() {
+            if (memoizedHashCode != 0) {
+                return memoizedHashCode;
             }
-            return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance();
+            int hash = 41;
+            hash = (19 * hash) + getDescriptor().hashCode();
+            if (hasQosProfileId()) {
+                hash = (37 * hash) + QOS_PROFILE_ID_FIELD_NUMBER;
+                hash = (53 * hash) + getQosProfileId().hashCode();
+            }
+            hash = (29 * hash) + getUnknownFields().hashCode();
+            memoizedHashCode = hash;
+            return hash;
         }
 
-        public static final int ENDPOINT_LOCATION_FIELD_NUMBER = 4;
+        public static context.ContextOuterClass.QoSProfileId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data);
+        }
 
-        /**
-         * .context.Constraint_EndPointLocation endpoint_location = 4;
-         * @return Whether the endpointLocation field is set.
-         */
-        @java.lang.Override
-        public boolean hasEndpointLocation() {
-            return constraintCase_ == 4;
+        public static context.ContextOuterClass.QoSProfileId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data, extensionRegistry);
         }
 
-        /**
-         * .context.Constraint_EndPointLocation endpoint_location = 4;
-         * @return The endpointLocation.
-         */
-        @java.lang.Override
-        public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() {
-            if (constraintCase_ == 4) {
-                return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_;
-            }
-            return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance();
+        public static context.ContextOuterClass.QoSProfileId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data);
         }
 
-        /**
-         * .context.Constraint_EndPointLocation endpoint_location = 4;
-         */
-        @java.lang.Override
-        public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() {
-            if (constraintCase_ == 4) {
-                return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_;
-            }
-            return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance();
+        public static context.ContextOuterClass.QoSProfileId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data, extensionRegistry);
         }
 
-        public static final int ENDPOINT_PRIORITY_FIELD_NUMBER = 5;
+        public static context.ContextOuterClass.QoSProfileId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data);
+        }
 
-        /**
-         * .context.Constraint_EndPointPriority endpoint_priority = 5;
-         * @return Whether the endpointPriority field is set.
-         */
-        @java.lang.Override
-        public boolean hasEndpointPriority() {
-            return constraintCase_ == 5;
+        public static context.ContextOuterClass.QoSProfileId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data, extensionRegistry);
         }
 
-        /**
-         * .context.Constraint_EndPointPriority endpoint_priority = 5;
-         * @return The endpointPriority.
-         */
-        @java.lang.Override
-        public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() {
-            if (constraintCase_ == 5) {
-                return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_;
-            }
-            return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance();
+        public static context.ContextOuterClass.QoSProfileId parseFrom(java.io.InputStream input) throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
         }
 
-        /**
-         * .context.Constraint_EndPointPriority endpoint_priority = 5;
-         */
-        @java.lang.Override
-        public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() {
-            if (constraintCase_ == 5) {
-                return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_;
-            }
-            return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance();
+        public static context.ContextOuterClass.QoSProfileId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
         }
 
-        public static final int SLA_CAPACITY_FIELD_NUMBER = 6;
+        public static context.ContextOuterClass.QoSProfileId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+        }
 
-        /**
-         * .context.Constraint_SLA_Capacity sla_capacity = 6;
-         * @return Whether the slaCapacity field is set.
-         */
-        @java.lang.Override
-        public boolean hasSlaCapacity() {
-            return constraintCase_ == 6;
+        public static context.ContextOuterClass.QoSProfileId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
 
-        /**
-         * .context.Constraint_SLA_Capacity sla_capacity = 6;
-         * @return The slaCapacity.
-         */
-        @java.lang.Override
-        public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() {
-            if (constraintCase_ == 6) {
-                return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_;
-            }
-            return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance();
+        public static context.ContextOuterClass.QoSProfileId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+        }
+
+        public static context.ContextOuterClass.QoSProfileId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
         }
 
-        /**
-         * .context.Constraint_SLA_Capacity sla_capacity = 6;
-         */
         @java.lang.Override
-        public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() {
-            if (constraintCase_ == 6) {
-                return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_;
-            }
-            return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance();
+        public Builder newBuilderForType() {
+            return newBuilder();
         }
 
-        public static final int SLA_LATENCY_FIELD_NUMBER = 7;
+        public static Builder newBuilder() {
+            return DEFAULT_INSTANCE.toBuilder();
+        }
+
+        public static Builder newBuilder(context.ContextOuterClass.QoSProfileId prototype) {
+            return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+        }
 
-        /**
-         * .context.Constraint_SLA_Latency sla_latency = 7;
-         * @return Whether the slaLatency field is set.
-         */
         @java.lang.Override
-        public boolean hasSlaLatency() {
-            return constraintCase_ == 7;
+        public Builder toBuilder() {
+            return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
         }
 
-        /**
-         * .context.Constraint_SLA_Latency sla_latency = 7;
-         * @return The slaLatency.
-         */
         @java.lang.Override
-        public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() {
-            if (constraintCase_ == 7) {
-                return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_;
-            }
-            return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance();
+        protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+            Builder builder = new Builder(parent);
+            return builder;
         }
 
         /**
-         * .context.Constraint_SLA_Latency sla_latency = 7;
+         * Protobuf type {@code context.QoSProfileId}
          */
-        @java.lang.Override
-        public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() {
-            if (constraintCase_ == 7) {
-                return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_;
+        public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.QoSProfileId)
+        context.ContextOuterClass.QoSProfileIdOrBuilder {
+
+            public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+                return context.ContextOuterClass.internal_static_context_QoSProfileId_descriptor;
             }
-            return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance();
-        }
 
-        public static final int SLA_AVAILABILITY_FIELD_NUMBER = 8;
+            @java.lang.Override
+            protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+                return context.ContextOuterClass.internal_static_context_QoSProfileId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.QoSProfileId.class, context.ContextOuterClass.QoSProfileId.Builder.class);
+            }
+
+            // Construct using context.ContextOuterClass.QoSProfileId.newBuilder()
+            private Builder() {
+            }
+
+            private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+                super(parent);
+            }
+
+            @java.lang.Override
+            public Builder clear() {
+                super.clear();
+                bitField0_ = 0;
+                qosProfileId_ = null;
+                if (qosProfileIdBuilder_ != null) {
+                    qosProfileIdBuilder_.dispose();
+                    qosProfileIdBuilder_ = null;
+                }
+                return this;
+            }
+
+            @java.lang.Override
+            public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+                return context.ContextOuterClass.internal_static_context_QoSProfileId_descriptor;
+            }
+
+            @java.lang.Override
+            public context.ContextOuterClass.QoSProfileId getDefaultInstanceForType() {
+                return context.ContextOuterClass.QoSProfileId.getDefaultInstance();
+            }
+
+            @java.lang.Override
+            public context.ContextOuterClass.QoSProfileId build() {
+                context.ContextOuterClass.QoSProfileId result = buildPartial();
+                if (!result.isInitialized()) {
+                    throw newUninitializedMessageException(result);
+                }
+                return result;
+            }
+
+            @java.lang.Override
+            public context.ContextOuterClass.QoSProfileId buildPartial() {
+                context.ContextOuterClass.QoSProfileId result = new context.ContextOuterClass.QoSProfileId(this);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartial0(context.ContextOuterClass.QoSProfileId result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.qosProfileId_ = qosProfileIdBuilder_ == null ? qosProfileId_ : qosProfileIdBuilder_.build();
+                }
+            }
+
+            @java.lang.Override
+            public Builder mergeFrom(com.google.protobuf.Message other) {
+                if (other instanceof context.ContextOuterClass.QoSProfileId) {
+                    return mergeFrom((context.ContextOuterClass.QoSProfileId) other);
+                } else {
+                    super.mergeFrom(other);
+                    return this;
+                }
+            }
+
+            public Builder mergeFrom(context.ContextOuterClass.QoSProfileId other) {
+                if (other == context.ContextOuterClass.QoSProfileId.getDefaultInstance())
+                    return this;
+                if (other.hasQosProfileId()) {
+                    mergeQosProfileId(other.getQosProfileId());
+                }
+                this.mergeUnknownFields(other.getUnknownFields());
+                onChanged();
+                return this;
+            }
+
+            @java.lang.Override
+            public final boolean isInitialized() {
+                return true;
+            }
+
+            @java.lang.Override
+            public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
+                try {
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getQosProfileIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.unwrapIOException();
+                } finally {
+                    onChanged();
+                }
+                // finally
+                return this;
+            }
+
+            private int bitField0_;
+
+            private context.ContextOuterClass.Uuid qosProfileId_;
+
+            private com.google.protobuf.SingleFieldBuilderV3 qosProfileIdBuilder_;
+
+            /**
+             * .context.Uuid qos_profile_id = 1;
+             * @return Whether the qosProfileId field is set.
+             */
+            public boolean hasQosProfileId() {
+                return ((bitField0_ & 0x00000001) != 0);
+            }
+
+            /**
+             * .context.Uuid qos_profile_id = 1;
+             * @return The qosProfileId.
+             */
+            public context.ContextOuterClass.Uuid getQosProfileId() {
+                if (qosProfileIdBuilder_ == null) {
+                    return qosProfileId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : qosProfileId_;
+                } else {
+                    return qosProfileIdBuilder_.getMessage();
+                }
+            }
+
+            /**
+             * .context.Uuid qos_profile_id = 1;
+             */
+            public Builder setQosProfileId(context.ContextOuterClass.Uuid value) {
+                if (qosProfileIdBuilder_ == null) {
+                    if (value == null) {
+                        throw new NullPointerException();
+                    }
+                    qosProfileId_ = value;
+                } else {
+                    qosProfileIdBuilder_.setMessage(value);
+                }
+                bitField0_ |= 0x00000001;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * .context.Uuid qos_profile_id = 1;
+             */
+            public Builder setQosProfileId(context.ContextOuterClass.Uuid.Builder builderForValue) {
+                if (qosProfileIdBuilder_ == null) {
+                    qosProfileId_ = builderForValue.build();
+                } else {
+                    qosProfileIdBuilder_.setMessage(builderForValue.build());
+                }
+                bitField0_ |= 0x00000001;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * .context.Uuid qos_profile_id = 1;
+             */
+            public Builder mergeQosProfileId(context.ContextOuterClass.Uuid value) {
+                if (qosProfileIdBuilder_ == null) {
+                    if (((bitField0_ & 0x00000001) != 0) && qosProfileId_ != null && qosProfileId_ != context.ContextOuterClass.Uuid.getDefaultInstance()) {
+                        getQosProfileIdBuilder().mergeFrom(value);
+                    } else {
+                        qosProfileId_ = value;
+                    }
+                } else {
+                    qosProfileIdBuilder_.mergeFrom(value);
+                }
+                bitField0_ |= 0x00000001;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * .context.Uuid qos_profile_id = 1;
+             */
+            public Builder clearQosProfileId() {
+                bitField0_ = (bitField0_ & ~0x00000001);
+                qosProfileId_ = null;
+                if (qosProfileIdBuilder_ != null) {
+                    qosProfileIdBuilder_.dispose();
+                    qosProfileIdBuilder_ = null;
+                }
+                onChanged();
+                return this;
+            }
+
+            /**
+             * .context.Uuid qos_profile_id = 1;
+             */
+            public context.ContextOuterClass.Uuid.Builder getQosProfileIdBuilder() {
+                bitField0_ |= 0x00000001;
+                onChanged();
+                return getQosProfileIdFieldBuilder().getBuilder();
+            }
+
+            /**
+             * .context.Uuid qos_profile_id = 1;
+             */
+            public context.ContextOuterClass.UuidOrBuilder getQosProfileIdOrBuilder() {
+                if (qosProfileIdBuilder_ != null) {
+                    return qosProfileIdBuilder_.getMessageOrBuilder();
+                } else {
+                    return qosProfileId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : qosProfileId_;
+                }
+            }
+
+            /**
+             * .context.Uuid qos_profile_id = 1;
+             */
+            private com.google.protobuf.SingleFieldBuilderV3 getQosProfileIdFieldBuilder() {
+                if (qosProfileIdBuilder_ == null) {
+                    qosProfileIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getQosProfileId(), getParentForChildren(), isClean());
+                    qosProfileId_ = null;
+                }
+                return qosProfileIdBuilder_;
+            }
+
+            @java.lang.Override
+            public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+                return super.setUnknownFields(unknownFields);
+            }
+
+            @java.lang.Override
+            public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+                return super.mergeUnknownFields(unknownFields);
+            }
+            // @@protoc_insertion_point(builder_scope:context.QoSProfileId)
+        }
+
+        // @@protoc_insertion_point(class_scope:context.QoSProfileId)
+        private static final context.ContextOuterClass.QoSProfileId DEFAULT_INSTANCE;
+
+        static {
+            DEFAULT_INSTANCE = new context.ContextOuterClass.QoSProfileId();
+        }
+
+        public static context.ContextOuterClass.QoSProfileId getDefaultInstance() {
+            return DEFAULT_INSTANCE;
+        }
+
+        private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() {
+
+            @java.lang.Override
+            public QoSProfileId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
+            }
+        };
+
+        public static com.google.protobuf.Parser parser() {
+            return PARSER;
+        }
 
-        /**
-         * .context.Constraint_SLA_Availability sla_availability = 8;
-         * @return Whether the slaAvailability field is set.
-         */
         @java.lang.Override
-        public boolean hasSlaAvailability() {
-            return constraintCase_ == 8;
+        public com.google.protobuf.Parser getParserForType() {
+            return PARSER;
         }
 
-        /**
-         * .context.Constraint_SLA_Availability sla_availability = 8;
-         * @return The slaAvailability.
-         */
         @java.lang.Override
-        public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() {
-            if (constraintCase_ == 8) {
-                return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_;
-            }
-            return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance();
+        public context.ContextOuterClass.QoSProfileId getDefaultInstanceForType() {
+            return DEFAULT_INSTANCE;
         }
+    }
+
+    public interface Constraint_QoSProfileOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_QoSProfile)
+    com.google.protobuf.MessageOrBuilder {
 
         /**
-         * .context.Constraint_SLA_Availability sla_availability = 8;
+         * .context.QoSProfileId qos_profile_id = 1;
+         * @return Whether the qosProfileId field is set.
          */
-        @java.lang.Override
-        public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() {
-            if (constraintCase_ == 8) {
-                return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_;
-            }
-            return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance();
-        }
+        boolean hasQosProfileId();
 
-        public static final int SLA_ISOLATION_FIELD_NUMBER = 9;
+        /**
+         * .context.QoSProfileId qos_profile_id = 1;
+         * @return The qosProfileId.
+         */
+        context.ContextOuterClass.QoSProfileId getQosProfileId();
 
         /**
-         * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
-         * @return Whether the slaIsolation field is set.
+         * .context.QoSProfileId qos_profile_id = 1;
+         */
+        context.ContextOuterClass.QoSProfileIdOrBuilder getQosProfileIdOrBuilder();
+
+        /**
+         * string qos_profile_name = 2;
+         * @return The qosProfileName.
          */
+        java.lang.String getQosProfileName();
+
+        /**
+         * string qos_profile_name = 2;
+         * @return The bytes for qosProfileName.
+         */
+        com.google.protobuf.ByteString getQosProfileNameBytes();
+    }
+
+    /**
+     * Protobuf type {@code context.Constraint_QoSProfile}
+     */
+    public static final class Constraint_QoSProfile extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_QoSProfile)
+    Constraint_QoSProfileOrBuilder {
+
+        private static final long serialVersionUID = 0L;
+
+        // Use Constraint_QoSProfile.newBuilder() to construct.
+        private Constraint_QoSProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+            super(builder);
+        }
+
+        private Constraint_QoSProfile() {
+            qosProfileName_ = "";
+        }
+
         @java.lang.Override
-        public boolean hasSlaIsolation() {
-            return constraintCase_ == 9;
+        @SuppressWarnings({ "unused" })
+        protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+            return new Constraint_QoSProfile();
+        }
+
+        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+            return context.ContextOuterClass.internal_static_context_Constraint_QoSProfile_descriptor;
+        }
+
+        @java.lang.Override
+        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+            return context.ContextOuterClass.internal_static_context_Constraint_QoSProfile_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_QoSProfile.class, context.ContextOuterClass.Constraint_QoSProfile.Builder.class);
         }
 
+        public static final int QOS_PROFILE_ID_FIELD_NUMBER = 1;
+
+        private context.ContextOuterClass.QoSProfileId qosProfileId_;
+
         /**
-         * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
-         * @return The slaIsolation.
+         * .context.QoSProfileId qos_profile_id = 1;
+         * @return Whether the qosProfileId field is set.
          */
         @java.lang.Override
-        public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() {
-            if (constraintCase_ == 9) {
-                return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_;
-            }
-            return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance();
+        public boolean hasQosProfileId() {
+            return qosProfileId_ != null;
         }
 
         /**
-         * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+         * .context.QoSProfileId qos_profile_id = 1;
+         * @return The qosProfileId.
          */
         @java.lang.Override
-        public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() {
-            if (constraintCase_ == 9) {
-                return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_;
-            }
-            return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance();
+        public context.ContextOuterClass.QoSProfileId getQosProfileId() {
+            return qosProfileId_ == null ? context.ContextOuterClass.QoSProfileId.getDefaultInstance() : qosProfileId_;
         }
 
-        public static final int EXCLUSIONS_FIELD_NUMBER = 10;
-
         /**
-         * .context.Constraint_Exclusions exclusions = 10;
-         * @return Whether the exclusions field is set.
+         * .context.QoSProfileId qos_profile_id = 1;
          */
         @java.lang.Override
-        public boolean hasExclusions() {
-            return constraintCase_ == 10;
+        public context.ContextOuterClass.QoSProfileIdOrBuilder getQosProfileIdOrBuilder() {
+            return qosProfileId_ == null ? context.ContextOuterClass.QoSProfileId.getDefaultInstance() : qosProfileId_;
         }
 
+        public static final int QOS_PROFILE_NAME_FIELD_NUMBER = 2;
+
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object qosProfileName_ = "";
+
         /**
-         * .context.Constraint_Exclusions exclusions = 10;
-         * @return The exclusions.
+         * string qos_profile_name = 2;
+         * @return The qosProfileName.
          */
         @java.lang.Override
-        public context.ContextOuterClass.Constraint_Exclusions getExclusions() {
-            if (constraintCase_ == 10) {
-                return (context.ContextOuterClass.Constraint_Exclusions) constraint_;
+        public java.lang.String getQosProfileName() {
+            java.lang.Object ref = qosProfileName_;
+            if (ref instanceof java.lang.String) {
+                return (java.lang.String) ref;
+            } else {
+                com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+                java.lang.String s = bs.toStringUtf8();
+                qosProfileName_ = s;
+                return s;
             }
-            return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance();
         }
 
         /**
-         * .context.Constraint_Exclusions exclusions = 10;
+         * string qos_profile_name = 2;
+         * @return The bytes for qosProfileName.
          */
         @java.lang.Override
-        public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() {
-            if (constraintCase_ == 10) {
-                return (context.ContextOuterClass.Constraint_Exclusions) constraint_;
+        public com.google.protobuf.ByteString getQosProfileNameBytes() {
+            java.lang.Object ref = qosProfileName_;
+            if (ref instanceof java.lang.String) {
+                com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+                qosProfileName_ = b;
+                return b;
+            } else {
+                return (com.google.protobuf.ByteString) ref;
             }
-            return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance();
         }
 
         private byte memoizedIsInitialized = -1;
@@ -68777,37 +67782,13 @@ public final class ContextOuterClass {
 
         @java.lang.Override
         public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
-            if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) {
-                output.writeEnum(1, action_);
-            }
-            if (constraintCase_ == 2) {
-                output.writeMessage(2, (context.ContextOuterClass.Constraint_Custom) constraint_);
-            }
-            if (constraintCase_ == 3) {
-                output.writeMessage(3, (context.ContextOuterClass.Constraint_Schedule) constraint_);
-            }
-            if (constraintCase_ == 4) {
-                output.writeMessage(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_);
-            }
-            if (constraintCase_ == 5) {
-                output.writeMessage(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_);
-            }
-            if (constraintCase_ == 6) {
-                output.writeMessage(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_);
-            }
-            if (constraintCase_ == 7) {
-                output.writeMessage(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_);
-            }
-            if (constraintCase_ == 8) {
-                output.writeMessage(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_);
-            }
-            if (constraintCase_ == 9) {
-                output.writeMessage(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_);
+            if (qosProfileId_ != null) {
+                output.writeMessage(1, getQosProfileId());
             }
-            if (constraintCase_ == 10) {
-                output.writeMessage(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_);
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(qosProfileName_)) {
+                com.google.protobuf.GeneratedMessageV3.writeString(output, 2, qosProfileName_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -68816,37 +67797,13 @@ public final class ContextOuterClass {
             if (size != -1)
                 return size;
             size = 0;
-            if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) {
-                size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_);
-            }
-            if (constraintCase_ == 2) {
-                size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (context.ContextOuterClass.Constraint_Custom) constraint_);
-            }
-            if (constraintCase_ == 3) {
-                size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, (context.ContextOuterClass.Constraint_Schedule) constraint_);
-            }
-            if (constraintCase_ == 4) {
-                size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_);
-            }
-            if (constraintCase_ == 5) {
-                size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_);
-            }
-            if (constraintCase_ == 6) {
-                size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_);
-            }
-            if (constraintCase_ == 7) {
-                size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_);
-            }
-            if (constraintCase_ == 8) {
-                size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_);
-            }
-            if (constraintCase_ == 9) {
-                size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_);
+            if (qosProfileId_ != null) {
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getQosProfileId());
             }
-            if (constraintCase_ == 10) {
-                size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_);
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(qosProfileName_)) {
+                size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, qosProfileName_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -68856,55 +67813,19 @@ public final class ContextOuterClass {
             if (obj == this) {
                 return true;
             }
-            if (!(obj instanceof context.ContextOuterClass.Constraint)) {
+            if (!(obj instanceof context.ContextOuterClass.Constraint_QoSProfile)) {
                 return super.equals(obj);
             }
-            context.ContextOuterClass.Constraint other = (context.ContextOuterClass.Constraint) obj;
-            if (action_ != other.action_)
-                return false;
-            if (!getConstraintCase().equals(other.getConstraintCase()))
+            context.ContextOuterClass.Constraint_QoSProfile other = (context.ContextOuterClass.Constraint_QoSProfile) obj;
+            if (hasQosProfileId() != other.hasQosProfileId())
                 return false;
-            switch(constraintCase_) {
-                case 2:
-                    if (!getCustom().equals(other.getCustom()))
-                        return false;
-                    break;
-                case 3:
-                    if (!getSchedule().equals(other.getSchedule()))
-                        return false;
-                    break;
-                case 4:
-                    if (!getEndpointLocation().equals(other.getEndpointLocation()))
-                        return false;
-                    break;
-                case 5:
-                    if (!getEndpointPriority().equals(other.getEndpointPriority()))
-                        return false;
-                    break;
-                case 6:
-                    if (!getSlaCapacity().equals(other.getSlaCapacity()))
-                        return false;
-                    break;
-                case 7:
-                    if (!getSlaLatency().equals(other.getSlaLatency()))
-                        return false;
-                    break;
-                case 8:
-                    if (!getSlaAvailability().equals(other.getSlaAvailability()))
-                        return false;
-                    break;
-                case 9:
-                    if (!getSlaIsolation().equals(other.getSlaIsolation()))
-                        return false;
-                    break;
-                case 10:
-                    if (!getExclusions().equals(other.getExclusions()))
-                        return false;
-                    break;
-                case 0:
-                default:
+            if (hasQosProfileId()) {
+                if (!getQosProfileId().equals(other.getQosProfileId()))
+                    return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getQosProfileName().equals(other.getQosProfileName()))
+                return false;
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -68916,98 +67837,62 @@ public final class ContextOuterClass {
             }
             int hash = 41;
             hash = (19 * hash) + getDescriptor().hashCode();
-            hash = (37 * hash) + ACTION_FIELD_NUMBER;
-            hash = (53 * hash) + action_;
-            switch(constraintCase_) {
-                case 2:
-                    hash = (37 * hash) + CUSTOM_FIELD_NUMBER;
-                    hash = (53 * hash) + getCustom().hashCode();
-                    break;
-                case 3:
-                    hash = (37 * hash) + SCHEDULE_FIELD_NUMBER;
-                    hash = (53 * hash) + getSchedule().hashCode();
-                    break;
-                case 4:
-                    hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER;
-                    hash = (53 * hash) + getEndpointLocation().hashCode();
-                    break;
-                case 5:
-                    hash = (37 * hash) + ENDPOINT_PRIORITY_FIELD_NUMBER;
-                    hash = (53 * hash) + getEndpointPriority().hashCode();
-                    break;
-                case 6:
-                    hash = (37 * hash) + SLA_CAPACITY_FIELD_NUMBER;
-                    hash = (53 * hash) + getSlaCapacity().hashCode();
-                    break;
-                case 7:
-                    hash = (37 * hash) + SLA_LATENCY_FIELD_NUMBER;
-                    hash = (53 * hash) + getSlaLatency().hashCode();
-                    break;
-                case 8:
-                    hash = (37 * hash) + SLA_AVAILABILITY_FIELD_NUMBER;
-                    hash = (53 * hash) + getSlaAvailability().hashCode();
-                    break;
-                case 9:
-                    hash = (37 * hash) + SLA_ISOLATION_FIELD_NUMBER;
-                    hash = (53 * hash) + getSlaIsolation().hashCode();
-                    break;
-                case 10:
-                    hash = (37 * hash) + EXCLUSIONS_FIELD_NUMBER;
-                    hash = (53 * hash) + getExclusions().hashCode();
-                    break;
-                case 0:
-                default:
+            if (hasQosProfileId()) {
+                hash = (37 * hash) + QOS_PROFILE_ID_FIELD_NUMBER;
+                hash = (53 * hash) + getQosProfileId().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (37 * hash) + QOS_PROFILE_NAME_FIELD_NUMBER;
+            hash = (53 * hash) + getQosProfileName().hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
 
-        public static context.ContextOuterClass.Constraint parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+        public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
             return PARSER.parseFrom(data);
         }
 
-        public static context.ContextOuterClass.Constraint parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
+        public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
             return PARSER.parseFrom(data, extensionRegistry);
         }
 
-        public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException {
+        public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException {
             return PARSER.parseFrom(data);
         }
 
-        public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
+        public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
             return PARSER.parseFrom(data, extensionRegistry);
         }
 
-        public static context.ContextOuterClass.Constraint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+        public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
             return PARSER.parseFrom(data);
         }
 
-        public static context.ContextOuterClass.Constraint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
+        public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
             return PARSER.parseFrom(data, extensionRegistry);
         }
 
-        public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input) throws java.io.IOException {
+        public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(java.io.InputStream input) throws java.io.IOException {
             return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
         }
 
-        public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+        public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
             return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
         }
 
-        public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+        public static context.ContextOuterClass.Constraint_QoSProfile parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
             return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
         }
 
-        public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+        public static context.ContextOuterClass.Constraint_QoSProfile parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
             return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
         }
 
-        public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+        public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
             return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
         }
 
-        public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+        public static context.ContextOuterClass.Constraint_QoSProfile parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
             return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
         }
 
@@ -69020,7 +67905,7 @@ public final class ContextOuterClass {
             return DEFAULT_INSTANCE.toBuilder();
         }
 
-        public static Builder newBuilder(context.ContextOuterClass.Constraint prototype) {
+        public static Builder newBuilder(context.ContextOuterClass.Constraint_QoSProfile prototype) {
             return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
         }
 
@@ -69036,57 +67921,54 @@ public final class ContextOuterClass {
         }
 
         /**
-         * Protobuf type {@code context.Constraint}
+         * Protobuf type {@code context.Constraint_QoSProfile}
          */
-        public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint)
-        context.ContextOuterClass.ConstraintOrBuilder {
+        public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_QoSProfile)
+        context.ContextOuterClass.Constraint_QoSProfileOrBuilder {
 
             public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-                return context.ContextOuterClass.internal_static_context_Constraint_descriptor;
+                return context.ContextOuterClass.internal_static_context_Constraint_QoSProfile_descriptor;
             }
 
             @java.lang.Override
             protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
-                return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class);
+                return context.ContextOuterClass.internal_static_context_Constraint_QoSProfile_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_QoSProfile.class, context.ContextOuterClass.Constraint_QoSProfile.Builder.class);
             }
 
-            // Construct using context.ContextOuterClass.Constraint.newBuilder()
+            // Construct using context.ContextOuterClass.Constraint_QoSProfile.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                action_ = 0;
-                constraintCase_ = 0;
-                constraint_ = null;
+                bitField0_ = 0;
+                qosProfileId_ = null;
+                if (qosProfileIdBuilder_ != null) {
+                    qosProfileIdBuilder_.dispose();
+                    qosProfileIdBuilder_ = null;
+                }
+                qosProfileName_ = "";
                 return this;
             }
 
             @java.lang.Override
             public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
-                return context.ContextOuterClass.internal_static_context_Constraint_descriptor;
+                return context.ContextOuterClass.internal_static_context_Constraint_QoSProfile_descriptor;
             }
 
             @java.lang.Override
-            public context.ContextOuterClass.Constraint getDefaultInstanceForType() {
-                return context.ContextOuterClass.Constraint.getDefaultInstance();
+            public context.ContextOuterClass.Constraint_QoSProfile getDefaultInstanceForType() {
+                return context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance();
             }
 
             @java.lang.Override
-            public context.ContextOuterClass.Constraint build() {
-                context.ContextOuterClass.Constraint result = buildPartial();
+            public context.ContextOuterClass.Constraint_QoSProfile build() {
+                context.ContextOuterClass.Constraint_QoSProfile result = buildPartial();
                 if (!result.isInitialized()) {
                     throw newUninitializedMessageException(result);
                 }
@@ -69094,175 +67976,47 @@ public final class ContextOuterClass {
             }
 
             @java.lang.Override
-            public context.ContextOuterClass.Constraint buildPartial() {
-                context.ContextOuterClass.Constraint result = new context.ContextOuterClass.Constraint(this);
-                result.action_ = action_;
-                if (constraintCase_ == 2) {
-                    if (customBuilder_ == null) {
-                        result.constraint_ = constraint_;
-                    } else {
-                        result.constraint_ = customBuilder_.build();
-                    }
-                }
-                if (constraintCase_ == 3) {
-                    if (scheduleBuilder_ == null) {
-                        result.constraint_ = constraint_;
-                    } else {
-                        result.constraint_ = scheduleBuilder_.build();
-                    }
-                }
-                if (constraintCase_ == 4) {
-                    if (endpointLocationBuilder_ == null) {
-                        result.constraint_ = constraint_;
-                    } else {
-                        result.constraint_ = endpointLocationBuilder_.build();
-                    }
-                }
-                if (constraintCase_ == 5) {
-                    if (endpointPriorityBuilder_ == null) {
-                        result.constraint_ = constraint_;
-                    } else {
-                        result.constraint_ = endpointPriorityBuilder_.build();
-                    }
-                }
-                if (constraintCase_ == 6) {
-                    if (slaCapacityBuilder_ == null) {
-                        result.constraint_ = constraint_;
-                    } else {
-                        result.constraint_ = slaCapacityBuilder_.build();
-                    }
-                }
-                if (constraintCase_ == 7) {
-                    if (slaLatencyBuilder_ == null) {
-                        result.constraint_ = constraint_;
-                    } else {
-                        result.constraint_ = slaLatencyBuilder_.build();
-                    }
-                }
-                if (constraintCase_ == 8) {
-                    if (slaAvailabilityBuilder_ == null) {
-                        result.constraint_ = constraint_;
-                    } else {
-                        result.constraint_ = slaAvailabilityBuilder_.build();
-                    }
-                }
-                if (constraintCase_ == 9) {
-                    if (slaIsolationBuilder_ == null) {
-                        result.constraint_ = constraint_;
-                    } else {
-                        result.constraint_ = slaIsolationBuilder_.build();
-                    }
-                }
-                if (constraintCase_ == 10) {
-                    if (exclusionsBuilder_ == null) {
-                        result.constraint_ = constraint_;
-                    } else {
-                        result.constraint_ = exclusionsBuilder_.build();
-                    }
+            public context.ContextOuterClass.Constraint_QoSProfile buildPartial() {
+                context.ContextOuterClass.Constraint_QoSProfile result = new context.ContextOuterClass.Constraint_QoSProfile(this);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.constraintCase_ = constraintCase_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(context.ContextOuterClass.Constraint_QoSProfile result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.qosProfileId_ = qosProfileIdBuilder_ == null ? qosProfileId_ : qosProfileIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.qosProfileName_ = qosProfileName_;
+                }
             }
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.Message other) {
-                if (other instanceof context.ContextOuterClass.Constraint) {
-                    return mergeFrom((context.ContextOuterClass.Constraint) other);
+                if (other instanceof context.ContextOuterClass.Constraint_QoSProfile) {
+                    return mergeFrom((context.ContextOuterClass.Constraint_QoSProfile) other);
                 } else {
                     super.mergeFrom(other);
                     return this;
                 }
             }
 
-            public Builder mergeFrom(context.ContextOuterClass.Constraint other) {
-                if (other == context.ContextOuterClass.Constraint.getDefaultInstance())
+            public Builder mergeFrom(context.ContextOuterClass.Constraint_QoSProfile other) {
+                if (other == context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance())
                     return this;
-                if (other.action_ != 0) {
-                    setActionValue(other.getActionValue());
+                if (other.hasQosProfileId()) {
+                    mergeQosProfileId(other.getQosProfileId());
                 }
-                switch(other.getConstraintCase()) {
-                    case CUSTOM:
-                        {
-                            mergeCustom(other.getCustom());
-                            break;
-                        }
-                    case SCHEDULE:
-                        {
-                            mergeSchedule(other.getSchedule());
-                            break;
-                        }
-                    case ENDPOINT_LOCATION:
-                        {
-                            mergeEndpointLocation(other.getEndpointLocation());
-                            break;
-                        }
-                    case ENDPOINT_PRIORITY:
-                        {
-                            mergeEndpointPriority(other.getEndpointPriority());
-                            break;
-                        }
-                    case SLA_CAPACITY:
-                        {
-                            mergeSlaCapacity(other.getSlaCapacity());
-                            break;
-                        }
-                    case SLA_LATENCY:
-                        {
-                            mergeSlaLatency(other.getSlaLatency());
-                            break;
-                        }
-                    case SLA_AVAILABILITY:
-                        {
-                            mergeSlaAvailability(other.getSlaAvailability());
-                            break;
-                        }
-                    case SLA_ISOLATION:
-                        {
-                            mergeSlaIsolation(other.getSlaIsolation());
-                            break;
-                        }
-                    case EXCLUSIONS:
-                        {
-                            mergeExclusions(other.getExclusions());
-                            break;
-                        }
-                    case CONSTRAINT_NOT_SET:
-                        {
-                            break;
-                        }
+                if (!other.getQosProfileName().isEmpty()) {
+                    qosProfileName_ = other.qosProfileName_;
+                    bitField0_ |= 0x00000002;
+                    onChanged();
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -69274,1359 +68028,3834 @@ public final class ContextOuterClass {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                context.ContextOuterClass.Constraint parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getQosProfileIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    qosProfileName_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (context.ContextOuterClass.Constraint) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
-            private int constraintCase_ = 0;
-
-            private java.lang.Object constraint_;
-
-            public ConstraintCase getConstraintCase() {
-                return ConstraintCase.forNumber(constraintCase_);
-            }
-
-            public Builder clearConstraint() {
-                constraintCase_ = 0;
-                constraint_ = null;
-                onChanged();
-                return this;
-            }
-
-            private int action_ = 0;
-
-            /**
-             * .context.ConstraintActionEnum action = 1;
-             * @return The enum numeric value on the wire for action.
-             */
-            @java.lang.Override
-            public int getActionValue() {
-                return action_;
-            }
-
-            /**
-             * .context.ConstraintActionEnum action = 1;
-             * @param value The enum numeric value on the wire for action to set.
-             * @return This builder for chaining.
-             */
-            public Builder setActionValue(int value) {
-                action_ = value;
-                onChanged();
-                return this;
-            }
-
-            /**
-             * .context.ConstraintActionEnum action = 1;
-             * @return The action.
-             */
-            @java.lang.Override
-            public context.ContextOuterClass.ConstraintActionEnum getAction() {
-                @SuppressWarnings("deprecation")
-                context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.valueOf(action_);
-                return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result;
-            }
-
-            /**
-             * .context.ConstraintActionEnum action = 1;
-             * @param value The action to set.
-             * @return This builder for chaining.
-             */
-            public Builder setAction(context.ContextOuterClass.ConstraintActionEnum value) {
-                if (value == null) {
-                    throw new NullPointerException();
-                }
-                action_ = value.getNumber();
-                onChanged();
-                return this;
-            }
+            private int bitField0_;
 
-            /**
-             * .context.ConstraintActionEnum action = 1;
-             * @return This builder for chaining.
-             */
-            public Builder clearAction() {
-                action_ = 0;
-                onChanged();
-                return this;
-            }
+            private context.ContextOuterClass.QoSProfileId qosProfileId_;
 
-            private com.google.protobuf.SingleFieldBuilderV3 customBuilder_;
+            private com.google.protobuf.SingleFieldBuilderV3 qosProfileIdBuilder_;
 
             /**
-             * .context.Constraint_Custom custom = 2;
-             * @return Whether the custom field is set.
+             * .context.QoSProfileId qos_profile_id = 1;
+             * @return Whether the qosProfileId field is set.
              */
-            @java.lang.Override
-            public boolean hasCustom() {
-                return constraintCase_ == 2;
+            public boolean hasQosProfileId() {
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
-             * .context.Constraint_Custom custom = 2;
-             * @return The custom.
+             * .context.QoSProfileId qos_profile_id = 1;
+             * @return The qosProfileId.
              */
-            @java.lang.Override
-            public context.ContextOuterClass.Constraint_Custom getCustom() {
-                if (customBuilder_ == null) {
-                    if (constraintCase_ == 2) {
-                        return (context.ContextOuterClass.Constraint_Custom) constraint_;
-                    }
-                    return context.ContextOuterClass.Constraint_Custom.getDefaultInstance();
+            public context.ContextOuterClass.QoSProfileId getQosProfileId() {
+                if (qosProfileIdBuilder_ == null) {
+                    return qosProfileId_ == null ? context.ContextOuterClass.QoSProfileId.getDefaultInstance() : qosProfileId_;
                 } else {
-                    if (constraintCase_ == 2) {
-                        return customBuilder_.getMessage();
-                    }
-                    return context.ContextOuterClass.Constraint_Custom.getDefaultInstance();
+                    return qosProfileIdBuilder_.getMessage();
                 }
             }
 
             /**
-             * .context.Constraint_Custom custom = 2;
+             * .context.QoSProfileId qos_profile_id = 1;
              */
-            public Builder setCustom(context.ContextOuterClass.Constraint_Custom value) {
-                if (customBuilder_ == null) {
+            public Builder setQosProfileId(context.ContextOuterClass.QoSProfileId value) {
+                if (qosProfileIdBuilder_ == null) {
                     if (value == null) {
                         throw new NullPointerException();
                     }
-                    constraint_ = value;
-                    onChanged();
+                    qosProfileId_ = value;
                 } else {
-                    customBuilder_.setMessage(value);
+                    qosProfileIdBuilder_.setMessage(value);
                 }
-                constraintCase_ = 2;
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
             /**
-             * .context.Constraint_Custom custom = 2;
+             * .context.QoSProfileId qos_profile_id = 1;
              */
-            public Builder setCustom(context.ContextOuterClass.Constraint_Custom.Builder builderForValue) {
-                if (customBuilder_ == null) {
-                    constraint_ = builderForValue.build();
-                    onChanged();
+            public Builder setQosProfileId(context.ContextOuterClass.QoSProfileId.Builder builderForValue) {
+                if (qosProfileIdBuilder_ == null) {
+                    qosProfileId_ = builderForValue.build();
                 } else {
-                    customBuilder_.setMessage(builderForValue.build());
+                    qosProfileIdBuilder_.setMessage(builderForValue.build());
                 }
-                constraintCase_ = 2;
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
             /**
-             * .context.Constraint_Custom custom = 2;
+             * .context.QoSProfileId qos_profile_id = 1;
              */
-            public Builder mergeCustom(context.ContextOuterClass.Constraint_Custom value) {
-                if (customBuilder_ == null) {
-                    if (constraintCase_ == 2 && constraint_ != context.ContextOuterClass.Constraint_Custom.getDefaultInstance()) {
-                        constraint_ = context.ContextOuterClass.Constraint_Custom.newBuilder((context.ContextOuterClass.Constraint_Custom) constraint_).mergeFrom(value).buildPartial();
+            public Builder mergeQosProfileId(context.ContextOuterClass.QoSProfileId value) {
+                if (qosProfileIdBuilder_ == null) {
+                    if (((bitField0_ & 0x00000001) != 0) && qosProfileId_ != null && qosProfileId_ != context.ContextOuterClass.QoSProfileId.getDefaultInstance()) {
+                        getQosProfileIdBuilder().mergeFrom(value);
                     } else {
-                        constraint_ = value;
+                        qosProfileId_ = value;
                     }
-                    onChanged();
                 } else {
-                    if (constraintCase_ == 2) {
-                        customBuilder_.mergeFrom(value);
-                    }
-                    customBuilder_.setMessage(value);
+                    qosProfileIdBuilder_.mergeFrom(value);
                 }
-                constraintCase_ = 2;
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
             /**
-             * .context.Constraint_Custom custom = 2;
+             * .context.QoSProfileId qos_profile_id = 1;
              */
-            public Builder clearCustom() {
-                if (customBuilder_ == null) {
-                    if (constraintCase_ == 2) {
-                        constraintCase_ = 0;
-                        constraint_ = null;
-                        onChanged();
-                    }
-                } else {
-                    if (constraintCase_ == 2) {
-                        constraintCase_ = 0;
-                        constraint_ = null;
-                    }
-                    customBuilder_.clear();
+            public Builder clearQosProfileId() {
+                bitField0_ = (bitField0_ & ~0x00000001);
+                qosProfileId_ = null;
+                if (qosProfileIdBuilder_ != null) {
+                    qosProfileIdBuilder_.dispose();
+                    qosProfileIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
             /**
-             * .context.Constraint_Custom custom = 2;
+             * .context.QoSProfileId qos_profile_id = 1;
              */
-            public context.ContextOuterClass.Constraint_Custom.Builder getCustomBuilder() {
-                return getCustomFieldBuilder().getBuilder();
+            public context.ContextOuterClass.QoSProfileId.Builder getQosProfileIdBuilder() {
+                bitField0_ |= 0x00000001;
+                onChanged();
+                return getQosProfileIdFieldBuilder().getBuilder();
             }
 
             /**
-             * .context.Constraint_Custom custom = 2;
+             * .context.QoSProfileId qos_profile_id = 1;
              */
-            @java.lang.Override
-            public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() {
-                if ((constraintCase_ == 2) && (customBuilder_ != null)) {
-                    return customBuilder_.getMessageOrBuilder();
+            public context.ContextOuterClass.QoSProfileIdOrBuilder getQosProfileIdOrBuilder() {
+                if (qosProfileIdBuilder_ != null) {
+                    return qosProfileIdBuilder_.getMessageOrBuilder();
                 } else {
-                    if (constraintCase_ == 2) {
-                        return (context.ContextOuterClass.Constraint_Custom) constraint_;
-                    }
-                    return context.ContextOuterClass.Constraint_Custom.getDefaultInstance();
+                    return qosProfileId_ == null ? context.ContextOuterClass.QoSProfileId.getDefaultInstance() : qosProfileId_;
                 }
             }
 
             /**
-             * .context.Constraint_Custom custom = 2;
+             * .context.QoSProfileId qos_profile_id = 1;
              */
-            private com.google.protobuf.SingleFieldBuilderV3 getCustomFieldBuilder() {
-                if (customBuilder_ == null) {
-                    if (!(constraintCase_ == 2)) {
-                        constraint_ = context.ContextOuterClass.Constraint_Custom.getDefaultInstance();
-                    }
-                    customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Custom) constraint_, getParentForChildren(), isClean());
-                    constraint_ = null;
+            private com.google.protobuf.SingleFieldBuilderV3 getQosProfileIdFieldBuilder() {
+                if (qosProfileIdBuilder_ == null) {
+                    qosProfileIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getQosProfileId(), getParentForChildren(), isClean());
+                    qosProfileId_ = null;
                 }
-                constraintCase_ = 2;
-                onChanged();
-                ;
-                return customBuilder_;
+                return qosProfileIdBuilder_;
             }
 
-            private com.google.protobuf.SingleFieldBuilderV3 scheduleBuilder_;
-
-            /**
-             * .context.Constraint_Schedule schedule = 3;
-             * @return Whether the schedule field is set.
-             */
-            @java.lang.Override
-            public boolean hasSchedule() {
-                return constraintCase_ == 3;
-            }
+            private java.lang.Object qosProfileName_ = "";
 
             /**
-             * .context.Constraint_Schedule schedule = 3;
-             * @return The schedule.
+             * string qos_profile_name = 2;
+             * @return The qosProfileName.
              */
-            @java.lang.Override
-            public context.ContextOuterClass.Constraint_Schedule getSchedule() {
-                if (scheduleBuilder_ == null) {
-                    if (constraintCase_ == 3) {
-                        return (context.ContextOuterClass.Constraint_Schedule) constraint_;
-                    }
-                    return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance();
+            public java.lang.String getQosProfileName() {
+                java.lang.Object ref = qosProfileName_;
+                if (!(ref instanceof java.lang.String)) {
+                    com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+                    java.lang.String s = bs.toStringUtf8();
+                    qosProfileName_ = s;
+                    return s;
                 } else {
-                    if (constraintCase_ == 3) {
-                        return scheduleBuilder_.getMessage();
-                    }
-                    return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance();
+                    return (java.lang.String) ref;
                 }
             }
 
             /**
-             * .context.Constraint_Schedule schedule = 3;
+             * string qos_profile_name = 2;
+             * @return The bytes for qosProfileName.
              */
-            public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule value) {
-                if (scheduleBuilder_ == null) {
-                    if (value == null) {
-                        throw new NullPointerException();
-                    }
-                    constraint_ = value;
-                    onChanged();
+            public com.google.protobuf.ByteString getQosProfileNameBytes() {
+                java.lang.Object ref = qosProfileName_;
+                if (ref instanceof String) {
+                    com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+                    qosProfileName_ = b;
+                    return b;
                 } else {
-                    scheduleBuilder_.setMessage(value);
+                    return (com.google.protobuf.ByteString) ref;
                 }
-                constraintCase_ = 3;
-                return this;
             }
 
             /**
-             * .context.Constraint_Schedule schedule = 3;
+             * string qos_profile_name = 2;
+             * @param value The qosProfileName to set.
+             * @return This builder for chaining.
              */
-            public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule.Builder builderForValue) {
-                if (scheduleBuilder_ == null) {
-                    constraint_ = builderForValue.build();
-                    onChanged();
-                } else {
-                    scheduleBuilder_.setMessage(builderForValue.build());
+            public Builder setQosProfileName(java.lang.String value) {
+                if (value == null) {
+                    throw new NullPointerException();
                 }
-                constraintCase_ = 3;
+                qosProfileName_ = value;
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
             /**
-             * .context.Constraint_Schedule schedule = 3;
+             * string qos_profile_name = 2;
+             * @return This builder for chaining.
              */
-            public Builder mergeSchedule(context.ContextOuterClass.Constraint_Schedule value) {
-                if (scheduleBuilder_ == null) {
-                    if (constraintCase_ == 3 && constraint_ != context.ContextOuterClass.Constraint_Schedule.getDefaultInstance()) {
-                        constraint_ = context.ContextOuterClass.Constraint_Schedule.newBuilder((context.ContextOuterClass.Constraint_Schedule) constraint_).mergeFrom(value).buildPartial();
-                    } else {
-                        constraint_ = value;
-                    }
-                    onChanged();
-                } else {
-                    if (constraintCase_ == 3) {
-                        scheduleBuilder_.mergeFrom(value);
-                    }
-                    scheduleBuilder_.setMessage(value);
-                }
-                constraintCase_ = 3;
+            public Builder clearQosProfileName() {
+                qosProfileName_ = getDefaultInstance().getQosProfileName();
+                bitField0_ = (bitField0_ & ~0x00000002);
+                onChanged();
                 return this;
             }
 
             /**
-             * .context.Constraint_Schedule schedule = 3;
+             * string qos_profile_name = 2;
+             * @param value The bytes for qosProfileName to set.
+             * @return This builder for chaining.
              */
-            public Builder clearSchedule() {
-                if (scheduleBuilder_ == null) {
-                    if (constraintCase_ == 3) {
-                        constraintCase_ = 0;
-                        constraint_ = null;
-                        onChanged();
-                    }
-                } else {
-                    if (constraintCase_ == 3) {
-                        constraintCase_ = 0;
-                        constraint_ = null;
-                    }
-                    scheduleBuilder_.clear();
+            public Builder setQosProfileNameBytes(com.google.protobuf.ByteString value) {
+                if (value == null) {
+                    throw new NullPointerException();
                 }
+                checkByteStringIsUtf8(value);
+                qosProfileName_ = value;
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
-            /**
-             * .context.Constraint_Schedule schedule = 3;
-             */
-            public context.ContextOuterClass.Constraint_Schedule.Builder getScheduleBuilder() {
-                return getScheduleFieldBuilder().getBuilder();
+            @java.lang.Override
+            public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+                return super.setUnknownFields(unknownFields);
             }
 
-            /**
-             * .context.Constraint_Schedule schedule = 3;
-             */
             @java.lang.Override
-            public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() {
-                if ((constraintCase_ == 3) && (scheduleBuilder_ != null)) {
-                    return scheduleBuilder_.getMessageOrBuilder();
-                } else {
-                    if (constraintCase_ == 3) {
-                        return (context.ContextOuterClass.Constraint_Schedule) constraint_;
-                    }
-                    return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance();
-                }
+            public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+                return super.mergeUnknownFields(unknownFields);
             }
+            // @@protoc_insertion_point(builder_scope:context.Constraint_QoSProfile)
+        }
 
-            /**
-             * .context.Constraint_Schedule schedule = 3;
-             */
-            private com.google.protobuf.SingleFieldBuilderV3 getScheduleFieldBuilder() {
-                if (scheduleBuilder_ == null) {
-                    if (!(constraintCase_ == 3)) {
-                        constraint_ = context.ContextOuterClass.Constraint_Schedule.getDefaultInstance();
-                    }
-                    scheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Schedule) constraint_, getParentForChildren(), isClean());
-                    constraint_ = null;
-                }
-                constraintCase_ = 3;
-                onChanged();
-                ;
-                return scheduleBuilder_;
-            }
+        // @@protoc_insertion_point(class_scope:context.Constraint_QoSProfile)
+        private static final context.ContextOuterClass.Constraint_QoSProfile DEFAULT_INSTANCE;
 
-            private com.google.protobuf.SingleFieldBuilderV3 endpointLocationBuilder_;
+        static {
+            DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_QoSProfile();
+        }
 
-            /**
-             * .context.Constraint_EndPointLocation endpoint_location = 4;
-             * @return Whether the endpointLocation field is set.
-             */
-            @java.lang.Override
-            public boolean hasEndpointLocation() {
-                return constraintCase_ == 4;
-            }
+        public static context.ContextOuterClass.Constraint_QoSProfile getDefaultInstance() {
+            return DEFAULT_INSTANCE;
+        }
 
-            /**
-             * .context.Constraint_EndPointLocation endpoint_location = 4;
-             * @return The endpointLocation.
-             */
-            @java.lang.Override
-            public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() {
-                if (endpointLocationBuilder_ == null) {
-                    if (constraintCase_ == 4) {
-                        return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_;
-                    }
-                    return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance();
-                } else {
-                    if (constraintCase_ == 4) {
-                        return endpointLocationBuilder_.getMessage();
-                    }
-                    return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance();
-                }
-            }
+        private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() {
 
-            /**
-             * .context.Constraint_EndPointLocation endpoint_location = 4;
-             */
-            public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) {
-                if (endpointLocationBuilder_ == null) {
-                    if (value == null) {
-                        throw new NullPointerException();
-                    }
-                    constraint_ = value;
-                    onChanged();
-                } else {
-                    endpointLocationBuilder_.setMessage(value);
+            @java.lang.Override
+            public Constraint_QoSProfile parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
                 }
-                constraintCase_ = 4;
-                return this;
+                return builder.buildPartial();
             }
+        };
 
-            /**
-             * .context.Constraint_EndPointLocation endpoint_location = 4;
-             */
-            public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation.Builder builderForValue) {
-                if (endpointLocationBuilder_ == null) {
-                    constraint_ = builderForValue.build();
-                    onChanged();
-                } else {
-                    endpointLocationBuilder_.setMessage(builderForValue.build());
-                }
-                constraintCase_ = 4;
-                return this;
-            }
+        public static com.google.protobuf.Parser parser() {
+            return PARSER;
+        }
 
-            /**
-             * .context.Constraint_EndPointLocation endpoint_location = 4;
-             */
-            public Builder mergeEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) {
-                if (endpointLocationBuilder_ == null) {
-                    if (constraintCase_ == 4 && constraint_ != context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance()) {
-                        constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.newBuilder((context.ContextOuterClass.Constraint_EndPointLocation) constraint_).mergeFrom(value).buildPartial();
-                    } else {
-                        constraint_ = value;
-                    }
-                    onChanged();
-                } else {
-                    if (constraintCase_ == 4) {
-                        endpointLocationBuilder_.mergeFrom(value);
-                    }
-                    endpointLocationBuilder_.setMessage(value);
-                }
-                constraintCase_ = 4;
-                return this;
-            }
+        @java.lang.Override
+        public com.google.protobuf.Parser getParserForType() {
+            return PARSER;
+        }
 
-            /**
-             * .context.Constraint_EndPointLocation endpoint_location = 4;
-             */
-            public Builder clearEndpointLocation() {
-                if (endpointLocationBuilder_ == null) {
-                    if (constraintCase_ == 4) {
-                        constraintCase_ = 0;
-                        constraint_ = null;
-                        onChanged();
-                    }
-                } else {
-                    if (constraintCase_ == 4) {
-                        constraintCase_ = 0;
-                        constraint_ = null;
-                    }
-                    endpointLocationBuilder_.clear();
-                }
-                return this;
-            }
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_QoSProfile getDefaultInstanceForType() {
+            return DEFAULT_INSTANCE;
+        }
+    }
 
-            /**
-             * .context.Constraint_EndPointLocation endpoint_location = 4;
-             */
-            public context.ContextOuterClass.Constraint_EndPointLocation.Builder getEndpointLocationBuilder() {
-                return getEndpointLocationFieldBuilder().getBuilder();
-            }
+    public interface ConstraintOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint)
+    com.google.protobuf.MessageOrBuilder {
 
-            /**
-             * .context.Constraint_EndPointLocation endpoint_location = 4;
-             */
-            @java.lang.Override
-            public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() {
-                if ((constraintCase_ == 4) && (endpointLocationBuilder_ != null)) {
-                    return endpointLocationBuilder_.getMessageOrBuilder();
-                } else {
-                    if (constraintCase_ == 4) {
-                        return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_;
-                    }
-                    return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance();
-                }
-            }
+        /**
+         * .context.ConstraintActionEnum action = 1;
+         * @return The enum numeric value on the wire for action.
+         */
+        int getActionValue();
 
-            /**
-             * .context.Constraint_EndPointLocation endpoint_location = 4;
-             */
-            private com.google.protobuf.SingleFieldBuilderV3 getEndpointLocationFieldBuilder() {
-                if (endpointLocationBuilder_ == null) {
-                    if (!(constraintCase_ == 4)) {
-                        constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance();
-                    }
-                    endpointLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_EndPointLocation) constraint_, getParentForChildren(), isClean());
-                    constraint_ = null;
-                }
-                constraintCase_ = 4;
-                onChanged();
-                ;
-                return endpointLocationBuilder_;
-            }
+        /**
+         * .context.ConstraintActionEnum action = 1;
+         * @return The action.
+         */
+        context.ContextOuterClass.ConstraintActionEnum getAction();
 
-            private com.google.protobuf.SingleFieldBuilderV3 endpointPriorityBuilder_;
+        /**
+         * .context.Constraint_Custom custom = 2;
+         * @return Whether the custom field is set.
+         */
+        boolean hasCustom();
 
-            /**
-             * .context.Constraint_EndPointPriority endpoint_priority = 5;
-             * @return Whether the endpointPriority field is set.
+        /**
+         * .context.Constraint_Custom custom = 2;
+         * @return The custom.
+         */
+        context.ContextOuterClass.Constraint_Custom getCustom();
+
+        /**
+         * .context.Constraint_Custom custom = 2;
+         */
+        context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder();
+
+        /**
+         * .context.Constraint_Schedule schedule = 3;
+         * @return Whether the schedule field is set.
+         */
+        boolean hasSchedule();
+
+        /**
+         * .context.Constraint_Schedule schedule = 3;
+         * @return The schedule.
+         */
+        context.ContextOuterClass.Constraint_Schedule getSchedule();
+
+        /**
+         * .context.Constraint_Schedule schedule = 3;
+         */
+        context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder();
+
+        /**
+         * .context.Constraint_EndPointLocation endpoint_location = 4;
+         * @return Whether the endpointLocation field is set.
+         */
+        boolean hasEndpointLocation();
+
+        /**
+         * .context.Constraint_EndPointLocation endpoint_location = 4;
+         * @return The endpointLocation.
+         */
+        context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation();
+
+        /**
+         * .context.Constraint_EndPointLocation endpoint_location = 4;
+         */
+        context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder();
+
+        /**
+         * .context.Constraint_EndPointPriority endpoint_priority = 5;
+         * @return Whether the endpointPriority field is set.
+         */
+        boolean hasEndpointPriority();
+
+        /**
+         * .context.Constraint_EndPointPriority endpoint_priority = 5;
+         * @return The endpointPriority.
+         */
+        context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority();
+
+        /**
+         * .context.Constraint_EndPointPriority endpoint_priority = 5;
+         */
+        context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder();
+
+        /**
+         * .context.Constraint_SLA_Capacity sla_capacity = 6;
+         * @return Whether the slaCapacity field is set.
+         */
+        boolean hasSlaCapacity();
+
+        /**
+         * .context.Constraint_SLA_Capacity sla_capacity = 6;
+         * @return The slaCapacity.
+         */
+        context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity();
+
+        /**
+         * .context.Constraint_SLA_Capacity sla_capacity = 6;
+         */
+        context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder();
+
+        /**
+         * .context.Constraint_SLA_Latency sla_latency = 7;
+         * @return Whether the slaLatency field is set.
+         */
+        boolean hasSlaLatency();
+
+        /**
+         * .context.Constraint_SLA_Latency sla_latency = 7;
+         * @return The slaLatency.
+         */
+        context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency();
+
+        /**
+         * .context.Constraint_SLA_Latency sla_latency = 7;
+         */
+        context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder();
+
+        /**
+         * .context.Constraint_SLA_Availability sla_availability = 8;
+         * @return Whether the slaAvailability field is set.
+         */
+        boolean hasSlaAvailability();
+
+        /**
+         * .context.Constraint_SLA_Availability sla_availability = 8;
+         * @return The slaAvailability.
+         */
+        context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability();
+
+        /**
+         * .context.Constraint_SLA_Availability sla_availability = 8;
+         */
+        context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder();
+
+        /**
+         * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+         * @return Whether the slaIsolation field is set.
+         */
+        boolean hasSlaIsolation();
+
+        /**
+         * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+         * @return The slaIsolation.
+         */
+        context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation();
+
+        /**
+         * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+         */
+        context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder();
+
+        /**
+         * .context.Constraint_Exclusions exclusions = 10;
+         * @return Whether the exclusions field is set.
+         */
+        boolean hasExclusions();
+
+        /**
+         * .context.Constraint_Exclusions exclusions = 10;
+         * @return The exclusions.
+         */
+        context.ContextOuterClass.Constraint_Exclusions getExclusions();
+
+        /**
+         * .context.Constraint_Exclusions exclusions = 10;
+         */
+        context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder();
+
+        /**
+         * .context.Constraint_QoSProfile qos_profile = 11;
+         * @return Whether the qosProfile field is set.
+         */
+        boolean hasQosProfile();
+
+        /**
+         * .context.Constraint_QoSProfile qos_profile = 11;
+         * @return The qosProfile.
+         */
+        context.ContextOuterClass.Constraint_QoSProfile getQosProfile();
+
+        /**
+         * .context.Constraint_QoSProfile qos_profile = 11;
+         */
+        context.ContextOuterClass.Constraint_QoSProfileOrBuilder getQosProfileOrBuilder();
+
+        context.ContextOuterClass.Constraint.ConstraintCase getConstraintCase();
+    }
+
+    /**
+     * Protobuf type {@code context.Constraint}
+     */
+    public static final class Constraint extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint)
+    ConstraintOrBuilder {
+
+        private static final long serialVersionUID = 0L;
+
+        // Use Constraint.newBuilder() to construct.
+        private Constraint(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+            super(builder);
+        }
+
+        private Constraint() {
+            action_ = 0;
+        }
+
+        @java.lang.Override
+        @SuppressWarnings({ "unused" })
+        protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+            return new Constraint();
+        }
+
+        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+            return context.ContextOuterClass.internal_static_context_Constraint_descriptor;
+        }
+
+        @java.lang.Override
+        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+            return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class);
+        }
+
+        private int constraintCase_ = 0;
+
+        @SuppressWarnings("serial")
+        private java.lang.Object constraint_;
+
+        public enum ConstraintCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum {
+
+            CUSTOM(2),
+            SCHEDULE(3),
+            ENDPOINT_LOCATION(4),
+            ENDPOINT_PRIORITY(5),
+            SLA_CAPACITY(6),
+            SLA_LATENCY(7),
+            SLA_AVAILABILITY(8),
+            SLA_ISOLATION(9),
+            EXCLUSIONS(10),
+            QOS_PROFILE(11),
+            CONSTRAINT_NOT_SET(0);
+
+            private final int value;
+
+            private ConstraintCase(int value) {
+                this.value = value;
+            }
+
+            /**
+             * @param value The number of the enum to look for.
+             * @return The enum associated with the given number.
+             * @deprecated Use {@link #forNumber(int)} instead.
+             */
+            @java.lang.Deprecated
+            public static ConstraintCase valueOf(int value) {
+                return forNumber(value);
+            }
+
+            public static ConstraintCase forNumber(int value) {
+                switch(value) {
+                    case 2:
+                        return CUSTOM;
+                    case 3:
+                        return SCHEDULE;
+                    case 4:
+                        return ENDPOINT_LOCATION;
+                    case 5:
+                        return ENDPOINT_PRIORITY;
+                    case 6:
+                        return SLA_CAPACITY;
+                    case 7:
+                        return SLA_LATENCY;
+                    case 8:
+                        return SLA_AVAILABILITY;
+                    case 9:
+                        return SLA_ISOLATION;
+                    case 10:
+                        return EXCLUSIONS;
+                    case 11:
+                        return QOS_PROFILE;
+                    case 0:
+                        return CONSTRAINT_NOT_SET;
+                    default:
+                        return null;
+                }
+            }
+
+            public int getNumber() {
+                return this.value;
+            }
+        }
+
+        public ConstraintCase getConstraintCase() {
+            return ConstraintCase.forNumber(constraintCase_);
+        }
+
+        public static final int ACTION_FIELD_NUMBER = 1;
+
+        private int action_ = 0;
+
+        /**
+         * .context.ConstraintActionEnum action = 1;
+         * @return The enum numeric value on the wire for action.
+         */
+        @java.lang.Override
+        public int getActionValue() {
+            return action_;
+        }
+
+        /**
+         * .context.ConstraintActionEnum action = 1;
+         * @return The action.
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.ConstraintActionEnum getAction() {
+            context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.forNumber(action_);
+            return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result;
+        }
+
+        public static final int CUSTOM_FIELD_NUMBER = 2;
+
+        /**
+         * .context.Constraint_Custom custom = 2;
+         * @return Whether the custom field is set.
+         */
+        @java.lang.Override
+        public boolean hasCustom() {
+            return constraintCase_ == 2;
+        }
+
+        /**
+         * .context.Constraint_Custom custom = 2;
+         * @return The custom.
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_Custom getCustom() {
+            if (constraintCase_ == 2) {
+                return (context.ContextOuterClass.Constraint_Custom) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_Custom.getDefaultInstance();
+        }
+
+        /**
+         * .context.Constraint_Custom custom = 2;
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() {
+            if (constraintCase_ == 2) {
+                return (context.ContextOuterClass.Constraint_Custom) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_Custom.getDefaultInstance();
+        }
+
+        public static final int SCHEDULE_FIELD_NUMBER = 3;
+
+        /**
+         * .context.Constraint_Schedule schedule = 3;
+         * @return Whether the schedule field is set.
+         */
+        @java.lang.Override
+        public boolean hasSchedule() {
+            return constraintCase_ == 3;
+        }
+
+        /**
+         * .context.Constraint_Schedule schedule = 3;
+         * @return The schedule.
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_Schedule getSchedule() {
+            if (constraintCase_ == 3) {
+                return (context.ContextOuterClass.Constraint_Schedule) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance();
+        }
+
+        /**
+         * .context.Constraint_Schedule schedule = 3;
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() {
+            if (constraintCase_ == 3) {
+                return (context.ContextOuterClass.Constraint_Schedule) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance();
+        }
+
+        public static final int ENDPOINT_LOCATION_FIELD_NUMBER = 4;
+
+        /**
+         * .context.Constraint_EndPointLocation endpoint_location = 4;
+         * @return Whether the endpointLocation field is set.
+         */
+        @java.lang.Override
+        public boolean hasEndpointLocation() {
+            return constraintCase_ == 4;
+        }
+
+        /**
+         * .context.Constraint_EndPointLocation endpoint_location = 4;
+         * @return The endpointLocation.
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() {
+            if (constraintCase_ == 4) {
+                return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance();
+        }
+
+        /**
+         * .context.Constraint_EndPointLocation endpoint_location = 4;
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() {
+            if (constraintCase_ == 4) {
+                return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance();
+        }
+
+        public static final int ENDPOINT_PRIORITY_FIELD_NUMBER = 5;
+
+        /**
+         * .context.Constraint_EndPointPriority endpoint_priority = 5;
+         * @return Whether the endpointPriority field is set.
+         */
+        @java.lang.Override
+        public boolean hasEndpointPriority() {
+            return constraintCase_ == 5;
+        }
+
+        /**
+         * .context.Constraint_EndPointPriority endpoint_priority = 5;
+         * @return The endpointPriority.
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() {
+            if (constraintCase_ == 5) {
+                return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance();
+        }
+
+        /**
+         * .context.Constraint_EndPointPriority endpoint_priority = 5;
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() {
+            if (constraintCase_ == 5) {
+                return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance();
+        }
+
+        public static final int SLA_CAPACITY_FIELD_NUMBER = 6;
+
+        /**
+         * .context.Constraint_SLA_Capacity sla_capacity = 6;
+         * @return Whether the slaCapacity field is set.
+         */
+        @java.lang.Override
+        public boolean hasSlaCapacity() {
+            return constraintCase_ == 6;
+        }
+
+        /**
+         * .context.Constraint_SLA_Capacity sla_capacity = 6;
+         * @return The slaCapacity.
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() {
+            if (constraintCase_ == 6) {
+                return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance();
+        }
+
+        /**
+         * .context.Constraint_SLA_Capacity sla_capacity = 6;
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() {
+            if (constraintCase_ == 6) {
+                return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance();
+        }
+
+        public static final int SLA_LATENCY_FIELD_NUMBER = 7;
+
+        /**
+         * .context.Constraint_SLA_Latency sla_latency = 7;
+         * @return Whether the slaLatency field is set.
+         */
+        @java.lang.Override
+        public boolean hasSlaLatency() {
+            return constraintCase_ == 7;
+        }
+
+        /**
+         * .context.Constraint_SLA_Latency sla_latency = 7;
+         * @return The slaLatency.
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() {
+            if (constraintCase_ == 7) {
+                return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance();
+        }
+
+        /**
+         * .context.Constraint_SLA_Latency sla_latency = 7;
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() {
+            if (constraintCase_ == 7) {
+                return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance();
+        }
+
+        public static final int SLA_AVAILABILITY_FIELD_NUMBER = 8;
+
+        /**
+         * .context.Constraint_SLA_Availability sla_availability = 8;
+         * @return Whether the slaAvailability field is set.
+         */
+        @java.lang.Override
+        public boolean hasSlaAvailability() {
+            return constraintCase_ == 8;
+        }
+
+        /**
+         * .context.Constraint_SLA_Availability sla_availability = 8;
+         * @return The slaAvailability.
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() {
+            if (constraintCase_ == 8) {
+                return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance();
+        }
+
+        /**
+         * .context.Constraint_SLA_Availability sla_availability = 8;
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() {
+            if (constraintCase_ == 8) {
+                return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance();
+        }
+
+        public static final int SLA_ISOLATION_FIELD_NUMBER = 9;
+
+        /**
+         * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+         * @return Whether the slaIsolation field is set.
+         */
+        @java.lang.Override
+        public boolean hasSlaIsolation() {
+            return constraintCase_ == 9;
+        }
+
+        /**
+         * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+         * @return The slaIsolation.
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() {
+            if (constraintCase_ == 9) {
+                return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance();
+        }
+
+        /**
+         * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() {
+            if (constraintCase_ == 9) {
+                return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance();
+        }
+
+        public static final int EXCLUSIONS_FIELD_NUMBER = 10;
+
+        /**
+         * .context.Constraint_Exclusions exclusions = 10;
+         * @return Whether the exclusions field is set.
+         */
+        @java.lang.Override
+        public boolean hasExclusions() {
+            return constraintCase_ == 10;
+        }
+
+        /**
+         * .context.Constraint_Exclusions exclusions = 10;
+         * @return The exclusions.
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_Exclusions getExclusions() {
+            if (constraintCase_ == 10) {
+                return (context.ContextOuterClass.Constraint_Exclusions) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance();
+        }
+
+        /**
+         * .context.Constraint_Exclusions exclusions = 10;
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() {
+            if (constraintCase_ == 10) {
+                return (context.ContextOuterClass.Constraint_Exclusions) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance();
+        }
+
+        public static final int QOS_PROFILE_FIELD_NUMBER = 11;
+
+        /**
+         * .context.Constraint_QoSProfile qos_profile = 11;
+         * @return Whether the qosProfile field is set.
+         */
+        @java.lang.Override
+        public boolean hasQosProfile() {
+            return constraintCase_ == 11;
+        }
+
+        /**
+         * .context.Constraint_QoSProfile qos_profile = 11;
+         * @return The qosProfile.
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_QoSProfile getQosProfile() {
+            if (constraintCase_ == 11) {
+                return (context.ContextOuterClass.Constraint_QoSProfile) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance();
+        }
+
+        /**
+         * .context.Constraint_QoSProfile qos_profile = 11;
+         */
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint_QoSProfileOrBuilder getQosProfileOrBuilder() {
+            if (constraintCase_ == 11) {
+                return (context.ContextOuterClass.Constraint_QoSProfile) constraint_;
+            }
+            return context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance();
+        }
+
+        private byte memoizedIsInitialized = -1;
+
+        @java.lang.Override
+        public final boolean isInitialized() {
+            byte isInitialized = memoizedIsInitialized;
+            if (isInitialized == 1)
+                return true;
+            if (isInitialized == 0)
+                return false;
+            memoizedIsInitialized = 1;
+            return true;
+        }
+
+        @java.lang.Override
+        public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+            if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) {
+                output.writeEnum(1, action_);
+            }
+            if (constraintCase_ == 2) {
+                output.writeMessage(2, (context.ContextOuterClass.Constraint_Custom) constraint_);
+            }
+            if (constraintCase_ == 3) {
+                output.writeMessage(3, (context.ContextOuterClass.Constraint_Schedule) constraint_);
+            }
+            if (constraintCase_ == 4) {
+                output.writeMessage(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_);
+            }
+            if (constraintCase_ == 5) {
+                output.writeMessage(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_);
+            }
+            if (constraintCase_ == 6) {
+                output.writeMessage(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_);
+            }
+            if (constraintCase_ == 7) {
+                output.writeMessage(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_);
+            }
+            if (constraintCase_ == 8) {
+                output.writeMessage(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_);
+            }
+            if (constraintCase_ == 9) {
+                output.writeMessage(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_);
+            }
+            if (constraintCase_ == 10) {
+                output.writeMessage(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_);
+            }
+            if (constraintCase_ == 11) {
+                output.writeMessage(11, (context.ContextOuterClass.Constraint_QoSProfile) constraint_);
+            }
+            getUnknownFields().writeTo(output);
+        }
+
+        @java.lang.Override
+        public int getSerializedSize() {
+            int size = memoizedSize;
+            if (size != -1)
+                return size;
+            size = 0;
+            if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) {
+                size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_);
+            }
+            if (constraintCase_ == 2) {
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (context.ContextOuterClass.Constraint_Custom) constraint_);
+            }
+            if (constraintCase_ == 3) {
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, (context.ContextOuterClass.Constraint_Schedule) constraint_);
+            }
+            if (constraintCase_ == 4) {
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_);
+            }
+            if (constraintCase_ == 5) {
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_);
+            }
+            if (constraintCase_ == 6) {
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_);
+            }
+            if (constraintCase_ == 7) {
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_);
+            }
+            if (constraintCase_ == 8) {
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_);
+            }
+            if (constraintCase_ == 9) {
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_);
+            }
+            if (constraintCase_ == 10) {
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_);
+            }
+            if (constraintCase_ == 11) {
+                size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, (context.ContextOuterClass.Constraint_QoSProfile) constraint_);
+            }
+            size += getUnknownFields().getSerializedSize();
+            memoizedSize = size;
+            return size;
+        }
+
+        @java.lang.Override
+        public boolean equals(final java.lang.Object obj) {
+            if (obj == this) {
+                return true;
+            }
+            if (!(obj instanceof context.ContextOuterClass.Constraint)) {
+                return super.equals(obj);
+            }
+            context.ContextOuterClass.Constraint other = (context.ContextOuterClass.Constraint) obj;
+            if (action_ != other.action_)
+                return false;
+            if (!getConstraintCase().equals(other.getConstraintCase()))
+                return false;
+            switch(constraintCase_) {
+                case 2:
+                    if (!getCustom().equals(other.getCustom()))
+                        return false;
+                    break;
+                case 3:
+                    if (!getSchedule().equals(other.getSchedule()))
+                        return false;
+                    break;
+                case 4:
+                    if (!getEndpointLocation().equals(other.getEndpointLocation()))
+                        return false;
+                    break;
+                case 5:
+                    if (!getEndpointPriority().equals(other.getEndpointPriority()))
+                        return false;
+                    break;
+                case 6:
+                    if (!getSlaCapacity().equals(other.getSlaCapacity()))
+                        return false;
+                    break;
+                case 7:
+                    if (!getSlaLatency().equals(other.getSlaLatency()))
+                        return false;
+                    break;
+                case 8:
+                    if (!getSlaAvailability().equals(other.getSlaAvailability()))
+                        return false;
+                    break;
+                case 9:
+                    if (!getSlaIsolation().equals(other.getSlaIsolation()))
+                        return false;
+                    break;
+                case 10:
+                    if (!getExclusions().equals(other.getExclusions()))
+                        return false;
+                    break;
+                case 11:
+                    if (!getQosProfile().equals(other.getQosProfile()))
+                        return false;
+                    break;
+                case 0:
+                default:
+            }
+            if (!getUnknownFields().equals(other.getUnknownFields()))
+                return false;
+            return true;
+        }
+
+        @java.lang.Override
+        public int hashCode() {
+            if (memoizedHashCode != 0) {
+                return memoizedHashCode;
+            }
+            int hash = 41;
+            hash = (19 * hash) + getDescriptor().hashCode();
+            hash = (37 * hash) + ACTION_FIELD_NUMBER;
+            hash = (53 * hash) + action_;
+            switch(constraintCase_) {
+                case 2:
+                    hash = (37 * hash) + CUSTOM_FIELD_NUMBER;
+                    hash = (53 * hash) + getCustom().hashCode();
+                    break;
+                case 3:
+                    hash = (37 * hash) + SCHEDULE_FIELD_NUMBER;
+                    hash = (53 * hash) + getSchedule().hashCode();
+                    break;
+                case 4:
+                    hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER;
+                    hash = (53 * hash) + getEndpointLocation().hashCode();
+                    break;
+                case 5:
+                    hash = (37 * hash) + ENDPOINT_PRIORITY_FIELD_NUMBER;
+                    hash = (53 * hash) + getEndpointPriority().hashCode();
+                    break;
+                case 6:
+                    hash = (37 * hash) + SLA_CAPACITY_FIELD_NUMBER;
+                    hash = (53 * hash) + getSlaCapacity().hashCode();
+                    break;
+                case 7:
+                    hash = (37 * hash) + SLA_LATENCY_FIELD_NUMBER;
+                    hash = (53 * hash) + getSlaLatency().hashCode();
+                    break;
+                case 8:
+                    hash = (37 * hash) + SLA_AVAILABILITY_FIELD_NUMBER;
+                    hash = (53 * hash) + getSlaAvailability().hashCode();
+                    break;
+                case 9:
+                    hash = (37 * hash) + SLA_ISOLATION_FIELD_NUMBER;
+                    hash = (53 * hash) + getSlaIsolation().hashCode();
+                    break;
+                case 10:
+                    hash = (37 * hash) + EXCLUSIONS_FIELD_NUMBER;
+                    hash = (53 * hash) + getExclusions().hashCode();
+                    break;
+                case 11:
+                    hash = (37 * hash) + QOS_PROFILE_FIELD_NUMBER;
+                    hash = (53 * hash) + getQosProfile().hashCode();
+                    break;
+                case 0:
+                default:
+            }
+            hash = (29 * hash) + getUnknownFields().hashCode();
+            memoizedHashCode = hash;
+            return hash;
+        }
+
+        public static context.ContextOuterClass.Constraint parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data);
+        }
+
+        public static context.ContextOuterClass.Constraint parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data, extensionRegistry);
+        }
+
+        public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data);
+        }
+
+        public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data, extensionRegistry);
+        }
+
+        public static context.ContextOuterClass.Constraint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data);
+        }
+
+        public static context.ContextOuterClass.Constraint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
+            return PARSER.parseFrom(data, extensionRegistry);
+        }
+
+        public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input) throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+        }
+
+        public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
+        }
+
+        public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+        }
+
+        public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+        }
+
+        public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+        }
+
+        public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+            return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
+        }
+
+        @java.lang.Override
+        public Builder newBuilderForType() {
+            return newBuilder();
+        }
+
+        public static Builder newBuilder() {
+            return DEFAULT_INSTANCE.toBuilder();
+        }
+
+        public static Builder newBuilder(context.ContextOuterClass.Constraint prototype) {
+            return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+        }
+
+        @java.lang.Override
+        public Builder toBuilder() {
+            return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+        }
+
+        @java.lang.Override
+        protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+            Builder builder = new Builder(parent);
+            return builder;
+        }
+
+        /**
+         * Protobuf type {@code context.Constraint}
+         */
+        public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint)
+        context.ContextOuterClass.ConstraintOrBuilder {
+
+            public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+                return context.ContextOuterClass.internal_static_context_Constraint_descriptor;
+            }
+
+            @java.lang.Override
+            protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+                return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class);
+            }
+
+            // Construct using context.ContextOuterClass.Constraint.newBuilder()
+            private Builder() {
+            }
+
+            private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+                super(parent);
+            }
+
+            @java.lang.Override
+            public Builder clear() {
+                super.clear();
+                bitField0_ = 0;
+                action_ = 0;
+                if (customBuilder_ != null) {
+                    customBuilder_.clear();
+                }
+                if (scheduleBuilder_ != null) {
+                    scheduleBuilder_.clear();
+                }
+                if (endpointLocationBuilder_ != null) {
+                    endpointLocationBuilder_.clear();
+                }
+                if (endpointPriorityBuilder_ != null) {
+                    endpointPriorityBuilder_.clear();
+                }
+                if (slaCapacityBuilder_ != null) {
+                    slaCapacityBuilder_.clear();
+                }
+                if (slaLatencyBuilder_ != null) {
+                    slaLatencyBuilder_.clear();
+                }
+                if (slaAvailabilityBuilder_ != null) {
+                    slaAvailabilityBuilder_.clear();
+                }
+                if (slaIsolationBuilder_ != null) {
+                    slaIsolationBuilder_.clear();
+                }
+                if (exclusionsBuilder_ != null) {
+                    exclusionsBuilder_.clear();
+                }
+                if (qosProfileBuilder_ != null) {
+                    qosProfileBuilder_.clear();
+                }
+                constraintCase_ = 0;
+                constraint_ = null;
+                return this;
+            }
+
+            @java.lang.Override
+            public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+                return context.ContextOuterClass.internal_static_context_Constraint_descriptor;
+            }
+
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint getDefaultInstanceForType() {
+                return context.ContextOuterClass.Constraint.getDefaultInstance();
+            }
+
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint build() {
+                context.ContextOuterClass.Constraint result = buildPartial();
+                if (!result.isInitialized()) {
+                    throw newUninitializedMessageException(result);
+                }
+                return result;
+            }
+
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint buildPartial() {
+                context.ContextOuterClass.Constraint result = new context.ContextOuterClass.Constraint(this);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                buildPartialOneofs(result);
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartial0(context.ContextOuterClass.Constraint result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.action_ = action_;
+                }
+            }
+
+            private void buildPartialOneofs(context.ContextOuterClass.Constraint result) {
+                result.constraintCase_ = constraintCase_;
+                result.constraint_ = this.constraint_;
+                if (constraintCase_ == 2 && customBuilder_ != null) {
+                    result.constraint_ = customBuilder_.build();
+                }
+                if (constraintCase_ == 3 && scheduleBuilder_ != null) {
+                    result.constraint_ = scheduleBuilder_.build();
+                }
+                if (constraintCase_ == 4 && endpointLocationBuilder_ != null) {
+                    result.constraint_ = endpointLocationBuilder_.build();
+                }
+                if (constraintCase_ == 5 && endpointPriorityBuilder_ != null) {
+                    result.constraint_ = endpointPriorityBuilder_.build();
+                }
+                if (constraintCase_ == 6 && slaCapacityBuilder_ != null) {
+                    result.constraint_ = slaCapacityBuilder_.build();
+                }
+                if (constraintCase_ == 7 && slaLatencyBuilder_ != null) {
+                    result.constraint_ = slaLatencyBuilder_.build();
+                }
+                if (constraintCase_ == 8 && slaAvailabilityBuilder_ != null) {
+                    result.constraint_ = slaAvailabilityBuilder_.build();
+                }
+                if (constraintCase_ == 9 && slaIsolationBuilder_ != null) {
+                    result.constraint_ = slaIsolationBuilder_.build();
+                }
+                if (constraintCase_ == 10 && exclusionsBuilder_ != null) {
+                    result.constraint_ = exclusionsBuilder_.build();
+                }
+                if (constraintCase_ == 11 && qosProfileBuilder_ != null) {
+                    result.constraint_ = qosProfileBuilder_.build();
+                }
+            }
+
+            @java.lang.Override
+            public Builder mergeFrom(com.google.protobuf.Message other) {
+                if (other instanceof context.ContextOuterClass.Constraint) {
+                    return mergeFrom((context.ContextOuterClass.Constraint) other);
+                } else {
+                    super.mergeFrom(other);
+                    return this;
+                }
+            }
+
+            public Builder mergeFrom(context.ContextOuterClass.Constraint other) {
+                if (other == context.ContextOuterClass.Constraint.getDefaultInstance())
+                    return this;
+                if (other.action_ != 0) {
+                    setActionValue(other.getActionValue());
+                }
+                switch(other.getConstraintCase()) {
+                    case CUSTOM:
+                        {
+                            mergeCustom(other.getCustom());
+                            break;
+                        }
+                    case SCHEDULE:
+                        {
+                            mergeSchedule(other.getSchedule());
+                            break;
+                        }
+                    case ENDPOINT_LOCATION:
+                        {
+                            mergeEndpointLocation(other.getEndpointLocation());
+                            break;
+                        }
+                    case ENDPOINT_PRIORITY:
+                        {
+                            mergeEndpointPriority(other.getEndpointPriority());
+                            break;
+                        }
+                    case SLA_CAPACITY:
+                        {
+                            mergeSlaCapacity(other.getSlaCapacity());
+                            break;
+                        }
+                    case SLA_LATENCY:
+                        {
+                            mergeSlaLatency(other.getSlaLatency());
+                            break;
+                        }
+                    case SLA_AVAILABILITY:
+                        {
+                            mergeSlaAvailability(other.getSlaAvailability());
+                            break;
+                        }
+                    case SLA_ISOLATION:
+                        {
+                            mergeSlaIsolation(other.getSlaIsolation());
+                            break;
+                        }
+                    case EXCLUSIONS:
+                        {
+                            mergeExclusions(other.getExclusions());
+                            break;
+                        }
+                    case QOS_PROFILE:
+                        {
+                            mergeQosProfile(other.getQosProfile());
+                            break;
+                        }
+                    case CONSTRAINT_NOT_SET:
+                        {
+                            break;
+                        }
+                }
+                this.mergeUnknownFields(other.getUnknownFields());
+                onChanged();
+                return this;
+            }
+
+            @java.lang.Override
+            public final boolean isInitialized() {
+                return true;
+            }
+
+            @java.lang.Override
+            public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
+                try {
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 8:
+                                {
+                                    action_ = input.readEnum();
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 8
+                            case 18:
+                                {
+                                    input.readMessage(getCustomFieldBuilder().getBuilder(), extensionRegistry);
+                                    constraintCase_ = 2;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    input.readMessage(getScheduleFieldBuilder().getBuilder(), extensionRegistry);
+                                    constraintCase_ = 3;
+                                    break;
+                                }
+                            // case 26
+                            case 34:
+                                {
+                                    input.readMessage(getEndpointLocationFieldBuilder().getBuilder(), extensionRegistry);
+                                    constraintCase_ = 4;
+                                    break;
+                                }
+                            // case 34
+                            case 42:
+                                {
+                                    input.readMessage(getEndpointPriorityFieldBuilder().getBuilder(), extensionRegistry);
+                                    constraintCase_ = 5;
+                                    break;
+                                }
+                            // case 42
+                            case 50:
+                                {
+                                    input.readMessage(getSlaCapacityFieldBuilder().getBuilder(), extensionRegistry);
+                                    constraintCase_ = 6;
+                                    break;
+                                }
+                            // case 50
+                            case 58:
+                                {
+                                    input.readMessage(getSlaLatencyFieldBuilder().getBuilder(), extensionRegistry);
+                                    constraintCase_ = 7;
+                                    break;
+                                }
+                            // case 58
+                            case 66:
+                                {
+                                    input.readMessage(getSlaAvailabilityFieldBuilder().getBuilder(), extensionRegistry);
+                                    constraintCase_ = 8;
+                                    break;
+                                }
+                            // case 66
+                            case 74:
+                                {
+                                    input.readMessage(getSlaIsolationFieldBuilder().getBuilder(), extensionRegistry);
+                                    constraintCase_ = 9;
+                                    break;
+                                }
+                            // case 74
+                            case 82:
+                                {
+                                    input.readMessage(getExclusionsFieldBuilder().getBuilder(), extensionRegistry);
+                                    constraintCase_ = 10;
+                                    break;
+                                }
+                            // case 82
+                            case 90:
+                                {
+                                    input.readMessage(getQosProfileFieldBuilder().getBuilder(), extensionRegistry);
+                                    constraintCase_ = 11;
+                                    break;
+                                }
+                            // case 90
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.unwrapIOException();
+                } finally {
+                    onChanged();
+                }
+                // finally
+                return this;
+            }
+
+            private int constraintCase_ = 0;
+
+            private java.lang.Object constraint_;
+
+            public ConstraintCase getConstraintCase() {
+                return ConstraintCase.forNumber(constraintCase_);
+            }
+
+            public Builder clearConstraint() {
+                constraintCase_ = 0;
+                constraint_ = null;
+                onChanged();
+                return this;
+            }
+
+            private int bitField0_;
+
+            private int action_ = 0;
+
+            /**
+             * .context.ConstraintActionEnum action = 1;
+             * @return The enum numeric value on the wire for action.
+             */
+            @java.lang.Override
+            public int getActionValue() {
+                return action_;
+            }
+
+            /**
+             * .context.ConstraintActionEnum action = 1;
+             * @param value The enum numeric value on the wire for action to set.
+             * @return This builder for chaining.
+             */
+            public Builder setActionValue(int value) {
+                action_ = value;
+                bitField0_ |= 0x00000001;
+                onChanged();
+                return this;
+            }
+
+            /**
+             * .context.ConstraintActionEnum action = 1;
+             * @return The action.
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.ConstraintActionEnum getAction() {
+                context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.forNumber(action_);
+                return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result;
+            }
+
+            /**
+             * .context.ConstraintActionEnum action = 1;
+             * @param value The action to set.
+             * @return This builder for chaining.
+             */
+            public Builder setAction(context.ContextOuterClass.ConstraintActionEnum value) {
+                if (value == null) {
+                    throw new NullPointerException();
+                }
+                bitField0_ |= 0x00000001;
+                action_ = value.getNumber();
+                onChanged();
+                return this;
+            }
+
+            /**
+             * .context.ConstraintActionEnum action = 1;
+             * @return This builder for chaining.
+             */
+            public Builder clearAction() {
+                bitField0_ = (bitField0_ & ~0x00000001);
+                action_ = 0;
+                onChanged();
+                return this;
+            }
+
+            private com.google.protobuf.SingleFieldBuilderV3 customBuilder_;
+
+            /**
+             * .context.Constraint_Custom custom = 2;
+             * @return Whether the custom field is set.
+             */
+            @java.lang.Override
+            public boolean hasCustom() {
+                return constraintCase_ == 2;
+            }
+
+            /**
+             * .context.Constraint_Custom custom = 2;
+             * @return The custom.
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_Custom getCustom() {
+                if (customBuilder_ == null) {
+                    if (constraintCase_ == 2) {
+                        return (context.ContextOuterClass.Constraint_Custom) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_Custom.getDefaultInstance();
+                } else {
+                    if (constraintCase_ == 2) {
+                        return customBuilder_.getMessage();
+                    }
+                    return context.ContextOuterClass.Constraint_Custom.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_Custom custom = 2;
+             */
+            public Builder setCustom(context.ContextOuterClass.Constraint_Custom value) {
+                if (customBuilder_ == null) {
+                    if (value == null) {
+                        throw new NullPointerException();
+                    }
+                    constraint_ = value;
+                    onChanged();
+                } else {
+                    customBuilder_.setMessage(value);
+                }
+                constraintCase_ = 2;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_Custom custom = 2;
+             */
+            public Builder setCustom(context.ContextOuterClass.Constraint_Custom.Builder builderForValue) {
+                if (customBuilder_ == null) {
+                    constraint_ = builderForValue.build();
+                    onChanged();
+                } else {
+                    customBuilder_.setMessage(builderForValue.build());
+                }
+                constraintCase_ = 2;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_Custom custom = 2;
+             */
+            public Builder mergeCustom(context.ContextOuterClass.Constraint_Custom value) {
+                if (customBuilder_ == null) {
+                    if (constraintCase_ == 2 && constraint_ != context.ContextOuterClass.Constraint_Custom.getDefaultInstance()) {
+                        constraint_ = context.ContextOuterClass.Constraint_Custom.newBuilder((context.ContextOuterClass.Constraint_Custom) constraint_).mergeFrom(value).buildPartial();
+                    } else {
+                        constraint_ = value;
+                    }
+                    onChanged();
+                } else {
+                    if (constraintCase_ == 2) {
+                        customBuilder_.mergeFrom(value);
+                    } else {
+                        customBuilder_.setMessage(value);
+                    }
+                }
+                constraintCase_ = 2;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_Custom custom = 2;
+             */
+            public Builder clearCustom() {
+                if (customBuilder_ == null) {
+                    if (constraintCase_ == 2) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                        onChanged();
+                    }
+                } else {
+                    if (constraintCase_ == 2) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                    }
+                    customBuilder_.clear();
+                }
+                return this;
+            }
+
+            /**
+             * .context.Constraint_Custom custom = 2;
+             */
+            public context.ContextOuterClass.Constraint_Custom.Builder getCustomBuilder() {
+                return getCustomFieldBuilder().getBuilder();
+            }
+
+            /**
+             * .context.Constraint_Custom custom = 2;
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() {
+                if ((constraintCase_ == 2) && (customBuilder_ != null)) {
+                    return customBuilder_.getMessageOrBuilder();
+                } else {
+                    if (constraintCase_ == 2) {
+                        return (context.ContextOuterClass.Constraint_Custom) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_Custom.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_Custom custom = 2;
+             */
+            private com.google.protobuf.SingleFieldBuilderV3 getCustomFieldBuilder() {
+                if (customBuilder_ == null) {
+                    if (!(constraintCase_ == 2)) {
+                        constraint_ = context.ContextOuterClass.Constraint_Custom.getDefaultInstance();
+                    }
+                    customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Custom) constraint_, getParentForChildren(), isClean());
+                    constraint_ = null;
+                }
+                constraintCase_ = 2;
+                onChanged();
+                return customBuilder_;
+            }
+
+            private com.google.protobuf.SingleFieldBuilderV3 scheduleBuilder_;
+
+            /**
+             * .context.Constraint_Schedule schedule = 3;
+             * @return Whether the schedule field is set.
+             */
+            @java.lang.Override
+            public boolean hasSchedule() {
+                return constraintCase_ == 3;
+            }
+
+            /**
+             * .context.Constraint_Schedule schedule = 3;
+             * @return The schedule.
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_Schedule getSchedule() {
+                if (scheduleBuilder_ == null) {
+                    if (constraintCase_ == 3) {
+                        return (context.ContextOuterClass.Constraint_Schedule) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance();
+                } else {
+                    if (constraintCase_ == 3) {
+                        return scheduleBuilder_.getMessage();
+                    }
+                    return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_Schedule schedule = 3;
+             */
+            public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule value) {
+                if (scheduleBuilder_ == null) {
+                    if (value == null) {
+                        throw new NullPointerException();
+                    }
+                    constraint_ = value;
+                    onChanged();
+                } else {
+                    scheduleBuilder_.setMessage(value);
+                }
+                constraintCase_ = 3;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_Schedule schedule = 3;
+             */
+            public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule.Builder builderForValue) {
+                if (scheduleBuilder_ == null) {
+                    constraint_ = builderForValue.build();
+                    onChanged();
+                } else {
+                    scheduleBuilder_.setMessage(builderForValue.build());
+                }
+                constraintCase_ = 3;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_Schedule schedule = 3;
+             */
+            public Builder mergeSchedule(context.ContextOuterClass.Constraint_Schedule value) {
+                if (scheduleBuilder_ == null) {
+                    if (constraintCase_ == 3 && constraint_ != context.ContextOuterClass.Constraint_Schedule.getDefaultInstance()) {
+                        constraint_ = context.ContextOuterClass.Constraint_Schedule.newBuilder((context.ContextOuterClass.Constraint_Schedule) constraint_).mergeFrom(value).buildPartial();
+                    } else {
+                        constraint_ = value;
+                    }
+                    onChanged();
+                } else {
+                    if (constraintCase_ == 3) {
+                        scheduleBuilder_.mergeFrom(value);
+                    } else {
+                        scheduleBuilder_.setMessage(value);
+                    }
+                }
+                constraintCase_ = 3;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_Schedule schedule = 3;
+             */
+            public Builder clearSchedule() {
+                if (scheduleBuilder_ == null) {
+                    if (constraintCase_ == 3) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                        onChanged();
+                    }
+                } else {
+                    if (constraintCase_ == 3) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                    }
+                    scheduleBuilder_.clear();
+                }
+                return this;
+            }
+
+            /**
+             * .context.Constraint_Schedule schedule = 3;
+             */
+            public context.ContextOuterClass.Constraint_Schedule.Builder getScheduleBuilder() {
+                return getScheduleFieldBuilder().getBuilder();
+            }
+
+            /**
+             * .context.Constraint_Schedule schedule = 3;
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() {
+                if ((constraintCase_ == 3) && (scheduleBuilder_ != null)) {
+                    return scheduleBuilder_.getMessageOrBuilder();
+                } else {
+                    if (constraintCase_ == 3) {
+                        return (context.ContextOuterClass.Constraint_Schedule) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_Schedule schedule = 3;
+             */
+            private com.google.protobuf.SingleFieldBuilderV3 getScheduleFieldBuilder() {
+                if (scheduleBuilder_ == null) {
+                    if (!(constraintCase_ == 3)) {
+                        constraint_ = context.ContextOuterClass.Constraint_Schedule.getDefaultInstance();
+                    }
+                    scheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Schedule) constraint_, getParentForChildren(), isClean());
+                    constraint_ = null;
+                }
+                constraintCase_ = 3;
+                onChanged();
+                return scheduleBuilder_;
+            }
+
+            private com.google.protobuf.SingleFieldBuilderV3 endpointLocationBuilder_;
+
+            /**
+             * .context.Constraint_EndPointLocation endpoint_location = 4;
+             * @return Whether the endpointLocation field is set.
+             */
+            @java.lang.Override
+            public boolean hasEndpointLocation() {
+                return constraintCase_ == 4;
+            }
+
+            /**
+             * .context.Constraint_EndPointLocation endpoint_location = 4;
+             * @return The endpointLocation.
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() {
+                if (endpointLocationBuilder_ == null) {
+                    if (constraintCase_ == 4) {
+                        return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance();
+                } else {
+                    if (constraintCase_ == 4) {
+                        return endpointLocationBuilder_.getMessage();
+                    }
+                    return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_EndPointLocation endpoint_location = 4;
+             */
+            public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) {
+                if (endpointLocationBuilder_ == null) {
+                    if (value == null) {
+                        throw new NullPointerException();
+                    }
+                    constraint_ = value;
+                    onChanged();
+                } else {
+                    endpointLocationBuilder_.setMessage(value);
+                }
+                constraintCase_ = 4;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_EndPointLocation endpoint_location = 4;
+             */
+            public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation.Builder builderForValue) {
+                if (endpointLocationBuilder_ == null) {
+                    constraint_ = builderForValue.build();
+                    onChanged();
+                } else {
+                    endpointLocationBuilder_.setMessage(builderForValue.build());
+                }
+                constraintCase_ = 4;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_EndPointLocation endpoint_location = 4;
+             */
+            public Builder mergeEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) {
+                if (endpointLocationBuilder_ == null) {
+                    if (constraintCase_ == 4 && constraint_ != context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance()) {
+                        constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.newBuilder((context.ContextOuterClass.Constraint_EndPointLocation) constraint_).mergeFrom(value).buildPartial();
+                    } else {
+                        constraint_ = value;
+                    }
+                    onChanged();
+                } else {
+                    if (constraintCase_ == 4) {
+                        endpointLocationBuilder_.mergeFrom(value);
+                    } else {
+                        endpointLocationBuilder_.setMessage(value);
+                    }
+                }
+                constraintCase_ = 4;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_EndPointLocation endpoint_location = 4;
+             */
+            public Builder clearEndpointLocation() {
+                if (endpointLocationBuilder_ == null) {
+                    if (constraintCase_ == 4) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                        onChanged();
+                    }
+                } else {
+                    if (constraintCase_ == 4) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                    }
+                    endpointLocationBuilder_.clear();
+                }
+                return this;
+            }
+
+            /**
+             * .context.Constraint_EndPointLocation endpoint_location = 4;
+             */
+            public context.ContextOuterClass.Constraint_EndPointLocation.Builder getEndpointLocationBuilder() {
+                return getEndpointLocationFieldBuilder().getBuilder();
+            }
+
+            /**
+             * .context.Constraint_EndPointLocation endpoint_location = 4;
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() {
+                if ((constraintCase_ == 4) && (endpointLocationBuilder_ != null)) {
+                    return endpointLocationBuilder_.getMessageOrBuilder();
+                } else {
+                    if (constraintCase_ == 4) {
+                        return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_EndPointLocation endpoint_location = 4;
+             */
+            private com.google.protobuf.SingleFieldBuilderV3 getEndpointLocationFieldBuilder() {
+                if (endpointLocationBuilder_ == null) {
+                    if (!(constraintCase_ == 4)) {
+                        constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance();
+                    }
+                    endpointLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_EndPointLocation) constraint_, getParentForChildren(), isClean());
+                    constraint_ = null;
+                }
+                constraintCase_ = 4;
+                onChanged();
+                return endpointLocationBuilder_;
+            }
+
+            private com.google.protobuf.SingleFieldBuilderV3 endpointPriorityBuilder_;
+
+            /**
+             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             * @return Whether the endpointPriority field is set.
+             */
+            @java.lang.Override
+            public boolean hasEndpointPriority() {
+                return constraintCase_ == 5;
+            }
+
+            /**
+             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             * @return The endpointPriority.
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() {
+                if (endpointPriorityBuilder_ == null) {
+                    if (constraintCase_ == 5) {
+                        return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance();
+                } else {
+                    if (constraintCase_ == 5) {
+                        return endpointPriorityBuilder_.getMessage();
+                    }
+                    return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             */
+            public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) {
+                if (endpointPriorityBuilder_ == null) {
+                    if (value == null) {
+                        throw new NullPointerException();
+                    }
+                    constraint_ = value;
+                    onChanged();
+                } else {
+                    endpointPriorityBuilder_.setMessage(value);
+                }
+                constraintCase_ = 5;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             */
+            public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority.Builder builderForValue) {
+                if (endpointPriorityBuilder_ == null) {
+                    constraint_ = builderForValue.build();
+                    onChanged();
+                } else {
+                    endpointPriorityBuilder_.setMessage(builderForValue.build());
+                }
+                constraintCase_ = 5;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             */
+            public Builder mergeEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) {
+                if (endpointPriorityBuilder_ == null) {
+                    if (constraintCase_ == 5 && constraint_ != context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance()) {
+                        constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.newBuilder((context.ContextOuterClass.Constraint_EndPointPriority) constraint_).mergeFrom(value).buildPartial();
+                    } else {
+                        constraint_ = value;
+                    }
+                    onChanged();
+                } else {
+                    if (constraintCase_ == 5) {
+                        endpointPriorityBuilder_.mergeFrom(value);
+                    } else {
+                        endpointPriorityBuilder_.setMessage(value);
+                    }
+                }
+                constraintCase_ = 5;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             */
+            public Builder clearEndpointPriority() {
+                if (endpointPriorityBuilder_ == null) {
+                    if (constraintCase_ == 5) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                        onChanged();
+                    }
+                } else {
+                    if (constraintCase_ == 5) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                    }
+                    endpointPriorityBuilder_.clear();
+                }
+                return this;
+            }
+
+            /**
+             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             */
+            public context.ContextOuterClass.Constraint_EndPointPriority.Builder getEndpointPriorityBuilder() {
+                return getEndpointPriorityFieldBuilder().getBuilder();
+            }
+
+            /**
+             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() {
+                if ((constraintCase_ == 5) && (endpointPriorityBuilder_ != null)) {
+                    return endpointPriorityBuilder_.getMessageOrBuilder();
+                } else {
+                    if (constraintCase_ == 5) {
+                        return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             */
+            private com.google.protobuf.SingleFieldBuilderV3 getEndpointPriorityFieldBuilder() {
+                if (endpointPriorityBuilder_ == null) {
+                    if (!(constraintCase_ == 5)) {
+                        constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance();
+                    }
+                    endpointPriorityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_EndPointPriority) constraint_, getParentForChildren(), isClean());
+                    constraint_ = null;
+                }
+                constraintCase_ = 5;
+                onChanged();
+                return endpointPriorityBuilder_;
+            }
+
+            private com.google.protobuf.SingleFieldBuilderV3 slaCapacityBuilder_;
+
+            /**
+             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             * @return Whether the slaCapacity field is set.
+             */
+            @java.lang.Override
+            public boolean hasSlaCapacity() {
+                return constraintCase_ == 6;
+            }
+
+            /**
+             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             * @return The slaCapacity.
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() {
+                if (slaCapacityBuilder_ == null) {
+                    if (constraintCase_ == 6) {
+                        return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance();
+                } else {
+                    if (constraintCase_ == 6) {
+                        return slaCapacityBuilder_.getMessage();
+                    }
+                    return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             */
+            public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) {
+                if (slaCapacityBuilder_ == null) {
+                    if (value == null) {
+                        throw new NullPointerException();
+                    }
+                    constraint_ = value;
+                    onChanged();
+                } else {
+                    slaCapacityBuilder_.setMessage(value);
+                }
+                constraintCase_ = 6;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             */
+            public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity.Builder builderForValue) {
+                if (slaCapacityBuilder_ == null) {
+                    constraint_ = builderForValue.build();
+                    onChanged();
+                } else {
+                    slaCapacityBuilder_.setMessage(builderForValue.build());
+                }
+                constraintCase_ = 6;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             */
+            public Builder mergeSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) {
+                if (slaCapacityBuilder_ == null) {
+                    if (constraintCase_ == 6 && constraint_ != context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance()) {
+                        constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.newBuilder((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_).mergeFrom(value).buildPartial();
+                    } else {
+                        constraint_ = value;
+                    }
+                    onChanged();
+                } else {
+                    if (constraintCase_ == 6) {
+                        slaCapacityBuilder_.mergeFrom(value);
+                    } else {
+                        slaCapacityBuilder_.setMessage(value);
+                    }
+                }
+                constraintCase_ = 6;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             */
+            public Builder clearSlaCapacity() {
+                if (slaCapacityBuilder_ == null) {
+                    if (constraintCase_ == 6) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                        onChanged();
+                    }
+                } else {
+                    if (constraintCase_ == 6) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                    }
+                    slaCapacityBuilder_.clear();
+                }
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             */
+            public context.ContextOuterClass.Constraint_SLA_Capacity.Builder getSlaCapacityBuilder() {
+                return getSlaCapacityFieldBuilder().getBuilder();
+            }
+
+            /**
+             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() {
+                if ((constraintCase_ == 6) && (slaCapacityBuilder_ != null)) {
+                    return slaCapacityBuilder_.getMessageOrBuilder();
+                } else {
+                    if (constraintCase_ == 6) {
+                        return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             */
+            private com.google.protobuf.SingleFieldBuilderV3 getSlaCapacityFieldBuilder() {
+                if (slaCapacityBuilder_ == null) {
+                    if (!(constraintCase_ == 6)) {
+                        constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance();
+                    }
+                    slaCapacityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_, getParentForChildren(), isClean());
+                    constraint_ = null;
+                }
+                constraintCase_ = 6;
+                onChanged();
+                return slaCapacityBuilder_;
+            }
+
+            private com.google.protobuf.SingleFieldBuilderV3 slaLatencyBuilder_;
+
+            /**
+             * .context.Constraint_SLA_Latency sla_latency = 7;
+             * @return Whether the slaLatency field is set.
+             */
+            @java.lang.Override
+            public boolean hasSlaLatency() {
+                return constraintCase_ == 7;
+            }
+
+            /**
+             * .context.Constraint_SLA_Latency sla_latency = 7;
+             * @return The slaLatency.
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() {
+                if (slaLatencyBuilder_ == null) {
+                    if (constraintCase_ == 7) {
+                        return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance();
+                } else {
+                    if (constraintCase_ == 7) {
+                        return slaLatencyBuilder_.getMessage();
+                    }
+                    return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_SLA_Latency sla_latency = 7;
+             */
+            public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) {
+                if (slaLatencyBuilder_ == null) {
+                    if (value == null) {
+                        throw new NullPointerException();
+                    }
+                    constraint_ = value;
+                    onChanged();
+                } else {
+                    slaLatencyBuilder_.setMessage(value);
+                }
+                constraintCase_ = 7;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Latency sla_latency = 7;
+             */
+            public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency.Builder builderForValue) {
+                if (slaLatencyBuilder_ == null) {
+                    constraint_ = builderForValue.build();
+                    onChanged();
+                } else {
+                    slaLatencyBuilder_.setMessage(builderForValue.build());
+                }
+                constraintCase_ = 7;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Latency sla_latency = 7;
+             */
+            public Builder mergeSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) {
+                if (slaLatencyBuilder_ == null) {
+                    if (constraintCase_ == 7 && constraint_ != context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance()) {
+                        constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.newBuilder((context.ContextOuterClass.Constraint_SLA_Latency) constraint_).mergeFrom(value).buildPartial();
+                    } else {
+                        constraint_ = value;
+                    }
+                    onChanged();
+                } else {
+                    if (constraintCase_ == 7) {
+                        slaLatencyBuilder_.mergeFrom(value);
+                    } else {
+                        slaLatencyBuilder_.setMessage(value);
+                    }
+                }
+                constraintCase_ = 7;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Latency sla_latency = 7;
+             */
+            public Builder clearSlaLatency() {
+                if (slaLatencyBuilder_ == null) {
+                    if (constraintCase_ == 7) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                        onChanged();
+                    }
+                } else {
+                    if (constraintCase_ == 7) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                    }
+                    slaLatencyBuilder_.clear();
+                }
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Latency sla_latency = 7;
+             */
+            public context.ContextOuterClass.Constraint_SLA_Latency.Builder getSlaLatencyBuilder() {
+                return getSlaLatencyFieldBuilder().getBuilder();
+            }
+
+            /**
+             * .context.Constraint_SLA_Latency sla_latency = 7;
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() {
+                if ((constraintCase_ == 7) && (slaLatencyBuilder_ != null)) {
+                    return slaLatencyBuilder_.getMessageOrBuilder();
+                } else {
+                    if (constraintCase_ == 7) {
+                        return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_SLA_Latency sla_latency = 7;
+             */
+            private com.google.protobuf.SingleFieldBuilderV3 getSlaLatencyFieldBuilder() {
+                if (slaLatencyBuilder_ == null) {
+                    if (!(constraintCase_ == 7)) {
+                        constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance();
+                    }
+                    slaLatencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Latency) constraint_, getParentForChildren(), isClean());
+                    constraint_ = null;
+                }
+                constraintCase_ = 7;
+                onChanged();
+                return slaLatencyBuilder_;
+            }
+
+            private com.google.protobuf.SingleFieldBuilderV3 slaAvailabilityBuilder_;
+
+            /**
+             * .context.Constraint_SLA_Availability sla_availability = 8;
+             * @return Whether the slaAvailability field is set.
+             */
+            @java.lang.Override
+            public boolean hasSlaAvailability() {
+                return constraintCase_ == 8;
+            }
+
+            /**
+             * .context.Constraint_SLA_Availability sla_availability = 8;
+             * @return The slaAvailability.
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() {
+                if (slaAvailabilityBuilder_ == null) {
+                    if (constraintCase_ == 8) {
+                        return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance();
+                } else {
+                    if (constraintCase_ == 8) {
+                        return slaAvailabilityBuilder_.getMessage();
+                    }
+                    return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_SLA_Availability sla_availability = 8;
+             */
+            public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) {
+                if (slaAvailabilityBuilder_ == null) {
+                    if (value == null) {
+                        throw new NullPointerException();
+                    }
+                    constraint_ = value;
+                    onChanged();
+                } else {
+                    slaAvailabilityBuilder_.setMessage(value);
+                }
+                constraintCase_ = 8;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Availability sla_availability = 8;
+             */
+            public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability.Builder builderForValue) {
+                if (slaAvailabilityBuilder_ == null) {
+                    constraint_ = builderForValue.build();
+                    onChanged();
+                } else {
+                    slaAvailabilityBuilder_.setMessage(builderForValue.build());
+                }
+                constraintCase_ = 8;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Availability sla_availability = 8;
+             */
+            public Builder mergeSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) {
+                if (slaAvailabilityBuilder_ == null) {
+                    if (constraintCase_ == 8 && constraint_ != context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance()) {
+                        constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.newBuilder((context.ContextOuterClass.Constraint_SLA_Availability) constraint_).mergeFrom(value).buildPartial();
+                    } else {
+                        constraint_ = value;
+                    }
+                    onChanged();
+                } else {
+                    if (constraintCase_ == 8) {
+                        slaAvailabilityBuilder_.mergeFrom(value);
+                    } else {
+                        slaAvailabilityBuilder_.setMessage(value);
+                    }
+                }
+                constraintCase_ = 8;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Availability sla_availability = 8;
+             */
+            public Builder clearSlaAvailability() {
+                if (slaAvailabilityBuilder_ == null) {
+                    if (constraintCase_ == 8) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                        onChanged();
+                    }
+                } else {
+                    if (constraintCase_ == 8) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                    }
+                    slaAvailabilityBuilder_.clear();
+                }
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Availability sla_availability = 8;
+             */
+            public context.ContextOuterClass.Constraint_SLA_Availability.Builder getSlaAvailabilityBuilder() {
+                return getSlaAvailabilityFieldBuilder().getBuilder();
+            }
+
+            /**
+             * .context.Constraint_SLA_Availability sla_availability = 8;
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() {
+                if ((constraintCase_ == 8) && (slaAvailabilityBuilder_ != null)) {
+                    return slaAvailabilityBuilder_.getMessageOrBuilder();
+                } else {
+                    if (constraintCase_ == 8) {
+                        return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_SLA_Availability sla_availability = 8;
+             */
+            private com.google.protobuf.SingleFieldBuilderV3 getSlaAvailabilityFieldBuilder() {
+                if (slaAvailabilityBuilder_ == null) {
+                    if (!(constraintCase_ == 8)) {
+                        constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance();
+                    }
+                    slaAvailabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Availability) constraint_, getParentForChildren(), isClean());
+                    constraint_ = null;
+                }
+                constraintCase_ = 8;
+                onChanged();
+                return slaAvailabilityBuilder_;
+            }
+
+            private com.google.protobuf.SingleFieldBuilderV3 slaIsolationBuilder_;
+
+            /**
+             * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+             * @return Whether the slaIsolation field is set.
+             */
+            @java.lang.Override
+            public boolean hasSlaIsolation() {
+                return constraintCase_ == 9;
+            }
+
+            /**
+             * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+             * @return The slaIsolation.
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() {
+                if (slaIsolationBuilder_ == null) {
+                    if (constraintCase_ == 9) {
+                        return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance();
+                } else {
+                    if (constraintCase_ == 9) {
+                        return slaIsolationBuilder_.getMessage();
+                    }
+                    return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+             */
+            public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) {
+                if (slaIsolationBuilder_ == null) {
+                    if (value == null) {
+                        throw new NullPointerException();
+                    }
+                    constraint_ = value;
+                    onChanged();
+                } else {
+                    slaIsolationBuilder_.setMessage(value);
+                }
+                constraintCase_ = 9;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+             */
+            public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder builderForValue) {
+                if (slaIsolationBuilder_ == null) {
+                    constraint_ = builderForValue.build();
+                    onChanged();
+                } else {
+                    slaIsolationBuilder_.setMessage(builderForValue.build());
+                }
+                constraintCase_ = 9;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+             */
+            public Builder mergeSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) {
+                if (slaIsolationBuilder_ == null) {
+                    if (constraintCase_ == 9 && constraint_ != context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance()) {
+                        constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.newBuilder((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_).mergeFrom(value).buildPartial();
+                    } else {
+                        constraint_ = value;
+                    }
+                    onChanged();
+                } else {
+                    if (constraintCase_ == 9) {
+                        slaIsolationBuilder_.mergeFrom(value);
+                    } else {
+                        slaIsolationBuilder_.setMessage(value);
+                    }
+                }
+                constraintCase_ = 9;
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+             */
+            public Builder clearSlaIsolation() {
+                if (slaIsolationBuilder_ == null) {
+                    if (constraintCase_ == 9) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                        onChanged();
+                    }
+                } else {
+                    if (constraintCase_ == 9) {
+                        constraintCase_ = 0;
+                        constraint_ = null;
+                    }
+                    slaIsolationBuilder_.clear();
+                }
+                return this;
+            }
+
+            /**
+             * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+             */
+            public context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder getSlaIsolationBuilder() {
+                return getSlaIsolationFieldBuilder().getBuilder();
+            }
+
+            /**
+             * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+             */
+            @java.lang.Override
+            public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() {
+                if ((constraintCase_ == 9) && (slaIsolationBuilder_ != null)) {
+                    return slaIsolationBuilder_.getMessageOrBuilder();
+                } else {
+                    if (constraintCase_ == 9) {
+                        return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_;
+                    }
+                    return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_SLA_Isolation_level sla_isolation = 9;
+             */
+            private com.google.protobuf.SingleFieldBuilderV3 getSlaIsolationFieldBuilder() {
+                if (slaIsolationBuilder_ == null) {
+                    if (!(constraintCase_ == 9)) {
+                        constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance();
+                    }
+                    slaIsolationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_, getParentForChildren(), isClean());
+                    constraint_ = null;
+                }
+                constraintCase_ = 9;
+                onChanged();
+                return slaIsolationBuilder_;
+            }
+
+            private com.google.protobuf.SingleFieldBuilderV3 exclusionsBuilder_;
+
+            /**
+             * .context.Constraint_Exclusions exclusions = 10;
+             * @return Whether the exclusions field is set.
              */
             @java.lang.Override
-            public boolean hasEndpointPriority() {
-                return constraintCase_ == 5;
+            public boolean hasExclusions() {
+                return constraintCase_ == 10;
             }
 
             /**
-             * .context.Constraint_EndPointPriority endpoint_priority = 5;
-             * @return The endpointPriority.
+             * .context.Constraint_Exclusions exclusions = 10;
+             * @return The exclusions.
              */
             @java.lang.Override
-            public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() {
-                if (endpointPriorityBuilder_ == null) {
-                    if (constraintCase_ == 5) {
-                        return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_;
+            public context.ContextOuterClass.Constraint_Exclusions getExclusions() {
+                if (exclusionsBuilder_ == null) {
+                    if (constraintCase_ == 10) {
+                        return (context.ContextOuterClass.Constraint_Exclusions) constraint_;
                     }
-                    return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance();
+                    return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance();
                 } else {
-                    if (constraintCase_ == 5) {
-                        return endpointPriorityBuilder_.getMessage();
+                    if (constraintCase_ == 10) {
+                        return exclusionsBuilder_.getMessage();
                     }
-                    return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance();
+                    return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance();
                 }
             }
 
             /**
-             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             * .context.Constraint_Exclusions exclusions = 10;
              */
-            public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) {
-                if (endpointPriorityBuilder_ == null) {
+            public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions value) {
+                if (exclusionsBuilder_ == null) {
                     if (value == null) {
                         throw new NullPointerException();
                     }
                     constraint_ = value;
                     onChanged();
                 } else {
-                    endpointPriorityBuilder_.setMessage(value);
+                    exclusionsBuilder_.setMessage(value);
                 }
-                constraintCase_ = 5;
+                constraintCase_ = 10;
                 return this;
             }
 
             /**
-             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             * .context.Constraint_Exclusions exclusions = 10;
              */
-            public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority.Builder builderForValue) {
-                if (endpointPriorityBuilder_ == null) {
+            public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions.Builder builderForValue) {
+                if (exclusionsBuilder_ == null) {
                     constraint_ = builderForValue.build();
                     onChanged();
                 } else {
-                    endpointPriorityBuilder_.setMessage(builderForValue.build());
+                    exclusionsBuilder_.setMessage(builderForValue.build());
                 }
-                constraintCase_ = 5;
+                constraintCase_ = 10;
                 return this;
             }
 
             /**
-             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             * .context.Constraint_Exclusions exclusions = 10;
              */
-            public Builder mergeEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) {
-                if (endpointPriorityBuilder_ == null) {
-                    if (constraintCase_ == 5 && constraint_ != context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance()) {
-                        constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.newBuilder((context.ContextOuterClass.Constraint_EndPointPriority) constraint_).mergeFrom(value).buildPartial();
+            public Builder mergeExclusions(context.ContextOuterClass.Constraint_Exclusions value) {
+                if (exclusionsBuilder_ == null) {
+                    if (constraintCase_ == 10 && constraint_ != context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance()) {
+                        constraint_ = context.ContextOuterClass.Constraint_Exclusions.newBuilder((context.ContextOuterClass.Constraint_Exclusions) constraint_).mergeFrom(value).buildPartial();
                     } else {
                         constraint_ = value;
                     }
                     onChanged();
                 } else {
-                    if (constraintCase_ == 5) {
-                        endpointPriorityBuilder_.mergeFrom(value);
+                    if (constraintCase_ == 10) {
+                        exclusionsBuilder_.mergeFrom(value);
+                    } else {
+                        exclusionsBuilder_.setMessage(value);
                     }
-                    endpointPriorityBuilder_.setMessage(value);
                 }
-                constraintCase_ = 5;
+                constraintCase_ = 10;
                 return this;
             }
 
             /**
-             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             * .context.Constraint_Exclusions exclusions = 10;
              */
-            public Builder clearEndpointPriority() {
-                if (endpointPriorityBuilder_ == null) {
-                    if (constraintCase_ == 5) {
+            public Builder clearExclusions() {
+                if (exclusionsBuilder_ == null) {
+                    if (constraintCase_ == 10) {
                         constraintCase_ = 0;
                         constraint_ = null;
                         onChanged();
                     }
                 } else {
-                    if (constraintCase_ == 5) {
+                    if (constraintCase_ == 10) {
                         constraintCase_ = 0;
                         constraint_ = null;
                     }
-                    endpointPriorityBuilder_.clear();
+                    exclusionsBuilder_.clear();
                 }
                 return this;
             }
 
             /**
-             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             * .context.Constraint_Exclusions exclusions = 10;
              */
-            public context.ContextOuterClass.Constraint_EndPointPriority.Builder getEndpointPriorityBuilder() {
-                return getEndpointPriorityFieldBuilder().getBuilder();
+            public context.ContextOuterClass.Constraint_Exclusions.Builder getExclusionsBuilder() {
+                return getExclusionsFieldBuilder().getBuilder();
             }
 
             /**
-             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             * .context.Constraint_Exclusions exclusions = 10;
              */
             @java.lang.Override
-            public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() {
-                if ((constraintCase_ == 5) && (endpointPriorityBuilder_ != null)) {
-                    return endpointPriorityBuilder_.getMessageOrBuilder();
+            public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() {
+                if ((constraintCase_ == 10) && (exclusionsBuilder_ != null)) {
+                    return exclusionsBuilder_.getMessageOrBuilder();
                 } else {
-                    if (constraintCase_ == 5) {
-                        return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_;
+                    if (constraintCase_ == 10) {
+                        return (context.ContextOuterClass.Constraint_Exclusions) constraint_;
                     }
-                    return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance();
+                    return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance();
                 }
             }
 
             /**
-             * .context.Constraint_EndPointPriority endpoint_priority = 5;
+             * .context.Constraint_Exclusions exclusions = 10;
              */
-            private com.google.protobuf.SingleFieldBuilderV3 getEndpointPriorityFieldBuilder() {
-                if (endpointPriorityBuilder_ == null) {
-                    if (!(constraintCase_ == 5)) {
-                        constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance();
+            private com.google.protobuf.SingleFieldBuilderV3 getExclusionsFieldBuilder() {
+                if (exclusionsBuilder_ == null) {
+                    if (!(constraintCase_ == 10)) {
+                        constraint_ = context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance();
                     }
-                    endpointPriorityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_EndPointPriority) constraint_, getParentForChildren(), isClean());
+                    exclusionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Exclusions) constraint_, getParentForChildren(), isClean());
                     constraint_ = null;
                 }
-                constraintCase_ = 5;
+                constraintCase_ = 10;
                 onChanged();
-                ;
-                return endpointPriorityBuilder_;
+                return exclusionsBuilder_;
             }
 
-            private com.google.protobuf.SingleFieldBuilderV3 slaCapacityBuilder_;
+            private com.google.protobuf.SingleFieldBuilderV3 qosProfileBuilder_;
 
             /**
-             * .context.Constraint_SLA_Capacity sla_capacity = 6;
-             * @return Whether the slaCapacity field is set.
+             * .context.Constraint_QoSProfile qos_profile = 11;
+             * @return Whether the qosProfile field is set.
              */
             @java.lang.Override
-            public boolean hasSlaCapacity() {
-                return constraintCase_ == 6;
+            public boolean hasQosProfile() {
+                return constraintCase_ == 11;
             }
 
             /**
-             * .context.Constraint_SLA_Capacity sla_capacity = 6;
-             * @return The slaCapacity.
+             * .context.Constraint_QoSProfile qos_profile = 11;
+             * @return The qosProfile.
              */
             @java.lang.Override
-            public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() {
-                if (slaCapacityBuilder_ == null) {
-                    if (constraintCase_ == 6) {
-                        return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_;
+            public context.ContextOuterClass.Constraint_QoSProfile getQosProfile() {
+                if (qosProfileBuilder_ == null) {
+                    if (constraintCase_ == 11) {
+                        return (context.ContextOuterClass.Constraint_QoSProfile) constraint_;
                     }
-                    return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance();
+                    return context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance();
                 } else {
-                    if (constraintCase_ == 6) {
-                        return slaCapacityBuilder_.getMessage();
+                    if (constraintCase_ == 11) {
+                        return qosProfileBuilder_.getMessage();
                     }
-                    return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance();
+                    return context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance();
                 }
             }
 
             /**
-             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             * .context.Constraint_QoSProfile qos_profile = 11;
              */
-            public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) {
-                if (slaCapacityBuilder_ == null) {
+            public Builder setQosProfile(context.ContextOuterClass.Constraint_QoSProfile value) {
+                if (qosProfileBuilder_ == null) {
                     if (value == null) {
                         throw new NullPointerException();
                     }
                     constraint_ = value;
                     onChanged();
                 } else {
-                    slaCapacityBuilder_.setMessage(value);
+                    qosProfileBuilder_.setMessage(value);
                 }
-                constraintCase_ = 6;
+                constraintCase_ = 11;
                 return this;
             }
 
             /**
-             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             * .context.Constraint_QoSProfile qos_profile = 11;
              */
-            public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity.Builder builderForValue) {
-                if (slaCapacityBuilder_ == null) {
+            public Builder setQosProfile(context.ContextOuterClass.Constraint_QoSProfile.Builder builderForValue) {
+                if (qosProfileBuilder_ == null) {
                     constraint_ = builderForValue.build();
                     onChanged();
                 } else {
-                    slaCapacityBuilder_.setMessage(builderForValue.build());
+                    qosProfileBuilder_.setMessage(builderForValue.build());
                 }
-                constraintCase_ = 6;
+                constraintCase_ = 11;
                 return this;
             }
 
             /**
-             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             * .context.Constraint_QoSProfile qos_profile = 11;
              */
-            public Builder mergeSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) {
-                if (slaCapacityBuilder_ == null) {
-                    if (constraintCase_ == 6 && constraint_ != context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance()) {
-                        constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.newBuilder((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_).mergeFrom(value).buildPartial();
+            public Builder mergeQosProfile(context.ContextOuterClass.Constraint_QoSProfile value) {
+                if (qosProfileBuilder_ == null) {
+                    if (constraintCase_ == 11 && constraint_ != context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance()) {
+                        constraint_ = context.ContextOuterClass.Constraint_QoSProfile.newBuilder((context.ContextOuterClass.Constraint_QoSProfile) constraint_).mergeFrom(value).buildPartial();
                     } else {
                         constraint_ = value;
                     }
                     onChanged();
                 } else {
-                    if (constraintCase_ == 6) {
-                        slaCapacityBuilder_.mergeFrom(value);
+                    if (constraintCase_ == 11) {
+                        qosProfileBuilder_.mergeFrom(value);
+                    } else {
+                        qosProfileBuilder_.setMessage(value);
                     }
-                    slaCapacityBuilder_.setMessage(value);
                 }
-                constraintCase_ = 6;
+                constraintCase_ = 11;
                 return this;
             }
 
             /**
-             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             * .context.Constraint_QoSProfile qos_profile = 11;
              */
-            public Builder clearSlaCapacity() {
-                if (slaCapacityBuilder_ == null) {
-                    if (constraintCase_ == 6) {
+            public Builder clearQosProfile() {
+                if (qosProfileBuilder_ == null) {
+                    if (constraintCase_ == 11) {
                         constraintCase_ = 0;
                         constraint_ = null;
                         onChanged();
                     }
                 } else {
-                    if (constraintCase_ == 6) {
+                    if (constraintCase_ == 11) {
                         constraintCase_ = 0;
                         constraint_ = null;
                     }
-                    slaCapacityBuilder_.clear();
+                    qosProfileBuilder_.clear();
                 }
                 return this;
             }
 
             /**
-             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             * .context.Constraint_QoSProfile qos_profile = 11;
              */
-            public context.ContextOuterClass.Constraint_SLA_Capacity.Builder getSlaCapacityBuilder() {
-                return getSlaCapacityFieldBuilder().getBuilder();
+            public context.ContextOuterClass.Constraint_QoSProfile.Builder getQosProfileBuilder() {
+                return getQosProfileFieldBuilder().getBuilder();
             }
 
             /**
-             * .context.Constraint_SLA_Capacity sla_capacity = 6;
+             * .context.Constraint_QoSProfile qos_profile = 11;
              */
             @java.lang.Override
-            public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() {
-                if ((constraintCase_ == 6) && (slaCapacityBuilder_ != null)) {
-                    return slaCapacityBuilder_.getMessageOrBuilder();
+            public context.ContextOuterClass.Constraint_QoSProfileOrBuilder getQosProfileOrBuilder() {
+                if ((constraintCase_ == 11) && (qosProfileBuilder_ != null)) {
+                    return qosProfileBuilder_.getMessageOrBuilder();
                 } else {
-                    if (constraintCase_ == 6) {
-                        return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_;
+                    if (constraintCase_ == 11) {
+                        return (context.ContextOuterClass.Constraint_QoSProfile) constraint_;
                     }
-                    return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance();
+                    return context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance();
+                }
+            }
+
+            /**
+             * .context.Constraint_QoSProfile qos_profile = 11;
+             */
+            private com.google.protobuf.SingleFieldBuilderV3 getQosProfileFieldBuilder() {
+                if (qosProfileBuilder_ == null) {
+                    if (!(constraintCase_ == 11)) {
+                        constraint_ = context.ContextOuterClass.Constraint_QoSProfile.getDefaultInstance();
+                    }
+                    qosProfileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_QoSProfile) constraint_, getParentForChildren(), isClean());
+                    constraint_ = null;
+                }
+                constraintCase_ = 11;
+                onChanged();
+                return qosProfileBuilder_;
+            }
+
+            @java.lang.Override
+            public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+                return super.setUnknownFields(unknownFields);
+            }
+
+            @java.lang.Override
+            public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+                return super.mergeUnknownFields(unknownFields);
+            }
+            // @@protoc_insertion_point(builder_scope:context.Constraint)
+        }
+
+        // @@protoc_insertion_point(class_scope:context.Constraint)
+        private static final context.ContextOuterClass.Constraint DEFAULT_INSTANCE;
+
+        static {
+            DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint();
+        }
+
+        public static context.ContextOuterClass.Constraint getDefaultInstance() {
+            return DEFAULT_INSTANCE;
+        }
+
+        private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() {
+
+            @java.lang.Override
+            public Constraint parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
                 }
+                return builder.buildPartial();
+            }
+        };
+
+        public static com.google.protobuf.Parser parser() {
+            return PARSER;
+        }
+
+        @java.lang.Override
+        public com.google.protobuf.Parser getParserForType() {
+            return PARSER;
+        }
+
+        @java.lang.Override
+        public context.ContextOuterClass.Constraint getDefaultInstanceForType() {
+            return DEFAULT_INSTANCE;
+        }
+    }
+
+    public interface TeraFlowControllerOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TeraFlowController)
+    com.google.protobuf.MessageOrBuilder {
+
+        /**
+         * .context.ContextId context_id = 1;
+         * @return Whether the contextId field is set.
+         */
+        boolean hasContextId();
+
+        /**
+         * .context.ContextId context_id = 1;
+         * @return The contextId.
+         */
+        context.ContextOuterClass.ContextId getContextId();
+
+        /**
+         * .context.ContextId context_id = 1;
+         */
+        context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder();
+
+        /**
+         * string ip_address = 2;
+         * @return The ipAddress.
+         */
+        java.lang.String getIpAddress();
+
+        /**
+         * string ip_address = 2;
+         * @return The bytes for ipAddress.
+         */
+        com.google.protobuf.ByteString getIpAddressBytes();
+
+        /**
+         * uint32 port = 3;
+         * @return The port.
+         */
+        int getPort();
+    }
+
+    /**
+     * 
+     * ----- Miscellaneous -------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.TeraFlowController} + */ + public static final class TeraFlowController extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TeraFlowController) + TeraFlowControllerOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use TeraFlowController.newBuilder() to construct. + private TeraFlowController(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TeraFlowController() { + ipAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TeraFlowController(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); + } + + public static final int CONTEXT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ContextId contextId_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipAddress_ = ""; + + /** + * string ip_address = 2; + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } + } + + /** + * string ip_address = 2; + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 3; + + private int port_ = 0; + + /** + * uint32 port = 3; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_); + } + if (port_ != 0) { + output.writeUInt32(3, port_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, port_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TeraFlowController)) { + return super.equals(obj); + } + context.ContextOuterClass.TeraFlowController other = (context.ContextOuterClass.TeraFlowController) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (!getIpAddress().equals(other.getIpAddress())) + return false; + if (getPort() != other.getPort()) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); } + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3 getSlaCapacityFieldBuilder() { - if (slaCapacityBuilder_ == null) { - if (!(constraintCase_ == 6)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } - slaCapacityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_, getParentForChildren(), isClean()); - constraint_ = null; - } - constraintCase_ = 6; - onChanged(); - ; - return slaCapacityBuilder_; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - private com.google.protobuf.SingleFieldBuilderV3 slaLatencyBuilder_; + public static Builder newBuilder(context.ContextOuterClass.TeraFlowController prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return Whether the slaLatency field is set. - */ - @java.lang.Override - public boolean hasSlaLatency() { - return constraintCase_ == 7; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return The slaLatency. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() { - if (slaLatencyBuilder_ == null) { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } else { - if (constraintCase_ == 7) { - return slaLatencyBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { - if (slaLatencyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - slaLatencyBuilder_.setMessage(value); - } - constraintCase_ = 7; - return this; - } + /** + *
+         * ----- Miscellaneous -------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.TeraFlowController} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TeraFlowController) + context.ContextOuterClass.TeraFlowControllerOrBuilder { - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency.Builder builderForValue) { - if (slaLatencyBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - slaLatencyBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 7; - return this; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public Builder mergeSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { - if (slaLatencyBuilder_ == null) { - if (constraintCase_ == 7 && constraint_ != context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.newBuilder((context.ContextOuterClass.Constraint_SLA_Latency) constraint_).mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 7) { - slaLatencyBuilder_.mergeFrom(value); - } - slaLatencyBuilder_.setMessage(value); - } - constraintCase_ = 7; - return this; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public Builder clearSlaLatency() { - if (slaLatencyBuilder_ == null) { - if (constraintCase_ == 7) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 7) { - constraintCase_ = 0; - constraint_ = null; - } - slaLatencyBuilder_.clear(); - } - return this; + // Construct using context.ContextOuterClass.TeraFlowController.newBuilder() + private Builder() { } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public context.ContextOuterClass.Constraint_SLA_Latency.Builder getSlaLatencyBuilder() { - return getSlaLatencyFieldBuilder().getBuilder(); + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() { - if ((constraintCase_ == 7) && (slaLatencyBuilder_ != null)) { - return slaLatencyBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + public Builder clear() { + super.clear(); + bitField0_ = 0; + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); + contextIdBuilder_ = null; } + ipAddress_ = ""; + port_ = 0; + return this; } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3 getSlaLatencyFieldBuilder() { - if (slaLatencyBuilder_ == null) { - if (!(constraintCase_ == 7)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } - slaLatencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Latency) constraint_, getParentForChildren(), isClean()); - constraint_ = null; - } - constraintCase_ = 7; - onChanged(); - ; - return slaLatencyBuilder_; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; } - private com.google.protobuf.SingleFieldBuilderV3 slaAvailabilityBuilder_; - - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return Whether the slaAvailability field is set. - */ @java.lang.Override - public boolean hasSlaAvailability() { - return constraintCase_ == 8; + public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { + return context.ContextOuterClass.TeraFlowController.getDefaultInstance(); } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return The slaAvailability. - */ @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() { - if (slaAvailabilityBuilder_ == null) { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } else { - if (constraintCase_ == 8) { - return slaAvailabilityBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + public context.ContextOuterClass.TeraFlowController build() { + context.ContextOuterClass.TeraFlowController result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { - if (slaAvailabilityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - slaAvailabilityBuilder_.setMessage(value); + @java.lang.Override + public context.ContextOuterClass.TeraFlowController buildPartial() { + context.ContextOuterClass.TeraFlowController result = new context.ContextOuterClass.TeraFlowController(this); + if (bitField0_ != 0) { + buildPartial0(result); } - constraintCase_ = 8; - return this; + onBuilt(); + return result; } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability.Builder builderForValue) { - if (slaAvailabilityBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - slaAvailabilityBuilder_.setMessage(builderForValue.build()); + private void buildPartial0(context.ContextOuterClass.TeraFlowController result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ipAddress_ = ipAddress_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.port_ = port_; } - constraintCase_ = 8; - return this; } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder mergeSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { - if (slaAvailabilityBuilder_ == null) { - if (constraintCase_ == 8 && constraint_ != context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.newBuilder((context.ContextOuterClass.Constraint_SLA_Availability) constraint_).mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TeraFlowController) { + return mergeFrom((context.ContextOuterClass.TeraFlowController) other); } else { - if (constraintCase_ == 8) { - slaAvailabilityBuilder_.mergeFrom(value); - } - slaAvailabilityBuilder_.setMessage(value); + super.mergeFrom(other); + return this; } - constraintCase_ = 8; - return this; } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder clearSlaAvailability() { - if (slaAvailabilityBuilder_ == null) { - if (constraintCase_ == 8) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 8) { - constraintCase_ = 0; - constraint_ = null; - } - slaAvailabilityBuilder_.clear(); + public Builder mergeFrom(context.ContextOuterClass.TeraFlowController other) { + if (other == context.ContextOuterClass.TeraFlowController.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + bitField0_ |= 0x00000002; + onChanged(); } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); return this; } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public context.ContextOuterClass.Constraint_SLA_Availability.Builder getSlaAvailabilityBuilder() { - return getSlaAvailabilityFieldBuilder().getBuilder(); + @java.lang.Override + public final boolean isInitialized() { + return true; } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() { - if ((constraintCase_ == 8) && (slaAvailabilityBuilder_ != null)) { - return slaAvailabilityBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } - } - - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3 getSlaAvailabilityFieldBuilder() { - if (slaAvailabilityBuilder_ == null) { - if (!(constraintCase_ == 8)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 24: + { + port_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) } - slaAvailabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Availability) constraint_, getParentForChildren(), isClean()); - constraint_ = null; + // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); } - constraintCase_ = 8; - onChanged(); - ; - return slaAvailabilityBuilder_; + // finally + return this; } - private com.google.protobuf.SingleFieldBuilderV3 slaIsolationBuilder_; + private int bitField0_; + + private context.ContextOuterClass.ContextId contextId_; + + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return Whether the slaIsolation field is set. + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. */ - @java.lang.Override - public boolean hasSlaIsolation() { - return constraintCase_ == 9; + public boolean hasContextId() { + return ((bitField0_ & 0x00000001) != 0); } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return The slaIsolation. + * .context.ContextId context_id = 1; + * @return The contextId. */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() { - if (slaIsolationBuilder_ == null) { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } else { - if (constraintCase_ == 9) { - return slaIsolationBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + return contextIdBuilder_.getMessage(); } } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { - if (slaIsolationBuilder_ == null) { + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - constraint_ = value; - onChanged(); + contextId_ = value; } else { - slaIsolationBuilder_.setMessage(value); + contextIdBuilder_.setMessage(value); } - constraintCase_ = 9; + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder builderForValue) { - if (slaIsolationBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); } else { - slaIsolationBuilder_.setMessage(builderForValue.build()); + contextIdBuilder_.setMessage(builderForValue.build()); } - constraintCase_ = 9; + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - public Builder mergeSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { - if (slaIsolationBuilder_ == null) { - if (constraintCase_ == 9 && constraint_ != context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.newBuilder((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_).mergeFrom(value).buildPartial(); + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { + getContextIdBuilder().mergeFrom(value); } else { - constraint_ = value; + contextId_ = value; } - onChanged(); } else { - if (constraintCase_ == 9) { - slaIsolationBuilder_.mergeFrom(value); - } - slaIsolationBuilder_.setMessage(value); + contextIdBuilder_.mergeFrom(value); } - constraintCase_ = 9; + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - public Builder clearSlaIsolation() { - if (slaIsolationBuilder_ == null) { - if (constraintCase_ == 9) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 9) { - constraintCase_ = 0; - constraint_ = null; - } - slaIsolationBuilder_.clear(); + public Builder clearContextId() { + bitField0_ = (bitField0_ & ~0x00000001); + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); + contextIdBuilder_ = null; } + onChanged(); return this; } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - public context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder getSlaIsolationBuilder() { - return getSlaIsolationFieldBuilder().getBuilder(); + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getContextIdFieldBuilder().getBuilder(); } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() { - if ((constraintCase_ == 9) && (slaIsolationBuilder_ != null)) { - return slaIsolationBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); } else { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } } /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * .context.ContextId context_id = 1; */ - private com.google.protobuf.SingleFieldBuilderV3 getSlaIsolationFieldBuilder() { - if (slaIsolationBuilder_ == null) { - if (!(constraintCase_ == 9)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } - slaIsolationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_, getParentForChildren(), isClean()); - constraint_ = null; + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; } - constraintCase_ = 9; - onChanged(); - ; - return slaIsolationBuilder_; + return contextIdBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3 exclusionsBuilder_; - - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return Whether the exclusions field is set. - */ - @java.lang.Override - public boolean hasExclusions() { - return constraintCase_ == 10; - } + private java.lang.Object ipAddress_ = ""; /** - * .context.Constraint_Exclusions exclusions = 10; - * @return The exclusions. + * string ip_address = 2; + * @return The ipAddress. */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Exclusions getExclusions() { - if (exclusionsBuilder_ == null) { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } else { - if (constraintCase_ == 10) { - return exclusionsBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; } } /** - * .context.Constraint_Exclusions exclusions = 10; + * string ip_address = 2; + * @return The bytes for ipAddress. */ - public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions value) { - if (exclusionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; } else { - exclusionsBuilder_.setMessage(value); + return (com.google.protobuf.ByteString) ref; } - constraintCase_ = 10; - return this; } /** - * .context.Constraint_Exclusions exclusions = 10; + * string ip_address = 2; + * @param value The ipAddress to set. + * @return This builder for chaining. */ - public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions.Builder builderForValue) { - if (exclusionsBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - exclusionsBuilder_.setMessage(builderForValue.build()); + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - constraintCase_ = 10; + ipAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); return this; } /** - * .context.Constraint_Exclusions exclusions = 10; + * string ip_address = 2; + * @return This builder for chaining. */ - public Builder mergeExclusions(context.ContextOuterClass.Constraint_Exclusions value) { - if (exclusionsBuilder_ == null) { - if (constraintCase_ == 10 && constraint_ != context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_Exclusions.newBuilder((context.ContextOuterClass.Constraint_Exclusions) constraint_).mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 10) { - exclusionsBuilder_.mergeFrom(value); - } - exclusionsBuilder_.setMessage(value); - } - constraintCase_ = 10; + public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); return this; } /** - * .context.Constraint_Exclusions exclusions = 10; + * string ip_address = 2; + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. */ - public Builder clearExclusions() { - if (exclusionsBuilder_ == null) { - if (constraintCase_ == 10) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 10) { - constraintCase_ = 0; - constraint_ = null; - } - exclusionsBuilder_.clear(); + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ipAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); return this; } + private int port_; + /** - * .context.Constraint_Exclusions exclusions = 10; + * uint32 port = 3; + * @return The port. */ - public context.ContextOuterClass.Constraint_Exclusions.Builder getExclusionsBuilder() { - return getExclusionsFieldBuilder().getBuilder(); + @java.lang.Override + public int getPort() { + return port_; } /** - * .context.Constraint_Exclusions exclusions = 10; + * uint32 port = 3; + * @param value The port to set. + * @return This builder for chaining. */ - @java.lang.Override - public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() { - if ((constraintCase_ == 10) && (exclusionsBuilder_ != null)) { - return exclusionsBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } + public Builder setPort(int value) { + port_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } /** - * .context.Constraint_Exclusions exclusions = 10; + * uint32 port = 3; + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3 getExclusionsFieldBuilder() { - if (exclusionsBuilder_ == null) { - if (!(constraintCase_ == 10)) { - constraint_ = context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } - exclusionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Exclusions) constraint_, getParentForChildren(), isClean()); - constraint_ = null; - } - constraintCase_ = 10; + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000004); + port_ = 0; onChanged(); - ; - return exclusionsBuilder_; + return this; } @java.lang.Override @@ -70638,44 +71867,54 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.Constraint) + // @@protoc_insertion_point(builder_scope:context.TeraFlowController) } - // @@protoc_insertion_point(class_scope:context.Constraint) - private static final context.ContextOuterClass.Constraint DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.TeraFlowController) + private static final context.ContextOuterClass.TeraFlowController DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint(); + DEFAULT_INSTANCE = new context.ContextOuterClass.TeraFlowController(); } - public static context.ContextOuterClass.Constraint getDefaultInstance() { + public static context.ContextOuterClass.TeraFlowController getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public Constraint parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Constraint(input, extensionRegistry); + public TeraFlowController parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.Constraint getDefaultInstanceForType() { + public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface TeraFlowControllerOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TeraFlowController) + public interface AuthenticationResultOrBuilder extends // @@protoc_insertion_point(interface_extends:context.AuthenticationResult) com.google.protobuf.MessageOrBuilder { /** @@ -70696,120 +71935,41 @@ public final class ContextOuterClass { context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); /** - * string ip_address = 2; - * @return The ipAddress. - */ - java.lang.String getIpAddress(); - - /** - * string ip_address = 2; - * @return The bytes for ipAddress. - */ - com.google.protobuf.ByteString getIpAddressBytes(); - - /** - * uint32 port = 3; - * @return The port. + * bool authenticated = 2; + * @return The authenticated. */ - int getPort(); + boolean getAuthenticated(); } /** - *
-     * ----- Miscellaneous -------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.TeraFlowController} + * Protobuf type {@code context.AuthenticationResult} */ - public static final class TeraFlowController extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TeraFlowController) - TeraFlowControllerOrBuilder { + public static final class AuthenticationResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.AuthenticationResult) + AuthenticationResultOrBuilder { private static final long serialVersionUID = 0L; - // Use TeraFlowController.newBuilder() to construct. - private TeraFlowController(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use AuthenticationResult.newBuilder() to construct. + private AuthenticationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private TeraFlowController() { - ipAddress_ = ""; + private AuthenticationResult() { } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TeraFlowController(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TeraFlowController(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ContextId.Builder subBuilder = null; - if (contextId_ != null) { - subBuilder = contextId_.toBuilder(); - } - contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextId_); - contextId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ipAddress_ = s; - break; - } - case 24: - { - port_ = input.readUInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + return new AuthenticationResult(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); + return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); } public static final int CONTEXT_ID_FIELD_NUMBER = 1; @@ -70839,57 +71999,20 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } - - public static final int IP_ADDRESS_FIELD_NUMBER = 2; - - private volatile java.lang.Object ipAddress_; - - /** - * string ip_address = 2; - * @return The ipAddress. - */ - @java.lang.Override - public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ipAddress_ = s; - return s; - } - } - - /** - * string ip_address = 2; - * @return The bytes for ipAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } - public static final int PORT_FIELD_NUMBER = 3; + public static final int AUTHENTICATED_FIELD_NUMBER = 2; - private int port_; + private boolean authenticated_ = false; /** - * uint32 port = 3; - * @return The port. + * bool authenticated = 2; + * @return The authenticated. */ @java.lang.Override - public int getPort() { - return port_; + public boolean getAuthenticated() { + return authenticated_; } private byte memoizedIsInitialized = -1; @@ -70910,13 +72033,10 @@ public final class ContextOuterClass { if (contextId_ != null) { output.writeMessage(1, getContextId()); } - if (!getIpAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_); - } - if (port_ != 0) { - output.writeUInt32(3, port_); + if (authenticated_ != false) { + output.writeBool(2, authenticated_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -70928,13 +72048,10 @@ public final class ContextOuterClass { if (contextId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); } - if (!getIpAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_); - } - if (port_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, port_); + if (authenticated_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, authenticated_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -70944,21 +72061,19 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.TeraFlowController)) { + if (!(obj instanceof context.ContextOuterClass.AuthenticationResult)) { return super.equals(obj); } - context.ContextOuterClass.TeraFlowController other = (context.ContextOuterClass.TeraFlowController) obj; + context.ContextOuterClass.AuthenticationResult other = (context.ContextOuterClass.AuthenticationResult) obj; if (hasContextId() != other.hasContextId()) return false; if (hasContextId()) { if (!getContextId().equals(other.getContextId())) return false; } - if (!getIpAddress().equals(other.getIpAddress())) - return false; - if (getPort() != other.getPort()) + if (getAuthenticated() != other.getAuthenticated()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -70974,60 +72089,58 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; hash = (53 * hash) + getContextId().hashCode(); } - hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getIpAddress().hashCode(); - hash = (37 * hash) + PORT_FIELD_NUMBER; - hash = (53 * hash) + getPort(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (37 * hash) + AUTHENTICATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAuthenticated()); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.TeraFlowController parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.TeraFlowController parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -71040,7 +72153,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.TeraFlowController prototype) { + public static Builder newBuilder(context.ContextOuterClass.AuthenticationResult prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -71056,66 +72169,54 @@ public final class ContextOuterClass { } /** - *
-         * ----- Miscellaneous -------------------------------------------------------------------------------------------------
-         * 
- * - * Protobuf type {@code context.TeraFlowController} + * Protobuf type {@code context.AuthenticationResult} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TeraFlowController) - context.ContextOuterClass.TeraFlowControllerOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.AuthenticationResult) + context.ContextOuterClass.AuthenticationResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); + return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); } - // Construct using context.ContextOuterClass.TeraFlowController.newBuilder() + // Construct using context.ContextOuterClass.AuthenticationResult.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; + bitField0_ = 0; + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } - ipAddress_ = ""; - port_ = 0; + authenticated_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; } @java.lang.Override - public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { - return context.ContextOuterClass.TeraFlowController.getDefaultInstance(); + public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { + return context.ContextOuterClass.AuthenticationResult.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.TeraFlowController build() { - context.ContextOuterClass.TeraFlowController result = buildPartial(); + public context.ContextOuterClass.AuthenticationResult build() { + context.ContextOuterClass.AuthenticationResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -71123,73 +72224,45 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.TeraFlowController buildPartial() { - context.ContextOuterClass.TeraFlowController result = new context.ContextOuterClass.TeraFlowController(this); - if (contextIdBuilder_ == null) { - result.contextId_ = contextId_; - } else { - result.contextId_ = contextIdBuilder_.build(); + public context.ContextOuterClass.AuthenticationResult buildPartial() { + context.ContextOuterClass.AuthenticationResult result = new context.ContextOuterClass.AuthenticationResult(this); + if (bitField0_ != 0) { + buildPartial0(result); } - result.ipAddress_ = ipAddress_; - result.port_ = port_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.AuthenticationResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.authenticated_ = authenticated_; + } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TeraFlowController) { - return mergeFrom((context.ContextOuterClass.TeraFlowController) other); + if (other instanceof context.ContextOuterClass.AuthenticationResult) { + return mergeFrom((context.ContextOuterClass.AuthenticationResult) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.TeraFlowController other) { - if (other == context.ContextOuterClass.TeraFlowController.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.AuthenticationResult other) { + if (other == context.ContextOuterClass.AuthenticationResult.getDefaultInstance()) return this; if (other.hasContextId()) { mergeContextId(other.getContextId()); } - if (!other.getIpAddress().isEmpty()) { - ipAddress_ = other.ipAddress_; - onChanged(); - } - if (other.getPort() != 0) { - setPort(other.getPort()); + if (other.getAuthenticated() != false) { + setAuthenticated(other.getAuthenticated()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -71201,20 +72274,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.TeraFlowController parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 16: + { + authenticated_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TeraFlowController) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.ContextId contextId_; private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; @@ -71224,7 +72331,7 @@ public final class ContextOuterClass { * @return Whether the contextId field is set. */ public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -71248,10 +72355,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } contextId_ = value; - onChanged(); } else { contextIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -71261,10 +72369,11 @@ public final class ContextOuterClass { public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { if (contextIdBuilder_ == null) { contextId_ = builderForValue.build(); - onChanged(); } else { contextIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -71273,15 +72382,16 @@ public final class ContextOuterClass { */ public Builder mergeContextId(context.ContextOuterClass.ContextId value) { if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { + getContextIdBuilder().mergeFrom(value); } else { contextId_ = value; } - onChanged(); } else { contextIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -71289,13 +72399,13 @@ public final class ContextOuterClass { * .context.ContextId context_id = 1; */ public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } + onChanged(); return this; } @@ -71303,6 +72413,7 @@ public final class ContextOuterClass { * .context.ContextId context_id = 1; */ public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getContextIdFieldBuilder().getBuilder(); } @@ -71329,106 +72440,36 @@ public final class ContextOuterClass { return contextIdBuilder_; } - private java.lang.Object ipAddress_ = ""; - - /** - * string ip_address = 2; - * @return The ipAddress. - */ - public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ipAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * string ip_address = 2; - * @return The bytes for ipAddress. - */ - public com.google.protobuf.ByteString getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * string ip_address = 2; - * @param value The ipAddress to set. - * @return This builder for chaining. - */ - public Builder setIpAddress(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ipAddress_ = value; - onChanged(); - return this; - } - - /** - * string ip_address = 2; - * @return This builder for chaining. - */ - public Builder clearIpAddress() { - ipAddress_ = getDefaultInstance().getIpAddress(); - onChanged(); - return this; - } - - /** - * string ip_address = 2; - * @param value The bytes for ipAddress to set. - * @return This builder for chaining. - */ - public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ipAddress_ = value; - onChanged(); - return this; - } - - private int port_; + private boolean authenticated_; /** - * uint32 port = 3; - * @return The port. + * bool authenticated = 2; + * @return The authenticated. */ @java.lang.Override - public int getPort() { - return port_; + public boolean getAuthenticated() { + return authenticated_; } /** - * uint32 port = 3; - * @param value The port to set. + * bool authenticated = 2; + * @param value The authenticated to set. * @return This builder for chaining. */ - public Builder setPort(int value) { - port_ = value; + public Builder setAuthenticated(boolean value) { + authenticated_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * uint32 port = 3; + * bool authenticated = 2; * @return This builder for chaining. */ - public Builder clearPort() { - port_ = 0; + public Builder clearAuthenticated() { + bitField0_ = (bitField0_ & ~0x00000002); + authenticated_ = false; onChanged(); return this; } @@ -71442,198 +72483,141 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.TeraFlowController) + // @@protoc_insertion_point(builder_scope:context.AuthenticationResult) } - // @@protoc_insertion_point(class_scope:context.TeraFlowController) - private static final context.ContextOuterClass.TeraFlowController DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.AuthenticationResult) + private static final context.ContextOuterClass.AuthenticationResult DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TeraFlowController(); + DEFAULT_INSTANCE = new context.ContextOuterClass.AuthenticationResult(); } - public static context.ContextOuterClass.TeraFlowController getDefaultInstance() { + public static context.ContextOuterClass.AuthenticationResult getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public TeraFlowController parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TeraFlowController(input, extensionRegistry); + public AuthenticationResult parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { + public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface AuthenticationResultOrBuilder extends // @@protoc_insertion_point(interface_extends:context.AuthenticationResult) + public interface OpticalConfigIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigId) com.google.protobuf.MessageOrBuilder { /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - - /** - * .context.ContextId context_id = 1; + * string opticalconfig_uuid = 1; + * @return The opticalconfigUuid. */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + java.lang.String getOpticalconfigUuid(); /** - * bool authenticated = 2; - * @return The authenticated. + * string opticalconfig_uuid = 1; + * @return The bytes for opticalconfigUuid. */ - boolean getAuthenticated(); + com.google.protobuf.ByteString getOpticalconfigUuidBytes(); } /** - * Protobuf type {@code context.AuthenticationResult} + *
+     * ---------------- Experimental ------------------------
+     * 
+ * + * Protobuf type {@code context.OpticalConfigId} */ - public static final class AuthenticationResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.AuthenticationResult) - AuthenticationResultOrBuilder { + public static final class OpticalConfigId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigId) + OpticalConfigIdOrBuilder { private static final long serialVersionUID = 0L; - // Use AuthenticationResult.newBuilder() to construct. - private AuthenticationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalConfigId.newBuilder() to construct. + private OpticalConfigId(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private AuthenticationResult() { + private OpticalConfigId() { + opticalconfigUuid_ = ""; } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AuthenticationResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AuthenticationResult(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ContextId.Builder subBuilder = null; - if (contextId_ != null) { - subBuilder = contextId_.toBuilder(); - } - contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextId_); - contextId_ = subBuilder.buildPartial(); - } - break; - } - case 16: - { - authenticated_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + return new OpticalConfigId(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfigId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigId.class, context.ContextOuterClass.OpticalConfigId.Builder.class); } - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - - private context.ContextOuterClass.ContextId contextId_; - - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } + public static final int OPTICALCONFIG_UUID_FIELD_NUMBER = 1; - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } + @SuppressWarnings("serial") + private volatile java.lang.Object opticalconfigUuid_ = ""; /** - * .context.ContextId context_id = 1; + * string opticalconfig_uuid = 1; + * @return The opticalconfigUuid. */ @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); + public java.lang.String getOpticalconfigUuid() { + java.lang.Object ref = opticalconfigUuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + opticalconfigUuid_ = s; + return s; + } } - public static final int AUTHENTICATED_FIELD_NUMBER = 2; - - private boolean authenticated_; - /** - * bool authenticated = 2; - * @return The authenticated. + * string opticalconfig_uuid = 1; + * @return The bytes for opticalconfigUuid. */ @java.lang.Override - public boolean getAuthenticated() { - return authenticated_; + public com.google.protobuf.ByteString getOpticalconfigUuidBytes() { + java.lang.Object ref = opticalconfigUuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + opticalconfigUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -71651,13 +72635,10 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (authenticated_ != false) { - output.writeBool(2, authenticated_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opticalconfigUuid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, opticalconfigUuid_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -71666,13 +72647,10 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); - } - if (authenticated_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, authenticated_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opticalconfigUuid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, opticalconfigUuid_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -71682,19 +72660,13 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.AuthenticationResult)) { + if (!(obj instanceof context.ContextOuterClass.OpticalConfigId)) { return super.equals(obj); } - context.ContextOuterClass.AuthenticationResult other = (context.ContextOuterClass.AuthenticationResult) obj; - if (hasContextId() != other.hasContextId()) - return false; - if (hasContextId()) { - if (!getContextId().equals(other.getContextId())) - return false; - } - if (getAuthenticated() != other.getAuthenticated()) + context.ContextOuterClass.OpticalConfigId other = (context.ContextOuterClass.OpticalConfigId) obj; + if (!getOpticalconfigUuid().equals(other.getOpticalconfigUuid())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -71706,62 +72678,58 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - hash = (37 * hash) + AUTHENTICATED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAuthenticated()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (37 * hash) + OPTICALCONFIG_UUID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigUuid().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.AuthenticationResult parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -71774,7 +72742,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.AuthenticationResult prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalConfigId prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -71790,61 +72758,53 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.AuthenticationResult} + *
+         * ---------------- Experimental ------------------------
+         * 
+ * + * Protobuf type {@code context.OpticalConfigId} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.AuthenticationResult) - context.ContextOuterClass.AuthenticationResultOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigId) + context.ContextOuterClass.OpticalConfigIdOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfigId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigId.class, context.ContextOuterClass.OpticalConfigId.Builder.class); } - // Construct using context.ContextOuterClass.AuthenticationResult.newBuilder() + // Construct using context.ContextOuterClass.OpticalConfigId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - authenticated_ = false; + bitField0_ = 0; + opticalconfigUuid_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; } @java.lang.Override - public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { - return context.ContextOuterClass.AuthenticationResult.getDefaultInstance(); + public context.ContextOuterClass.OpticalConfigId getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfigId.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.AuthenticationResult build() { - context.ContextOuterClass.AuthenticationResult result = buildPartial(); + public context.ContextOuterClass.OpticalConfigId build() { + context.ContextOuterClass.OpticalConfigId result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -71852,68 +72812,41 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.AuthenticationResult buildPartial() { - context.ContextOuterClass.AuthenticationResult result = new context.ContextOuterClass.AuthenticationResult(this); - if (contextIdBuilder_ == null) { - result.contextId_ = contextId_; - } else { - result.contextId_ = contextIdBuilder_.build(); + public context.ContextOuterClass.OpticalConfigId buildPartial() { + context.ContextOuterClass.OpticalConfigId result = new context.ContextOuterClass.OpticalConfigId(this); + if (bitField0_ != 0) { + buildPartial0(result); } - result.authenticated_ = authenticated_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.OpticalConfigId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.opticalconfigUuid_ = opticalconfigUuid_; + } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.AuthenticationResult) { - return mergeFrom((context.ContextOuterClass.AuthenticationResult) other); + if (other instanceof context.ContextOuterClass.OpticalConfigId) { + return mergeFrom((context.ContextOuterClass.OpticalConfigId) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.AuthenticationResult other) { - if (other == context.ContextOuterClass.AuthenticationResult.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalConfigId other) { + if (other == context.ContextOuterClass.OpticalConfigId.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (other.getAuthenticated() != false) { - setAuthenticated(other.getAuthenticated()); + if (!other.getOpticalconfigUuid().isEmpty()) { + opticalconfigUuid_ = other.opticalconfigUuid_; + bitField0_ |= 0x00000001; + onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -71925,162 +72858,118 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.AuthenticationResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + opticalconfigUuid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.AuthenticationResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.ContextId contextId_; - - private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; - - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; onChanged(); - } else { - contextIdBuilder_.setMessage(value); } + // finally return this; } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - return this; - } + private int bitField0_; - /** - * .context.ContextId context_id = 1; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - return this; - } + private java.lang.Object opticalconfigUuid_ = ""; /** - * .context.ContextId context_id = 1; + * string opticalconfig_uuid = 1; + * @return The opticalconfigUuid. */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); + public java.lang.String getOpticalconfigUuid() { + java.lang.Object ref = opticalconfigUuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + opticalconfigUuid_ = s; + return s; } else { - contextId_ = null; - contextIdBuilder_ = null; + return (java.lang.String) ref; } - return this; - } - - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - onChanged(); - return getContextIdFieldBuilder().getBuilder(); } /** - * .context.ContextId context_id = 1; + * string opticalconfig_uuid = 1; + * @return The bytes for opticalconfigUuid. */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); + public com.google.protobuf.ByteString getOpticalconfigUuidBytes() { + java.lang.Object ref = opticalconfigUuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + opticalconfigUuid_ = b; + return b; } else { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + return (com.google.protobuf.ByteString) ref; } } /** - * .context.ContextId context_id = 1; + * string opticalconfig_uuid = 1; + * @param value The opticalconfigUuid to set. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); - contextId_ = null; + public Builder setOpticalconfigUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - return contextIdBuilder_; - } - - private boolean authenticated_; - - /** - * bool authenticated = 2; - * @return The authenticated. - */ - @java.lang.Override - public boolean getAuthenticated() { - return authenticated_; + opticalconfigUuid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } /** - * bool authenticated = 2; - * @param value The authenticated to set. + * string opticalconfig_uuid = 1; * @return This builder for chaining. */ - public Builder setAuthenticated(boolean value) { - authenticated_ = value; + public Builder clearOpticalconfigUuid() { + opticalconfigUuid_ = getDefaultInstance().getOpticalconfigUuid(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** - * bool authenticated = 2; + * string opticalconfig_uuid = 1; + * @param value The bytes for opticalconfigUuid to set. * @return This builder for chaining. */ - public Builder clearAuthenticated() { - authenticated_ = false; + public Builder setOpticalconfigUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + opticalconfigUuid_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -72094,176 +72983,233 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.AuthenticationResult) + // @@protoc_insertion_point(builder_scope:context.OpticalConfigId) } - // @@protoc_insertion_point(class_scope:context.AuthenticationResult) - private static final context.ContextOuterClass.AuthenticationResult DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalConfigId) + private static final context.ContextOuterClass.OpticalConfigId DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.AuthenticationResult(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigId(); } - public static context.ContextOuterClass.AuthenticationResult getDefaultInstance() { + public static context.ContextOuterClass.OpticalConfigId getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public AuthenticationResult parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AuthenticationResult(input, extensionRegistry); + public OpticalConfigId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalConfigId getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OpticalConfigIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigId) + public interface OpticalConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfig) com.google.protobuf.MessageOrBuilder { /** - * string opticalconfig_uuid = 1; - * @return The opticalconfigUuid. + * .context.OpticalConfigId opticalconfig_id = 1; + * @return Whether the opticalconfigId field is set. */ - java.lang.String getOpticalconfigUuid(); + boolean hasOpticalconfigId(); /** - * string opticalconfig_uuid = 1; - * @return The bytes for opticalconfigUuid. + * .context.OpticalConfigId opticalconfig_id = 1; + * @return The opticalconfigId. */ - com.google.protobuf.ByteString getOpticalconfigUuidBytes(); - } + context.ContextOuterClass.OpticalConfigId getOpticalconfigId(); - /** - *
-     * ---------------- Experimental ------------------------
-     * 
- * - * Protobuf type {@code context.OpticalConfigId} + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder(); + + /** + * string config = 2; + * @return The config. + */ + java.lang.String getConfig(); + + /** + * string config = 2; + * @return The bytes for config. + */ + com.google.protobuf.ByteString getConfigBytes(); + + /** + * .context.DeviceId device_id = 3; + * @return Whether the deviceId field is set. + */ + boolean hasDeviceId(); + + /** + * .context.DeviceId device_id = 3; + * @return The deviceId. + */ + context.ContextOuterClass.DeviceId getDeviceId(); + + /** + * .context.DeviceId device_id = 3; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + } + + /** + * Protobuf type {@code context.OpticalConfig} */ - public static final class OpticalConfigId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigId) - OpticalConfigIdOrBuilder { + public static final class OpticalConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfig) + OpticalConfigOrBuilder { private static final long serialVersionUID = 0L; - // Use OpticalConfigId.newBuilder() to construct. - private OpticalConfigId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalConfig.newBuilder() to construct. + private OpticalConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OpticalConfigId() { - opticalconfigUuid_ = ""; + private OpticalConfig() { + config_ = ""; } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OpticalConfigId(); + return new OpticalConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfig.class, context.ContextOuterClass.OpticalConfig.Builder.class); } - private OpticalConfigId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - opticalconfigUuid_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + public static final int OPTICALCONFIG_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.OpticalConfigId opticalconfigId_; + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return Whether the opticalconfigId field is set. + */ + @java.lang.Override + public boolean hasOpticalconfigId() { + return opticalconfigId_ != null; } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return The opticalconfigId. + */ + @java.lang.Override + public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalConfigId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigId.class, context.ContextOuterClass.OpticalConfigId.Builder.class); + public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; } - public static final int OPTICALCONFIG_UUID_FIELD_NUMBER = 1; + public static final int CONFIG_FIELD_NUMBER = 2; - private volatile java.lang.Object opticalconfigUuid_; + @SuppressWarnings("serial") + private volatile java.lang.Object config_ = ""; /** - * string opticalconfig_uuid = 1; - * @return The opticalconfigUuid. + * string config = 2; + * @return The config. */ @java.lang.Override - public java.lang.String getOpticalconfigUuid() { - java.lang.Object ref = opticalconfigUuid_; + public java.lang.String getConfig() { + java.lang.Object ref = config_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - opticalconfigUuid_ = s; + config_ = s; return s; } } /** - * string opticalconfig_uuid = 1; - * @return The bytes for opticalconfigUuid. + * string config = 2; + * @return The bytes for config. */ @java.lang.Override - public com.google.protobuf.ByteString getOpticalconfigUuidBytes() { - java.lang.Object ref = opticalconfigUuid_; + public com.google.protobuf.ByteString getConfigBytes() { + java.lang.Object ref = config_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - opticalconfigUuid_ = b; + config_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + public static final int DEVICE_ID_FIELD_NUMBER = 3; + + private context.ContextOuterClass.DeviceId deviceId_; + + /** + * .context.DeviceId device_id = 3; + * @return Whether the deviceId field is set. + */ + @java.lang.Override + public boolean hasDeviceId() { + return deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 3; + * @return The deviceId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceId() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + + /** + * .context.DeviceId device_id = 3; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -72279,10 +73225,16 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getOpticalconfigUuidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, opticalconfigUuid_); + if (opticalconfigId_ != null) { + output.writeMessage(1, getOpticalconfigId()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, config_); + } + if (deviceId_ != null) { + output.writeMessage(3, getDeviceId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -72291,10 +73243,16 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!getOpticalconfigUuidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, opticalconfigUuid_); + if (opticalconfigId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpticalconfigId()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, config_); + } + if (deviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDeviceId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -72304,13 +73262,25 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.OpticalConfigId)) { + if (!(obj instanceof context.ContextOuterClass.OpticalConfig)) { return super.equals(obj); } - context.ContextOuterClass.OpticalConfigId other = (context.ContextOuterClass.OpticalConfigId) obj; - if (!getOpticalconfigUuid().equals(other.getOpticalconfigUuid())) + context.ContextOuterClass.OpticalConfig other = (context.ContextOuterClass.OpticalConfig) obj; + if (hasOpticalconfigId() != other.hasOpticalconfigId()) + return false; + if (hasOpticalconfigId()) { + if (!getOpticalconfigId().equals(other.getOpticalconfigId())) + return false; + } + if (!getConfig().equals(other.getConfig())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (hasDeviceId() != other.hasDeviceId()) + return false; + if (hasDeviceId()) { + if (!getDeviceId().equals(other.getDeviceId())) + return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -72322,58 +73292,66 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + OPTICALCONFIG_UUID_FIELD_NUMBER; - hash = (53 * hash) + getOpticalconfigUuid().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + if (hasOpticalconfigId()) { + hash = (37 * hash) + OPTICALCONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigId().hashCode(); + } + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + if (hasDeviceId()) { + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.OpticalConfigId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfig parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfigId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -72386,7 +73364,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.OpticalConfigId prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -72402,59 +73380,59 @@ public final class ContextOuterClass { } /** - *
-         * ---------------- Experimental ------------------------
-         * 
- * - * Protobuf type {@code context.OpticalConfigId} + * Protobuf type {@code context.OpticalConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigId) - context.ContextOuterClass.OpticalConfigIdOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfig) + context.ContextOuterClass.OpticalConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalConfigId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigId.class, context.ContextOuterClass.OpticalConfigId.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfig.class, context.ContextOuterClass.OpticalConfig.Builder.class); } - // Construct using context.ContextOuterClass.OpticalConfigId.newBuilder() + // Construct using context.ContextOuterClass.OpticalConfig.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - opticalconfigUuid_ = ""; + bitField0_ = 0; + opticalconfigId_ = null; + if (opticalconfigIdBuilder_ != null) { + opticalconfigIdBuilder_.dispose(); + opticalconfigIdBuilder_ = null; + } + config_ = ""; + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); + deviceIdBuilder_ = null; + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; } @java.lang.Override - public context.ContextOuterClass.OpticalConfigId getDefaultInstanceForType() { - return context.ContextOuterClass.OpticalConfigId.getDefaultInstance(); + public context.ContextOuterClass.OpticalConfig getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfig.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.OpticalConfigId build() { - context.ContextOuterClass.OpticalConfigId result = buildPartial(); + public context.ContextOuterClass.OpticalConfig build() { + context.ContextOuterClass.OpticalConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -72462,61 +73440,53 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.OpticalConfigId buildPartial() { - context.ContextOuterClass.OpticalConfigId result = new context.ContextOuterClass.OpticalConfigId(this); - result.opticalconfigUuid_ = opticalconfigUuid_; + public context.ContextOuterClass.OpticalConfig buildPartial() { + context.ContextOuterClass.OpticalConfig result = new context.ContextOuterClass.OpticalConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.OpticalConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.opticalconfigId_ = opticalconfigIdBuilder_ == null ? opticalconfigId_ : opticalconfigIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.config_ = config_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deviceId_ = deviceIdBuilder_ == null ? deviceId_ : deviceIdBuilder_.build(); + } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.OpticalConfigId) { - return mergeFrom((context.ContextOuterClass.OpticalConfigId) other); + if (other instanceof context.ContextOuterClass.OpticalConfig) { + return mergeFrom((context.ContextOuterClass.OpticalConfig) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.OpticalConfigId other) { - if (other == context.ContextOuterClass.OpticalConfigId.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalConfig other) { + if (other == context.ContextOuterClass.OpticalConfig.getDefaultInstance()) return this; - if (!other.getOpticalconfigUuid().isEmpty()) { - opticalconfigUuid_ = other.opticalconfigUuid_; + if (other.hasOpticalconfigId()) { + mergeOpticalconfigId(other.getOpticalconfigId()); + } + if (!other.getConfig().isEmpty()) { + config_ = other.config_; + bitField0_ |= 0x00000002; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + if (other.hasDeviceId()) { + mergeDeviceId(other.getDeviceId()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -72528,32 +73498,191 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.OpticalConfigId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOpticalconfigIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + config_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + input.readMessage(getDeviceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } + // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.OpticalConfigId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + onChanged(); + } + // finally + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.OpticalConfigId opticalconfigId_; + + private com.google.protobuf.SingleFieldBuilderV3 opticalconfigIdBuilder_; + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return Whether the opticalconfigId field is set. + */ + public boolean hasOpticalconfigId() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return The opticalconfigId. + */ + public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { + if (opticalconfigIdBuilder_ == null) { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } else { + return opticalconfigIdBuilder_.getMessage(); + } + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { + if (opticalconfigIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + opticalconfigId_ = value; + } else { + opticalconfigIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } - private java.lang.Object opticalconfigUuid_ = ""; + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId.Builder builderForValue) { + if (opticalconfigIdBuilder_ == null) { + opticalconfigId_ = builderForValue.build(); + } else { + opticalconfigIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } /** - * string opticalconfig_uuid = 1; - * @return The opticalconfigUuid. + * .context.OpticalConfigId opticalconfig_id = 1; */ - public java.lang.String getOpticalconfigUuid() { - java.lang.Object ref = opticalconfigUuid_; + public Builder mergeOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { + if (opticalconfigIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && opticalconfigId_ != null && opticalconfigId_ != context.ContextOuterClass.OpticalConfigId.getDefaultInstance()) { + getOpticalconfigIdBuilder().mergeFrom(value); + } else { + opticalconfigId_ = value; + } + } else { + opticalconfigIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder clearOpticalconfigId() { + bitField0_ = (bitField0_ & ~0x00000001); + opticalconfigId_ = null; + if (opticalconfigIdBuilder_ != null) { + opticalconfigIdBuilder_.dispose(); + opticalconfigIdBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public context.ContextOuterClass.OpticalConfigId.Builder getOpticalconfigIdBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOpticalconfigIdFieldBuilder().getBuilder(); + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { + if (opticalconfigIdBuilder_ != null) { + return opticalconfigIdBuilder_.getMessageOrBuilder(); + } else { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } + } + + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getOpticalconfigIdFieldBuilder() { + if (opticalconfigIdBuilder_ == null) { + opticalconfigIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalconfigId(), getParentForChildren(), isClean()); + opticalconfigId_ = null; + } + return opticalconfigIdBuilder_; + } + + private java.lang.Object config_ = ""; + + /** + * string config = 2; + * @return The config. + */ + public java.lang.String getConfig() { + java.lang.Object ref = config_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - opticalconfigUuid_ = s; + config_ = s; return s; } else { return (java.lang.String) ref; @@ -72561,14 +73690,14 @@ public final class ContextOuterClass { } /** - * string opticalconfig_uuid = 1; - * @return The bytes for opticalconfigUuid. + * string config = 2; + * @return The bytes for config. */ - public com.google.protobuf.ByteString getOpticalconfigUuidBytes() { - java.lang.Object ref = opticalconfigUuid_; + public com.google.protobuf.ByteString getConfigBytes() { + java.lang.Object ref = config_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - opticalconfigUuid_ = b; + config_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -72576,42 +73705,163 @@ public final class ContextOuterClass { } /** - * string opticalconfig_uuid = 1; - * @param value The opticalconfigUuid to set. - * @return This builder for chaining. + * string config = 2; + * @param value The config to set. + * @return This builder for chaining. + */ + public Builder setConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * string config = 2; + * @return This builder for chaining. + */ + public Builder clearConfig() { + config_ = getDefaultInstance().getConfig(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * string config = 2; + * @param value The bytes for config to set. + * @return This builder for chaining. + */ + public Builder setConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + config_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private context.ContextOuterClass.DeviceId deviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceIdBuilder_; + + /** + * .context.DeviceId device_id = 3; + * @return Whether the deviceId field is set. + */ + public boolean hasDeviceId() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * .context.DeviceId device_id = 3; + * @return The deviceId. + */ + public context.ContextOuterClass.DeviceId getDeviceId() { + if (deviceIdBuilder_ == null) { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } else { + return deviceIdBuilder_.getMessage(); + } + } + + /** + * .context.DeviceId device_id = 3; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceId_ = value; + } else { + deviceIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * .context.DeviceId device_id = 3; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdBuilder_ == null) { + deviceId_ = builderForValue.build(); + } else { + deviceIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * .context.DeviceId device_id = 3; + */ + public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && deviceId_ != null && deviceId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) { + getDeviceIdBuilder().mergeFrom(value); + } else { + deviceId_ = value; + } + } else { + deviceIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * .context.DeviceId device_id = 3; + */ + public Builder clearDeviceId() { + bitField0_ = (bitField0_ & ~0x00000004); + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); + deviceIdBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * .context.DeviceId device_id = 3; */ - public Builder setOpticalconfigUuid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - opticalconfigUuid_ = value; + public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + bitField0_ |= 0x00000004; onChanged(); - return this; + return getDeviceIdFieldBuilder().getBuilder(); } /** - * string opticalconfig_uuid = 1; - * @return This builder for chaining. + * .context.DeviceId device_id = 3; */ - public Builder clearOpticalconfigUuid() { - opticalconfigUuid_ = getDefaultInstance().getOpticalconfigUuid(); - onChanged(); - return this; + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + if (deviceIdBuilder_ != null) { + return deviceIdBuilder_.getMessageOrBuilder(); + } else { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } } /** - * string opticalconfig_uuid = 1; - * @param value The bytes for opticalconfigUuid to set. - * @return This builder for chaining. + * .context.DeviceId device_id = 3; */ - public Builder setOpticalconfigUuidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdFieldBuilder() { + if (deviceIdBuilder_ == null) { + deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceId(), getParentForChildren(), isClean()); + deviceId_ = null; } - checkByteStringIsUtf8(value); - opticalconfigUuid_ = value; - onChanged(); - return this; + return deviceIdBuilder_; } @java.lang.Override @@ -72623,230 +73873,157 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.OpticalConfigId) + // @@protoc_insertion_point(builder_scope:context.OpticalConfig) } - // @@protoc_insertion_point(class_scope:context.OpticalConfigId) - private static final context.ContextOuterClass.OpticalConfigId DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalConfig) + private static final context.ContextOuterClass.OpticalConfig DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigId(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfig(); } - public static context.ContextOuterClass.OpticalConfigId getDefaultInstance() { + public static context.ContextOuterClass.OpticalConfig getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public OpticalConfigId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OpticalConfigId(input, extensionRegistry); + public OpticalConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.OpticalConfigId getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OpticalConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfig) + public interface OpticalConfigListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigList) com.google.protobuf.MessageOrBuilder { /** - * .context.OpticalConfigId opticalconfig_id = 1; - * @return Whether the opticalconfigId field is set. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - boolean hasOpticalconfigId(); + java.util.List getOpticalconfigsList(); /** - * .context.OpticalConfigId opticalconfig_id = 1; - * @return The opticalconfigId. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - context.ContextOuterClass.OpticalConfigId getOpticalconfigId(); + context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index); /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder(); + int getOpticalconfigsCount(); /** - * string config = 2; - * @return The config. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - java.lang.String getConfig(); + java.util.List getOpticalconfigsOrBuilderList(); /** - * string config = 2; - * @return The bytes for config. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - com.google.protobuf.ByteString getConfigBytes(); + context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index); } /** - * Protobuf type {@code context.OpticalConfig} + * Protobuf type {@code context.OpticalConfigList} */ - public static final class OpticalConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfig) - OpticalConfigOrBuilder { + public static final class OpticalConfigList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigList) + OpticalConfigListOrBuilder { private static final long serialVersionUID = 0L; - // Use OpticalConfig.newBuilder() to construct. - private OpticalConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalConfigList.newBuilder() to construct. + private OpticalConfigList(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OpticalConfig() { - config_ = ""; + private OpticalConfigList() { + opticalconfigs_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OpticalConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OpticalConfig(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.OpticalConfigId.Builder subBuilder = null; - if (opticalconfigId_ != null) { - subBuilder = opticalconfigId_.toBuilder(); - } - opticalconfigId_ = input.readMessage(context.ContextOuterClass.OpticalConfigId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(opticalconfigId_); - opticalconfigId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - config_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + return new OpticalConfigList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfig.class, context.ContextOuterClass.OpticalConfig.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfigList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigList.class, context.ContextOuterClass.OpticalConfigList.Builder.class); } - public static final int OPTICALCONFIG_ID_FIELD_NUMBER = 1; + public static final int OPTICALCONFIGS_FIELD_NUMBER = 1; - private context.ContextOuterClass.OpticalConfigId opticalconfigId_; + @SuppressWarnings("serial") + private java.util.List opticalconfigs_; /** - * .context.OpticalConfigId opticalconfig_id = 1; - * @return Whether the opticalconfigId field is set. + * repeated .context.OpticalConfig opticalconfigs = 1; */ @java.lang.Override - public boolean hasOpticalconfigId() { - return opticalconfigId_ != null; + public java.util.List getOpticalconfigsList() { + return opticalconfigs_; } /** - * .context.OpticalConfigId opticalconfig_id = 1; - * @return The opticalconfigId. + * repeated .context.OpticalConfig opticalconfigs = 1; */ @java.lang.Override - public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { - return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + public java.util.List getOpticalconfigsOrBuilderList() { + return opticalconfigs_; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ @java.lang.Override - public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { - return getOpticalconfigId(); + public int getOpticalconfigsCount() { + return opticalconfigs_.size(); } - public static final int CONFIG_FIELD_NUMBER = 2; - - private volatile java.lang.Object config_; - /** - * string config = 2; - * @return The config. + * repeated .context.OpticalConfig opticalconfigs = 1; */ @java.lang.Override - public java.lang.String getConfig() { - java.lang.Object ref = config_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - config_ = s; - return s; - } + public context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index) { + return opticalconfigs_.get(index); } /** - * string config = 2; - * @return The bytes for config. + * repeated .context.OpticalConfig opticalconfigs = 1; */ @java.lang.Override - public com.google.protobuf.ByteString getConfigBytes() { - java.lang.Object ref = config_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - config_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index) { + return opticalconfigs_.get(index); } private byte memoizedIsInitialized = -1; @@ -72864,13 +74041,10 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (opticalconfigId_ != null) { - output.writeMessage(1, getOpticalconfigId()); - } - if (!getConfigBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, config_); + for (int i = 0; i < opticalconfigs_.size(); i++) { + output.writeMessage(1, opticalconfigs_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -72879,13 +74053,10 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (opticalconfigId_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpticalconfigId()); - } - if (!getConfigBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, config_); + for (int i = 0; i < opticalconfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, opticalconfigs_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -72895,19 +74066,13 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.OpticalConfig)) { + if (!(obj instanceof context.ContextOuterClass.OpticalConfigList)) { return super.equals(obj); } - context.ContextOuterClass.OpticalConfig other = (context.ContextOuterClass.OpticalConfig) obj; - if (hasOpticalconfigId() != other.hasOpticalconfigId()) - return false; - if (hasOpticalconfigId()) { - if (!getOpticalconfigId().equals(other.getOpticalconfigId())) - return false; - } - if (!getConfig().equals(other.getConfig())) + context.ContextOuterClass.OpticalConfigList other = (context.ContextOuterClass.OpticalConfigList) obj; + if (!getOpticalconfigsList().equals(other.getOpticalconfigsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -72919,62 +74084,60 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOpticalconfigId()) { - hash = (37 * hash) + OPTICALCONFIG_ID_FIELD_NUMBER; - hash = (53 * hash) + getOpticalconfigId().hashCode(); + if (getOpticalconfigsCount() > 0) { + hash = (37 * hash) + OPTICALCONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigsList().hashCode(); } - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.OpticalConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfig parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -72987,7 +74150,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.OpticalConfig prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalConfigList prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -73003,61 +74166,55 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.OpticalConfig} + * Protobuf type {@code context.OpticalConfigList} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfig) - context.ContextOuterClass.OpticalConfigOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigList) + context.ContextOuterClass.OpticalConfigListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfig.class, context.ContextOuterClass.OpticalConfig.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfigList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigList.class, context.ContextOuterClass.OpticalConfigList.Builder.class); } - // Construct using context.ContextOuterClass.OpticalConfig.newBuilder() + // Construct using context.ContextOuterClass.OpticalConfigList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (opticalconfigIdBuilder_ == null) { - opticalconfigId_ = null; + bitField0_ = 0; + if (opticalconfigsBuilder_ == null) { + opticalconfigs_ = java.util.Collections.emptyList(); } else { - opticalconfigId_ = null; - opticalconfigIdBuilder_ = null; + opticalconfigs_ = null; + opticalconfigsBuilder_.clear(); } - config_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; } @java.lang.Override - public context.ContextOuterClass.OpticalConfig getDefaultInstanceForType() { - return context.ContextOuterClass.OpticalConfig.getDefaultInstance(); + public context.ContextOuterClass.OpticalConfigList getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfigList.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.OpticalConfig build() { - context.ContextOuterClass.OpticalConfig result = buildPartial(); + public context.ContextOuterClass.OpticalConfigList build() { + context.ContextOuterClass.OpticalConfigList result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -73065,69 +74222,70 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.OpticalConfig buildPartial() { - context.ContextOuterClass.OpticalConfig result = new context.ContextOuterClass.OpticalConfig(this); - if (opticalconfigIdBuilder_ == null) { - result.opticalconfigId_ = opticalconfigId_; - } else { - result.opticalconfigId_ = opticalconfigIdBuilder_.build(); + public context.ContextOuterClass.OpticalConfigList buildPartial() { + context.ContextOuterClass.OpticalConfigList result = new context.ContextOuterClass.OpticalConfigList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.config_ = config_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + private void buildPartialRepeatedFields(context.ContextOuterClass.OpticalConfigList result) { + if (opticalconfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + opticalconfigs_ = java.util.Collections.unmodifiableList(opticalconfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.opticalconfigs_ = opticalconfigs_; + } else { + result.opticalconfigs_ = opticalconfigsBuilder_.build(); + } } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.OpticalConfigList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.OpticalConfig) { - return mergeFrom((context.ContextOuterClass.OpticalConfig) other); + if (other instanceof context.ContextOuterClass.OpticalConfigList) { + return mergeFrom((context.ContextOuterClass.OpticalConfigList) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.OpticalConfig other) { - if (other == context.ContextOuterClass.OpticalConfig.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalConfigList other) { + if (other == context.ContextOuterClass.OpticalConfigList.getDefaultInstance()) return this; - if (other.hasOpticalconfigId()) { - mergeOpticalconfigId(other.getOpticalconfigId()); - } - if (!other.getConfig().isEmpty()) { - config_ = other.config_; - onChanged(); + if (opticalconfigsBuilder_ == null) { + if (!other.opticalconfigs_.isEmpty()) { + if (opticalconfigs_.isEmpty()) { + opticalconfigs_ = other.opticalconfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.addAll(other.opticalconfigs_); + } + onChanged(); + } + } else { + if (!other.opticalconfigs_.isEmpty()) { + if (opticalconfigsBuilder_.isEmpty()) { + opticalconfigsBuilder_.dispose(); + opticalconfigsBuilder_ = null; + opticalconfigs_ = other.opticalconfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + opticalconfigsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOpticalconfigsFieldBuilder() : null; + } else { + opticalconfigsBuilder_.addAllMessages(other.opticalconfigs_); + } + } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -73139,204 +74297,287 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.OpticalConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.OpticalConfig m = input.readMessage(context.ContextOuterClass.OpticalConfig.parser(), extensionRegistry); + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(m); + } else { + opticalconfigsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.OpticalConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } - private context.ContextOuterClass.OpticalConfigId opticalconfigId_; + private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3 opticalconfigIdBuilder_; + private java.util.List opticalconfigs_ = java.util.Collections.emptyList(); + + private void ensureOpticalconfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + opticalconfigs_ = new java.util.ArrayList(opticalconfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 opticalconfigsBuilder_; /** - * .context.OpticalConfigId opticalconfig_id = 1; - * @return Whether the opticalconfigId field is set. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public boolean hasOpticalconfigId() { - return opticalconfigIdBuilder_ != null || opticalconfigId_ != null; + public java.util.List getOpticalconfigsList() { + if (opticalconfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(opticalconfigs_); + } else { + return opticalconfigsBuilder_.getMessageList(); + } } /** - * .context.OpticalConfigId opticalconfig_id = 1; - * @return The opticalconfigId. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { - if (opticalconfigIdBuilder_ == null) { - return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + public int getOpticalconfigsCount() { + if (opticalconfigsBuilder_ == null) { + return opticalconfigs_.size(); } else { - return opticalconfigIdBuilder_.getMessage(); + return opticalconfigsBuilder_.getCount(); } } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { - if (opticalconfigIdBuilder_ == null) { + public context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index) { + if (opticalconfigsBuilder_ == null) { + return opticalconfigs_.get(index); + } else { + return opticalconfigsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder setOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig value) { + if (opticalconfigsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - opticalconfigId_ = value; + ensureOpticalconfigsIsMutable(); + opticalconfigs_.set(index, value); onChanged(); } else { - opticalconfigIdBuilder_.setMessage(value); + opticalconfigsBuilder_.setMessage(index, value); } return this; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId.Builder builderForValue) { - if (opticalconfigIdBuilder_ == null) { - opticalconfigId_ = builderForValue.build(); + public Builder setOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig.Builder builderForValue) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.set(index, builderForValue.build()); onChanged(); } else { - opticalconfigIdBuilder_.setMessage(builderForValue.build()); + opticalconfigsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder mergeOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { - if (opticalconfigIdBuilder_ == null) { - if (opticalconfigId_ != null) { - opticalconfigId_ = context.ContextOuterClass.OpticalConfigId.newBuilder(opticalconfigId_).mergeFrom(value).buildPartial(); - } else { - opticalconfigId_ = value; + public Builder addOpticalconfigs(context.ContextOuterClass.OpticalConfig value) { + if (opticalconfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(value); onChanged(); } else { - opticalconfigIdBuilder_.mergeFrom(value); + opticalconfigsBuilder_.addMessage(value); } return this; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder clearOpticalconfigId() { - if (opticalconfigIdBuilder_ == null) { - opticalconfigId_ = null; + public Builder addOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig value) { + if (opticalconfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(index, value); onChanged(); } else { - opticalconfigId_ = null; - opticalconfigIdBuilder_ = null; + opticalconfigsBuilder_.addMessage(index, value); } return this; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public context.ContextOuterClass.OpticalConfigId.Builder getOpticalconfigIdBuilder() { - onChanged(); - return getOpticalconfigIdFieldBuilder().getBuilder(); + public Builder addOpticalconfigs(context.ContextOuterClass.OpticalConfig.Builder builderForValue) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(builderForValue.build()); + onChanged(); + } else { + opticalconfigsBuilder_.addMessage(builderForValue.build()); + } + return this; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { - if (opticalconfigIdBuilder_ != null) { - return opticalconfigIdBuilder_.getMessageOrBuilder(); + public Builder addOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig.Builder builderForValue) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + opticalconfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder addAllOpticalconfigs(java.lang.Iterable values) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, opticalconfigs_); + onChanged(); + } else { + opticalconfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder clearOpticalconfigs() { + if (opticalconfigsBuilder_ == null) { + opticalconfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + opticalconfigsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder removeOpticalconfigs(int index) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.remove(index); + onChanged(); } else { - return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + opticalconfigsBuilder_.remove(index); } + return this; } /** - * .context.OpticalConfigId opticalconfig_id = 1; + * repeated .context.OpticalConfig opticalconfigs = 1; */ - private com.google.protobuf.SingleFieldBuilderV3 getOpticalconfigIdFieldBuilder() { - if (opticalconfigIdBuilder_ == null) { - opticalconfigIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalconfigId(), getParentForChildren(), isClean()); - opticalconfigId_ = null; - } - return opticalconfigIdBuilder_; + public context.ContextOuterClass.OpticalConfig.Builder getOpticalconfigsBuilder(int index) { + return getOpticalconfigsFieldBuilder().getBuilder(index); } - private java.lang.Object config_ = ""; - /** - * string config = 2; - * @return The config. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public java.lang.String getConfig() { - java.lang.Object ref = config_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - config_ = s; - return s; + public context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index) { + if (opticalconfigsBuilder_ == null) { + return opticalconfigs_.get(index); } else { - return (java.lang.String) ref; + return opticalconfigsBuilder_.getMessageOrBuilder(index); } } /** - * string config = 2; - * @return The bytes for config. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public com.google.protobuf.ByteString getConfigBytes() { - java.lang.Object ref = config_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - config_ = b; - return b; + public java.util.List getOpticalconfigsOrBuilderList() { + if (opticalconfigsBuilder_ != null) { + return opticalconfigsBuilder_.getMessageOrBuilderList(); } else { - return (com.google.protobuf.ByteString) ref; + return java.util.Collections.unmodifiableList(opticalconfigs_); } } /** - * string config = 2; - * @param value The config to set. - * @return This builder for chaining. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder setConfig(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - return this; + public context.ContextOuterClass.OpticalConfig.Builder addOpticalconfigsBuilder() { + return getOpticalconfigsFieldBuilder().addBuilder(context.ContextOuterClass.OpticalConfig.getDefaultInstance()); } /** - * string config = 2; - * @return This builder for chaining. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder clearConfig() { - config_ = getDefaultInstance().getConfig(); - onChanged(); - return this; + public context.ContextOuterClass.OpticalConfig.Builder addOpticalconfigsBuilder(int index) { + return getOpticalconfigsFieldBuilder().addBuilder(index, context.ContextOuterClass.OpticalConfig.getDefaultInstance()); } /** - * string config = 2; - * @param value The bytes for config to set. - * @return This builder for chaining. + * repeated .context.OpticalConfig opticalconfigs = 1; */ - public Builder setConfigBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List getOpticalconfigsBuilderList() { + return getOpticalconfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getOpticalconfigsFieldBuilder() { + if (opticalconfigsBuilder_ == null) { + opticalconfigsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(opticalconfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + opticalconfigs_ = null; } - checkByteStringIsUtf8(value); - config_ = value; - onChanged(); - return this; + return opticalconfigsBuilder_; } @java.lang.Override @@ -73348,197 +74589,180 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.OpticalConfig) + // @@protoc_insertion_point(builder_scope:context.OpticalConfigList) } - // @@protoc_insertion_point(class_scope:context.OpticalConfig) - private static final context.ContextOuterClass.OpticalConfig DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalConfigList) + private static final context.ContextOuterClass.OpticalConfigList DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfig(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigList(); } - public static context.ContextOuterClass.OpticalConfig getDefaultInstance() { + public static context.ContextOuterClass.OpticalConfigList getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public OpticalConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OpticalConfig(input, extensionRegistry); + public OpticalConfigList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.OpticalConfig getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalConfigList getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OpticalConfigListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigList) + public interface OpticalConfigEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigEvent) com.google.protobuf.MessageOrBuilder { /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; + * @return Whether the event field is set. */ - java.util.List getOpticalconfigsList(); + boolean hasEvent(); /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; + * @return The event. */ - context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index); + context.ContextOuterClass.Event getEvent(); /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - int getOpticalconfigsCount(); + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; + * @return Whether the opticalconfigId field is set. */ - java.util.List getOpticalconfigsOrBuilderList(); + boolean hasOpticalconfigId(); /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; + * @return The opticalconfigId. */ - context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index); + context.ContextOuterClass.OpticalConfigId getOpticalconfigId(); + + /** + * .context.OpticalConfigId opticalconfig_id = 2; + */ + context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder(); } /** - * Protobuf type {@code context.OpticalConfigList} + * Protobuf type {@code context.OpticalConfigEvent} */ - public static final class OpticalConfigList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigList) - OpticalConfigListOrBuilder { + public static final class OpticalConfigEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigEvent) + OpticalConfigEventOrBuilder { private static final long serialVersionUID = 0L; - // Use OpticalConfigList.newBuilder() to construct. - private OpticalConfigList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalConfigEvent.newBuilder() to construct. + private OpticalConfigEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OpticalConfigList() { - opticalconfigs_ = java.util.Collections.emptyList(); + private OpticalConfigEvent() { } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OpticalConfigList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OpticalConfigList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - opticalconfigs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - opticalconfigs_.add(input.readMessage(context.ContextOuterClass.OpticalConfig.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - opticalconfigs_ = java.util.Collections.unmodifiableList(opticalconfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + return new OpticalConfigEvent(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigEvent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalConfigList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigList.class, context.ContextOuterClass.OpticalConfigList.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfigEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigEvent.class, context.ContextOuterClass.OpticalConfigEvent.Builder.class); } - public static final int OPTICALCONFIGS_FIELD_NUMBER = 1; + public static final int EVENT_FIELD_NUMBER = 1; - private java.util.List opticalconfigs_; + private context.ContextOuterClass.Event event_; /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; + * @return Whether the event field is set. */ @java.lang.Override - public java.util.List getOpticalconfigsList() { - return opticalconfigs_; + public boolean hasEvent() { + return event_ != null; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; + * @return The event. */ @java.lang.Override - public java.util.List getOpticalconfigsOrBuilderList() { - return opticalconfigs_; + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ @java.lang.Override - public int getOpticalconfigsCount() { - return opticalconfigs_.size(); + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } + public static final int OPTICALCONFIG_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.OpticalConfigId opticalconfigId_; + /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; + * @return Whether the opticalconfigId field is set. */ @java.lang.Override - public context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index) { - return opticalconfigs_.get(index); + public boolean hasOpticalconfigId() { + return opticalconfigId_ != null; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; + * @return The opticalconfigId. */ @java.lang.Override - public context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index) { - return opticalconfigs_.get(index); + public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } + + /** + * .context.OpticalConfigId opticalconfig_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; } private byte memoizedIsInitialized = -1; @@ -73556,10 +74780,13 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < opticalconfigs_.size(); i++) { - output.writeMessage(1, opticalconfigs_.get(i)); + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (opticalconfigId_ != null) { + output.writeMessage(2, getOpticalconfigId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -73568,10 +74795,13 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - for (int i = 0; i < opticalconfigs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, opticalconfigs_.get(i)); + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (opticalconfigId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOpticalconfigId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -73581,13 +74811,23 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.OpticalConfigList)) { + if (!(obj instanceof context.ContextOuterClass.OpticalConfigEvent)) { return super.equals(obj); } - context.ContextOuterClass.OpticalConfigList other = (context.ContextOuterClass.OpticalConfigList) obj; - if (!getOpticalconfigsList().equals(other.getOpticalconfigsList())) + context.ContextOuterClass.OpticalConfigEvent other = (context.ContextOuterClass.OpticalConfigEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasOpticalconfigId() != other.hasOpticalconfigId()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (hasOpticalconfigId()) { + if (!getOpticalconfigId().equals(other.getOpticalconfigId())) + return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -73599,60 +74839,64 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getOpticalconfigsCount() > 0) { - hash = (37 * hash) + OPTICALCONFIGS_FIELD_NUMBER; - hash = (53 * hash) + getOpticalconfigsList().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasOpticalconfigId()) { + hash = (37 * hash) + OPTICALCONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.OpticalConfigList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfigList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalConfigEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -73665,7 +74909,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.OpticalConfigList prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalConfigEvent prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -73681,61 +74925,58 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.OpticalConfigList} + * Protobuf type {@code context.OpticalConfigEvent} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigList) - context.ContextOuterClass.OpticalConfigListOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigEvent) + context.ContextOuterClass.OpticalConfigEventOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigEvent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalConfigList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigList.class, context.ContextOuterClass.OpticalConfigList.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalConfigEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigEvent.class, context.ContextOuterClass.OpticalConfigEvent.Builder.class); } - // Construct using context.ContextOuterClass.OpticalConfigList.newBuilder() + // Construct using context.ContextOuterClass.OpticalConfigEvent.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getOpticalconfigsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (opticalconfigsBuilder_ == null) { - opticalconfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - opticalconfigsBuilder_.clear(); + bitField0_ = 0; + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); + eventBuilder_ = null; + } + opticalconfigId_ = null; + if (opticalconfigIdBuilder_ != null) { + opticalconfigIdBuilder_.dispose(); + opticalconfigIdBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalConfigEvent_descriptor; } @java.lang.Override - public context.ContextOuterClass.OpticalConfigList getDefaultInstanceForType() { - return context.ContextOuterClass.OpticalConfigList.getDefaultInstance(); + public context.ContextOuterClass.OpticalConfigEvent getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfigEvent.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.OpticalConfigList build() { - context.ContextOuterClass.OpticalConfigList result = buildPartial(); + public context.ContextOuterClass.OpticalConfigEvent build() { + context.ContextOuterClass.OpticalConfigEvent result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -73743,90 +74984,45 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.OpticalConfigList buildPartial() { - context.ContextOuterClass.OpticalConfigList result = new context.ContextOuterClass.OpticalConfigList(this); - int from_bitField0_ = bitField0_; - if (opticalconfigsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - opticalconfigs_ = java.util.Collections.unmodifiableList(opticalconfigs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.opticalconfigs_ = opticalconfigs_; - } else { - result.opticalconfigs_ = opticalconfigsBuilder_.build(); + public context.ContextOuterClass.OpticalConfigEvent buildPartial() { + context.ContextOuterClass.OpticalConfigEvent result = new context.ContextOuterClass.OpticalConfigEvent(this); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.OpticalConfigEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.opticalconfigId_ = opticalconfigIdBuilder_ == null ? opticalconfigId_ : opticalconfigIdBuilder_.build(); + } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.OpticalConfigList) { - return mergeFrom((context.ContextOuterClass.OpticalConfigList) other); + if (other instanceof context.ContextOuterClass.OpticalConfigEvent) { + return mergeFrom((context.ContextOuterClass.OpticalConfigEvent) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.OpticalConfigList other) { - if (other == context.ContextOuterClass.OpticalConfigList.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalConfigEvent other) { + if (other == context.ContextOuterClass.OpticalConfigEvent.getDefaultInstance()) return this; - if (opticalconfigsBuilder_ == null) { - if (!other.opticalconfigs_.isEmpty()) { - if (opticalconfigs_.isEmpty()) { - opticalconfigs_ = other.opticalconfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOpticalconfigsIsMutable(); - opticalconfigs_.addAll(other.opticalconfigs_); - } - onChanged(); - } - } else { - if (!other.opticalconfigs_.isEmpty()) { - if (opticalconfigsBuilder_.isEmpty()) { - opticalconfigsBuilder_.dispose(); - opticalconfigsBuilder_ = null; - opticalconfigs_ = other.opticalconfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - opticalconfigsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOpticalconfigsFieldBuilder() : null; - } else { - opticalconfigsBuilder_.addAllMessages(other.opticalconfigs_); - } - } + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasOpticalconfigId()) { + mergeOpticalconfigId(other.getOpticalconfigId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -73838,257 +75034,288 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.OpticalConfigList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getOpticalconfigIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.OpticalConfigList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } private int bitField0_; - private java.util.List opticalconfigs_ = java.util.Collections.emptyList(); - - private void ensureOpticalconfigsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - opticalconfigs_ = new java.util.ArrayList(opticalconfigs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3 opticalconfigsBuilder_; + private context.ContextOuterClass.Event event_; - /** - * repeated .context.OpticalConfig opticalconfigs = 1; - */ - public java.util.List getOpticalconfigsList() { - if (opticalconfigsBuilder_ == null) { - return java.util.Collections.unmodifiableList(opticalconfigs_); - } else { - return opticalconfigsBuilder_.getMessageList(); - } - } + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; + * @return Whether the event field is set. */ - public int getOpticalconfigsCount() { - if (opticalconfigsBuilder_ == null) { - return opticalconfigs_.size(); - } else { - return opticalconfigsBuilder_.getCount(); - } + public boolean hasEvent() { + return ((bitField0_ & 0x00000001) != 0); } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; + * @return The event. */ - public context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index) { - if (opticalconfigsBuilder_ == null) { - return opticalconfigs_.get(index); + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } else { - return opticalconfigsBuilder_.getMessage(index); + return eventBuilder_.getMessage(); } } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - public Builder setOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig value) { - if (opticalconfigsBuilder_ == null) { + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureOpticalconfigsIsMutable(); - opticalconfigs_.set(index, value); - onChanged(); + event_ = value; } else { - opticalconfigsBuilder_.setMessage(index, value); + eventBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - public Builder setOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig.Builder builderForValue) { - if (opticalconfigsBuilder_ == null) { - ensureOpticalconfigsIsMutable(); - opticalconfigs_.set(index, builderForValue.build()); - onChanged(); + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); } else { - opticalconfigsBuilder_.setMessage(index, builderForValue.build()); + eventBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - public Builder addOpticalconfigs(context.ContextOuterClass.OpticalConfig value) { - if (opticalconfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); + } else { + event_ = value; } - ensureOpticalconfigsIsMutable(); - opticalconfigs_.add(value); - onChanged(); } else { - opticalconfigsBuilder_.addMessage(value); + eventBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - public Builder addOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig value) { - if (opticalconfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOpticalconfigsIsMutable(); - opticalconfigs_.add(index, value); - onChanged(); - } else { - opticalconfigsBuilder_.addMessage(index, value); + public Builder clearEvent() { + bitField0_ = (bitField0_ & ~0x00000001); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); + eventBuilder_ = null; } + onChanged(); return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - public Builder addOpticalconfigs(context.ContextOuterClass.OpticalConfig.Builder builderForValue) { - if (opticalconfigsBuilder_ == null) { - ensureOpticalconfigsIsMutable(); - opticalconfigs_.add(builderForValue.build()); - onChanged(); + public context.ContextOuterClass.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); } else { - opticalconfigsBuilder_.addMessage(builderForValue.build()); + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } - return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.Event event = 1; */ - public Builder addOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig.Builder builderForValue) { - if (opticalconfigsBuilder_ == null) { - ensureOpticalconfigsIsMutable(); - opticalconfigs_.add(index, builderForValue.build()); - onChanged(); - } else { - opticalconfigsBuilder_.addMessage(index, builderForValue.build()); + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; } - return this; + return eventBuilder_; } + private context.ContextOuterClass.OpticalConfigId opticalconfigId_; + + private com.google.protobuf.SingleFieldBuilderV3 opticalconfigIdBuilder_; + /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; + * @return Whether the opticalconfigId field is set. */ - public Builder addAllOpticalconfigs(java.lang.Iterable values) { - if (opticalconfigsBuilder_ == null) { - ensureOpticalconfigsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, opticalconfigs_); - onChanged(); + public boolean hasOpticalconfigId() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * .context.OpticalConfigId opticalconfig_id = 2; + * @return The opticalconfigId. + */ + public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { + if (opticalconfigIdBuilder_ == null) { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; } else { - opticalconfigsBuilder_.addAllMessages(values); + return opticalconfigIdBuilder_.getMessage(); } - return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; */ - public Builder clearOpticalconfigs() { - if (opticalconfigsBuilder_ == null) { - opticalconfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { + if (opticalconfigIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + opticalconfigId_ = value; } else { - opticalconfigsBuilder_.clear(); + opticalconfigIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; */ - public Builder removeOpticalconfigs(int index) { - if (opticalconfigsBuilder_ == null) { - ensureOpticalconfigsIsMutable(); - opticalconfigs_.remove(index); - onChanged(); + public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId.Builder builderForValue) { + if (opticalconfigIdBuilder_ == null) { + opticalconfigId_ = builderForValue.build(); } else { - opticalconfigsBuilder_.remove(index); + opticalconfigIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; - */ - public context.ContextOuterClass.OpticalConfig.Builder getOpticalconfigsBuilder(int index) { - return getOpticalconfigsFieldBuilder().getBuilder(index); - } - - /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; */ - public context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index) { - if (opticalconfigsBuilder_ == null) { - return opticalconfigs_.get(index); + public Builder mergeOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { + if (opticalconfigIdBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && opticalconfigId_ != null && opticalconfigId_ != context.ContextOuterClass.OpticalConfigId.getDefaultInstance()) { + getOpticalconfigIdBuilder().mergeFrom(value); + } else { + opticalconfigId_ = value; + } } else { - return opticalconfigsBuilder_.getMessageOrBuilder(index); + opticalconfigIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); + return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; */ - public java.util.List getOpticalconfigsOrBuilderList() { - if (opticalconfigsBuilder_ != null) { - return opticalconfigsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(opticalconfigs_); + public Builder clearOpticalconfigId() { + bitField0_ = (bitField0_ & ~0x00000002); + opticalconfigId_ = null; + if (opticalconfigIdBuilder_ != null) { + opticalconfigIdBuilder_.dispose(); + opticalconfigIdBuilder_ = null; } + onChanged(); + return this; } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; */ - public context.ContextOuterClass.OpticalConfig.Builder addOpticalconfigsBuilder() { - return getOpticalconfigsFieldBuilder().addBuilder(context.ContextOuterClass.OpticalConfig.getDefaultInstance()); + public context.ContextOuterClass.OpticalConfigId.Builder getOpticalconfigIdBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOpticalconfigIdFieldBuilder().getBuilder(); } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; */ - public context.ContextOuterClass.OpticalConfig.Builder addOpticalconfigsBuilder(int index) { - return getOpticalconfigsFieldBuilder().addBuilder(index, context.ContextOuterClass.OpticalConfig.getDefaultInstance()); + public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { + if (opticalconfigIdBuilder_ != null) { + return opticalconfigIdBuilder_.getMessageOrBuilder(); + } else { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } } /** - * repeated .context.OpticalConfig opticalconfigs = 1; + * .context.OpticalConfigId opticalconfig_id = 2; */ - public java.util.List getOpticalconfigsBuilderList() { - return getOpticalconfigsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3 getOpticalconfigsFieldBuilder() { - if (opticalconfigsBuilder_ == null) { - opticalconfigsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(opticalconfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - opticalconfigs_ = null; + private com.google.protobuf.SingleFieldBuilderV3 getOpticalconfigIdFieldBuilder() { + if (opticalconfigIdBuilder_ == null) { + opticalconfigIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalconfigId(), getParentForChildren(), isClean()); + opticalconfigId_ = null; } - return opticalconfigsBuilder_; + return opticalconfigIdBuilder_; } @java.lang.Override @@ -74100,174 +75327,180 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.OpticalConfigList) + // @@protoc_insertion_point(builder_scope:context.OpticalConfigEvent) } - // @@protoc_insertion_point(class_scope:context.OpticalConfigList) - private static final context.ContextOuterClass.OpticalConfigList DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalConfigEvent) + private static final context.ContextOuterClass.OpticalConfigEvent DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigList(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigEvent(); } - public static context.ContextOuterClass.OpticalConfigList getDefaultInstance() { + public static context.ContextOuterClass.OpticalConfigEvent getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public OpticalConfigList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OpticalConfigList(input, extensionRegistry); + public OpticalConfigEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.OpticalConfigList getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalConfigEvent getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OpticalLinkIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLinkId) + public interface OpticalEndPointIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalEndPointId) com.google.protobuf.MessageOrBuilder { /** - * .context.Uuid optical_link_uuid = 1; - * @return Whether the opticalLinkUuid field is set. + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + boolean hasDeviceId(); + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + context.ContextOuterClass.DeviceId getDeviceId(); + + /** + * .context.DeviceId device_id = 2; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + + /** + * .context.Uuid endpoint_uuid = 3; + * @return Whether the endpointUuid field is set. */ - boolean hasOpticalLinkUuid(); + boolean hasEndpointUuid(); /** - * .context.Uuid optical_link_uuid = 1; - * @return The opticalLinkUuid. + * .context.Uuid endpoint_uuid = 3; + * @return The endpointUuid. */ - context.ContextOuterClass.Uuid getOpticalLinkUuid(); + context.ContextOuterClass.Uuid getEndpointUuid(); /** - * .context.Uuid optical_link_uuid = 1; + * .context.Uuid endpoint_uuid = 3; */ - context.ContextOuterClass.UuidOrBuilder getOpticalLinkUuidOrBuilder(); + context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder(); } /** - * Protobuf type {@code context.OpticalLinkId} + * Protobuf type {@code context.OpticalEndPointId} */ - public static final class OpticalLinkId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLinkId) - OpticalLinkIdOrBuilder { + public static final class OpticalEndPointId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalEndPointId) + OpticalEndPointIdOrBuilder { private static final long serialVersionUID = 0L; - // Use OpticalLinkId.newBuilder() to construct. - private OpticalLinkId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalEndPointId.newBuilder() to construct. + private OpticalEndPointId(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OpticalLinkId() { + private OpticalEndPointId() { } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OpticalLinkId(); + return new OpticalEndPointId(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalEndPointId_descriptor; } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalEndPointId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalEndPointId.class, context.ContextOuterClass.OpticalEndPointId.Builder.class); } - private OpticalLinkId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (opticalLinkUuid_ != null) { - subBuilder = opticalLinkUuid_.toBuilder(); - } - opticalLinkUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(opticalLinkUuid_); - opticalLinkUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + public static final int DEVICE_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.DeviceId deviceId_; + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + @java.lang.Override + public boolean hasDeviceId() { + return deviceId_ != null; } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalLinkId_descriptor; + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceId() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; } + /** + * .context.DeviceId device_id = 2; + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalLinkId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkId.class, context.ContextOuterClass.OpticalLinkId.Builder.class); + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; } - public static final int OPTICAL_LINK_UUID_FIELD_NUMBER = 1; + public static final int ENDPOINT_UUID_FIELD_NUMBER = 3; - private context.ContextOuterClass.Uuid opticalLinkUuid_; + private context.ContextOuterClass.Uuid endpointUuid_; /** - * .context.Uuid optical_link_uuid = 1; - * @return Whether the opticalLinkUuid field is set. + * .context.Uuid endpoint_uuid = 3; + * @return Whether the endpointUuid field is set. */ @java.lang.Override - public boolean hasOpticalLinkUuid() { - return opticalLinkUuid_ != null; + public boolean hasEndpointUuid() { + return endpointUuid_ != null; } /** - * .context.Uuid optical_link_uuid = 1; - * @return The opticalLinkUuid. + * .context.Uuid endpoint_uuid = 3; + * @return The endpointUuid. */ @java.lang.Override - public context.ContextOuterClass.Uuid getOpticalLinkUuid() { - return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; + public context.ContextOuterClass.Uuid getEndpointUuid() { + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; } /** - * .context.Uuid optical_link_uuid = 1; + * .context.Uuid endpoint_uuid = 3; */ @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getOpticalLinkUuidOrBuilder() { - return getOpticalLinkUuid(); + public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() { + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; } private byte memoizedIsInitialized = -1; @@ -74285,10 +75518,13 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (opticalLinkUuid_ != null) { - output.writeMessage(1, getOpticalLinkUuid()); + if (deviceId_ != null) { + output.writeMessage(2, getDeviceId()); + } + if (endpointUuid_ != null) { + output.writeMessage(3, getEndpointUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -74297,10 +75533,13 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (opticalLinkUuid_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpticalLinkUuid()); + if (deviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeviceId()); } - size += unknownFields.getSerializedSize(); + if (endpointUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndpointUuid()); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -74310,17 +75549,23 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.OpticalLinkId)) { + if (!(obj instanceof context.ContextOuterClass.OpticalEndPointId)) { return super.equals(obj); } - context.ContextOuterClass.OpticalLinkId other = (context.ContextOuterClass.OpticalLinkId) obj; - if (hasOpticalLinkUuid() != other.hasOpticalLinkUuid()) + context.ContextOuterClass.OpticalEndPointId other = (context.ContextOuterClass.OpticalEndPointId) obj; + if (hasDeviceId() != other.hasDeviceId()) + return false; + if (hasDeviceId()) { + if (!getDeviceId().equals(other.getDeviceId())) + return false; + } + if (hasEndpointUuid() != other.hasEndpointUuid()) return false; - if (hasOpticalLinkUuid()) { - if (!getOpticalLinkUuid().equals(other.getOpticalLinkUuid())) + if (hasEndpointUuid()) { + if (!getEndpointUuid().equals(other.getEndpointUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -74332,60 +75577,64 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOpticalLinkUuid()) { - hash = (37 * hash) + OPTICAL_LINK_UUID_FIELD_NUMBER; - hash = (53 * hash) + getOpticalLinkUuid().hashCode(); + if (hasDeviceId()) { + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + } + if (hasEndpointUuid()) { + hash = (37 * hash) + ENDPOINT_UUID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.OpticalLinkId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalEndPointId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLinkId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalEndPointId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalEndPointId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -74398,7 +75647,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.OpticalLinkId prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalEndPointId prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -74414,60 +75663,58 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.OpticalLinkId} + * Protobuf type {@code context.OpticalEndPointId} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLinkId) - context.ContextOuterClass.OpticalLinkIdOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalEndPointId) + context.ContextOuterClass.OpticalEndPointIdOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalLinkId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalEndPointId_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalLinkId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkId.class, context.ContextOuterClass.OpticalLinkId.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalEndPointId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalEndPointId.class, context.ContextOuterClass.OpticalEndPointId.Builder.class); } - // Construct using context.ContextOuterClass.OpticalLinkId.newBuilder() + // Construct using context.ContextOuterClass.OpticalEndPointId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuid_ = null; - } else { - opticalLinkUuid_ = null; - opticalLinkUuidBuilder_ = null; + bitField0_ = 0; + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); + deviceIdBuilder_ = null; + } + endpointUuid_ = null; + if (endpointUuidBuilder_ != null) { + endpointUuidBuilder_.dispose(); + endpointUuidBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_OpticalLinkId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalEndPointId_descriptor; } @java.lang.Override - public context.ContextOuterClass.OpticalLinkId getDefaultInstanceForType() { - return context.ContextOuterClass.OpticalLinkId.getDefaultInstance(); + public context.ContextOuterClass.OpticalEndPointId getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalEndPointId.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.OpticalLinkId build() { - context.ContextOuterClass.OpticalLinkId result = buildPartial(); + public context.ContextOuterClass.OpticalEndPointId build() { + context.ContextOuterClass.OpticalEndPointId result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -74475,64 +75722,45 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.OpticalLinkId buildPartial() { - context.ContextOuterClass.OpticalLinkId result = new context.ContextOuterClass.OpticalLinkId(this); - if (opticalLinkUuidBuilder_ == null) { - result.opticalLinkUuid_ = opticalLinkUuid_; - } else { - result.opticalLinkUuid_ = opticalLinkUuidBuilder_.build(); + public context.ContextOuterClass.OpticalEndPointId buildPartial() { + context.ContextOuterClass.OpticalEndPointId result = new context.ContextOuterClass.OpticalEndPointId(this); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.OpticalEndPointId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.deviceId_ = deviceIdBuilder_ == null ? deviceId_ : deviceIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endpointUuid_ = endpointUuidBuilder_ == null ? endpointUuid_ : endpointUuidBuilder_.build(); + } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.OpticalLinkId) { - return mergeFrom((context.ContextOuterClass.OpticalLinkId) other); + if (other instanceof context.ContextOuterClass.OpticalEndPointId) { + return mergeFrom((context.ContextOuterClass.OpticalEndPointId) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.OpticalLinkId other) { - if (other == context.ContextOuterClass.OpticalLinkId.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalEndPointId other) { + if (other == context.ContextOuterClass.OpticalEndPointId.getDefaultInstance()) return this; - if (other.hasOpticalLinkUuid()) { - mergeOpticalLinkUuid(other.getOpticalLinkUuid()); + if (other.hasDeviceId()) { + mergeDeviceId(other.getDeviceId()); + } + if (other.hasEndpointUuid()) { + mergeEndpointUuid(other.getEndpointUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -74544,132 +75772,288 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.OpticalLinkId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage(getDeviceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 18 + case 26: + { + input.readMessage(getEndpointUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.OpticalLinkId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } - private context.ContextOuterClass.Uuid opticalLinkUuid_; + private int bitField0_; + + private context.ContextOuterClass.DeviceId deviceId_; - private com.google.protobuf.SingleFieldBuilderV3 opticalLinkUuidBuilder_; + private com.google.protobuf.SingleFieldBuilderV3 deviceIdBuilder_; /** - * .context.Uuid optical_link_uuid = 1; - * @return Whether the opticalLinkUuid field is set. + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. */ - public boolean hasOpticalLinkUuid() { - return opticalLinkUuidBuilder_ != null || opticalLinkUuid_ != null; + public boolean hasDeviceId() { + return ((bitField0_ & 0x00000001) != 0); } /** - * .context.Uuid optical_link_uuid = 1; - * @return The opticalLinkUuid. + * .context.DeviceId device_id = 2; + * @return The deviceId. */ - public context.ContextOuterClass.Uuid getOpticalLinkUuid() { - if (opticalLinkUuidBuilder_ == null) { - return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; + public context.ContextOuterClass.DeviceId getDeviceId() { + if (deviceIdBuilder_ == null) { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; } else { - return opticalLinkUuidBuilder_.getMessage(); + return deviceIdBuilder_.getMessage(); } } /** - * .context.Uuid optical_link_uuid = 1; + * .context.DeviceId device_id = 2; */ - public Builder setOpticalLinkUuid(context.ContextOuterClass.Uuid value) { - if (opticalLinkUuidBuilder_ == null) { + public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - opticalLinkUuid_ = value; - onChanged(); + deviceId_ = value; } else { - opticalLinkUuidBuilder_.setMessage(value); + deviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * .context.Uuid optical_link_uuid = 1; + * .context.DeviceId device_id = 2; */ - public Builder setOpticalLinkUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuid_ = builderForValue.build(); - onChanged(); + public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdBuilder_ == null) { + deviceId_ = builderForValue.build(); } else { - opticalLinkUuidBuilder_.setMessage(builderForValue.build()); + deviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * .context.Uuid optical_link_uuid = 1; + * .context.DeviceId device_id = 2; */ - public Builder mergeOpticalLinkUuid(context.ContextOuterClass.Uuid value) { - if (opticalLinkUuidBuilder_ == null) { - if (opticalLinkUuid_ != null) { - opticalLinkUuid_ = context.ContextOuterClass.Uuid.newBuilder(opticalLinkUuid_).mergeFrom(value).buildPartial(); + public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && deviceId_ != null && deviceId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) { + getDeviceIdBuilder().mergeFrom(value); } else { - opticalLinkUuid_ = value; + deviceId_ = value; } - onChanged(); } else { - opticalLinkUuidBuilder_.mergeFrom(value); + deviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * .context.Uuid optical_link_uuid = 1; + * .context.DeviceId device_id = 2; */ - public Builder clearOpticalLinkUuid() { - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuid_ = null; - onChanged(); + public Builder clearDeviceId() { + bitField0_ = (bitField0_ & ~0x00000001); + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); + deviceIdBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDeviceIdFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceId device_id = 2; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + if (deviceIdBuilder_ != null) { + return deviceIdBuilder_.getMessageOrBuilder(); + } else { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + } + + /** + * .context.DeviceId device_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdFieldBuilder() { + if (deviceIdBuilder_ == null) { + deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceId(), getParentForChildren(), isClean()); + deviceId_ = null; + } + return deviceIdBuilder_; + } + + private context.ContextOuterClass.Uuid endpointUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointUuidBuilder_; + + /** + * .context.Uuid endpoint_uuid = 3; + * @return Whether the endpointUuid field is set. + */ + public boolean hasEndpointUuid() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * .context.Uuid endpoint_uuid = 3; + * @return The endpointUuid. + */ + public context.ContextOuterClass.Uuid getEndpointUuid() { + if (endpointUuidBuilder_ == null) { + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; + } else { + return endpointUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder setEndpointUuid(context.ContextOuterClass.Uuid value) { + if (endpointUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointUuid_ = value; + } else { + endpointUuidBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder setEndpointUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (endpointUuidBuilder_ == null) { + endpointUuid_ = builderForValue.build(); + } else { + endpointUuidBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder mergeEndpointUuid(context.ContextOuterClass.Uuid value) { + if (endpointUuidBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && endpointUuid_ != null && endpointUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getEndpointUuidBuilder().mergeFrom(value); + } else { + endpointUuid_ = value; + } } else { - opticalLinkUuid_ = null; - opticalLinkUuidBuilder_ = null; + endpointUuidBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder clearEndpointUuid() { + bitField0_ = (bitField0_ & ~0x00000002); + endpointUuid_ = null; + if (endpointUuidBuilder_ != null) { + endpointUuidBuilder_.dispose(); + endpointUuidBuilder_ = null; } + onChanged(); return this; } /** - * .context.Uuid optical_link_uuid = 1; + * .context.Uuid endpoint_uuid = 3; */ - public context.ContextOuterClass.Uuid.Builder getOpticalLinkUuidBuilder() { + public context.ContextOuterClass.Uuid.Builder getEndpointUuidBuilder() { + bitField0_ |= 0x00000002; onChanged(); - return getOpticalLinkUuidFieldBuilder().getBuilder(); + return getEndpointUuidFieldBuilder().getBuilder(); } /** - * .context.Uuid optical_link_uuid = 1; + * .context.Uuid endpoint_uuid = 3; */ - public context.ContextOuterClass.UuidOrBuilder getOpticalLinkUuidOrBuilder() { - if (opticalLinkUuidBuilder_ != null) { - return opticalLinkUuidBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() { + if (endpointUuidBuilder_ != null) { + return endpointUuidBuilder_.getMessageOrBuilder(); } else { - return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; } } /** - * .context.Uuid optical_link_uuid = 1; + * .context.Uuid endpoint_uuid = 3; */ - private com.google.protobuf.SingleFieldBuilderV3 getOpticalLinkUuidFieldBuilder() { - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalLinkUuid(), getParentForChildren(), isClean()); - opticalLinkUuid_ = null; + private com.google.protobuf.SingleFieldBuilderV3 getEndpointUuidFieldBuilder() { + if (endpointUuidBuilder_ == null) { + endpointUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointUuid(), getParentForChildren(), isClean()); + endpointUuid_ = null; } - return opticalLinkUuidBuilder_; + return endpointUuidBuilder_; } @java.lang.Override @@ -74681,174 +76065,157 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.OpticalLinkId) + // @@protoc_insertion_point(builder_scope:context.OpticalEndPointId) } - // @@protoc_insertion_point(class_scope:context.OpticalLinkId) - private static final context.ContextOuterClass.OpticalLinkId DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalEndPointId) + private static final context.ContextOuterClass.OpticalEndPointId DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLinkId(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalEndPointId(); } - public static context.ContextOuterClass.OpticalLinkId getDefaultInstance() { + public static context.ContextOuterClass.OpticalEndPointId getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public OpticalLinkId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OpticalLinkId(input, extensionRegistry); + public OpticalEndPointId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.OpticalLinkId getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalEndPointId getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface FiberIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.FiberId) + public interface OpticalLinkListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLinkList) com.google.protobuf.MessageOrBuilder { /** - * .context.Uuid fiber_uuid = 1; - * @return Whether the fiberUuid field is set. + * repeated .context.OpticalLink optical_links = 1; + */ + java.util.List getOpticalLinksList(); + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + context.ContextOuterClass.OpticalLink getOpticalLinks(int index); + + /** + * repeated .context.OpticalLink optical_links = 1; */ - boolean hasFiberUuid(); + int getOpticalLinksCount(); /** - * .context.Uuid fiber_uuid = 1; - * @return The fiberUuid. + * repeated .context.OpticalLink optical_links = 1; */ - context.ContextOuterClass.Uuid getFiberUuid(); + java.util.List getOpticalLinksOrBuilderList(); /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - context.ContextOuterClass.UuidOrBuilder getFiberUuidOrBuilder(); + context.ContextOuterClass.OpticalLinkOrBuilder getOpticalLinksOrBuilder(int index); } /** - * Protobuf type {@code context.FiberId} + * Protobuf type {@code context.OpticalLinkList} */ - public static final class FiberId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.FiberId) - FiberIdOrBuilder { + public static final class OpticalLinkList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLinkList) + OpticalLinkListOrBuilder { private static final long serialVersionUID = 0L; - // Use FiberId.newBuilder() to construct. - private FiberId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalLinkList.newBuilder() to construct. + private OpticalLinkList(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private FiberId() { + private OpticalLinkList() { + opticalLinks_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new FiberId(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private FiberId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (fiberUuid_ != null) { - subBuilder = fiberUuid_.toBuilder(); - } - fiberUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fiberUuid_); - fiberUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + return new OpticalLinkList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_FiberId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLinkList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_FiberId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.FiberId.class, context.ContextOuterClass.FiberId.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalLinkList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkList.class, context.ContextOuterClass.OpticalLinkList.Builder.class); } - public static final int FIBER_UUID_FIELD_NUMBER = 1; + public static final int OPTICAL_LINKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List opticalLinks_; - private context.ContextOuterClass.Uuid fiberUuid_; + /** + * repeated .context.OpticalLink optical_links = 1; + */ + @java.lang.Override + public java.util.List getOpticalLinksList() { + return opticalLinks_; + } + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + @java.lang.Override + public java.util.List getOpticalLinksOrBuilderList() { + return opticalLinks_; + } /** - * .context.Uuid fiber_uuid = 1; - * @return Whether the fiberUuid field is set. + * repeated .context.OpticalLink optical_links = 1; */ @java.lang.Override - public boolean hasFiberUuid() { - return fiberUuid_ != null; + public int getOpticalLinksCount() { + return opticalLinks_.size(); } /** - * .context.Uuid fiber_uuid = 1; - * @return The fiberUuid. + * repeated .context.OpticalLink optical_links = 1; */ @java.lang.Override - public context.ContextOuterClass.Uuid getFiberUuid() { - return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; + public context.ContextOuterClass.OpticalLink getOpticalLinks(int index) { + return opticalLinks_.get(index); } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getFiberUuidOrBuilder() { - return getFiberUuid(); + public context.ContextOuterClass.OpticalLinkOrBuilder getOpticalLinksOrBuilder(int index) { + return opticalLinks_.get(index); } private byte memoizedIsInitialized = -1; @@ -74866,10 +76233,10 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (fiberUuid_ != null) { - output.writeMessage(1, getFiberUuid()); + for (int i = 0; i < opticalLinks_.size(); i++) { + output.writeMessage(1, opticalLinks_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -74878,10 +76245,10 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (fiberUuid_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFiberUuid()); + for (int i = 0; i < opticalLinks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, opticalLinks_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -74891,17 +76258,13 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.FiberId)) { + if (!(obj instanceof context.ContextOuterClass.OpticalLinkList)) { return super.equals(obj); } - context.ContextOuterClass.FiberId other = (context.ContextOuterClass.FiberId) obj; - if (hasFiberUuid() != other.hasFiberUuid()) + context.ContextOuterClass.OpticalLinkList other = (context.ContextOuterClass.OpticalLinkList) obj; + if (!getOpticalLinksList().equals(other.getOpticalLinksList())) return false; - if (hasFiberUuid()) { - if (!getFiberUuid().equals(other.getFiberUuid())) - return false; - } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -74913,60 +76276,60 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasFiberUuid()) { - hash = (37 * hash) + FIBER_UUID_FIELD_NUMBER; - hash = (53 * hash) + getFiberUuid().hashCode(); + if (getOpticalLinksCount() > 0) { + hash = (37 * hash) + OPTICAL_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getOpticalLinksList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.FiberId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.FiberId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.FiberId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.FiberId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.FiberId parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.FiberId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.FiberId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.FiberId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -74979,7 +76342,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.FiberId prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalLinkList prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -74995,60 +76358,55 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.FiberId} + * Protobuf type {@code context.OpticalLinkList} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.FiberId) - context.ContextOuterClass.FiberIdOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLinkList) + context.ContextOuterClass.OpticalLinkListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_FiberId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLinkList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_FiberId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.FiberId.class, context.ContextOuterClass.FiberId.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalLinkList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkList.class, context.ContextOuterClass.OpticalLinkList.Builder.class); } - // Construct using context.ContextOuterClass.FiberId.newBuilder() + // Construct using context.ContextOuterClass.OpticalLinkList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (fiberUuidBuilder_ == null) { - fiberUuid_ = null; + bitField0_ = 0; + if (opticalLinksBuilder_ == null) { + opticalLinks_ = java.util.Collections.emptyList(); } else { - fiberUuid_ = null; - fiberUuidBuilder_ = null; + opticalLinks_ = null; + opticalLinksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_FiberId_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLinkList_descriptor; } @java.lang.Override - public context.ContextOuterClass.FiberId getDefaultInstanceForType() { - return context.ContextOuterClass.FiberId.getDefaultInstance(); + public context.ContextOuterClass.OpticalLinkList getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalLinkList.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.FiberId build() { - context.ContextOuterClass.FiberId result = buildPartial(); + public context.ContextOuterClass.OpticalLinkList build() { + context.ContextOuterClass.OpticalLinkList result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -75056,201 +76414,362 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.FiberId buildPartial() { - context.ContextOuterClass.FiberId result = new context.ContextOuterClass.FiberId(this); - if (fiberUuidBuilder_ == null) { - result.fiberUuid_ = fiberUuid_; + public context.ContextOuterClass.OpticalLinkList buildPartial() { + context.ContextOuterClass.OpticalLinkList result = new context.ContextOuterClass.OpticalLinkList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.OpticalLinkList result) { + if (opticalLinksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + opticalLinks_ = java.util.Collections.unmodifiableList(opticalLinks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.opticalLinks_ = opticalLinks_; + } else { + result.opticalLinks_ = opticalLinksBuilder_.build(); + } + } + + private void buildPartial0(context.ContextOuterClass.OpticalLinkList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.OpticalLinkList) { + return mergeFrom((context.ContextOuterClass.OpticalLinkList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.OpticalLinkList other) { + if (other == context.ContextOuterClass.OpticalLinkList.getDefaultInstance()) + return this; + if (opticalLinksBuilder_ == null) { + if (!other.opticalLinks_.isEmpty()) { + if (opticalLinks_.isEmpty()) { + opticalLinks_ = other.opticalLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOpticalLinksIsMutable(); + opticalLinks_.addAll(other.opticalLinks_); + } + onChanged(); + } } else { - result.fiberUuid_ = fiberUuidBuilder_.build(); + if (!other.opticalLinks_.isEmpty()) { + if (opticalLinksBuilder_.isEmpty()) { + opticalLinksBuilder_.dispose(); + opticalLinksBuilder_ = null; + opticalLinks_ = other.opticalLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + opticalLinksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOpticalLinksFieldBuilder() : null; + } else { + opticalLinksBuilder_.addAllMessages(other.opticalLinks_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.OpticalLink m = input.readMessage(context.ContextOuterClass.OpticalLink.parser(), extensionRegistry); + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.add(m); + } else { + opticalLinksBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); } - onBuilt(); - return result; + // finally + return this; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + private int bitField0_; - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + private java.util.List opticalLinks_ = java.util.Collections.emptyList(); - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + private void ensureOpticalLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + opticalLinks_ = new java.util.ArrayList(opticalLinks_); + bitField0_ |= 0x00000001; + } } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + private com.google.protobuf.RepeatedFieldBuilderV3 opticalLinksBuilder_; - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public java.util.List getOpticalLinksList() { + if (opticalLinksBuilder_ == null) { + return java.util.Collections.unmodifiableList(opticalLinks_); + } else { + return opticalLinksBuilder_.getMessageList(); + } } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public int getOpticalLinksCount() { + if (opticalLinksBuilder_ == null) { + return opticalLinks_.size(); + } else { + return opticalLinksBuilder_.getCount(); + } } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.FiberId) { - return mergeFrom((context.ContextOuterClass.FiberId) other); + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public context.ContextOuterClass.OpticalLink getOpticalLinks(int index) { + if (opticalLinksBuilder_ == null) { + return opticalLinks_.get(index); } else { - super.mergeFrom(other); - return this; + return opticalLinksBuilder_.getMessage(index); } } - public Builder mergeFrom(context.ContextOuterClass.FiberId other) { - if (other == context.ContextOuterClass.FiberId.getDefaultInstance()) - return this; - if (other.hasFiberUuid()) { - mergeFiberUuid(other.getFiberUuid()); + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public Builder setOpticalLinks(int index, context.ContextOuterClass.OpticalLink value) { + if (opticalLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinksIsMutable(); + opticalLinks_.set(index, value); + onChanged(); + } else { + opticalLinksBuilder_.setMessage(index, value); } - this.mergeUnknownFields(other.unknownFields); - onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public Builder setOpticalLinks(int index, context.ContextOuterClass.OpticalLink.Builder builderForValue) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.set(index, builderForValue.build()); + onChanged(); + } else { + opticalLinksBuilder_.setMessage(index, builderForValue.build()); + } + return this; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.FiberId parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.FiberId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public Builder addOpticalLinks(context.ContextOuterClass.OpticalLink value) { + if (opticalLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureOpticalLinksIsMutable(); + opticalLinks_.add(value); + onChanged(); + } else { + opticalLinksBuilder_.addMessage(value); } return this; } - private context.ContextOuterClass.Uuid fiberUuid_; - - private com.google.protobuf.SingleFieldBuilderV3 fiberUuidBuilder_; - /** - * .context.Uuid fiber_uuid = 1; - * @return Whether the fiberUuid field is set. + * repeated .context.OpticalLink optical_links = 1; */ - public boolean hasFiberUuid() { - return fiberUuidBuilder_ != null || fiberUuid_ != null; + public Builder addOpticalLinks(int index, context.ContextOuterClass.OpticalLink value) { + if (opticalLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalLinksIsMutable(); + opticalLinks_.add(index, value); + onChanged(); + } else { + opticalLinksBuilder_.addMessage(index, value); + } + return this; } /** - * .context.Uuid fiber_uuid = 1; - * @return The fiberUuid. + * repeated .context.OpticalLink optical_links = 1; */ - public context.ContextOuterClass.Uuid getFiberUuid() { - if (fiberUuidBuilder_ == null) { - return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; + public Builder addOpticalLinks(context.ContextOuterClass.OpticalLink.Builder builderForValue) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.add(builderForValue.build()); + onChanged(); } else { - return fiberUuidBuilder_.getMessage(); + opticalLinksBuilder_.addMessage(builderForValue.build()); } + return this; } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - public Builder setFiberUuid(context.ContextOuterClass.Uuid value) { - if (fiberUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fiberUuid_ = value; + public Builder addOpticalLinks(int index, context.ContextOuterClass.OpticalLink.Builder builderForValue) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.add(index, builderForValue.build()); onChanged(); } else { - fiberUuidBuilder_.setMessage(value); + opticalLinksBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - public Builder setFiberUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { - if (fiberUuidBuilder_ == null) { - fiberUuid_ = builderForValue.build(); + public Builder addAllOpticalLinks(java.lang.Iterable values) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, opticalLinks_); onChanged(); } else { - fiberUuidBuilder_.setMessage(builderForValue.build()); + opticalLinksBuilder_.addAllMessages(values); } return this; } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - public Builder mergeFiberUuid(context.ContextOuterClass.Uuid value) { - if (fiberUuidBuilder_ == null) { - if (fiberUuid_ != null) { - fiberUuid_ = context.ContextOuterClass.Uuid.newBuilder(fiberUuid_).mergeFrom(value).buildPartial(); - } else { - fiberUuid_ = value; - } + public Builder clearOpticalLinks() { + if (opticalLinksBuilder_ == null) { + opticalLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - fiberUuidBuilder_.mergeFrom(value); + opticalLinksBuilder_.clear(); } return this; } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - public Builder clearFiberUuid() { - if (fiberUuidBuilder_ == null) { - fiberUuid_ = null; + public Builder removeOpticalLinks(int index) { + if (opticalLinksBuilder_ == null) { + ensureOpticalLinksIsMutable(); + opticalLinks_.remove(index); onChanged(); } else { - fiberUuid_ = null; - fiberUuidBuilder_ = null; + opticalLinksBuilder_.remove(index); } return this; } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - public context.ContextOuterClass.Uuid.Builder getFiberUuidBuilder() { - onChanged(); - return getFiberUuidFieldBuilder().getBuilder(); + public context.ContextOuterClass.OpticalLink.Builder getOpticalLinksBuilder(int index) { + return getOpticalLinksFieldBuilder().getBuilder(index); } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - public context.ContextOuterClass.UuidOrBuilder getFiberUuidOrBuilder() { - if (fiberUuidBuilder_ != null) { - return fiberUuidBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.OpticalLinkOrBuilder getOpticalLinksOrBuilder(int index) { + if (opticalLinksBuilder_ == null) { + return opticalLinks_.get(index); } else { - return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; + return opticalLinksBuilder_.getMessageOrBuilder(index); } } /** - * .context.Uuid fiber_uuid = 1; + * repeated .context.OpticalLink optical_links = 1; */ - private com.google.protobuf.SingleFieldBuilderV3 getFiberUuidFieldBuilder() { - if (fiberUuidBuilder_ == null) { - fiberUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getFiberUuid(), getParentForChildren(), isClean()); - fiberUuid_ = null; + public java.util.List getOpticalLinksOrBuilderList() { + if (opticalLinksBuilder_ != null) { + return opticalLinksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(opticalLinks_); + } + } + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public context.ContextOuterClass.OpticalLink.Builder addOpticalLinksBuilder() { + return getOpticalLinksFieldBuilder().addBuilder(context.ContextOuterClass.OpticalLink.getDefaultInstance()); + } + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public context.ContextOuterClass.OpticalLink.Builder addOpticalLinksBuilder(int index) { + return getOpticalLinksFieldBuilder().addBuilder(index, context.ContextOuterClass.OpticalLink.getDefaultInstance()); + } + + /** + * repeated .context.OpticalLink optical_links = 1; + */ + public java.util.List getOpticalLinksBuilderList() { + return getOpticalLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getOpticalLinksFieldBuilder() { + if (opticalLinksBuilder_ == null) { + opticalLinksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(opticalLinks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + opticalLinks_ = null; } - return fiberUuidBuilder_; + return opticalLinksBuilder_; } @java.lang.Override @@ -75262,448 +76781,280 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.FiberId) + // @@protoc_insertion_point(builder_scope:context.OpticalLinkList) } - // @@protoc_insertion_point(class_scope:context.FiberId) - private static final context.ContextOuterClass.FiberId DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalLinkList) + private static final context.ContextOuterClass.OpticalLinkList DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.FiberId(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLinkList(); } - public static context.ContextOuterClass.FiberId getDefaultInstance() { + public static context.ContextOuterClass.OpticalLinkList getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public FiberId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FiberId(input, extensionRegistry); + public OpticalLinkList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.FiberId getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalLinkList getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface FiberOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Fiber) + public interface OpticalLinkDetailsOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLinkDetails) com.google.protobuf.MessageOrBuilder { /** - * string ID = 10; - * @return The iD. - */ - java.lang.String getID(); - - /** - * string ID = 10; - * @return The bytes for iD. + * float length = 1; + * @return The length. */ - com.google.protobuf.ByteString getIDBytes(); + float getLength(); /** - * string src_port = 1; + * string src_port = 2; * @return The srcPort. */ java.lang.String getSrcPort(); /** - * string src_port = 1; + * string src_port = 2; * @return The bytes for srcPort. */ com.google.protobuf.ByteString getSrcPortBytes(); /** - * string dst_port = 2; + * string dst_port = 3; * @return The dstPort. */ java.lang.String getDstPort(); /** - * string dst_port = 2; + * string dst_port = 3; * @return The bytes for dstPort. */ com.google.protobuf.ByteString getDstPortBytes(); /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return The localPeerPort. */ java.lang.String getLocalPeerPort(); /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return The bytes for localPeerPort. */ com.google.protobuf.ByteString getLocalPeerPortBytes(); /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return The remotePeerPort. */ java.lang.String getRemotePeerPort(); /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return The bytes for remotePeerPort. */ com.google.protobuf.ByteString getRemotePeerPortBytes(); /** - * repeated int32 c_slots = 5; - * @return A list containing the cSlots. + * bool used = 6; + * @return The used. */ - java.util.List getCSlotsList(); + boolean getUsed(); /** - * repeated int32 c_slots = 5; - * @return The count of cSlots. + * map<string, int32> c_slots = 7; */ int getCSlotsCount(); /** - * repeated int32 c_slots = 5; - * @param index The index of the element to return. - * @return The cSlots at the given index. + * map<string, int32> c_slots = 7; + */ + boolean containsCSlots(java.lang.String key); + + /** + * Use {@link #getCSlotsMap()} instead. */ - int getCSlots(int index); + @java.lang.Deprecated + java.util.Map getCSlots(); + + /** + * map<string, int32> c_slots = 7; + */ + java.util.Map getCSlotsMap(); /** - * repeated int32 l_slots = 6; - * @return A list containing the lSlots. + * map<string, int32> c_slots = 7; */ - java.util.List getLSlotsList(); + int getCSlotsOrDefault(java.lang.String key, int defaultValue); /** - * repeated int32 l_slots = 6; - * @return The count of lSlots. + * map<string, int32> c_slots = 7; + */ + int getCSlotsOrThrow(java.lang.String key); + + /** + * map<string, int32> l_slots = 8; */ int getLSlotsCount(); /** - * repeated int32 l_slots = 6; - * @param index The index of the element to return. - * @return The lSlots at the given index. + * map<string, int32> l_slots = 8; */ - int getLSlots(int index); + boolean containsLSlots(java.lang.String key); /** - * repeated int32 s_slots = 7; - * @return A list containing the sSlots. + * Use {@link #getLSlotsMap()} instead. */ - java.util.List getSSlotsList(); + @java.lang.Deprecated + java.util.Map getLSlots(); /** - * repeated int32 s_slots = 7; - * @return The count of sSlots. + * map<string, int32> l_slots = 8; */ - int getSSlotsCount(); + java.util.Map getLSlotsMap(); /** - * repeated int32 s_slots = 7; - * @param index The index of the element to return. - * @return The sSlots at the given index. + * map<string, int32> l_slots = 8; */ - int getSSlots(int index); + int getLSlotsOrDefault(java.lang.String key, int defaultValue); /** - * float length = 8; - * @return The length. + * map<string, int32> l_slots = 8; */ - float getLength(); + int getLSlotsOrThrow(java.lang.String key); /** - * bool used = 9; - * @return The used. + * map<string, int32> s_slots = 9; */ - boolean getUsed(); + int getSSlotsCount(); /** - * .context.FiberId fiber_uuid = 11; - * @return Whether the fiberUuid field is set. + * map<string, int32> s_slots = 9; */ - boolean hasFiberUuid(); + boolean containsSSlots(java.lang.String key); /** - * .context.FiberId fiber_uuid = 11; - * @return The fiberUuid. + * Use {@link #getSSlotsMap()} instead. */ - context.ContextOuterClass.FiberId getFiberUuid(); + @java.lang.Deprecated + java.util.Map getSSlots(); + + /** + * map<string, int32> s_slots = 9; + */ + java.util.Map getSSlotsMap(); /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - context.ContextOuterClass.FiberIdOrBuilder getFiberUuidOrBuilder(); + int getSSlotsOrDefault(java.lang.String key, int defaultValue); + + /** + * map<string, int32> s_slots = 9; + */ + int getSSlotsOrThrow(java.lang.String key); } /** - * Protobuf type {@code context.Fiber} + * Protobuf type {@code context.OpticalLinkDetails} */ - public static final class Fiber extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Fiber) - FiberOrBuilder { + public static final class OpticalLinkDetails extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLinkDetails) + OpticalLinkDetailsOrBuilder { private static final long serialVersionUID = 0L; - // Use Fiber.newBuilder() to construct. - private Fiber(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalLinkDetails.newBuilder() to construct. + private OpticalLinkDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Fiber() { - iD_ = ""; + private OpticalLinkDetails() { srcPort_ = ""; dstPort_ = ""; localPeerPort_ = ""; remotePeerPort_ = ""; - cSlots_ = emptyIntList(); - lSlots_ = emptyIntList(); - sSlots_ = emptyIntList(); } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Fiber(); + return new OpticalLinkDetails(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; } - private Fiber(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - srcPort_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - dstPort_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - localPeerPort_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - remotePeerPort_ = s; - break; - } - case 40: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - cSlots_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - cSlots_.addInt(input.readInt32()); - break; - } - case 42: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - cSlots_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - cSlots_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 48: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - lSlots_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - lSlots_.addInt(input.readInt32()); - break; - } - case 50: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - lSlots_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - lSlots_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 56: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - sSlots_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - sSlots_.addInt(input.readInt32()); - break; - } - case 58: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { - sSlots_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - sSlots_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 69: - { - length_ = input.readFloat(); - break; - } - case 72: - { - used_ = input.readBool(); - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - iD_ = s; - break; - } - case 90: - { - context.ContextOuterClass.FiberId.Builder subBuilder = null; - if (fiberUuid_ != null) { - subBuilder = fiberUuid_.toBuilder(); - } - fiberUuid_ = input.readMessage(context.ContextOuterClass.FiberId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fiberUuid_); - fiberUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - // C - cSlots_.makeImmutable(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - // C - lSlots_.makeImmutable(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - // C - sSlots_.makeImmutable(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); + @SuppressWarnings({ "rawtypes" }) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch(number) { + case 7: + return internalGetCSlots(); + case 8: + return internalGetLSlots(); + case 9: + return internalGetSSlots(); + default: + throw new RuntimeException("Invalid map field number: " + number); } } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_Fiber_descriptor; - } - @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Fiber_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Fiber.class, context.ContextOuterClass.Fiber.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkDetails.class, context.ContextOuterClass.OpticalLinkDetails.Builder.class); } - public static final int ID_FIELD_NUMBER = 10; - - private volatile java.lang.Object iD_; + public static final int LENGTH_FIELD_NUMBER = 1; - /** - * string ID = 10; - * @return The iD. - */ - @java.lang.Override - public java.lang.String getID() { - java.lang.Object ref = iD_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - iD_ = s; - return s; - } - } + private float length_ = 0F; /** - * string ID = 10; - * @return The bytes for iD. + * float length = 1; + * @return The length. */ @java.lang.Override - public com.google.protobuf.ByteString getIDBytes() { - java.lang.Object ref = iD_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - iD_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public float getLength() { + return length_; } - public static final int SRC_PORT_FIELD_NUMBER = 1; + public static final int SRC_PORT_FIELD_NUMBER = 2; - private volatile java.lang.Object srcPort_; + @SuppressWarnings("serial") + private volatile java.lang.Object srcPort_ = ""; /** - * string src_port = 1; + * string src_port = 2; * @return The srcPort. */ @java.lang.Override @@ -75720,7 +77071,7 @@ public final class ContextOuterClass { } /** - * string src_port = 1; + * string src_port = 2; * @return The bytes for srcPort. */ @java.lang.Override @@ -75735,12 +77086,13 @@ public final class ContextOuterClass { } } - public static final int DST_PORT_FIELD_NUMBER = 2; + public static final int DST_PORT_FIELD_NUMBER = 3; - private volatile java.lang.Object dstPort_; + @SuppressWarnings("serial") + private volatile java.lang.Object dstPort_ = ""; /** - * string dst_port = 2; + * string dst_port = 3; * @return The dstPort. */ @java.lang.Override @@ -75757,7 +77109,7 @@ public final class ContextOuterClass { } /** - * string dst_port = 2; + * string dst_port = 3; * @return The bytes for dstPort. */ @java.lang.Override @@ -75772,12 +77124,13 @@ public final class ContextOuterClass { } } - public static final int LOCAL_PEER_PORT_FIELD_NUMBER = 3; + public static final int LOCAL_PEER_PORT_FIELD_NUMBER = 4; - private volatile java.lang.Object localPeerPort_; + @SuppressWarnings("serial") + private volatile java.lang.Object localPeerPort_ = ""; /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return The localPeerPort. */ @java.lang.Override @@ -75794,7 +77147,7 @@ public final class ContextOuterClass { } /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return The bytes for localPeerPort. */ @java.lang.Override @@ -75809,12 +77162,13 @@ public final class ContextOuterClass { } } - public static final int REMOTE_PEER_PORT_FIELD_NUMBER = 4; + public static final int REMOTE_PEER_PORT_FIELD_NUMBER = 5; - private volatile java.lang.Object remotePeerPort_; + @SuppressWarnings("serial") + private volatile java.lang.Object remotePeerPort_ = ""; /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return The remotePeerPort. */ @java.lang.Override @@ -75831,7 +77185,7 @@ public final class ContextOuterClass { } /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return The bytes for remotePeerPort. */ @java.lang.Override @@ -75846,156 +77200,245 @@ public final class ContextOuterClass { } } - public static final int C_SLOTS_FIELD_NUMBER = 5; + public static final int USED_FIELD_NUMBER = 6; - private com.google.protobuf.Internal.IntList cSlots_; + private boolean used_ = false; /** - * repeated int32 c_slots = 5; - * @return A list containing the cSlots. + * bool used = 6; + * @return The used. */ @java.lang.Override - public java.util.List getCSlotsList() { + public boolean getUsed() { + return used_; + } + + public static final int C_SLOTS_FIELD_NUMBER = 7; + + private static final class CSlotsDefaultEntryHolder { + + static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance(context.ContextOuterClass.internal_static_context_OpticalLinkDetails_CSlotsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.INT32, 0); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField cSlots_; + + private com.google.protobuf.MapField internalGetCSlots() { + if (cSlots_ == null) { + return com.google.protobuf.MapField.emptyMapField(CSlotsDefaultEntryHolder.defaultEntry); + } return cSlots_; } - /** - * repeated int32 c_slots = 5; - * @return The count of cSlots. - */ public int getCSlotsCount() { - return cSlots_.size(); + return internalGetCSlots().getMap().size(); } /** - * repeated int32 c_slots = 5; - * @param index The index of the element to return. - * @return The cSlots at the given index. + * map<string, int32> c_slots = 7; */ - public int getCSlots(int index) { - return cSlots_.getInt(index); + @java.lang.Override + public boolean containsCSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetCSlots().getMap().containsKey(key); } - private int cSlotsMemoizedSerializedSize = -1; - - public static final int L_SLOTS_FIELD_NUMBER = 6; - - private com.google.protobuf.Internal.IntList lSlots_; + /** + * Use {@link #getCSlotsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCSlots() { + return getCSlotsMap(); + } /** - * repeated int32 l_slots = 6; - * @return A list containing the lSlots. + * map<string, int32> c_slots = 7; */ @java.lang.Override - public java.util.List getLSlotsList() { - return lSlots_; + public java.util.Map getCSlotsMap() { + return internalGetCSlots().getMap(); } /** - * repeated int32 l_slots = 6; - * @return The count of lSlots. + * map<string, int32> c_slots = 7; */ - public int getLSlotsCount() { - return lSlots_.size(); + @java.lang.Override + public int getCSlotsOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCSlots().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * repeated int32 l_slots = 6; - * @param index The index of the element to return. - * @return The lSlots at the given index. + * map<string, int32> c_slots = 7; */ - public int getLSlots(int index) { - return lSlots_.getInt(index); + @java.lang.Override + public int getCSlotsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCSlots().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int L_SLOTS_FIELD_NUMBER = 8; + + private static final class LSlotsDefaultEntryHolder { + + static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance(context.ContextOuterClass.internal_static_context_OpticalLinkDetails_LSlotsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.INT32, 0); } - private int lSlotsMemoizedSerializedSize = -1; + @SuppressWarnings("serial") + private com.google.protobuf.MapField lSlots_; - public static final int S_SLOTS_FIELD_NUMBER = 7; + private com.google.protobuf.MapField internalGetLSlots() { + if (lSlots_ == null) { + return com.google.protobuf.MapField.emptyMapField(LSlotsDefaultEntryHolder.defaultEntry); + } + return lSlots_; + } - private com.google.protobuf.Internal.IntList sSlots_; + public int getLSlotsCount() { + return internalGetLSlots().getMap().size(); + } /** - * repeated int32 s_slots = 7; - * @return A list containing the sSlots. + * map<string, int32> l_slots = 8; */ @java.lang.Override - public java.util.List getSSlotsList() { - return sSlots_; + public boolean containsLSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLSlots().getMap().containsKey(key); } /** - * repeated int32 s_slots = 7; - * @return The count of sSlots. + * Use {@link #getLSlotsMap()} instead. */ - public int getSSlotsCount() { - return sSlots_.size(); + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLSlots() { + return getLSlotsMap(); } /** - * repeated int32 s_slots = 7; - * @param index The index of the element to return. - * @return The sSlots at the given index. + * map<string, int32> l_slots = 8; */ - public int getSSlots(int index) { - return sSlots_.getInt(index); + @java.lang.Override + public java.util.Map getLSlotsMap() { + return internalGetLSlots().getMap(); } - private int sSlotsMemoizedSerializedSize = -1; - - public static final int LENGTH_FIELD_NUMBER = 8; - - private float length_; + /** + * map<string, int32> l_slots = 8; + */ + @java.lang.Override + public int getLSlotsOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLSlots().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } /** - * float length = 8; - * @return The length. + * map<string, int32> l_slots = 8; */ @java.lang.Override - public float getLength() { - return length_; + public int getLSlotsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLSlots().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int S_SLOTS_FIELD_NUMBER = 9; + + private static final class SSlotsDefaultEntryHolder { + + static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance(context.ContextOuterClass.internal_static_context_OpticalLinkDetails_SSlotsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.INT32, 0); } - public static final int USED_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private com.google.protobuf.MapField sSlots_; + + private com.google.protobuf.MapField internalGetSSlots() { + if (sSlots_ == null) { + return com.google.protobuf.MapField.emptyMapField(SSlotsDefaultEntryHolder.defaultEntry); + } + return sSlots_; + } - private boolean used_; + public int getSSlotsCount() { + return internalGetSSlots().getMap().size(); + } /** - * bool used = 9; - * @return The used. + * map<string, int32> s_slots = 9; */ @java.lang.Override - public boolean getUsed() { - return used_; + public boolean containsSSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetSSlots().getMap().containsKey(key); } - public static final int FIBER_UUID_FIELD_NUMBER = 11; - - private context.ContextOuterClass.FiberId fiberUuid_; + /** + * Use {@link #getSSlotsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSSlots() { + return getSSlotsMap(); + } /** - * .context.FiberId fiber_uuid = 11; - * @return Whether the fiberUuid field is set. + * map<string, int32> s_slots = 9; */ @java.lang.Override - public boolean hasFiberUuid() { - return fiberUuid_ != null; + public java.util.Map getSSlotsMap() { + return internalGetSSlots().getMap(); } /** - * .context.FiberId fiber_uuid = 11; - * @return The fiberUuid. + * map<string, int32> s_slots = 9; */ @java.lang.Override - public context.ContextOuterClass.FiberId getFiberUuid() { - return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; + public int getSSlotsOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetSSlots().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ @java.lang.Override - public context.ContextOuterClass.FiberIdOrBuilder getFiberUuidOrBuilder() { - return getFiberUuid(); + public int getSSlotsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetSSlots().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); } private byte memoizedIsInitialized = -1; @@ -76013,53 +77456,28 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (!getSrcPortBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcPort_); - } - if (!getDstPortBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstPort_); - } - if (!getLocalPeerPortBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, localPeerPort_); - } - if (!getRemotePeerPortBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, remotePeerPort_); - } - if (getCSlotsList().size() > 0) { - output.writeUInt32NoTag(42); - output.writeUInt32NoTag(cSlotsMemoizedSerializedSize); - } - for (int i = 0; i < cSlots_.size(); i++) { - output.writeInt32NoTag(cSlots_.getInt(i)); - } - if (getLSlotsList().size() > 0) { - output.writeUInt32NoTag(50); - output.writeUInt32NoTag(lSlotsMemoizedSerializedSize); + if (java.lang.Float.floatToRawIntBits(length_) != 0) { + output.writeFloat(1, length_); } - for (int i = 0; i < lSlots_.size(); i++) { - output.writeInt32NoTag(lSlots_.getInt(i)); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcPort_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, srcPort_); } - if (getSSlotsList().size() > 0) { - output.writeUInt32NoTag(58); - output.writeUInt32NoTag(sSlotsMemoizedSerializedSize); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstPort_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, dstPort_); } - for (int i = 0; i < sSlots_.size(); i++) { - output.writeInt32NoTag(sSlots_.getInt(i)); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(localPeerPort_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, localPeerPort_); } - if (length_ != 0F) { - output.writeFloat(8, length_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remotePeerPort_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remotePeerPort_); } if (used_ != false) { - output.writeBool(9, used_); - } - if (!getIDBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, iD_); + output.writeBool(6, used_); } - if (fiberUuid_ != null) { - output.writeMessage(11, getFiberUuid()); - } - unknownFields.writeTo(output); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(output, internalGetCSlots(), CSlotsDefaultEntryHolder.defaultEntry, 7); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(output, internalGetLSlots(), LSlotsDefaultEntryHolder.defaultEntry, 8); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(output, internalGetSSlots(), SSlotsDefaultEntryHolder.defaultEntry, 9); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -76068,67 +77486,37 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!getSrcPortBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcPort_); - } - if (!getDstPortBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstPort_); - } - if (!getLocalPeerPortBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, localPeerPort_); - } - if (!getRemotePeerPortBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, remotePeerPort_); + if (java.lang.Float.floatToRawIntBits(length_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, length_); } - { - int dataSize = 0; - for (int i = 0; i < cSlots_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(cSlots_.getInt(i)); - } - size += dataSize; - if (!getCSlotsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - cSlotsMemoizedSerializedSize = dataSize; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcPort_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, srcPort_); } - { - int dataSize = 0; - for (int i = 0; i < lSlots_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(lSlots_.getInt(i)); - } - size += dataSize; - if (!getLSlotsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - lSlotsMemoizedSerializedSize = dataSize; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstPort_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, dstPort_); } - { - int dataSize = 0; - for (int i = 0; i < sSlots_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(sSlots_.getInt(i)); - } - size += dataSize; - if (!getSSlotsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - sSlotsMemoizedSerializedSize = dataSize; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(localPeerPort_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, localPeerPort_); } - if (length_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(8, length_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remotePeerPort_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remotePeerPort_); } if (used_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, used_); + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, used_); + } + for (java.util.Map.Entry entry : internalGetCSlots().getMap().entrySet()) { + com.google.protobuf.MapEntry cSlots__ = CSlotsDefaultEntryHolder.defaultEntry.newBuilderForType().setKey(entry.getKey()).setValue(entry.getValue()).build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, cSlots__); } - if (!getIDBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, iD_); + for (java.util.Map.Entry entry : internalGetLSlots().getMap().entrySet()) { + com.google.protobuf.MapEntry lSlots__ = LSlotsDefaultEntryHolder.defaultEntry.newBuilderForType().setKey(entry.getKey()).setValue(entry.getValue()).build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, lSlots__); } - if (fiberUuid_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getFiberUuid()); + for (java.util.Map.Entry entry : internalGetSSlots().getMap().entrySet()) { + com.google.protobuf.MapEntry sSlots__ = SSlotsDefaultEntryHolder.defaultEntry.newBuilderForType().setKey(entry.getKey()).setValue(entry.getValue()).build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, sSlots__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -76138,11 +77526,11 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.Fiber)) { + if (!(obj instanceof context.ContextOuterClass.OpticalLinkDetails)) { return super.equals(obj); } - context.ContextOuterClass.Fiber other = (context.ContextOuterClass.Fiber) obj; - if (!getID().equals(other.getID())) + context.ContextOuterClass.OpticalLinkDetails other = (context.ContextOuterClass.OpticalLinkDetails) obj; + if (java.lang.Float.floatToIntBits(getLength()) != java.lang.Float.floatToIntBits(other.getLength())) return false; if (!getSrcPort().equals(other.getSrcPort())) return false; @@ -76152,23 +77540,15 @@ public final class ContextOuterClass { return false; if (!getRemotePeerPort().equals(other.getRemotePeerPort())) return false; - if (!getCSlotsList().equals(other.getCSlotsList())) - return false; - if (!getLSlotsList().equals(other.getLSlotsList())) - return false; - if (!getSSlotsList().equals(other.getSSlotsList())) + if (getUsed() != other.getUsed()) return false; - if (java.lang.Float.floatToIntBits(getLength()) != java.lang.Float.floatToIntBits(other.getLength())) + if (!internalGetCSlots().equals(other.internalGetCSlots())) return false; - if (getUsed() != other.getUsed()) + if (!internalGetLSlots().equals(other.internalGetLSlots())) return false; - if (hasFiberUuid() != other.hasFiberUuid()) + if (!internalGetSSlots().equals(other.internalGetSSlots())) return false; - if (hasFiberUuid()) { - if (!getFiberUuid().equals(other.getFiberUuid())) - return false; - } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -76180,8 +77560,8 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getID().hashCode(); + hash = (37 * hash) + LENGTH_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getLength()); hash = (37 * hash) + SRC_PORT_FIELD_NUMBER; hash = (53 * hash) + getSrcPort().hashCode(); hash = (37 * hash) + DST_PORT_FIELD_NUMBER; @@ -76190,76 +77570,70 @@ public final class ContextOuterClass { hash = (53 * hash) + getLocalPeerPort().hashCode(); hash = (37 * hash) + REMOTE_PEER_PORT_FIELD_NUMBER; hash = (53 * hash) + getRemotePeerPort().hashCode(); - if (getCSlotsCount() > 0) { + hash = (37 * hash) + USED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUsed()); + if (!internalGetCSlots().getMap().isEmpty()) { hash = (37 * hash) + C_SLOTS_FIELD_NUMBER; - hash = (53 * hash) + getCSlotsList().hashCode(); + hash = (53 * hash) + internalGetCSlots().hashCode(); } - if (getLSlotsCount() > 0) { + if (!internalGetLSlots().getMap().isEmpty()) { hash = (37 * hash) + L_SLOTS_FIELD_NUMBER; - hash = (53 * hash) + getLSlotsList().hashCode(); + hash = (53 * hash) + internalGetLSlots().hashCode(); } - if (getSSlotsCount() > 0) { + if (!internalGetSSlots().getMap().isEmpty()) { hash = (37 * hash) + S_SLOTS_FIELD_NUMBER; - hash = (53 * hash) + getSSlotsList().hashCode(); + hash = (53 * hash) + internalGetSSlots().hashCode(); } - hash = (37 * hash) + LENGTH_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getLength()); - hash = (37 * hash) + USED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUsed()); - if (hasFiberUuid()) { - hash = (37 * hash) + FIBER_UUID_FIELD_NUMBER; - hash = (53 * hash) + getFiberUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.Fiber parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.Fiber parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.Fiber parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.Fiber parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.Fiber parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.Fiber parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.Fiber parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkDetails parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.Fiber parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkDetails parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -76272,7 +77646,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.Fiber prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalLinkDetails prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -76288,73 +77662,85 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.Fiber} + * Protobuf type {@code context.OpticalLinkDetails} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Fiber) - context.ContextOuterClass.FiberOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLinkDetails) + context.ContextOuterClass.OpticalLinkDetailsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_Fiber_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + } + + @SuppressWarnings({ "rawtypes" }) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch(number) { + case 7: + return internalGetCSlots(); + case 8: + return internalGetLSlots(); + case 9: + return internalGetSSlots(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({ "rawtypes" }) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch(number) { + case 7: + return internalGetMutableCSlots(); + case 8: + return internalGetMutableLSlots(); + case 9: + return internalGetMutableSSlots(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Fiber_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Fiber.class, context.ContextOuterClass.Fiber.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkDetails.class, context.ContextOuterClass.OpticalLinkDetails.Builder.class); } - // Construct using context.ContextOuterClass.Fiber.newBuilder() + // Construct using context.ContextOuterClass.OpticalLinkDetails.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - iD_ = ""; + bitField0_ = 0; + length_ = 0F; srcPort_ = ""; dstPort_ = ""; localPeerPort_ = ""; remotePeerPort_ = ""; - cSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - lSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - sSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); - length_ = 0F; used_ = false; - if (fiberUuidBuilder_ == null) { - fiberUuid_ = null; - } else { - fiberUuid_ = null; - fiberUuidBuilder_ = null; - } + internalGetMutableCSlots().clear(); + internalGetMutableLSlots().clear(); + internalGetMutableSSlots().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Fiber_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; } @java.lang.Override - public context.ContextOuterClass.Fiber getDefaultInstanceForType() { - return context.ContextOuterClass.Fiber.getDefaultInstance(); + public context.ContextOuterClass.OpticalLinkDetails getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.Fiber build() { - context.ContextOuterClass.Fiber result = buildPartial(); + public context.ContextOuterClass.OpticalLinkDetails build() { + context.ContextOuterClass.OpticalLinkDetails result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -76362,143 +77748,95 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.Fiber buildPartial() { - context.ContextOuterClass.Fiber result = new context.ContextOuterClass.Fiber(this); - int from_bitField0_ = bitField0_; - result.iD_ = iD_; - result.srcPort_ = srcPort_; - result.dstPort_ = dstPort_; - result.localPeerPort_ = localPeerPort_; - result.remotePeerPort_ = remotePeerPort_; - if (((bitField0_ & 0x00000001) != 0)) { - cSlots_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.cSlots_ = cSlots_; - if (((bitField0_ & 0x00000002) != 0)) { - lSlots_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.lSlots_ = lSlots_; - if (((bitField0_ & 0x00000004) != 0)) { - sSlots_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.sSlots_ = sSlots_; - result.length_ = length_; - result.used_ = used_; - if (fiberUuidBuilder_ == null) { - result.fiberUuid_ = fiberUuid_; - } else { - result.fiberUuid_ = fiberUuidBuilder_.build(); + public context.ContextOuterClass.OpticalLinkDetails buildPartial() { + context.ContextOuterClass.OpticalLinkDetails result = new context.ContextOuterClass.OpticalLinkDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.OpticalLinkDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.length_ = length_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.srcPort_ = srcPort_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dstPort_ = dstPort_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.localPeerPort_ = localPeerPort_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remotePeerPort_ = remotePeerPort_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.used_ = used_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.cSlots_ = internalGetCSlots(); + result.cSlots_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.lSlots_ = internalGetLSlots(); + result.lSlots_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.sSlots_ = internalGetSSlots(); + result.sSlots_.makeImmutable(); + } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Fiber) { - return mergeFrom((context.ContextOuterClass.Fiber) other); + if (other instanceof context.ContextOuterClass.OpticalLinkDetails) { + return mergeFrom((context.ContextOuterClass.OpticalLinkDetails) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.Fiber other) { - if (other == context.ContextOuterClass.Fiber.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalLinkDetails other) { + if (other == context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance()) return this; - if (!other.getID().isEmpty()) { - iD_ = other.iD_; - onChanged(); + if (other.getLength() != 0F) { + setLength(other.getLength()); } if (!other.getSrcPort().isEmpty()) { srcPort_ = other.srcPort_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getDstPort().isEmpty()) { dstPort_ = other.dstPort_; + bitField0_ |= 0x00000004; onChanged(); } if (!other.getLocalPeerPort().isEmpty()) { localPeerPort_ = other.localPeerPort_; + bitField0_ |= 0x00000008; onChanged(); } if (!other.getRemotePeerPort().isEmpty()) { remotePeerPort_ = other.remotePeerPort_; + bitField0_ |= 0x00000010; onChanged(); } - if (!other.cSlots_.isEmpty()) { - if (cSlots_.isEmpty()) { - cSlots_ = other.cSlots_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCSlotsIsMutable(); - cSlots_.addAll(other.cSlots_); - } - onChanged(); - } - if (!other.lSlots_.isEmpty()) { - if (lSlots_.isEmpty()) { - lSlots_ = other.lSlots_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLSlotsIsMutable(); - lSlots_.addAll(other.lSlots_); - } - onChanged(); - } - if (!other.sSlots_.isEmpty()) { - if (sSlots_.isEmpty()) { - sSlots_ = other.sSlots_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureSSlotsIsMutable(); - sSlots_.addAll(other.sSlots_); - } - onChanged(); - } - if (other.getLength() != 0F) { - setLength(other.getLength()); - } if (other.getUsed() != false) { setUsed(other.getUsed()); } - if (other.hasFiberUuid()) { - mergeFiberUuid(other.getFiberUuid()); - } - this.mergeUnknownFields(other.unknownFields); + internalGetMutableCSlots().mergeFrom(other.internalGetCSlots()); + bitField0_ |= 0x00000040; + internalGetMutableLSlots().mergeFrom(other.internalGetLSlots()); + bitField0_ |= 0x00000080; + internalGetMutableSSlots().mergeFrom(other.internalGetSSlots()); + bitField0_ |= 0x00000100; + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -76510,90 +77848,136 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Fiber parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 13: + { + length_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } + // case 13 + case 18: + { + srcPort_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + dstPort_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + localPeerPort_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } + // case 34 + case 42: + { + remotePeerPort_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } + // case 42 + case 48: + { + used_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } + // case 48 + case 58: + { + com.google.protobuf.MapEntry cSlots__ = input.readMessage(CSlotsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableCSlots().getMutableMap().put(cSlots__.getKey(), cSlots__.getValue()); + bitField0_ |= 0x00000040; + break; + } + // case 58 + case 66: + { + com.google.protobuf.MapEntry lSlots__ = input.readMessage(LSlotsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableLSlots().getMutableMap().put(lSlots__.getKey(), lSlots__.getValue()); + bitField0_ |= 0x00000080; + break; + } + // case 66 + case 74: + { + com.google.protobuf.MapEntry sSlots__ = input.readMessage(SSlotsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSSlots().getMutableMap().put(sSlots__.getKey(), sSlots__.getValue()); + bitField0_ |= 0x00000100; + break; + } + // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Fiber) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } private int bitField0_; - private java.lang.Object iD_ = ""; - - /** - * string ID = 10; - * @return The iD. - */ - public java.lang.String getID() { - java.lang.Object ref = iD_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - iD_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * string ID = 10; - * @return The bytes for iD. - */ - public com.google.protobuf.ByteString getIDBytes() { - java.lang.Object ref = iD_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - iD_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private float length_; /** - * string ID = 10; - * @param value The iD to set. - * @return This builder for chaining. + * float length = 1; + * @return The length. */ - public Builder setID(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - iD_ = value; - onChanged(); - return this; + @java.lang.Override + public float getLength() { + return length_; } /** - * string ID = 10; + * float length = 1; + * @param value The length to set. * @return This builder for chaining. */ - public Builder clearID() { - iD_ = getDefaultInstance().getID(); + public Builder setLength(float value) { + length_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * string ID = 10; - * @param value The bytes for iD to set. + * float length = 1; * @return This builder for chaining. */ - public Builder setIDBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - iD_ = value; + public Builder clearLength() { + bitField0_ = (bitField0_ & ~0x00000001); + length_ = 0F; onChanged(); return this; } @@ -76601,7 +77985,7 @@ public final class ContextOuterClass { private java.lang.Object srcPort_ = ""; /** - * string src_port = 1; + * string src_port = 2; * @return The srcPort. */ public java.lang.String getSrcPort() { @@ -76617,7 +78001,7 @@ public final class ContextOuterClass { } /** - * string src_port = 1; + * string src_port = 2; * @return The bytes for srcPort. */ public com.google.protobuf.ByteString getSrcPortBytes() { @@ -76632,7 +78016,7 @@ public final class ContextOuterClass { } /** - * string src_port = 1; + * string src_port = 2; * @param value The srcPort to set. * @return This builder for chaining. */ @@ -76641,22 +78025,24 @@ public final class ContextOuterClass { throw new NullPointerException(); } srcPort_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * string src_port = 1; + * string src_port = 2; * @return This builder for chaining. */ public Builder clearSrcPort() { srcPort_ = getDefaultInstance().getSrcPort(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** - * string src_port = 1; + * string src_port = 2; * @param value The bytes for srcPort to set. * @return This builder for chaining. */ @@ -76666,6 +78052,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); srcPort_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -76673,7 +78060,7 @@ public final class ContextOuterClass { private java.lang.Object dstPort_ = ""; /** - * string dst_port = 2; + * string dst_port = 3; * @return The dstPort. */ public java.lang.String getDstPort() { @@ -76689,7 +78076,7 @@ public final class ContextOuterClass { } /** - * string dst_port = 2; + * string dst_port = 3; * @return The bytes for dstPort. */ public com.google.protobuf.ByteString getDstPortBytes() { @@ -76704,7 +78091,7 @@ public final class ContextOuterClass { } /** - * string dst_port = 2; + * string dst_port = 3; * @param value The dstPort to set. * @return This builder for chaining. */ @@ -76713,22 +78100,24 @@ public final class ContextOuterClass { throw new NullPointerException(); } dstPort_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** - * string dst_port = 2; + * string dst_port = 3; * @return This builder for chaining. */ public Builder clearDstPort() { dstPort_ = getDefaultInstance().getDstPort(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** - * string dst_port = 2; + * string dst_port = 3; * @param value The bytes for dstPort to set. * @return This builder for chaining. */ @@ -76738,6 +78127,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); dstPort_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -76745,7 +78135,7 @@ public final class ContextOuterClass { private java.lang.Object localPeerPort_ = ""; /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return The localPeerPort. */ public java.lang.String getLocalPeerPort() { @@ -76761,7 +78151,7 @@ public final class ContextOuterClass { } /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return The bytes for localPeerPort. */ public com.google.protobuf.ByteString getLocalPeerPortBytes() { @@ -76776,7 +78166,7 @@ public final class ContextOuterClass { } /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @param value The localPeerPort to set. * @return This builder for chaining. */ @@ -76785,22 +78175,24 @@ public final class ContextOuterClass { throw new NullPointerException(); } localPeerPort_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @return This builder for chaining. */ public Builder clearLocalPeerPort() { localPeerPort_ = getDefaultInstance().getLocalPeerPort(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** - * string local_peer_port = 3; + * string local_peer_port = 4; * @param value The bytes for localPeerPort to set. * @return This builder for chaining. */ @@ -76810,6 +78202,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); localPeerPort_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -76817,7 +78210,7 @@ public final class ContextOuterClass { private java.lang.Object remotePeerPort_ = ""; /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return The remotePeerPort. */ public java.lang.String getRemotePeerPort() { @@ -76833,7 +78226,7 @@ public final class ContextOuterClass { } /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return The bytes for remotePeerPort. */ public com.google.protobuf.ByteString getRemotePeerPortBytes() { @@ -76848,7 +78241,7 @@ public final class ContextOuterClass { } /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @param value The remotePeerPort to set. * @return This builder for chaining. */ @@ -76857,22 +78250,24 @@ public final class ContextOuterClass { throw new NullPointerException(); } remotePeerPort_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @return This builder for chaining. */ public Builder clearRemotePeerPort() { remotePeerPort_ = getDefaultInstance().getRemotePeerPort(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** - * string remote_peer_port = 4; + * string remote_peer_port = 5; * @param value The bytes for remotePeerPort to set. * @return This builder for chaining. */ @@ -76882,432 +78277,424 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); remotePeerPort_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } - private com.google.protobuf.Internal.IntList cSlots_ = emptyIntList(); - - private void ensureCSlotsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - cSlots_ = mutableCopy(cSlots_); - bitField0_ |= 0x00000001; - } - } - - /** - * repeated int32 c_slots = 5; - * @return A list containing the cSlots. - */ - public java.util.List getCSlotsList() { - return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(cSlots_) : cSlots_; - } - - /** - * repeated int32 c_slots = 5; - * @return The count of cSlots. - */ - public int getCSlotsCount() { - return cSlots_.size(); - } + private boolean used_; /** - * repeated int32 c_slots = 5; - * @param index The index of the element to return. - * @return The cSlots at the given index. + * bool used = 6; + * @return The used. */ - public int getCSlots(int index) { - return cSlots_.getInt(index); + @java.lang.Override + public boolean getUsed() { + return used_; } /** - * repeated int32 c_slots = 5; - * @param index The index to set the value at. - * @param value The cSlots to set. + * bool used = 6; + * @param value The used to set. * @return This builder for chaining. */ - public Builder setCSlots(int index, int value) { - ensureCSlotsIsMutable(); - cSlots_.setInt(index, value); + public Builder setUsed(boolean value) { + used_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } /** - * repeated int32 c_slots = 5; - * @param value The cSlots to add. + * bool used = 6; * @return This builder for chaining. */ - public Builder addCSlots(int value) { - ensureCSlotsIsMutable(); - cSlots_.addInt(value); + public Builder clearUsed() { + bitField0_ = (bitField0_ & ~0x00000020); + used_ = false; onChanged(); return this; } - /** - * repeated int32 c_slots = 5; - * @param values The cSlots to add. - * @return This builder for chaining. - */ - public Builder addAllCSlots(java.lang.Iterable values) { - ensureCSlotsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cSlots_); - onChanged(); - return this; + private com.google.protobuf.MapField cSlots_; + + private com.google.protobuf.MapField internalGetCSlots() { + if (cSlots_ == null) { + return com.google.protobuf.MapField.emptyMapField(CSlotsDefaultEntryHolder.defaultEntry); + } + return cSlots_; } - /** - * repeated int32 c_slots = 5; - * @return This builder for chaining. - */ - public Builder clearCSlots() { - cSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); + private com.google.protobuf.MapField internalGetMutableCSlots() { + if (cSlots_ == null) { + cSlots_ = com.google.protobuf.MapField.newMapField(CSlotsDefaultEntryHolder.defaultEntry); + } + if (!cSlots_.isMutable()) { + cSlots_ = cSlots_.copy(); + } + bitField0_ |= 0x00000040; onChanged(); - return this; + return cSlots_; } - private com.google.protobuf.Internal.IntList lSlots_ = emptyIntList(); + public int getCSlotsCount() { + return internalGetCSlots().getMap().size(); + } - private void ensureLSlotsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - lSlots_ = mutableCopy(lSlots_); - bitField0_ |= 0x00000002; + /** + * map<string, int32> c_slots = 7; + */ + @java.lang.Override + public boolean containsCSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } + return internalGetCSlots().getMap().containsKey(key); } /** - * repeated int32 l_slots = 6; - * @return A list containing the lSlots. + * Use {@link #getCSlotsMap()} instead. */ - public java.util.List getLSlotsList() { - return ((bitField0_ & 0x00000002) != 0) ? java.util.Collections.unmodifiableList(lSlots_) : lSlots_; + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCSlots() { + return getCSlotsMap(); } /** - * repeated int32 l_slots = 6; - * @return The count of lSlots. + * map<string, int32> c_slots = 7; */ - public int getLSlotsCount() { - return lSlots_.size(); + @java.lang.Override + public java.util.Map getCSlotsMap() { + return internalGetCSlots().getMap(); } /** - * repeated int32 l_slots = 6; - * @param index The index of the element to return. - * @return The lSlots at the given index. + * map<string, int32> c_slots = 7; */ - public int getLSlots(int index) { - return lSlots_.getInt(index); + @java.lang.Override + public int getCSlotsOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCSlots().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * repeated int32 l_slots = 6; - * @param index The index to set the value at. - * @param value The lSlots to set. - * @return This builder for chaining. + * map<string, int32> c_slots = 7; */ - public Builder setLSlots(int index, int value) { - ensureLSlotsIsMutable(); - lSlots_.setInt(index, value); - onChanged(); + @java.lang.Override + public int getCSlotsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetCSlots().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearCSlots() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableCSlots().getMutableMap().clear(); return this; } /** - * repeated int32 l_slots = 6; - * @param value The lSlots to add. - * @return This builder for chaining. + * map<string, int32> c_slots = 7; */ - public Builder addLSlots(int value) { - ensureLSlotsIsMutable(); - lSlots_.addInt(value); - onChanged(); + public Builder removeCSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableCSlots().getMutableMap().remove(key); return this; } /** - * repeated int32 l_slots = 6; - * @param values The lSlots to add. - * @return This builder for chaining. + * Use alternate mutation accessors instead. */ - public Builder addAllLSlots(java.lang.Iterable values) { - ensureLSlotsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, lSlots_); - onChanged(); + @java.lang.Deprecated + public java.util.Map getMutableCSlots() { + bitField0_ |= 0x00000040; + return internalGetMutableCSlots().getMutableMap(); + } + + /** + * map<string, int32> c_slots = 7; + */ + public Builder putCSlots(java.lang.String key, int value) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableCSlots().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; return this; } /** - * repeated int32 l_slots = 6; - * @return This builder for chaining. + * map<string, int32> c_slots = 7; */ - public Builder clearLSlots() { - lSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); + public Builder putAllCSlots(java.util.Map values) { + internalGetMutableCSlots().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; return this; } - private com.google.protobuf.Internal.IntList sSlots_ = emptyIntList(); + private com.google.protobuf.MapField lSlots_; - private void ensureSSlotsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - sSlots_ = mutableCopy(sSlots_); - bitField0_ |= 0x00000004; + private com.google.protobuf.MapField internalGetLSlots() { + if (lSlots_ == null) { + return com.google.protobuf.MapField.emptyMapField(LSlotsDefaultEntryHolder.defaultEntry); } + return lSlots_; } - /** - * repeated int32 s_slots = 7; - * @return A list containing the sSlots. - */ - public java.util.List getSSlotsList() { - return ((bitField0_ & 0x00000004) != 0) ? java.util.Collections.unmodifiableList(sSlots_) : sSlots_; + private com.google.protobuf.MapField internalGetMutableLSlots() { + if (lSlots_ == null) { + lSlots_ = com.google.protobuf.MapField.newMapField(LSlotsDefaultEntryHolder.defaultEntry); + } + if (!lSlots_.isMutable()) { + lSlots_ = lSlots_.copy(); + } + bitField0_ |= 0x00000080; + onChanged(); + return lSlots_; + } + + public int getLSlotsCount() { + return internalGetLSlots().getMap().size(); } /** - * repeated int32 s_slots = 7; - * @return The count of sSlots. + * map<string, int32> l_slots = 8; */ - public int getSSlotsCount() { - return sSlots_.size(); + @java.lang.Override + public boolean containsLSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLSlots().getMap().containsKey(key); } /** - * repeated int32 s_slots = 7; - * @param index The index of the element to return. - * @return The sSlots at the given index. + * Use {@link #getLSlotsMap()} instead. */ - public int getSSlots(int index) { - return sSlots_.getInt(index); + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLSlots() { + return getLSlotsMap(); } /** - * repeated int32 s_slots = 7; - * @param index The index to set the value at. - * @param value The sSlots to set. - * @return This builder for chaining. + * map<string, int32> l_slots = 8; */ - public Builder setSSlots(int index, int value) { - ensureSSlotsIsMutable(); - sSlots_.setInt(index, value); - onChanged(); - return this; + @java.lang.Override + public java.util.Map getLSlotsMap() { + return internalGetLSlots().getMap(); } /** - * repeated int32 s_slots = 7; - * @param value The sSlots to add. - * @return This builder for chaining. + * map<string, int32> l_slots = 8; */ - public Builder addSSlots(int value) { - ensureSSlotsIsMutable(); - sSlots_.addInt(value); - onChanged(); - return this; + @java.lang.Override + public int getLSlotsOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLSlots().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * repeated int32 s_slots = 7; - * @param values The sSlots to add. - * @return This builder for chaining. + * map<string, int32> l_slots = 8; */ - public Builder addAllSSlots(java.lang.Iterable values) { - ensureSSlotsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sSlots_); - onChanged(); + @java.lang.Override + public int getLSlotsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLSlots().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLSlots() { + bitField0_ = (bitField0_ & ~0x00000080); + internalGetMutableLSlots().getMutableMap().clear(); return this; } /** - * repeated int32 s_slots = 7; - * @return This builder for chaining. + * map<string, int32> l_slots = 8; */ - public Builder clearSSlots() { - sSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); + public Builder removeLSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLSlots().getMutableMap().remove(key); return this; } - private float length_; - /** - * float length = 8; - * @return The length. + * Use alternate mutation accessors instead. */ - @java.lang.Override - public float getLength() { - return length_; + @java.lang.Deprecated + public java.util.Map getMutableLSlots() { + bitField0_ |= 0x00000080; + return internalGetMutableLSlots().getMutableMap(); } /** - * float length = 8; - * @param value The length to set. - * @return This builder for chaining. + * map<string, int32> l_slots = 8; */ - public Builder setLength(float value) { - length_ = value; - onChanged(); + public Builder putLSlots(java.lang.String key, int value) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLSlots().getMutableMap().put(key, value); + bitField0_ |= 0x00000080; return this; } /** - * float length = 8; - * @return This builder for chaining. + * map<string, int32> l_slots = 8; */ - public Builder clearLength() { - length_ = 0F; - onChanged(); + public Builder putAllLSlots(java.util.Map values) { + internalGetMutableLSlots().getMutableMap().putAll(values); + bitField0_ |= 0x00000080; return this; } - private boolean used_; + private com.google.protobuf.MapField sSlots_; - /** - * bool used = 9; - * @return The used. - */ - @java.lang.Override - public boolean getUsed() { - return used_; + private com.google.protobuf.MapField internalGetSSlots() { + if (sSlots_ == null) { + return com.google.protobuf.MapField.emptyMapField(SSlotsDefaultEntryHolder.defaultEntry); + } + return sSlots_; } - /** - * bool used = 9; - * @param value The used to set. - * @return This builder for chaining. - */ - public Builder setUsed(boolean value) { - used_ = value; + private com.google.protobuf.MapField internalGetMutableSSlots() { + if (sSlots_ == null) { + sSlots_ = com.google.protobuf.MapField.newMapField(SSlotsDefaultEntryHolder.defaultEntry); + } + if (!sSlots_.isMutable()) { + sSlots_ = sSlots_.copy(); + } + bitField0_ |= 0x00000100; onChanged(); - return this; + return sSlots_; } - /** - * bool used = 9; - * @return This builder for chaining. - */ - public Builder clearUsed() { - used_ = false; - onChanged(); - return this; + public int getSSlotsCount() { + return internalGetSSlots().getMap().size(); } - private context.ContextOuterClass.FiberId fiberUuid_; - - private com.google.protobuf.SingleFieldBuilderV3 fiberUuidBuilder_; - /** - * .context.FiberId fiber_uuid = 11; - * @return Whether the fiberUuid field is set. + * map<string, int32> s_slots = 9; */ - public boolean hasFiberUuid() { - return fiberUuidBuilder_ != null || fiberUuid_ != null; + @java.lang.Override + public boolean containsSSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetSSlots().getMap().containsKey(key); } /** - * .context.FiberId fiber_uuid = 11; - * @return The fiberUuid. + * Use {@link #getSSlotsMap()} instead. */ - public context.ContextOuterClass.FiberId getFiberUuid() { - if (fiberUuidBuilder_ == null) { - return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; - } else { - return fiberUuidBuilder_.getMessage(); - } + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSSlots() { + return getSSlotsMap(); } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - public Builder setFiberUuid(context.ContextOuterClass.FiberId value) { - if (fiberUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fiberUuid_ = value; - onChanged(); - } else { - fiberUuidBuilder_.setMessage(value); - } - return this; + @java.lang.Override + public java.util.Map getSSlotsMap() { + return internalGetSSlots().getMap(); } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - public Builder setFiberUuid(context.ContextOuterClass.FiberId.Builder builderForValue) { - if (fiberUuidBuilder_ == null) { - fiberUuid_ = builderForValue.build(); - onChanged(); - } else { - fiberUuidBuilder_.setMessage(builderForValue.build()); + @java.lang.Override + public int getSSlotsOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); } - return this; + java.util.Map map = internalGetSSlots().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - public Builder mergeFiberUuid(context.ContextOuterClass.FiberId value) { - if (fiberUuidBuilder_ == null) { - if (fiberUuid_ != null) { - fiberUuid_ = context.ContextOuterClass.FiberId.newBuilder(fiberUuid_).mergeFrom(value).buildPartial(); - } else { - fiberUuid_ = value; - } - onChanged(); - } else { - fiberUuidBuilder_.mergeFrom(value); + @java.lang.Override + public int getSSlotsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetSSlots().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); } + return map.get(key); + } + + public Builder clearSSlots() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableSSlots().getMutableMap().clear(); return this; } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - public Builder clearFiberUuid() { - if (fiberUuidBuilder_ == null) { - fiberUuid_ = null; - onChanged(); - } else { - fiberUuid_ = null; - fiberUuidBuilder_ = null; + public Builder removeSSlots(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } + internalGetMutableSSlots().getMutableMap().remove(key); return this; } /** - * .context.FiberId fiber_uuid = 11; + * Use alternate mutation accessors instead. */ - public context.ContextOuterClass.FiberId.Builder getFiberUuidBuilder() { - onChanged(); - return getFiberUuidFieldBuilder().getBuilder(); + @java.lang.Deprecated + public java.util.Map getMutableSSlots() { + bitField0_ |= 0x00000100; + return internalGetMutableSSlots().getMutableMap(); } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - public context.ContextOuterClass.FiberIdOrBuilder getFiberUuidOrBuilder() { - if (fiberUuidBuilder_ != null) { - return fiberUuidBuilder_.getMessageOrBuilder(); - } else { - return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; + public Builder putSSlots(java.lang.String key, int value) { + if (key == null) { + throw new NullPointerException("map key"); } + internalGetMutableSSlots().getMutableMap().put(key, value); + bitField0_ |= 0x00000100; + return this; } /** - * .context.FiberId fiber_uuid = 11; + * map<string, int32> s_slots = 9; */ - private com.google.protobuf.SingleFieldBuilderV3 getFiberUuidFieldBuilder() { - if (fiberUuidBuilder_ == null) { - fiberUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getFiberUuid(), getParentForChildren(), isClean()); - fiberUuid_ = null; - } - return fiberUuidBuilder_; + public Builder putAllSSlots(java.util.Map values) { + internalGetMutableSSlots().getMutableMap().putAll(values); + bitField0_ |= 0x00000100; + return this; } @java.lang.Override @@ -77319,333 +78706,302 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.Fiber) + // @@protoc_insertion_point(builder_scope:context.OpticalLinkDetails) } - // @@protoc_insertion_point(class_scope:context.Fiber) - private static final context.ContextOuterClass.Fiber DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalLinkDetails) + private static final context.ContextOuterClass.OpticalLinkDetails DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Fiber(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLinkDetails(); } - public static context.ContextOuterClass.Fiber getDefaultInstance() { + public static context.ContextOuterClass.OpticalLinkDetails getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public Fiber parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Fiber(input, extensionRegistry); + public OpticalLinkDetails parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.Fiber getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalLinkDetails getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OpticalLinkDetailsOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLinkDetails) + public interface OpticalLinkOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLink) com.google.protobuf.MessageOrBuilder { /** - * float length = 1; - * @return The length. + * string name = 1; + * @return The name. */ - float getLength(); + java.lang.String getName(); + + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * .context.OpticalLinkDetails optical_details = 2; + * @return Whether the opticalDetails field is set. + */ + boolean hasOpticalDetails(); + + /** + * .context.OpticalLinkDetails optical_details = 2; + * @return The opticalDetails. + */ + context.ContextOuterClass.OpticalLinkDetails getOpticalDetails(); /** - * string source = 2; - * @return The source. + * .context.OpticalLinkDetails optical_details = 2; */ - java.lang.String getSource(); + context.ContextOuterClass.OpticalLinkDetailsOrBuilder getOpticalDetailsOrBuilder(); /** - * string source = 2; - * @return The bytes for source. + * .context.LinkId link_id = 3; + * @return Whether the linkId field is set. */ - com.google.protobuf.ByteString getSourceBytes(); + boolean hasLinkId(); /** - * string target = 3; - * @return The target. + * .context.LinkId link_id = 3; + * @return The linkId. */ - java.lang.String getTarget(); + context.ContextOuterClass.LinkId getLinkId(); /** - * string target = 3; - * @return The bytes for target. + * .context.LinkId link_id = 3; */ - com.google.protobuf.ByteString getTargetBytes(); + context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder(); /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - java.util.List getFibersList(); + java.util.List getLinkEndpointIdsList(); /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - context.ContextOuterClass.Fiber getFibers(int index); + context.ContextOuterClass.EndPointId getLinkEndpointIds(int index); /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - int getFibersCount(); + int getLinkEndpointIdsCount(); /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - java.util.List getFibersOrBuilderList(); + java.util.List getLinkEndpointIdsOrBuilderList(); /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - context.ContextOuterClass.FiberOrBuilder getFibersOrBuilder(int index); + context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index); } /** - * Protobuf type {@code context.OpticalLinkDetails} + * Protobuf type {@code context.OpticalLink} */ - public static final class OpticalLinkDetails extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLinkDetails) - OpticalLinkDetailsOrBuilder { + public static final class OpticalLink extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLink) + OpticalLinkOrBuilder { private static final long serialVersionUID = 0L; - // Use OpticalLinkDetails.newBuilder() to construct. - private OpticalLinkDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use OpticalLink.newBuilder() to construct. + private OpticalLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OpticalLinkDetails() { - source_ = ""; - target_ = ""; - fibers_ = java.util.Collections.emptyList(); + private OpticalLink() { + name_ = ""; + linkEndpointIds_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OpticalLinkDetails(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OpticalLinkDetails(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 13: - { - length_ = input.readFloat(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - source_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - target_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fibers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fibers_.add(input.readMessage(context.ContextOuterClass.Fiber.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fibers_ = java.util.Collections.unmodifiableList(fibers_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + return new OpticalLink(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkDetails.class, context.ContextOuterClass.OpticalLinkDetails.Builder.class); - } - - public static final int LENGTH_FIELD_NUMBER = 1; - - private float length_; - - /** - * float length = 1; - * @return The length. - */ - @java.lang.Override - public float getLength() { - return length_; + return context.ContextOuterClass.internal_static_context_OpticalLink_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLink.class, context.ContextOuterClass.OpticalLink.Builder.class); } - public static final int SOURCE_FIELD_NUMBER = 2; + public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object source_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** - * string source = 2; - * @return The source. + * string name = 1; + * @return The name. */ @java.lang.Override - public java.lang.String getSource() { - java.lang.Object ref = source_; + public java.lang.String getName() { + java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - source_ = s; + name_ = s; return s; } } /** - * string source = 2; - * @return The bytes for source. + * string name = 1; + * @return The bytes for name. */ @java.lang.Override - public com.google.protobuf.ByteString getSourceBytes() { - java.lang.Object ref = source_; + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - source_ = b; + name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int TARGET_FIELD_NUMBER = 3; + public static final int OPTICAL_DETAILS_FIELD_NUMBER = 2; - private volatile java.lang.Object target_; + private context.ContextOuterClass.OpticalLinkDetails opticalDetails_; /** - * string target = 3; - * @return The target. + * .context.OpticalLinkDetails optical_details = 2; + * @return Whether the opticalDetails field is set. */ @java.lang.Override - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } + public boolean hasOpticalDetails() { + return opticalDetails_ != null; } /** - * string target = 3; - * @return The bytes for target. + * .context.OpticalLinkDetails optical_details = 2; + * @return The opticalDetails. */ @java.lang.Override - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public context.ContextOuterClass.OpticalLinkDetails getOpticalDetails() { + return opticalDetails_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : opticalDetails_; + } + + /** + * .context.OpticalLinkDetails optical_details = 2; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLinkDetailsOrBuilder getOpticalDetailsOrBuilder() { + return opticalDetails_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : opticalDetails_; + } + + public static final int LINK_ID_FIELD_NUMBER = 3; + + private context.ContextOuterClass.LinkId linkId_; + + /** + * .context.LinkId link_id = 3; + * @return Whether the linkId field is set. + */ + @java.lang.Override + public boolean hasLinkId() { + return linkId_ != null; + } + + /** + * .context.LinkId link_id = 3; + * @return The linkId. + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkId() { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; } - public static final int FIBERS_FIELD_NUMBER = 4; + /** + * .context.LinkId link_id = 3; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } - private java.util.List fibers_; + public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List linkEndpointIds_; /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override - public java.util.List getFibersList() { - return fibers_; + public java.util.List getLinkEndpointIdsList() { + return linkEndpointIds_; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override - public java.util.List getFibersOrBuilderList() { - return fibers_; + public java.util.List getLinkEndpointIdsOrBuilderList() { + return linkEndpointIds_; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override - public int getFibersCount() { - return fibers_.size(); + public int getLinkEndpointIdsCount() { + return linkEndpointIds_.size(); } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override - public context.ContextOuterClass.Fiber getFibers(int index) { - return fibers_.get(index); + public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { + return linkEndpointIds_.get(index); } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ @java.lang.Override - public context.ContextOuterClass.FiberOrBuilder getFibersOrBuilder(int index) { - return fibers_.get(index); + public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { + return linkEndpointIds_.get(index); } private byte memoizedIsInitialized = -1; @@ -77663,19 +79019,19 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (length_ != 0F) { - output.writeFloat(1, length_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - if (!getSourceBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); + if (opticalDetails_ != null) { + output.writeMessage(2, getOpticalDetails()); } - if (!getTargetBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + if (linkId_ != null) { + output.writeMessage(3, getLinkId()); } - for (int i = 0; i < fibers_.size(); i++) { - output.writeMessage(4, fibers_.get(i)); + for (int i = 0; i < linkEndpointIds_.size(); i++) { + output.writeMessage(4, linkEndpointIds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -77684,19 +79040,19 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (length_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, length_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - if (!getSourceBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); + if (opticalDetails_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOpticalDetails()); } - if (!getTargetBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + if (linkId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLinkId()); } - for (int i = 0; i < fibers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, fibers_.get(i)); + for (int i = 0; i < linkEndpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkEndpointIds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -77706,19 +79062,27 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.OpticalLinkDetails)) { + if (!(obj instanceof context.ContextOuterClass.OpticalLink)) { return super.equals(obj); } - context.ContextOuterClass.OpticalLinkDetails other = (context.ContextOuterClass.OpticalLinkDetails) obj; - if (java.lang.Float.floatToIntBits(getLength()) != java.lang.Float.floatToIntBits(other.getLength())) + context.ContextOuterClass.OpticalLink other = (context.ContextOuterClass.OpticalLink) obj; + if (!getName().equals(other.getName())) return false; - if (!getSource().equals(other.getSource())) + if (hasOpticalDetails() != other.hasOpticalDetails()) return false; - if (!getTarget().equals(other.getTarget())) + if (hasOpticalDetails()) { + if (!getOpticalDetails().equals(other.getOpticalDetails())) + return false; + } + if (hasLinkId() != other.hasLinkId()) return false; - if (!getFibersList().equals(other.getFibersList())) + if (hasLinkId()) { + if (!getLinkId().equals(other.getLinkId())) + return false; + } + if (!getLinkEndpointIdsList().equals(other.getLinkEndpointIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -77730,66 +79094,70 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LENGTH_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getLength()); - hash = (37 * hash) + SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSource().hashCode(); - hash = (37 * hash) + TARGET_FIELD_NUMBER; - hash = (53 * hash) + getTarget().hashCode(); - if (getFibersCount() > 0) { - hash = (37 * hash) + FIBERS_FIELD_NUMBER; - hash = (53 * hash) + getFibersList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasOpticalDetails()) { + hash = (37 * hash) + OPTICAL_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getOpticalDetails().hashCode(); + } + if (hasLinkId()) { + hash = (37 * hash) + LINK_ID_FIELD_NUMBER; + hash = (53 * hash) + getLinkId().hashCode(); + } + if (getLinkEndpointIdsCount() > 0) { + hash = (37 * hash) + LINK_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getLinkEndpointIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLink parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLink parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLink parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.OpticalLink parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLink parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLink parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkDetails parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLink parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLinkDetails parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLink parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -77802,7 +79170,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.OpticalLinkDetails prototype) { + public static Builder newBuilder(context.ContextOuterClass.OpticalLink prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -77818,64 +79186,66 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.OpticalLinkDetails} + * Protobuf type {@code context.OpticalLink} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLinkDetails) - context.ContextOuterClass.OpticalLinkDetailsOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLink) + context.ContextOuterClass.OpticalLinkOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkDetails.class, context.ContextOuterClass.OpticalLinkDetails.Builder.class); + return context.ContextOuterClass.internal_static_context_OpticalLink_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLink.class, context.ContextOuterClass.OpticalLink.Builder.class); } - // Construct using context.ContextOuterClass.OpticalLinkDetails.newBuilder() + // Construct using context.ContextOuterClass.OpticalLink.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFibersFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - length_ = 0F; - source_ = ""; - target_ = ""; - if (fibersBuilder_ == null) { - fibers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = 0; + name_ = ""; + opticalDetails_ = null; + if (opticalDetailsBuilder_ != null) { + opticalDetailsBuilder_.dispose(); + opticalDetailsBuilder_ = null; + } + linkId_ = null; + if (linkIdBuilder_ != null) { + linkIdBuilder_.dispose(); + linkIdBuilder_ = null; + } + if (linkEndpointIdsBuilder_ == null) { + linkEndpointIds_ = java.util.Collections.emptyList(); } else { - fibersBuilder_.clear(); + linkEndpointIds_ = null; + linkEndpointIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; } @java.lang.Override - public context.ContextOuterClass.OpticalLinkDetails getDefaultInstanceForType() { - return context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance(); + public context.ContextOuterClass.OpticalLink getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalLink.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.OpticalLinkDetails build() { - context.ContextOuterClass.OpticalLinkDetails result = buildPartial(); + public context.ContextOuterClass.OpticalLink build() { + context.ContextOuterClass.OpticalLink result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -77883,104 +79253,90 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.OpticalLinkDetails buildPartial() { - context.ContextOuterClass.OpticalLinkDetails result = new context.ContextOuterClass.OpticalLinkDetails(this); - int from_bitField0_ = bitField0_; - result.length_ = length_; - result.source_ = source_; - result.target_ = target_; - if (fibersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fibers_ = java.util.Collections.unmodifiableList(fibers_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fibers_ = fibers_; - } else { - result.fibers_ = fibersBuilder_.build(); + public context.ContextOuterClass.OpticalLink buildPartial() { + context.ContextOuterClass.OpticalLink result = new context.ContextOuterClass.OpticalLink(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + private void buildPartialRepeatedFields(context.ContextOuterClass.OpticalLink result) { + if (linkEndpointIdsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + linkEndpointIds_ = java.util.Collections.unmodifiableList(linkEndpointIds_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.linkEndpointIds_ = linkEndpointIds_; + } else { + result.linkEndpointIds_ = linkEndpointIdsBuilder_.build(); + } } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.OpticalLink result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.opticalDetails_ = opticalDetailsBuilder_ == null ? opticalDetails_ : opticalDetailsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.linkId_ = linkIdBuilder_ == null ? linkId_ : linkIdBuilder_.build(); + } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.OpticalLinkDetails) { - return mergeFrom((context.ContextOuterClass.OpticalLinkDetails) other); + if (other instanceof context.ContextOuterClass.OpticalLink) { + return mergeFrom((context.ContextOuterClass.OpticalLink) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.OpticalLinkDetails other) { - if (other == context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.OpticalLink other) { + if (other == context.ContextOuterClass.OpticalLink.getDefaultInstance()) return this; - if (other.getLength() != 0F) { - setLength(other.getLength()); - } - if (!other.getSource().isEmpty()) { - source_ = other.source_; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } - if (!other.getTarget().isEmpty()) { - target_ = other.target_; - onChanged(); + if (other.hasOpticalDetails()) { + mergeOpticalDetails(other.getOpticalDetails()); } - if (fibersBuilder_ == null) { - if (!other.fibers_.isEmpty()) { - if (fibers_.isEmpty()) { - fibers_ = other.fibers_; - bitField0_ = (bitField0_ & ~0x00000001); + if (other.hasLinkId()) { + mergeLinkId(other.getLinkId()); + } + if (linkEndpointIdsBuilder_ == null) { + if (!other.linkEndpointIds_.isEmpty()) { + if (linkEndpointIds_.isEmpty()) { + linkEndpointIds_ = other.linkEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000008); } else { - ensureFibersIsMutable(); - fibers_.addAll(other.fibers_); + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.addAll(other.linkEndpointIds_); } onChanged(); } } else { - if (!other.fibers_.isEmpty()) { - if (fibersBuilder_.isEmpty()) { - fibersBuilder_.dispose(); - fibersBuilder_ = null; - fibers_ = other.fibers_; - bitField0_ = (bitField0_ & ~0x00000001); - fibersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFibersFieldBuilder() : null; + if (!other.linkEndpointIds_.isEmpty()) { + if (linkEndpointIdsBuilder_.isEmpty()) { + linkEndpointIdsBuilder_.dispose(); + linkEndpointIdsBuilder_ = null; + linkEndpointIds_ = other.linkEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000008); + linkEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkEndpointIdsFieldBuilder() : null; } else { - fibersBuilder_.addAllMessages(other.fibers_); + linkEndpointIdsBuilder_.addAllMessages(other.linkEndpointIds_); } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -77992,433 +79348,619 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.OpticalLinkDetails parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getOpticalDetailsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + input.readMessage(getLinkIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(m); + } else { + linkEndpointIdsBuilder_.addMessage(m); + } + break; + } + // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.OpticalLinkDetails) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } private int bitField0_; - private float length_; + private java.lang.Object name_ = ""; /** - * float length = 1; - * @return The length. + * string name = 1; + * @return The name. */ - @java.lang.Override - public float getLength() { - return length_; + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** - * float length = 1; - * @param value The length to set. + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 1; + * @param value The name to set. * @return This builder for chaining. */ - public Builder setLength(float value) { - length_ = value; + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * float length = 1; + * string name = 1; * @return This builder for chaining. */ - public Builder clearLength() { - length_ = 0F; + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } - private java.lang.Object source_ = ""; + private context.ContextOuterClass.OpticalLinkDetails opticalDetails_; + + private com.google.protobuf.SingleFieldBuilderV3 opticalDetailsBuilder_; /** - * string source = 2; - * @return The source. + * .context.OpticalLinkDetails optical_details = 2; + * @return Whether the opticalDetails field is set. */ - public java.lang.String getSource() { - java.lang.Object ref = source_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - source_ = s; - return s; + public boolean hasOpticalDetails() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * .context.OpticalLinkDetails optical_details = 2; + * @return The opticalDetails. + */ + public context.ContextOuterClass.OpticalLinkDetails getOpticalDetails() { + if (opticalDetailsBuilder_ == null) { + return opticalDetails_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : opticalDetails_; } else { - return (java.lang.String) ref; + return opticalDetailsBuilder_.getMessage(); } } /** - * string source = 2; - * @return The bytes for source. + * .context.OpticalLinkDetails optical_details = 2; */ - public com.google.protobuf.ByteString getSourceBytes() { - java.lang.Object ref = source_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - source_ = b; - return b; + public Builder setOpticalDetails(context.ContextOuterClass.OpticalLinkDetails value) { + if (opticalDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + opticalDetails_ = value; } else { - return (com.google.protobuf.ByteString) ref; + opticalDetailsBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); + return this; } /** - * string source = 2; - * @param value The source to set. - * @return This builder for chaining. + * .context.OpticalLinkDetails optical_details = 2; */ - public Builder setSource(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setOpticalDetails(context.ContextOuterClass.OpticalLinkDetails.Builder builderForValue) { + if (opticalDetailsBuilder_ == null) { + opticalDetails_ = builderForValue.build(); + } else { + opticalDetailsBuilder_.setMessage(builderForValue.build()); } - source_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * string source = 2; - * @return This builder for chaining. + * .context.OpticalLinkDetails optical_details = 2; */ - public Builder clearSource() { - source_ = getDefaultInstance().getSource(); + public Builder mergeOpticalDetails(context.ContextOuterClass.OpticalLinkDetails value) { + if (opticalDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && opticalDetails_ != null && opticalDetails_ != context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance()) { + getOpticalDetailsBuilder().mergeFrom(value); + } else { + opticalDetails_ = value; + } + } else { + opticalDetailsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * string source = 2; - * @param value The bytes for source to set. - * @return This builder for chaining. + * .context.OpticalLinkDetails optical_details = 2; */ - public Builder setSourceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearOpticalDetails() { + bitField0_ = (bitField0_ & ~0x00000002); + opticalDetails_ = null; + if (opticalDetailsBuilder_ != null) { + opticalDetailsBuilder_.dispose(); + opticalDetailsBuilder_ = null; } - checkByteStringIsUtf8(value); - source_ = value; onChanged(); return this; } - private java.lang.Object target_ = ""; + /** + * .context.OpticalLinkDetails optical_details = 2; + */ + public context.ContextOuterClass.OpticalLinkDetails.Builder getOpticalDetailsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOpticalDetailsFieldBuilder().getBuilder(); + } /** - * string target = 3; - * @return The target. + * .context.OpticalLinkDetails optical_details = 2; */ - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; + public context.ContextOuterClass.OpticalLinkDetailsOrBuilder getOpticalDetailsOrBuilder() { + if (opticalDetailsBuilder_ != null) { + return opticalDetailsBuilder_.getMessageOrBuilder(); } else { - return (java.lang.String) ref; + return opticalDetails_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : opticalDetails_; } } /** - * string target = 3; - * @return The bytes for target. + * .context.OpticalLinkDetails optical_details = 2; */ - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; + private com.google.protobuf.SingleFieldBuilderV3 getOpticalDetailsFieldBuilder() { + if (opticalDetailsBuilder_ == null) { + opticalDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalDetails(), getParentForChildren(), isClean()); + opticalDetails_ = null; + } + return opticalDetailsBuilder_; + } + + private context.ContextOuterClass.LinkId linkId_; + + private com.google.protobuf.SingleFieldBuilderV3 linkIdBuilder_; + + /** + * .context.LinkId link_id = 3; + * @return Whether the linkId field is set. + */ + public boolean hasLinkId() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * .context.LinkId link_id = 3; + * @return The linkId. + */ + public context.ContextOuterClass.LinkId getLinkId() { + if (linkIdBuilder_ == null) { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; } else { - return (com.google.protobuf.ByteString) ref; + return linkIdBuilder_.getMessage(); } } /** - * string target = 3; - * @param value The target to set. - * @return This builder for chaining. + * .context.LinkId link_id = 3; */ - public Builder setTarget(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkId_ = value; + } else { + linkIdBuilder_.setMessage(value); } - target_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** - * string target = 3; - * @return This builder for chaining. + * .context.LinkId link_id = 3; */ - public Builder clearTarget() { - target_ = getDefaultInstance().getTarget(); + public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdBuilder_ == null) { + linkId_ = builderForValue.build(); + } else { + linkIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; onChanged(); return this; } /** - * string target = 3; - * @param value The bytes for target to set. - * @return This builder for chaining. + * .context.LinkId link_id = 3; */ - public Builder setTargetBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && linkId_ != null && linkId_ != context.ContextOuterClass.LinkId.getDefaultInstance()) { + getLinkIdBuilder().mergeFrom(value); + } else { + linkId_ = value; + } + } else { + linkIdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * .context.LinkId link_id = 3; + */ + public Builder clearLinkId() { + bitField0_ = (bitField0_ & ~0x00000004); + linkId_ = null; + if (linkIdBuilder_ != null) { + linkIdBuilder_.dispose(); + linkIdBuilder_ = null; } - checkByteStringIsUtf8(value); - target_ = value; onChanged(); return this; } - private java.util.List fibers_ = java.util.Collections.emptyList(); + /** + * .context.LinkId link_id = 3; + */ + public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getLinkIdFieldBuilder().getBuilder(); + } - private void ensureFibersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fibers_ = new java.util.ArrayList(fibers_); - bitField0_ |= 0x00000001; + /** + * .context.LinkId link_id = 3; + */ + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + if (linkIdBuilder_ != null) { + return linkIdBuilder_.getMessageOrBuilder(); + } else { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + } + + /** + * .context.LinkId link_id = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getLinkIdFieldBuilder() { + if (linkIdBuilder_ == null) { + linkIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getLinkId(), getParentForChildren(), isClean()); + linkId_ = null; + } + return linkIdBuilder_; + } + + private java.util.List linkEndpointIds_ = java.util.Collections.emptyList(); + + private void ensureLinkEndpointIdsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + linkEndpointIds_ = new java.util.ArrayList(linkEndpointIds_); + bitField0_ |= 0x00000008; } } - private com.google.protobuf.RepeatedFieldBuilderV3 fibersBuilder_; + private com.google.protobuf.RepeatedFieldBuilderV3 linkEndpointIdsBuilder_; /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public java.util.List getFibersList() { - if (fibersBuilder_ == null) { - return java.util.Collections.unmodifiableList(fibers_); + public java.util.List getLinkEndpointIdsList() { + if (linkEndpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(linkEndpointIds_); } else { - return fibersBuilder_.getMessageList(); + return linkEndpointIdsBuilder_.getMessageList(); } } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public int getFibersCount() { - if (fibersBuilder_ == null) { - return fibers_.size(); + public int getLinkEndpointIdsCount() { + if (linkEndpointIdsBuilder_ == null) { + return linkEndpointIds_.size(); } else { - return fibersBuilder_.getCount(); + return linkEndpointIdsBuilder_.getCount(); } } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public context.ContextOuterClass.Fiber getFibers(int index) { - if (fibersBuilder_ == null) { - return fibers_.get(index); + public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { + if (linkEndpointIdsBuilder_ == null) { + return linkEndpointIds_.get(index); } else { - return fibersBuilder_.getMessage(index); + return linkEndpointIdsBuilder_.getMessage(index); } } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder setFibers(int index, context.ContextOuterClass.Fiber value) { - if (fibersBuilder_ == null) { + public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (linkEndpointIdsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureFibersIsMutable(); - fibers_.set(index, value); + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.set(index, value); onChanged(); } else { - fibersBuilder_.setMessage(index, value); + linkEndpointIdsBuilder_.setMessage(index, value); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder setFibers(int index, context.ContextOuterClass.Fiber.Builder builderForValue) { - if (fibersBuilder_ == null) { - ensureFibersIsMutable(); - fibers_.set(index, builderForValue.build()); + public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.set(index, builderForValue.build()); onChanged(); } else { - fibersBuilder_.setMessage(index, builderForValue.build()); + linkEndpointIdsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder addFibers(context.ContextOuterClass.Fiber value) { - if (fibersBuilder_ == null) { + public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId value) { + if (linkEndpointIdsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureFibersIsMutable(); - fibers_.add(value); + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(value); onChanged(); } else { - fibersBuilder_.addMessage(value); + linkEndpointIdsBuilder_.addMessage(value); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder addFibers(int index, context.ContextOuterClass.Fiber value) { - if (fibersBuilder_ == null) { + public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (linkEndpointIdsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureFibersIsMutable(); - fibers_.add(index, value); + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(index, value); onChanged(); } else { - fibersBuilder_.addMessage(index, value); + linkEndpointIdsBuilder_.addMessage(index, value); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder addFibers(context.ContextOuterClass.Fiber.Builder builderForValue) { - if (fibersBuilder_ == null) { - ensureFibersIsMutable(); - fibers_.add(builderForValue.build()); + public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(builderForValue.build()); onChanged(); } else { - fibersBuilder_.addMessage(builderForValue.build()); + linkEndpointIdsBuilder_.addMessage(builderForValue.build()); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder addFibers(int index, context.ContextOuterClass.Fiber.Builder builderForValue) { - if (fibersBuilder_ == null) { - ensureFibersIsMutable(); - fibers_.add(index, builderForValue.build()); + public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(index, builderForValue.build()); onChanged(); } else { - fibersBuilder_.addMessage(index, builderForValue.build()); + linkEndpointIdsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder addAllFibers(java.lang.Iterable values) { - if (fibersBuilder_ == null) { - ensureFibersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fibers_); + public Builder addAllLinkEndpointIds(java.lang.Iterable values) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, linkEndpointIds_); onChanged(); } else { - fibersBuilder_.addAllMessages(values); + linkEndpointIdsBuilder_.addAllMessages(values); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder clearFibers() { - if (fibersBuilder_ == null) { - fibers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder clearLinkEndpointIds() { + if (linkEndpointIdsBuilder_ == null) { + linkEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { - fibersBuilder_.clear(); + linkEndpointIdsBuilder_.clear(); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public Builder removeFibers(int index) { - if (fibersBuilder_ == null) { - ensureFibersIsMutable(); - fibers_.remove(index); + public Builder removeLinkEndpointIds(int index) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.remove(index); onChanged(); } else { - fibersBuilder_.remove(index); + linkEndpointIdsBuilder_.remove(index); } return this; } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public context.ContextOuterClass.Fiber.Builder getFibersBuilder(int index) { - return getFibersFieldBuilder().getBuilder(index); + public context.ContextOuterClass.EndPointId.Builder getLinkEndpointIdsBuilder(int index) { + return getLinkEndpointIdsFieldBuilder().getBuilder(index); } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public context.ContextOuterClass.FiberOrBuilder getFibersOrBuilder(int index) { - if (fibersBuilder_ == null) { - return fibers_.get(index); + public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { + if (linkEndpointIdsBuilder_ == null) { + return linkEndpointIds_.get(index); } else { - return fibersBuilder_.getMessageOrBuilder(index); + return linkEndpointIdsBuilder_.getMessageOrBuilder(index); } } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public java.util.List getFibersOrBuilderList() { - if (fibersBuilder_ != null) { - return fibersBuilder_.getMessageOrBuilderList(); + public java.util.List getLinkEndpointIdsOrBuilderList() { + if (linkEndpointIdsBuilder_ != null) { + return linkEndpointIdsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(fibers_); + return java.util.Collections.unmodifiableList(linkEndpointIds_); } } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public context.ContextOuterClass.Fiber.Builder addFibersBuilder() { - return getFibersFieldBuilder().addBuilder(context.ContextOuterClass.Fiber.getDefaultInstance()); + public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder() { + return getLinkEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public context.ContextOuterClass.Fiber.Builder addFibersBuilder(int index) { - return getFibersFieldBuilder().addBuilder(index, context.ContextOuterClass.Fiber.getDefaultInstance()); + public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder(int index) { + return getLinkEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); } /** - * repeated .context.Fiber fibers = 4; + * repeated .context.EndPointId link_endpoint_ids = 4; */ - public java.util.List getFibersBuilderList() { - return getFibersFieldBuilder().getBuilderList(); + public java.util.List getLinkEndpointIdsBuilderList() { + return getLinkEndpointIdsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3 getFibersFieldBuilder() { - if (fibersBuilder_ == null) { - fibersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(fibers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - fibers_ = null; + private com.google.protobuf.RepeatedFieldBuilderV3 getLinkEndpointIdsFieldBuilder() { + if (linkEndpointIdsBuilder_ == null) { + linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkEndpointIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + linkEndpointIds_ = null; } - return fibersBuilder_; + return linkEndpointIdsBuilder_; } @java.lang.Override @@ -78430,290 +79972,180 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.OpticalLinkDetails) + // @@protoc_insertion_point(builder_scope:context.OpticalLink) } - // @@protoc_insertion_point(class_scope:context.OpticalLinkDetails) - private static final context.ContextOuterClass.OpticalLinkDetails DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.OpticalLink) + private static final context.ContextOuterClass.OpticalLink DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLinkDetails(); + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLink(); } - public static context.ContextOuterClass.OpticalLinkDetails getDefaultInstance() { + public static context.ContextOuterClass.OpticalLink getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public OpticalLinkDetails parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OpticalLinkDetails(input, extensionRegistry); + public OpticalLink parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.OpticalLinkDetails getDefaultInstanceForType() { + public context.ContextOuterClass.OpticalLink getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OpticalLinkOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLink) + public interface ServiceConfigRuleOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceConfigRule) com.google.protobuf.MessageOrBuilder { /** - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - - /** - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * .context.OpticalLinkDetails details = 2; - * @return Whether the details field is set. + * .context.ServiceId service_id = 1; + * @return Whether the serviceId field is set. */ - boolean hasDetails(); + boolean hasServiceId(); /** - * .context.OpticalLinkDetails details = 2; - * @return The details. + * .context.ServiceId service_id = 1; + * @return The serviceId. */ - context.ContextOuterClass.OpticalLinkDetails getDetails(); + context.ContextOuterClass.ServiceId getServiceId(); /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - context.ContextOuterClass.OpticalLinkDetailsOrBuilder getDetailsOrBuilder(); + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); /** - * .context.OpticalLinkId optical_link_uuid = 3; - * @return Whether the opticalLinkUuid field is set. + * .context.ConfigRule_Custom configrule_custom = 2; + * @return Whether the configruleCustom field is set. */ - boolean hasOpticalLinkUuid(); + boolean hasConfigruleCustom(); /** - * .context.OpticalLinkId optical_link_uuid = 3; - * @return The opticalLinkUuid. + * .context.ConfigRule_Custom configrule_custom = 2; + * @return The configruleCustom. */ - context.ContextOuterClass.OpticalLinkId getOpticalLinkUuid(); + context.ContextOuterClass.ConfigRule_Custom getConfigruleCustom(); /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - context.ContextOuterClass.OpticalLinkIdOrBuilder getOpticalLinkUuidOrBuilder(); + context.ContextOuterClass.ConfigRule_CustomOrBuilder getConfigruleCustomOrBuilder(); } /** - * Protobuf type {@code context.OpticalLink} + * Protobuf type {@code context.ServiceConfigRule} */ - public static final class OpticalLink extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLink) - OpticalLinkOrBuilder { + public static final class ServiceConfigRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceConfigRule) + ServiceConfigRuleOrBuilder { private static final long serialVersionUID = 0L; - // Use OpticalLink.newBuilder() to construct. - private OpticalLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ServiceConfigRule.newBuilder() to construct. + private ServiceConfigRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private OpticalLink() { - name_ = ""; + private ServiceConfigRule() { } @java.lang.Override @SuppressWarnings({ "unused" }) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OpticalLink(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OpticalLink(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 18: - { - context.ContextOuterClass.OpticalLinkDetails.Builder subBuilder = null; - if (details_ != null) { - subBuilder = details_.toBuilder(); - } - details_ = input.readMessage(context.ContextOuterClass.OpticalLinkDetails.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(details_); - details_ = subBuilder.buildPartial(); - } - break; - } - case 26: - { - context.ContextOuterClass.OpticalLinkId.Builder subBuilder = null; - if (opticalLinkUuid_ != null) { - subBuilder = opticalLinkUuid_.toBuilder(); - } - opticalLinkUuid_ = input.readMessage(context.ContextOuterClass.OpticalLinkId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(opticalLinkUuid_); - opticalLinkUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + return new ServiceConfigRule(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; + return context.ContextOuterClass.internal_static_context_ServiceConfigRule_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalLink_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLink.class, context.ContextOuterClass.OpticalLink.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - private volatile java.lang.Object name_; - - /** - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - - /** - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return context.ContextOuterClass.internal_static_context_ServiceConfigRule_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceConfigRule.class, context.ContextOuterClass.ServiceConfigRule.Builder.class); } - public static final int DETAILS_FIELD_NUMBER = 2; + public static final int SERVICE_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.OpticalLinkDetails details_; + private context.ContextOuterClass.ServiceId serviceId_; /** - * .context.OpticalLinkDetails details = 2; - * @return Whether the details field is set. + * .context.ServiceId service_id = 1; + * @return Whether the serviceId field is set. */ @java.lang.Override - public boolean hasDetails() { - return details_ != null; + public boolean hasServiceId() { + return serviceId_ != null; } /** - * .context.OpticalLinkDetails details = 2; - * @return The details. + * .context.ServiceId service_id = 1; + * @return The serviceId. */ @java.lang.Override - public context.ContextOuterClass.OpticalLinkDetails getDetails() { - return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; + public context.ContextOuterClass.ServiceId getServiceId() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ @java.lang.Override - public context.ContextOuterClass.OpticalLinkDetailsOrBuilder getDetailsOrBuilder() { - return getDetails(); + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } - public static final int OPTICAL_LINK_UUID_FIELD_NUMBER = 3; + public static final int CONFIGRULE_CUSTOM_FIELD_NUMBER = 2; - private context.ContextOuterClass.OpticalLinkId opticalLinkUuid_; + private context.ContextOuterClass.ConfigRule_Custom configruleCustom_; /** - * .context.OpticalLinkId optical_link_uuid = 3; - * @return Whether the opticalLinkUuid field is set. + * .context.ConfigRule_Custom configrule_custom = 2; + * @return Whether the configruleCustom field is set. */ @java.lang.Override - public boolean hasOpticalLinkUuid() { - return opticalLinkUuid_ != null; + public boolean hasConfigruleCustom() { + return configruleCustom_ != null; } /** - * .context.OpticalLinkId optical_link_uuid = 3; - * @return The opticalLinkUuid. + * .context.ConfigRule_Custom configrule_custom = 2; + * @return The configruleCustom. */ @java.lang.Override - public context.ContextOuterClass.OpticalLinkId getOpticalLinkUuid() { - return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; + public context.ContextOuterClass.ConfigRule_Custom getConfigruleCustom() { + return configruleCustom_ == null ? context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance() : configruleCustom_; } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ @java.lang.Override - public context.ContextOuterClass.OpticalLinkIdOrBuilder getOpticalLinkUuidOrBuilder() { - return getOpticalLinkUuid(); + public context.ContextOuterClass.ConfigRule_CustomOrBuilder getConfigruleCustomOrBuilder() { + return configruleCustom_ == null ? context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance() : configruleCustom_; } private byte memoizedIsInitialized = -1; @@ -78731,16 +80163,13 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (details_ != null) { - output.writeMessage(2, getDetails()); + if (serviceId_ != null) { + output.writeMessage(1, getServiceId()); } - if (opticalLinkUuid_ != null) { - output.writeMessage(3, getOpticalLinkUuid()); + if (configruleCustom_ != null) { + output.writeMessage(2, getConfigruleCustom()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -78749,16 +80178,13 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (details_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDetails()); + if (serviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getServiceId()); } - if (opticalLinkUuid_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOpticalLinkUuid()); + if (configruleCustom_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConfigruleCustom()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -78768,25 +80194,23 @@ public final class ContextOuterClass { if (obj == this) { return true; } - if (!(obj instanceof context.ContextOuterClass.OpticalLink)) { + if (!(obj instanceof context.ContextOuterClass.ServiceConfigRule)) { return super.equals(obj); } - context.ContextOuterClass.OpticalLink other = (context.ContextOuterClass.OpticalLink) obj; - if (!getName().equals(other.getName())) - return false; - if (hasDetails() != other.hasDetails()) + context.ContextOuterClass.ServiceConfigRule other = (context.ContextOuterClass.ServiceConfigRule) obj; + if (hasServiceId() != other.hasServiceId()) return false; - if (hasDetails()) { - if (!getDetails().equals(other.getDetails())) + if (hasServiceId()) { + if (!getServiceId().equals(other.getServiceId())) return false; } - if (hasOpticalLinkUuid() != other.hasOpticalLinkUuid()) + if (hasConfigruleCustom() != other.hasConfigruleCustom()) return false; - if (hasOpticalLinkUuid()) { - if (!getOpticalLinkUuid().equals(other.getOpticalLinkUuid())) + if (hasConfigruleCustom()) { + if (!getConfigruleCustom().equals(other.getConfigruleCustom())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -78798,66 +80222,64 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasDetails()) { - hash = (37 * hash) + DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDetails().hashCode(); + if (hasServiceId()) { + hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); } - if (hasOpticalLinkUuid()) { - hash = (37 * hash) + OPTICAL_LINK_UUID_FIELD_NUMBER; - hash = (53 * hash) + getOpticalLinkUuid().hashCode(); + if (hasConfigruleCustom()) { + hash = (37 * hash) + CONFIGRULE_CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + getConfigruleCustom().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static context.ContextOuterClass.OpticalLink parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLink parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLink parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static context.ContextOuterClass.OpticalLink parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static context.ContextOuterClass.OpticalLink parseFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLink parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalLink parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static context.ContextOuterClass.ServiceConfigRule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLink parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.ServiceConfigRule parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + public static context.ContextOuterClass.ServiceConfigRule parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } @@ -78870,7 +80292,7 @@ public final class ContextOuterClass { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(context.ContextOuterClass.OpticalLink prototype) { + public static Builder newBuilder(context.ContextOuterClass.ServiceConfigRule prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -78886,67 +80308,58 @@ public final class ContextOuterClass { } /** - * Protobuf type {@code context.OpticalLink} + * Protobuf type {@code context.ServiceConfigRule} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLink) - context.ContextOuterClass.OpticalLinkOrBuilder { + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceConfigRule) + context.ContextOuterClass.ServiceConfigRuleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; + return context.ContextOuterClass.internal_static_context_ServiceConfigRule_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_OpticalLink_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLink.class, context.ContextOuterClass.OpticalLink.Builder.class); + return context.ContextOuterClass.internal_static_context_ServiceConfigRule_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceConfigRule.class, context.ContextOuterClass.ServiceConfigRule.Builder.class); } - // Construct using context.ContextOuterClass.OpticalLink.newBuilder() + // Construct using context.ContextOuterClass.ServiceConfigRule.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - name_ = ""; - if (detailsBuilder_ == null) { - details_ = null; - } else { - details_ = null; - detailsBuilder_ = null; + bitField0_ = 0; + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); + serviceIdBuilder_ = null; } - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuid_ = null; - } else { - opticalLinkUuid_ = null; - opticalLinkUuidBuilder_ = null; + configruleCustom_ = null; + if (configruleCustomBuilder_ != null) { + configruleCustomBuilder_.dispose(); + configruleCustomBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; + return context.ContextOuterClass.internal_static_context_ServiceConfigRule_descriptor; } @java.lang.Override - public context.ContextOuterClass.OpticalLink getDefaultInstanceForType() { - return context.ContextOuterClass.OpticalLink.getDefaultInstance(); + public context.ContextOuterClass.ServiceConfigRule getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceConfigRule.getDefaultInstance(); } @java.lang.Override - public context.ContextOuterClass.OpticalLink build() { - context.ContextOuterClass.OpticalLink result = buildPartial(); + public context.ContextOuterClass.ServiceConfigRule build() { + context.ContextOuterClass.ServiceConfigRule result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -78954,77 +80367,45 @@ public final class ContextOuterClass { } @java.lang.Override - public context.ContextOuterClass.OpticalLink buildPartial() { - context.ContextOuterClass.OpticalLink result = new context.ContextOuterClass.OpticalLink(this); - result.name_ = name_; - if (detailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = detailsBuilder_.build(); - } - if (opticalLinkUuidBuilder_ == null) { - result.opticalLinkUuid_ = opticalLinkUuid_; - } else { - result.opticalLinkUuid_ = opticalLinkUuidBuilder_.build(); + public context.ContextOuterClass.ServiceConfigRule buildPartial() { + context.ContextOuterClass.ServiceConfigRule result = new context.ContextOuterClass.ServiceConfigRule(this); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ServiceConfigRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceId_ = serviceIdBuilder_ == null ? serviceId_ : serviceIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.configruleCustom_ = configruleCustomBuilder_ == null ? configruleCustom_ : configruleCustomBuilder_.build(); + } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.OpticalLink) { - return mergeFrom((context.ContextOuterClass.OpticalLink) other); + if (other instanceof context.ContextOuterClass.ServiceConfigRule) { + return mergeFrom((context.ContextOuterClass.ServiceConfigRule) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(context.ContextOuterClass.OpticalLink other) { - if (other == context.ContextOuterClass.OpticalLink.getDefaultInstance()) + public Builder mergeFrom(context.ContextOuterClass.ServiceConfigRule other) { + if (other == context.ContextOuterClass.ServiceConfigRule.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasDetails()) { - mergeDetails(other.getDetails()); + if (other.hasServiceId()) { + mergeServiceId(other.getServiceId()); } - if (other.hasOpticalLinkUuid()) { - mergeOpticalLinkUuid(other.getOpticalLinkUuid()); + if (other.hasConfigruleCustom()) { + mergeConfigruleCustom(other.getConfigruleCustom()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -79036,318 +80417,288 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.OpticalLink parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getServiceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getConfigruleCustomFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.OpticalLink) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - - /** - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + onChanged(); } - name_ = value; - onChanged(); + // finally return this; } - /** - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - - /** - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - onChanged(); - return this; - } + private int bitField0_; - private context.ContextOuterClass.OpticalLinkDetails details_; + private context.ContextOuterClass.ServiceId serviceId_; - private com.google.protobuf.SingleFieldBuilderV3 detailsBuilder_; + private com.google.protobuf.SingleFieldBuilderV3 serviceIdBuilder_; /** - * .context.OpticalLinkDetails details = 2; - * @return Whether the details field is set. + * .context.ServiceId service_id = 1; + * @return Whether the serviceId field is set. */ - public boolean hasDetails() { - return detailsBuilder_ != null || details_ != null; + public boolean hasServiceId() { + return ((bitField0_ & 0x00000001) != 0); } /** - * .context.OpticalLinkDetails details = 2; - * @return The details. + * .context.ServiceId service_id = 1; + * @return The serviceId. */ - public context.ContextOuterClass.OpticalLinkDetails getDetails() { - if (detailsBuilder_ == null) { - return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; + public context.ContextOuterClass.ServiceId getServiceId() { + if (serviceIdBuilder_ == null) { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } else { - return detailsBuilder_.getMessage(); + return serviceIdBuilder_.getMessage(); } } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - public Builder setDetails(context.ContextOuterClass.OpticalLinkDetails value) { - if (detailsBuilder_ == null) { + public Builder setServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - details_ = value; - onChanged(); + serviceId_ = value; } else { - detailsBuilder_.setMessage(value); + serviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - public Builder setDetails(context.ContextOuterClass.OpticalLinkDetails.Builder builderForValue) { - if (detailsBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); + public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdBuilder_ == null) { + serviceId_ = builderForValue.build(); } else { - detailsBuilder_.setMessage(builderForValue.build()); + serviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - public Builder mergeDetails(context.ContextOuterClass.OpticalLinkDetails value) { - if (detailsBuilder_ == null) { - if (details_ != null) { - details_ = context.ContextOuterClass.OpticalLinkDetails.newBuilder(details_).mergeFrom(value).buildPartial(); + public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && serviceId_ != null && serviceId_ != context.ContextOuterClass.ServiceId.getDefaultInstance()) { + getServiceIdBuilder().mergeFrom(value); } else { - details_ = value; + serviceId_ = value; } - onChanged(); } else { - detailsBuilder_.mergeFrom(value); + serviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - public Builder clearDetails() { - if (detailsBuilder_ == null) { - details_ = null; - onChanged(); - } else { - details_ = null; - detailsBuilder_ = null; + public Builder clearServiceId() { + bitField0_ = (bitField0_ & ~0x00000001); + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); + serviceIdBuilder_ = null; } + onChanged(); return this; } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - public context.ContextOuterClass.OpticalLinkDetails.Builder getDetailsBuilder() { + public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); - return getDetailsFieldBuilder().getBuilder(); + return getServiceIdFieldBuilder().getBuilder(); } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - public context.ContextOuterClass.OpticalLinkDetailsOrBuilder getDetailsOrBuilder() { - if (detailsBuilder_ != null) { - return detailsBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + if (serviceIdBuilder_ != null) { + return serviceIdBuilder_.getMessageOrBuilder(); } else { - return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } } /** - * .context.OpticalLinkDetails details = 2; + * .context.ServiceId service_id = 1; */ - private com.google.protobuf.SingleFieldBuilderV3 getDetailsFieldBuilder() { - if (detailsBuilder_ == null) { - detailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDetails(), getParentForChildren(), isClean()); - details_ = null; + private com.google.protobuf.SingleFieldBuilderV3 getServiceIdFieldBuilder() { + if (serviceIdBuilder_ == null) { + serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceId(), getParentForChildren(), isClean()); + serviceId_ = null; } - return detailsBuilder_; + return serviceIdBuilder_; } - private context.ContextOuterClass.OpticalLinkId opticalLinkUuid_; + private context.ContextOuterClass.ConfigRule_Custom configruleCustom_; - private com.google.protobuf.SingleFieldBuilderV3 opticalLinkUuidBuilder_; + private com.google.protobuf.SingleFieldBuilderV3 configruleCustomBuilder_; /** - * .context.OpticalLinkId optical_link_uuid = 3; - * @return Whether the opticalLinkUuid field is set. + * .context.ConfigRule_Custom configrule_custom = 2; + * @return Whether the configruleCustom field is set. */ - public boolean hasOpticalLinkUuid() { - return opticalLinkUuidBuilder_ != null || opticalLinkUuid_ != null; + public boolean hasConfigruleCustom() { + return ((bitField0_ & 0x00000002) != 0); } /** - * .context.OpticalLinkId optical_link_uuid = 3; - * @return The opticalLinkUuid. + * .context.ConfigRule_Custom configrule_custom = 2; + * @return The configruleCustom. */ - public context.ContextOuterClass.OpticalLinkId getOpticalLinkUuid() { - if (opticalLinkUuidBuilder_ == null) { - return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; + public context.ContextOuterClass.ConfigRule_Custom getConfigruleCustom() { + if (configruleCustomBuilder_ == null) { + return configruleCustom_ == null ? context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance() : configruleCustom_; } else { - return opticalLinkUuidBuilder_.getMessage(); + return configruleCustomBuilder_.getMessage(); } } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - public Builder setOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId value) { - if (opticalLinkUuidBuilder_ == null) { + public Builder setConfigruleCustom(context.ContextOuterClass.ConfigRule_Custom value) { + if (configruleCustomBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - opticalLinkUuid_ = value; - onChanged(); + configruleCustom_ = value; } else { - opticalLinkUuidBuilder_.setMessage(value); + configruleCustomBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - public Builder setOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId.Builder builderForValue) { - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuid_ = builderForValue.build(); - onChanged(); + public Builder setConfigruleCustom(context.ContextOuterClass.ConfigRule_Custom.Builder builderForValue) { + if (configruleCustomBuilder_ == null) { + configruleCustom_ = builderForValue.build(); } else { - opticalLinkUuidBuilder_.setMessage(builderForValue.build()); + configruleCustomBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - public Builder mergeOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId value) { - if (opticalLinkUuidBuilder_ == null) { - if (opticalLinkUuid_ != null) { - opticalLinkUuid_ = context.ContextOuterClass.OpticalLinkId.newBuilder(opticalLinkUuid_).mergeFrom(value).buildPartial(); + public Builder mergeConfigruleCustom(context.ContextOuterClass.ConfigRule_Custom value) { + if (configruleCustomBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && configruleCustom_ != null && configruleCustom_ != context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance()) { + getConfigruleCustomBuilder().mergeFrom(value); } else { - opticalLinkUuid_ = value; + configruleCustom_ = value; } - onChanged(); } else { - opticalLinkUuidBuilder_.mergeFrom(value); + configruleCustomBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - public Builder clearOpticalLinkUuid() { - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuid_ = null; - onChanged(); - } else { - opticalLinkUuid_ = null; - opticalLinkUuidBuilder_ = null; + public Builder clearConfigruleCustom() { + bitField0_ = (bitField0_ & ~0x00000002); + configruleCustom_ = null; + if (configruleCustomBuilder_ != null) { + configruleCustomBuilder_.dispose(); + configruleCustomBuilder_ = null; } + onChanged(); return this; } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - public context.ContextOuterClass.OpticalLinkId.Builder getOpticalLinkUuidBuilder() { + public context.ContextOuterClass.ConfigRule_Custom.Builder getConfigruleCustomBuilder() { + bitField0_ |= 0x00000002; onChanged(); - return getOpticalLinkUuidFieldBuilder().getBuilder(); + return getConfigruleCustomFieldBuilder().getBuilder(); } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - public context.ContextOuterClass.OpticalLinkIdOrBuilder getOpticalLinkUuidOrBuilder() { - if (opticalLinkUuidBuilder_ != null) { - return opticalLinkUuidBuilder_.getMessageOrBuilder(); + public context.ContextOuterClass.ConfigRule_CustomOrBuilder getConfigruleCustomOrBuilder() { + if (configruleCustomBuilder_ != null) { + return configruleCustomBuilder_.getMessageOrBuilder(); } else { - return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; + return configruleCustom_ == null ? context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance() : configruleCustom_; } } /** - * .context.OpticalLinkId optical_link_uuid = 3; + * .context.ConfigRule_Custom configrule_custom = 2; */ - private com.google.protobuf.SingleFieldBuilderV3 getOpticalLinkUuidFieldBuilder() { - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalLinkUuid(), getParentForChildren(), isClean()); - opticalLinkUuid_ = null; + private com.google.protobuf.SingleFieldBuilderV3 getConfigruleCustomFieldBuilder() { + if (configruleCustomBuilder_ == null) { + configruleCustomBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getConfigruleCustom(), getParentForChildren(), isClean()); + configruleCustom_ = null; } - return opticalLinkUuidBuilder_; + return configruleCustomBuilder_; } @java.lang.Override @@ -79359,39 +80710,49 @@ public final class ContextOuterClass { public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:context.OpticalLink) + // @@protoc_insertion_point(builder_scope:context.ServiceConfigRule) } - // @@protoc_insertion_point(class_scope:context.OpticalLink) - private static final context.ContextOuterClass.OpticalLink DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:context.ServiceConfigRule) + private static final context.ContextOuterClass.ServiceConfigRule DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLink(); + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceConfigRule(); } - public static context.ContextOuterClass.OpticalLink getDefaultInstance() { + public static context.ContextOuterClass.ServiceConfigRule getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public OpticalLink parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OpticalLink(input, extensionRegistry); + public ServiceConfigRule parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public context.ContextOuterClass.OpticalLink getDefaultInstanceForType() { + public context.ContextOuterClass.ServiceConfigRule getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -79632,6 +80993,10 @@ public final class ContextOuterClass { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPoint_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPoint_CapabilitiesEntry_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPoint_CapabilitiesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPointName_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPointName_fieldAccessorTable; @@ -79700,6 +81065,14 @@ public final class ContextOuterClass { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_Exclusions_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_QoSProfileId_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_QoSProfileId_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_QoSProfile_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_QoSProfile_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_fieldAccessorTable; @@ -79724,26 +81097,42 @@ public final class ContextOuterClass { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalConfigList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkId_descriptor; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalConfigEvent_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkId_fieldAccessorTable; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalConfigEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_FiberId_descriptor; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalEndPointId_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_FiberId_fieldAccessorTable; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalEndPointId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Fiber_descriptor; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkList_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Fiber_fieldAccessorTable; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkList_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkDetails_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkDetails_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkDetails_CSlotsEntry_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkDetails_CSlotsEntry_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkDetails_LSlotsEntry_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkDetails_LSlotsEntry_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkDetails_SSlotsEntry_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkDetails_SSlotsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLink_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLink_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceConfigRule_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceConfigRule_fieldAccessorTable; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } @@ -79751,8 +81140,8 @@ public final class ContextOuterClass { private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { "\n\rcontext.proto\022\007context\032\tacl.proto\032\026kpi" + "_sample_types.proto\"\007\n\005Empty\"\024\n\004Uuid\022\014\n\004" + "uuid\030\001 \001(\t\"\036\n\tTimestamp\022\021\n\ttimestamp\030\001 \001" + "(\001\"Z\n\005Event\022%\n\ttimestamp\030\001 \001(\0132\022.context" + ".Timestamp\022*\n\nevent_type\030\002 \001(\0162\026.context" + ".EventTypeEnum\"0\n\tContextId\022#\n\014context_u" + "uid\030\001 \001(\0132\r.context.Uuid\"\351\001\n\007Context\022&\n\n" + "context_id\030\001 \001(\0132\022.context.ContextId\022\014\n\004" + "name\030\002 \001(\t\022)\n\014topology_ids\030\003 \003(\0132\023.conte" + "xt.TopologyId\022\'\n\013service_ids\030\004 \003(\0132\022.con" + "text.ServiceId\022#\n\tslice_ids\030\005 \003(\0132\020.cont" + "ext.SliceId\022/\n\ncontroller\030\006 \001(\0132\033.contex" + "t.TeraFlowController\"8\n\rContextIdList\022\'\n" + "\013context_ids\030\001 \003(\0132\022.context.ContextId\"1" + "\n\013ContextList\022\"\n\010contexts\030\001 \003(\0132\020.contex" + "t.Context\"U\n\014ContextEvent\022\035\n\005event\030\001 \001(\013" + "2\016.context.Event\022&\n\ncontext_id\030\002 \001(\0132\022.c" + "ontext.ContextId\"Z\n\nTopologyId\022&\n\ncontex" + "t_id\030\001 \001(\0132\022.context.ContextId\022$\n\rtopolo" + "gy_uuid\030\002 \001(\0132\r.context.Uuid\"\214\001\n\010Topolog" + "y\022(\n\013topology_id\030\001 \001(\0132\023.context.Topolog" + "yId\022\014\n\004name\030\002 \001(\t\022%\n\ndevice_ids\030\003 \003(\0132\021." + "context.DeviceId\022!\n\010link_ids\030\004 \003(\0132\017.con" + "text.LinkId\"\211\001\n\017TopologyDetails\022(\n\013topol" + "ogy_id\030\001 \001(\0132\023.context.TopologyId\022\014\n\004nam" + "e\030\002 \001(\t\022 \n\007devices\030\003 \003(\0132\017.context.Devic" + "e\022\034\n\005links\030\004 \003(\0132\r.context.Link\";\n\016Topol" + "ogyIdList\022)\n\014topology_ids\030\001 \003(\0132\023.contex" + "t.TopologyId\"5\n\014TopologyList\022%\n\ntopologi" + "es\030\001 \003(\0132\021.context.Topology\"X\n\rTopologyE" + "vent\022\035\n\005event\030\001 \001(\0132\016.context.Event\022(\n\013t" + "opology_id\030\002 \001(\0132\023.context.TopologyId\".\n" + "\010DeviceId\022\"\n\013device_uuid\030\001 \001(\0132\r.context" + ".Uuid\"\372\002\n\006Device\022$\n\tdevice_id\030\001 \001(\0132\021.co" + "ntext.DeviceId\022\014\n\004name\030\002 \001(\t\022\023\n\013device_t" + "ype\030\003 \001(\t\022,\n\rdevice_config\030\004 \001(\0132\025.conte" + "xt.DeviceConfig\022G\n\031device_operational_st" + "atus\030\005 \001(\0162$.context.DeviceOperationalSt" + "atusEnum\0221\n\016device_drivers\030\006 \003(\0162\031.conte" + "xt.DeviceDriverEnum\022+\n\020device_endpoints\030" + "\007 \003(\0132\021.context.EndPoint\022&\n\ncomponents\030\010" + " \003(\0132\022.context.Component\022(\n\rcontroller_i" + "d\030\t \001(\0132\021.context.DeviceId\"\311\001\n\tComponent" + "\022%\n\016component_uuid\030\001 \001(\0132\r.context.Uuid\022" + "\014\n\004name\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\0226\n\nattribute" + "s\030\004 \003(\0132\".context.Component.AttributesEn" + "try\022\016\n\006parent\030\005 \001(\t\0321\n\017AttributesEntry\022\013" + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"9\n\014Device" + "Config\022)\n\014config_rules\030\001 \003(\0132\023.context.C" + "onfigRule\"5\n\014DeviceIdList\022%\n\ndevice_ids\030" + "\001 \003(\0132\021.context.DeviceId\".\n\nDeviceList\022 " + "\n\007devices\030\001 \003(\0132\017.context.Device\"\216\001\n\014Dev" + "iceFilter\022)\n\ndevice_ids\030\001 \001(\0132\025.context." + "DeviceIdList\022\031\n\021include_endpoints\030\002 \001(\010\022" + "\034\n\024include_config_rules\030\003 \001(\010\022\032\n\022include" + "_components\030\004 \001(\010\"\200\001\n\013DeviceEvent\022\035\n\005eve" + "nt\030\001 \001(\0132\016.context.Event\022$\n\tdevice_id\030\002 " + "\001(\0132\021.context.DeviceId\022,\n\rdevice_config\030" + "\003 \001(\0132\025.context.DeviceConfig\"*\n\006LinkId\022 " + "\n\tlink_uuid\030\001 \001(\0132\r.context.Uuid\"I\n\016Link" + "Attributes\022\033\n\023total_capacity_gbps\030\001 \001(\002\022" + "\032\n\022used_capacity_gbps\030\002 \001(\002\"\223\001\n\004Link\022 \n\007" + "link_id\030\001 \001(\0132\017.context.LinkId\022\014\n\004name\030\002" + " \001(\t\022.\n\021link_endpoint_ids\030\003 \003(\0132\023.contex" + "t.EndPointId\022+\n\nattributes\030\004 \001(\0132\027.conte" + "xt.LinkAttributes\"/\n\nLinkIdList\022!\n\010link_" + "ids\030\001 \003(\0132\017.context.LinkId\"(\n\010LinkList\022\034" + "\n\005links\030\001 \003(\0132\r.context.Link\"L\n\tLinkEven" + "t\022\035\n\005event\030\001 \001(\0132\016.context.Event\022 \n\007link" + "_id\030\002 \001(\0132\017.context.LinkId\"X\n\tServiceId\022" + "&\n\ncontext_id\030\001 \001(\0132\022.context.ContextId\022" + "#\n\014service_uuid\030\002 \001(\0132\r.context.Uuid\"\333\002\n" + "\007Service\022&\n\nservice_id\030\001 \001(\0132\022.context.S" + "erviceId\022\014\n\004name\030\002 \001(\t\022.\n\014service_type\030\003" + " \001(\0162\030.context.ServiceTypeEnum\0221\n\024servic" + "e_endpoint_ids\030\004 \003(\0132\023.context.EndPointI" + "d\0220\n\023service_constraints\030\005 \003(\0132\023.context" + ".Constraint\022.\n\016service_status\030\006 \001(\0132\026.co" + "ntext.ServiceStatus\022.\n\016service_config\030\007 " + "\001(\0132\026.context.ServiceConfig\022%\n\ttimestamp" + "\030\010 \001(\0132\022.context.Timestamp\"C\n\rServiceSta" + "tus\0222\n\016service_status\030\001 \001(\0162\032.context.Se" + "rviceStatusEnum\":\n\rServiceConfig\022)\n\014conf" + "ig_rules\030\001 \003(\0132\023.context.ConfigRule\"8\n\rS" + "erviceIdList\022\'\n\013service_ids\030\001 \003(\0132\022.cont" + "ext.ServiceId\"1\n\013ServiceList\022\"\n\010services" + "\030\001 \003(\0132\020.context.Service\"\225\001\n\rServiceFilt" + "er\022+\n\013service_ids\030\001 \001(\0132\026.context.Servic" + "eIdList\022\034\n\024include_endpoint_ids\030\002 \001(\010\022\033\n" + "\023include_constraints\030\003 \001(\010\022\034\n\024include_co" + "nfig_rules\030\004 \001(\010\"U\n\014ServiceEvent\022\035\n\005even" + "t\030\001 \001(\0132\016.context.Event\022&\n\nservice_id\030\002 " + "\001(\0132\022.context.ServiceId\"T\n\007SliceId\022&\n\nco" + "ntext_id\030\001 \001(\0132\022.context.ContextId\022!\n\nsl" + "ice_uuid\030\002 \001(\0132\r.context.Uuid\"\240\003\n\005Slice\022" + "\"\n\010slice_id\030\001 \001(\0132\020.context.SliceId\022\014\n\004n" + "ame\030\002 \001(\t\022/\n\022slice_endpoint_ids\030\003 \003(\0132\023." + "context.EndPointId\022.\n\021slice_constraints\030" + "\004 \003(\0132\023.context.Constraint\022-\n\021slice_serv" + "ice_ids\030\005 \003(\0132\022.context.ServiceId\022,\n\022sli" + "ce_subslice_ids\030\006 \003(\0132\020.context.SliceId\022" + "*\n\014slice_status\030\007 \001(\0132\024.context.SliceSta" + "tus\022*\n\014slice_config\030\010 \001(\0132\024.context.Slic" + "eConfig\022(\n\013slice_owner\030\t \001(\0132\023.context.S" + "liceOwner\022%\n\ttimestamp\030\n \001(\0132\022.context.T" + "imestamp\"E\n\nSliceOwner\022!\n\nowner_uuid\030\001 \001" + "(\0132\r.context.Uuid\022\024\n\014owner_string\030\002 \001(\t\"" + "=\n\013SliceStatus\022.\n\014slice_status\030\001 \001(\0162\030.c" + "ontext.SliceStatusEnum\"8\n\013SliceConfig\022)\n" + "\014config_rules\030\001 \003(\0132\023.context.ConfigRule" + "\"2\n\013SliceIdList\022#\n\tslice_ids\030\001 \003(\0132\020.con" + "text.SliceId\"+\n\tSliceList\022\036\n\006slices\030\001 \003(" + "\0132\016.context.Slice\"\312\001\n\013SliceFilter\022\'\n\tsli" + "ce_ids\030\001 \001(\0132\024.context.SliceIdList\022\034\n\024in" + "clude_endpoint_ids\030\002 \001(\010\022\033\n\023include_cons" + "traints\030\003 \001(\010\022\033\n\023include_service_ids\030\004 \001" + "(\010\022\034\n\024include_subslice_ids\030\005 \001(\010\022\034\n\024incl" + "ude_config_rules\030\006 \001(\010\"O\n\nSliceEvent\022\035\n\005" + "event\030\001 \001(\0132\016.context.Event\022\"\n\010slice_id\030" + "\002 \001(\0132\020.context.SliceId\"6\n\014ConnectionId\022" + "&\n\017connection_uuid\030\001 \001(\0132\r.context.Uuid\"" + "2\n\025ConnectionSettings_L0\022\031\n\021lsp_symbolic" + "_name\030\001 \001(\t\"\236\001\n\025ConnectionSettings_L2\022\027\n" + "\017src_mac_address\030\001 \001(\t\022\027\n\017dst_mac_addres" + "s\030\002 \001(\t\022\022\n\nether_type\030\003 \001(\r\022\017\n\007vlan_id\030\004" + " \001(\r\022\022\n\nmpls_label\030\005 \001(\r\022\032\n\022mpls_traffic" + "_class\030\006 \001(\r\"t\n\025ConnectionSettings_L3\022\026\n" + "\016src_ip_address\030\001 \001(\t\022\026\n\016dst_ip_address\030" + "\002 \001(\t\022\014\n\004dscp\030\003 \001(\r\022\020\n\010protocol\030\004 \001(\r\022\013\n" + "\003ttl\030\005 \001(\r\"[\n\025ConnectionSettings_L4\022\020\n\010s" + "rc_port\030\001 \001(\r\022\020\n\010dst_port\030\002 \001(\r\022\021\n\ttcp_f" + "lags\030\003 \001(\r\022\013\n\003ttl\030\004 \001(\r\"\304\001\n\022ConnectionSe" + "ttings\022*\n\002l0\030\001 \001(\0132\036.context.ConnectionS" + "ettings_L0\022*\n\002l2\030\002 \001(\0132\036.context.Connect" + "ionSettings_L2\022*\n\002l3\030\003 \001(\0132\036.context.Con" + "nectionSettings_L3\022*\n\002l4\030\004 \001(\0132\036.context" + ".ConnectionSettings_L4\"\363\001\n\nConnection\022,\n" + "\rconnection_id\030\001 \001(\0132\025.context.Connectio" + "nId\022&\n\nservice_id\030\002 \001(\0132\022.context.Servic" + "eId\0223\n\026path_hops_endpoint_ids\030\003 \003(\0132\023.co" + "ntext.EndPointId\022+\n\017sub_service_ids\030\004 \003(" + "\0132\022.context.ServiceId\022-\n\010settings\030\005 \001(\0132" + "\033.context.ConnectionSettings\"A\n\020Connecti" + "onIdList\022-\n\016connection_ids\030\001 \003(\0132\025.conte" + "xt.ConnectionId\":\n\016ConnectionList\022(\n\013con" + "nections\030\001 \003(\0132\023.context.Connection\"^\n\017C" + "onnectionEvent\022\035\n\005event\030\001 \001(\0132\016.context." + "Event\022,\n\rconnection_id\030\002 \001(\0132\025.context.C" + "onnectionId\"\202\001\n\nEndPointId\022(\n\013topology_i" + "d\030\001 \001(\0132\023.context.TopologyId\022$\n\tdevice_i" + "d\030\002 \001(\0132\021.context.DeviceId\022$\n\rendpoint_u" + "uid\030\003 \001(\0132\r.context.Uuid\"\302\001\n\010EndPoint\022(\n" + "\013endpoint_id\030\001 \001(\0132\023.context.EndPointId\022" + "\014\n\004name\030\002 \001(\t\022\025\n\rendpoint_type\030\003 \001(\t\0229\n\020" + "kpi_sample_types\030\004 \003(\0162\037.kpi_sample_type" + "s.KpiSampleType\022,\n\021endpoint_location\030\005 \001" + "(\0132\021.context.Location\"{\n\014EndPointName\022(\n" + "\013endpoint_id\030\001 \001(\0132\023.context.EndPointId\022" + "\023\n\013device_name\030\002 \001(\t\022\025\n\rendpoint_name\030\003 " + "\001(\t\022\025\n\rendpoint_type\030\004 \001(\t\";\n\016EndPointId" + "List\022)\n\014endpoint_ids\030\001 \003(\0132\023.context.End" + "PointId\"A\n\020EndPointNameList\022-\n\016endpoint_" + "names\030\001 \003(\0132\025.context.EndPointName\"A\n\021Co" + "nfigRule_Custom\022\024\n\014resource_key\030\001 \001(\t\022\026\n" + "\016resource_value\030\002 \001(\t\"]\n\016ConfigRule_ACL\022" + "(\n\013endpoint_id\030\001 \001(\0132\023.context.EndPointI" + "d\022!\n\010rule_set\030\002 \001(\0132\017.acl.AclRuleSet\"\234\001\n" + "\nConfigRule\022)\n\006action\030\001 \001(\0162\031.context.Co" + "nfigActionEnum\022,\n\006custom\030\002 \001(\0132\032.context" + ".ConfigRule_CustomH\000\022&\n\003acl\030\003 \001(\0132\027.cont" + "ext.ConfigRule_ACLH\000B\r\n\013config_rule\"F\n\021C" + "onstraint_Custom\022\027\n\017constraint_type\030\001 \001(" + "\t\022\030\n\020constraint_value\030\002 \001(\t\"E\n\023Constrain" + "t_Schedule\022\027\n\017start_timestamp\030\001 \001(\002\022\025\n\rd" + "uration_days\030\002 \001(\002\"3\n\014GPS_Position\022\020\n\010la" + "titude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001(\002\"W\n\010Locat" + "ion\022\020\n\006region\030\001 \001(\tH\000\022-\n\014gps_position\030\002 " + "\001(\0132\025.context.GPS_PositionH\000B\n\n\010location" + "\"l\n\033Constraint_EndPointLocation\022(\n\013endpo" + "int_id\030\001 \001(\0132\023.context.EndPointId\022#\n\010loc" + "ation\030\002 \001(\0132\021.context.Location\"Y\n\033Constr" + "aint_EndPointPriority\022(\n\013endpoint_id\030\001 \001" + "(\0132\023.context.EndPointId\022\020\n\010priority\030\002 \001(" + "\r\"0\n\026Constraint_SLA_Latency\022\026\n\016e2e_laten" + "cy_ms\030\001 \001(\002\"0\n\027Constraint_SLA_Capacity\022\025" + "\n\rcapacity_gbps\030\001 \001(\002\"c\n\033Constraint_SLA_" + "Availability\022\032\n\022num_disjoint_paths\030\001 \001(\r" + "\022\022\n\nall_active\030\002 \001(\010\022\024\n\014availability\030\003 \001" + "(\002\"V\n\036Constraint_SLA_Isolation_level\0224\n\017" + "isolation_level\030\001 \003(\0162\033.context.Isolatio" + "nLevelEnum\"\242\001\n\025Constraint_Exclusions\022\024\n\014" + "is_permanent\030\001 \001(\010\022%\n\ndevice_ids\030\002 \003(\0132\021" + ".context.DeviceId\022)\n\014endpoint_ids\030\003 \003(\0132" + "\023.context.EndPointId\022!\n\010link_ids\030\004 \003(\0132\017" + ".context.LinkId\"\333\004\n\nConstraint\022-\n\006action" + "\030\001 \001(\0162\035.context.ConstraintActionEnum\022,\n" + "\006custom\030\002 \001(\0132\032.context.Constraint_Custo" + "mH\000\0220\n\010schedule\030\003 \001(\0132\034.context.Constrai" + "nt_ScheduleH\000\022A\n\021endpoint_location\030\004 \001(\013" + "2$.context.Constraint_EndPointLocationH\000" + "\022A\n\021endpoint_priority\030\005 \001(\0132$.context.Co" + "nstraint_EndPointPriorityH\000\0228\n\014sla_capac" + "ity\030\006 \001(\0132 .context.Constraint_SLA_Capac" + "ityH\000\0226\n\013sla_latency\030\007 \001(\0132\037.context.Con" + "straint_SLA_LatencyH\000\022@\n\020sla_availabilit" + "y\030\010 \001(\0132$.context.Constraint_SLA_Availab" + "ilityH\000\022@\n\rsla_isolation\030\t \001(\0132\'.context" + ".Constraint_SLA_Isolation_levelH\000\0224\n\nexc" + "lusions\030\n \001(\0132\036.context.Constraint_Exclu" + "sionsH\000B\014\n\nconstraint\"^\n\022TeraFlowControl" + "ler\022&\n\ncontext_id\030\001 \001(\0132\022.context.Contex" + "tId\022\022\n\nip_address\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n" + "\024AuthenticationResult\022&\n\ncontext_id\030\001 \001(" + "\0132\022.context.ContextId\022\025\n\rauthenticated\030\002" + " \001(\010\"-\n\017OpticalConfigId\022\032\n\022opticalconfig" + "_uuid\030\001 \001(\t\"S\n\rOpticalConfig\0222\n\020opticalc" + "onfig_id\030\001 \001(\0132\030.context.OpticalConfigId" + "\022\016\n\006config\030\002 \001(\t\"C\n\021OpticalConfigList\022.\n" + "\016opticalconfigs\030\001 \003(\0132\026.context.OpticalC" + "onfig\"9\n\rOpticalLinkId\022(\n\021optical_link_u" + "uid\030\001 \001(\0132\r.context.Uuid\",\n\007FiberId\022!\n\nf" + "iber_uuid\030\001 \001(\0132\r.context.Uuid\"\341\001\n\005Fiber" + "\022\n\n\002ID\030\n \001(\t\022\020\n\010src_port\030\001 \001(\t\022\020\n\010dst_po" + "rt\030\002 \001(\t\022\027\n\017local_peer_port\030\003 \001(\t\022\030\n\020rem" + "ote_peer_port\030\004 \001(\t\022\017\n\007c_slots\030\005 \003(\005\022\017\n\007" + "l_slots\030\006 \003(\005\022\017\n\007s_slots\030\007 \003(\005\022\016\n\006length" + "\030\010 \001(\002\022\014\n\004used\030\t \001(\010\022$\n\nfiber_uuid\030\013 \001(\013" + "2\020.context.FiberId\"d\n\022OpticalLinkDetails" + "\022\016\n\006length\030\001 \001(\002\022\016\n\006source\030\002 \001(\t\022\016\n\006targ" + "et\030\003 \001(\t\022\036\n\006fibers\030\004 \003(\0132\016.context.Fiber" + "\"|\n\013OpticalLink\022\014\n\004name\030\001 \001(\t\022,\n\007details" + "\030\002 \001(\0132\033.context.OpticalLinkDetails\0221\n\021o" + "ptical_link_uuid\030\003 \001(\0132\026.context.Optical" + "LinkId*j\n\rEventTypeEnum\022\027\n\023EVENTTYPE_UND" + "EFINED\020\000\022\024\n\020EVENTTYPE_CREATE\020\001\022\024\n\020EVENTT" + "YPE_UPDATE\020\002\022\024\n\020EVENTTYPE_REMOVE\020\003*\350\002\n\020D" + "eviceDriverEnum\022\032\n\026DEVICEDRIVER_UNDEFINE" + "D\020\000\022\033\n\027DEVICEDRIVER_OPENCONFIG\020\001\022\036\n\032DEVI" + "CEDRIVER_TRANSPORT_API\020\002\022\023\n\017DEVICEDRIVER" + "_P4\020\003\022&\n\"DEVICEDRIVER_IETF_NETWORK_TOPOL" + "OGY\020\004\022\033\n\027DEVICEDRIVER_ONF_TR_532\020\005\022\023\n\017DE" + "VICEDRIVER_XR\020\006\022\033\n\027DEVICEDRIVER_IETF_L2V" + "PN\020\007\022 \n\034DEVICEDRIVER_GNMI_OPENCONFIG\020\010\022\034" + "\n\030DEVICEDRIVER_OPTICAL_TFS\020\t\022\032\n\026DEVICEDR" + "IVER_IETF_ACTN\020\n\022\023\n\017DEVICEDRIVER_OC\020\013*\217\001" + "\n\033DeviceOperationalStatusEnum\022%\n!DEVICEO" + "PERATIONALSTATUS_UNDEFINED\020\000\022$\n DEVICEOP" + "ERATIONALSTATUS_DISABLED\020\001\022#\n\037DEVICEOPER" + "ATIONALSTATUS_ENABLED\020\002*\320\001\n\017ServiceTypeE" + "num\022\027\n\023SERVICETYPE_UNKNOWN\020\000\022\024\n\020SERVICET" + "YPE_L3NM\020\001\022\024\n\020SERVICETYPE_L2NM\020\002\022)\n%SERV" + "ICETYPE_TAPI_CONNECTIVITY_SERVICE\020\003\022\022\n\016S" + "ERVICETYPE_TE\020\004\022\023\n\017SERVICETYPE_E2E\020\005\022$\n " + "SERVICETYPE_OPTICAL_CONNECTIVITY\020\006*\304\001\n\021S" + "erviceStatusEnum\022\033\n\027SERVICESTATUS_UNDEFI" + "NED\020\000\022\031\n\025SERVICESTATUS_PLANNED\020\001\022\030\n\024SERV" + "ICESTATUS_ACTIVE\020\002\022\032\n\026SERVICESTATUS_UPDA" + "TING\020\003\022!\n\035SERVICESTATUS_PENDING_REMOVAL\020" + "\004\022\036\n\032SERVICESTATUS_SLA_VIOLATED\020\005*\251\001\n\017Sl" + "iceStatusEnum\022\031\n\025SLICESTATUS_UNDEFINED\020\000" + "\022\027\n\023SLICESTATUS_PLANNED\020\001\022\024\n\020SLICESTATUS" + "_INIT\020\002\022\026\n\022SLICESTATUS_ACTIVE\020\003\022\026\n\022SLICE" + "STATUS_DEINIT\020\004\022\034\n\030SLICESTATUS_SLA_VIOLA" + "TED\020\005*]\n\020ConfigActionEnum\022\032\n\026CONFIGACTIO" + "N_UNDEFINED\020\000\022\024\n\020CONFIGACTION_SET\020\001\022\027\n\023C" + "ONFIGACTION_DELETE\020\002*m\n\024ConstraintAction" + "Enum\022\036\n\032CONSTRAINTACTION_UNDEFINED\020\000\022\030\n\024" + "CONSTRAINTACTION_SET\020\001\022\033\n\027CONSTRAINTACTI" + "ON_DELETE\020\002*\203\002\n\022IsolationLevelEnum\022\020\n\014NO" + "_ISOLATION\020\000\022\026\n\022PHYSICAL_ISOLATION\020\001\022\025\n\021" + "LOGICAL_ISOLATION\020\002\022\025\n\021PROCESS_ISOLATION" + "\020\003\022\035\n\031PHYSICAL_MEMORY_ISOLATION\020\004\022\036\n\032PHY" + "SICAL_NETWORK_ISOLATION\020\005\022\036\n\032VIRTUAL_RES" + "OURCE_ISOLATION\020\006\022\037\n\033NETWORK_FUNCTIONS_I" + "SOLATION\020\007\022\025\n\021SERVICE_ISOLATION\020\0102\246\031\n\016Co" + "ntextService\022:\n\016ListContextIds\022\016.context" + ".Empty\032\026.context.ContextIdList\"\000\0226\n\014List" + "Contexts\022\016.context.Empty\032\024.context.Conte" + "xtList\"\000\0224\n\nGetContext\022\022.context.Context" + "Id\032\020.context.Context\"\000\0224\n\nSetContext\022\020.c" + "ontext.Context\032\022.context.ContextId\"\000\0225\n\r" + "RemoveContext\022\022.context.ContextId\032\016.cont" + "ext.Empty\"\000\022=\n\020GetContextEvents\022\016.contex" + "t.Empty\032\025.context.ContextEvent\"\0000\001\022@\n\017Li" + "stTopologyIds\022\022.context.ContextId\032\027.cont" + "ext.TopologyIdList\"\000\022=\n\016ListTopologies\022\022" + ".context.ContextId\032\025.context.TopologyLis" + "t\"\000\0227\n\013GetTopology\022\023.context.TopologyId\032" + "\021.context.Topology\"\000\022E\n\022GetTopologyDetai" + "ls\022\023.context.TopologyId\032\030.context.Topolo" + "gyDetails\"\000\0227\n\013SetTopology\022\021.context.Top" + "ology\032\023.context.TopologyId\"\000\0227\n\016RemoveTo" + "pology\022\023.context.TopologyId\032\016.context.Em" + "pty\"\000\022?\n\021GetTopologyEvents\022\016.context.Emp" + "ty\032\026.context.TopologyEvent\"\0000\001\0228\n\rListDe" + "viceIds\022\016.context.Empty\032\025.context.Device" + "IdList\"\000\0224\n\013ListDevices\022\016.context.Empty\032" + "\023.context.DeviceList\"\000\0221\n\tGetDevice\022\021.co" + "ntext.DeviceId\032\017.context.Device\"\000\0221\n\tSet" + "Device\022\017.context.Device\032\021.context.Device" + "Id\"\000\0223\n\014RemoveDevice\022\021.context.DeviceId\032" + "\016.context.Empty\"\000\022;\n\017GetDeviceEvents\022\016.c" + "ontext.Empty\032\024.context.DeviceEvent\"\0000\001\022<" + "\n\014SelectDevice\022\025.context.DeviceFilter\032\023." + "context.DeviceList\"\000\022I\n\021ListEndPointName" + "s\022\027.context.EndPointIdList\032\031.context.End" + "PointNameList\"\000\0224\n\013ListLinkIds\022\016.context" + ".Empty\032\023.context.LinkIdList\"\000\0220\n\tListLin" + "ks\022\016.context.Empty\032\021.context.LinkList\"\000\022" + "+\n\007GetLink\022\017.context.LinkId\032\r.context.Li" + "nk\"\000\022+\n\007SetLink\022\r.context.Link\032\017.context" + ".LinkId\"\000\022/\n\nRemoveLink\022\017.context.LinkId" + "\032\016.context.Empty\"\000\0227\n\rGetLinkEvents\022\016.co" + "ntext.Empty\032\022.context.LinkEvent\"\0000\001\022>\n\016L" + "istServiceIds\022\022.context.ContextId\032\026.cont" + "ext.ServiceIdList\"\000\022:\n\014ListServices\022\022.co" + "ntext.ContextId\032\024.context.ServiceList\"\000\022" + "4\n\nGetService\022\022.context.ServiceId\032\020.cont" + "ext.Service\"\000\0224\n\nSetService\022\020.context.Se" + "rvice\032\022.context.ServiceId\"\000\0226\n\014UnsetServ" + "ice\022\020.context.Service\032\022.context.ServiceI" + "d\"\000\0225\n\rRemoveService\022\022.context.ServiceId" + "\032\016.context.Empty\"\000\022=\n\020GetServiceEvents\022\016" + ".context.Empty\032\025.context.ServiceEvent\"\0000" + "\001\022?\n\rSelectService\022\026.context.ServiceFilt" + "er\032\024.context.ServiceList\"\000\022:\n\014ListSliceI" + "ds\022\022.context.ContextId\032\024.context.SliceId" + "List\"\000\0226\n\nListSlices\022\022.context.ContextId" + "\032\022.context.SliceList\"\000\022.\n\010GetSlice\022\020.con" + "text.SliceId\032\016.context.Slice\"\000\022.\n\010SetSli" + "ce\022\016.context.Slice\032\020.context.SliceId\"\000\0220" + "\n\nUnsetSlice\022\016.context.Slice\032\020.context.S" + "liceId\"\000\0221\n\013RemoveSlice\022\020.context.SliceI" + "d\032\016.context.Empty\"\000\0229\n\016GetSliceEvents\022\016." + "context.Empty\032\023.context.SliceEvent\"\0000\001\0229" + "\n\013SelectSlice\022\024.context.SliceFilter\032\022.co" + "ntext.SliceList\"\000\022D\n\021ListConnectionIds\022\022" + ".context.ServiceId\032\031.context.ConnectionI" + "dList\"\000\022@\n\017ListConnections\022\022.context.Ser" + "viceId\032\027.context.ConnectionList\"\000\022=\n\rGet" + "Connection\022\025.context.ConnectionId\032\023.cont" + "ext.Connection\"\000\022=\n\rSetConnection\022\023.cont" + "ext.Connection\032\025.context.ConnectionId\"\000\022" + ";\n\020RemoveConnection\022\025.context.Connection" + "Id\032\016.context.Empty\"\000\022C\n\023GetConnectionEve" + "nts\022\016.context.Empty\032\030.context.Connection" + "Event\"\0000\001\022@\n\020GetOpticalConfig\022\016.context." + "Empty\032\032.context.OpticalConfigList\"\000\022F\n\020S" + "etOpticalConfig\022\026.context.OpticalConfig\032" + "\030.context.OpticalConfigId\"\000\022I\n\023SelectOpt" + "icalConfig\022\030.context.OpticalConfigId\032\026.c" + "ontext.OpticalConfig\"\000\0228\n\016SetOpticalLink" + "\022\024.context.OpticalLink\032\016.context.Empty\"\000" + "\022@\n\016GetOpticalLink\022\026.context.OpticalLink" + "Id\032\024.context.OpticalLink\"\000\022.\n\010GetFiber\022\020" + ".context.FiberId\032\016.context.Fiber\"\000b\006prot" + "o3" }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { acl.Acl.getDescriptor(), kpi_sample_types.KpiSampleTypes.getDescriptor() }); + java.lang.String[] descriptorData = { "\n\rcontext.proto\022\007context\032\031google/protobu" + "f/any.proto\032\tacl.proto\032\026kpi_sample_types" + ".proto\"\007\n\005Empty\"\024\n\004Uuid\022\014\n\004uuid\030\001 \001(\t\"\036\n" + "\tTimestamp\022\021\n\ttimestamp\030\001 \001(\001\"Z\n\005Event\022%" + "\n\ttimestamp\030\001 \001(\0132\022.context.Timestamp\022*\n" + "\nevent_type\030\002 \001(\0162\026.context.EventTypeEnu" + "m\"0\n\tContextId\022#\n\014context_uuid\030\001 \001(\0132\r.c" + "ontext.Uuid\"\351\001\n\007Context\022&\n\ncontext_id\030\001 " + "\001(\0132\022.context.ContextId\022\014\n\004name\030\002 \001(\t\022)\n" + "\014topology_ids\030\003 \003(\0132\023.context.TopologyId" + "\022\'\n\013service_ids\030\004 \003(\0132\022.context.ServiceI" + "d\022#\n\tslice_ids\030\005 \003(\0132\020.context.SliceId\022/" + "\n\ncontroller\030\006 \001(\0132\033.context.TeraFlowCon" + "troller\"8\n\rContextIdList\022\'\n\013context_ids\030" + "\001 \003(\0132\022.context.ContextId\"1\n\013ContextList" + "\022\"\n\010contexts\030\001 \003(\0132\020.context.Context\"U\n\014" + "ContextEvent\022\035\n\005event\030\001 \001(\0132\016.context.Ev" + "ent\022&\n\ncontext_id\030\002 \001(\0132\022.context.Contex" + "tId\"Z\n\nTopologyId\022&\n\ncontext_id\030\001 \001(\0132\022." + "context.ContextId\022$\n\rtopology_uuid\030\002 \001(\013" + "2\r.context.Uuid\"\267\001\n\010Topology\022(\n\013topology" + "_id\030\001 \001(\0132\023.context.TopologyId\022\014\n\004name\030\002" + " \001(\t\022%\n\ndevice_ids\030\003 \003(\0132\021.context.Devic" + "eId\022!\n\010link_ids\030\004 \003(\0132\017.context.LinkId\022)" + "\n\020optical_link_ids\030\005 \003(\0132\017.context.LinkI" + "d\"\266\001\n\017TopologyDetails\022(\n\013topology_id\030\001 \001" + "(\0132\023.context.TopologyId\022\014\n\004name\030\002 \001(\t\022 \n" + "\007devices\030\003 \003(\0132\017.context.Device\022\034\n\005links" + "\030\004 \003(\0132\r.context.Link\022+\n\roptical_links\030\005" + " \003(\0132\024.context.OpticalLink\";\n\016TopologyId" + "List\022)\n\014topology_ids\030\001 \003(\0132\023.context.Top" + "ologyId\"5\n\014TopologyList\022%\n\ntopologies\030\001 " + "\003(\0132\021.context.Topology\"X\n\rTopologyEvent\022" + "\035\n\005event\030\001 \001(\0132\016.context.Event\022(\n\013topolo" + "gy_id\030\002 \001(\0132\023.context.TopologyId\".\n\010Devi" + "ceId\022\"\n\013device_uuid\030\001 \001(\0132\r.context.Uuid" + "\"\372\002\n\006Device\022$\n\tdevice_id\030\001 \001(\0132\021.context" + ".DeviceId\022\014\n\004name\030\002 \001(\t\022\023\n\013device_type\030\003" + " \001(\t\022,\n\rdevice_config\030\004 \001(\0132\025.context.De" + "viceConfig\022G\n\031device_operational_status\030" + "\005 \001(\0162$.context.DeviceOperationalStatusE" + "num\0221\n\016device_drivers\030\006 \003(\0162\031.context.De" + "viceDriverEnum\022+\n\020device_endpoints\030\007 \003(\013" + "2\021.context.EndPoint\022&\n\ncomponents\030\010 \003(\0132" + "\022.context.Component\022(\n\rcontroller_id\030\t \001" + "(\0132\021.context.DeviceId\"\311\001\n\tComponent\022%\n\016c" + "omponent_uuid\030\001 \001(\0132\r.context.Uuid\022\014\n\004na" + "me\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\0226\n\nattributes\030\004 \003" + "(\0132\".context.Component.AttributesEntry\022\016" + "\n\006parent\030\005 \001(\t\0321\n\017AttributesEntry\022\013\n\003key" + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"9\n\014DeviceConfi" + "g\022)\n\014config_rules\030\001 \003(\0132\023.context.Config" + "Rule\"5\n\014DeviceIdList\022%\n\ndevice_ids\030\001 \003(\013" + "2\021.context.DeviceId\".\n\nDeviceList\022 \n\007dev" + "ices\030\001 \003(\0132\017.context.Device\"\216\001\n\014DeviceFi" + "lter\022)\n\ndevice_ids\030\001 \001(\0132\025.context.Devic" + "eIdList\022\031\n\021include_endpoints\030\002 \001(\010\022\034\n\024in" + "clude_config_rules\030\003 \001(\010\022\032\n\022include_comp" + "onents\030\004 \001(\010\"\200\001\n\013DeviceEvent\022\035\n\005event\030\001 " + "\001(\0132\016.context.Event\022$\n\tdevice_id\030\002 \001(\0132\021" + ".context.DeviceId\022,\n\rdevice_config\030\003 \001(\013" + "2\025.context.DeviceConfig\"*\n\006LinkId\022 \n\tlin" + "k_uuid\030\001 \001(\0132\r.context.Uuid\"I\n\016LinkAttri" + "butes\022\033\n\023total_capacity_gbps\030\001 \001(\002\022\032\n\022us" + "ed_capacity_gbps\030\002 \001(\002\"\275\001\n\004Link\022 \n\007link_" + "id\030\001 \001(\0132\017.context.LinkId\022\014\n\004name\030\002 \001(\t\022" + "(\n\tlink_type\030\003 \001(\0162\025.context.LinkTypeEnu" + "m\022.\n\021link_endpoint_ids\030\004 \003(\0132\023.context.E" + "ndPointId\022+\n\nattributes\030\005 \001(\0132\027.context." + "LinkAttributes\"/\n\nLinkIdList\022!\n\010link_ids" + "\030\001 \003(\0132\017.context.LinkId\"(\n\010LinkList\022\034\n\005l" + "inks\030\001 \003(\0132\r.context.Link\"L\n\tLinkEvent\022\035" + "\n\005event\030\001 \001(\0132\016.context.Event\022 \n\007link_id" + "\030\002 \001(\0132\017.context.LinkId\"X\n\tServiceId\022&\n\n" + "context_id\030\001 \001(\0132\022.context.ContextId\022#\n\014" + "service_uuid\030\002 \001(\0132\r.context.Uuid\"\333\002\n\007Se" + "rvice\022&\n\nservice_id\030\001 \001(\0132\022.context.Serv" + "iceId\022\014\n\004name\030\002 \001(\t\022.\n\014service_type\030\003 \001(" + "\0162\030.context.ServiceTypeEnum\0221\n\024service_e" + "ndpoint_ids\030\004 \003(\0132\023.context.EndPointId\0220" + "\n\023service_constraints\030\005 \003(\0132\023.context.Co" + "nstraint\022.\n\016service_status\030\006 \001(\0132\026.conte" + "xt.ServiceStatus\022.\n\016service_config\030\007 \001(\013" + "2\026.context.ServiceConfig\022%\n\ttimestamp\030\010 " + "\001(\0132\022.context.Timestamp\"C\n\rServiceStatus" + "\0222\n\016service_status\030\001 \001(\0162\032.context.Servi" + "ceStatusEnum\":\n\rServiceConfig\022)\n\014config_" + "rules\030\001 \003(\0132\023.context.ConfigRule\"8\n\rServ" + "iceIdList\022\'\n\013service_ids\030\001 \003(\0132\022.context" + ".ServiceId\"1\n\013ServiceList\022\"\n\010services\030\001 " + "\003(\0132\020.context.Service\"\225\001\n\rServiceFilter\022" + "+\n\013service_ids\030\001 \001(\0132\026.context.ServiceId" + "List\022\034\n\024include_endpoint_ids\030\002 \001(\010\022\033\n\023in" + "clude_constraints\030\003 \001(\010\022\034\n\024include_confi" + "g_rules\030\004 \001(\010\"U\n\014ServiceEvent\022\035\n\005event\030\001" + " \001(\0132\016.context.Event\022&\n\nservice_id\030\002 \001(\013" + "2\022.context.ServiceId\"T\n\007SliceId\022&\n\nconte" + "xt_id\030\001 \001(\0132\022.context.ContextId\022!\n\nslice" + "_uuid\030\002 \001(\0132\r.context.Uuid\"\240\003\n\005Slice\022\"\n\010" + "slice_id\030\001 \001(\0132\020.context.SliceId\022\014\n\004name" + "\030\002 \001(\t\022/\n\022slice_endpoint_ids\030\003 \003(\0132\023.con" + "text.EndPointId\022.\n\021slice_constraints\030\004 \003" + "(\0132\023.context.Constraint\022-\n\021slice_service" + "_ids\030\005 \003(\0132\022.context.ServiceId\022,\n\022slice_" + "subslice_ids\030\006 \003(\0132\020.context.SliceId\022*\n\014" + "slice_status\030\007 \001(\0132\024.context.SliceStatus" + "\022*\n\014slice_config\030\010 \001(\0132\024.context.SliceCo" + "nfig\022(\n\013slice_owner\030\t \001(\0132\023.context.Slic" + "eOwner\022%\n\ttimestamp\030\n \001(\0132\022.context.Time" + "stamp\"E\n\nSliceOwner\022!\n\nowner_uuid\030\001 \001(\0132" + "\r.context.Uuid\022\024\n\014owner_string\030\002 \001(\t\"=\n\013" + "SliceStatus\022.\n\014slice_status\030\001 \001(\0162\030.cont" + "ext.SliceStatusEnum\"8\n\013SliceConfig\022)\n\014co" + "nfig_rules\030\001 \003(\0132\023.context.ConfigRule\"2\n" + "\013SliceIdList\022#\n\tslice_ids\030\001 \003(\0132\020.contex" + "t.SliceId\"+\n\tSliceList\022\036\n\006slices\030\001 \003(\0132\016" + ".context.Slice\"\312\001\n\013SliceFilter\022\'\n\tslice_" + "ids\030\001 \001(\0132\024.context.SliceIdList\022\034\n\024inclu" + "de_endpoint_ids\030\002 \001(\010\022\033\n\023include_constra" + "ints\030\003 \001(\010\022\033\n\023include_service_ids\030\004 \001(\010\022" + "\034\n\024include_subslice_ids\030\005 \001(\010\022\034\n\024include" + "_config_rules\030\006 \001(\010\"O\n\nSliceEvent\022\035\n\005eve" + "nt\030\001 \001(\0132\016.context.Event\022\"\n\010slice_id\030\002 \001" + "(\0132\020.context.SliceId\"6\n\014ConnectionId\022&\n\017" + "connection_uuid\030\001 \001(\0132\r.context.Uuid\"2\n\025" + "ConnectionSettings_L0\022\031\n\021lsp_symbolic_na" + "me\030\001 \001(\t\"\236\001\n\025ConnectionSettings_L2\022\027\n\017sr" + "c_mac_address\030\001 \001(\t\022\027\n\017dst_mac_address\030\002" + " \001(\t\022\022\n\nether_type\030\003 \001(\r\022\017\n\007vlan_id\030\004 \001(" + "\r\022\022\n\nmpls_label\030\005 \001(\r\022\032\n\022mpls_traffic_cl" + "ass\030\006 \001(\r\"t\n\025ConnectionSettings_L3\022\026\n\016sr" + "c_ip_address\030\001 \001(\t\022\026\n\016dst_ip_address\030\002 \001" + "(\t\022\014\n\004dscp\030\003 \001(\r\022\020\n\010protocol\030\004 \001(\r\022\013\n\003tt" + "l\030\005 \001(\r\"[\n\025ConnectionSettings_L4\022\020\n\010src_" + "port\030\001 \001(\r\022\020\n\010dst_port\030\002 \001(\r\022\021\n\ttcp_flag" + "s\030\003 \001(\r\022\013\n\003ttl\030\004 \001(\r\"\304\001\n\022ConnectionSetti" + "ngs\022*\n\002l0\030\001 \001(\0132\036.context.ConnectionSett" + "ings_L0\022*\n\002l2\030\002 \001(\0132\036.context.Connection" + "Settings_L2\022*\n\002l3\030\003 \001(\0132\036.context.Connec" + "tionSettings_L3\022*\n\002l4\030\004 \001(\0132\036.context.Co" + "nnectionSettings_L4\"\363\001\n\nConnection\022,\n\rco" + "nnection_id\030\001 \001(\0132\025.context.ConnectionId" + "\022&\n\nservice_id\030\002 \001(\0132\022.context.ServiceId" + "\0223\n\026path_hops_endpoint_ids\030\003 \003(\0132\023.conte" + "xt.EndPointId\022+\n\017sub_service_ids\030\004 \003(\0132\022" + ".context.ServiceId\022-\n\010settings\030\005 \001(\0132\033.c" + "ontext.ConnectionSettings\"A\n\020ConnectionI" + "dList\022-\n\016connection_ids\030\001 \003(\0132\025.context." + "ConnectionId\":\n\016ConnectionList\022(\n\013connec" + "tions\030\001 \003(\0132\023.context.Connection\"^\n\017Conn" + "ectionEvent\022\035\n\005event\030\001 \001(\0132\016.context.Eve" + "nt\022,\n\rconnection_id\030\002 \001(\0132\025.context.Conn" + "ectionId\"\202\001\n\nEndPointId\022(\n\013topology_id\030\001" + " \001(\0132\023.context.TopologyId\022$\n\tdevice_id\030\002" + " \001(\0132\021.context.DeviceId\022$\n\rendpoint_uuid" + "\030\003 \001(\0132\r.context.Uuid\"\310\002\n\010EndPoint\022(\n\013en" + "dpoint_id\030\001 \001(\0132\023.context.EndPointId\022\014\n\004" + "name\030\002 \001(\t\022\025\n\rendpoint_type\030\003 \001(\t\0229\n\020kpi" + "_sample_types\030\004 \003(\0162\037.kpi_sample_types.K" + "piSampleType\022,\n\021endpoint_location\030\005 \001(\0132" + "\021.context.Location\0229\n\014capabilities\030\006 \003(\013" + "2#.context.EndPoint.CapabilitiesEntry\032I\n" + "\021CapabilitiesEntry\022\013\n\003key\030\001 \001(\t\022#\n\005value" + "\030\002 \001(\0132\024.google.protobuf.Any:\0028\001\"{\n\014EndP" + "ointName\022(\n\013endpoint_id\030\001 \001(\0132\023.context." + "EndPointId\022\023\n\013device_name\030\002 \001(\t\022\025\n\rendpo" + "int_name\030\003 \001(\t\022\025\n\rendpoint_type\030\004 \001(\t\";\n" + "\016EndPointIdList\022)\n\014endpoint_ids\030\001 \003(\0132\023." + "context.EndPointId\"A\n\020EndPointNameList\022-" + "\n\016endpoint_names\030\001 \003(\0132\025.context.EndPoin" + "tName\"A\n\021ConfigRule_Custom\022\024\n\014resource_k" + "ey\030\001 \001(\t\022\026\n\016resource_value\030\002 \001(\t\"]\n\016Conf" + "igRule_ACL\022(\n\013endpoint_id\030\001 \001(\0132\023.contex" + "t.EndPointId\022!\n\010rule_set\030\002 \001(\0132\017.acl.Acl" + "RuleSet\"\234\001\n\nConfigRule\022)\n\006action\030\001 \001(\0162\031" + ".context.ConfigActionEnum\022,\n\006custom\030\002 \001(" + "\0132\032.context.ConfigRule_CustomH\000\022&\n\003acl\030\003" + " \001(\0132\027.context.ConfigRule_ACLH\000B\r\n\013confi" + "g_rule\"F\n\021Constraint_Custom\022\027\n\017constrain" + "t_type\030\001 \001(\t\022\030\n\020constraint_value\030\002 \001(\t\"E" + "\n\023Constraint_Schedule\022\027\n\017start_timestamp" + "\030\001 \001(\001\022\025\n\rduration_days\030\002 \001(\002\"3\n\014GPS_Pos" + "ition\022\020\n\010latitude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001" + "(\002\"\204\001\n\010Location\022\020\n\006region\030\001 \001(\tH\000\022-\n\014gps" + "_position\030\002 \001(\0132\025.context.GPS_PositionH\000" + "\022\023\n\tinterface\030\003 \001(\tH\000\022\026\n\014circuit_pack\030\004 " + "\001(\tH\000B\n\n\010location\"l\n\033Constraint_EndPoint" + "Location\022(\n\013endpoint_id\030\001 \001(\0132\023.context." + "EndPointId\022#\n\010location\030\002 \001(\0132\021.context.L" + "ocation\"Y\n\033Constraint_EndPointPriority\022(" + "\n\013endpoint_id\030\001 \001(\0132\023.context.EndPointId" + "\022\020\n\010priority\030\002 \001(\r\"0\n\026Constraint_SLA_Lat" + "ency\022\026\n\016e2e_latency_ms\030\001 \001(\002\"0\n\027Constrai" + "nt_SLA_Capacity\022\025\n\rcapacity_gbps\030\001 \001(\002\"c" + "\n\033Constraint_SLA_Availability\022\032\n\022num_dis" + "joint_paths\030\001 \001(\r\022\022\n\nall_active\030\002 \001(\010\022\024\n" + "\014availability\030\003 \001(\002\"V\n\036Constraint_SLA_Is" + "olation_level\0224\n\017isolation_level\030\001 \003(\0162\033" + ".context.IsolationLevelEnum\"\242\001\n\025Constrai" + "nt_Exclusions\022\024\n\014is_permanent\030\001 \001(\010\022%\n\nd" + "evice_ids\030\002 \003(\0132\021.context.DeviceId\022)\n\014en" + "dpoint_ids\030\003 \003(\0132\023.context.EndPointId\022!\n" + "\010link_ids\030\004 \003(\0132\017.context.LinkId\"5\n\014QoSP" + "rofileId\022%\n\016qos_profile_id\030\001 \001(\0132\r.conte" + "xt.Uuid\"`\n\025Constraint_QoSProfile\022-\n\016qos_" + "profile_id\030\001 \001(\0132\025.context.QoSProfileId\022" + "\030\n\020qos_profile_name\030\002 \001(\t\"\222\005\n\nConstraint" + "\022-\n\006action\030\001 \001(\0162\035.context.ConstraintAct" + "ionEnum\022,\n\006custom\030\002 \001(\0132\032.context.Constr" + "aint_CustomH\000\0220\n\010schedule\030\003 \001(\0132\034.contex" + "t.Constraint_ScheduleH\000\022A\n\021endpoint_loca" + "tion\030\004 \001(\0132$.context.Constraint_EndPoint" + "LocationH\000\022A\n\021endpoint_priority\030\005 \001(\0132$." + "context.Constraint_EndPointPriorityH\000\0228\n" + "\014sla_capacity\030\006 \001(\0132 .context.Constraint" + "_SLA_CapacityH\000\0226\n\013sla_latency\030\007 \001(\0132\037.c" + "ontext.Constraint_SLA_LatencyH\000\022@\n\020sla_a" + "vailability\030\010 \001(\0132$.context.Constraint_S" + "LA_AvailabilityH\000\022@\n\rsla_isolation\030\t \001(\013" + "2\'.context.Constraint_SLA_Isolation_leve" + "lH\000\0224\n\nexclusions\030\n \001(\0132\036.context.Constr" + "aint_ExclusionsH\000\0225\n\013qos_profile\030\013 \001(\0132\036" + ".context.Constraint_QoSProfileH\000B\014\n\ncons" + "traint\"^\n\022TeraFlowController\022&\n\ncontext_" + "id\030\001 \001(\0132\022.context.ContextId\022\022\n\nip_addre" + "ss\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n\024Authentication" + "Result\022&\n\ncontext_id\030\001 \001(\0132\022.context.Con" + "textId\022\025\n\rauthenticated\030\002 \001(\010\"-\n\017Optical" + "ConfigId\022\032\n\022opticalconfig_uuid\030\001 \001(\t\"y\n\r" + "OpticalConfig\0222\n\020opticalconfig_id\030\001 \001(\0132" + "\030.context.OpticalConfigId\022\016\n\006config\030\002 \001(" + "\t\022$\n\tdevice_id\030\003 \001(\0132\021.context.DeviceId\"" + "C\n\021OpticalConfigList\022.\n\016opticalconfigs\030\001" + " \003(\0132\026.context.OpticalConfig\"g\n\022OpticalC" + "onfigEvent\022\035\n\005event\030\001 \001(\0132\016.context.Even" + "t\0222\n\020opticalconfig_id\030\002 \001(\0132\030.context.Op" + "ticalConfigId\"_\n\021OpticalEndPointId\022$\n\tde" + "vice_id\030\002 \001(\0132\021.context.DeviceId\022$\n\rendp" + "oint_uuid\030\003 \001(\0132\r.context.Uuid\">\n\017Optica" + "lLinkList\022+\n\roptical_links\030\001 \003(\0132\024.conte" + "xt.OpticalLink\"\304\003\n\022OpticalLinkDetails\022\016\n" + "\006length\030\001 \001(\002\022\020\n\010src_port\030\002 \001(\t\022\020\n\010dst_p" + "ort\030\003 \001(\t\022\027\n\017local_peer_port\030\004 \001(\t\022\030\n\020re" + "mote_peer_port\030\005 \001(\t\022\014\n\004used\030\006 \001(\010\0228\n\007c_" + "slots\030\007 \003(\0132\'.context.OpticalLinkDetails" + ".CSlotsEntry\0228\n\007l_slots\030\010 \003(\0132\'.context." + "OpticalLinkDetails.LSlotsEntry\0228\n\007s_slot" + "s\030\t \003(\0132\'.context.OpticalLinkDetails.SSl" + "otsEntry\032-\n\013CSlotsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + "value\030\002 \001(\005:\0028\001\032-\n\013LSlotsEntry\022\013\n\003key\030\001 " + "\001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\032-\n\013SSlotsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\"\243\001\n\013Optica" + "lLink\022\014\n\004name\030\001 \001(\t\0224\n\017optical_details\030\002" + " \001(\0132\033.context.OpticalLinkDetails\022 \n\007lin" + "k_id\030\003 \001(\0132\017.context.LinkId\022.\n\021link_endp" + "oint_ids\030\004 \003(\0132\023.context.EndPointId\"r\n\021S" + "erviceConfigRule\022&\n\nservice_id\030\001 \001(\0132\022.c" + "ontext.ServiceId\0225\n\021configrule_custom\030\002 " + "\001(\0132\032.context.ConfigRule_Custom*j\n\rEvent" + "TypeEnum\022\027\n\023EVENTTYPE_UNDEFINED\020\000\022\024\n\020EVE" + "NTTYPE_CREATE\020\001\022\024\n\020EVENTTYPE_UPDATE\020\002\022\024\n" + "\020EVENTTYPE_REMOVE\020\003*\351\003\n\020DeviceDriverEnum" + "\022\032\n\026DEVICEDRIVER_UNDEFINED\020\000\022\033\n\027DEVICEDR" + "IVER_OPENCONFIG\020\001\022\036\n\032DEVICEDRIVER_TRANSP" + "ORT_API\020\002\022\023\n\017DEVICEDRIVER_P4\020\003\022&\n\"DEVICE" + "DRIVER_IETF_NETWORK_TOPOLOGY\020\004\022\033\n\027DEVICE" + "DRIVER_ONF_TR_532\020\005\022\023\n\017DEVICEDRIVER_XR\020\006" + "\022\033\n\027DEVICEDRIVER_IETF_L2VPN\020\007\022 \n\034DEVICED" + "RIVER_GNMI_OPENCONFIG\020\010\022\034\n\030DEVICEDRIVER_" + "OPTICAL_TFS\020\t\022\032\n\026DEVICEDRIVER_IETF_ACTN\020" + "\n\022\023\n\017DEVICEDRIVER_OC\020\013\022\024\n\020DEVICEDRIVER_Q" + "KD\020\014\022\033\n\027DEVICEDRIVER_IETF_L3VPN\020\r\022\033\n\027DEV" + "ICEDRIVER_IETF_SLICE\020\016\022\024\n\020DEVICEDRIVER_N" + "CE\020\017\022\031\n\025DEVICEDRIVER_SMARTNIC\020\020*\217\001\n\033Devi" + "ceOperationalStatusEnum\022%\n!DEVICEOPERATI" + "ONALSTATUS_UNDEFINED\020\000\022$\n DEVICEOPERATIO" + "NALSTATUS_DISABLED\020\001\022#\n\037DEVICEOPERATIONA" + "LSTATUS_ENABLED\020\002*w\n\014LinkTypeEnum\022\024\n\020LIN" + "KTYPE_UNKNOWN\020\000\022\023\n\017LINKTYPE_COPPER\020\001\022\022\n\016" + "LINKTYPE_FIBER\020\002\022\022\n\016LINKTYPE_RADIO\020\003\022\024\n\020" + "LINKTYPE_VIRTUAL\020\004*\345\001\n\017ServiceTypeEnum\022\027" + "\n\023SERVICETYPE_UNKNOWN\020\000\022\024\n\020SERVICETYPE_L" + "3NM\020\001\022\024\n\020SERVICETYPE_L2NM\020\002\022)\n%SERVICETY" + "PE_TAPI_CONNECTIVITY_SERVICE\020\003\022\022\n\016SERVIC" + "ETYPE_TE\020\004\022\023\n\017SERVICETYPE_E2E\020\005\022$\n SERVI" + "CETYPE_OPTICAL_CONNECTIVITY\020\006\022\023\n\017SERVICE" + "TYPE_QKD\020\007*\304\001\n\021ServiceStatusEnum\022\033\n\027SERV" + "ICESTATUS_UNDEFINED\020\000\022\031\n\025SERVICESTATUS_P" + "LANNED\020\001\022\030\n\024SERVICESTATUS_ACTIVE\020\002\022\032\n\026SE" + "RVICESTATUS_UPDATING\020\003\022!\n\035SERVICESTATUS_" + "PENDING_REMOVAL\020\004\022\036\n\032SERVICESTATUS_SLA_V" + "IOLATED\020\005*\251\001\n\017SliceStatusEnum\022\031\n\025SLICEST" + "ATUS_UNDEFINED\020\000\022\027\n\023SLICESTATUS_PLANNED\020" + "\001\022\024\n\020SLICESTATUS_INIT\020\002\022\026\n\022SLICESTATUS_A" + "CTIVE\020\003\022\026\n\022SLICESTATUS_DEINIT\020\004\022\034\n\030SLICE" + "STATUS_SLA_VIOLATED\020\005*]\n\020ConfigActionEnu" + "m\022\032\n\026CONFIGACTION_UNDEFINED\020\000\022\024\n\020CONFIGA" + "CTION_SET\020\001\022\027\n\023CONFIGACTION_DELETE\020\002*m\n\024" + "ConstraintActionEnum\022\036\n\032CONSTRAINTACTION" + "_UNDEFINED\020\000\022\030\n\024CONSTRAINTACTION_SET\020\001\022\033" + "\n\027CONSTRAINTACTION_DELETE\020\002*\203\002\n\022Isolatio" + "nLevelEnum\022\020\n\014NO_ISOLATION\020\000\022\026\n\022PHYSICAL" + "_ISOLATION\020\001\022\025\n\021LOGICAL_ISOLATION\020\002\022\025\n\021P" + "ROCESS_ISOLATION\020\003\022\035\n\031PHYSICAL_MEMORY_IS" + "OLATION\020\004\022\036\n\032PHYSICAL_NETWORK_ISOLATION\020" + "\005\022\036\n\032VIRTUAL_RESOURCE_ISOLATION\020\006\022\037\n\033NET" + "WORK_FUNCTIONS_ISOLATION\020\007\022\025\n\021SERVICE_IS" + "OLATION\020\0102\202\034\n\016ContextService\022:\n\016ListCont" + "extIds\022\016.context.Empty\032\026.context.Context" + "IdList\"\000\0226\n\014ListContexts\022\016.context.Empty" + "\032\024.context.ContextList\"\000\0224\n\nGetContext\022\022" + ".context.ContextId\032\020.context.Context\"\000\0224" + "\n\nSetContext\022\020.context.Context\032\022.context" + ".ContextId\"\000\0225\n\rRemoveContext\022\022.context." + "ContextId\032\016.context.Empty\"\000\022=\n\020GetContex" + "tEvents\022\016.context.Empty\032\025.context.Contex" + "tEvent\"\0000\001\022@\n\017ListTopologyIds\022\022.context." + "ContextId\032\027.context.TopologyIdList\"\000\022=\n\016" + "ListTopologies\022\022.context.ContextId\032\025.con" + "text.TopologyList\"\000\0227\n\013GetTopology\022\023.con" + "text.TopologyId\032\021.context.Topology\"\000\022E\n\022" + "GetTopologyDetails\022\023.context.TopologyId\032" + "\030.context.TopologyDetails\"\000\0227\n\013SetTopolo" + "gy\022\021.context.Topology\032\023.context.Topology" + "Id\"\000\0227\n\016RemoveTopology\022\023.context.Topolog" + "yId\032\016.context.Empty\"\000\022?\n\021GetTopologyEven" + "ts\022\016.context.Empty\032\026.context.TopologyEve" + "nt\"\0000\001\0228\n\rListDeviceIds\022\016.context.Empty\032" + "\025.context.DeviceIdList\"\000\0224\n\013ListDevices\022" + "\016.context.Empty\032\023.context.DeviceList\"\000\0221" + "\n\tGetDevice\022\021.context.DeviceId\032\017.context" + ".Device\"\000\0221\n\tSetDevice\022\017.context.Device\032" + "\021.context.DeviceId\"\000\0223\n\014RemoveDevice\022\021.c" + "ontext.DeviceId\032\016.context.Empty\"\000\022;\n\017Get" + "DeviceEvents\022\016.context.Empty\032\024.context.D" + "eviceEvent\"\0000\001\022<\n\014SelectDevice\022\025.context" + ".DeviceFilter\032\023.context.DeviceList\"\000\022I\n\021" + "ListEndPointNames\022\027.context.EndPointIdLi" + "st\032\031.context.EndPointNameList\"\000\0224\n\013ListL" + "inkIds\022\016.context.Empty\032\023.context.LinkIdL" + "ist\"\000\0220\n\tListLinks\022\016.context.Empty\032\021.con" + "text.LinkList\"\000\022+\n\007GetLink\022\017.context.Lin" + "kId\032\r.context.Link\"\000\022+\n\007SetLink\022\r.contex" + "t.Link\032\017.context.LinkId\"\000\022/\n\nRemoveLink\022" + "\017.context.LinkId\032\016.context.Empty\"\000\0227\n\rGe" + "tLinkEvents\022\016.context.Empty\032\022.context.Li" + "nkEvent\"\0000\001\022>\n\016ListServiceIds\022\022.context." + "ContextId\032\026.context.ServiceIdList\"\000\022:\n\014L" + "istServices\022\022.context.ContextId\032\024.contex" + "t.ServiceList\"\000\0224\n\nGetService\022\022.context." + "ServiceId\032\020.context.Service\"\000\0224\n\nSetServ" + "ice\022\020.context.Service\032\022.context.ServiceI" + "d\"\000\0226\n\014UnsetService\022\020.context.Service\032\022." + "context.ServiceId\"\000\0225\n\rRemoveService\022\022.c" + "ontext.ServiceId\032\016.context.Empty\"\000\022=\n\020Ge" + "tServiceEvents\022\016.context.Empty\032\025.context" + ".ServiceEvent\"\0000\001\022?\n\rSelectService\022\026.con" + "text.ServiceFilter\032\024.context.ServiceList" + "\"\000\022:\n\014ListSliceIds\022\022.context.ContextId\032\024" + ".context.SliceIdList\"\000\0226\n\nListSlices\022\022.c" + "ontext.ContextId\032\022.context.SliceList\"\000\022." + "\n\010GetSlice\022\020.context.SliceId\032\016.context.S" + "lice\"\000\022.\n\010SetSlice\022\016.context.Slice\032\020.con" + "text.SliceId\"\000\0220\n\nUnsetSlice\022\016.context.S" + "lice\032\020.context.SliceId\"\000\0221\n\013RemoveSlice\022" + "\020.context.SliceId\032\016.context.Empty\"\000\0229\n\016G" + "etSliceEvents\022\016.context.Empty\032\023.context." + "SliceEvent\"\0000\001\0229\n\013SelectSlice\022\024.context." + "SliceFilter\032\022.context.SliceList\"\000\022D\n\021Lis" + "tConnectionIds\022\022.context.ServiceId\032\031.con" + "text.ConnectionIdList\"\000\022@\n\017ListConnectio" + "ns\022\022.context.ServiceId\032\027.context.Connect" + "ionList\"\000\022=\n\rGetConnection\022\025.context.Con" + "nectionId\032\023.context.Connection\"\000\022=\n\rSetC" + "onnection\022\023.context.Connection\032\025.context" + ".ConnectionId\"\000\022;\n\020RemoveConnection\022\025.co" + "ntext.ConnectionId\032\016.context.Empty\"\000\022C\n\023" + "GetConnectionEvents\022\016.context.Empty\032\030.co" + "ntext.ConnectionEvent\"\0000\001\022@\n\020GetOpticalC" + "onfig\022\016.context.Empty\032\032.context.OpticalC" + "onfigList\"\000\022F\n\020SetOpticalConfig\022\026.contex" + "t.OpticalConfig\032\030.context.OpticalConfigI" + "d\"\000\022I\n\023UpdateOpticalConfig\022\026.context.Opt" + "icalConfig\032\030.context.OpticalConfigId\"\000\022I" + "\n\023SelectOpticalConfig\022\030.context.OpticalC" + "onfigId\032\026.context.OpticalConfig\"\000\022A\n\023Del" + "eteOpticalConfig\022\030.context.OpticalConfig" + "Id\032\016.context.Empty\"\000\022@\n\024DeleteOpticalCha" + "nnel\022\026.context.OpticalConfig\032\016.context.E" + "mpty\"\000\0228\n\016SetOpticalLink\022\024.context.Optic" + "alLink\032\016.context.Empty\"\000\0229\n\016GetOpticalLi" + "nk\022\017.context.LinkId\032\024.context.OpticalLin" + "k\"\000\0226\n\021DeleteOpticalLink\022\017.context.LinkI" + "d\032\016.context.Empty\"\000\022@\n\022GetOpticalLinkLis" + "t\022\016.context.Empty\032\030.context.OpticalLinkL" + "ist\"\000\022G\n\027DeleteServiceConfigRule\022\032.conte" + "xt.ServiceConfigRule\032\016.context.Empty\"\000b\006" + "proto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.AnyProto.getDescriptor(), acl.Acl.getDescriptor(), kpi_sample_types.KpiSampleTypes.getDescriptor() }); internal_static_context_Empty_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_context_Empty_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Empty_descriptor, new java.lang.String[] {}); internal_static_context_Uuid_descriptor = getDescriptor().getMessageTypes().get(1); @@ -79774,9 +81163,9 @@ public final class ContextOuterClass { internal_static_context_TopologyId_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_context_TopologyId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyId_descriptor, new java.lang.String[] { "ContextId", "TopologyUuid" }); internal_static_context_Topology_descriptor = getDescriptor().getMessageTypes().get(10); - internal_static_context_Topology_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Topology_descriptor, new java.lang.String[] { "TopologyId", "Name", "DeviceIds", "LinkIds" }); + internal_static_context_Topology_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Topology_descriptor, new java.lang.String[] { "TopologyId", "Name", "DeviceIds", "LinkIds", "OpticalLinkIds" }); internal_static_context_TopologyDetails_descriptor = getDescriptor().getMessageTypes().get(11); - internal_static_context_TopologyDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyDetails_descriptor, new java.lang.String[] { "TopologyId", "Name", "Devices", "Links" }); + internal_static_context_TopologyDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyDetails_descriptor, new java.lang.String[] { "TopologyId", "Name", "Devices", "Links", "OpticalLinks" }); internal_static_context_TopologyIdList_descriptor = getDescriptor().getMessageTypes().get(12); internal_static_context_TopologyIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyIdList_descriptor, new java.lang.String[] { "TopologyIds" }); internal_static_context_TopologyList_descriptor = getDescriptor().getMessageTypes().get(13); @@ -79806,7 +81195,7 @@ public final class ContextOuterClass { internal_static_context_LinkAttributes_descriptor = getDescriptor().getMessageTypes().get(24); internal_static_context_LinkAttributes_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkAttributes_descriptor, new java.lang.String[] { "TotalCapacityGbps", "UsedCapacityGbps" }); internal_static_context_Link_descriptor = getDescriptor().getMessageTypes().get(25); - internal_static_context_Link_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Link_descriptor, new java.lang.String[] { "LinkId", "Name", "LinkEndpointIds", "Attributes" }); + internal_static_context_Link_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Link_descriptor, new java.lang.String[] { "LinkId", "Name", "LinkType", "LinkEndpointIds", "Attributes" }); internal_static_context_LinkIdList_descriptor = getDescriptor().getMessageTypes().get(26); internal_static_context_LinkIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkIdList_descriptor, new java.lang.String[] { "LinkIds" }); internal_static_context_LinkList_descriptor = getDescriptor().getMessageTypes().get(27); @@ -79870,7 +81259,9 @@ public final class ContextOuterClass { internal_static_context_EndPointId_descriptor = getDescriptor().getMessageTypes().get(56); internal_static_context_EndPointId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPointId_descriptor, new java.lang.String[] { "TopologyId", "DeviceId", "EndpointUuid" }); internal_static_context_EndPoint_descriptor = getDescriptor().getMessageTypes().get(57); - internal_static_context_EndPoint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPoint_descriptor, new java.lang.String[] { "EndpointId", "Name", "EndpointType", "KpiSampleTypes", "EndpointLocation" }); + internal_static_context_EndPoint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPoint_descriptor, new java.lang.String[] { "EndpointId", "Name", "EndpointType", "KpiSampleTypes", "EndpointLocation", "Capabilities" }); + internal_static_context_EndPoint_CapabilitiesEntry_descriptor = internal_static_context_EndPoint_descriptor.getNestedTypes().get(0); + internal_static_context_EndPoint_CapabilitiesEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPoint_CapabilitiesEntry_descriptor, new java.lang.String[] { "Key", "Value" }); internal_static_context_EndPointName_descriptor = getDescriptor().getMessageTypes().get(58); internal_static_context_EndPointName_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPointName_descriptor, new java.lang.String[] { "EndpointId", "DeviceName", "EndpointName", "EndpointType" }); internal_static_context_EndPointIdList_descriptor = getDescriptor().getMessageTypes().get(59); @@ -79890,7 +81281,7 @@ public final class ContextOuterClass { internal_static_context_GPS_Position_descriptor = getDescriptor().getMessageTypes().get(66); internal_static_context_GPS_Position_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_GPS_Position_descriptor, new java.lang.String[] { "Latitude", "Longitude" }); internal_static_context_Location_descriptor = getDescriptor().getMessageTypes().get(67); - internal_static_context_Location_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Location_descriptor, new java.lang.String[] { "Region", "GpsPosition", "Location" }); + internal_static_context_Location_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Location_descriptor, new java.lang.String[] { "Region", "GpsPosition", "Interface", "CircuitPack", "Location" }); internal_static_context_Constraint_EndPointLocation_descriptor = getDescriptor().getMessageTypes().get(68); internal_static_context_Constraint_EndPointLocation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_EndPointLocation_descriptor, new java.lang.String[] { "EndpointId", "Location" }); internal_static_context_Constraint_EndPointPriority_descriptor = getDescriptor().getMessageTypes().get(69); @@ -79905,28 +81296,41 @@ public final class ContextOuterClass { internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_SLA_Isolation_level_descriptor, new java.lang.String[] { "IsolationLevel" }); internal_static_context_Constraint_Exclusions_descriptor = getDescriptor().getMessageTypes().get(74); internal_static_context_Constraint_Exclusions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_Exclusions_descriptor, new java.lang.String[] { "IsPermanent", "DeviceIds", "EndpointIds", "LinkIds" }); - internal_static_context_Constraint_descriptor = getDescriptor().getMessageTypes().get(75); - internal_static_context_Constraint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_descriptor, new java.lang.String[] { "Action", "Custom", "Schedule", "EndpointLocation", "EndpointPriority", "SlaCapacity", "SlaLatency", "SlaAvailability", "SlaIsolation", "Exclusions", "Constraint" }); - internal_static_context_TeraFlowController_descriptor = getDescriptor().getMessageTypes().get(76); + internal_static_context_QoSProfileId_descriptor = getDescriptor().getMessageTypes().get(75); + internal_static_context_QoSProfileId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_QoSProfileId_descriptor, new java.lang.String[] { "QosProfileId" }); + internal_static_context_Constraint_QoSProfile_descriptor = getDescriptor().getMessageTypes().get(76); + internal_static_context_Constraint_QoSProfile_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_QoSProfile_descriptor, new java.lang.String[] { "QosProfileId", "QosProfileName" }); + internal_static_context_Constraint_descriptor = getDescriptor().getMessageTypes().get(77); + internal_static_context_Constraint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_descriptor, new java.lang.String[] { "Action", "Custom", "Schedule", "EndpointLocation", "EndpointPriority", "SlaCapacity", "SlaLatency", "SlaAvailability", "SlaIsolation", "Exclusions", "QosProfile", "Constraint" }); + internal_static_context_TeraFlowController_descriptor = getDescriptor().getMessageTypes().get(78); internal_static_context_TeraFlowController_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TeraFlowController_descriptor, new java.lang.String[] { "ContextId", "IpAddress", "Port" }); - internal_static_context_AuthenticationResult_descriptor = getDescriptor().getMessageTypes().get(77); + internal_static_context_AuthenticationResult_descriptor = getDescriptor().getMessageTypes().get(79); internal_static_context_AuthenticationResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_AuthenticationResult_descriptor, new java.lang.String[] { "ContextId", "Authenticated" }); - internal_static_context_OpticalConfigId_descriptor = getDescriptor().getMessageTypes().get(78); + internal_static_context_OpticalConfigId_descriptor = getDescriptor().getMessageTypes().get(80); internal_static_context_OpticalConfigId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfigId_descriptor, new java.lang.String[] { "OpticalconfigUuid" }); - internal_static_context_OpticalConfig_descriptor = getDescriptor().getMessageTypes().get(79); - internal_static_context_OpticalConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfig_descriptor, new java.lang.String[] { "OpticalconfigId", "Config" }); - internal_static_context_OpticalConfigList_descriptor = getDescriptor().getMessageTypes().get(80); + internal_static_context_OpticalConfig_descriptor = getDescriptor().getMessageTypes().get(81); + internal_static_context_OpticalConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfig_descriptor, new java.lang.String[] { "OpticalconfigId", "Config", "DeviceId" }); + internal_static_context_OpticalConfigList_descriptor = getDescriptor().getMessageTypes().get(82); internal_static_context_OpticalConfigList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfigList_descriptor, new java.lang.String[] { "Opticalconfigs" }); - internal_static_context_OpticalLinkId_descriptor = getDescriptor().getMessageTypes().get(81); - internal_static_context_OpticalLinkId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkId_descriptor, new java.lang.String[] { "OpticalLinkUuid" }); - internal_static_context_FiberId_descriptor = getDescriptor().getMessageTypes().get(82); - internal_static_context_FiberId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_FiberId_descriptor, new java.lang.String[] { "FiberUuid" }); - internal_static_context_Fiber_descriptor = getDescriptor().getMessageTypes().get(83); - internal_static_context_Fiber_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Fiber_descriptor, new java.lang.String[] { "ID", "SrcPort", "DstPort", "LocalPeerPort", "RemotePeerPort", "CSlots", "LSlots", "SSlots", "Length", "Used", "FiberUuid" }); - internal_static_context_OpticalLinkDetails_descriptor = getDescriptor().getMessageTypes().get(84); - internal_static_context_OpticalLinkDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkDetails_descriptor, new java.lang.String[] { "Length", "Source", "Target", "Fibers" }); - internal_static_context_OpticalLink_descriptor = getDescriptor().getMessageTypes().get(85); - internal_static_context_OpticalLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLink_descriptor, new java.lang.String[] { "Name", "Details", "OpticalLinkUuid" }); + internal_static_context_OpticalConfigEvent_descriptor = getDescriptor().getMessageTypes().get(83); + internal_static_context_OpticalConfigEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfigEvent_descriptor, new java.lang.String[] { "Event", "OpticalconfigId" }); + internal_static_context_OpticalEndPointId_descriptor = getDescriptor().getMessageTypes().get(84); + internal_static_context_OpticalEndPointId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalEndPointId_descriptor, new java.lang.String[] { "DeviceId", "EndpointUuid" }); + internal_static_context_OpticalLinkList_descriptor = getDescriptor().getMessageTypes().get(85); + internal_static_context_OpticalLinkList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkList_descriptor, new java.lang.String[] { "OpticalLinks" }); + internal_static_context_OpticalLinkDetails_descriptor = getDescriptor().getMessageTypes().get(86); + internal_static_context_OpticalLinkDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkDetails_descriptor, new java.lang.String[] { "Length", "SrcPort", "DstPort", "LocalPeerPort", "RemotePeerPort", "Used", "CSlots", "LSlots", "SSlots" }); + internal_static_context_OpticalLinkDetails_CSlotsEntry_descriptor = internal_static_context_OpticalLinkDetails_descriptor.getNestedTypes().get(0); + internal_static_context_OpticalLinkDetails_CSlotsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkDetails_CSlotsEntry_descriptor, new java.lang.String[] { "Key", "Value" }); + internal_static_context_OpticalLinkDetails_LSlotsEntry_descriptor = internal_static_context_OpticalLinkDetails_descriptor.getNestedTypes().get(1); + internal_static_context_OpticalLinkDetails_LSlotsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkDetails_LSlotsEntry_descriptor, new java.lang.String[] { "Key", "Value" }); + internal_static_context_OpticalLinkDetails_SSlotsEntry_descriptor = internal_static_context_OpticalLinkDetails_descriptor.getNestedTypes().get(2); + internal_static_context_OpticalLinkDetails_SSlotsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkDetails_SSlotsEntry_descriptor, new java.lang.String[] { "Key", "Value" }); + internal_static_context_OpticalLink_descriptor = getDescriptor().getMessageTypes().get(87); + internal_static_context_OpticalLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLink_descriptor, new java.lang.String[] { "Name", "OpticalDetails", "LinkId", "LinkEndpointIds" }); + internal_static_context_ServiceConfigRule_descriptor = getDescriptor().getMessageTypes().get(88); + internal_static_context_ServiceConfigRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceConfigRule_descriptor, new java.lang.String[] { "ServiceId", "ConfigruleCustom" }); + com.google.protobuf.AnyProto.getDescriptor(); acl.Acl.getDescriptor(); kpi_sample_types.KpiSampleTypes.getDescriptor(); } diff --git a/src/ztp/target/generated-sources/grpc/context/ContextService.java b/src/ztp/target/generated-sources/grpc/context/ContextService.java index 32544e6be..d953e779f 100644 --- a/src/ztp/target/generated-sources/grpc/context/ContextService.java +++ b/src/ztp/target/generated-sources/grpc/context/ContextService.java @@ -98,13 +98,23 @@ public interface ContextService extends MutinyService { io.smallrye.mutiny.Uni setOpticalConfig(context.ContextOuterClass.OpticalConfig request); + io.smallrye.mutiny.Uni updateOpticalConfig(context.ContextOuterClass.OpticalConfig request); + io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request); + io.smallrye.mutiny.Uni deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request); + + io.smallrye.mutiny.Uni deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request); + io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request); - io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request); + io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.LinkId request); + + io.smallrye.mutiny.Uni deleteOpticalLink(context.ContextOuterClass.LinkId request); + + io.smallrye.mutiny.Uni getOpticalLinkList(context.ContextOuterClass.Empty request); - io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request); + io.smallrye.mutiny.Uni deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request); io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request); diff --git a/src/ztp/target/generated-sources/grpc/context/ContextServiceBean.java b/src/ztp/target/generated-sources/grpc/context/ContextServiceBean.java index d3c1b6285..3809f8afb 100644 --- a/src/ztp/target/generated-sources/grpc/context/ContextServiceBean.java +++ b/src/ztp/target/generated-sources/grpc/context/ContextServiceBean.java @@ -409,6 +409,15 @@ public class ContextServiceBean extends MutinyContextServiceGrpc.ContextServiceI } } + @Override + public io.smallrye.mutiny.Uni updateOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + try { + return delegate.updateOpticalConfig(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + @Override public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { try { @@ -418,6 +427,24 @@ public class ContextServiceBean extends MutinyContextServiceGrpc.ContextServiceI } } + @Override + public io.smallrye.mutiny.Uni deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + try { + return delegate.deleteOpticalConfig(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request) { + try { + return delegate.deleteOpticalChannel(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + @Override public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { try { @@ -428,7 +455,7 @@ public class ContextServiceBean extends MutinyContextServiceGrpc.ContextServiceI } @Override - public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.LinkId request) { try { return delegate.getOpticalLink(request); } catch (UnsupportedOperationException e) { @@ -437,9 +464,27 @@ public class ContextServiceBean extends MutinyContextServiceGrpc.ContextServiceI } @Override - public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { + public io.smallrye.mutiny.Uni deleteOpticalLink(context.ContextOuterClass.LinkId request) { + try { + return delegate.deleteOpticalLink(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni getOpticalLinkList(context.ContextOuterClass.Empty request) { + try { + return delegate.getOpticalLinkList(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request) { try { - return delegate.getFiber(request); + return delegate.deleteServiceConfigRule(request); } catch (UnsupportedOperationException e) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } diff --git a/src/ztp/target/generated-sources/grpc/context/ContextServiceClient.java b/src/ztp/target/generated-sources/grpc/context/ContextServiceClient.java index b1773578d..00e56c4f4 100644 --- a/src/ztp/target/generated-sources/grpc/context/ContextServiceClient.java +++ b/src/ztp/target/generated-sources/grpc/context/ContextServiceClient.java @@ -245,24 +245,49 @@ public class ContextServiceClient implements ContextService, MutinyClient updateOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return stub.updateOpticalConfig(request); + } + @Override public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { return stub.selectOpticalConfig(request); } + @Override + public io.smallrye.mutiny.Uni deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return stub.deleteOpticalConfig(request); + } + + @Override + public io.smallrye.mutiny.Uni deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request) { + return stub.deleteOpticalChannel(request); + } + @Override public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { return stub.setOpticalLink(request); } @Override - public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.LinkId request) { return stub.getOpticalLink(request); } @Override - public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { - return stub.getFiber(request); + public io.smallrye.mutiny.Uni deleteOpticalLink(context.ContextOuterClass.LinkId request) { + return stub.deleteOpticalLink(request); + } + + @Override + public io.smallrye.mutiny.Uni getOpticalLinkList(context.ContextOuterClass.Empty request) { + return stub.getOpticalLinkList(request); + } + + @Override + public io.smallrye.mutiny.Uni deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request) { + return stub.deleteServiceConfigRule(request); } @Override diff --git a/src/ztp/target/generated-sources/grpc/context/ContextServiceGrpc.java b/src/ztp/target/generated-sources/grpc/context/ContextServiceGrpc.java index a03f7e949..73a440e7a 100644 --- a/src/ztp/target/generated-sources/grpc/context/ContextServiceGrpc.java +++ b/src/ztp/target/generated-sources/grpc/context/ContextServiceGrpc.java @@ -4,7 +4,8 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.38.1)", comments = "Source: context.proto") +@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.55.1)", comments = "Source: context.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class ContextServiceGrpc { private ContextServiceGrpc() { @@ -778,6 +779,21 @@ public final class ContextServiceGrpc { return getSetOpticalConfigMethod; } + private static volatile io.grpc.MethodDescriptor getUpdateOpticalConfigMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "UpdateOpticalConfig", requestType = context.ContextOuterClass.OpticalConfig.class, responseType = context.ContextOuterClass.OpticalConfigId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateOpticalConfigMethod() { + io.grpc.MethodDescriptor getUpdateOpticalConfigMethod; + if ((getUpdateOpticalConfigMethod = ContextServiceGrpc.getUpdateOpticalConfigMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getUpdateOpticalConfigMethod = ContextServiceGrpc.getUpdateOpticalConfigMethod) == null) { + ContextServiceGrpc.getUpdateOpticalConfigMethod = getUpdateOpticalConfigMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateOpticalConfig")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfig.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfigId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("UpdateOpticalConfig")).build(); + } + } + } + return getUpdateOpticalConfigMethod; + } + private static volatile io.grpc.MethodDescriptor getSelectOpticalConfigMethod; @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SelectOpticalConfig", requestType = context.ContextOuterClass.OpticalConfigId.class, responseType = context.ContextOuterClass.OpticalConfig.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) @@ -793,6 +809,36 @@ public final class ContextServiceGrpc { return getSelectOpticalConfigMethod; } + private static volatile io.grpc.MethodDescriptor getDeleteOpticalConfigMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteOpticalConfig", requestType = context.ContextOuterClass.OpticalConfigId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteOpticalConfigMethod() { + io.grpc.MethodDescriptor getDeleteOpticalConfigMethod; + if ((getDeleteOpticalConfigMethod = ContextServiceGrpc.getDeleteOpticalConfigMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getDeleteOpticalConfigMethod = ContextServiceGrpc.getDeleteOpticalConfigMethod) == null) { + ContextServiceGrpc.getDeleteOpticalConfigMethod = getDeleteOpticalConfigMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteOpticalConfig")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfigId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("DeleteOpticalConfig")).build(); + } + } + } + return getDeleteOpticalConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteOpticalChannelMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteOpticalChannel", requestType = context.ContextOuterClass.OpticalConfig.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteOpticalChannelMethod() { + io.grpc.MethodDescriptor getDeleteOpticalChannelMethod; + if ((getDeleteOpticalChannelMethod = ContextServiceGrpc.getDeleteOpticalChannelMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getDeleteOpticalChannelMethod = ContextServiceGrpc.getDeleteOpticalChannelMethod) == null) { + ContextServiceGrpc.getDeleteOpticalChannelMethod = getDeleteOpticalChannelMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteOpticalChannel")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfig.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("DeleteOpticalChannel")).build(); + } + } + } + return getDeleteOpticalChannelMethod; + } + private static volatile io.grpc.MethodDescriptor getSetOpticalLinkMethod; @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetOpticalLink", requestType = context.ContextOuterClass.OpticalLink.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) @@ -808,34 +854,64 @@ public final class ContextServiceGrpc { return getSetOpticalLinkMethod; } - private static volatile io.grpc.MethodDescriptor getGetOpticalLinkMethod; + private static volatile io.grpc.MethodDescriptor getGetOpticalLinkMethod; - @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetOpticalLink", requestType = context.ContextOuterClass.OpticalLinkId.class, responseType = context.ContextOuterClass.OpticalLink.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetOpticalLinkMethod() { - io.grpc.MethodDescriptor getGetOpticalLinkMethod; + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetOpticalLink", requestType = context.ContextOuterClass.LinkId.class, responseType = context.ContextOuterClass.OpticalLink.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetOpticalLinkMethod() { + io.grpc.MethodDescriptor getGetOpticalLinkMethod; if ((getGetOpticalLinkMethod = ContextServiceGrpc.getGetOpticalLinkMethod) == null) { synchronized (ContextServiceGrpc.class) { if ((getGetOpticalLinkMethod = ContextServiceGrpc.getGetOpticalLinkMethod) == null) { - ContextServiceGrpc.getGetOpticalLinkMethod = getGetOpticalLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOpticalLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLinkId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLink.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetOpticalLink")).build(); + ContextServiceGrpc.getGetOpticalLinkMethod = getGetOpticalLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOpticalLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLink.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetOpticalLink")).build(); } } } return getGetOpticalLinkMethod; } - private static volatile io.grpc.MethodDescriptor getGetFiberMethod; + private static volatile io.grpc.MethodDescriptor getDeleteOpticalLinkMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteOpticalLink", requestType = context.ContextOuterClass.LinkId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteOpticalLinkMethod() { + io.grpc.MethodDescriptor getDeleteOpticalLinkMethod; + if ((getDeleteOpticalLinkMethod = ContextServiceGrpc.getDeleteOpticalLinkMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getDeleteOpticalLinkMethod = ContextServiceGrpc.getDeleteOpticalLinkMethod) == null) { + ContextServiceGrpc.getDeleteOpticalLinkMethod = getDeleteOpticalLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteOpticalLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("DeleteOpticalLink")).build(); + } + } + } + return getDeleteOpticalLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetOpticalLinkListMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetOpticalLinkList", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.OpticalLinkList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetOpticalLinkListMethod() { + io.grpc.MethodDescriptor getGetOpticalLinkListMethod; + if ((getGetOpticalLinkListMethod = ContextServiceGrpc.getGetOpticalLinkListMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetOpticalLinkListMethod = ContextServiceGrpc.getGetOpticalLinkListMethod) == null) { + ContextServiceGrpc.getGetOpticalLinkListMethod = getGetOpticalLinkListMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOpticalLinkList")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLinkList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetOpticalLinkList")).build(); + } + } + } + return getGetOpticalLinkListMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteServiceConfigRuleMethod; - @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetFiber", requestType = context.ContextOuterClass.FiberId.class, responseType = context.ContextOuterClass.Fiber.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetFiberMethod() { - io.grpc.MethodDescriptor getGetFiberMethod; - if ((getGetFiberMethod = ContextServiceGrpc.getGetFiberMethod) == null) { + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteServiceConfigRule", requestType = context.ContextOuterClass.ServiceConfigRule.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteServiceConfigRuleMethod() { + io.grpc.MethodDescriptor getDeleteServiceConfigRuleMethod; + if ((getDeleteServiceConfigRuleMethod = ContextServiceGrpc.getDeleteServiceConfigRuleMethod) == null) { synchronized (ContextServiceGrpc.class) { - if ((getGetFiberMethod = ContextServiceGrpc.getGetFiberMethod) == null) { - ContextServiceGrpc.getGetFiberMethod = getGetFiberMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFiber")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.FiberId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Fiber.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetFiber")).build(); + if ((getDeleteServiceConfigRuleMethod = ContextServiceGrpc.getDeleteServiceConfigRuleMethod) == null) { + ContextServiceGrpc.getDeleteServiceConfigRuleMethod = getDeleteServiceConfigRuleMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteServiceConfigRule")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceConfigRule.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("DeleteServiceConfigRule")).build(); } } } - return getGetFiberMethod; + return getDeleteServiceConfigRuleMethod; } /** @@ -882,299 +958,299 @@ public final class ContextServiceGrpc { /** */ - public static abstract class ContextServiceImplBase implements io.grpc.BindableService { + public interface AsyncService { /** */ - public void listContextIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void listContextIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListContextIdsMethod(), responseObserver); } /** */ - public void listContexts(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void listContexts(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListContextsMethod(), responseObserver); } /** */ - public void getContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + default void getContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextMethod(), responseObserver); } /** */ - public void setContext(context.ContextOuterClass.Context request, io.grpc.stub.StreamObserver responseObserver) { + default void setContext(context.ContextOuterClass.Context request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetContextMethod(), responseObserver); } /** */ - public void removeContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + default void removeContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveContextMethod(), responseObserver); } /** */ - public void getContextEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void getContextEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextEventsMethod(), responseObserver); } /** */ - public void listTopologyIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + default void listTopologyIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopologyIdsMethod(), responseObserver); } /** */ - public void listTopologies(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + default void listTopologies(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopologiesMethod(), responseObserver); } /** */ - public void getTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + default void getTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyMethod(), responseObserver); } /** */ - public void getTopologyDetails(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + default void getTopologyDetails(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyDetailsMethod(), responseObserver); } /** */ - public void setTopology(context.ContextOuterClass.Topology request, io.grpc.stub.StreamObserver responseObserver) { + default void setTopology(context.ContextOuterClass.Topology request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetTopologyMethod(), responseObserver); } /** */ - public void removeTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + default void removeTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveTopologyMethod(), responseObserver); } /** */ - public void getTopologyEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void getTopologyEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyEventsMethod(), responseObserver); } /** */ - public void listDeviceIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void listDeviceIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDeviceIdsMethod(), responseObserver); } /** */ - public void listDevices(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void listDevices(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDevicesMethod(), responseObserver); } /** */ - public void getDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + default void getDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeviceMethod(), responseObserver); } /** */ - public void setDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + default void setDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetDeviceMethod(), responseObserver); } /** */ - public void removeDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + default void removeDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveDeviceMethod(), responseObserver); } /** */ - public void getDeviceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void getDeviceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeviceEventsMethod(), responseObserver); } /** */ - public void selectDevice(context.ContextOuterClass.DeviceFilter request, io.grpc.stub.StreamObserver responseObserver) { + default void selectDevice(context.ContextOuterClass.DeviceFilter request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectDeviceMethod(), responseObserver); } /** */ - public void listEndPointNames(context.ContextOuterClass.EndPointIdList request, io.grpc.stub.StreamObserver responseObserver) { + default void listEndPointNames(context.ContextOuterClass.EndPointIdList request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListEndPointNamesMethod(), responseObserver); } /** */ - public void listLinkIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void listLinkIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLinkIdsMethod(), responseObserver); } /** */ - public void listLinks(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void listLinks(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLinksMethod(), responseObserver); } /** */ - public void getLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + default void getLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLinkMethod(), responseObserver); } /** */ - public void setLink(context.ContextOuterClass.Link request, io.grpc.stub.StreamObserver responseObserver) { + default void setLink(context.ContextOuterClass.Link request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetLinkMethod(), responseObserver); } /** */ - public void removeLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + default void removeLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveLinkMethod(), responseObserver); } /** */ - public void getLinkEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void getLinkEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLinkEventsMethod(), responseObserver); } /** */ - public void listServiceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + default void listServiceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServiceIdsMethod(), responseObserver); } /** */ - public void listServices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + default void listServices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServicesMethod(), responseObserver); } /** */ - public void getService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + default void getService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); } /** */ - public void setService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + default void setService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetServiceMethod(), responseObserver); } /** */ - public void unsetService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + default void unsetService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetServiceMethod(), responseObserver); } /** */ - public void removeService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + default void removeService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveServiceMethod(), responseObserver); } /** */ - public void getServiceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void getServiceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceEventsMethod(), responseObserver); } /** */ - public void selectService(context.ContextOuterClass.ServiceFilter request, io.grpc.stub.StreamObserver responseObserver) { + default void selectService(context.ContextOuterClass.ServiceFilter request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectServiceMethod(), responseObserver); } /** */ - public void listSliceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + default void listSliceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSliceIdsMethod(), responseObserver); } /** */ - public void listSlices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + default void listSlices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSlicesMethod(), responseObserver); } /** */ - public void getSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver responseObserver) { + default void getSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSliceMethod(), responseObserver); } /** */ - public void setSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver responseObserver) { + default void setSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetSliceMethod(), responseObserver); } /** */ - public void unsetSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver responseObserver) { + default void unsetSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetSliceMethod(), responseObserver); } /** */ - public void removeSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver responseObserver) { + default void removeSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveSliceMethod(), responseObserver); } /** */ - public void getSliceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void getSliceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSliceEventsMethod(), responseObserver); } /** */ - public void selectSlice(context.ContextOuterClass.SliceFilter request, io.grpc.stub.StreamObserver responseObserver) { + default void selectSlice(context.ContextOuterClass.SliceFilter request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectSliceMethod(), responseObserver); } /** */ - public void listConnectionIds(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + default void listConnectionIds(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListConnectionIdsMethod(), responseObserver); } /** */ - public void listConnections(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + default void listConnections(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListConnectionsMethod(), responseObserver); } /** */ - public void getConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver responseObserver) { + default void getConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConnectionMethod(), responseObserver); } /** */ - public void setConnection(context.ContextOuterClass.Connection request, io.grpc.stub.StreamObserver responseObserver) { + default void setConnection(context.ContextOuterClass.Connection request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetConnectionMethod(), responseObserver); } /** */ - public void removeConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver responseObserver) { + default void removeConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveConnectionMethod(), responseObserver); } /** */ - public void getConnectionEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void getConnectionEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConnectionEventsMethod(), responseObserver); } @@ -1183,47 +1259,84 @@ public final class ContextServiceGrpc { * ------------------------------ Experimental ----------------------------- *
*/ - public void getOpticalConfig(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + default void getOpticalConfig(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOpticalConfigMethod(), responseObserver); } /** */ - public void setOpticalConfig(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { + default void setOpticalConfig(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetOpticalConfigMethod(), responseObserver); } /** */ - public void selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver responseObserver) { + default void updateOpticalConfig(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateOpticalConfigMethod(), responseObserver); + } + + /** + */ + default void selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectOpticalConfigMethod(), responseObserver); } /** */ - public void setOpticalLink(context.ContextOuterClass.OpticalLink request, io.grpc.stub.StreamObserver responseObserver) { + default void deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteOpticalConfigMethod(), responseObserver); + } + + /** + */ + default void deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteOpticalChannelMethod(), responseObserver); + } + + /** + */ + default void setOpticalLink(context.ContextOuterClass.OpticalLink request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetOpticalLinkMethod(), responseObserver); } /** */ - public void getOpticalLink(context.ContextOuterClass.OpticalLinkId request, io.grpc.stub.StreamObserver responseObserver) { + default void getOpticalLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOpticalLinkMethod(), responseObserver); } /** */ - public void getFiber(context.ContextOuterClass.FiberId request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFiberMethod(), responseObserver); + default void deleteOpticalLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteOpticalLinkMethod(), responseObserver); + } + + /** + */ + default void getOpticalLinkList(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOpticalLinkListMethod(), responseObserver); } + /** + */ + default void deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteServiceConfigRuleMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service ContextService. + */ + public static abstract class ContextServiceImplBase implements io.grpc.BindableService, AsyncService { + @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getListContextIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXT_IDS))).addMethod(getListContextsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXTS))).addMethod(getGetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONTEXT))).addMethod(getSetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONTEXT))).addMethod(getRemoveContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONTEXT))).addMethod(getGetContextEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONTEXT_EVENTS))).addMethod(getListTopologyIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGY_IDS))).addMethod(getListTopologiesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGIES))).addMethod(getGetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY))).addMethod(getGetTopologyDetailsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_DETAILS))).addMethod(getSetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_TOPOLOGY))).addMethod(getRemoveTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_TOPOLOGY))).addMethod(getGetTopologyEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_EVENTS))).addMethod(getListDeviceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICE_IDS))).addMethod(getListDevicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICES))).addMethod(getGetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_DEVICE))).addMethod(getSetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_DEVICE))).addMethod(getRemoveDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_DEVICE))).addMethod(getGetDeviceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_DEVICE_EVENTS))).addMethod(getSelectDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_DEVICE))).addMethod(getListEndPointNamesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_END_POINT_NAMES))).addMethod(getListLinkIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINK_IDS))).addMethod(getListLinksMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINKS))).addMethod(getGetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_LINK))).addMethod(getSetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_LINK))).addMethod(getRemoveLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_LINK))).addMethod(getGetLinkEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_LINK_EVENTS))).addMethod(getListServiceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICE_IDS))).addMethod(getListServicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICES))).addMethod(getGetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SERVICE))).addMethod(getSetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SERVICE))).addMethod(getUnsetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SERVICE))).addMethod(getRemoveServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SERVICE))).addMethod(getGetServiceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SERVICE_EVENTS))).addMethod(getSelectServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SERVICE))).addMethod(getListSliceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICE_IDS))).addMethod(getListSlicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICES))).addMethod(getGetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SLICE))).addMethod(getSetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SLICE))).addMethod(getUnsetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SLICE))).addMethod(getRemoveSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SLICE))).addMethod(getGetSliceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SLICE_EVENTS))).addMethod(getSelectSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SLICE))).addMethod(getListConnectionIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTION_IDS))).addMethod(getListConnectionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTIONS))).addMethod(getGetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONNECTION))).addMethod(getSetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONNECTION))).addMethod(getRemoveConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONNECTION))).addMethod(getGetConnectionEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONNECTION_EVENTS))).addMethod(getGetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_CONFIG))).addMethod(getSetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_CONFIG))).addMethod(getSelectOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_OPTICAL_CONFIG))).addMethod(getSetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_LINK))).addMethod(getGetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_LINK))).addMethod(getGetFiberMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_FIBER))).build(); + return ContextServiceGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service ContextService. */ public static class ContextServiceStub extends io.grpc.stub.AbstractAsyncStub { @@ -1545,12 +1658,30 @@ public final class ContextServiceGrpc { io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetOpticalConfigMethod(), getCallOptions()), request, responseObserver); } + /** + */ + public void updateOpticalConfig(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getUpdateOpticalConfigMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSelectOpticalConfigMethod(), getCallOptions()), request, responseObserver); } + /** + */ + public void deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteOpticalConfigMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteOpticalChannelMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void setOpticalLink(context.ContextOuterClass.OpticalLink request, io.grpc.stub.StreamObserver responseObserver) { @@ -1559,18 +1690,31 @@ public final class ContextServiceGrpc { /** */ - public void getOpticalLink(context.ContextOuterClass.OpticalLinkId request, io.grpc.stub.StreamObserver responseObserver) { + public void getOpticalLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetOpticalLinkMethod(), getCallOptions()), request, responseObserver); } /** */ - public void getFiber(context.ContextOuterClass.FiberId request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetFiberMethod(), getCallOptions()), request, responseObserver); + public void deleteOpticalLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteOpticalLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getOpticalLinkList(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetOpticalLinkListMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteServiceConfigRuleMethod(), getCallOptions()), request, responseObserver); } } /** + * A stub to allow clients to do synchronous rpc calls to service ContextService. */ public static class ContextServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { @@ -1892,12 +2036,30 @@ public final class ContextServiceGrpc { return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetOpticalConfigMethod(), getCallOptions(), request); } + /** + */ + public context.ContextOuterClass.OpticalConfigId updateOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getUpdateOpticalConfigMethod(), getCallOptions(), request); + } + /** */ public context.ContextOuterClass.OpticalConfig selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSelectOpticalConfigMethod(), getCallOptions(), request); } + /** + */ + public context.ContextOuterClass.Empty deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteOpticalConfigMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteOpticalChannelMethod(), getCallOptions(), request); + } + /** */ public context.ContextOuterClass.Empty setOpticalLink(context.ContextOuterClass.OpticalLink request) { @@ -1906,18 +2068,31 @@ public final class ContextServiceGrpc { /** */ - public context.ContextOuterClass.OpticalLink getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + public context.ContextOuterClass.OpticalLink getOpticalLink(context.ContextOuterClass.LinkId request) { return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetOpticalLinkMethod(), getCallOptions(), request); } /** */ - public context.ContextOuterClass.Fiber getFiber(context.ContextOuterClass.FiberId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetFiberMethod(), getCallOptions(), request); + public context.ContextOuterClass.Empty deleteOpticalLink(context.ContextOuterClass.LinkId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteOpticalLinkMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.OpticalLinkList getOpticalLinkList(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetOpticalLinkListMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteServiceConfigRuleMethod(), getCallOptions(), request); } } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service ContextService. */ public static class ContextServiceFutureStub extends io.grpc.stub.AbstractFutureStub { @@ -2197,12 +2372,30 @@ public final class ContextServiceGrpc { return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetOpticalConfigMethod(), getCallOptions()), request); } + /** + */ + public com.google.common.util.concurrent.ListenableFuture updateOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getUpdateOpticalConfigMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSelectOpticalConfigMethod(), getCallOptions()), request); } + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteOpticalConfigMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteOpticalChannelMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture setOpticalLink(context.ContextOuterClass.OpticalLink request) { @@ -2211,14 +2404,26 @@ public final class ContextServiceGrpc { /** */ - public com.google.common.util.concurrent.ListenableFuture getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + public com.google.common.util.concurrent.ListenableFuture getOpticalLink(context.ContextOuterClass.LinkId request) { return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetOpticalLinkMethod(), getCallOptions()), request); } /** */ - public com.google.common.util.concurrent.ListenableFuture getFiber(context.ContextOuterClass.FiberId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetFiberMethod(), getCallOptions()), request); + public com.google.common.util.concurrent.ListenableFuture deleteOpticalLink(context.ContextOuterClass.LinkId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteOpticalLinkMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getOpticalLinkList(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetOpticalLinkListMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteServiceConfigRuleMethod(), getCallOptions()), request); } } @@ -2324,21 +2529,31 @@ public final class ContextServiceGrpc { private static final int METHODID_SET_OPTICAL_CONFIG = 50; - private static final int METHODID_SELECT_OPTICAL_CONFIG = 51; + private static final int METHODID_UPDATE_OPTICAL_CONFIG = 51; + + private static final int METHODID_SELECT_OPTICAL_CONFIG = 52; - private static final int METHODID_SET_OPTICAL_LINK = 52; + private static final int METHODID_DELETE_OPTICAL_CONFIG = 53; - private static final int METHODID_GET_OPTICAL_LINK = 53; + private static final int METHODID_DELETE_OPTICAL_CHANNEL = 54; - private static final int METHODID_GET_FIBER = 54; + private static final int METHODID_SET_OPTICAL_LINK = 55; + + private static final int METHODID_GET_OPTICAL_LINK = 56; + + private static final int METHODID_DELETE_OPTICAL_LINK = 57; + + private static final int METHODID_GET_OPTICAL_LINK_LIST = 58; + + private static final int METHODID_DELETE_SERVICE_CONFIG_RULE = 59; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ContextServiceImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(ContextServiceImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -2500,17 +2715,32 @@ public final class ContextServiceGrpc { case METHODID_SET_OPTICAL_CONFIG: serviceImpl.setOpticalConfig((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_UPDATE_OPTICAL_CONFIG: + serviceImpl.updateOpticalConfig((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_SELECT_OPTICAL_CONFIG: serviceImpl.selectOpticalConfig((context.ContextOuterClass.OpticalConfigId) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_DELETE_OPTICAL_CONFIG: + serviceImpl.deleteOpticalConfig((context.ContextOuterClass.OpticalConfigId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_OPTICAL_CHANNEL: + serviceImpl.deleteOpticalChannel((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_SET_OPTICAL_LINK: serviceImpl.setOpticalLink((context.ContextOuterClass.OpticalLink) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_OPTICAL_LINK: - serviceImpl.getOpticalLink((context.ContextOuterClass.OpticalLinkId) request, (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.getOpticalLink((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_OPTICAL_LINK: + serviceImpl.deleteOpticalLink((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_OPTICAL_LINK_LIST: + serviceImpl.getOpticalLinkList((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); break; - case METHODID_GET_FIBER: - serviceImpl.getFiber((context.ContextOuterClass.FiberId) request, (io.grpc.stub.StreamObserver) responseObserver); + case METHODID_DELETE_SERVICE_CONFIG_RULE: + serviceImpl.deleteServiceConfigRule((context.ContextOuterClass.ServiceConfigRule) request, (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); @@ -2527,6 +2757,10 @@ public final class ContextServiceGrpc { } } + public static io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getListContextIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_CONTEXT_IDS))).addMethod(getListContextsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_CONTEXTS))).addMethod(getGetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_CONTEXT))).addMethod(getSetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_CONTEXT))).addMethod(getRemoveContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_CONTEXT))).addMethod(getGetContextEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_CONTEXT_EVENTS))).addMethod(getListTopologyIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_TOPOLOGY_IDS))).addMethod(getListTopologiesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_TOPOLOGIES))).addMethod(getGetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_TOPOLOGY))).addMethod(getGetTopologyDetailsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_TOPOLOGY_DETAILS))).addMethod(getSetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_TOPOLOGY))).addMethod(getRemoveTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_TOPOLOGY))).addMethod(getGetTopologyEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_TOPOLOGY_EVENTS))).addMethod(getListDeviceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_DEVICE_IDS))).addMethod(getListDevicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_DEVICES))).addMethod(getGetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_DEVICE))).addMethod(getSetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_DEVICE))).addMethod(getRemoveDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_DEVICE))).addMethod(getGetDeviceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_DEVICE_EVENTS))).addMethod(getSelectDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SELECT_DEVICE))).addMethod(getListEndPointNamesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_END_POINT_NAMES))).addMethod(getListLinkIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_LINK_IDS))).addMethod(getListLinksMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_LINKS))).addMethod(getGetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_LINK))).addMethod(getSetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_LINK))).addMethod(getRemoveLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_LINK))).addMethod(getGetLinkEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_LINK_EVENTS))).addMethod(getListServiceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_SERVICE_IDS))).addMethod(getListServicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_SERVICES))).addMethod(getGetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_SERVICE))).addMethod(getSetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_SERVICE))).addMethod(getUnsetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_UNSET_SERVICE))).addMethod(getRemoveServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_SERVICE))).addMethod(getGetServiceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_SERVICE_EVENTS))).addMethod(getSelectServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SELECT_SERVICE))).addMethod(getListSliceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_SLICE_IDS))).addMethod(getListSlicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_SLICES))).addMethod(getGetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_SLICE))).addMethod(getSetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_SLICE))).addMethod(getUnsetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_UNSET_SLICE))).addMethod(getRemoveSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_SLICE))).addMethod(getGetSliceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_SLICE_EVENTS))).addMethod(getSelectSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SELECT_SLICE))).addMethod(getListConnectionIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_CONNECTION_IDS))).addMethod(getListConnectionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_LIST_CONNECTIONS))).addMethod(getGetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_CONNECTION))).addMethod(getSetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_CONNECTION))).addMethod(getRemoveConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_REMOVE_CONNECTION))).addMethod(getGetConnectionEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_CONNECTION_EVENTS))).addMethod(getGetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_OPTICAL_CONFIG))).addMethod(getSetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_OPTICAL_CONFIG))).addMethod(getUpdateOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_UPDATE_OPTICAL_CONFIG))).addMethod(getSelectOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SELECT_OPTICAL_CONFIG))).addMethod(getDeleteOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_DELETE_OPTICAL_CONFIG))).addMethod(getDeleteOpticalChannelMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_DELETE_OPTICAL_CHANNEL))).addMethod(getSetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_OPTICAL_LINK))).addMethod(getGetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_OPTICAL_LINK))).addMethod(getDeleteOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_DELETE_OPTICAL_LINK))).addMethod(getGetOpticalLinkListMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_OPTICAL_LINK_LIST))).addMethod(getDeleteServiceConfigRuleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_DELETE_SERVICE_CONFIG_RULE))).build(); + } + private static abstract class ContextServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { ContextServiceBaseDescriptorSupplier() { @@ -2571,7 +2805,7 @@ public final class ContextServiceGrpc { synchronized (ContextServiceGrpc.class) { result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new ContextServiceFileDescriptorSupplier()).addMethod(getListContextIdsMethod()).addMethod(getListContextsMethod()).addMethod(getGetContextMethod()).addMethod(getSetContextMethod()).addMethod(getRemoveContextMethod()).addMethod(getGetContextEventsMethod()).addMethod(getListTopologyIdsMethod()).addMethod(getListTopologiesMethod()).addMethod(getGetTopologyMethod()).addMethod(getGetTopologyDetailsMethod()).addMethod(getSetTopologyMethod()).addMethod(getRemoveTopologyMethod()).addMethod(getGetTopologyEventsMethod()).addMethod(getListDeviceIdsMethod()).addMethod(getListDevicesMethod()).addMethod(getGetDeviceMethod()).addMethod(getSetDeviceMethod()).addMethod(getRemoveDeviceMethod()).addMethod(getGetDeviceEventsMethod()).addMethod(getSelectDeviceMethod()).addMethod(getListEndPointNamesMethod()).addMethod(getListLinkIdsMethod()).addMethod(getListLinksMethod()).addMethod(getGetLinkMethod()).addMethod(getSetLinkMethod()).addMethod(getRemoveLinkMethod()).addMethod(getGetLinkEventsMethod()).addMethod(getListServiceIdsMethod()).addMethod(getListServicesMethod()).addMethod(getGetServiceMethod()).addMethod(getSetServiceMethod()).addMethod(getUnsetServiceMethod()).addMethod(getRemoveServiceMethod()).addMethod(getGetServiceEventsMethod()).addMethod(getSelectServiceMethod()).addMethod(getListSliceIdsMethod()).addMethod(getListSlicesMethod()).addMethod(getGetSliceMethod()).addMethod(getSetSliceMethod()).addMethod(getUnsetSliceMethod()).addMethod(getRemoveSliceMethod()).addMethod(getGetSliceEventsMethod()).addMethod(getSelectSliceMethod()).addMethod(getListConnectionIdsMethod()).addMethod(getListConnectionsMethod()).addMethod(getGetConnectionMethod()).addMethod(getSetConnectionMethod()).addMethod(getRemoveConnectionMethod()).addMethod(getGetConnectionEventsMethod()).addMethod(getGetOpticalConfigMethod()).addMethod(getSetOpticalConfigMethod()).addMethod(getSelectOpticalConfigMethod()).addMethod(getSetOpticalLinkMethod()).addMethod(getGetOpticalLinkMethod()).addMethod(getGetFiberMethod()).build(); + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new ContextServiceFileDescriptorSupplier()).addMethod(getListContextIdsMethod()).addMethod(getListContextsMethod()).addMethod(getGetContextMethod()).addMethod(getSetContextMethod()).addMethod(getRemoveContextMethod()).addMethod(getGetContextEventsMethod()).addMethod(getListTopologyIdsMethod()).addMethod(getListTopologiesMethod()).addMethod(getGetTopologyMethod()).addMethod(getGetTopologyDetailsMethod()).addMethod(getSetTopologyMethod()).addMethod(getRemoveTopologyMethod()).addMethod(getGetTopologyEventsMethod()).addMethod(getListDeviceIdsMethod()).addMethod(getListDevicesMethod()).addMethod(getGetDeviceMethod()).addMethod(getSetDeviceMethod()).addMethod(getRemoveDeviceMethod()).addMethod(getGetDeviceEventsMethod()).addMethod(getSelectDeviceMethod()).addMethod(getListEndPointNamesMethod()).addMethod(getListLinkIdsMethod()).addMethod(getListLinksMethod()).addMethod(getGetLinkMethod()).addMethod(getSetLinkMethod()).addMethod(getRemoveLinkMethod()).addMethod(getGetLinkEventsMethod()).addMethod(getListServiceIdsMethod()).addMethod(getListServicesMethod()).addMethod(getGetServiceMethod()).addMethod(getSetServiceMethod()).addMethod(getUnsetServiceMethod()).addMethod(getRemoveServiceMethod()).addMethod(getGetServiceEventsMethod()).addMethod(getSelectServiceMethod()).addMethod(getListSliceIdsMethod()).addMethod(getListSlicesMethod()).addMethod(getGetSliceMethod()).addMethod(getSetSliceMethod()).addMethod(getUnsetSliceMethod()).addMethod(getRemoveSliceMethod()).addMethod(getGetSliceEventsMethod()).addMethod(getSelectSliceMethod()).addMethod(getListConnectionIdsMethod()).addMethod(getListConnectionsMethod()).addMethod(getGetConnectionMethod()).addMethod(getSetConnectionMethod()).addMethod(getRemoveConnectionMethod()).addMethod(getGetConnectionEventsMethod()).addMethod(getGetOpticalConfigMethod()).addMethod(getSetOpticalConfigMethod()).addMethod(getUpdateOpticalConfigMethod()).addMethod(getSelectOpticalConfigMethod()).addMethod(getDeleteOpticalConfigMethod()).addMethod(getDeleteOpticalChannelMethod()).addMethod(getSetOpticalLinkMethod()).addMethod(getGetOpticalLinkMethod()).addMethod(getDeleteOpticalLinkMethod()).addMethod(getGetOpticalLinkListMethod()).addMethod(getDeleteServiceConfigRuleMethod()).build(); } } } diff --git a/src/ztp/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java b/src/ztp/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java index c6dbb1e92..b97952a61 100644 --- a/src/ztp/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java +++ b/src/ztp/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java @@ -216,20 +216,40 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.MutinyGrp return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setOpticalConfig); } + public io.smallrye.mutiny.Uni updateOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::updateOpticalConfig); + } + public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::selectOpticalConfig); } + public io.smallrye.mutiny.Uni deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteOpticalConfig); + } + + public io.smallrye.mutiny.Uni deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteOpticalChannel); + } + public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setOpticalLink); } - public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.LinkId request) { return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getOpticalLink); } - public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { - return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getFiber); + public io.smallrye.mutiny.Uni deleteOpticalLink(context.ContextOuterClass.LinkId request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteOpticalLink); + } + + public io.smallrye.mutiny.Uni getOpticalLinkList(context.ContextOuterClass.Empty request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getOpticalLinkList); + } + + public io.smallrye.mutiny.Uni deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteServiceConfigRule); } public io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request) { @@ -456,19 +476,39 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.MutinyGrp throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } + public io.smallrye.mutiny.Uni updateOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } + public io.smallrye.mutiny.Uni deleteOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni deleteOpticalChannel(context.ContextOuterClass.OpticalConfig request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.LinkId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { + public io.smallrye.mutiny.Uni deleteOpticalLink(context.ContextOuterClass.LinkId request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni getOpticalLinkList(context.ContextOuterClass.Empty request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni deleteServiceConfigRule(context.ContextOuterClass.ServiceConfigRule request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @@ -502,7 +542,7 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.MutinyGrp @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(context.ContextServiceGrpc.getListContextIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXT_IDS, compression))).addMethod(context.ContextServiceGrpc.getListContextsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXTS, compression))).addMethod(context.ContextServiceGrpc.getGetContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getSetContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getRemoveContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getGetContextEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONTEXT_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListTopologyIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGY_IDS, compression))).addMethod(context.ContextServiceGrpc.getListTopologiesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGIES, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyDetailsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_DETAILS, compression))).addMethod(context.ContextServiceGrpc.getSetTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getRemoveTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListDeviceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListDevicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICES, compression))).addMethod(context.ContextServiceGrpc.getGetDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getSetDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getGetDeviceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_DEVICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getListEndPointNamesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_END_POINT_NAMES, compression))).addMethod(context.ContextServiceGrpc.getListLinkIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINK_IDS, compression))).addMethod(context.ContextServiceGrpc.getListLinksMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINKS, compression))).addMethod(context.ContextServiceGrpc.getGetLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_LINK, compression))).addMethod(context.ContextServiceGrpc.getSetLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_LINK, compression))).addMethod(context.ContextServiceGrpc.getRemoveLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetLinkEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_LINK_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListServiceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListServicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICES, compression))).addMethod(context.ContextServiceGrpc.getGetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getSetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getUnsetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getGetServiceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SERVICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getListSliceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListSlicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICES, compression))).addMethod(context.ContextServiceGrpc.getGetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getSetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getUnsetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SLICE, compression))).addMethod(context.ContextServiceGrpc.getGetSliceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SLICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SLICE, compression))).addMethod(context.ContextServiceGrpc.getListConnectionIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTION_IDS, compression))).addMethod(context.ContextServiceGrpc.getListConnectionsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTIONS, compression))).addMethod(context.ContextServiceGrpc.getGetConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getSetConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getRemoveConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getGetConnectionEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONNECTION_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSetOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSelectOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSetOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetFiberMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_FIBER, compression))).build(); + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(context.ContextServiceGrpc.getListContextIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXT_IDS, compression))).addMethod(context.ContextServiceGrpc.getListContextsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXTS, compression))).addMethod(context.ContextServiceGrpc.getGetContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getSetContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getRemoveContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getGetContextEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONTEXT_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListTopologyIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGY_IDS, compression))).addMethod(context.ContextServiceGrpc.getListTopologiesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGIES, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyDetailsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_DETAILS, compression))).addMethod(context.ContextServiceGrpc.getSetTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getRemoveTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListDeviceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListDevicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICES, compression))).addMethod(context.ContextServiceGrpc.getGetDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getSetDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getGetDeviceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_DEVICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getListEndPointNamesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_END_POINT_NAMES, compression))).addMethod(context.ContextServiceGrpc.getListLinkIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINK_IDS, compression))).addMethod(context.ContextServiceGrpc.getListLinksMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINKS, compression))).addMethod(context.ContextServiceGrpc.getGetLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_LINK, compression))).addMethod(context.ContextServiceGrpc.getSetLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_LINK, compression))).addMethod(context.ContextServiceGrpc.getRemoveLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetLinkEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_LINK_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListServiceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListServicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICES, compression))).addMethod(context.ContextServiceGrpc.getGetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getSetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getUnsetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getGetServiceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SERVICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getListSliceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListSlicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICES, compression))).addMethod(context.ContextServiceGrpc.getGetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getSetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getUnsetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SLICE, compression))).addMethod(context.ContextServiceGrpc.getGetSliceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SLICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SLICE, compression))).addMethod(context.ContextServiceGrpc.getListConnectionIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTION_IDS, compression))).addMethod(context.ContextServiceGrpc.getListConnectionsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTIONS, compression))).addMethod(context.ContextServiceGrpc.getGetConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getSetConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getRemoveConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getGetConnectionEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONNECTION_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSetOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getUpdateOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UPDATE_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSelectOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getDeleteOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getDeleteOpticalChannelMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_OPTICAL_CHANNEL, compression))).addMethod(context.ContextServiceGrpc.getSetOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getDeleteOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalLinkListMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_LINK_LIST, compression))).addMethod(context.ContextServiceGrpc.getDeleteServiceConfigRuleMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_SERVICE_CONFIG_RULE, compression))).build(); } } @@ -608,13 +648,23 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.MutinyGrp private static final int METHODID_SET_OPTICAL_CONFIG = 50; - private static final int METHODID_SELECT_OPTICAL_CONFIG = 51; + private static final int METHODID_UPDATE_OPTICAL_CONFIG = 51; + + private static final int METHODID_SELECT_OPTICAL_CONFIG = 52; + + private static final int METHODID_DELETE_OPTICAL_CONFIG = 53; - private static final int METHODID_SET_OPTICAL_LINK = 52; + private static final int METHODID_DELETE_OPTICAL_CHANNEL = 54; - private static final int METHODID_GET_OPTICAL_LINK = 53; + private static final int METHODID_SET_OPTICAL_LINK = 55; - private static final int METHODID_GET_FIBER = 54; + private static final int METHODID_GET_OPTICAL_LINK = 56; + + private static final int METHODID_DELETE_OPTICAL_LINK = 57; + + private static final int METHODID_GET_OPTICAL_LINK_LIST = 58; + + private static final int METHODID_DELETE_SERVICE_CONFIG_RULE = 59; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { @@ -787,17 +837,32 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.MutinyGrp case METHODID_SET_OPTICAL_CONFIG: io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setOpticalConfig); break; + case METHODID_UPDATE_OPTICAL_CONFIG: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::updateOpticalConfig); + break; case METHODID_SELECT_OPTICAL_CONFIG: io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfigId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::selectOpticalConfig); break; + case METHODID_DELETE_OPTICAL_CONFIG: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfigId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteOpticalConfig); + break; + case METHODID_DELETE_OPTICAL_CHANNEL: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteOpticalChannel); + break; case METHODID_SET_OPTICAL_LINK: io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalLink) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setOpticalLink); break; case METHODID_GET_OPTICAL_LINK: - io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalLinkId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getOpticalLink); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getOpticalLink); + break; + case METHODID_DELETE_OPTICAL_LINK: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteOpticalLink); + break; + case METHODID_GET_OPTICAL_LINK_LIST: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getOpticalLinkList); break; - case METHODID_GET_FIBER: - io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.FiberId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getFiber); + case METHODID_DELETE_SERVICE_CONFIG_RULE: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceConfigRule) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteServiceConfigRule); break; default: throw new java.lang.AssertionError(); diff --git a/src/ztp/target/generated-sources/grpc/device/Device.java b/src/ztp/target/generated-sources/grpc/device/Device.java index 93bd49040..53ac328d6 100644 --- a/src/ztp/target/generated-sources/grpc/device/Device.java +++ b/src/ztp/target/generated-sources/grpc/device/Device.java @@ -18,35 +18,59 @@ public final class Device { com.google.protobuf.MessageOrBuilder { /** + *
+         * to be migrated to: "kpi_manager.KpiId"
+         * 
+ * * .monitoring.KpiId kpi_id = 1; * @return Whether the kpiId field is set. */ boolean hasKpiId(); /** + *
+         * to be migrated to: "kpi_manager.KpiId"
+         * 
+ * * .monitoring.KpiId kpi_id = 1; * @return The kpiId. */ monitoring.Monitoring.KpiId getKpiId(); /** + *
+         * to be migrated to: "kpi_manager.KpiId"
+         * 
+ * * .monitoring.KpiId kpi_id = 1; */ monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); /** + *
+         * to be migrated to: "kpi_manager.KpiDescriptor"
+         * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; * @return Whether the kpiDescriptor field is set. */ boolean hasKpiDescriptor(); /** + *
+         * to be migrated to: "kpi_manager.KpiDescriptor"
+         * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; * @return The kpiDescriptor. */ monitoring.Monitoring.KpiDescriptor getKpiDescriptor(); /** + *
+         * to be migrated to: "kpi_manager.KpiDescriptor"
+         * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; */ monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder(); @@ -86,80 +110,6 @@ public final class Device { return new MonitoringSettings(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private MonitoringSettings(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.KpiId.Builder subBuilder = null; - if (kpiId_ != null) { - subBuilder = kpiId_.toBuilder(); - } - kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiId_); - kpiId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - monitoring.Monitoring.KpiDescriptor.Builder subBuilder = null; - if (kpiDescriptor_ != null) { - subBuilder = kpiDescriptor_.toBuilder(); - } - kpiDescriptor_ = input.readMessage(monitoring.Monitoring.KpiDescriptor.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiDescriptor_); - kpiDescriptor_ = subBuilder.buildPartial(); - } - break; - } - case 29: - { - samplingDurationS_ = input.readFloat(); - break; - } - case 37: - { - samplingIntervalS_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return device.Device.internal_static_device_MonitoringSettings_descriptor; } @@ -174,6 +124,10 @@ public final class Device { private monitoring.Monitoring.KpiId kpiId_; /** + *
+         * to be migrated to: "kpi_manager.KpiId"
+         * 
+ * * .monitoring.KpiId kpi_id = 1; * @return Whether the kpiId field is set. */ @@ -183,6 +137,10 @@ public final class Device { } /** + *
+         * to be migrated to: "kpi_manager.KpiId"
+         * 
+ * * .monitoring.KpiId kpi_id = 1; * @return The kpiId. */ @@ -192,11 +150,15 @@ public final class Device { } /** + *
+         * to be migrated to: "kpi_manager.KpiId"
+         * 
+ * * .monitoring.KpiId kpi_id = 1; */ @java.lang.Override public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } public static final int KPI_DESCRIPTOR_FIELD_NUMBER = 2; @@ -204,6 +166,10 @@ public final class Device { private monitoring.Monitoring.KpiDescriptor kpiDescriptor_; /** + *
+         * to be migrated to: "kpi_manager.KpiDescriptor"
+         * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; * @return Whether the kpiDescriptor field is set. */ @@ -213,6 +179,10 @@ public final class Device { } /** + *
+         * to be migrated to: "kpi_manager.KpiDescriptor"
+         * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; * @return The kpiDescriptor. */ @@ -222,16 +192,20 @@ public final class Device { } /** + *
+         * to be migrated to: "kpi_manager.KpiDescriptor"
+         * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; */ @java.lang.Override public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder() { - return getKpiDescriptor(); + return kpiDescriptor_ == null ? monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; } public static final int SAMPLING_DURATION_S_FIELD_NUMBER = 3; - private float samplingDurationS_; + private float samplingDurationS_ = 0F; /** * float sampling_duration_s = 3; @@ -244,7 +218,7 @@ public final class Device { public static final int SAMPLING_INTERVAL_S_FIELD_NUMBER = 4; - private float samplingIntervalS_; + private float samplingIntervalS_ = 0F; /** * float sampling_interval_s = 4; @@ -276,13 +250,13 @@ public final class Device { if (kpiDescriptor_ != null) { output.writeMessage(2, getKpiDescriptor()); } - if (samplingDurationS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingDurationS_) != 0) { output.writeFloat(3, samplingDurationS_); } - if (samplingIntervalS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingIntervalS_) != 0) { output.writeFloat(4, samplingIntervalS_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -297,13 +271,13 @@ public final class Device { if (kpiDescriptor_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiDescriptor()); } - if (samplingDurationS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingDurationS_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, samplingDurationS_); } - if (samplingIntervalS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingIntervalS_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, samplingIntervalS_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -333,7 +307,7 @@ public final class Device { return false; if (java.lang.Float.floatToIntBits(getSamplingIntervalS()) != java.lang.Float.floatToIntBits(other.getSamplingIntervalS())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -357,7 +331,7 @@ public final class Device { hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingDurationS()); hash = (37 * hash) + SAMPLING_INTERVAL_S_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingIntervalS()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -451,32 +425,24 @@ public final class Device { // Construct using device.Device.MonitoringSettings.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; + bitField0_ = 0; + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } - if (kpiDescriptorBuilder_ == null) { - kpiDescriptor_ = null; - } else { - kpiDescriptor_ = null; + kpiDescriptor_ = null; + if (kpiDescriptorBuilder_ != null) { + kpiDescriptorBuilder_.dispose(); kpiDescriptorBuilder_ = null; } samplingDurationS_ = 0F; @@ -506,50 +472,27 @@ public final class Device { @java.lang.Override public device.Device.MonitoringSettings buildPartial() { device.Device.MonitoringSettings result = new device.Device.MonitoringSettings(this); - if (kpiIdBuilder_ == null) { - result.kpiId_ = kpiId_; - } else { - result.kpiId_ = kpiIdBuilder_.build(); - } - if (kpiDescriptorBuilder_ == null) { - result.kpiDescriptor_ = kpiDescriptor_; - } else { - result.kpiDescriptor_ = kpiDescriptorBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.samplingDurationS_ = samplingDurationS_; - result.samplingIntervalS_ = samplingIntervalS_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(device.Device.MonitoringSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kpiDescriptor_ = kpiDescriptorBuilder_ == null ? kpiDescriptor_ : kpiDescriptorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.samplingDurationS_ = samplingDurationS_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.samplingIntervalS_ = samplingIntervalS_; + } } @java.lang.Override @@ -577,7 +520,7 @@ public final class Device { if (other.getSamplingIntervalS() != 0F) { setSamplingIntervalS(other.getSamplingIntervalS()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -589,33 +532,89 @@ public final class Device { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - device.Device.MonitoringSettings parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getKpiDescriptorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 29: + { + samplingDurationS_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } + // case 29 + case 37: + { + samplingIntervalS_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } + // case 37 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (device.Device.MonitoringSettings) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private monitoring.Monitoring.KpiId kpiId_; private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; /** + *
+             * to be migrated to: "kpi_manager.KpiId"
+             * 
+ * * .monitoring.KpiId kpi_id = 1; * @return Whether the kpiId field is set. */ public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** + *
+             * to be migrated to: "kpi_manager.KpiId"
+             * 
+ * * .monitoring.KpiId kpi_id = 1; * @return The kpiId. */ @@ -628,6 +627,10 @@ public final class Device { } /** + *
+             * to be migrated to: "kpi_manager.KpiId"
+             * 
+ * * .monitoring.KpiId kpi_id = 1; */ public Builder setKpiId(monitoring.Monitoring.KpiId value) { @@ -636,66 +639,90 @@ public final class Device { throw new NullPointerException(); } kpiId_ = value; - onChanged(); } else { kpiIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** + *
+             * to be migrated to: "kpi_manager.KpiId"
+             * 
+ * * .monitoring.KpiId kpi_id = 1; */ public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { if (kpiIdBuilder_ == null) { kpiId_ = builderForValue.build(); - onChanged(); } else { kpiIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** + *
+             * to be migrated to: "kpi_manager.KpiId"
+             * 
+ * * .monitoring.KpiId kpi_id = 1; */ public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) { + getKpiIdBuilder().mergeFrom(value); } else { kpiId_ = value; } - onChanged(); } else { kpiIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** + *
+             * to be migrated to: "kpi_manager.KpiId"
+             * 
+ * * .monitoring.KpiId kpi_id = 1; */ public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } + onChanged(); return this; } /** + *
+             * to be migrated to: "kpi_manager.KpiId"
+             * 
+ * * .monitoring.KpiId kpi_id = 1; */ public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getKpiIdFieldBuilder().getBuilder(); } /** + *
+             * to be migrated to: "kpi_manager.KpiId"
+             * 
+ * * .monitoring.KpiId kpi_id = 1; */ public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { @@ -707,6 +734,10 @@ public final class Device { } /** + *
+             * to be migrated to: "kpi_manager.KpiId"
+             * 
+ * * .monitoring.KpiId kpi_id = 1; */ private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { @@ -722,14 +753,22 @@ public final class Device { private com.google.protobuf.SingleFieldBuilderV3 kpiDescriptorBuilder_; /** + *
+             * to be migrated to: "kpi_manager.KpiDescriptor"
+             * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; * @return Whether the kpiDescriptor field is set. */ public boolean hasKpiDescriptor() { - return kpiDescriptorBuilder_ != null || kpiDescriptor_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** + *
+             * to be migrated to: "kpi_manager.KpiDescriptor"
+             * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; * @return The kpiDescriptor. */ @@ -742,6 +781,10 @@ public final class Device { } /** + *
+             * to be migrated to: "kpi_manager.KpiDescriptor"
+             * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; */ public Builder setKpiDescriptor(monitoring.Monitoring.KpiDescriptor value) { @@ -750,66 +793,90 @@ public final class Device { throw new NullPointerException(); } kpiDescriptor_ = value; - onChanged(); } else { kpiDescriptorBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** + *
+             * to be migrated to: "kpi_manager.KpiDescriptor"
+             * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; */ public Builder setKpiDescriptor(monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { if (kpiDescriptorBuilder_ == null) { kpiDescriptor_ = builderForValue.build(); - onChanged(); } else { kpiDescriptorBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** + *
+             * to be migrated to: "kpi_manager.KpiDescriptor"
+             * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; */ public Builder mergeKpiDescriptor(monitoring.Monitoring.KpiDescriptor value) { if (kpiDescriptorBuilder_ == null) { - if (kpiDescriptor_ != null) { - kpiDescriptor_ = monitoring.Monitoring.KpiDescriptor.newBuilder(kpiDescriptor_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && kpiDescriptor_ != null && kpiDescriptor_ != monitoring.Monitoring.KpiDescriptor.getDefaultInstance()) { + getKpiDescriptorBuilder().mergeFrom(value); } else { kpiDescriptor_ = value; } - onChanged(); } else { kpiDescriptorBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** + *
+             * to be migrated to: "kpi_manager.KpiDescriptor"
+             * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; */ public Builder clearKpiDescriptor() { - if (kpiDescriptorBuilder_ == null) { - kpiDescriptor_ = null; - onChanged(); - } else { - kpiDescriptor_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + kpiDescriptor_ = null; + if (kpiDescriptorBuilder_ != null) { + kpiDescriptorBuilder_.dispose(); kpiDescriptorBuilder_ = null; } + onChanged(); return this; } /** + *
+             * to be migrated to: "kpi_manager.KpiDescriptor"
+             * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; */ public monitoring.Monitoring.KpiDescriptor.Builder getKpiDescriptorBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getKpiDescriptorFieldBuilder().getBuilder(); } /** + *
+             * to be migrated to: "kpi_manager.KpiDescriptor"
+             * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; */ public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder() { @@ -821,6 +888,10 @@ public final class Device { } /** + *
+             * to be migrated to: "kpi_manager.KpiDescriptor"
+             * 
+ * * .monitoring.KpiDescriptor kpi_descriptor = 2; */ private com.google.protobuf.SingleFieldBuilderV3 getKpiDescriptorFieldBuilder() { @@ -849,6 +920,7 @@ public final class Device { */ public Builder setSamplingDurationS(float value) { samplingDurationS_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -858,6 +930,7 @@ public final class Device { * @return This builder for chaining. */ public Builder clearSamplingDurationS() { + bitField0_ = (bitField0_ & ~0x00000004); samplingDurationS_ = 0F; onChanged(); return this; @@ -881,6 +954,7 @@ public final class Device { */ public Builder setSamplingIntervalS(float value) { samplingIntervalS_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -890,6 +964,7 @@ public final class Device { * @return This builder for chaining. */ public Builder clearSamplingIntervalS() { + bitField0_ = (bitField0_ & ~0x00000008); samplingIntervalS_ = 0F; onChanged(); return this; @@ -922,7 +997,17 @@ public final class Device { @java.lang.Override public MonitoringSettings parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MonitoringSettings(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/src/ztp/target/generated-sources/grpc/device/DeviceServiceGrpc.java b/src/ztp/target/generated-sources/grpc/device/DeviceServiceGrpc.java index a6886d8d6..7e0cf9a8b 100644 --- a/src/ztp/target/generated-sources/grpc/device/DeviceServiceGrpc.java +++ b/src/ztp/target/generated-sources/grpc/device/DeviceServiceGrpc.java @@ -4,7 +4,8 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.38.1)", comments = "Source: device.proto") +@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.55.1)", comments = "Source: device.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class DeviceServiceGrpc { private DeviceServiceGrpc() { @@ -132,45 +133,52 @@ public final class DeviceServiceGrpc { /** */ - public static abstract class DeviceServiceImplBase implements io.grpc.BindableService { + public interface AsyncService { /** */ - public void addDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + default void addDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddDeviceMethod(), responseObserver); } /** */ - public void configureDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + default void configureDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getConfigureDeviceMethod(), responseObserver); } /** */ - public void deleteDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + default void deleteDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteDeviceMethod(), responseObserver); } /** */ - public void getInitialConfig(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + default void getInitialConfig(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInitialConfigMethod(), responseObserver); } /** */ - public void monitorDeviceKpi(device.Device.MonitoringSettings request, io.grpc.stub.StreamObserver responseObserver) { + default void monitorDeviceKpi(device.Device.MonitoringSettings request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMonitorDeviceKpiMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service DeviceService. + */ + public static abstract class DeviceServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getAddDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ADD_DEVICE))).addMethod(getConfigureDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_CONFIGURE_DEVICE))).addMethod(getDeleteDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_DEVICE))).addMethod(getGetInitialConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_INITIAL_CONFIG))).addMethod(getMonitorDeviceKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_MONITOR_DEVICE_KPI))).build(); + return DeviceServiceGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service DeviceService. */ public static class DeviceServiceStub extends io.grpc.stub.AbstractAsyncStub { @@ -215,6 +223,7 @@ public final class DeviceServiceGrpc { } /** + * A stub to allow clients to do synchronous rpc calls to service DeviceService. */ public static class DeviceServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { @@ -259,6 +268,7 @@ public final class DeviceServiceGrpc { } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DeviceService. */ public static class DeviceServiceFutureStub extends io.grpc.stub.AbstractFutureStub { @@ -314,11 +324,11 @@ public final class DeviceServiceGrpc { private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final DeviceServiceImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(DeviceServiceImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -357,6 +367,10 @@ public final class DeviceServiceGrpc { } } + public static io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getAddDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_ADD_DEVICE))).addMethod(getConfigureDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_CONFIGURE_DEVICE))).addMethod(getDeleteDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_DELETE_DEVICE))).addMethod(getGetInitialConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_INITIAL_CONFIG))).addMethod(getMonitorDeviceKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_MONITOR_DEVICE_KPI))).build(); + } + private static abstract class DeviceServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { DeviceServiceBaseDescriptorSupplier() { diff --git a/src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java b/src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java index 9621efb4b..2a8a62593 100644 --- a/src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java +++ b/src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java @@ -95,6 +95,38 @@ public final class KpiSampleTypes { * KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; */ KPISAMPLETYPE_SERVICE_LATENCY_MS(701), + /** + *
+         * output KPIs
+         * 
+ * + * KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT = 1101; + */ + KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT(1101), + /** + * KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT = 1102; + */ + KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT(1102), + /** + * KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT = 1103; + */ + KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT(1103), + /** + * KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT = 1201; + */ + KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT(1201), + /** + * KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT = 1202; + */ + KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT(1202), + /** + * KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT = 1203; + */ + KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT(1203), + /** + * KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT = 1701; + */ + KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT(1701), UNRECOGNIZED(-1); /** @@ -190,6 +222,45 @@ public final class KpiSampleTypes { */ public static final int KPISAMPLETYPE_SERVICE_LATENCY_MS_VALUE = 701; + /** + *
+         * output KPIs
+         * 
+ * + * KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT = 1101; + */ + public static final int KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT_VALUE = 1101; + + /** + * KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT = 1102; + */ + public static final int KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT_VALUE = 1102; + + /** + * KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT = 1103; + */ + public static final int KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT_VALUE = 1103; + + /** + * KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT = 1201; + */ + public static final int KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT_VALUE = 1201; + + /** + * KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT = 1202; + */ + public static final int KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT_VALUE = 1202; + + /** + * KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT = 1203; + */ + public static final int KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT_VALUE = 1203; + + /** + * KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT = 1701; + */ + public static final int KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT_VALUE = 1701; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); @@ -247,6 +318,20 @@ public final class KpiSampleTypes { return KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO; case 701: return KPISAMPLETYPE_SERVICE_LATENCY_MS; + case 1101: + return KPISAMPLETYPE_PACKETS_TRANSMITTED_AGG_OUTPUT; + case 1102: + return KPISAMPLETYPE_PACKETS_RECEIVED_AGG_OUTPUT; + case 1103: + return KPISAMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT; + case 1201: + return KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_OUTPUT; + case 1202: + return KPISAMPLETYPE_BYTES_RECEIVED_AGG_OUTPUT; + case 1203: + return KPISAMPLETYPE_BYTES_DROPPED_AGG_OUTPUT; + case 1701: + return KPISAMPLETYPE_SERVICE_LATENCY_MS_AGG_OUTPUT; default: return null; } @@ -304,7 +389,7 @@ public final class KpiSampleTypes { private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { "\n\026kpi_sample_types.proto\022\020kpi_sample_typ" + "es*\260\005\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + "KNOWN\020\000\022%\n!KPISAMPLETYPE_PACKETS_TRANSMI" + "TTED\020e\022\"\n\036KPISAMPLETYPE_PACKETS_RECEIVED" + "\020f\022!\n\035KPISAMPLETYPE_PACKETS_DROPPED\020g\022$\n" + "\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001\022!\n\034K" + "PISAMPLETYPE_BYTES_RECEIVED\020\312\001\022 \n\033KPISAM" + "PLETYPE_BYTES_DROPPED\020\313\001\022+\n&KPISAMPLETYP" + "E_LINK_TOTAL_CAPACITY_GBPS\020\255\002\022*\n%KPISAMP" + "LETYPE_LINK_USED_CAPACITY_GBPS\020\256\002\022 \n\033KPI" + "SAMPLETYPE_ML_CONFIDENCE\020\221\003\022*\n%KPISAMPLE" + "TYPE_OPTICAL_SECURITY_STATUS\020\365\003\022)\n$KPISA" + "MPLETYPE_L3_UNIQUE_ATTACK_CONNS\020\331\004\022*\n%KP" + "ISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS\020\332\004\022&" + "\n!KPISAMPLETYPE_L3_UNIQUE_ATTACKERS\020\333\004\0220" + "\n+KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CL" + "IENTS\020\334\004\022,\n\'KPISAMPLETYPE_L3_SECURITY_ST" + "ATUS_CRYPTO\020\335\004\022%\n KPISAMPLETYPE_SERVICE_" + "LATENCY_MS\020\275\005b\006proto3" }; + java.lang.String[] descriptorData = { "\n\026kpi_sample_types.proto\022\020kpi_sample_typ" + "es*\200\010\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + "KNOWN\020\000\022%\n!KPISAMPLETYPE_PACKETS_TRANSMI" + "TTED\020e\022\"\n\036KPISAMPLETYPE_PACKETS_RECEIVED" + "\020f\022!\n\035KPISAMPLETYPE_PACKETS_DROPPED\020g\022$\n" + "\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001\022!\n\034K" + "PISAMPLETYPE_BYTES_RECEIVED\020\312\001\022 \n\033KPISAM" + "PLETYPE_BYTES_DROPPED\020\313\001\022+\n&KPISAMPLETYP" + "E_LINK_TOTAL_CAPACITY_GBPS\020\255\002\022*\n%KPISAMP" + "LETYPE_LINK_USED_CAPACITY_GBPS\020\256\002\022 \n\033KPI" + "SAMPLETYPE_ML_CONFIDENCE\020\221\003\022*\n%KPISAMPLE" + "TYPE_OPTICAL_SECURITY_STATUS\020\365\003\022)\n$KPISA" + "MPLETYPE_L3_UNIQUE_ATTACK_CONNS\020\331\004\022*\n%KP" + "ISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS\020\332\004\022&" + "\n!KPISAMPLETYPE_L3_UNIQUE_ATTACKERS\020\333\004\0220" + "\n+KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CL" + "IENTS\020\334\004\022,\n\'KPISAMPLETYPE_L3_SECURITY_ST" + "ATUS_CRYPTO\020\335\004\022%\n KPISAMPLETYPE_SERVICE_" + "LATENCY_MS\020\275\005\0221\n,KPISAMPLETYPE_PACKETS_T" + "RANSMITTED_AGG_OUTPUT\020\315\010\022.\n)KPISAMPLETYP" + "E_PACKETS_RECEIVED_AGG_OUTPUT\020\316\010\022-\n(KPIS" + "AMPLETYPE_PACKETS_DROPPED_AGG_OUTPUT\020\317\010\022" + "/\n*KPISAMPLETYPE_BYTES_TRANSMITTED_AGG_O" + "UTPUT\020\261\t\022,\n\'KPISAMPLETYPE_BYTES_RECEIVED" + "_AGG_OUTPUT\020\262\t\022+\n&KPISAMPLETYPE_BYTES_DR" + "OPPED_AGG_OUTPUT\020\263\t\0220\n+KPISAMPLETYPE_SER" + "VICE_LATENCY_MS_AGG_OUTPUT\020\245\rb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); } // @@protoc_insertion_point(outer_class_scope) diff --git a/src/ztp/target/generated-sources/grpc/monitoring/Monitoring.java b/src/ztp/target/generated-sources/grpc/monitoring/Monitoring.java index 4c80f4a06..2f98ce3eb 100644 --- a/src/ztp/target/generated-sources/grpc/monitoring/Monitoring.java +++ b/src/ztp/target/generated-sources/grpc/monitoring/Monitoring.java @@ -211,160 +211,6 @@ public final class Monitoring { return new KpiDescriptor(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private KpiDescriptor(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.KpiId.Builder subBuilder = null; - if (kpiId_ != null) { - subBuilder = kpiId_.toBuilder(); - } - kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiId_); - kpiId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - kpiDescription_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiIdList_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - kpiIdList_.add(input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry)); - break; - } - case 32: - { - int rawValue = input.readEnum(); - kpiSampleType_ = rawValue; - break; - } - case 42: - { - context.ContextOuterClass.DeviceId.Builder subBuilder = null; - if (deviceId_ != null) { - subBuilder = deviceId_.toBuilder(); - } - deviceId_ = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deviceId_); - deviceId_ = subBuilder.buildPartial(); - } - break; - } - case 50: - { - context.ContextOuterClass.EndPointId.Builder subBuilder = null; - if (endpointId_ != null) { - subBuilder = endpointId_.toBuilder(); - } - endpointId_ = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endpointId_); - endpointId_ = subBuilder.buildPartial(); - } - break; - } - case 58: - { - context.ContextOuterClass.ServiceId.Builder subBuilder = null; - if (serviceId_ != null) { - subBuilder = serviceId_.toBuilder(); - } - serviceId_ = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceId_); - serviceId_ = subBuilder.buildPartial(); - } - break; - } - case 66: - { - context.ContextOuterClass.SliceId.Builder subBuilder = null; - if (sliceId_ != null) { - subBuilder = sliceId_.toBuilder(); - } - sliceId_ = input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sliceId_); - sliceId_ = subBuilder.buildPartial(); - } - break; - } - case 74: - { - context.ContextOuterClass.ConnectionId.Builder subBuilder = null; - if (connectionId_ != null) { - subBuilder = connectionId_.toBuilder(); - } - connectionId_ = input.readMessage(context.ContextOuterClass.ConnectionId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(connectionId_); - connectionId_ = subBuilder.buildPartial(); - } - break; - } - case 82: - { - context.ContextOuterClass.LinkId.Builder subBuilder = null; - if (linkId_ != null) { - subBuilder = linkId_.toBuilder(); - } - linkId_ = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(linkId_); - linkId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpiIdList_ = java.util.Collections.unmodifiableList(kpiIdList_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_descriptor; } @@ -401,12 +247,13 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } public static final int KPI_DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object kpiDescription_; + @SuppressWarnings("serial") + private volatile java.lang.Object kpiDescription_ = ""; /** * string kpi_description = 2; @@ -443,6 +290,7 @@ public final class Monitoring { public static final int KPI_ID_LIST_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List kpiIdList_; /** @@ -487,7 +335,7 @@ public final class Monitoring { public static final int KPI_SAMPLE_TYPE_FIELD_NUMBER = 4; - private int kpiSampleType_; + private int kpiSampleType_ = 0; /** * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; @@ -504,8 +352,7 @@ public final class Monitoring { */ @java.lang.Override public kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleType() { - @SuppressWarnings("deprecation") - kpi_sample_types.KpiSampleTypes.KpiSampleType result = kpi_sample_types.KpiSampleTypes.KpiSampleType.valueOf(kpiSampleType_); + kpi_sample_types.KpiSampleTypes.KpiSampleType result = kpi_sample_types.KpiSampleTypes.KpiSampleType.forNumber(kpiSampleType_); return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; } @@ -536,7 +383,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; } public static final int ENDPOINT_ID_FIELD_NUMBER = 6; @@ -566,7 +413,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; } public static final int SERVICE_ID_FIELD_NUMBER = 7; @@ -596,7 +443,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } public static final int SLICE_ID_FIELD_NUMBER = 8; @@ -626,7 +473,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - return getSliceId(); + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; } public static final int CONNECTION_ID_FIELD_NUMBER = 9; @@ -656,7 +503,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - return getConnectionId(); + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; } public static final int LINK_ID_FIELD_NUMBER = 10; @@ -686,7 +533,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { - return getLinkId(); + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; } private byte memoizedIsInitialized = -1; @@ -707,7 +554,7 @@ public final class Monitoring { if (kpiId_ != null) { output.writeMessage(1, getKpiId()); } - if (!getKpiDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kpiDescription_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kpiDescription_); } for (int i = 0; i < kpiIdList_.size(); i++) { @@ -734,7 +581,7 @@ public final class Monitoring { if (linkId_ != null) { output.writeMessage(10, getLinkId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -746,7 +593,7 @@ public final class Monitoring { if (kpiId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); } - if (!getKpiDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kpiDescription_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kpiDescription_); } for (int i = 0; i < kpiIdList_.size(); i++) { @@ -773,7 +620,7 @@ public final class Monitoring { if (linkId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLinkId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -835,7 +682,7 @@ public final class Monitoring { if (!getLinkId().equals(other.getLinkId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -883,7 +730,7 @@ public final class Monitoring { hash = (37 * hash) + LINK_ID_FIELD_NUMBER; hash = (53 * hash) + getLinkId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -977,71 +824,58 @@ public final class Monitoring { // Construct using monitoring.Monitoring.KpiDescriptor.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getKpiIdListFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; + bitField0_ = 0; + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } kpiDescription_ = ""; if (kpiIdListBuilder_ == null) { kpiIdList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + kpiIdList_ = null; kpiIdListBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); kpiSampleType_ = 0; - if (deviceIdBuilder_ == null) { - deviceId_ = null; - } else { - deviceId_ = null; + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); deviceIdBuilder_ = null; } - if (endpointIdBuilder_ == null) { - endpointId_ = null; - } else { - endpointId_ = null; + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } - if (serviceIdBuilder_ == null) { - serviceId_ = null; - } else { - serviceId_ = null; + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); serviceIdBuilder_ = null; } - if (sliceIdBuilder_ == null) { - sliceId_ = null; - } else { - sliceId_ = null; + sliceId_ = null; + if (sliceIdBuilder_ != null) { + sliceIdBuilder_.dispose(); sliceIdBuilder_ = null; } - if (connectionIdBuilder_ == null) { - connectionId_ = null; - } else { - connectionId_ = null; + connectionId_ = null; + if (connectionIdBuilder_ != null) { + connectionIdBuilder_.dispose(); connectionIdBuilder_ = null; } - if (linkIdBuilder_ == null) { - linkId_ = null; - } else { - linkId_ = null; + linkId_ = null; + if (linkIdBuilder_ != null) { + linkIdBuilder_.dispose(); linkIdBuilder_ = null; } return this; @@ -1069,85 +903,55 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.KpiDescriptor buildPartial() { monitoring.Monitoring.KpiDescriptor result = new monitoring.Monitoring.KpiDescriptor(this); - int from_bitField0_ = bitField0_; - if (kpiIdBuilder_ == null) { - result.kpiId_ = kpiId_; - } else { - result.kpiId_ = kpiIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.kpiDescription_ = kpiDescription_; + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(monitoring.Monitoring.KpiDescriptor result) { if (kpiIdListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { kpiIdList_ = java.util.Collections.unmodifiableList(kpiIdList_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } result.kpiIdList_ = kpiIdList_; } else { result.kpiIdList_ = kpiIdListBuilder_.build(); } - result.kpiSampleType_ = kpiSampleType_; - if (deviceIdBuilder_ == null) { - result.deviceId_ = deviceId_; - } else { - result.deviceId_ = deviceIdBuilder_.build(); + } + + private void buildPartial0(monitoring.Monitoring.KpiDescriptor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build(); } - if (endpointIdBuilder_ == null) { - result.endpointId_ = endpointId_; - } else { - result.endpointId_ = endpointIdBuilder_.build(); + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kpiDescription_ = kpiDescription_; } - if (serviceIdBuilder_ == null) { - result.serviceId_ = serviceId_; - } else { - result.serviceId_ = serviceIdBuilder_.build(); + if (((from_bitField0_ & 0x00000008) != 0)) { + result.kpiSampleType_ = kpiSampleType_; } - if (sliceIdBuilder_ == null) { - result.sliceId_ = sliceId_; - } else { - result.sliceId_ = sliceIdBuilder_.build(); + if (((from_bitField0_ & 0x00000010) != 0)) { + result.deviceId_ = deviceIdBuilder_ == null ? deviceId_ : deviceIdBuilder_.build(); } - if (connectionIdBuilder_ == null) { - result.connectionId_ = connectionId_; - } else { - result.connectionId_ = connectionIdBuilder_.build(); + if (((from_bitField0_ & 0x00000020) != 0)) { + result.endpointId_ = endpointIdBuilder_ == null ? endpointId_ : endpointIdBuilder_.build(); } - if (linkIdBuilder_ == null) { - result.linkId_ = linkId_; - } else { - result.linkId_ = linkIdBuilder_.build(); + if (((from_bitField0_ & 0x00000040) != 0)) { + result.serviceId_ = serviceIdBuilder_ == null ? serviceId_ : serviceIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.sliceId_ = sliceIdBuilder_ == null ? sliceId_ : sliceIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.connectionId_ = connectionIdBuilder_ == null ? connectionId_ : connectionIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.linkId_ = linkIdBuilder_ == null ? linkId_ : linkIdBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); } @java.lang.Override @@ -1168,13 +972,14 @@ public final class Monitoring { } if (!other.getKpiDescription().isEmpty()) { kpiDescription_ = other.kpiDescription_; + bitField0_ |= 0x00000002; onChanged(); } if (kpiIdListBuilder_ == null) { if (!other.kpiIdList_.isEmpty()) { if (kpiIdList_.isEmpty()) { kpiIdList_ = other.kpiIdList_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureKpiIdListIsMutable(); kpiIdList_.addAll(other.kpiIdList_); @@ -1187,7 +992,7 @@ public final class Monitoring { kpiIdListBuilder_.dispose(); kpiIdListBuilder_ = null; kpiIdList_ = other.kpiIdList_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); kpiIdListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKpiIdListFieldBuilder() : null; } else { kpiIdListBuilder_.addAllMessages(other.kpiIdList_); @@ -1215,7 +1020,7 @@ public final class Monitoring { if (other.hasLinkId()) { mergeLinkId(other.getLinkId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1227,17 +1032,110 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.KpiDescriptor parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + kpiDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + monitoring.Monitoring.KpiId m = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); + if (kpiIdListBuilder_ == null) { + ensureKpiIdListIsMutable(); + kpiIdList_.add(m); + } else { + kpiIdListBuilder_.addMessage(m); + } + break; + } + // case 26 + case 32: + { + kpiSampleType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } + // case 32 + case 42: + { + input.readMessage(getDeviceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } + // case 42 + case 50: + { + input.readMessage(getEndpointIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } + // case 50 + case 58: + { + input.readMessage(getServiceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } + // case 58 + case 66: + { + input.readMessage(getSliceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } + // case 66 + case 74: + { + input.readMessage(getConnectionIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } + // case 74 + case 82: + { + input.readMessage(getLinkIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } + // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiDescriptor) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -1252,7 +1150,7 @@ public final class Monitoring { * @return Whether the kpiId field is set. */ public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -1276,10 +1174,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiId_ = value; - onChanged(); } else { kpiIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -1289,10 +1188,11 @@ public final class Monitoring { public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { if (kpiIdBuilder_ == null) { kpiId_ = builderForValue.build(); - onChanged(); } else { kpiIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -1301,15 +1201,16 @@ public final class Monitoring { */ public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) { + getKpiIdBuilder().mergeFrom(value); } else { kpiId_ = value; } - onChanged(); } else { kpiIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -1317,13 +1218,13 @@ public final class Monitoring { * .monitoring.KpiId kpi_id = 1; */ public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } + onChanged(); return this; } @@ -1331,6 +1232,7 @@ public final class Monitoring { * .monitoring.KpiId kpi_id = 1; */ public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getKpiIdFieldBuilder().getBuilder(); } @@ -1400,6 +1302,7 @@ public final class Monitoring { throw new NullPointerException(); } kpiDescription_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1410,6 +1313,7 @@ public final class Monitoring { */ public Builder clearKpiDescription() { kpiDescription_ = getDefaultInstance().getKpiDescription(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -1425,6 +1329,7 @@ public final class Monitoring { } checkByteStringIsUtf8(value); kpiDescription_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1432,9 +1337,9 @@ public final class Monitoring { private java.util.List kpiIdList_ = java.util.Collections.emptyList(); private void ensureKpiIdListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { kpiIdList_ = new java.util.ArrayList(kpiIdList_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; } } @@ -1586,7 +1491,7 @@ public final class Monitoring { public Builder clearKpiIdList() { if (kpiIdListBuilder_ == null) { kpiIdList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { kpiIdListBuilder_.clear(); @@ -1660,7 +1565,7 @@ public final class Monitoring { private com.google.protobuf.RepeatedFieldBuilderV3 getKpiIdListFieldBuilder() { if (kpiIdListBuilder_ == null) { - kpiIdListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(kpiIdList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + kpiIdListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(kpiIdList_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); kpiIdList_ = null; } return kpiIdListBuilder_; @@ -1684,6 +1589,7 @@ public final class Monitoring { */ public Builder setKpiSampleTypeValue(int value) { kpiSampleType_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1694,8 +1600,7 @@ public final class Monitoring { */ @java.lang.Override public kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleType() { - @SuppressWarnings("deprecation") - kpi_sample_types.KpiSampleTypes.KpiSampleType result = kpi_sample_types.KpiSampleTypes.KpiSampleType.valueOf(kpiSampleType_); + kpi_sample_types.KpiSampleTypes.KpiSampleType result = kpi_sample_types.KpiSampleTypes.KpiSampleType.forNumber(kpiSampleType_); return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; } @@ -1708,6 +1613,7 @@ public final class Monitoring { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000008; kpiSampleType_ = value.getNumber(); onChanged(); return this; @@ -1718,6 +1624,7 @@ public final class Monitoring { * @return This builder for chaining. */ public Builder clearKpiSampleType() { + bitField0_ = (bitField0_ & ~0x00000008); kpiSampleType_ = 0; onChanged(); return this; @@ -1732,7 +1639,7 @@ public final class Monitoring { * @return Whether the deviceId field is set. */ public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; + return ((bitField0_ & 0x00000010) != 0); } /** @@ -1756,10 +1663,11 @@ public final class Monitoring { throw new NullPointerException(); } deviceId_ = value; - onChanged(); } else { deviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -1769,10 +1677,11 @@ public final class Monitoring { public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { if (deviceIdBuilder_ == null) { deviceId_ = builderForValue.build(); - onChanged(); } else { deviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -1781,15 +1690,16 @@ public final class Monitoring { */ public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000010) != 0) && deviceId_ != null && deviceId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) { + getDeviceIdBuilder().mergeFrom(value); } else { deviceId_ = value; } - onChanged(); } else { deviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -1797,13 +1707,13 @@ public final class Monitoring { * .context.DeviceId device_id = 5; */ public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; + bitField0_ = (bitField0_ & ~0x00000010); + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); deviceIdBuilder_ = null; } + onChanged(); return this; } @@ -1811,6 +1721,7 @@ public final class Monitoring { * .context.DeviceId device_id = 5; */ public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + bitField0_ |= 0x00000010; onChanged(); return getDeviceIdFieldBuilder().getBuilder(); } @@ -1846,7 +1757,7 @@ public final class Monitoring { * @return Whether the endpointId field is set. */ public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; + return ((bitField0_ & 0x00000020) != 0); } /** @@ -1870,10 +1781,11 @@ public final class Monitoring { throw new NullPointerException(); } endpointId_ = value; - onChanged(); } else { endpointIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -1883,10 +1795,11 @@ public final class Monitoring { public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { if (endpointIdBuilder_ == null) { endpointId_ = builderForValue.build(); - onChanged(); } else { endpointIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -1895,15 +1808,16 @@ public final class Monitoring { */ public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000020) != 0) && endpointId_ != null && endpointId_ != context.ContextOuterClass.EndPointId.getDefaultInstance()) { + getEndpointIdBuilder().mergeFrom(value); } else { endpointId_ = value; } - onChanged(); } else { endpointIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -1911,13 +1825,13 @@ public final class Monitoring { * .context.EndPointId endpoint_id = 6; */ public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; + bitField0_ = (bitField0_ & ~0x00000020); + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } + onChanged(); return this; } @@ -1925,6 +1839,7 @@ public final class Monitoring { * .context.EndPointId endpoint_id = 6; */ public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + bitField0_ |= 0x00000020; onChanged(); return getEndpointIdFieldBuilder().getBuilder(); } @@ -1960,7 +1875,7 @@ public final class Monitoring { * @return Whether the serviceId field is set. */ public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; + return ((bitField0_ & 0x00000040) != 0); } /** @@ -1984,10 +1899,11 @@ public final class Monitoring { throw new NullPointerException(); } serviceId_ = value; - onChanged(); } else { serviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000040; + onChanged(); return this; } @@ -1997,10 +1913,11 @@ public final class Monitoring { public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { if (serviceIdBuilder_ == null) { serviceId_ = builderForValue.build(); - onChanged(); } else { serviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000040; + onChanged(); return this; } @@ -2009,15 +1926,16 @@ public final class Monitoring { */ public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000040) != 0) && serviceId_ != null && serviceId_ != context.ContextOuterClass.ServiceId.getDefaultInstance()) { + getServiceIdBuilder().mergeFrom(value); } else { serviceId_ = value; } - onChanged(); } else { serviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000040; + onChanged(); return this; } @@ -2025,13 +1943,13 @@ public final class Monitoring { * .context.ServiceId service_id = 7; */ public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; + bitField0_ = (bitField0_ & ~0x00000040); + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); serviceIdBuilder_ = null; } + onChanged(); return this; } @@ -2039,6 +1957,7 @@ public final class Monitoring { * .context.ServiceId service_id = 7; */ public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + bitField0_ |= 0x00000040; onChanged(); return getServiceIdFieldBuilder().getBuilder(); } @@ -2074,7 +1993,7 @@ public final class Monitoring { * @return Whether the sliceId field is set. */ public boolean hasSliceId() { - return sliceIdBuilder_ != null || sliceId_ != null; + return ((bitField0_ & 0x00000080) != 0); } /** @@ -2098,10 +2017,11 @@ public final class Monitoring { throw new NullPointerException(); } sliceId_ = value; - onChanged(); } else { sliceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000080; + onChanged(); return this; } @@ -2111,10 +2031,11 @@ public final class Monitoring { public Builder setSliceId(context.ContextOuterClass.SliceId.Builder builderForValue) { if (sliceIdBuilder_ == null) { sliceId_ = builderForValue.build(); - onChanged(); } else { sliceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000080; + onChanged(); return this; } @@ -2123,15 +2044,16 @@ public final class Monitoring { */ public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { if (sliceIdBuilder_ == null) { - if (sliceId_ != null) { - sliceId_ = context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000080) != 0) && sliceId_ != null && sliceId_ != context.ContextOuterClass.SliceId.getDefaultInstance()) { + getSliceIdBuilder().mergeFrom(value); } else { sliceId_ = value; } - onChanged(); } else { sliceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000080; + onChanged(); return this; } @@ -2139,13 +2061,13 @@ public final class Monitoring { * .context.SliceId slice_id = 8; */ public Builder clearSliceId() { - if (sliceIdBuilder_ == null) { - sliceId_ = null; - onChanged(); - } else { - sliceId_ = null; + bitField0_ = (bitField0_ & ~0x00000080); + sliceId_ = null; + if (sliceIdBuilder_ != null) { + sliceIdBuilder_.dispose(); sliceIdBuilder_ = null; } + onChanged(); return this; } @@ -2153,6 +2075,7 @@ public final class Monitoring { * .context.SliceId slice_id = 8; */ public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { + bitField0_ |= 0x00000080; onChanged(); return getSliceIdFieldBuilder().getBuilder(); } @@ -2188,7 +2111,7 @@ public final class Monitoring { * @return Whether the connectionId field is set. */ public boolean hasConnectionId() { - return connectionIdBuilder_ != null || connectionId_ != null; + return ((bitField0_ & 0x00000100) != 0); } /** @@ -2212,10 +2135,11 @@ public final class Monitoring { throw new NullPointerException(); } connectionId_ = value; - onChanged(); } else { connectionIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -2225,10 +2149,11 @@ public final class Monitoring { public Builder setConnectionId(context.ContextOuterClass.ConnectionId.Builder builderForValue) { if (connectionIdBuilder_ == null) { connectionId_ = builderForValue.build(); - onChanged(); } else { connectionIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -2237,15 +2162,16 @@ public final class Monitoring { */ public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { if (connectionIdBuilder_ == null) { - if (connectionId_ != null) { - connectionId_ = context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000100) != 0) && connectionId_ != null && connectionId_ != context.ContextOuterClass.ConnectionId.getDefaultInstance()) { + getConnectionIdBuilder().mergeFrom(value); } else { connectionId_ = value; } - onChanged(); } else { connectionIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -2253,13 +2179,13 @@ public final class Monitoring { * .context.ConnectionId connection_id = 9; */ public Builder clearConnectionId() { - if (connectionIdBuilder_ == null) { - connectionId_ = null; - onChanged(); - } else { - connectionId_ = null; + bitField0_ = (bitField0_ & ~0x00000100); + connectionId_ = null; + if (connectionIdBuilder_ != null) { + connectionIdBuilder_.dispose(); connectionIdBuilder_ = null; } + onChanged(); return this; } @@ -2267,6 +2193,7 @@ public final class Monitoring { * .context.ConnectionId connection_id = 9; */ public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { + bitField0_ |= 0x00000100; onChanged(); return getConnectionIdFieldBuilder().getBuilder(); } @@ -2302,7 +2229,7 @@ public final class Monitoring { * @return Whether the linkId field is set. */ public boolean hasLinkId() { - return linkIdBuilder_ != null || linkId_ != null; + return ((bitField0_ & 0x00000200) != 0); } /** @@ -2326,10 +2253,11 @@ public final class Monitoring { throw new NullPointerException(); } linkId_ = value; - onChanged(); } else { linkIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000200; + onChanged(); return this; } @@ -2339,10 +2267,11 @@ public final class Monitoring { public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) { if (linkIdBuilder_ == null) { linkId_ = builderForValue.build(); - onChanged(); } else { linkIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000200; + onChanged(); return this; } @@ -2351,15 +2280,16 @@ public final class Monitoring { */ public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { if (linkIdBuilder_ == null) { - if (linkId_ != null) { - linkId_ = context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000200) != 0) && linkId_ != null && linkId_ != context.ContextOuterClass.LinkId.getDefaultInstance()) { + getLinkIdBuilder().mergeFrom(value); } else { linkId_ = value; } - onChanged(); } else { linkIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000200; + onChanged(); return this; } @@ -2367,13 +2297,13 @@ public final class Monitoring { * .context.LinkId link_id = 10; */ public Builder clearLinkId() { - if (linkIdBuilder_ == null) { - linkId_ = null; - onChanged(); - } else { - linkId_ = null; + bitField0_ = (bitField0_ & ~0x00000200); + linkId_ = null; + if (linkIdBuilder_ != null) { + linkIdBuilder_.dispose(); linkIdBuilder_ = null; } + onChanged(); return this; } @@ -2381,6 +2311,7 @@ public final class Monitoring { * .context.LinkId link_id = 10; */ public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { + bitField0_ |= 0x00000200; onChanged(); return getLinkIdFieldBuilder().getBuilder(); } @@ -2434,7 +2365,17 @@ public final class Monitoring { @java.lang.Override public KpiDescriptor parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KpiDescriptor(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2512,74 +2453,13 @@ public final class Monitoring { return new MonitorKpiRequest(); } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_MonitorKpiRequest_descriptor; + } + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private MonitorKpiRequest(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.KpiId.Builder subBuilder = null; - if (kpiId_ != null) { - subBuilder = kpiId_.toBuilder(); - } - kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiId_); - kpiId_ = subBuilder.buildPartial(); - } - break; - } - case 21: - { - monitoringWindowS_ = input.readFloat(); - break; - } - case 29: - { - samplingRateS_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_MonitorKpiRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_MonitorKpiRequest_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.MonitorKpiRequest.class, monitoring.Monitoring.MonitorKpiRequest.Builder.class); + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_MonitorKpiRequest_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.MonitorKpiRequest.class, monitoring.Monitoring.MonitorKpiRequest.Builder.class); } public static final int KPI_ID_FIELD_NUMBER = 1; @@ -2609,12 +2489,12 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2; - private float monitoringWindowS_; + private float monitoringWindowS_ = 0F; /** * float monitoring_window_s = 2; @@ -2627,7 +2507,7 @@ public final class Monitoring { public static final int SAMPLING_RATE_S_FIELD_NUMBER = 3; - private float samplingRateS_; + private float samplingRateS_ = 0F; /** *
@@ -2660,13 +2540,13 @@ public final class Monitoring {
             if (kpiId_ != null) {
                 output.writeMessage(1, getKpiId());
             }
-            if (monitoringWindowS_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(monitoringWindowS_) != 0) {
                 output.writeFloat(2, monitoringWindowS_);
             }
-            if (samplingRateS_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(samplingRateS_) != 0) {
                 output.writeFloat(3, samplingRateS_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -2678,13 +2558,13 @@ public final class Monitoring {
             if (kpiId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId());
             }
-            if (monitoringWindowS_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(monitoringWindowS_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, monitoringWindowS_);
             }
-            if (samplingRateS_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(samplingRateS_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, samplingRateS_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -2708,7 +2588,7 @@ public final class Monitoring {
                 return false;
             if (java.lang.Float.floatToIntBits(getSamplingRateS()) != java.lang.Float.floatToIntBits(other.getSamplingRateS()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -2728,7 +2608,7 @@ public final class Monitoring {
             hash = (53 * hash) + java.lang.Float.floatToIntBits(getMonitoringWindowS());
             hash = (37 * hash) + SAMPLING_RATE_S_FIELD_NUMBER;
             hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingRateS());
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -2822,26 +2702,19 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.MonitorKpiRequest.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (kpiIdBuilder_ == null) {
-                    kpiId_ = null;
-                } else {
-                    kpiId_ = null;
+                bitField0_ = 0;
+                kpiId_ = null;
+                if (kpiIdBuilder_ != null) {
+                    kpiIdBuilder_.dispose();
                     kpiIdBuilder_ = null;
                 }
                 monitoringWindowS_ = 0F;
@@ -2871,45 +2744,24 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.MonitorKpiRequest buildPartial() {
                 monitoring.Monitoring.MonitorKpiRequest result = new monitoring.Monitoring.MonitorKpiRequest(this);
-                if (kpiIdBuilder_ == null) {
-                    result.kpiId_ = kpiId_;
-                } else {
-                    result.kpiId_ = kpiIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.monitoringWindowS_ = monitoringWindowS_;
-                result.samplingRateS_ = samplingRateS_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.MonitorKpiRequest result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.monitoringWindowS_ = monitoringWindowS_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.samplingRateS_ = samplingRateS_;
+                }
             }
 
             @java.lang.Override
@@ -2934,7 +2786,7 @@ public final class Monitoring {
                 if (other.getSamplingRateS() != 0F) {
                     setSamplingRateS(other.getSamplingRateS());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -2946,20 +2798,61 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.MonitorKpiRequest parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 21:
+                                {
+                                    monitoringWindowS_ = input.readFloat();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 21
+                            case 29:
+                                {
+                                    samplingRateS_ = input.readFloat();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 29
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.MonitorKpiRequest) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private monitoring.Monitoring.KpiId kpiId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_;
@@ -2969,7 +2862,7 @@ public final class Monitoring {
              * @return Whether the kpiId field is set.
              */
             public boolean hasKpiId() {
-                return kpiIdBuilder_ != null || kpiId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -2993,10 +2886,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     kpiId_ = value;
-                    onChanged();
                 } else {
                     kpiIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -3006,10 +2900,11 @@ public final class Monitoring {
             public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) {
                 if (kpiIdBuilder_ == null) {
                     kpiId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     kpiIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -3018,15 +2913,16 @@ public final class Monitoring {
              */
             public Builder mergeKpiId(monitoring.Monitoring.KpiId value) {
                 if (kpiIdBuilder_ == null) {
-                    if (kpiId_ != null) {
-                        kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) {
+                        getKpiIdBuilder().mergeFrom(value);
                     } else {
                         kpiId_ = value;
                     }
-                    onChanged();
                 } else {
                     kpiIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -3034,13 +2930,13 @@ public final class Monitoring {
              * .monitoring.KpiId kpi_id = 1;
              */
             public Builder clearKpiId() {
-                if (kpiIdBuilder_ == null) {
-                    kpiId_ = null;
-                    onChanged();
-                } else {
-                    kpiId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                kpiId_ = null;
+                if (kpiIdBuilder_ != null) {
+                    kpiIdBuilder_.dispose();
                     kpiIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -3048,6 +2944,7 @@ public final class Monitoring {
              * .monitoring.KpiId kpi_id = 1;
              */
             public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getKpiIdFieldBuilder().getBuilder();
             }
@@ -3092,6 +2989,7 @@ public final class Monitoring {
              */
             public Builder setMonitoringWindowS(float value) {
                 monitoringWindowS_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -3101,6 +2999,7 @@ public final class Monitoring {
              * @return This builder for chaining.
              */
             public Builder clearMonitoringWindowS() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 monitoringWindowS_ = 0F;
                 onChanged();
                 return this;
@@ -3132,6 +3031,7 @@ public final class Monitoring {
              */
             public Builder setSamplingRateS(float value) {
                 samplingRateS_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -3145,6 +3045,7 @@ public final class Monitoring {
              * @return This builder for chaining.
              */
             public Builder clearSamplingRateS() {
+                bitField0_ = (bitField0_ & ~0x00000004);
                 samplingRateS_ = 0F;
                 onChanged();
                 return this;
@@ -3177,7 +3078,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public MonitorKpiRequest parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new MonitorKpiRequest(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -3322,93 +3233,6 @@ public final class Monitoring {
             return new KpiQuery();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private KpiQuery(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    kpiIds_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                kpiIds_.add(input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry));
-                                break;
-                            }
-                        case 21:
-                            {
-                                monitoringWindowS_ = input.readFloat();
-                                break;
-                            }
-                        case 24:
-                            {
-                                lastNSamples_ = input.readUInt32();
-                                break;
-                            }
-                        case 34:
-                            {
-                                context.ContextOuterClass.Timestamp.Builder subBuilder = null;
-                                if (startTimestamp_ != null) {
-                                    subBuilder = startTimestamp_.toBuilder();
-                                }
-                                startTimestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(startTimestamp_);
-                                    startTimestamp_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 42:
-                            {
-                                context.ContextOuterClass.Timestamp.Builder subBuilder = null;
-                                if (endTimestamp_ != null) {
-                                    subBuilder = endTimestamp_.toBuilder();
-                                }
-                                endTimestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(endTimestamp_);
-                                    endTimestamp_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    kpiIds_ = java.util.Collections.unmodifiableList(kpiIds_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_KpiQuery_descriptor;
         }
@@ -3420,6 +3244,7 @@ public final class Monitoring {
 
         public static final int KPI_IDS_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List kpiIds_;
 
         /**
@@ -3464,7 +3289,7 @@ public final class Monitoring {
 
         public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2;
 
-        private float monitoringWindowS_;
+        private float monitoringWindowS_ = 0F;
 
         /**
          * float monitoring_window_s = 2;
@@ -3477,7 +3302,7 @@ public final class Monitoring {
 
         public static final int LAST_N_SAMPLES_FIELD_NUMBER = 3;
 
-        private int lastNSamples_;
+        private int lastNSamples_ = 0;
 
         /**
          * 
@@ -3531,7 +3356,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() {
-            return getStartTimestamp();
+            return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_;
         }
 
         public static final int END_TIMESTAMP_FIELD_NUMBER = 5;
@@ -3573,7 +3398,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() {
-            return getEndTimestamp();
+            return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -3594,7 +3419,7 @@ public final class Monitoring {
             for (int i = 0; i < kpiIds_.size(); i++) {
                 output.writeMessage(1, kpiIds_.get(i));
             }
-            if (monitoringWindowS_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(monitoringWindowS_) != 0) {
                 output.writeFloat(2, monitoringWindowS_);
             }
             if (lastNSamples_ != 0) {
@@ -3606,7 +3431,7 @@ public final class Monitoring {
             if (endTimestamp_ != null) {
                 output.writeMessage(5, getEndTimestamp());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -3618,7 +3443,7 @@ public final class Monitoring {
             for (int i = 0; i < kpiIds_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, kpiIds_.get(i));
             }
-            if (monitoringWindowS_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(monitoringWindowS_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, monitoringWindowS_);
             }
             if (lastNSamples_ != 0) {
@@ -3630,7 +3455,7 @@ public final class Monitoring {
             if (endTimestamp_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndTimestamp());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -3662,7 +3487,7 @@ public final class Monitoring {
                 if (!getEndTimestamp().equals(other.getEndTimestamp()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -3690,7 +3515,7 @@ public final class Monitoring {
                 hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER;
                 hash = (53 * hash) + getEndTimestamp().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -3784,41 +3609,33 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.KpiQuery.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getKpiIdsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (kpiIdsBuilder_ == null) {
                     kpiIds_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    kpiIds_ = null;
                     kpiIdsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 monitoringWindowS_ = 0F;
                 lastNSamples_ = 0;
-                if (startTimestampBuilder_ == null) {
-                    startTimestamp_ = null;
-                } else {
-                    startTimestamp_ = null;
+                startTimestamp_ = null;
+                if (startTimestampBuilder_ != null) {
+                    startTimestampBuilder_.dispose();
                     startTimestampBuilder_ = null;
                 }
-                if (endTimestampBuilder_ == null) {
-                    endTimestamp_ = null;
-                } else {
-                    endTimestamp_ = null;
+                endTimestamp_ = null;
+                if (endTimestampBuilder_ != null) {
+                    endTimestampBuilder_.dispose();
                     endTimestampBuilder_ = null;
                 }
                 return this;
@@ -3846,7 +3663,15 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.KpiQuery buildPartial() {
                 monitoring.Monitoring.KpiQuery result = new monitoring.Monitoring.KpiQuery(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(monitoring.Monitoring.KpiQuery result) {
                 if (kpiIdsBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         kpiIds_ = java.util.Collections.unmodifiableList(kpiIds_);
@@ -3856,50 +3681,22 @@ public final class Monitoring {
                 } else {
                     result.kpiIds_ = kpiIdsBuilder_.build();
                 }
-                result.monitoringWindowS_ = monitoringWindowS_;
-                result.lastNSamples_ = lastNSamples_;
-                if (startTimestampBuilder_ == null) {
-                    result.startTimestamp_ = startTimestamp_;
-                } else {
-                    result.startTimestamp_ = startTimestampBuilder_.build();
-                }
-                if (endTimestampBuilder_ == null) {
-                    result.endTimestamp_ = endTimestamp_;
-                } else {
-                    result.endTimestamp_ = endTimestampBuilder_.build();
-                }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
             }
 
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.KpiQuery result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.monitoringWindowS_ = monitoringWindowS_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.lastNSamples_ = lastNSamples_;
+                }
+                if (((from_bitField0_ & 0x00000008) != 0)) {
+                    result.startTimestamp_ = startTimestampBuilder_ == null ? startTimestamp_ : startTimestampBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000010) != 0)) {
+                    result.endTimestamp_ = endTimestampBuilder_ == null ? endTimestamp_ : endTimestampBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -3951,7 +3748,7 @@ public final class Monitoring {
                 if (other.hasEndTimestamp()) {
                     mergeEndTimestamp(other.getEndTimestamp());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -3963,17 +3760,75 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.KpiQuery parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    monitoring.Monitoring.KpiId m = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry);
+                                    if (kpiIdsBuilder_ == null) {
+                                        ensureKpiIdsIsMutable();
+                                        kpiIds_.add(m);
+                                    } else {
+                                        kpiIdsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            case 21:
+                                {
+                                    monitoringWindowS_ = input.readFloat();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 21
+                            case 24:
+                                {
+                                    lastNSamples_ = input.readUInt32();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 24
+                            case 34:
+                                {
+                                    input.readMessage(getStartTimestampFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000008;
+                                    break;
+                                }
+                            // case 34
+                            case 42:
+                                {
+                                    input.readMessage(getEndTimestampFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000010;
+                                    break;
+                                }
+                            // case 42
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.KpiQuery) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -4234,6 +4089,7 @@ public final class Monitoring {
              */
             public Builder setMonitoringWindowS(float value) {
                 monitoringWindowS_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -4243,6 +4099,7 @@ public final class Monitoring {
              * @return This builder for chaining.
              */
             public Builder clearMonitoringWindowS() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 monitoringWindowS_ = 0F;
                 onChanged();
                 return this;
@@ -4274,6 +4131,7 @@ public final class Monitoring {
              */
             public Builder setLastNSamples(int value) {
                 lastNSamples_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -4287,6 +4145,7 @@ public final class Monitoring {
              * @return This builder for chaining.
              */
             public Builder clearLastNSamples() {
+                bitField0_ = (bitField0_ & ~0x00000004);
                 lastNSamples_ = 0;
                 onChanged();
                 return this;
@@ -4305,7 +4164,7 @@ public final class Monitoring {
              * @return Whether the startTimestamp field is set.
              */
             public boolean hasStartTimestamp() {
-                return startTimestampBuilder_ != null || startTimestamp_ != null;
+                return ((bitField0_ & 0x00000008) != 0);
             }
 
             /**
@@ -4337,10 +4196,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     startTimestamp_ = value;
-                    onChanged();
                 } else {
                     startTimestampBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000008;
+                onChanged();
                 return this;
             }
 
@@ -4354,10 +4214,11 @@ public final class Monitoring {
             public Builder setStartTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) {
                 if (startTimestampBuilder_ == null) {
                     startTimestamp_ = builderForValue.build();
-                    onChanged();
                 } else {
                     startTimestampBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000008;
+                onChanged();
                 return this;
             }
 
@@ -4370,15 +4231,16 @@ public final class Monitoring {
              */
             public Builder mergeStartTimestamp(context.ContextOuterClass.Timestamp value) {
                 if (startTimestampBuilder_ == null) {
-                    if (startTimestamp_ != null) {
-                        startTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(startTimestamp_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000008) != 0) && startTimestamp_ != null && startTimestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) {
+                        getStartTimestampBuilder().mergeFrom(value);
                     } else {
                         startTimestamp_ = value;
                     }
-                    onChanged();
                 } else {
                     startTimestampBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000008;
+                onChanged();
                 return this;
             }
 
@@ -4390,13 +4252,13 @@ public final class Monitoring {
              * .context.Timestamp start_timestamp = 4;
              */
             public Builder clearStartTimestamp() {
-                if (startTimestampBuilder_ == null) {
-                    startTimestamp_ = null;
-                    onChanged();
-                } else {
-                    startTimestamp_ = null;
+                bitField0_ = (bitField0_ & ~0x00000008);
+                startTimestamp_ = null;
+                if (startTimestampBuilder_ != null) {
+                    startTimestampBuilder_.dispose();
                     startTimestampBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -4408,6 +4270,7 @@ public final class Monitoring {
              * .context.Timestamp start_timestamp = 4;
              */
             public context.ContextOuterClass.Timestamp.Builder getStartTimestampBuilder() {
+                bitField0_ |= 0x00000008;
                 onChanged();
                 return getStartTimestampFieldBuilder().getBuilder();
             }
@@ -4455,7 +4318,7 @@ public final class Monitoring {
              * @return Whether the endTimestamp field is set.
              */
             public boolean hasEndTimestamp() {
-                return endTimestampBuilder_ != null || endTimestamp_ != null;
+                return ((bitField0_ & 0x00000010) != 0);
             }
 
             /**
@@ -4487,10 +4350,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     endTimestamp_ = value;
-                    onChanged();
                 } else {
                     endTimestampBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -4504,10 +4368,11 @@ public final class Monitoring {
             public Builder setEndTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) {
                 if (endTimestampBuilder_ == null) {
                     endTimestamp_ = builderForValue.build();
-                    onChanged();
                 } else {
                     endTimestampBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -4520,15 +4385,16 @@ public final class Monitoring {
              */
             public Builder mergeEndTimestamp(context.ContextOuterClass.Timestamp value) {
                 if (endTimestampBuilder_ == null) {
-                    if (endTimestamp_ != null) {
-                        endTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(endTimestamp_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000010) != 0) && endTimestamp_ != null && endTimestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) {
+                        getEndTimestampBuilder().mergeFrom(value);
                     } else {
                         endTimestamp_ = value;
                     }
-                    onChanged();
                 } else {
                     endTimestampBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -4540,13 +4406,13 @@ public final class Monitoring {
              * .context.Timestamp end_timestamp = 5;
              */
             public Builder clearEndTimestamp() {
-                if (endTimestampBuilder_ == null) {
-                    endTimestamp_ = null;
-                    onChanged();
-                } else {
-                    endTimestamp_ = null;
+                bitField0_ = (bitField0_ & ~0x00000010);
+                endTimestamp_ = null;
+                if (endTimestampBuilder_ != null) {
+                    endTimestampBuilder_.dispose();
                     endTimestampBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -4558,6 +4424,7 @@ public final class Monitoring {
              * .context.Timestamp end_timestamp = 5;
              */
             public context.ContextOuterClass.Timestamp.Builder getEndTimestampBuilder() {
+                bitField0_ |= 0x00000010;
                 onChanged();
                 return getEndTimestampFieldBuilder().getBuilder();
             }
@@ -4619,7 +4486,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public KpiQuery parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new KpiQuery(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -4702,70 +4579,6 @@ public final class Monitoring {
             return new RawKpi();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private RawKpi(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Timestamp.Builder subBuilder = null;
-                                if (timestamp_ != null) {
-                                    subBuilder = timestamp_.toBuilder();
-                                }
-                                timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(timestamp_);
-                                    timestamp_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                monitoring.Monitoring.KpiValue.Builder subBuilder = null;
-                                if (kpiValue_ != null) {
-                                    subBuilder = kpiValue_.toBuilder();
-                                }
-                                kpiValue_ = input.readMessage(monitoring.Monitoring.KpiValue.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(kpiValue_);
-                                    kpiValue_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_RawKpi_descriptor;
         }
@@ -4802,7 +4615,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() {
-            return getTimestamp();
+            return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_;
         }
 
         public static final int KPI_VALUE_FIELD_NUMBER = 2;
@@ -4832,7 +4645,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() {
-            return getKpiValue();
+            return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -4856,7 +4669,7 @@ public final class Monitoring {
             if (kpiValue_ != null) {
                 output.writeMessage(2, getKpiValue());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -4871,7 +4684,7 @@ public final class Monitoring {
             if (kpiValue_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiValue());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -4897,7 +4710,7 @@ public final class Monitoring {
                 if (!getKpiValue().equals(other.getKpiValue()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -4917,7 +4730,7 @@ public final class Monitoring {
                 hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER;
                 hash = (53 * hash) + getKpiValue().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -5015,32 +4828,24 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.RawKpi.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (timestampBuilder_ == null) {
-                    timestamp_ = null;
-                } else {
-                    timestamp_ = null;
+                bitField0_ = 0;
+                timestamp_ = null;
+                if (timestampBuilder_ != null) {
+                    timestampBuilder_.dispose();
                     timestampBuilder_ = null;
                 }
-                if (kpiValueBuilder_ == null) {
-                    kpiValue_ = null;
-                } else {
-                    kpiValue_ = null;
+                kpiValue_ = null;
+                if (kpiValueBuilder_ != null) {
+                    kpiValueBuilder_.dispose();
                     kpiValueBuilder_ = null;
                 }
                 return this;
@@ -5068,48 +4873,21 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.RawKpi buildPartial() {
                 monitoring.Monitoring.RawKpi result = new monitoring.Monitoring.RawKpi(this);
-                if (timestampBuilder_ == null) {
-                    result.timestamp_ = timestamp_;
-                } else {
-                    result.timestamp_ = timestampBuilder_.build();
-                }
-                if (kpiValueBuilder_ == null) {
-                    result.kpiValue_ = kpiValue_;
-                } else {
-                    result.kpiValue_ = kpiValueBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.RawKpi result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.kpiValue_ = kpiValueBuilder_ == null ? kpiValue_ : kpiValueBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -5131,7 +4909,7 @@ public final class Monitoring {
                 if (other.hasKpiValue()) {
                     mergeKpiValue(other.getKpiValue());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -5143,20 +4921,54 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.RawKpi parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.RawKpi) e.getUnfinishedMessage();
-                    throw e.unwrapIOException();
-                } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getKpiValueFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
                     }
+                    // while (!done)
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.unwrapIOException();
+                } finally {
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.Timestamp timestamp_;
 
             private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_;
@@ -5166,7 +4978,7 @@ public final class Monitoring {
              * @return Whether the timestamp field is set.
              */
             public boolean hasTimestamp() {
-                return timestampBuilder_ != null || timestamp_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -5190,10 +5002,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     timestamp_ = value;
-                    onChanged();
                 } else {
                     timestampBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -5203,10 +5016,11 @@ public final class Monitoring {
             public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) {
                 if (timestampBuilder_ == null) {
                     timestamp_ = builderForValue.build();
-                    onChanged();
                 } else {
                     timestampBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -5215,15 +5029,16 @@ public final class Monitoring {
              */
             public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) {
                 if (timestampBuilder_ == null) {
-                    if (timestamp_ != null) {
-                        timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && timestamp_ != null && timestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) {
+                        getTimestampBuilder().mergeFrom(value);
                     } else {
                         timestamp_ = value;
                     }
-                    onChanged();
                 } else {
                     timestampBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -5231,13 +5046,13 @@ public final class Monitoring {
              * .context.Timestamp timestamp = 1;
              */
             public Builder clearTimestamp() {
-                if (timestampBuilder_ == null) {
-                    timestamp_ = null;
-                    onChanged();
-                } else {
-                    timestamp_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                timestamp_ = null;
+                if (timestampBuilder_ != null) {
+                    timestampBuilder_.dispose();
                     timestampBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -5245,6 +5060,7 @@ public final class Monitoring {
              * .context.Timestamp timestamp = 1;
              */
             public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getTimestampFieldBuilder().getBuilder();
             }
@@ -5280,7 +5096,7 @@ public final class Monitoring {
              * @return Whether the kpiValue field is set.
              */
             public boolean hasKpiValue() {
-                return kpiValueBuilder_ != null || kpiValue_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -5304,10 +5120,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     kpiValue_ = value;
-                    onChanged();
                 } else {
                     kpiValueBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -5317,10 +5134,11 @@ public final class Monitoring {
             public Builder setKpiValue(monitoring.Monitoring.KpiValue.Builder builderForValue) {
                 if (kpiValueBuilder_ == null) {
                     kpiValue_ = builderForValue.build();
-                    onChanged();
                 } else {
                     kpiValueBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -5329,15 +5147,16 @@ public final class Monitoring {
              */
             public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) {
                 if (kpiValueBuilder_ == null) {
-                    if (kpiValue_ != null) {
-                        kpiValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && kpiValue_ != null && kpiValue_ != monitoring.Monitoring.KpiValue.getDefaultInstance()) {
+                        getKpiValueBuilder().mergeFrom(value);
                     } else {
                         kpiValue_ = value;
                     }
-                    onChanged();
                 } else {
                     kpiValueBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -5345,13 +5164,13 @@ public final class Monitoring {
              * .monitoring.KpiValue kpi_value = 2;
              */
             public Builder clearKpiValue() {
-                if (kpiValueBuilder_ == null) {
-                    kpiValue_ = null;
-                    onChanged();
-                } else {
-                    kpiValue_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                kpiValue_ = null;
+                if (kpiValueBuilder_ != null) {
+                    kpiValueBuilder_.dispose();
                     kpiValueBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -5359,6 +5178,7 @@ public final class Monitoring {
              * .monitoring.KpiValue kpi_value = 2;
              */
             public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getKpiValueFieldBuilder().getBuilder();
             }
@@ -5412,7 +5232,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public RawKpi parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new RawKpi(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -5504,70 +5334,6 @@ public final class Monitoring {
             return new RawKpiList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private RawKpiList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                monitoring.Monitoring.KpiId.Builder subBuilder = null;
-                                if (kpiId_ != null) {
-                                    subBuilder = kpiId_.toBuilder();
-                                }
-                                kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(kpiId_);
-                                    kpiId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    rawKpis_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                rawKpis_.add(input.readMessage(monitoring.Monitoring.RawKpi.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    rawKpis_ = java.util.Collections.unmodifiableList(rawKpis_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_RawKpiList_descriptor;
         }
@@ -5604,11 +5370,12 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() {
-            return getKpiId();
+            return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_;
         }
 
         public static final int RAW_KPIS_FIELD_NUMBER = 2;
 
+        @SuppressWarnings("serial")
         private java.util.List rawKpis_;
 
         /**
@@ -5672,7 +5439,7 @@ public final class Monitoring {
             for (int i = 0; i < rawKpis_.size(); i++) {
                 output.writeMessage(2, rawKpis_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -5687,7 +5454,7 @@ public final class Monitoring {
             for (int i = 0; i < rawKpis_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, rawKpis_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -5709,7 +5476,7 @@ public final class Monitoring {
             }
             if (!getRawKpisList().equals(other.getRawKpisList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -5729,7 +5496,7 @@ public final class Monitoring {
                 hash = (37 * hash) + RAW_KPIS_FIELD_NUMBER;
                 hash = (53 * hash) + getRawKpisList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -5827,35 +5594,28 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.RawKpiList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getRawKpisFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (kpiIdBuilder_ == null) {
-                    kpiId_ = null;
-                } else {
-                    kpiId_ = null;
+                bitField0_ = 0;
+                kpiId_ = null;
+                if (kpiIdBuilder_ != null) {
+                    kpiIdBuilder_.dispose();
                     kpiIdBuilder_ = null;
                 }
                 if (rawKpisBuilder_ == null) {
                     rawKpis_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    rawKpis_ = null;
                     rawKpisBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000002);
                 return this;
             }
 
@@ -5881,53 +5641,31 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.RawKpiList buildPartial() {
                 monitoring.Monitoring.RawKpiList result = new monitoring.Monitoring.RawKpiList(this);
-                int from_bitField0_ = bitField0_;
-                if (kpiIdBuilder_ == null) {
-                    result.kpiId_ = kpiId_;
-                } else {
-                    result.kpiId_ = kpiIdBuilder_.build();
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(monitoring.Monitoring.RawKpiList result) {
                 if (rawKpisBuilder_ == null) {
-                    if (((bitField0_ & 0x00000001) != 0)) {
+                    if (((bitField0_ & 0x00000002) != 0)) {
                         rawKpis_ = java.util.Collections.unmodifiableList(rawKpis_);
-                        bitField0_ = (bitField0_ & ~0x00000001);
+                        bitField0_ = (bitField0_ & ~0x00000002);
                     }
                     result.rawKpis_ = rawKpis_;
                 } else {
                     result.rawKpis_ = rawKpisBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
             }
 
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.RawKpiList result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -5950,7 +5688,7 @@ public final class Monitoring {
                     if (!other.rawKpis_.isEmpty()) {
                         if (rawKpis_.isEmpty()) {
                             rawKpis_ = other.rawKpis_;
-                            bitField0_ = (bitField0_ & ~0x00000001);
+                            bitField0_ = (bitField0_ & ~0x00000002);
                         } else {
                             ensureRawKpisIsMutable();
                             rawKpis_.addAll(other.rawKpis_);
@@ -5963,14 +5701,14 @@ public final class Monitoring {
                             rawKpisBuilder_.dispose();
                             rawKpisBuilder_ = null;
                             rawKpis_ = other.rawKpis_;
-                            bitField0_ = (bitField0_ & ~0x00000001);
+                            bitField0_ = (bitField0_ & ~0x00000002);
                             rawKpisBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRawKpisFieldBuilder() : null;
                         } else {
                             rawKpisBuilder_.addAllMessages(other.rawKpis_);
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -5982,17 +5720,54 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.RawKpiList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    monitoring.Monitoring.RawKpi m = input.readMessage(monitoring.Monitoring.RawKpi.parser(), extensionRegistry);
+                                    if (rawKpisBuilder_ == null) {
+                                        ensureRawKpisIsMutable();
+                                        rawKpis_.add(m);
+                                    } else {
+                                        rawKpisBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.RawKpiList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -6007,7 +5782,7 @@ public final class Monitoring {
              * @return Whether the kpiId field is set.
              */
             public boolean hasKpiId() {
-                return kpiIdBuilder_ != null || kpiId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -6031,10 +5806,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     kpiId_ = value;
-                    onChanged();
                 } else {
                     kpiIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -6044,10 +5820,11 @@ public final class Monitoring {
             public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) {
                 if (kpiIdBuilder_ == null) {
                     kpiId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     kpiIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -6056,15 +5833,16 @@ public final class Monitoring {
              */
             public Builder mergeKpiId(monitoring.Monitoring.KpiId value) {
                 if (kpiIdBuilder_ == null) {
-                    if (kpiId_ != null) {
-                        kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) {
+                        getKpiIdBuilder().mergeFrom(value);
                     } else {
                         kpiId_ = value;
                     }
-                    onChanged();
                 } else {
                     kpiIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -6072,13 +5850,13 @@ public final class Monitoring {
              * .monitoring.KpiId kpi_id = 1;
              */
             public Builder clearKpiId() {
-                if (kpiIdBuilder_ == null) {
-                    kpiId_ = null;
-                    onChanged();
-                } else {
-                    kpiId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                kpiId_ = null;
+                if (kpiIdBuilder_ != null) {
+                    kpiIdBuilder_.dispose();
                     kpiIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -6086,6 +5864,7 @@ public final class Monitoring {
              * .monitoring.KpiId kpi_id = 1;
              */
             public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getKpiIdFieldBuilder().getBuilder();
             }
@@ -6115,9 +5894,9 @@ public final class Monitoring {
             private java.util.List rawKpis_ = java.util.Collections.emptyList();
 
             private void ensureRawKpisIsMutable() {
-                if (!((bitField0_ & 0x00000001) != 0)) {
+                if (!((bitField0_ & 0x00000002) != 0)) {
                     rawKpis_ = new java.util.ArrayList(rawKpis_);
-                    bitField0_ |= 0x00000001;
+                    bitField0_ |= 0x00000002;
                 }
             }
 
@@ -6269,7 +6048,7 @@ public final class Monitoring {
             public Builder clearRawKpis() {
                 if (rawKpisBuilder_ == null) {
                     rawKpis_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
+                    bitField0_ = (bitField0_ & ~0x00000002);
                     onChanged();
                 } else {
                     rawKpisBuilder_.clear();
@@ -6343,7 +6122,7 @@ public final class Monitoring {
 
             private com.google.protobuf.RepeatedFieldBuilderV3 getRawKpisFieldBuilder() {
                 if (rawKpisBuilder_ == null) {
-                    rawKpisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(rawKpis_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
+                    rawKpisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(rawKpis_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
                     rawKpis_ = null;
                 }
                 return rawKpisBuilder_;
@@ -6376,7 +6155,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public RawKpiList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new RawKpiList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -6451,57 +6240,6 @@ public final class Monitoring {
             return new RawKpiTable();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private RawKpiTable(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    rawKpiLists_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                rawKpiLists_.add(input.readMessage(monitoring.Monitoring.RawKpiList.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    rawKpiLists_ = java.util.Collections.unmodifiableList(rawKpiLists_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_descriptor;
         }
@@ -6513,6 +6251,7 @@ public final class Monitoring {
 
         public static final int RAW_KPI_LISTS_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List rawKpiLists_;
 
         /**
@@ -6573,7 +6312,7 @@ public final class Monitoring {
             for (int i = 0; i < rawKpiLists_.size(); i++) {
                 output.writeMessage(1, rawKpiLists_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -6585,7 +6324,7 @@ public final class Monitoring {
             for (int i = 0; i < rawKpiLists_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rawKpiLists_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -6601,7 +6340,7 @@ public final class Monitoring {
             monitoring.Monitoring.RawKpiTable other = (monitoring.Monitoring.RawKpiTable) obj;
             if (!getRawKpiListsList().equals(other.getRawKpiListsList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -6617,7 +6356,7 @@ public final class Monitoring {
                 hash = (37 * hash) + RAW_KPI_LISTS_FIELD_NUMBER;
                 hash = (53 * hash) + getRawKpiListsList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -6715,29 +6454,23 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.RawKpiTable.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getRawKpiListsFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (rawKpiListsBuilder_ == null) {
                     rawKpiLists_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    rawKpiLists_ = null;
                     rawKpiListsBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -6763,7 +6496,15 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.RawKpiTable buildPartial() {
                 monitoring.Monitoring.RawKpiTable result = new monitoring.Monitoring.RawKpiTable(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(monitoring.Monitoring.RawKpiTable result) {
                 if (rawKpiListsBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         rawKpiLists_ = java.util.Collections.unmodifiableList(rawKpiLists_);
@@ -6773,38 +6514,10 @@ public final class Monitoring {
                 } else {
                     result.rawKpiLists_ = rawKpiListsBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
             }
 
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.RawKpiTable result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -6844,7 +6557,7 @@ public final class Monitoring {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -6856,17 +6569,47 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.RawKpiTable parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    monitoring.Monitoring.RawKpiList m = input.readMessage(monitoring.Monitoring.RawKpiList.parser(), extensionRegistry);
+                                    if (rawKpiListsBuilder_ == null) {
+                                        ensureRawKpiListsIsMutable();
+                                        rawKpiLists_.add(m);
+                                    } else {
+                                        rawKpiListsBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.RawKpiTable) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -7136,7 +6879,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public RawKpiTable parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new RawKpiTable(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -7198,57 +6951,6 @@ public final class Monitoring {
             return new KpiId();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private KpiId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Uuid.Builder subBuilder = null;
-                                if (kpiId_ != null) {
-                                    subBuilder = kpiId_.toBuilder();
-                                }
-                                kpiId_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(kpiId_);
-                                    kpiId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_KpiId_descriptor;
         }
@@ -7285,7 +6987,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder() {
-            return getKpiId();
+            return kpiId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -7306,7 +7008,7 @@ public final class Monitoring {
             if (kpiId_ != null) {
                 output.writeMessage(1, getKpiId());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -7318,7 +7020,7 @@ public final class Monitoring {
             if (kpiId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -7338,7 +7040,7 @@ public final class Monitoring {
                 if (!getKpiId().equals(other.getKpiId()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -7354,7 +7056,7 @@ public final class Monitoring {
                 hash = (37 * hash) + KPI_ID_FIELD_NUMBER;
                 hash = (53 * hash) + getKpiId().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -7448,26 +7150,19 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.KpiId.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (kpiIdBuilder_ == null) {
-                    kpiId_ = null;
-                } else {
-                    kpiId_ = null;
+                bitField0_ = 0;
+                kpiId_ = null;
+                if (kpiIdBuilder_ != null) {
+                    kpiIdBuilder_.dispose();
                     kpiIdBuilder_ = null;
                 }
                 return this;
@@ -7495,43 +7190,18 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.KpiId buildPartial() {
                 monitoring.Monitoring.KpiId result = new monitoring.Monitoring.KpiId(this);
-                if (kpiIdBuilder_ == null) {
-                    result.kpiId_ = kpiId_;
-                } else {
-                    result.kpiId_ = kpiIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.KpiId result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -7550,7 +7220,7 @@ public final class Monitoring {
                 if (other.hasKpiId()) {
                     mergeKpiId(other.getKpiId());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -7562,20 +7232,47 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.KpiId parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.KpiId) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.Uuid kpiId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_;
@@ -7585,7 +7282,7 @@ public final class Monitoring {
              * @return Whether the kpiId field is set.
              */
             public boolean hasKpiId() {
-                return kpiIdBuilder_ != null || kpiId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -7609,10 +7306,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     kpiId_ = value;
-                    onChanged();
                 } else {
                     kpiIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -7622,10 +7320,11 @@ public final class Monitoring {
             public Builder setKpiId(context.ContextOuterClass.Uuid.Builder builderForValue) {
                 if (kpiIdBuilder_ == null) {
                     kpiId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     kpiIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -7634,15 +7333,16 @@ public final class Monitoring {
              */
             public Builder mergeKpiId(context.ContextOuterClass.Uuid value) {
                 if (kpiIdBuilder_ == null) {
-                    if (kpiId_ != null) {
-                        kpiId_ = context.ContextOuterClass.Uuid.newBuilder(kpiId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && kpiId_ != null && kpiId_ != context.ContextOuterClass.Uuid.getDefaultInstance()) {
+                        getKpiIdBuilder().mergeFrom(value);
                     } else {
                         kpiId_ = value;
                     }
-                    onChanged();
                 } else {
                     kpiIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -7650,13 +7350,13 @@ public final class Monitoring {
              * .context.Uuid kpi_id = 1;
              */
             public Builder clearKpiId() {
-                if (kpiIdBuilder_ == null) {
-                    kpiId_ = null;
-                    onChanged();
-                } else {
-                    kpiId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                kpiId_ = null;
+                if (kpiIdBuilder_ != null) {
+                    kpiIdBuilder_.dispose();
                     kpiIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -7664,6 +7364,7 @@ public final class Monitoring {
              * .context.Uuid kpi_id = 1;
              */
             public context.ContextOuterClass.Uuid.Builder getKpiIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getKpiIdFieldBuilder().getBuilder();
             }
@@ -7717,7 +7418,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public KpiId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new KpiId(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -7813,83 +7524,6 @@ public final class Monitoring {
             return new Kpi();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private Kpi(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                monitoring.Monitoring.KpiId.Builder subBuilder = null;
-                                if (kpiId_ != null) {
-                                    subBuilder = kpiId_.toBuilder();
-                                }
-                                kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(kpiId_);
-                                    kpiId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.Timestamp.Builder subBuilder = null;
-                                if (timestamp_ != null) {
-                                    subBuilder = timestamp_.toBuilder();
-                                }
-                                timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(timestamp_);
-                                    timestamp_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 26:
-                            {
-                                monitoring.Monitoring.KpiValue.Builder subBuilder = null;
-                                if (kpiValue_ != null) {
-                                    subBuilder = kpiValue_.toBuilder();
-                                }
-                                kpiValue_ = input.readMessage(monitoring.Monitoring.KpiValue.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(kpiValue_);
-                                    kpiValue_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_Kpi_descriptor;
         }
@@ -7926,7 +7560,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() {
-            return getKpiId();
+            return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_;
         }
 
         public static final int TIMESTAMP_FIELD_NUMBER = 2;
@@ -7956,7 +7590,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() {
-            return getTimestamp();
+            return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_;
         }
 
         public static final int KPI_VALUE_FIELD_NUMBER = 3;
@@ -7986,7 +7620,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() {
-            return getKpiValue();
+            return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -8013,7 +7647,7 @@ public final class Monitoring {
             if (kpiValue_ != null) {
                 output.writeMessage(3, getKpiValue());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -8031,7 +7665,7 @@ public final class Monitoring {
             if (kpiValue_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKpiValue());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -8063,7 +7697,7 @@ public final class Monitoring {
                 if (!getKpiValue().equals(other.getKpiValue()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -8087,7 +7721,7 @@ public final class Monitoring {
                 hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER;
                 hash = (53 * hash) + getKpiValue().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -8181,38 +7815,29 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.Kpi.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (kpiIdBuilder_ == null) {
-                    kpiId_ = null;
-                } else {
-                    kpiId_ = null;
+                bitField0_ = 0;
+                kpiId_ = null;
+                if (kpiIdBuilder_ != null) {
+                    kpiIdBuilder_.dispose();
                     kpiIdBuilder_ = null;
                 }
-                if (timestampBuilder_ == null) {
-                    timestamp_ = null;
-                } else {
-                    timestamp_ = null;
+                timestamp_ = null;
+                if (timestampBuilder_ != null) {
+                    timestampBuilder_.dispose();
                     timestampBuilder_ = null;
                 }
-                if (kpiValueBuilder_ == null) {
-                    kpiValue_ = null;
-                } else {
-                    kpiValue_ = null;
+                kpiValue_ = null;
+                if (kpiValueBuilder_ != null) {
+                    kpiValueBuilder_.dispose();
                     kpiValueBuilder_ = null;
                 }
                 return this;
@@ -8240,53 +7865,24 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.Kpi buildPartial() {
                 monitoring.Monitoring.Kpi result = new monitoring.Monitoring.Kpi(this);
-                if (kpiIdBuilder_ == null) {
-                    result.kpiId_ = kpiId_;
-                } else {
-                    result.kpiId_ = kpiIdBuilder_.build();
-                }
-                if (timestampBuilder_ == null) {
-                    result.timestamp_ = timestamp_;
-                } else {
-                    result.timestamp_ = timestampBuilder_.build();
-                }
-                if (kpiValueBuilder_ == null) {
-                    result.kpiValue_ = kpiValue_;
-                } else {
-                    result.kpiValue_ = kpiValueBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.Kpi result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.kpiValue_ = kpiValueBuilder_ == null ? kpiValue_ : kpiValueBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -8311,7 +7907,7 @@ public final class Monitoring {
                 if (other.hasKpiValue()) {
                     mergeKpiValue(other.getKpiValue());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -8323,20 +7919,61 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.Kpi parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    input.readMessage(getKpiValueFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 26
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.Kpi) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private monitoring.Monitoring.KpiId kpiId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_;
@@ -8346,7 +7983,7 @@ public final class Monitoring {
              * @return Whether the kpiId field is set.
              */
             public boolean hasKpiId() {
-                return kpiIdBuilder_ != null || kpiId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -8370,10 +8007,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     kpiId_ = value;
-                    onChanged();
                 } else {
                     kpiIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -8383,10 +8021,11 @@ public final class Monitoring {
             public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) {
                 if (kpiIdBuilder_ == null) {
                     kpiId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     kpiIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -8395,15 +8034,16 @@ public final class Monitoring {
              */
             public Builder mergeKpiId(monitoring.Monitoring.KpiId value) {
                 if (kpiIdBuilder_ == null) {
-                    if (kpiId_ != null) {
-                        kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) {
+                        getKpiIdBuilder().mergeFrom(value);
                     } else {
                         kpiId_ = value;
                     }
-                    onChanged();
                 } else {
                     kpiIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -8411,13 +8051,13 @@ public final class Monitoring {
              * .monitoring.KpiId kpi_id = 1;
              */
             public Builder clearKpiId() {
-                if (kpiIdBuilder_ == null) {
-                    kpiId_ = null;
-                    onChanged();
-                } else {
-                    kpiId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                kpiId_ = null;
+                if (kpiIdBuilder_ != null) {
+                    kpiIdBuilder_.dispose();
                     kpiIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -8425,6 +8065,7 @@ public final class Monitoring {
              * .monitoring.KpiId kpi_id = 1;
              */
             public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getKpiIdFieldBuilder().getBuilder();
             }
@@ -8460,7 +8101,7 @@ public final class Monitoring {
              * @return Whether the timestamp field is set.
              */
             public boolean hasTimestamp() {
-                return timestampBuilder_ != null || timestamp_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -8484,10 +8125,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     timestamp_ = value;
-                    onChanged();
                 } else {
                     timestampBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -8497,10 +8139,11 @@ public final class Monitoring {
             public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) {
                 if (timestampBuilder_ == null) {
                     timestamp_ = builderForValue.build();
-                    onChanged();
                 } else {
                     timestampBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -8509,15 +8152,16 @@ public final class Monitoring {
              */
             public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) {
                 if (timestampBuilder_ == null) {
-                    if (timestamp_ != null) {
-                        timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && timestamp_ != null && timestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) {
+                        getTimestampBuilder().mergeFrom(value);
                     } else {
                         timestamp_ = value;
                     }
-                    onChanged();
                 } else {
                     timestampBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -8525,13 +8169,13 @@ public final class Monitoring {
              * .context.Timestamp timestamp = 2;
              */
             public Builder clearTimestamp() {
-                if (timestampBuilder_ == null) {
-                    timestamp_ = null;
-                    onChanged();
-                } else {
-                    timestamp_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                timestamp_ = null;
+                if (timestampBuilder_ != null) {
+                    timestampBuilder_.dispose();
                     timestampBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -8539,6 +8183,7 @@ public final class Monitoring {
              * .context.Timestamp timestamp = 2;
              */
             public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getTimestampFieldBuilder().getBuilder();
             }
@@ -8574,7 +8219,7 @@ public final class Monitoring {
              * @return Whether the kpiValue field is set.
              */
             public boolean hasKpiValue() {
-                return kpiValueBuilder_ != null || kpiValue_ != null;
+                return ((bitField0_ & 0x00000004) != 0);
             }
 
             /**
@@ -8598,10 +8243,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     kpiValue_ = value;
-                    onChanged();
                 } else {
                     kpiValueBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -8611,10 +8257,11 @@ public final class Monitoring {
             public Builder setKpiValue(monitoring.Monitoring.KpiValue.Builder builderForValue) {
                 if (kpiValueBuilder_ == null) {
                     kpiValue_ = builderForValue.build();
-                    onChanged();
                 } else {
                     kpiValueBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -8623,15 +8270,16 @@ public final class Monitoring {
              */
             public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) {
                 if (kpiValueBuilder_ == null) {
-                    if (kpiValue_ != null) {
-                        kpiValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000004) != 0) && kpiValue_ != null && kpiValue_ != monitoring.Monitoring.KpiValue.getDefaultInstance()) {
+                        getKpiValueBuilder().mergeFrom(value);
                     } else {
                         kpiValue_ = value;
                     }
-                    onChanged();
                 } else {
                     kpiValueBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -8639,13 +8287,13 @@ public final class Monitoring {
              * .monitoring.KpiValue kpi_value = 3;
              */
             public Builder clearKpiValue() {
-                if (kpiValueBuilder_ == null) {
-                    kpiValue_ = null;
-                    onChanged();
-                } else {
-                    kpiValue_ = null;
+                bitField0_ = (bitField0_ & ~0x00000004);
+                kpiValue_ = null;
+                if (kpiValueBuilder_ != null) {
+                    kpiValueBuilder_.dispose();
                     kpiValueBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -8653,6 +8301,7 @@ public final class Monitoring {
              * .monitoring.KpiValue kpi_value = 3;
              */
             public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() {
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return getKpiValueFieldBuilder().getBuilder();
             }
@@ -8706,7 +8355,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public Kpi parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new Kpi(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -8815,85 +8474,6 @@ public final class Monitoring {
             return new KpiValueRange();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private KpiValueRange(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                monitoring.Monitoring.KpiValue.Builder subBuilder = null;
-                                if (kpiMinValue_ != null) {
-                                    subBuilder = kpiMinValue_.toBuilder();
-                                }
-                                kpiMinValue_ = input.readMessage(monitoring.Monitoring.KpiValue.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(kpiMinValue_);
-                                    kpiMinValue_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                monitoring.Monitoring.KpiValue.Builder subBuilder = null;
-                                if (kpiMaxValue_ != null) {
-                                    subBuilder = kpiMaxValue_.toBuilder();
-                                }
-                                kpiMaxValue_ = input.readMessage(monitoring.Monitoring.KpiValue.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(kpiMaxValue_);
-                                    kpiMaxValue_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 24:
-                            {
-                                inRange_ = input.readBool();
-                                break;
-                            }
-                        case 32:
-                            {
-                                includeMinValue_ = input.readBool();
-                                break;
-                            }
-                        case 40:
-                            {
-                                includeMaxValue_ = input.readBool();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_descriptor;
         }
@@ -8930,7 +8510,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder() {
-            return getKpiMinValue();
+            return kpiMinValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_;
         }
 
         public static final int KPIMAXVALUE_FIELD_NUMBER = 2;
@@ -8960,12 +8540,12 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder() {
-            return getKpiMaxValue();
+            return kpiMaxValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_;
         }
 
         public static final int INRANGE_FIELD_NUMBER = 3;
 
-        private boolean inRange_;
+        private boolean inRange_ = false;
 
         /**
          * 
@@ -8982,7 +8562,7 @@ public final class Monitoring {
 
         public static final int INCLUDEMINVALUE_FIELD_NUMBER = 4;
 
-        private boolean includeMinValue_;
+        private boolean includeMinValue_ = false;
 
         /**
          * 
@@ -8999,7 +8579,7 @@ public final class Monitoring {
 
         public static final int INCLUDEMAXVALUE_FIELD_NUMBER = 5;
 
-        private boolean includeMaxValue_;
+        private boolean includeMaxValue_ = false;
 
         /**
          * 
@@ -9044,7 +8624,7 @@ public final class Monitoring {
             if (includeMaxValue_ != false) {
                 output.writeBool(5, includeMaxValue_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -9068,7 +8648,7 @@ public final class Monitoring {
             if (includeMaxValue_ != false) {
                 size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, includeMaxValue_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -9100,7 +8680,7 @@ public final class Monitoring {
                 return false;
             if (getIncludeMaxValue() != other.getIncludeMaxValue())
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -9126,7 +8706,7 @@ public final class Monitoring {
             hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeMinValue());
             hash = (37 * hash) + INCLUDEMAXVALUE_FIELD_NUMBER;
             hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeMaxValue());
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -9220,32 +8800,24 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.KpiValueRange.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (kpiMinValueBuilder_ == null) {
-                    kpiMinValue_ = null;
-                } else {
-                    kpiMinValue_ = null;
+                bitField0_ = 0;
+                kpiMinValue_ = null;
+                if (kpiMinValueBuilder_ != null) {
+                    kpiMinValueBuilder_.dispose();
                     kpiMinValueBuilder_ = null;
                 }
-                if (kpiMaxValueBuilder_ == null) {
-                    kpiMaxValue_ = null;
-                } else {
-                    kpiMaxValue_ = null;
+                kpiMaxValue_ = null;
+                if (kpiMaxValueBuilder_ != null) {
+                    kpiMaxValueBuilder_.dispose();
                     kpiMaxValueBuilder_ = null;
                 }
                 inRange_ = false;
@@ -9276,51 +8848,30 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.KpiValueRange buildPartial() {
                 monitoring.Monitoring.KpiValueRange result = new monitoring.Monitoring.KpiValueRange(this);
-                if (kpiMinValueBuilder_ == null) {
-                    result.kpiMinValue_ = kpiMinValue_;
-                } else {
-                    result.kpiMinValue_ = kpiMinValueBuilder_.build();
-                }
-                if (kpiMaxValueBuilder_ == null) {
-                    result.kpiMaxValue_ = kpiMaxValue_;
-                } else {
-                    result.kpiMaxValue_ = kpiMaxValueBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.inRange_ = inRange_;
-                result.includeMinValue_ = includeMinValue_;
-                result.includeMaxValue_ = includeMaxValue_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.KpiValueRange result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.kpiMinValue_ = kpiMinValueBuilder_ == null ? kpiMinValue_ : kpiMinValueBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.kpiMaxValue_ = kpiMaxValueBuilder_ == null ? kpiMaxValue_ : kpiMaxValueBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.inRange_ = inRange_;
+                }
+                if (((from_bitField0_ & 0x00000008) != 0)) {
+                    result.includeMinValue_ = includeMinValue_;
+                }
+                if (((from_bitField0_ & 0x00000010) != 0)) {
+                    result.includeMaxValue_ = includeMaxValue_;
+                }
             }
 
             @java.lang.Override
@@ -9351,7 +8902,7 @@ public final class Monitoring {
                 if (other.getIncludeMaxValue() != false) {
                     setIncludeMaxValue(other.getIncludeMaxValue());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -9363,20 +8914,75 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.KpiValueRange parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getKpiMinValueFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getKpiMaxValueFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 24:
+                                {
+                                    inRange_ = input.readBool();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 24
+                            case 32:
+                                {
+                                    includeMinValue_ = input.readBool();
+                                    bitField0_ |= 0x00000008;
+                                    break;
+                                }
+                            // case 32
+                            case 40:
+                                {
+                                    includeMaxValue_ = input.readBool();
+                                    bitField0_ |= 0x00000010;
+                                    break;
+                                }
+                            // case 40
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.KpiValueRange) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private monitoring.Monitoring.KpiValue kpiMinValue_;
 
             private com.google.protobuf.SingleFieldBuilderV3 kpiMinValueBuilder_;
@@ -9386,7 +8992,7 @@ public final class Monitoring {
              * @return Whether the kpiMinValue field is set.
              */
             public boolean hasKpiMinValue() {
-                return kpiMinValueBuilder_ != null || kpiMinValue_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -9410,10 +9016,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     kpiMinValue_ = value;
-                    onChanged();
                 } else {
                     kpiMinValueBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -9423,10 +9030,11 @@ public final class Monitoring {
             public Builder setKpiMinValue(monitoring.Monitoring.KpiValue.Builder builderForValue) {
                 if (kpiMinValueBuilder_ == null) {
                     kpiMinValue_ = builderForValue.build();
-                    onChanged();
                 } else {
                     kpiMinValueBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -9435,15 +9043,16 @@ public final class Monitoring {
              */
             public Builder mergeKpiMinValue(monitoring.Monitoring.KpiValue value) {
                 if (kpiMinValueBuilder_ == null) {
-                    if (kpiMinValue_ != null) {
-                        kpiMinValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiMinValue_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && kpiMinValue_ != null && kpiMinValue_ != monitoring.Monitoring.KpiValue.getDefaultInstance()) {
+                        getKpiMinValueBuilder().mergeFrom(value);
                     } else {
                         kpiMinValue_ = value;
                     }
-                    onChanged();
                 } else {
                     kpiMinValueBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -9451,13 +9060,13 @@ public final class Monitoring {
              * .monitoring.KpiValue kpiMinValue = 1;
              */
             public Builder clearKpiMinValue() {
-                if (kpiMinValueBuilder_ == null) {
-                    kpiMinValue_ = null;
-                    onChanged();
-                } else {
-                    kpiMinValue_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                kpiMinValue_ = null;
+                if (kpiMinValueBuilder_ != null) {
+                    kpiMinValueBuilder_.dispose();
                     kpiMinValueBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -9465,6 +9074,7 @@ public final class Monitoring {
              * .monitoring.KpiValue kpiMinValue = 1;
              */
             public monitoring.Monitoring.KpiValue.Builder getKpiMinValueBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getKpiMinValueFieldBuilder().getBuilder();
             }
@@ -9500,7 +9110,7 @@ public final class Monitoring {
              * @return Whether the kpiMaxValue field is set.
              */
             public boolean hasKpiMaxValue() {
-                return kpiMaxValueBuilder_ != null || kpiMaxValue_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -9524,10 +9134,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     kpiMaxValue_ = value;
-                    onChanged();
                 } else {
                     kpiMaxValueBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -9537,10 +9148,11 @@ public final class Monitoring {
             public Builder setKpiMaxValue(monitoring.Monitoring.KpiValue.Builder builderForValue) {
                 if (kpiMaxValueBuilder_ == null) {
                     kpiMaxValue_ = builderForValue.build();
-                    onChanged();
                 } else {
                     kpiMaxValueBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -9549,15 +9161,16 @@ public final class Monitoring {
              */
             public Builder mergeKpiMaxValue(monitoring.Monitoring.KpiValue value) {
                 if (kpiMaxValueBuilder_ == null) {
-                    if (kpiMaxValue_ != null) {
-                        kpiMaxValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiMaxValue_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && kpiMaxValue_ != null && kpiMaxValue_ != monitoring.Monitoring.KpiValue.getDefaultInstance()) {
+                        getKpiMaxValueBuilder().mergeFrom(value);
                     } else {
                         kpiMaxValue_ = value;
                     }
-                    onChanged();
                 } else {
                     kpiMaxValueBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -9565,13 +9178,13 @@ public final class Monitoring {
              * .monitoring.KpiValue kpiMaxValue = 2;
              */
             public Builder clearKpiMaxValue() {
-                if (kpiMaxValueBuilder_ == null) {
-                    kpiMaxValue_ = null;
-                    onChanged();
-                } else {
-                    kpiMaxValue_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                kpiMaxValue_ = null;
+                if (kpiMaxValueBuilder_ != null) {
+                    kpiMaxValueBuilder_.dispose();
                     kpiMaxValueBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -9579,6 +9192,7 @@ public final class Monitoring {
              * .monitoring.KpiValue kpiMaxValue = 2;
              */
             public monitoring.Monitoring.KpiValue.Builder getKpiMaxValueBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getKpiMaxValueFieldBuilder().getBuilder();
             }
@@ -9631,6 +9245,7 @@ public final class Monitoring {
              */
             public Builder setInRange(boolean value) {
                 inRange_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -9644,6 +9259,7 @@ public final class Monitoring {
              * @return This builder for chaining.
              */
             public Builder clearInRange() {
+                bitField0_ = (bitField0_ & ~0x00000004);
                 inRange_ = false;
                 onChanged();
                 return this;
@@ -9675,6 +9291,7 @@ public final class Monitoring {
              */
             public Builder setIncludeMinValue(boolean value) {
                 includeMinValue_ = value;
+                bitField0_ |= 0x00000008;
                 onChanged();
                 return this;
             }
@@ -9688,6 +9305,7 @@ public final class Monitoring {
              * @return This builder for chaining.
              */
             public Builder clearIncludeMinValue() {
+                bitField0_ = (bitField0_ & ~0x00000008);
                 includeMinValue_ = false;
                 onChanged();
                 return this;
@@ -9719,6 +9337,7 @@ public final class Monitoring {
              */
             public Builder setIncludeMaxValue(boolean value) {
                 includeMaxValue_ = value;
+                bitField0_ |= 0x00000010;
                 onChanged();
                 return this;
             }
@@ -9732,6 +9351,7 @@ public final class Monitoring {
              * @return This builder for chaining.
              */
             public Builder clearIncludeMaxValue() {
+                bitField0_ = (bitField0_ & ~0x00000010);
                 includeMaxValue_ = false;
                 onChanged();
                 return this;
@@ -9764,7 +9384,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public KpiValueRange parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new KpiValueRange(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -9876,7 +9506,7 @@ public final class Monitoring {
          */
         boolean getBoolVal();
 
-        public monitoring.Monitoring.KpiValue.ValueCase getValueCase();
+        monitoring.Monitoring.KpiValue.ValueCase getValueCase();
     }
 
     /**
@@ -9901,87 +9531,6 @@ public final class Monitoring {
             return new KpiValue();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private KpiValue(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 8:
-                            {
-                                valueCase_ = 1;
-                                value_ = input.readInt32();
-                                break;
-                            }
-                        case 16:
-                            {
-                                valueCase_ = 2;
-                                value_ = input.readUInt32();
-                                break;
-                            }
-                        case 24:
-                            {
-                                valueCase_ = 3;
-                                value_ = input.readInt64();
-                                break;
-                            }
-                        case 32:
-                            {
-                                valueCase_ = 4;
-                                value_ = input.readUInt64();
-                                break;
-                            }
-                        case 45:
-                            {
-                                valueCase_ = 5;
-                                value_ = input.readFloat();
-                                break;
-                            }
-                        case 50:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                valueCase_ = 6;
-                                value_ = s;
-                                break;
-                            }
-                        case 56:
-                            {
-                                valueCase_ = 7;
-                                value_ = input.readBool();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_KpiValue_descriptor;
         }
@@ -9993,6 +9542,7 @@ public final class Monitoring {
 
         private int valueCase_ = 0;
 
+        @SuppressWarnings("serial")
         private java.lang.Object value_;
 
         public enum ValueCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum {
@@ -10279,7 +9829,7 @@ public final class Monitoring {
             if (valueCase_ == 7) {
                 output.writeBool(7, (boolean) ((java.lang.Boolean) value_));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -10309,7 +9859,7 @@ public final class Monitoring {
             if (valueCase_ == 7) {
                 size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, (boolean) ((java.lang.Boolean) value_));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -10357,7 +9907,7 @@ public final class Monitoring {
                 case 0:
                 default:
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -10401,7 +9951,7 @@ public final class Monitoring {
                 case 0:
                 default:
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -10495,22 +10045,16 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.KpiValue.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 valueCase_ = 0;
                 value_ = null;
                 return this;
@@ -10538,60 +10082,21 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.KpiValue buildPartial() {
                 monitoring.Monitoring.KpiValue result = new monitoring.Monitoring.KpiValue(this);
-                if (valueCase_ == 1) {
-                    result.value_ = value_;
-                }
-                if (valueCase_ == 2) {
-                    result.value_ = value_;
-                }
-                if (valueCase_ == 3) {
-                    result.value_ = value_;
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                if (valueCase_ == 4) {
-                    result.value_ = value_;
-                }
-                if (valueCase_ == 5) {
-                    result.value_ = value_;
-                }
-                if (valueCase_ == 6) {
-                    result.value_ = value_;
-                }
-                if (valueCase_ == 7) {
-                    result.value_ = value_;
-                }
-                result.valueCase_ = valueCase_;
+                buildPartialOneofs(result);
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
+            private void buildPartial0(monitoring.Monitoring.KpiValue result) {
+                int from_bitField0_ = bitField0_;
             }
 
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartialOneofs(monitoring.Monitoring.KpiValue result) {
+                result.valueCase_ = valueCase_;
+                result.value_ = this.value_;
             }
 
             @java.lang.Override
@@ -10650,7 +10155,7 @@ public final class Monitoring {
                             break;
                         }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -10662,17 +10167,85 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.KpiValue parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 8:
+                                {
+                                    value_ = input.readInt32();
+                                    valueCase_ = 1;
+                                    break;
+                                }
+                            // case 8
+                            case 16:
+                                {
+                                    value_ = input.readUInt32();
+                                    valueCase_ = 2;
+                                    break;
+                                }
+                            // case 16
+                            case 24:
+                                {
+                                    value_ = input.readInt64();
+                                    valueCase_ = 3;
+                                    break;
+                                }
+                            // case 24
+                            case 32:
+                                {
+                                    value_ = input.readUInt64();
+                                    valueCase_ = 4;
+                                    break;
+                                }
+                            // case 32
+                            case 45:
+                                {
+                                    value_ = input.readFloat();
+                                    valueCase_ = 5;
+                                    break;
+                                }
+                            // case 45
+                            case 50:
+                                {
+                                    java.lang.String s = input.readStringRequireUtf8();
+                                    valueCase_ = 6;
+                                    value_ = s;
+                                    break;
+                                }
+                            // case 50
+                            case 56:
+                                {
+                                    value_ = input.readBool();
+                                    valueCase_ = 7;
+                                    break;
+                                }
+                            // case 56
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.KpiValue) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -10691,6 +10264,8 @@ public final class Monitoring {
                 return this;
             }
 
+            private int bitField0_;
+
             /**
              * int32 int32Val = 1;
              * @return Whether the int32Val field is set.
@@ -11078,7 +10653,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public KpiValue parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new KpiValue(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -11149,57 +10734,6 @@ public final class Monitoring {
             return new KpiList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private KpiList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    kpi_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                kpi_.add(input.readMessage(monitoring.Monitoring.Kpi.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    kpi_ = java.util.Collections.unmodifiableList(kpi_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_KpiList_descriptor;
         }
@@ -11211,6 +10745,7 @@ public final class Monitoring {
 
         public static final int KPI_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List kpi_;
 
         /**
@@ -11271,7 +10806,7 @@ public final class Monitoring {
             for (int i = 0; i < kpi_.size(); i++) {
                 output.writeMessage(1, kpi_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -11283,7 +10818,7 @@ public final class Monitoring {
             for (int i = 0; i < kpi_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, kpi_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -11299,7 +10834,7 @@ public final class Monitoring {
             monitoring.Monitoring.KpiList other = (monitoring.Monitoring.KpiList) obj;
             if (!getKpiList().equals(other.getKpiList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -11315,7 +10850,7 @@ public final class Monitoring {
                 hash = (37 * hash) + KPI_FIELD_NUMBER;
                 hash = (53 * hash) + getKpiList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -11409,29 +10944,23 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.KpiList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getKpiFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (kpiBuilder_ == null) {
                     kpi_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    kpi_ = null;
                     kpiBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -11457,7 +10986,15 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.KpiList buildPartial() {
                 monitoring.Monitoring.KpiList result = new monitoring.Monitoring.KpiList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(monitoring.Monitoring.KpiList result) {
                 if (kpiBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         kpi_ = java.util.Collections.unmodifiableList(kpi_);
@@ -11467,38 +11004,10 @@ public final class Monitoring {
                 } else {
                     result.kpi_ = kpiBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
             }
 
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.KpiList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -11538,7 +11047,7 @@ public final class Monitoring {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -11550,17 +11059,47 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.KpiList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    monitoring.Monitoring.Kpi m = input.readMessage(monitoring.Monitoring.Kpi.parser(), extensionRegistry);
+                                    if (kpiBuilder_ == null) {
+                                        ensureKpiIsMutable();
+                                        kpi_.add(m);
+                                    } else {
+                                        kpiBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.KpiList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -11830,7 +11369,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public KpiList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new KpiList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -11901,57 +11450,6 @@ public final class Monitoring {
             return new KpiDescriptorList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private KpiDescriptorList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    kpiDescriptorList_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                kpiDescriptorList_.add(input.readMessage(monitoring.Monitoring.KpiDescriptor.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    kpiDescriptorList_ = java.util.Collections.unmodifiableList(kpiDescriptorList_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_descriptor;
         }
@@ -11963,6 +11461,7 @@ public final class Monitoring {
 
         public static final int KPI_DESCRIPTOR_LIST_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List kpiDescriptorList_;
 
         /**
@@ -12023,7 +11522,7 @@ public final class Monitoring {
             for (int i = 0; i < kpiDescriptorList_.size(); i++) {
                 output.writeMessage(1, kpiDescriptorList_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -12035,7 +11534,7 @@ public final class Monitoring {
             for (int i = 0; i < kpiDescriptorList_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, kpiDescriptorList_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -12051,7 +11550,7 @@ public final class Monitoring {
             monitoring.Monitoring.KpiDescriptorList other = (monitoring.Monitoring.KpiDescriptorList) obj;
             if (!getKpiDescriptorListList().equals(other.getKpiDescriptorListList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -12067,7 +11566,7 @@ public final class Monitoring {
                 hash = (37 * hash) + KPI_DESCRIPTOR_LIST_FIELD_NUMBER;
                 hash = (53 * hash) + getKpiDescriptorListList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -12161,29 +11660,23 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.KpiDescriptorList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getKpiDescriptorListFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (kpiDescriptorListBuilder_ == null) {
                     kpiDescriptorList_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    kpiDescriptorList_ = null;
                     kpiDescriptorListBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -12209,7 +11702,15 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.KpiDescriptorList buildPartial() {
                 monitoring.Monitoring.KpiDescriptorList result = new monitoring.Monitoring.KpiDescriptorList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(monitoring.Monitoring.KpiDescriptorList result) {
                 if (kpiDescriptorListBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         kpiDescriptorList_ = java.util.Collections.unmodifiableList(kpiDescriptorList_);
@@ -12219,38 +11720,10 @@ public final class Monitoring {
                 } else {
                     result.kpiDescriptorList_ = kpiDescriptorListBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
             }
 
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.KpiDescriptorList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -12290,7 +11763,7 @@ public final class Monitoring {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -12302,17 +11775,47 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.KpiDescriptorList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    monitoring.Monitoring.KpiDescriptor m = input.readMessage(monitoring.Monitoring.KpiDescriptor.parser(), extensionRegistry);
+                                    if (kpiDescriptorListBuilder_ == null) {
+                                        ensureKpiDescriptorListIsMutable();
+                                        kpiDescriptorList_.add(m);
+                                    } else {
+                                        kpiDescriptorListBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.KpiDescriptorList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -12582,7 +12085,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public KpiDescriptorList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new KpiDescriptorList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -12731,106 +12244,6 @@ public final class Monitoring {
             return new SubsDescriptor();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private SubsDescriptor(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                monitoring.Monitoring.SubscriptionID.Builder subBuilder = null;
-                                if (subsId_ != null) {
-                                    subBuilder = subsId_.toBuilder();
-                                }
-                                subsId_ = input.readMessage(monitoring.Monitoring.SubscriptionID.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(subsId_);
-                                    subsId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                monitoring.Monitoring.KpiId.Builder subBuilder = null;
-                                if (kpiId_ != null) {
-                                    subBuilder = kpiId_.toBuilder();
-                                }
-                                kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(kpiId_);
-                                    kpiId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 29:
-                            {
-                                samplingDurationS_ = input.readFloat();
-                                break;
-                            }
-                        case 37:
-                            {
-                                samplingIntervalS_ = input.readFloat();
-                                break;
-                            }
-                        case 42:
-                            {
-                                context.ContextOuterClass.Timestamp.Builder subBuilder = null;
-                                if (startTimestamp_ != null) {
-                                    subBuilder = startTimestamp_.toBuilder();
-                                }
-                                startTimestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(startTimestamp_);
-                                    startTimestamp_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 50:
-                            {
-                                context.ContextOuterClass.Timestamp.Builder subBuilder = null;
-                                if (endTimestamp_ != null) {
-                                    subBuilder = endTimestamp_.toBuilder();
-                                }
-                                endTimestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(endTimestamp_);
-                                    endTimestamp_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_descriptor;
         }
@@ -12867,7 +12280,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() {
-            return getSubsId();
+            return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_;
         }
 
         public static final int KPI_ID_FIELD_NUMBER = 2;
@@ -12897,12 +12310,12 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() {
-            return getKpiId();
+            return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_;
         }
 
         public static final int SAMPLING_DURATION_S_FIELD_NUMBER = 3;
 
-        private float samplingDurationS_;
+        private float samplingDurationS_ = 0F;
 
         /**
          * float sampling_duration_s = 3;
@@ -12915,7 +12328,7 @@ public final class Monitoring {
 
         public static final int SAMPLING_INTERVAL_S_FIELD_NUMBER = 4;
 
-        private float samplingIntervalS_;
+        private float samplingIntervalS_ = 0F;
 
         /**
          * float sampling_interval_s = 4;
@@ -12965,7 +12378,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() {
-            return getStartTimestamp();
+            return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_;
         }
 
         public static final int END_TIMESTAMP_FIELD_NUMBER = 6;
@@ -13007,7 +12420,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() {
-            return getEndTimestamp();
+            return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -13031,10 +12444,10 @@ public final class Monitoring {
             if (kpiId_ != null) {
                 output.writeMessage(2, getKpiId());
             }
-            if (samplingDurationS_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(samplingDurationS_) != 0) {
                 output.writeFloat(3, samplingDurationS_);
             }
-            if (samplingIntervalS_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(samplingIntervalS_) != 0) {
                 output.writeFloat(4, samplingIntervalS_);
             }
             if (startTimestamp_ != null) {
@@ -13043,7 +12456,7 @@ public final class Monitoring {
             if (endTimestamp_ != null) {
                 output.writeMessage(6, getEndTimestamp());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -13058,10 +12471,10 @@ public final class Monitoring {
             if (kpiId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiId());
             }
-            if (samplingDurationS_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(samplingDurationS_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, samplingDurationS_);
             }
-            if (samplingIntervalS_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(samplingIntervalS_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, samplingIntervalS_);
             }
             if (startTimestamp_ != null) {
@@ -13070,7 +12483,7 @@ public final class Monitoring {
             if (endTimestamp_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndTimestamp());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -13112,7 +12525,7 @@ public final class Monitoring {
                 if (!getEndTimestamp().equals(other.getEndTimestamp()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -13144,7 +12557,7 @@ public final class Monitoring {
                 hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER;
                 hash = (53 * hash) + getEndTimestamp().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -13238,46 +12651,36 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.SubsDescriptor.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (subsIdBuilder_ == null) {
-                    subsId_ = null;
-                } else {
-                    subsId_ = null;
+                bitField0_ = 0;
+                subsId_ = null;
+                if (subsIdBuilder_ != null) {
+                    subsIdBuilder_.dispose();
                     subsIdBuilder_ = null;
                 }
-                if (kpiIdBuilder_ == null) {
-                    kpiId_ = null;
-                } else {
-                    kpiId_ = null;
+                kpiId_ = null;
+                if (kpiIdBuilder_ != null) {
+                    kpiIdBuilder_.dispose();
                     kpiIdBuilder_ = null;
                 }
                 samplingDurationS_ = 0F;
                 samplingIntervalS_ = 0F;
-                if (startTimestampBuilder_ == null) {
-                    startTimestamp_ = null;
-                } else {
-                    startTimestamp_ = null;
+                startTimestamp_ = null;
+                if (startTimestampBuilder_ != null) {
+                    startTimestampBuilder_.dispose();
                     startTimestampBuilder_ = null;
                 }
-                if (endTimestampBuilder_ == null) {
-                    endTimestamp_ = null;
-                } else {
-                    endTimestamp_ = null;
+                endTimestamp_ = null;
+                if (endTimestampBuilder_ != null) {
+                    endTimestampBuilder_.dispose();
                     endTimestampBuilder_ = null;
                 }
                 return this;
@@ -13305,60 +12708,33 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.SubsDescriptor buildPartial() {
                 monitoring.Monitoring.SubsDescriptor result = new monitoring.Monitoring.SubsDescriptor(this);
-                if (subsIdBuilder_ == null) {
-                    result.subsId_ = subsId_;
-                } else {
-                    result.subsId_ = subsIdBuilder_.build();
-                }
-                if (kpiIdBuilder_ == null) {
-                    result.kpiId_ = kpiId_;
-                } else {
-                    result.kpiId_ = kpiIdBuilder_.build();
-                }
-                result.samplingDurationS_ = samplingDurationS_;
-                result.samplingIntervalS_ = samplingIntervalS_;
-                if (startTimestampBuilder_ == null) {
-                    result.startTimestamp_ = startTimestamp_;
-                } else {
-                    result.startTimestamp_ = startTimestampBuilder_.build();
-                }
-                if (endTimestampBuilder_ == null) {
-                    result.endTimestamp_ = endTimestamp_;
-                } else {
-                    result.endTimestamp_ = endTimestampBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.SubsDescriptor result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.subsId_ = subsIdBuilder_ == null ? subsId_ : subsIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.samplingDurationS_ = samplingDurationS_;
+                }
+                if (((from_bitField0_ & 0x00000008) != 0)) {
+                    result.samplingIntervalS_ = samplingIntervalS_;
+                }
+                if (((from_bitField0_ & 0x00000010) != 0)) {
+                    result.startTimestamp_ = startTimestampBuilder_ == null ? startTimestamp_ : startTimestampBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000020) != 0)) {
+                    result.endTimestamp_ = endTimestampBuilder_ == null ? endTimestamp_ : endTimestampBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -13392,7 +12768,7 @@ public final class Monitoring {
                 if (other.hasEndTimestamp()) {
                     mergeEndTimestamp(other.getEndTimestamp());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -13404,20 +12780,82 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.SubsDescriptor parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getSubsIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 29:
+                                {
+                                    samplingDurationS_ = input.readFloat();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 29
+                            case 37:
+                                {
+                                    samplingIntervalS_ = input.readFloat();
+                                    bitField0_ |= 0x00000008;
+                                    break;
+                                }
+                            // case 37
+                            case 42:
+                                {
+                                    input.readMessage(getStartTimestampFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000010;
+                                    break;
+                                }
+                            // case 42
+                            case 50:
+                                {
+                                    input.readMessage(getEndTimestampFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000020;
+                                    break;
+                                }
+                            // case 50
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.SubsDescriptor) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private monitoring.Monitoring.SubscriptionID subsId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 subsIdBuilder_;
@@ -13427,7 +12865,7 @@ public final class Monitoring {
              * @return Whether the subsId field is set.
              */
             public boolean hasSubsId() {
-                return subsIdBuilder_ != null || subsId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -13451,10 +12889,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     subsId_ = value;
-                    onChanged();
                 } else {
                     subsIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -13464,10 +12903,11 @@ public final class Monitoring {
             public Builder setSubsId(monitoring.Monitoring.SubscriptionID.Builder builderForValue) {
                 if (subsIdBuilder_ == null) {
                     subsId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     subsIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -13476,15 +12916,16 @@ public final class Monitoring {
              */
             public Builder mergeSubsId(monitoring.Monitoring.SubscriptionID value) {
                 if (subsIdBuilder_ == null) {
-                    if (subsId_ != null) {
-                        subsId_ = monitoring.Monitoring.SubscriptionID.newBuilder(subsId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && subsId_ != null && subsId_ != monitoring.Monitoring.SubscriptionID.getDefaultInstance()) {
+                        getSubsIdBuilder().mergeFrom(value);
                     } else {
                         subsId_ = value;
                     }
-                    onChanged();
                 } else {
                     subsIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -13492,13 +12933,13 @@ public final class Monitoring {
              * .monitoring.SubscriptionID subs_id = 1;
              */
             public Builder clearSubsId() {
-                if (subsIdBuilder_ == null) {
-                    subsId_ = null;
-                    onChanged();
-                } else {
-                    subsId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                subsId_ = null;
+                if (subsIdBuilder_ != null) {
+                    subsIdBuilder_.dispose();
                     subsIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -13506,6 +12947,7 @@ public final class Monitoring {
              * .monitoring.SubscriptionID subs_id = 1;
              */
             public monitoring.Monitoring.SubscriptionID.Builder getSubsIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getSubsIdFieldBuilder().getBuilder();
             }
@@ -13541,7 +12983,7 @@ public final class Monitoring {
              * @return Whether the kpiId field is set.
              */
             public boolean hasKpiId() {
-                return kpiIdBuilder_ != null || kpiId_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -13565,10 +13007,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     kpiId_ = value;
-                    onChanged();
                 } else {
                     kpiIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -13578,10 +13021,11 @@ public final class Monitoring {
             public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) {
                 if (kpiIdBuilder_ == null) {
                     kpiId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     kpiIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -13590,15 +13034,16 @@ public final class Monitoring {
              */
             public Builder mergeKpiId(monitoring.Monitoring.KpiId value) {
                 if (kpiIdBuilder_ == null) {
-                    if (kpiId_ != null) {
-                        kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) {
+                        getKpiIdBuilder().mergeFrom(value);
                     } else {
                         kpiId_ = value;
                     }
-                    onChanged();
                 } else {
                     kpiIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -13606,13 +13051,13 @@ public final class Monitoring {
              * .monitoring.KpiId kpi_id = 2;
              */
             public Builder clearKpiId() {
-                if (kpiIdBuilder_ == null) {
-                    kpiId_ = null;
-                    onChanged();
-                } else {
-                    kpiId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                kpiId_ = null;
+                if (kpiIdBuilder_ != null) {
+                    kpiIdBuilder_.dispose();
                     kpiIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -13620,6 +13065,7 @@ public final class Monitoring {
              * .monitoring.KpiId kpi_id = 2;
              */
             public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getKpiIdFieldBuilder().getBuilder();
             }
@@ -13664,6 +13110,7 @@ public final class Monitoring {
              */
             public Builder setSamplingDurationS(float value) {
                 samplingDurationS_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -13673,6 +13120,7 @@ public final class Monitoring {
              * @return This builder for chaining.
              */
             public Builder clearSamplingDurationS() {
+                bitField0_ = (bitField0_ & ~0x00000004);
                 samplingDurationS_ = 0F;
                 onChanged();
                 return this;
@@ -13696,6 +13144,7 @@ public final class Monitoring {
              */
             public Builder setSamplingIntervalS(float value) {
                 samplingIntervalS_ = value;
+                bitField0_ |= 0x00000008;
                 onChanged();
                 return this;
             }
@@ -13705,6 +13154,7 @@ public final class Monitoring {
              * @return This builder for chaining.
              */
             public Builder clearSamplingIntervalS() {
+                bitField0_ = (bitField0_ & ~0x00000008);
                 samplingIntervalS_ = 0F;
                 onChanged();
                 return this;
@@ -13723,7 +13173,7 @@ public final class Monitoring {
              * @return Whether the startTimestamp field is set.
              */
             public boolean hasStartTimestamp() {
-                return startTimestampBuilder_ != null || startTimestamp_ != null;
+                return ((bitField0_ & 0x00000010) != 0);
             }
 
             /**
@@ -13755,10 +13205,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     startTimestamp_ = value;
-                    onChanged();
                 } else {
                     startTimestampBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -13772,10 +13223,11 @@ public final class Monitoring {
             public Builder setStartTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) {
                 if (startTimestampBuilder_ == null) {
                     startTimestamp_ = builderForValue.build();
-                    onChanged();
                 } else {
                     startTimestampBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -13788,15 +13240,16 @@ public final class Monitoring {
              */
             public Builder mergeStartTimestamp(context.ContextOuterClass.Timestamp value) {
                 if (startTimestampBuilder_ == null) {
-                    if (startTimestamp_ != null) {
-                        startTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(startTimestamp_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000010) != 0) && startTimestamp_ != null && startTimestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) {
+                        getStartTimestampBuilder().mergeFrom(value);
                     } else {
                         startTimestamp_ = value;
                     }
-                    onChanged();
                 } else {
                     startTimestampBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -13808,13 +13261,13 @@ public final class Monitoring {
              * .context.Timestamp start_timestamp = 5;
              */
             public Builder clearStartTimestamp() {
-                if (startTimestampBuilder_ == null) {
-                    startTimestamp_ = null;
-                    onChanged();
-                } else {
-                    startTimestamp_ = null;
+                bitField0_ = (bitField0_ & ~0x00000010);
+                startTimestamp_ = null;
+                if (startTimestampBuilder_ != null) {
+                    startTimestampBuilder_.dispose();
                     startTimestampBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -13826,6 +13279,7 @@ public final class Monitoring {
              * .context.Timestamp start_timestamp = 5;
              */
             public context.ContextOuterClass.Timestamp.Builder getStartTimestampBuilder() {
+                bitField0_ |= 0x00000010;
                 onChanged();
                 return getStartTimestampFieldBuilder().getBuilder();
             }
@@ -13873,7 +13327,7 @@ public final class Monitoring {
              * @return Whether the endTimestamp field is set.
              */
             public boolean hasEndTimestamp() {
-                return endTimestampBuilder_ != null || endTimestamp_ != null;
+                return ((bitField0_ & 0x00000020) != 0);
             }
 
             /**
@@ -13905,10 +13359,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     endTimestamp_ = value;
-                    onChanged();
                 } else {
                     endTimestampBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000020;
+                onChanged();
                 return this;
             }
 
@@ -13922,10 +13377,11 @@ public final class Monitoring {
             public Builder setEndTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) {
                 if (endTimestampBuilder_ == null) {
                     endTimestamp_ = builderForValue.build();
-                    onChanged();
                 } else {
                     endTimestampBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000020;
+                onChanged();
                 return this;
             }
 
@@ -13938,15 +13394,16 @@ public final class Monitoring {
              */
             public Builder mergeEndTimestamp(context.ContextOuterClass.Timestamp value) {
                 if (endTimestampBuilder_ == null) {
-                    if (endTimestamp_ != null) {
-                        endTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(endTimestamp_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000020) != 0) && endTimestamp_ != null && endTimestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) {
+                        getEndTimestampBuilder().mergeFrom(value);
                     } else {
                         endTimestamp_ = value;
                     }
-                    onChanged();
                 } else {
                     endTimestampBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000020;
+                onChanged();
                 return this;
             }
 
@@ -13958,13 +13415,13 @@ public final class Monitoring {
              * .context.Timestamp end_timestamp = 6;
              */
             public Builder clearEndTimestamp() {
-                if (endTimestampBuilder_ == null) {
-                    endTimestamp_ = null;
-                    onChanged();
-                } else {
-                    endTimestamp_ = null;
+                bitField0_ = (bitField0_ & ~0x00000020);
+                endTimestamp_ = null;
+                if (endTimestampBuilder_ != null) {
+                    endTimestampBuilder_.dispose();
                     endTimestampBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -13976,6 +13433,7 @@ public final class Monitoring {
              * .context.Timestamp end_timestamp = 6;
              */
             public context.ContextOuterClass.Timestamp.Builder getEndTimestampBuilder() {
+                bitField0_ |= 0x00000020;
                 onChanged();
                 return getEndTimestampFieldBuilder().getBuilder();
             }
@@ -14037,7 +13495,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public SubsDescriptor parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new SubsDescriptor(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -14099,57 +13567,6 @@ public final class Monitoring {
             return new SubscriptionID();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private SubscriptionID(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Uuid.Builder subBuilder = null;
-                                if (subsId_ != null) {
-                                    subBuilder = subsId_.toBuilder();
-                                }
-                                subsId_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(subsId_);
-                                    subsId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_descriptor;
         }
@@ -14186,7 +13603,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder() {
-            return getSubsId();
+            return subsId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -14207,7 +13624,7 @@ public final class Monitoring {
             if (subsId_ != null) {
                 output.writeMessage(1, getSubsId());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -14219,7 +13636,7 @@ public final class Monitoring {
             if (subsId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubsId());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -14239,7 +13656,7 @@ public final class Monitoring {
                 if (!getSubsId().equals(other.getSubsId()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -14255,7 +13672,7 @@ public final class Monitoring {
                 hash = (37 * hash) + SUBS_ID_FIELD_NUMBER;
                 hash = (53 * hash) + getSubsId().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -14349,26 +13766,19 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.SubscriptionID.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (subsIdBuilder_ == null) {
-                    subsId_ = null;
-                } else {
-                    subsId_ = null;
+                bitField0_ = 0;
+                subsId_ = null;
+                if (subsIdBuilder_ != null) {
+                    subsIdBuilder_.dispose();
                     subsIdBuilder_ = null;
                 }
                 return this;
@@ -14396,43 +13806,18 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.SubscriptionID buildPartial() {
                 monitoring.Monitoring.SubscriptionID result = new monitoring.Monitoring.SubscriptionID(this);
-                if (subsIdBuilder_ == null) {
-                    result.subsId_ = subsId_;
-                } else {
-                    result.subsId_ = subsIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.SubscriptionID result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.subsId_ = subsIdBuilder_ == null ? subsId_ : subsIdBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -14451,7 +13836,7 @@ public final class Monitoring {
                 if (other.hasSubsId()) {
                     mergeSubsId(other.getSubsId());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -14463,20 +13848,47 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.SubscriptionID parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getSubsIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.SubscriptionID) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.Uuid subsId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 subsIdBuilder_;
@@ -14486,7 +13898,7 @@ public final class Monitoring {
              * @return Whether the subsId field is set.
              */
             public boolean hasSubsId() {
-                return subsIdBuilder_ != null || subsId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -14510,10 +13922,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     subsId_ = value;
-                    onChanged();
                 } else {
                     subsIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -14523,10 +13936,11 @@ public final class Monitoring {
             public Builder setSubsId(context.ContextOuterClass.Uuid.Builder builderForValue) {
                 if (subsIdBuilder_ == null) {
                     subsId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     subsIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -14535,15 +13949,16 @@ public final class Monitoring {
              */
             public Builder mergeSubsId(context.ContextOuterClass.Uuid value) {
                 if (subsIdBuilder_ == null) {
-                    if (subsId_ != null) {
-                        subsId_ = context.ContextOuterClass.Uuid.newBuilder(subsId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && subsId_ != null && subsId_ != context.ContextOuterClass.Uuid.getDefaultInstance()) {
+                        getSubsIdBuilder().mergeFrom(value);
                     } else {
                         subsId_ = value;
                     }
-                    onChanged();
                 } else {
                     subsIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -14551,13 +13966,13 @@ public final class Monitoring {
              * .context.Uuid subs_id = 1;
              */
             public Builder clearSubsId() {
-                if (subsIdBuilder_ == null) {
-                    subsId_ = null;
-                    onChanged();
-                } else {
-                    subsId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                subsId_ = null;
+                if (subsIdBuilder_ != null) {
+                    subsIdBuilder_.dispose();
                     subsIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -14565,6 +13980,7 @@ public final class Monitoring {
              * .context.Uuid subs_id = 1;
              */
             public context.ContextOuterClass.Uuid.Builder getSubsIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getSubsIdFieldBuilder().getBuilder();
             }
@@ -14618,7 +14034,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public SubscriptionID parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new SubscriptionID(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -14697,70 +14123,6 @@ public final class Monitoring {
             return new SubsResponse();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private SubsResponse(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                monitoring.Monitoring.SubscriptionID.Builder subBuilder = null;
-                                if (subsId_ != null) {
-                                    subBuilder = subsId_.toBuilder();
-                                }
-                                subsId_ = input.readMessage(monitoring.Monitoring.SubscriptionID.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(subsId_);
-                                    subsId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                monitoring.Monitoring.KpiList.Builder subBuilder = null;
-                                if (kpiList_ != null) {
-                                    subBuilder = kpiList_.toBuilder();
-                                }
-                                kpiList_ = input.readMessage(monitoring.Monitoring.KpiList.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(kpiList_);
-                                    kpiList_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_SubsResponse_descriptor;
         }
@@ -14797,7 +14159,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() {
-            return getSubsId();
+            return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_;
         }
 
         public static final int KPI_LIST_FIELD_NUMBER = 2;
@@ -14827,7 +14189,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() {
-            return getKpiList();
+            return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -14851,7 +14213,7 @@ public final class Monitoring {
             if (kpiList_ != null) {
                 output.writeMessage(2, getKpiList());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -14866,7 +14228,7 @@ public final class Monitoring {
             if (kpiList_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiList());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -14892,7 +14254,7 @@ public final class Monitoring {
                 if (!getKpiList().equals(other.getKpiList()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -14912,7 +14274,7 @@ public final class Monitoring {
                 hash = (37 * hash) + KPI_LIST_FIELD_NUMBER;
                 hash = (53 * hash) + getKpiList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -15006,32 +14368,24 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.SubsResponse.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (subsIdBuilder_ == null) {
-                    subsId_ = null;
-                } else {
-                    subsId_ = null;
+                bitField0_ = 0;
+                subsId_ = null;
+                if (subsIdBuilder_ != null) {
+                    subsIdBuilder_.dispose();
                     subsIdBuilder_ = null;
                 }
-                if (kpiListBuilder_ == null) {
-                    kpiList_ = null;
-                } else {
-                    kpiList_ = null;
+                kpiList_ = null;
+                if (kpiListBuilder_ != null) {
+                    kpiListBuilder_.dispose();
                     kpiListBuilder_ = null;
                 }
                 return this;
@@ -15059,48 +14413,21 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.SubsResponse buildPartial() {
                 monitoring.Monitoring.SubsResponse result = new monitoring.Monitoring.SubsResponse(this);
-                if (subsIdBuilder_ == null) {
-                    result.subsId_ = subsId_;
-                } else {
-                    result.subsId_ = subsIdBuilder_.build();
-                }
-                if (kpiListBuilder_ == null) {
-                    result.kpiList_ = kpiList_;
-                } else {
-                    result.kpiList_ = kpiListBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.SubsResponse result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.subsId_ = subsIdBuilder_ == null ? subsId_ : subsIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.kpiList_ = kpiListBuilder_ == null ? kpiList_ : kpiListBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -15122,7 +14449,7 @@ public final class Monitoring {
                 if (other.hasKpiList()) {
                     mergeKpiList(other.getKpiList());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -15134,20 +14461,54 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.SubsResponse parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getSubsIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getKpiListFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.SubsResponse) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private monitoring.Monitoring.SubscriptionID subsId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 subsIdBuilder_;
@@ -15157,7 +14518,7 @@ public final class Monitoring {
              * @return Whether the subsId field is set.
              */
             public boolean hasSubsId() {
-                return subsIdBuilder_ != null || subsId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -15181,10 +14542,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     subsId_ = value;
-                    onChanged();
                 } else {
                     subsIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -15194,10 +14556,11 @@ public final class Monitoring {
             public Builder setSubsId(monitoring.Monitoring.SubscriptionID.Builder builderForValue) {
                 if (subsIdBuilder_ == null) {
                     subsId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     subsIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -15206,15 +14569,16 @@ public final class Monitoring {
              */
             public Builder mergeSubsId(monitoring.Monitoring.SubscriptionID value) {
                 if (subsIdBuilder_ == null) {
-                    if (subsId_ != null) {
-                        subsId_ = monitoring.Monitoring.SubscriptionID.newBuilder(subsId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && subsId_ != null && subsId_ != monitoring.Monitoring.SubscriptionID.getDefaultInstance()) {
+                        getSubsIdBuilder().mergeFrom(value);
                     } else {
                         subsId_ = value;
                     }
-                    onChanged();
                 } else {
                     subsIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -15222,13 +14586,13 @@ public final class Monitoring {
              * .monitoring.SubscriptionID subs_id = 1;
              */
             public Builder clearSubsId() {
-                if (subsIdBuilder_ == null) {
-                    subsId_ = null;
-                    onChanged();
-                } else {
-                    subsId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                subsId_ = null;
+                if (subsIdBuilder_ != null) {
+                    subsIdBuilder_.dispose();
                     subsIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -15236,6 +14600,7 @@ public final class Monitoring {
              * .monitoring.SubscriptionID subs_id = 1;
              */
             public monitoring.Monitoring.SubscriptionID.Builder getSubsIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getSubsIdFieldBuilder().getBuilder();
             }
@@ -15271,7 +14636,7 @@ public final class Monitoring {
              * @return Whether the kpiList field is set.
              */
             public boolean hasKpiList() {
-                return kpiListBuilder_ != null || kpiList_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -15295,10 +14660,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     kpiList_ = value;
-                    onChanged();
                 } else {
                     kpiListBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -15308,10 +14674,11 @@ public final class Monitoring {
             public Builder setKpiList(monitoring.Monitoring.KpiList.Builder builderForValue) {
                 if (kpiListBuilder_ == null) {
                     kpiList_ = builderForValue.build();
-                    onChanged();
                 } else {
                     kpiListBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -15320,15 +14687,16 @@ public final class Monitoring {
              */
             public Builder mergeKpiList(monitoring.Monitoring.KpiList value) {
                 if (kpiListBuilder_ == null) {
-                    if (kpiList_ != null) {
-                        kpiList_ = monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && kpiList_ != null && kpiList_ != monitoring.Monitoring.KpiList.getDefaultInstance()) {
+                        getKpiListBuilder().mergeFrom(value);
                     } else {
                         kpiList_ = value;
                     }
-                    onChanged();
                 } else {
                     kpiListBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -15336,13 +14704,13 @@ public final class Monitoring {
              * .monitoring.KpiList kpi_list = 2;
              */
             public Builder clearKpiList() {
-                if (kpiListBuilder_ == null) {
-                    kpiList_ = null;
-                    onChanged();
-                } else {
-                    kpiList_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                kpiList_ = null;
+                if (kpiListBuilder_ != null) {
+                    kpiListBuilder_.dispose();
                     kpiListBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -15350,6 +14718,7 @@ public final class Monitoring {
              * .monitoring.KpiList kpi_list = 2;
              */
             public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getKpiListFieldBuilder().getBuilder();
             }
@@ -15403,7 +14772,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public SubsResponse parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new SubsResponse(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -15460,69 +14839,18 @@ public final class Monitoring {
         private static final long serialVersionUID = 0L;
 
         // Use SubsList.newBuilder() to construct.
-        private SubsList(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-            super(builder);
-        }
-
-        private SubsList() {
-            subsDescriptor_ = java.util.Collections.emptyList();
-        }
-
-        @java.lang.Override
-        @SuppressWarnings({ "unused" })
-        protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
-            return new SubsList();
-        }
-
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private SubsList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    subsDescriptor_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                subsDescriptor_.add(input.readMessage(monitoring.Monitoring.SubsDescriptor.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    subsDescriptor_ = java.util.Collections.unmodifiableList(subsDescriptor_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
+        private SubsList(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+            super(builder);
+        }
+
+        private SubsList() {
+            subsDescriptor_ = java.util.Collections.emptyList();
+        }
+
+        @java.lang.Override
+        @SuppressWarnings({ "unused" })
+        protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+            return new SubsList();
         }
 
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
@@ -15536,6 +14864,7 @@ public final class Monitoring {
 
         public static final int SUBS_DESCRIPTOR_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List subsDescriptor_;
 
         /**
@@ -15596,7 +14925,7 @@ public final class Monitoring {
             for (int i = 0; i < subsDescriptor_.size(); i++) {
                 output.writeMessage(1, subsDescriptor_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -15608,7 +14937,7 @@ public final class Monitoring {
             for (int i = 0; i < subsDescriptor_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, subsDescriptor_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -15624,7 +14953,7 @@ public final class Monitoring {
             monitoring.Monitoring.SubsList other = (monitoring.Monitoring.SubsList) obj;
             if (!getSubsDescriptorList().equals(other.getSubsDescriptorList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -15640,7 +14969,7 @@ public final class Monitoring {
                 hash = (37 * hash) + SUBS_DESCRIPTOR_FIELD_NUMBER;
                 hash = (53 * hash) + getSubsDescriptorList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -15734,29 +15063,23 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.SubsList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getSubsDescriptorFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (subsDescriptorBuilder_ == null) {
                     subsDescriptor_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    subsDescriptor_ = null;
                     subsDescriptorBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -15782,7 +15105,15 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.SubsList buildPartial() {
                 monitoring.Monitoring.SubsList result = new monitoring.Monitoring.SubsList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(monitoring.Monitoring.SubsList result) {
                 if (subsDescriptorBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         subsDescriptor_ = java.util.Collections.unmodifiableList(subsDescriptor_);
@@ -15792,38 +15123,10 @@ public final class Monitoring {
                 } else {
                     result.subsDescriptor_ = subsDescriptorBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
             }
 
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.SubsList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -15863,7 +15166,7 @@ public final class Monitoring {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -15875,17 +15178,47 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.SubsList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    monitoring.Monitoring.SubsDescriptor m = input.readMessage(monitoring.Monitoring.SubsDescriptor.parser(), extensionRegistry);
+                                    if (subsDescriptorBuilder_ == null) {
+                                        ensureSubsDescriptorIsMutable();
+                                        subsDescriptor_.add(m);
+                                    } else {
+                                        subsDescriptorBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.SubsList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -16155,7 +15488,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public SubsList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new SubsList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -16294,108 +15637,6 @@ public final class Monitoring {
             return new AlarmDescriptor();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private AlarmDescriptor(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                monitoring.Monitoring.AlarmID.Builder subBuilder = null;
-                                if (alarmId_ != null) {
-                                    subBuilder = alarmId_.toBuilder();
-                                }
-                                alarmId_ = input.readMessage(monitoring.Monitoring.AlarmID.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(alarmId_);
-                                    alarmId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                alarmDescription_ = s;
-                                break;
-                            }
-                        case 26:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                name_ = s;
-                                break;
-                            }
-                        case 34:
-                            {
-                                monitoring.Monitoring.KpiId.Builder subBuilder = null;
-                                if (kpiId_ != null) {
-                                    subBuilder = kpiId_.toBuilder();
-                                }
-                                kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(kpiId_);
-                                    kpiId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 42:
-                            {
-                                monitoring.Monitoring.KpiValueRange.Builder subBuilder = null;
-                                if (kpiValueRange_ != null) {
-                                    subBuilder = kpiValueRange_.toBuilder();
-                                }
-                                kpiValueRange_ = input.readMessage(monitoring.Monitoring.KpiValueRange.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(kpiValueRange_);
-                                    kpiValueRange_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 50:
-                            {
-                                context.ContextOuterClass.Timestamp.Builder subBuilder = null;
-                                if (timestamp_ != null) {
-                                    subBuilder = timestamp_.toBuilder();
-                                }
-                                timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(timestamp_);
-                                    timestamp_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_descriptor;
         }
@@ -16432,12 +15673,13 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() {
-            return getAlarmId();
+            return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_;
         }
 
         public static final int ALARM_DESCRIPTION_FIELD_NUMBER = 2;
 
-        private volatile java.lang.Object alarmDescription_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object alarmDescription_ = "";
 
         /**
          * string alarm_description = 2;
@@ -16474,7 +15716,8 @@ public final class Monitoring {
 
         public static final int NAME_FIELD_NUMBER = 3;
 
-        private volatile java.lang.Object name_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object name_ = "";
 
         /**
          * string name = 3;
@@ -16536,7 +15779,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() {
-            return getKpiId();
+            return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_;
         }
 
         public static final int KPI_VALUE_RANGE_FIELD_NUMBER = 5;
@@ -16566,7 +15809,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() {
-            return getKpiValueRange();
+            return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_;
         }
 
         public static final int TIMESTAMP_FIELD_NUMBER = 6;
@@ -16596,7 +15839,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() {
-            return getTimestamp();
+            return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -16617,10 +15860,10 @@ public final class Monitoring {
             if (alarmId_ != null) {
                 output.writeMessage(1, getAlarmId());
             }
-            if (!getAlarmDescriptionBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alarmDescription_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, alarmDescription_);
             }
-            if (!getNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
             }
             if (kpiId_ != null) {
@@ -16632,7 +15875,7 @@ public final class Monitoring {
             if (timestamp_ != null) {
                 output.writeMessage(6, getTimestamp());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -16644,10 +15887,10 @@ public final class Monitoring {
             if (alarmId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId());
             }
-            if (!getAlarmDescriptionBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alarmDescription_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, alarmDescription_);
             }
-            if (!getNameBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
             }
             if (kpiId_ != null) {
@@ -16659,7 +15902,7 @@ public final class Monitoring {
             if (timestamp_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTimestamp());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -16701,7 +15944,7 @@ public final class Monitoring {
                 if (!getTimestamp().equals(other.getTimestamp()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -16733,7 +15976,7 @@ public final class Monitoring {
                 hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
                 hash = (53 * hash) + getTimestamp().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -16827,46 +16070,36 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.AlarmDescriptor.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (alarmIdBuilder_ == null) {
-                    alarmId_ = null;
-                } else {
-                    alarmId_ = null;
+                bitField0_ = 0;
+                alarmId_ = null;
+                if (alarmIdBuilder_ != null) {
+                    alarmIdBuilder_.dispose();
                     alarmIdBuilder_ = null;
                 }
                 alarmDescription_ = "";
                 name_ = "";
-                if (kpiIdBuilder_ == null) {
-                    kpiId_ = null;
-                } else {
-                    kpiId_ = null;
+                kpiId_ = null;
+                if (kpiIdBuilder_ != null) {
+                    kpiIdBuilder_.dispose();
                     kpiIdBuilder_ = null;
                 }
-                if (kpiValueRangeBuilder_ == null) {
-                    kpiValueRange_ = null;
-                } else {
-                    kpiValueRange_ = null;
+                kpiValueRange_ = null;
+                if (kpiValueRangeBuilder_ != null) {
+                    kpiValueRangeBuilder_.dispose();
                     kpiValueRangeBuilder_ = null;
                 }
-                if (timestampBuilder_ == null) {
-                    timestamp_ = null;
-                } else {
-                    timestamp_ = null;
+                timestamp_ = null;
+                if (timestampBuilder_ != null) {
+                    timestampBuilder_.dispose();
                     timestampBuilder_ = null;
                 }
                 return this;
@@ -16894,60 +16127,33 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.AlarmDescriptor buildPartial() {
                 monitoring.Monitoring.AlarmDescriptor result = new monitoring.Monitoring.AlarmDescriptor(this);
-                if (alarmIdBuilder_ == null) {
-                    result.alarmId_ = alarmId_;
-                } else {
-                    result.alarmId_ = alarmIdBuilder_.build();
-                }
-                result.alarmDescription_ = alarmDescription_;
-                result.name_ = name_;
-                if (kpiIdBuilder_ == null) {
-                    result.kpiId_ = kpiId_;
-                } else {
-                    result.kpiId_ = kpiIdBuilder_.build();
-                }
-                if (kpiValueRangeBuilder_ == null) {
-                    result.kpiValueRange_ = kpiValueRange_;
-                } else {
-                    result.kpiValueRange_ = kpiValueRangeBuilder_.build();
-                }
-                if (timestampBuilder_ == null) {
-                    result.timestamp_ = timestamp_;
-                } else {
-                    result.timestamp_ = timestampBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.AlarmDescriptor result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.alarmId_ = alarmIdBuilder_ == null ? alarmId_ : alarmIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.alarmDescription_ = alarmDescription_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.name_ = name_;
+                }
+                if (((from_bitField0_ & 0x00000008) != 0)) {
+                    result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000010) != 0)) {
+                    result.kpiValueRange_ = kpiValueRangeBuilder_ == null ? kpiValueRange_ : kpiValueRangeBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000020) != 0)) {
+                    result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -16968,10 +16174,12 @@ public final class Monitoring {
                 }
                 if (!other.getAlarmDescription().isEmpty()) {
                     alarmDescription_ = other.alarmDescription_;
+                    bitField0_ |= 0x00000002;
                     onChanged();
                 }
                 if (!other.getName().isEmpty()) {
                     name_ = other.name_;
+                    bitField0_ |= 0x00000004;
                     onChanged();
                 }
                 if (other.hasKpiId()) {
@@ -16983,7 +16191,7 @@ public final class Monitoring {
                 if (other.hasTimestamp()) {
                     mergeTimestamp(other.getTimestamp());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -16995,20 +16203,82 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.AlarmDescriptor parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getAlarmIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    alarmDescription_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    name_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 26
+                            case 34:
+                                {
+                                    input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000008;
+                                    break;
+                                }
+                            // case 34
+                            case 42:
+                                {
+                                    input.readMessage(getKpiValueRangeFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000010;
+                                    break;
+                                }
+                            // case 42
+                            case 50:
+                                {
+                                    input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000020;
+                                    break;
+                                }
+                            // case 50
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.AlarmDescriptor) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private monitoring.Monitoring.AlarmID alarmId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 alarmIdBuilder_;
@@ -17018,7 +16288,7 @@ public final class Monitoring {
              * @return Whether the alarmId field is set.
              */
             public boolean hasAlarmId() {
-                return alarmIdBuilder_ != null || alarmId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -17042,10 +16312,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     alarmId_ = value;
-                    onChanged();
                 } else {
                     alarmIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -17055,10 +16326,11 @@ public final class Monitoring {
             public Builder setAlarmId(monitoring.Monitoring.AlarmID.Builder builderForValue) {
                 if (alarmIdBuilder_ == null) {
                     alarmId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     alarmIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -17067,15 +16339,16 @@ public final class Monitoring {
              */
             public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) {
                 if (alarmIdBuilder_ == null) {
-                    if (alarmId_ != null) {
-                        alarmId_ = monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && alarmId_ != null && alarmId_ != monitoring.Monitoring.AlarmID.getDefaultInstance()) {
+                        getAlarmIdBuilder().mergeFrom(value);
                     } else {
                         alarmId_ = value;
                     }
-                    onChanged();
                 } else {
                     alarmIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -17083,13 +16356,13 @@ public final class Monitoring {
              * .monitoring.AlarmID alarm_id = 1;
              */
             public Builder clearAlarmId() {
-                if (alarmIdBuilder_ == null) {
-                    alarmId_ = null;
-                    onChanged();
-                } else {
-                    alarmId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                alarmId_ = null;
+                if (alarmIdBuilder_ != null) {
+                    alarmIdBuilder_.dispose();
                     alarmIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -17097,6 +16370,7 @@ public final class Monitoring {
              * .monitoring.AlarmID alarm_id = 1;
              */
             public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getAlarmIdFieldBuilder().getBuilder();
             }
@@ -17166,6 +16440,7 @@ public final class Monitoring {
                     throw new NullPointerException();
                 }
                 alarmDescription_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -17176,6 +16451,7 @@ public final class Monitoring {
              */
             public Builder clearAlarmDescription() {
                 alarmDescription_ = getDefaultInstance().getAlarmDescription();
+                bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
             }
@@ -17191,6 +16467,7 @@ public final class Monitoring {
                 }
                 checkByteStringIsUtf8(value);
                 alarmDescription_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -17238,6 +16515,7 @@ public final class Monitoring {
                     throw new NullPointerException();
                 }
                 name_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -17248,6 +16526,7 @@ public final class Monitoring {
              */
             public Builder clearName() {
                 name_ = getDefaultInstance().getName();
+                bitField0_ = (bitField0_ & ~0x00000004);
                 onChanged();
                 return this;
             }
@@ -17263,6 +16542,7 @@ public final class Monitoring {
                 }
                 checkByteStringIsUtf8(value);
                 name_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -17276,7 +16556,7 @@ public final class Monitoring {
              * @return Whether the kpiId field is set.
              */
             public boolean hasKpiId() {
-                return kpiIdBuilder_ != null || kpiId_ != null;
+                return ((bitField0_ & 0x00000008) != 0);
             }
 
             /**
@@ -17300,10 +16580,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     kpiId_ = value;
-                    onChanged();
                 } else {
                     kpiIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000008;
+                onChanged();
                 return this;
             }
 
@@ -17313,10 +16594,11 @@ public final class Monitoring {
             public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) {
                 if (kpiIdBuilder_ == null) {
                     kpiId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     kpiIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000008;
+                onChanged();
                 return this;
             }
 
@@ -17325,15 +16607,16 @@ public final class Monitoring {
              */
             public Builder mergeKpiId(monitoring.Monitoring.KpiId value) {
                 if (kpiIdBuilder_ == null) {
-                    if (kpiId_ != null) {
-                        kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000008) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) {
+                        getKpiIdBuilder().mergeFrom(value);
                     } else {
                         kpiId_ = value;
                     }
-                    onChanged();
                 } else {
                     kpiIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000008;
+                onChanged();
                 return this;
             }
 
@@ -17341,13 +16624,13 @@ public final class Monitoring {
              * .monitoring.KpiId kpi_id = 4;
              */
             public Builder clearKpiId() {
-                if (kpiIdBuilder_ == null) {
-                    kpiId_ = null;
-                    onChanged();
-                } else {
-                    kpiId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000008);
+                kpiId_ = null;
+                if (kpiIdBuilder_ != null) {
+                    kpiIdBuilder_.dispose();
                     kpiIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -17355,6 +16638,7 @@ public final class Monitoring {
              * .monitoring.KpiId kpi_id = 4;
              */
             public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() {
+                bitField0_ |= 0x00000008;
                 onChanged();
                 return getKpiIdFieldBuilder().getBuilder();
             }
@@ -17390,7 +16674,7 @@ public final class Monitoring {
              * @return Whether the kpiValueRange field is set.
              */
             public boolean hasKpiValueRange() {
-                return kpiValueRangeBuilder_ != null || kpiValueRange_ != null;
+                return ((bitField0_ & 0x00000010) != 0);
             }
 
             /**
@@ -17414,10 +16698,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     kpiValueRange_ = value;
-                    onChanged();
                 } else {
                     kpiValueRangeBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -17427,10 +16712,11 @@ public final class Monitoring {
             public Builder setKpiValueRange(monitoring.Monitoring.KpiValueRange.Builder builderForValue) {
                 if (kpiValueRangeBuilder_ == null) {
                     kpiValueRange_ = builderForValue.build();
-                    onChanged();
                 } else {
                     kpiValueRangeBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -17439,15 +16725,16 @@ public final class Monitoring {
              */
             public Builder mergeKpiValueRange(monitoring.Monitoring.KpiValueRange value) {
                 if (kpiValueRangeBuilder_ == null) {
-                    if (kpiValueRange_ != null) {
-                        kpiValueRange_ = monitoring.Monitoring.KpiValueRange.newBuilder(kpiValueRange_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000010) != 0) && kpiValueRange_ != null && kpiValueRange_ != monitoring.Monitoring.KpiValueRange.getDefaultInstance()) {
+                        getKpiValueRangeBuilder().mergeFrom(value);
                     } else {
                         kpiValueRange_ = value;
                     }
-                    onChanged();
                 } else {
                     kpiValueRangeBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000010;
+                onChanged();
                 return this;
             }
 
@@ -17455,13 +16742,13 @@ public final class Monitoring {
              * .monitoring.KpiValueRange kpi_value_range = 5;
              */
             public Builder clearKpiValueRange() {
-                if (kpiValueRangeBuilder_ == null) {
-                    kpiValueRange_ = null;
-                    onChanged();
-                } else {
-                    kpiValueRange_ = null;
+                bitField0_ = (bitField0_ & ~0x00000010);
+                kpiValueRange_ = null;
+                if (kpiValueRangeBuilder_ != null) {
+                    kpiValueRangeBuilder_.dispose();
                     kpiValueRangeBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -17469,6 +16756,7 @@ public final class Monitoring {
              * .monitoring.KpiValueRange kpi_value_range = 5;
              */
             public monitoring.Monitoring.KpiValueRange.Builder getKpiValueRangeBuilder() {
+                bitField0_ |= 0x00000010;
                 onChanged();
                 return getKpiValueRangeFieldBuilder().getBuilder();
             }
@@ -17504,7 +16792,7 @@ public final class Monitoring {
              * @return Whether the timestamp field is set.
              */
             public boolean hasTimestamp() {
-                return timestampBuilder_ != null || timestamp_ != null;
+                return ((bitField0_ & 0x00000020) != 0);
             }
 
             /**
@@ -17528,10 +16816,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     timestamp_ = value;
-                    onChanged();
                 } else {
                     timestampBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000020;
+                onChanged();
                 return this;
             }
 
@@ -17541,10 +16830,11 @@ public final class Monitoring {
             public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) {
                 if (timestampBuilder_ == null) {
                     timestamp_ = builderForValue.build();
-                    onChanged();
                 } else {
                     timestampBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000020;
+                onChanged();
                 return this;
             }
 
@@ -17553,15 +16843,16 @@ public final class Monitoring {
              */
             public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) {
                 if (timestampBuilder_ == null) {
-                    if (timestamp_ != null) {
-                        timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000020) != 0) && timestamp_ != null && timestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) {
+                        getTimestampBuilder().mergeFrom(value);
                     } else {
                         timestamp_ = value;
                     }
-                    onChanged();
                 } else {
                     timestampBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000020;
+                onChanged();
                 return this;
             }
 
@@ -17569,13 +16860,13 @@ public final class Monitoring {
              * .context.Timestamp timestamp = 6;
              */
             public Builder clearTimestamp() {
-                if (timestampBuilder_ == null) {
-                    timestamp_ = null;
-                    onChanged();
-                } else {
-                    timestamp_ = null;
+                bitField0_ = (bitField0_ & ~0x00000020);
+                timestamp_ = null;
+                if (timestampBuilder_ != null) {
+                    timestampBuilder_.dispose();
                     timestampBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -17583,6 +16874,7 @@ public final class Monitoring {
              * .context.Timestamp timestamp = 6;
              */
             public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() {
+                bitField0_ |= 0x00000020;
                 onChanged();
                 return getTimestampFieldBuilder().getBuilder();
             }
@@ -17636,7 +16928,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public AlarmDescriptor parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new AlarmDescriptor(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -17698,57 +17000,6 @@ public final class Monitoring {
             return new AlarmID();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private AlarmID(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Uuid.Builder subBuilder = null;
-                                if (alarmId_ != null) {
-                                    subBuilder = alarmId_.toBuilder();
-                                }
-                                alarmId_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(alarmId_);
-                                    alarmId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_AlarmID_descriptor;
         }
@@ -17785,7 +17036,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder() {
-            return getAlarmId();
+            return alarmId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -17806,7 +17057,7 @@ public final class Monitoring {
             if (alarmId_ != null) {
                 output.writeMessage(1, getAlarmId());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -17818,7 +17069,7 @@ public final class Monitoring {
             if (alarmId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -17838,7 +17089,7 @@ public final class Monitoring {
                 if (!getAlarmId().equals(other.getAlarmId()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -17854,7 +17105,7 @@ public final class Monitoring {
                 hash = (37 * hash) + ALARM_ID_FIELD_NUMBER;
                 hash = (53 * hash) + getAlarmId().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -17948,26 +17199,19 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.AlarmID.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (alarmIdBuilder_ == null) {
-                    alarmId_ = null;
-                } else {
-                    alarmId_ = null;
+                bitField0_ = 0;
+                alarmId_ = null;
+                if (alarmIdBuilder_ != null) {
+                    alarmIdBuilder_.dispose();
                     alarmIdBuilder_ = null;
                 }
                 return this;
@@ -17995,43 +17239,18 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.AlarmID buildPartial() {
                 monitoring.Monitoring.AlarmID result = new monitoring.Monitoring.AlarmID(this);
-                if (alarmIdBuilder_ == null) {
-                    result.alarmId_ = alarmId_;
-                } else {
-                    result.alarmId_ = alarmIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.AlarmID result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.alarmId_ = alarmIdBuilder_ == null ? alarmId_ : alarmIdBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -18050,7 +17269,7 @@ public final class Monitoring {
                 if (other.hasAlarmId()) {
                     mergeAlarmId(other.getAlarmId());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -18062,20 +17281,47 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.AlarmID parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getAlarmIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.AlarmID) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.Uuid alarmId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 alarmIdBuilder_;
@@ -18085,7 +17331,7 @@ public final class Monitoring {
              * @return Whether the alarmId field is set.
              */
             public boolean hasAlarmId() {
-                return alarmIdBuilder_ != null || alarmId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -18109,10 +17355,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     alarmId_ = value;
-                    onChanged();
                 } else {
                     alarmIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -18122,10 +17369,11 @@ public final class Monitoring {
             public Builder setAlarmId(context.ContextOuterClass.Uuid.Builder builderForValue) {
                 if (alarmIdBuilder_ == null) {
                     alarmId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     alarmIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -18134,15 +17382,16 @@ public final class Monitoring {
              */
             public Builder mergeAlarmId(context.ContextOuterClass.Uuid value) {
                 if (alarmIdBuilder_ == null) {
-                    if (alarmId_ != null) {
-                        alarmId_ = context.ContextOuterClass.Uuid.newBuilder(alarmId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && alarmId_ != null && alarmId_ != context.ContextOuterClass.Uuid.getDefaultInstance()) {
+                        getAlarmIdBuilder().mergeFrom(value);
                     } else {
                         alarmId_ = value;
                     }
-                    onChanged();
                 } else {
                     alarmIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -18150,13 +17399,13 @@ public final class Monitoring {
              * .context.Uuid alarm_id = 1;
              */
             public Builder clearAlarmId() {
-                if (alarmIdBuilder_ == null) {
-                    alarmId_ = null;
-                    onChanged();
-                } else {
-                    alarmId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                alarmId_ = null;
+                if (alarmIdBuilder_ != null) {
+                    alarmIdBuilder_.dispose();
                     alarmIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -18164,6 +17413,7 @@ public final class Monitoring {
              * .context.Uuid alarm_id = 1;
              */
             public context.ContextOuterClass.Uuid.Builder getAlarmIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getAlarmIdFieldBuilder().getBuilder();
             }
@@ -18217,7 +17467,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public AlarmID parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new AlarmID(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -18291,67 +17551,6 @@ public final class Monitoring {
             return new AlarmSubscription();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private AlarmSubscription(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                monitoring.Monitoring.AlarmID.Builder subBuilder = null;
-                                if (alarmId_ != null) {
-                                    subBuilder = alarmId_.toBuilder();
-                                }
-                                alarmId_ = input.readMessage(monitoring.Monitoring.AlarmID.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(alarmId_);
-                                    alarmId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 21:
-                            {
-                                subscriptionTimeoutS_ = input.readFloat();
-                                break;
-                            }
-                        case 29:
-                            {
-                                subscriptionFrequencyMs_ = input.readFloat();
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_descriptor;
         }
@@ -18388,12 +17587,12 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() {
-            return getAlarmId();
+            return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_;
         }
 
         public static final int SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER = 2;
 
-        private float subscriptionTimeoutS_;
+        private float subscriptionTimeoutS_ = 0F;
 
         /**
          * float subscription_timeout_s = 2;
@@ -18406,7 +17605,7 @@ public final class Monitoring {
 
         public static final int SUBSCRIPTION_FREQUENCY_MS_FIELD_NUMBER = 3;
 
-        private float subscriptionFrequencyMs_;
+        private float subscriptionFrequencyMs_ = 0F;
 
         /**
          * float subscription_frequency_ms = 3;
@@ -18435,13 +17634,13 @@ public final class Monitoring {
             if (alarmId_ != null) {
                 output.writeMessage(1, getAlarmId());
             }
-            if (subscriptionTimeoutS_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(subscriptionTimeoutS_) != 0) {
                 output.writeFloat(2, subscriptionTimeoutS_);
             }
-            if (subscriptionFrequencyMs_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(subscriptionFrequencyMs_) != 0) {
                 output.writeFloat(3, subscriptionFrequencyMs_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -18453,13 +17652,13 @@ public final class Monitoring {
             if (alarmId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId());
             }
-            if (subscriptionTimeoutS_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(subscriptionTimeoutS_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, subscriptionTimeoutS_);
             }
-            if (subscriptionFrequencyMs_ != 0F) {
+            if (java.lang.Float.floatToRawIntBits(subscriptionFrequencyMs_) != 0) {
                 size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, subscriptionFrequencyMs_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -18483,7 +17682,7 @@ public final class Monitoring {
                 return false;
             if (java.lang.Float.floatToIntBits(getSubscriptionFrequencyMs()) != java.lang.Float.floatToIntBits(other.getSubscriptionFrequencyMs()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -18503,7 +17702,7 @@ public final class Monitoring {
             hash = (53 * hash) + java.lang.Float.floatToIntBits(getSubscriptionTimeoutS());
             hash = (37 * hash) + SUBSCRIPTION_FREQUENCY_MS_FIELD_NUMBER;
             hash = (53 * hash) + java.lang.Float.floatToIntBits(getSubscriptionFrequencyMs());
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -18597,26 +17796,19 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.AlarmSubscription.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (alarmIdBuilder_ == null) {
-                    alarmId_ = null;
-                } else {
-                    alarmId_ = null;
+                bitField0_ = 0;
+                alarmId_ = null;
+                if (alarmIdBuilder_ != null) {
+                    alarmIdBuilder_.dispose();
                     alarmIdBuilder_ = null;
                 }
                 subscriptionTimeoutS_ = 0F;
@@ -18646,45 +17838,24 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.AlarmSubscription buildPartial() {
                 monitoring.Monitoring.AlarmSubscription result = new monitoring.Monitoring.AlarmSubscription(this);
-                if (alarmIdBuilder_ == null) {
-                    result.alarmId_ = alarmId_;
-                } else {
-                    result.alarmId_ = alarmIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.subscriptionTimeoutS_ = subscriptionTimeoutS_;
-                result.subscriptionFrequencyMs_ = subscriptionFrequencyMs_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.AlarmSubscription result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.alarmId_ = alarmIdBuilder_ == null ? alarmId_ : alarmIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.subscriptionTimeoutS_ = subscriptionTimeoutS_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.subscriptionFrequencyMs_ = subscriptionFrequencyMs_;
+                }
             }
 
             @java.lang.Override
@@ -18709,7 +17880,7 @@ public final class Monitoring {
                 if (other.getSubscriptionFrequencyMs() != 0F) {
                     setSubscriptionFrequencyMs(other.getSubscriptionFrequencyMs());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -18721,20 +17892,61 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.AlarmSubscription parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getAlarmIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 21:
+                                {
+                                    subscriptionTimeoutS_ = input.readFloat();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 21
+                            case 29:
+                                {
+                                    subscriptionFrequencyMs_ = input.readFloat();
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 29
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.AlarmSubscription) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private monitoring.Monitoring.AlarmID alarmId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 alarmIdBuilder_;
@@ -18744,7 +17956,7 @@ public final class Monitoring {
              * @return Whether the alarmId field is set.
              */
             public boolean hasAlarmId() {
-                return alarmIdBuilder_ != null || alarmId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -18768,10 +17980,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     alarmId_ = value;
-                    onChanged();
                 } else {
                     alarmIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -18781,10 +17994,11 @@ public final class Monitoring {
             public Builder setAlarmId(monitoring.Monitoring.AlarmID.Builder builderForValue) {
                 if (alarmIdBuilder_ == null) {
                     alarmId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     alarmIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -18793,15 +18007,16 @@ public final class Monitoring {
              */
             public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) {
                 if (alarmIdBuilder_ == null) {
-                    if (alarmId_ != null) {
-                        alarmId_ = monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && alarmId_ != null && alarmId_ != monitoring.Monitoring.AlarmID.getDefaultInstance()) {
+                        getAlarmIdBuilder().mergeFrom(value);
                     } else {
                         alarmId_ = value;
                     }
-                    onChanged();
                 } else {
                     alarmIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -18809,13 +18024,13 @@ public final class Monitoring {
              * .monitoring.AlarmID alarm_id = 1;
              */
             public Builder clearAlarmId() {
-                if (alarmIdBuilder_ == null) {
-                    alarmId_ = null;
-                    onChanged();
-                } else {
-                    alarmId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                alarmId_ = null;
+                if (alarmIdBuilder_ != null) {
+                    alarmIdBuilder_.dispose();
                     alarmIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -18823,6 +18038,7 @@ public final class Monitoring {
              * .monitoring.AlarmID alarm_id = 1;
              */
             public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getAlarmIdFieldBuilder().getBuilder();
             }
@@ -18867,6 +18083,7 @@ public final class Monitoring {
              */
             public Builder setSubscriptionTimeoutS(float value) {
                 subscriptionTimeoutS_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -18876,6 +18093,7 @@ public final class Monitoring {
              * @return This builder for chaining.
              */
             public Builder clearSubscriptionTimeoutS() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 subscriptionTimeoutS_ = 0F;
                 onChanged();
                 return this;
@@ -18899,6 +18117,7 @@ public final class Monitoring {
              */
             public Builder setSubscriptionFrequencyMs(float value) {
                 subscriptionFrequencyMs_ = value;
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return this;
             }
@@ -18908,6 +18127,7 @@ public final class Monitoring {
              * @return This builder for chaining.
              */
             public Builder clearSubscriptionFrequencyMs() {
+                bitField0_ = (bitField0_ & ~0x00000004);
                 subscriptionFrequencyMs_ = 0F;
                 onChanged();
                 return this;
@@ -18940,7 +18160,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public AlarmSubscription parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new AlarmSubscription(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -19032,76 +18262,6 @@ public final class Monitoring {
             return new AlarmResponse();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private AlarmResponse(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                monitoring.Monitoring.AlarmID.Builder subBuilder = null;
-                                if (alarmId_ != null) {
-                                    subBuilder = alarmId_.toBuilder();
-                                }
-                                alarmId_ = input.readMessage(monitoring.Monitoring.AlarmID.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(alarmId_);
-                                    alarmId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                text_ = s;
-                                break;
-                            }
-                        case 26:
-                            {
-                                monitoring.Monitoring.KpiList.Builder subBuilder = null;
-                                if (kpiList_ != null) {
-                                    subBuilder = kpiList_.toBuilder();
-                                }
-                                kpiList_ = input.readMessage(monitoring.Monitoring.KpiList.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(kpiList_);
-                                    kpiList_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_descriptor;
         }
@@ -19138,12 +18298,13 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() {
-            return getAlarmId();
+            return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_;
         }
 
         public static final int TEXT_FIELD_NUMBER = 2;
 
-        private volatile java.lang.Object text_;
+        @SuppressWarnings("serial")
+        private volatile java.lang.Object text_ = "";
 
         /**
          * string text = 2;
@@ -19205,7 +18366,7 @@ public final class Monitoring {
          */
         @java.lang.Override
         public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() {
-            return getKpiList();
+            return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -19226,13 +18387,13 @@ public final class Monitoring {
             if (alarmId_ != null) {
                 output.writeMessage(1, getAlarmId());
             }
-            if (!getTextBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_);
             }
             if (kpiList_ != null) {
                 output.writeMessage(3, getKpiList());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -19244,13 +18405,13 @@ public final class Monitoring {
             if (alarmId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId());
             }
-            if (!getTextBytes().isEmpty()) {
+            if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
                 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_);
             }
             if (kpiList_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKpiList());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -19278,7 +18439,7 @@ public final class Monitoring {
                 if (!getKpiList().equals(other.getKpiList()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -19300,7 +18461,7 @@ public final class Monitoring {
                 hash = (37 * hash) + KPI_LIST_FIELD_NUMBER;
                 hash = (53 * hash) + getKpiList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -19394,33 +18555,25 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.AlarmResponse.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (alarmIdBuilder_ == null) {
-                    alarmId_ = null;
-                } else {
-                    alarmId_ = null;
+                bitField0_ = 0;
+                alarmId_ = null;
+                if (alarmIdBuilder_ != null) {
+                    alarmIdBuilder_.dispose();
                     alarmIdBuilder_ = null;
                 }
                 text_ = "";
-                if (kpiListBuilder_ == null) {
-                    kpiList_ = null;
-                } else {
-                    kpiList_ = null;
+                kpiList_ = null;
+                if (kpiListBuilder_ != null) {
+                    kpiListBuilder_.dispose();
                     kpiListBuilder_ = null;
                 }
                 return this;
@@ -19448,49 +18601,24 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.AlarmResponse buildPartial() {
                 monitoring.Monitoring.AlarmResponse result = new monitoring.Monitoring.AlarmResponse(this);
-                if (alarmIdBuilder_ == null) {
-                    result.alarmId_ = alarmId_;
-                } else {
-                    result.alarmId_ = alarmIdBuilder_.build();
-                }
-                result.text_ = text_;
-                if (kpiListBuilder_ == null) {
-                    result.kpiList_ = kpiList_;
-                } else {
-                    result.kpiList_ = kpiListBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.AlarmResponse result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.alarmId_ = alarmIdBuilder_ == null ? alarmId_ : alarmIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.text_ = text_;
+                }
+                if (((from_bitField0_ & 0x00000004) != 0)) {
+                    result.kpiList_ = kpiListBuilder_ == null ? kpiList_ : kpiListBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -19511,12 +18639,13 @@ public final class Monitoring {
                 }
                 if (!other.getText().isEmpty()) {
                     text_ = other.text_;
+                    bitField0_ |= 0x00000002;
                     onChanged();
                 }
                 if (other.hasKpiList()) {
                     mergeKpiList(other.getKpiList());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -19528,20 +18657,61 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.AlarmResponse parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getAlarmIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    text_ = input.readStringRequireUtf8();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            case 26:
+                                {
+                                    input.readMessage(getKpiListFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000004;
+                                    break;
+                                }
+                            // case 26
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.AlarmResponse) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private monitoring.Monitoring.AlarmID alarmId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 alarmIdBuilder_;
@@ -19551,7 +18721,7 @@ public final class Monitoring {
              * @return Whether the alarmId field is set.
              */
             public boolean hasAlarmId() {
-                return alarmIdBuilder_ != null || alarmId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -19575,10 +18745,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     alarmId_ = value;
-                    onChanged();
                 } else {
                     alarmIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -19588,10 +18759,11 @@ public final class Monitoring {
             public Builder setAlarmId(monitoring.Monitoring.AlarmID.Builder builderForValue) {
                 if (alarmIdBuilder_ == null) {
                     alarmId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     alarmIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -19600,15 +18772,16 @@ public final class Monitoring {
              */
             public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) {
                 if (alarmIdBuilder_ == null) {
-                    if (alarmId_ != null) {
-                        alarmId_ = monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && alarmId_ != null && alarmId_ != monitoring.Monitoring.AlarmID.getDefaultInstance()) {
+                        getAlarmIdBuilder().mergeFrom(value);
                     } else {
                         alarmId_ = value;
                     }
-                    onChanged();
                 } else {
                     alarmIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -19616,13 +18789,13 @@ public final class Monitoring {
              * .monitoring.AlarmID alarm_id = 1;
              */
             public Builder clearAlarmId() {
-                if (alarmIdBuilder_ == null) {
-                    alarmId_ = null;
-                    onChanged();
-                } else {
-                    alarmId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                alarmId_ = null;
+                if (alarmIdBuilder_ != null) {
+                    alarmIdBuilder_.dispose();
                     alarmIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -19630,6 +18803,7 @@ public final class Monitoring {
              * .monitoring.AlarmID alarm_id = 1;
              */
             public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getAlarmIdFieldBuilder().getBuilder();
             }
@@ -19699,6 +18873,7 @@ public final class Monitoring {
                     throw new NullPointerException();
                 }
                 text_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -19709,6 +18884,7 @@ public final class Monitoring {
              */
             public Builder clearText() {
                 text_ = getDefaultInstance().getText();
+                bitField0_ = (bitField0_ & ~0x00000002);
                 onChanged();
                 return this;
             }
@@ -19724,6 +18900,7 @@ public final class Monitoring {
                 }
                 checkByteStringIsUtf8(value);
                 text_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -19737,7 +18914,7 @@ public final class Monitoring {
              * @return Whether the kpiList field is set.
              */
             public boolean hasKpiList() {
-                return kpiListBuilder_ != null || kpiList_ != null;
+                return ((bitField0_ & 0x00000004) != 0);
             }
 
             /**
@@ -19761,10 +18938,11 @@ public final class Monitoring {
                         throw new NullPointerException();
                     }
                     kpiList_ = value;
-                    onChanged();
                 } else {
                     kpiListBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -19774,10 +18952,11 @@ public final class Monitoring {
             public Builder setKpiList(monitoring.Monitoring.KpiList.Builder builderForValue) {
                 if (kpiListBuilder_ == null) {
                     kpiList_ = builderForValue.build();
-                    onChanged();
                 } else {
                     kpiListBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -19786,15 +18965,16 @@ public final class Monitoring {
              */
             public Builder mergeKpiList(monitoring.Monitoring.KpiList value) {
                 if (kpiListBuilder_ == null) {
-                    if (kpiList_ != null) {
-                        kpiList_ = monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000004) != 0) && kpiList_ != null && kpiList_ != monitoring.Monitoring.KpiList.getDefaultInstance()) {
+                        getKpiListBuilder().mergeFrom(value);
                     } else {
                         kpiList_ = value;
                     }
-                    onChanged();
                 } else {
                     kpiListBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000004;
+                onChanged();
                 return this;
             }
 
@@ -19802,13 +18982,13 @@ public final class Monitoring {
              * .monitoring.KpiList kpi_list = 3;
              */
             public Builder clearKpiList() {
-                if (kpiListBuilder_ == null) {
-                    kpiList_ = null;
-                    onChanged();
-                } else {
-                    kpiList_ = null;
+                bitField0_ = (bitField0_ & ~0x00000004);
+                kpiList_ = null;
+                if (kpiListBuilder_ != null) {
+                    kpiListBuilder_.dispose();
                     kpiListBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -19816,6 +18996,7 @@ public final class Monitoring {
              * .monitoring.KpiList kpi_list = 3;
              */
             public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() {
+                bitField0_ |= 0x00000004;
                 onChanged();
                 return getKpiListFieldBuilder().getBuilder();
             }
@@ -19869,7 +19050,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public AlarmResponse parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new AlarmResponse(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -19940,57 +19131,6 @@ public final class Monitoring {
             return new AlarmList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private AlarmList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    alarmDescriptor_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                alarmDescriptor_.add(input.readMessage(monitoring.Monitoring.AlarmDescriptor.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    alarmDescriptor_ = java.util.Collections.unmodifiableList(alarmDescriptor_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor;
         }
@@ -20002,6 +19142,7 @@ public final class Monitoring {
 
         public static final int ALARM_DESCRIPTOR_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List alarmDescriptor_;
 
         /**
@@ -20062,7 +19203,7 @@ public final class Monitoring {
             for (int i = 0; i < alarmDescriptor_.size(); i++) {
                 output.writeMessage(1, alarmDescriptor_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -20074,7 +19215,7 @@ public final class Monitoring {
             for (int i = 0; i < alarmDescriptor_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, alarmDescriptor_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -20090,7 +19231,7 @@ public final class Monitoring {
             monitoring.Monitoring.AlarmList other = (monitoring.Monitoring.AlarmList) obj;
             if (!getAlarmDescriptorList().equals(other.getAlarmDescriptorList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -20106,7 +19247,7 @@ public final class Monitoring {
                 hash = (37 * hash) + ALARM_DESCRIPTOR_FIELD_NUMBER;
                 hash = (53 * hash) + getAlarmDescriptorList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -20200,29 +19341,23 @@ public final class Monitoring {
 
             // Construct using monitoring.Monitoring.AlarmList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getAlarmDescriptorFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (alarmDescriptorBuilder_ == null) {
                     alarmDescriptor_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    alarmDescriptor_ = null;
                     alarmDescriptorBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -20248,7 +19383,15 @@ public final class Monitoring {
             @java.lang.Override
             public monitoring.Monitoring.AlarmList buildPartial() {
                 monitoring.Monitoring.AlarmList result = new monitoring.Monitoring.AlarmList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(monitoring.Monitoring.AlarmList result) {
                 if (alarmDescriptorBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         alarmDescriptor_ = java.util.Collections.unmodifiableList(alarmDescriptor_);
@@ -20258,38 +19401,10 @@ public final class Monitoring {
                 } else {
                     result.alarmDescriptor_ = alarmDescriptorBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
             }
 
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(monitoring.Monitoring.AlarmList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -20329,7 +19444,7 @@ public final class Monitoring {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -20341,17 +19456,47 @@ public final class Monitoring {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                monitoring.Monitoring.AlarmList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    monitoring.Monitoring.AlarmDescriptor m = input.readMessage(monitoring.Monitoring.AlarmDescriptor.parser(), extensionRegistry);
+                                    if (alarmDescriptorBuilder_ == null) {
+                                        ensureAlarmDescriptorIsMutable();
+                                        alarmDescriptor_.add(m);
+                                    } else {
+                                        alarmDescriptorBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (monitoring.Monitoring.AlarmList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -20621,7 +19766,17 @@ public final class Monitoring {
 
             @java.lang.Override
             public AlarmList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new AlarmList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
diff --git a/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java
index 83dffd625..7a275e577 100644
--- a/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java
+++ b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java
@@ -4,7 +4,8 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
 
 /**
  */
-@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.38.1)", comments = "Source: monitoring.proto")
+@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.55.1)", comments = "Source: monitoring.proto")
+@io.grpc.stub.annotations.GrpcGenerated
 public final class MonitoringServiceGrpc {
 
     private MonitoringServiceGrpc() {
@@ -327,123 +328,130 @@ public final class MonitoringServiceGrpc {
 
     /**
      */
-    public static abstract class MonitoringServiceImplBase implements io.grpc.BindableService {
+    public interface AsyncService {
 
         /**
          */
-        public void setKpi(monitoring.Monitoring.KpiDescriptor request, io.grpc.stub.StreamObserver responseObserver) {
+        default void setKpi(monitoring.Monitoring.KpiDescriptor request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiMethod(), responseObserver);
         }
 
         /**
          */
-        public void deleteKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) {
+        default void deleteKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteKpiMethod(), responseObserver);
         }
 
         /**
          */
-        public void getKpiDescriptor(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) {
+        default void getKpiDescriptor(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorMethod(), responseObserver);
         }
 
         /**
          */
-        public void getKpiDescriptorList(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) {
+        default void getKpiDescriptorList(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorListMethod(), responseObserver);
         }
 
         /**
          */
-        public void includeKpi(monitoring.Monitoring.Kpi request, io.grpc.stub.StreamObserver responseObserver) {
+        default void includeKpi(monitoring.Monitoring.Kpi request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIncludeKpiMethod(), responseObserver);
         }
 
         /**
          */
-        public void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request, io.grpc.stub.StreamObserver responseObserver) {
+        default void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMonitorKpiMethod(), responseObserver);
         }
 
         /**
          */
-        public void queryKpiData(monitoring.Monitoring.KpiQuery request, io.grpc.stub.StreamObserver responseObserver) {
+        default void queryKpiData(monitoring.Monitoring.KpiQuery request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getQueryKpiDataMethod(), responseObserver);
         }
 
         /**
          */
-        public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, io.grpc.stub.StreamObserver responseObserver) {
+        default void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiSubscriptionMethod(), responseObserver);
         }
 
         /**
          */
-        public void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver responseObserver) {
+        default void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubsDescriptorMethod(), responseObserver);
         }
 
         /**
          */
-        public void getSubscriptions(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) {
+        default void getSubscriptions(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubscriptionsMethod(), responseObserver);
         }
 
         /**
          */
-        public void deleteSubscription(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver responseObserver) {
+        default void deleteSubscription(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubscriptionMethod(), responseObserver);
         }
 
         /**
          */
-        public void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request, io.grpc.stub.StreamObserver responseObserver) {
+        default void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiAlarmMethod(), responseObserver);
         }
 
         /**
          */
-        public void getAlarms(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) {
+        default void getAlarms(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmsMethod(), responseObserver);
         }
 
         /**
          */
-        public void getAlarmDescriptor(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver responseObserver) {
+        default void getAlarmDescriptor(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmDescriptorMethod(), responseObserver);
         }
 
         /**
          */
-        public void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request, io.grpc.stub.StreamObserver responseObserver) {
+        default void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmResponseStreamMethod(), responseObserver);
         }
 
         /**
          */
-        public void deleteAlarm(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver responseObserver) {
+        default void deleteAlarm(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteAlarmMethod(), responseObserver);
         }
 
         /**
          */
-        public void getStreamKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) {
+        default void getStreamKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStreamKpiMethod(), responseObserver);
         }
 
         /**
          */
-        public void getInstantKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) {
+        default void getInstantKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInstantKpiMethod(), responseObserver);
         }
+    }
+
+    /**
+     * Base class for the server implementation of the service MonitoringService.
+     */
+    public static abstract class MonitoringServiceImplBase implements io.grpc.BindableService, AsyncService {
 
         @java.lang.Override
         public io.grpc.ServerServiceDefinition bindService() {
-            return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getSetKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_KPI))).addMethod(getDeleteKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_KPI))).addMethod(getGetKpiDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_KPI_DESCRIPTOR))).addMethod(getGetKpiDescriptorListMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_KPI_DESCRIPTOR_LIST))).addMethod(getIncludeKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_INCLUDE_KPI))).addMethod(getMonitorKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_MONITOR_KPI))).addMethod(getQueryKpiDataMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_QUERY_KPI_DATA))).addMethod(getSetKpiSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_SET_KPI_SUBSCRIPTION))).addMethod(getGetSubsDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SUBS_DESCRIPTOR))).addMethod(getGetSubscriptionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SUBSCRIPTIONS))).addMethod(getDeleteSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_SUBSCRIPTION))).addMethod(getSetKpiAlarmMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_KPI_ALARM))).addMethod(getGetAlarmsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_ALARMS))).addMethod(getGetAlarmDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_ALARM_DESCRIPTOR))).addMethod(getGetAlarmResponseStreamMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_ALARM_RESPONSE_STREAM))).addMethod(getDeleteAlarmMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_ALARM))).addMethod(getGetStreamKpiMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_STREAM_KPI))).addMethod(getGetInstantKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_INSTANT_KPI))).build();
+            return MonitoringServiceGrpc.bindService(this);
         }
     }
 
     /**
+     * A stub to allow clients to do asynchronous rpc calls to service MonitoringService.
      */
     public static class MonitoringServiceStub extends io.grpc.stub.AbstractAsyncStub {
 
@@ -566,6 +574,7 @@ public final class MonitoringServiceGrpc {
     }
 
     /**
+     * A stub to allow clients to do synchronous rpc calls to service MonitoringService.
      */
     public static class MonitoringServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
 
@@ -688,6 +697,7 @@ public final class MonitoringServiceGrpc {
     }
 
     /**
+     * A stub to allow clients to do ListenableFuture-style rpc calls to service MonitoringService.
      */
     public static class MonitoringServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
 
@@ -829,11 +839,11 @@ public final class MonitoringServiceGrpc {
 
     private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod {
 
-        private final MonitoringServiceImplBase serviceImpl;
+        private final AsyncService serviceImpl;
 
         private final int methodId;
 
-        MethodHandlers(MonitoringServiceImplBase serviceImpl, int methodId) {
+        MethodHandlers(AsyncService serviceImpl, int methodId) {
             this.serviceImpl = serviceImpl;
             this.methodId = methodId;
         }
@@ -911,6 +921,10 @@ public final class MonitoringServiceGrpc {
         }
     }
 
+    public static io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+        return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getSetKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_KPI))).addMethod(getDeleteKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_DELETE_KPI))).addMethod(getGetKpiDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_KPI_DESCRIPTOR))).addMethod(getGetKpiDescriptorListMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_KPI_DESCRIPTOR_LIST))).addMethod(getIncludeKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_INCLUDE_KPI))).addMethod(getMonitorKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_MONITOR_KPI))).addMethod(getQueryKpiDataMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_QUERY_KPI_DATA))).addMethod(getSetKpiSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_SET_KPI_SUBSCRIPTION))).addMethod(getGetSubsDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_SUBS_DESCRIPTOR))).addMethod(getGetSubscriptionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_SUBSCRIPTIONS))).addMethod(getDeleteSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_DELETE_SUBSCRIPTION))).addMethod(getSetKpiAlarmMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_SET_KPI_ALARM))).addMethod(getGetAlarmsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_ALARMS))).addMethod(getGetAlarmDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_ALARM_DESCRIPTOR))).addMethod(getGetAlarmResponseStreamMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_ALARM_RESPONSE_STREAM))).addMethod(getDeleteAlarmMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_DELETE_ALARM))).addMethod(getGetStreamKpiMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(service, METHODID_GET_STREAM_KPI))).addMethod(getGetInstantKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_GET_INSTANT_KPI))).build();
+    }
+
     private static abstract class MonitoringServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
 
         MonitoringServiceBaseDescriptorSupplier() {
diff --git a/src/ztp/target/generated-sources/grpc/ztp/Ztp.java b/src/ztp/target/generated-sources/grpc/ztp/Ztp.java
index bef889c0d..0812fc8eb 100644
--- a/src/ztp/target/generated-sources/grpc/ztp/Ztp.java
+++ b/src/ztp/target/generated-sources/grpc/ztp/Ztp.java
@@ -322,70 +322,6 @@ public final class Ztp {
             return new DeviceRoleId();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private DeviceRoleId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                context.ContextOuterClass.Uuid.Builder subBuilder = null;
-                                if (devRoleId_ != null) {
-                                    subBuilder = devRoleId_.toBuilder();
-                                }
-                                devRoleId_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(devRoleId_);
-                                    devRoleId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.DeviceId.Builder subBuilder = null;
-                                if (devId_ != null) {
-                                    subBuilder = devId_.toBuilder();
-                                }
-                                devId_ = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(devId_);
-                                    devId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return ztp.Ztp.internal_static_ztp_DeviceRoleId_descriptor;
         }
@@ -422,7 +358,7 @@ public final class Ztp {
          */
         @java.lang.Override
         public context.ContextOuterClass.UuidOrBuilder getDevRoleIdOrBuilder() {
-            return getDevRoleId();
+            return devRoleId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : devRoleId_;
         }
 
         public static final int DEVID_FIELD_NUMBER = 2;
@@ -452,7 +388,7 @@ public final class Ztp {
          */
         @java.lang.Override
         public context.ContextOuterClass.DeviceIdOrBuilder getDevIdOrBuilder() {
-            return getDevId();
+            return devId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : devId_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -476,7 +412,7 @@ public final class Ztp {
             if (devId_ != null) {
                 output.writeMessage(2, getDevId());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -491,7 +427,7 @@ public final class Ztp {
             if (devId_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDevId());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -517,7 +453,7 @@ public final class Ztp {
                 if (!getDevId().equals(other.getDevId()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -537,7 +473,7 @@ public final class Ztp {
                 hash = (37 * hash) + DEVID_FIELD_NUMBER;
                 hash = (53 * hash) + getDevId().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -631,32 +567,24 @@ public final class Ztp {
 
             // Construct using ztp.Ztp.DeviceRoleId.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (devRoleIdBuilder_ == null) {
-                    devRoleId_ = null;
-                } else {
-                    devRoleId_ = null;
+                bitField0_ = 0;
+                devRoleId_ = null;
+                if (devRoleIdBuilder_ != null) {
+                    devRoleIdBuilder_.dispose();
                     devRoleIdBuilder_ = null;
                 }
-                if (devIdBuilder_ == null) {
-                    devId_ = null;
-                } else {
-                    devId_ = null;
+                devId_ = null;
+                if (devIdBuilder_ != null) {
+                    devIdBuilder_.dispose();
                     devIdBuilder_ = null;
                 }
                 return this;
@@ -684,48 +612,21 @@ public final class Ztp {
             @java.lang.Override
             public ztp.Ztp.DeviceRoleId buildPartial() {
                 ztp.Ztp.DeviceRoleId result = new ztp.Ztp.DeviceRoleId(this);
-                if (devRoleIdBuilder_ == null) {
-                    result.devRoleId_ = devRoleId_;
-                } else {
-                    result.devRoleId_ = devRoleIdBuilder_.build();
-                }
-                if (devIdBuilder_ == null) {
-                    result.devId_ = devId_;
-                } else {
-                    result.devId_ = devIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(ztp.Ztp.DeviceRoleId result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.devRoleId_ = devRoleIdBuilder_ == null ? devRoleId_ : devRoleIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.devId_ = devIdBuilder_ == null ? devId_ : devIdBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -747,7 +648,7 @@ public final class Ztp {
                 if (other.hasDevId()) {
                     mergeDevId(other.getDevId());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -759,20 +660,54 @@ public final class Ztp {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                ztp.Ztp.DeviceRoleId parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getDevRoleIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getDevIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (ztp.Ztp.DeviceRoleId) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private context.ContextOuterClass.Uuid devRoleId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 devRoleIdBuilder_;
@@ -782,7 +717,7 @@ public final class Ztp {
              * @return Whether the devRoleId field is set.
              */
             public boolean hasDevRoleId() {
-                return devRoleIdBuilder_ != null || devRoleId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -806,10 +741,11 @@ public final class Ztp {
                         throw new NullPointerException();
                     }
                     devRoleId_ = value;
-                    onChanged();
                 } else {
                     devRoleIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -819,10 +755,11 @@ public final class Ztp {
             public Builder setDevRoleId(context.ContextOuterClass.Uuid.Builder builderForValue) {
                 if (devRoleIdBuilder_ == null) {
                     devRoleId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     devRoleIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -831,15 +768,16 @@ public final class Ztp {
              */
             public Builder mergeDevRoleId(context.ContextOuterClass.Uuid value) {
                 if (devRoleIdBuilder_ == null) {
-                    if (devRoleId_ != null) {
-                        devRoleId_ = context.ContextOuterClass.Uuid.newBuilder(devRoleId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && devRoleId_ != null && devRoleId_ != context.ContextOuterClass.Uuid.getDefaultInstance()) {
+                        getDevRoleIdBuilder().mergeFrom(value);
                     } else {
                         devRoleId_ = value;
                     }
-                    onChanged();
                 } else {
                     devRoleIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -847,13 +785,13 @@ public final class Ztp {
              * .context.Uuid devRoleId = 1;
              */
             public Builder clearDevRoleId() {
-                if (devRoleIdBuilder_ == null) {
-                    devRoleId_ = null;
-                    onChanged();
-                } else {
-                    devRoleId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                devRoleId_ = null;
+                if (devRoleIdBuilder_ != null) {
+                    devRoleIdBuilder_.dispose();
                     devRoleIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -861,6 +799,7 @@ public final class Ztp {
              * .context.Uuid devRoleId = 1;
              */
             public context.ContextOuterClass.Uuid.Builder getDevRoleIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getDevRoleIdFieldBuilder().getBuilder();
             }
@@ -896,7 +835,7 @@ public final class Ztp {
              * @return Whether the devId field is set.
              */
             public boolean hasDevId() {
-                return devIdBuilder_ != null || devId_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -920,10 +859,11 @@ public final class Ztp {
                         throw new NullPointerException();
                     }
                     devId_ = value;
-                    onChanged();
                 } else {
                     devIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -933,10 +873,11 @@ public final class Ztp {
             public Builder setDevId(context.ContextOuterClass.DeviceId.Builder builderForValue) {
                 if (devIdBuilder_ == null) {
                     devId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     devIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -945,15 +886,16 @@ public final class Ztp {
              */
             public Builder mergeDevId(context.ContextOuterClass.DeviceId value) {
                 if (devIdBuilder_ == null) {
-                    if (devId_ != null) {
-                        devId_ = context.ContextOuterClass.DeviceId.newBuilder(devId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && devId_ != null && devId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) {
+                        getDevIdBuilder().mergeFrom(value);
                     } else {
                         devId_ = value;
                     }
-                    onChanged();
                 } else {
                     devIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -961,13 +903,13 @@ public final class Ztp {
              * .context.DeviceId devId = 2;
              */
             public Builder clearDevId() {
-                if (devIdBuilder_ == null) {
-                    devId_ = null;
-                    onChanged();
-                } else {
-                    devId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                devId_ = null;
+                if (devIdBuilder_ != null) {
+                    devIdBuilder_.dispose();
                     devIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -975,6 +917,7 @@ public final class Ztp {
              * .context.DeviceId devId = 2;
              */
             public context.ContextOuterClass.DeviceId.Builder getDevIdBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getDevIdFieldBuilder().getBuilder();
             }
@@ -1028,7 +971,17 @@ public final class Ztp {
 
             @java.lang.Override
             public DeviceRoleId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new DeviceRoleId(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -1103,63 +1056,6 @@ public final class Ztp {
             return new DeviceRole();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private DeviceRole(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                ztp.Ztp.DeviceRoleId.Builder subBuilder = null;
-                                if (devRoleId_ != null) {
-                                    subBuilder = devRoleId_.toBuilder();
-                                }
-                                devRoleId_ = input.readMessage(ztp.Ztp.DeviceRoleId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(devRoleId_);
-                                    devRoleId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 16:
-                            {
-                                int rawValue = input.readEnum();
-                                devRoleType_ = rawValue;
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return ztp.Ztp.internal_static_ztp_DeviceRole_descriptor;
         }
@@ -1196,12 +1092,12 @@ public final class Ztp {
          */
         @java.lang.Override
         public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() {
-            return getDevRoleId();
+            return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_;
         }
 
         public static final int DEVROLETYPE_FIELD_NUMBER = 2;
 
-        private int devRoleType_;
+        private int devRoleType_ = 0;
 
         /**
          * .ztp.DeviceRoleType devRoleType = 2;
@@ -1218,8 +1114,7 @@ public final class Ztp {
          */
         @java.lang.Override
         public ztp.Ztp.DeviceRoleType getDevRoleType() {
-            @SuppressWarnings("deprecation")
-            ztp.Ztp.DeviceRoleType result = ztp.Ztp.DeviceRoleType.valueOf(devRoleType_);
+            ztp.Ztp.DeviceRoleType result = ztp.Ztp.DeviceRoleType.forNumber(devRoleType_);
             return result == null ? ztp.Ztp.DeviceRoleType.UNRECOGNIZED : result;
         }
 
@@ -1244,7 +1139,7 @@ public final class Ztp {
             if (devRoleType_ != ztp.Ztp.DeviceRoleType.NONE.getNumber()) {
                 output.writeEnum(2, devRoleType_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -1259,7 +1154,7 @@ public final class Ztp {
             if (devRoleType_ != ztp.Ztp.DeviceRoleType.NONE.getNumber()) {
                 size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, devRoleType_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -1281,7 +1176,7 @@ public final class Ztp {
             }
             if (devRoleType_ != other.devRoleType_)
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -1299,7 +1194,7 @@ public final class Ztp {
             }
             hash = (37 * hash) + DEVROLETYPE_FIELD_NUMBER;
             hash = (53 * hash) + devRoleType_;
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -1393,26 +1288,19 @@ public final class Ztp {
 
             // Construct using ztp.Ztp.DeviceRole.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (devRoleIdBuilder_ == null) {
-                    devRoleId_ = null;
-                } else {
-                    devRoleId_ = null;
+                bitField0_ = 0;
+                devRoleId_ = null;
+                if (devRoleIdBuilder_ != null) {
+                    devRoleIdBuilder_.dispose();
                     devRoleIdBuilder_ = null;
                 }
                 devRoleType_ = 0;
@@ -1441,44 +1329,21 @@ public final class Ztp {
             @java.lang.Override
             public ztp.Ztp.DeviceRole buildPartial() {
                 ztp.Ztp.DeviceRole result = new ztp.Ztp.DeviceRole(this);
-                if (devRoleIdBuilder_ == null) {
-                    result.devRoleId_ = devRoleId_;
-                } else {
-                    result.devRoleId_ = devRoleIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.devRoleType_ = devRoleType_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(ztp.Ztp.DeviceRole result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.devRoleId_ = devRoleIdBuilder_ == null ? devRoleId_ : devRoleIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.devRoleType_ = devRoleType_;
+                }
             }
 
             @java.lang.Override
@@ -1500,7 +1365,7 @@ public final class Ztp {
                 if (other.devRoleType_ != 0) {
                     setDevRoleTypeValue(other.getDevRoleTypeValue());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -1512,20 +1377,54 @@ public final class Ztp {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                ztp.Ztp.DeviceRole parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getDevRoleIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 16:
+                                {
+                                    devRoleType_ = input.readEnum();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 16
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (ztp.Ztp.DeviceRole) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private ztp.Ztp.DeviceRoleId devRoleId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 devRoleIdBuilder_;
@@ -1535,7 +1434,7 @@ public final class Ztp {
              * @return Whether the devRoleId field is set.
              */
             public boolean hasDevRoleId() {
-                return devRoleIdBuilder_ != null || devRoleId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -1559,10 +1458,11 @@ public final class Ztp {
                         throw new NullPointerException();
                     }
                     devRoleId_ = value;
-                    onChanged();
                 } else {
                     devRoleIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -1572,10 +1472,11 @@ public final class Ztp {
             public Builder setDevRoleId(ztp.Ztp.DeviceRoleId.Builder builderForValue) {
                 if (devRoleIdBuilder_ == null) {
                     devRoleId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     devRoleIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -1584,15 +1485,16 @@ public final class Ztp {
              */
             public Builder mergeDevRoleId(ztp.Ztp.DeviceRoleId value) {
                 if (devRoleIdBuilder_ == null) {
-                    if (devRoleId_ != null) {
-                        devRoleId_ = ztp.Ztp.DeviceRoleId.newBuilder(devRoleId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && devRoleId_ != null && devRoleId_ != ztp.Ztp.DeviceRoleId.getDefaultInstance()) {
+                        getDevRoleIdBuilder().mergeFrom(value);
                     } else {
                         devRoleId_ = value;
                     }
-                    onChanged();
                 } else {
                     devRoleIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -1600,13 +1502,13 @@ public final class Ztp {
              * .ztp.DeviceRoleId devRoleId = 1;
              */
             public Builder clearDevRoleId() {
-                if (devRoleIdBuilder_ == null) {
-                    devRoleId_ = null;
-                    onChanged();
-                } else {
-                    devRoleId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                devRoleId_ = null;
+                if (devRoleIdBuilder_ != null) {
+                    devRoleIdBuilder_.dispose();
                     devRoleIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -1614,6 +1516,7 @@ public final class Ztp {
              * .ztp.DeviceRoleId devRoleId = 1;
              */
             public ztp.Ztp.DeviceRoleId.Builder getDevRoleIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getDevRoleIdFieldBuilder().getBuilder();
             }
@@ -1658,6 +1561,7 @@ public final class Ztp {
              */
             public Builder setDevRoleTypeValue(int value) {
                 devRoleType_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -1668,8 +1572,7 @@ public final class Ztp {
              */
             @java.lang.Override
             public ztp.Ztp.DeviceRoleType getDevRoleType() {
-                @SuppressWarnings("deprecation")
-                ztp.Ztp.DeviceRoleType result = ztp.Ztp.DeviceRoleType.valueOf(devRoleType_);
+                ztp.Ztp.DeviceRoleType result = ztp.Ztp.DeviceRoleType.forNumber(devRoleType_);
                 return result == null ? ztp.Ztp.DeviceRoleType.UNRECOGNIZED : result;
             }
 
@@ -1682,6 +1585,7 @@ public final class Ztp {
                 if (value == null) {
                     throw new NullPointerException();
                 }
+                bitField0_ |= 0x00000002;
                 devRoleType_ = value.getNumber();
                 onChanged();
                 return this;
@@ -1692,6 +1596,7 @@ public final class Ztp {
              * @return This builder for chaining.
              */
             public Builder clearDevRoleType() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 devRoleType_ = 0;
                 onChanged();
                 return this;
@@ -1724,7 +1629,17 @@ public final class Ztp {
 
             @java.lang.Override
             public DeviceRole parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new DeviceRole(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -1803,70 +1718,6 @@ public final class Ztp {
             return new DeviceRoleConfig();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private DeviceRoleConfig(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                ztp.Ztp.DeviceRole.Builder subBuilder = null;
-                                if (devRole_ != null) {
-                                    subBuilder = devRole_.toBuilder();
-                                }
-                                devRole_ = input.readMessage(ztp.Ztp.DeviceRole.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(devRole_);
-                                    devRole_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 18:
-                            {
-                                context.ContextOuterClass.DeviceConfig.Builder subBuilder = null;
-                                if (devConfig_ != null) {
-                                    subBuilder = devConfig_.toBuilder();
-                                }
-                                devConfig_ = input.readMessage(context.ContextOuterClass.DeviceConfig.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(devConfig_);
-                                    devConfig_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_descriptor;
         }
@@ -1903,7 +1754,7 @@ public final class Ztp {
          */
         @java.lang.Override
         public ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder() {
-            return getDevRole();
+            return devRole_ == null ? ztp.Ztp.DeviceRole.getDefaultInstance() : devRole_;
         }
 
         public static final int DEVCONFIG_FIELD_NUMBER = 2;
@@ -1933,7 +1784,7 @@ public final class Ztp {
          */
         @java.lang.Override
         public context.ContextOuterClass.DeviceConfigOrBuilder getDevConfigOrBuilder() {
-            return getDevConfig();
+            return devConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : devConfig_;
         }
 
         private byte memoizedIsInitialized = -1;
@@ -1957,7 +1808,7 @@ public final class Ztp {
             if (devConfig_ != null) {
                 output.writeMessage(2, getDevConfig());
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -1972,7 +1823,7 @@ public final class Ztp {
             if (devConfig_ != null) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDevConfig());
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -1998,7 +1849,7 @@ public final class Ztp {
                 if (!getDevConfig().equals(other.getDevConfig()))
                     return false;
             }
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -2018,7 +1869,7 @@ public final class Ztp {
                 hash = (37 * hash) + DEVCONFIG_FIELD_NUMBER;
                 hash = (53 * hash) + getDevConfig().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -2112,32 +1963,24 @@ public final class Ztp {
 
             // Construct using ztp.Ztp.DeviceRoleConfig.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (devRoleBuilder_ == null) {
-                    devRole_ = null;
-                } else {
-                    devRole_ = null;
+                bitField0_ = 0;
+                devRole_ = null;
+                if (devRoleBuilder_ != null) {
+                    devRoleBuilder_.dispose();
                     devRoleBuilder_ = null;
                 }
-                if (devConfigBuilder_ == null) {
-                    devConfig_ = null;
-                } else {
-                    devConfig_ = null;
+                devConfig_ = null;
+                if (devConfigBuilder_ != null) {
+                    devConfigBuilder_.dispose();
                     devConfigBuilder_ = null;
                 }
                 return this;
@@ -2165,48 +2008,21 @@ public final class Ztp {
             @java.lang.Override
             public ztp.Ztp.DeviceRoleConfig buildPartial() {
                 ztp.Ztp.DeviceRoleConfig result = new ztp.Ztp.DeviceRoleConfig(this);
-                if (devRoleBuilder_ == null) {
-                    result.devRole_ = devRole_;
-                } else {
-                    result.devRole_ = devRoleBuilder_.build();
-                }
-                if (devConfigBuilder_ == null) {
-                    result.devConfig_ = devConfig_;
-                } else {
-                    result.devConfig_ = devConfigBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(ztp.Ztp.DeviceRoleConfig result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.devRole_ = devRoleBuilder_ == null ? devRole_ : devRoleBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.devConfig_ = devConfigBuilder_ == null ? devConfig_ : devConfigBuilder_.build();
+                }
             }
 
             @java.lang.Override
@@ -2228,7 +2044,7 @@ public final class Ztp {
                 if (other.hasDevConfig()) {
                     mergeDevConfig(other.getDevConfig());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -2240,20 +2056,54 @@ public final class Ztp {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                ztp.Ztp.DeviceRoleConfig parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getDevRoleFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 18:
+                                {
+                                    input.readMessage(getDevConfigFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 18
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (ztp.Ztp.DeviceRoleConfig) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private ztp.Ztp.DeviceRole devRole_;
 
             private com.google.protobuf.SingleFieldBuilderV3 devRoleBuilder_;
@@ -2263,7 +2113,7 @@ public final class Ztp {
              * @return Whether the devRole field is set.
              */
             public boolean hasDevRole() {
-                return devRoleBuilder_ != null || devRole_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -2287,10 +2137,11 @@ public final class Ztp {
                         throw new NullPointerException();
                     }
                     devRole_ = value;
-                    onChanged();
                 } else {
                     devRoleBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -2300,10 +2151,11 @@ public final class Ztp {
             public Builder setDevRole(ztp.Ztp.DeviceRole.Builder builderForValue) {
                 if (devRoleBuilder_ == null) {
                     devRole_ = builderForValue.build();
-                    onChanged();
                 } else {
                     devRoleBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -2312,15 +2164,16 @@ public final class Ztp {
              */
             public Builder mergeDevRole(ztp.Ztp.DeviceRole value) {
                 if (devRoleBuilder_ == null) {
-                    if (devRole_ != null) {
-                        devRole_ = ztp.Ztp.DeviceRole.newBuilder(devRole_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && devRole_ != null && devRole_ != ztp.Ztp.DeviceRole.getDefaultInstance()) {
+                        getDevRoleBuilder().mergeFrom(value);
                     } else {
                         devRole_ = value;
                     }
-                    onChanged();
                 } else {
                     devRoleBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -2328,13 +2181,13 @@ public final class Ztp {
              * .ztp.DeviceRole devRole = 1;
              */
             public Builder clearDevRole() {
-                if (devRoleBuilder_ == null) {
-                    devRole_ = null;
-                    onChanged();
-                } else {
-                    devRole_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                devRole_ = null;
+                if (devRoleBuilder_ != null) {
+                    devRoleBuilder_.dispose();
                     devRoleBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -2342,6 +2195,7 @@ public final class Ztp {
              * .ztp.DeviceRole devRole = 1;
              */
             public ztp.Ztp.DeviceRole.Builder getDevRoleBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getDevRoleFieldBuilder().getBuilder();
             }
@@ -2377,7 +2231,7 @@ public final class Ztp {
              * @return Whether the devConfig field is set.
              */
             public boolean hasDevConfig() {
-                return devConfigBuilder_ != null || devConfig_ != null;
+                return ((bitField0_ & 0x00000002) != 0);
             }
 
             /**
@@ -2401,10 +2255,11 @@ public final class Ztp {
                         throw new NullPointerException();
                     }
                     devConfig_ = value;
-                    onChanged();
                 } else {
                     devConfigBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -2414,10 +2269,11 @@ public final class Ztp {
             public Builder setDevConfig(context.ContextOuterClass.DeviceConfig.Builder builderForValue) {
                 if (devConfigBuilder_ == null) {
                     devConfig_ = builderForValue.build();
-                    onChanged();
                 } else {
                     devConfigBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -2426,15 +2282,16 @@ public final class Ztp {
              */
             public Builder mergeDevConfig(context.ContextOuterClass.DeviceConfig value) {
                 if (devConfigBuilder_ == null) {
-                    if (devConfig_ != null) {
-                        devConfig_ = context.ContextOuterClass.DeviceConfig.newBuilder(devConfig_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000002) != 0) && devConfig_ != null && devConfig_ != context.ContextOuterClass.DeviceConfig.getDefaultInstance()) {
+                        getDevConfigBuilder().mergeFrom(value);
                     } else {
                         devConfig_ = value;
                     }
-                    onChanged();
                 } else {
                     devConfigBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000002;
+                onChanged();
                 return this;
             }
 
@@ -2442,13 +2299,13 @@ public final class Ztp {
              * .context.DeviceConfig devConfig = 2;
              */
             public Builder clearDevConfig() {
-                if (devConfigBuilder_ == null) {
-                    devConfig_ = null;
-                    onChanged();
-                } else {
-                    devConfig_ = null;
+                bitField0_ = (bitField0_ & ~0x00000002);
+                devConfig_ = null;
+                if (devConfigBuilder_ != null) {
+                    devConfigBuilder_.dispose();
                     devConfigBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -2456,6 +2313,7 @@ public final class Ztp {
              * .context.DeviceConfig devConfig = 2;
              */
             public context.ContextOuterClass.DeviceConfig.Builder getDevConfigBuilder() {
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return getDevConfigFieldBuilder().getBuilder();
             }
@@ -2509,7 +2367,17 @@ public final class Ztp {
 
             @java.lang.Override
             public DeviceRoleConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new DeviceRoleConfig(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -2580,57 +2448,6 @@ public final class Ztp {
             return new DeviceRoleList();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private DeviceRoleList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    devRole_ = new java.util.ArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                devRole_.add(input.readMessage(ztp.Ztp.DeviceRole.parser(), extensionRegistry));
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    devRole_ = java.util.Collections.unmodifiableList(devRole_);
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return ztp.Ztp.internal_static_ztp_DeviceRoleList_descriptor;
         }
@@ -2642,6 +2459,7 @@ public final class Ztp {
 
         public static final int DEVROLE_FIELD_NUMBER = 1;
 
+        @SuppressWarnings("serial")
         private java.util.List devRole_;
 
         /**
@@ -2702,7 +2520,7 @@ public final class Ztp {
             for (int i = 0; i < devRole_.size(); i++) {
                 output.writeMessage(1, devRole_.get(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -2714,7 +2532,7 @@ public final class Ztp {
             for (int i = 0; i < devRole_.size(); i++) {
                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, devRole_.get(i));
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -2730,7 +2548,7 @@ public final class Ztp {
             ztp.Ztp.DeviceRoleList other = (ztp.Ztp.DeviceRoleList) obj;
             if (!getDevRoleList().equals(other.getDevRoleList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -2746,7 +2564,7 @@ public final class Ztp {
                 hash = (37 * hash) + DEVROLE_FIELD_NUMBER;
                 hash = (53 * hash) + getDevRoleList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -2840,29 +2658,23 @@ public final class Ztp {
 
             // Construct using ztp.Ztp.DeviceRoleList.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                    getDevRoleFieldBuilder();
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
+                bitField0_ = 0;
                 if (devRoleBuilder_ == null) {
                     devRole_ = java.util.Collections.emptyList();
-                    bitField0_ = (bitField0_ & ~0x00000001);
                 } else {
+                    devRole_ = null;
                     devRoleBuilder_.clear();
                 }
+                bitField0_ = (bitField0_ & ~0x00000001);
                 return this;
             }
 
@@ -2888,7 +2700,15 @@ public final class Ztp {
             @java.lang.Override
             public ztp.Ztp.DeviceRoleList buildPartial() {
                 ztp.Ztp.DeviceRoleList result = new ztp.Ztp.DeviceRoleList(this);
-                int from_bitField0_ = bitField0_;
+                buildPartialRepeatedFields(result);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
+                }
+                onBuilt();
+                return result;
+            }
+
+            private void buildPartialRepeatedFields(ztp.Ztp.DeviceRoleList result) {
                 if (devRoleBuilder_ == null) {
                     if (((bitField0_ & 0x00000001) != 0)) {
                         devRole_ = java.util.Collections.unmodifiableList(devRole_);
@@ -2898,38 +2718,10 @@ public final class Ztp {
                 } else {
                     result.devRole_ = devRoleBuilder_.build();
                 }
-                onBuilt();
-                return result;
-            }
-
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
             }
 
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(ztp.Ztp.DeviceRoleList result) {
+                int from_bitField0_ = bitField0_;
             }
 
             @java.lang.Override
@@ -2969,7 +2761,7 @@ public final class Ztp {
                         }
                     }
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -2981,17 +2773,47 @@ public final class Ztp {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                ztp.Ztp.DeviceRoleList parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    ztp.Ztp.DeviceRole m = input.readMessage(ztp.Ztp.DeviceRole.parser(), extensionRegistry);
+                                    if (devRoleBuilder_ == null) {
+                                        ensureDevRoleIsMutable();
+                                        devRole_.add(m);
+                                    } else {
+                                        devRoleBuilder_.addMessage(m);
+                                    }
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (ztp.Ztp.DeviceRoleList) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
@@ -3261,7 +3083,17 @@ public final class Ztp {
 
             @java.lang.Override
             public DeviceRoleList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new DeviceRoleList(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -3336,63 +3168,6 @@ public final class Ztp {
             return new DeviceRoleState();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private DeviceRoleState(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                ztp.Ztp.DeviceRoleId.Builder subBuilder = null;
-                                if (devRoleId_ != null) {
-                                    subBuilder = devRoleId_.toBuilder();
-                                }
-                                devRoleId_ = input.readMessage(ztp.Ztp.DeviceRoleId.parser(), extensionRegistry);
-                                if (subBuilder != null) {
-                                    subBuilder.mergeFrom(devRoleId_);
-                                    devRoleId_ = subBuilder.buildPartial();
-                                }
-                                break;
-                            }
-                        case 16:
-                            {
-                                int rawValue = input.readEnum();
-                                devRoleState_ = rawValue;
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return ztp.Ztp.internal_static_ztp_DeviceRoleState_descriptor;
         }
@@ -3429,12 +3204,12 @@ public final class Ztp {
          */
         @java.lang.Override
         public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() {
-            return getDevRoleId();
+            return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_;
         }
 
         public static final int DEVROLESTATE_FIELD_NUMBER = 2;
 
-        private int devRoleState_;
+        private int devRoleState_ = 0;
 
         /**
          * .ztp.ZtpDeviceState devRoleState = 2;
@@ -3451,8 +3226,7 @@ public final class Ztp {
          */
         @java.lang.Override
         public ztp.Ztp.ZtpDeviceState getDevRoleState() {
-            @SuppressWarnings("deprecation")
-            ztp.Ztp.ZtpDeviceState result = ztp.Ztp.ZtpDeviceState.valueOf(devRoleState_);
+            ztp.Ztp.ZtpDeviceState result = ztp.Ztp.ZtpDeviceState.forNumber(devRoleState_);
             return result == null ? ztp.Ztp.ZtpDeviceState.UNRECOGNIZED : result;
         }
 
@@ -3477,7 +3251,7 @@ public final class Ztp {
             if (devRoleState_ != ztp.Ztp.ZtpDeviceState.ZTP_DEV_STATE_UNDEFINED.getNumber()) {
                 output.writeEnum(2, devRoleState_);
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -3492,7 +3266,7 @@ public final class Ztp {
             if (devRoleState_ != ztp.Ztp.ZtpDeviceState.ZTP_DEV_STATE_UNDEFINED.getNumber()) {
                 size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, devRoleState_);
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -3514,7 +3288,7 @@ public final class Ztp {
             }
             if (devRoleState_ != other.devRoleState_)
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -3532,7 +3306,7 @@ public final class Ztp {
             }
             hash = (37 * hash) + DEVROLESTATE_FIELD_NUMBER;
             hash = (53 * hash) + devRoleState_;
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -3626,26 +3400,19 @@ public final class Ztp {
 
             // Construct using ztp.Ztp.DeviceRoleState.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                if (devRoleIdBuilder_ == null) {
-                    devRoleId_ = null;
-                } else {
-                    devRoleId_ = null;
+                bitField0_ = 0;
+                devRoleId_ = null;
+                if (devRoleIdBuilder_ != null) {
+                    devRoleIdBuilder_.dispose();
                     devRoleIdBuilder_ = null;
                 }
                 devRoleState_ = 0;
@@ -3674,44 +3441,21 @@ public final class Ztp {
             @java.lang.Override
             public ztp.Ztp.DeviceRoleState buildPartial() {
                 ztp.Ztp.DeviceRoleState result = new ztp.Ztp.DeviceRoleState(this);
-                if (devRoleIdBuilder_ == null) {
-                    result.devRoleId_ = devRoleId_;
-                } else {
-                    result.devRoleId_ = devRoleIdBuilder_.build();
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.devRoleState_ = devRoleState_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(ztp.Ztp.DeviceRoleState result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    result.devRoleId_ = devRoleIdBuilder_ == null ? devRoleId_ : devRoleIdBuilder_.build();
+                }
+                if (((from_bitField0_ & 0x00000002) != 0)) {
+                    result.devRoleState_ = devRoleState_;
+                }
             }
 
             @java.lang.Override
@@ -3733,7 +3477,7 @@ public final class Ztp {
                 if (other.devRoleState_ != 0) {
                     setDevRoleStateValue(other.getDevRoleStateValue());
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -3745,20 +3489,54 @@ public final class Ztp {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                ztp.Ztp.DeviceRoleState parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    input.readMessage(getDevRoleIdFieldBuilder().getBuilder(), extensionRegistry);
+                                    bitField0_ |= 0x00000001;
+                                    break;
+                                }
+                            // case 10
+                            case 16:
+                                {
+                                    devRoleState_ = input.readEnum();
+                                    bitField0_ |= 0x00000002;
+                                    break;
+                                }
+                            // case 16
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (ztp.Ztp.DeviceRoleState) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
+            private int bitField0_;
+
             private ztp.Ztp.DeviceRoleId devRoleId_;
 
             private com.google.protobuf.SingleFieldBuilderV3 devRoleIdBuilder_;
@@ -3768,7 +3546,7 @@ public final class Ztp {
              * @return Whether the devRoleId field is set.
              */
             public boolean hasDevRoleId() {
-                return devRoleIdBuilder_ != null || devRoleId_ != null;
+                return ((bitField0_ & 0x00000001) != 0);
             }
 
             /**
@@ -3792,10 +3570,11 @@ public final class Ztp {
                         throw new NullPointerException();
                     }
                     devRoleId_ = value;
-                    onChanged();
                 } else {
                     devRoleIdBuilder_.setMessage(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -3805,10 +3584,11 @@ public final class Ztp {
             public Builder setDevRoleId(ztp.Ztp.DeviceRoleId.Builder builderForValue) {
                 if (devRoleIdBuilder_ == null) {
                     devRoleId_ = builderForValue.build();
-                    onChanged();
                 } else {
                     devRoleIdBuilder_.setMessage(builderForValue.build());
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -3817,15 +3597,16 @@ public final class Ztp {
              */
             public Builder mergeDevRoleId(ztp.Ztp.DeviceRoleId value) {
                 if (devRoleIdBuilder_ == null) {
-                    if (devRoleId_ != null) {
-                        devRoleId_ = ztp.Ztp.DeviceRoleId.newBuilder(devRoleId_).mergeFrom(value).buildPartial();
+                    if (((bitField0_ & 0x00000001) != 0) && devRoleId_ != null && devRoleId_ != ztp.Ztp.DeviceRoleId.getDefaultInstance()) {
+                        getDevRoleIdBuilder().mergeFrom(value);
                     } else {
                         devRoleId_ = value;
                     }
-                    onChanged();
                 } else {
                     devRoleIdBuilder_.mergeFrom(value);
                 }
+                bitField0_ |= 0x00000001;
+                onChanged();
                 return this;
             }
 
@@ -3833,13 +3614,13 @@ public final class Ztp {
              * .ztp.DeviceRoleId devRoleId = 1;
              */
             public Builder clearDevRoleId() {
-                if (devRoleIdBuilder_ == null) {
-                    devRoleId_ = null;
-                    onChanged();
-                } else {
-                    devRoleId_ = null;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                devRoleId_ = null;
+                if (devRoleIdBuilder_ != null) {
+                    devRoleIdBuilder_.dispose();
                     devRoleIdBuilder_ = null;
                 }
+                onChanged();
                 return this;
             }
 
@@ -3847,6 +3628,7 @@ public final class Ztp {
              * .ztp.DeviceRoleId devRoleId = 1;
              */
             public ztp.Ztp.DeviceRoleId.Builder getDevRoleIdBuilder() {
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return getDevRoleIdFieldBuilder().getBuilder();
             }
@@ -3891,6 +3673,7 @@ public final class Ztp {
              */
             public Builder setDevRoleStateValue(int value) {
                 devRoleState_ = value;
+                bitField0_ |= 0x00000002;
                 onChanged();
                 return this;
             }
@@ -3901,8 +3684,7 @@ public final class Ztp {
              */
             @java.lang.Override
             public ztp.Ztp.ZtpDeviceState getDevRoleState() {
-                @SuppressWarnings("deprecation")
-                ztp.Ztp.ZtpDeviceState result = ztp.Ztp.ZtpDeviceState.valueOf(devRoleState_);
+                ztp.Ztp.ZtpDeviceState result = ztp.Ztp.ZtpDeviceState.forNumber(devRoleState_);
                 return result == null ? ztp.Ztp.ZtpDeviceState.UNRECOGNIZED : result;
             }
 
@@ -3915,6 +3697,7 @@ public final class Ztp {
                 if (value == null) {
                     throw new NullPointerException();
                 }
+                bitField0_ |= 0x00000002;
                 devRoleState_ = value.getNumber();
                 onChanged();
                 return this;
@@ -3925,6 +3708,7 @@ public final class Ztp {
              * @return This builder for chaining.
              */
             public Builder clearDevRoleState() {
+                bitField0_ = (bitField0_ & ~0x00000002);
                 devRoleState_ = 0;
                 onChanged();
                 return this;
@@ -3957,7 +3741,17 @@ public final class Ztp {
 
             @java.lang.Override
             public DeviceRoleState parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new DeviceRoleState(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
@@ -4020,7 +3814,7 @@ public final class Ztp {
         }
 
         private DeviceDeletionResult() {
-            deleted_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+            deleted_ = com.google.protobuf.LazyStringArrayList.emptyList();
         }
 
         @java.lang.Override
@@ -4029,58 +3823,6 @@ public final class Ztp {
             return new DeviceDeletionResult();
         }
 
-        @java.lang.Override
-        public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-            return this.unknownFields;
-        }
-
-        private DeviceDeletionResult(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-            this();
-            if (extensionRegistry == null) {
-                throw new java.lang.NullPointerException();
-            }
-            int mutable_bitField0_ = 0;
-            com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder();
-            try {
-                boolean done = false;
-                while (!done) {
-                    int tag = input.readTag();
-                    switch(tag) {
-                        case 0:
-                            done = true;
-                            break;
-                        case 10:
-                            {
-                                java.lang.String s = input.readStringRequireUtf8();
-                                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                                    deleted_ = new com.google.protobuf.LazyStringArrayList();
-                                    mutable_bitField0_ |= 0x00000001;
-                                }
-                                deleted_.add(s);
-                                break;
-                            }
-                        default:
-                            {
-                                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                                    done = true;
-                                }
-                                break;
-                            }
-                    }
-                }
-            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                throw e.setUnfinishedMessage(this);
-            } catch (java.io.IOException e) {
-                throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-            } finally {
-                if (((mutable_bitField0_ & 0x00000001) != 0)) {
-                    deleted_ = deleted_.getUnmodifiableView();
-                }
-                this.unknownFields = unknownFields.build();
-                makeExtensionsImmutable();
-            }
-        }
-
         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
             return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_descriptor;
         }
@@ -4092,7 +3834,8 @@ public final class Ztp {
 
         public static final int DELETED_FIELD_NUMBER = 1;
 
-        private com.google.protobuf.LazyStringList deleted_;
+        @SuppressWarnings("serial")
+        private com.google.protobuf.LazyStringArrayList deleted_ = com.google.protobuf.LazyStringArrayList.emptyList();
 
         /**
          * repeated string deleted = 1;
@@ -4146,7 +3889,7 @@ public final class Ztp {
             for (int i = 0; i < deleted_.size(); i++) {
                 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deleted_.getRaw(i));
             }
-            unknownFields.writeTo(output);
+            getUnknownFields().writeTo(output);
         }
 
         @java.lang.Override
@@ -4163,7 +3906,7 @@ public final class Ztp {
                 size += dataSize;
                 size += 1 * getDeletedList().size();
             }
-            size += unknownFields.getSerializedSize();
+            size += getUnknownFields().getSerializedSize();
             memoizedSize = size;
             return size;
         }
@@ -4179,7 +3922,7 @@ public final class Ztp {
             ztp.Ztp.DeviceDeletionResult other = (ztp.Ztp.DeviceDeletionResult) obj;
             if (!getDeletedList().equals(other.getDeletedList()))
                 return false;
-            if (!unknownFields.equals(other.unknownFields))
+            if (!getUnknownFields().equals(other.getUnknownFields()))
                 return false;
             return true;
         }
@@ -4195,7 +3938,7 @@ public final class Ztp {
                 hash = (37 * hash) + DELETED_FIELD_NUMBER;
                 hash = (53 * hash) + getDeletedList().hashCode();
             }
-            hash = (29 * hash) + unknownFields.hashCode();
+            hash = (29 * hash) + getUnknownFields().hashCode();
             memoizedHashCode = hash;
             return hash;
         }
@@ -4289,24 +4032,17 @@ public final class Ztp {
 
             // Construct using ztp.Ztp.DeviceDeletionResult.newBuilder()
             private Builder() {
-                maybeForceBuilderInitialization();
             }
 
             private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
                 super(parent);
-                maybeForceBuilderInitialization();
-            }
-
-            private void maybeForceBuilderInitialization() {
-                if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-                }
             }
 
             @java.lang.Override
             public Builder clear() {
                 super.clear();
-                deleted_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-                bitField0_ = (bitField0_ & ~0x00000001);
+                bitField0_ = 0;
+                deleted_ = com.google.protobuf.LazyStringArrayList.emptyList();
                 return this;
             }
 
@@ -4332,44 +4068,19 @@ public final class Ztp {
             @java.lang.Override
             public ztp.Ztp.DeviceDeletionResult buildPartial() {
                 ztp.Ztp.DeviceDeletionResult result = new ztp.Ztp.DeviceDeletionResult(this);
-                int from_bitField0_ = bitField0_;
-                if (((bitField0_ & 0x00000001) != 0)) {
-                    deleted_ = deleted_.getUnmodifiableView();
-                    bitField0_ = (bitField0_ & ~0x00000001);
+                if (bitField0_ != 0) {
+                    buildPartial0(result);
                 }
-                result.deleted_ = deleted_;
                 onBuilt();
                 return result;
             }
 
-            @java.lang.Override
-            public Builder clone() {
-                return super.clone();
-            }
-
-            @java.lang.Override
-            public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.setField(field, value);
-            }
-
-            @java.lang.Override
-            public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-                return super.clearField(field);
-            }
-
-            @java.lang.Override
-            public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-                return super.clearOneof(oneof);
-            }
-
-            @java.lang.Override
-            public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-                return super.setRepeatedField(field, index, value);
-            }
-
-            @java.lang.Override
-            public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-                return super.addRepeatedField(field, value);
+            private void buildPartial0(ztp.Ztp.DeviceDeletionResult result) {
+                int from_bitField0_ = bitField0_;
+                if (((from_bitField0_ & 0x00000001) != 0)) {
+                    deleted_.makeImmutable();
+                    result.deleted_ = deleted_;
+                }
             }
 
             @java.lang.Override
@@ -4388,14 +4099,14 @@ public final class Ztp {
                 if (!other.deleted_.isEmpty()) {
                     if (deleted_.isEmpty()) {
                         deleted_ = other.deleted_;
-                        bitField0_ = (bitField0_ & ~0x00000001);
+                        bitField0_ |= 0x00000001;
                     } else {
                         ensureDeletedIsMutable();
                         deleted_.addAll(other.deleted_);
                     }
                     onChanged();
                 }
-                this.mergeUnknownFields(other.unknownFields);
+                this.mergeUnknownFields(other.getUnknownFields());
                 onChanged();
                 return this;
             }
@@ -4407,29 +4118,55 @@ public final class Ztp {
 
             @java.lang.Override
             public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
-                ztp.Ztp.DeviceDeletionResult parsedMessage = null;
+                if (extensionRegistry == null) {
+                    throw new java.lang.NullPointerException();
+                }
                 try {
-                    parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+                    boolean done = false;
+                    while (!done) {
+                        int tag = input.readTag();
+                        switch(tag) {
+                            case 0:
+                                done = true;
+                                break;
+                            case 10:
+                                {
+                                    java.lang.String s = input.readStringRequireUtf8();
+                                    ensureDeletedIsMutable();
+                                    deleted_.add(s);
+                                    break;
+                                }
+                            // case 10
+                            default:
+                                {
+                                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                                        // was an endgroup tag
+                                        done = true;
+                                    }
+                                    break;
+                                }
+                        }
+                        // switch (tag)
+                    }
+                    // while (!done)
                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-                    parsedMessage = (ztp.Ztp.DeviceDeletionResult) e.getUnfinishedMessage();
                     throw e.unwrapIOException();
                 } finally {
-                    if (parsedMessage != null) {
-                        mergeFrom(parsedMessage);
-                    }
+                    onChanged();
                 }
+                // finally
                 return this;
             }
 
             private int bitField0_;
 
-            private com.google.protobuf.LazyStringList deleted_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+            private com.google.protobuf.LazyStringArrayList deleted_ = com.google.protobuf.LazyStringArrayList.emptyList();
 
             private void ensureDeletedIsMutable() {
-                if (!((bitField0_ & 0x00000001) != 0)) {
+                if (!deleted_.isModifiable()) {
                     deleted_ = new com.google.protobuf.LazyStringArrayList(deleted_);
-                    bitField0_ |= 0x00000001;
                 }
+                bitField0_ |= 0x00000001;
             }
 
             /**
@@ -4437,7 +4174,8 @@ public final class Ztp {
              * @return A list containing the deleted.
              */
             public com.google.protobuf.ProtocolStringList getDeletedList() {
-                return deleted_.getUnmodifiableView();
+                deleted_.makeImmutable();
+                return deleted_;
             }
 
             /**
@@ -4478,6 +4216,7 @@ public final class Ztp {
                 }
                 ensureDeletedIsMutable();
                 deleted_.set(index, value);
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -4493,6 +4232,7 @@ public final class Ztp {
                 }
                 ensureDeletedIsMutable();
                 deleted_.add(value);
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -4505,6 +4245,7 @@ public final class Ztp {
             public Builder addAllDeleted(java.lang.Iterable values) {
                 ensureDeletedIsMutable();
                 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deleted_);
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -4514,8 +4255,9 @@ public final class Ztp {
              * @return This builder for chaining.
              */
             public Builder clearDeleted() {
-                deleted_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+                deleted_ = com.google.protobuf.LazyStringArrayList.emptyList();
                 bitField0_ = (bitField0_ & ~0x00000001);
+                ;
                 onChanged();
                 return this;
             }
@@ -4532,6 +4274,7 @@ public final class Ztp {
                 checkByteStringIsUtf8(value);
                 ensureDeletedIsMutable();
                 deleted_.add(value);
+                bitField0_ |= 0x00000001;
                 onChanged();
                 return this;
             }
@@ -4563,7 +4306,17 @@ public final class Ztp {
 
             @java.lang.Override
             public DeviceDeletionResult parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException {
-                return new DeviceDeletionResult(input, extensionRegistry);
+                Builder builder = newBuilder();
+                try {
+                    builder.mergeFrom(input, extensionRegistry);
+                } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+                    throw e.setUnfinishedMessage(builder.buildPartial());
+                } catch (com.google.protobuf.UninitializedMessageException e) {
+                    throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+                } catch (java.io.IOException e) {
+                    throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial());
+                }
+                return builder.buildPartial();
             }
         };
 
diff --git a/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceGrpc.java b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceGrpc.java
index 796e4bcee..e989a3637 100644
--- a/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceGrpc.java
+++ b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceGrpc.java
@@ -4,7 +4,8 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
 
 /**
  */
-@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.38.1)", comments = "Source: ztp.proto")
+@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.55.1)", comments = "Source: ztp.proto")
+@io.grpc.stub.annotations.GrpcGenerated
 public final class ZtpServiceGrpc {
 
     private ZtpServiceGrpc() {
@@ -147,51 +148,58 @@ public final class ZtpServiceGrpc {
 
     /**
      */
-    public static abstract class ZtpServiceImplBase implements io.grpc.BindableService {
+    public interface AsyncService {
 
         /**
          */
-        public void ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request, io.grpc.stub.StreamObserver responseObserver) {
+        default void ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpGetDeviceRoleMethod(), responseObserver);
         }
 
         /**
          */
-        public void ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) {
+        default void ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpGetDeviceRolesByDeviceIdMethod(), responseObserver);
         }
 
         /**
          */
-        public void ztpAdd(ztp.Ztp.DeviceRole request, io.grpc.stub.StreamObserver responseObserver) {
+        default void ztpAdd(ztp.Ztp.DeviceRole request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpAddMethod(), responseObserver);
         }
 
         /**
          */
-        public void ztpUpdate(ztp.Ztp.DeviceRoleConfig request, io.grpc.stub.StreamObserver responseObserver) {
+        default void ztpUpdate(ztp.Ztp.DeviceRoleConfig request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpUpdateMethod(), responseObserver);
         }
 
         /**
          */
-        public void ztpDelete(ztp.Ztp.DeviceRole request, io.grpc.stub.StreamObserver responseObserver) {
+        default void ztpDelete(ztp.Ztp.DeviceRole request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpDeleteMethod(), responseObserver);
         }
 
         /**
          */
-        public void ztpDeleteAll(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) {
+        default void ztpDeleteAll(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) {
             io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpDeleteAllMethod(), responseObserver);
         }
+    }
+
+    /**
+     * Base class for the server implementation of the service ZtpService.
+     */
+    public static abstract class ZtpServiceImplBase implements io.grpc.BindableService, AsyncService {
 
         @java.lang.Override
         public io.grpc.ServerServiceDefinition bindService() {
-            return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getZtpGetDeviceRoleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_GET_DEVICE_ROLE))).addMethod(getZtpGetDeviceRolesByDeviceIdMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID))).addMethod(getZtpAddMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_ADD))).addMethod(getZtpUpdateMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_UPDATE))).addMethod(getZtpDeleteMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_DELETE))).addMethod(getZtpDeleteAllMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_DELETE_ALL))).build();
+            return ZtpServiceGrpc.bindService(this);
         }
     }
 
     /**
+     * A stub to allow clients to do asynchronous rpc calls to service ZtpService.
      */
     public static class ZtpServiceStub extends io.grpc.stub.AbstractAsyncStub {
 
@@ -242,6 +250,7 @@ public final class ZtpServiceGrpc {
     }
 
     /**
+     * A stub to allow clients to do synchronous rpc calls to service ZtpService.
      */
     public static class ZtpServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
 
@@ -292,6 +301,7 @@ public final class ZtpServiceGrpc {
     }
 
     /**
+     * A stub to allow clients to do ListenableFuture-style rpc calls to service ZtpService.
      */
     public static class ZtpServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
 
@@ -355,11 +365,11 @@ public final class ZtpServiceGrpc {
 
     private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod {
 
-        private final ZtpServiceImplBase serviceImpl;
+        private final AsyncService serviceImpl;
 
         private final int methodId;
 
-        MethodHandlers(ZtpServiceImplBase serviceImpl, int methodId) {
+        MethodHandlers(AsyncService serviceImpl, int methodId) {
             this.serviceImpl = serviceImpl;
             this.methodId = methodId;
         }
@@ -401,6 +411,10 @@ public final class ZtpServiceGrpc {
         }
     }
 
+    public static io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+        return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getZtpGetDeviceRoleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_ZTP_GET_DEVICE_ROLE))).addMethod(getZtpGetDeviceRolesByDeviceIdMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID))).addMethod(getZtpAddMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_ZTP_ADD))).addMethod(getZtpUpdateMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_ZTP_UPDATE))).addMethod(getZtpDeleteMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_ZTP_DELETE))).addMethod(getZtpDeleteAllMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(service, METHODID_ZTP_DELETE_ALL))).build();
+    }
+
     private static abstract class ZtpServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
 
         ZtpServiceBaseDescriptorSupplier() {
diff --git a/src/ztp/target/kubernetes/kubernetes.yml b/src/ztp/target/kubernetes/kubernetes.yml
index 95eca6ae2..ef5b996f5 100644
--- a/src/ztp/target/kubernetes/kubernetes.yml
+++ b/src/ztp/target/kubernetes/kubernetes.yml
@@ -3,8 +3,8 @@ apiVersion: v1
 kind: Service
 metadata:
   annotations:
-    app.quarkus.io/commit-id: 1fd284c73cf7d419152c8bc99644d0ed8955b355
-    app.quarkus.io/build-timestamp: 2024-04-08 - 17:36:46 +0000
+    app.quarkus.io/commit-id: 4a4c9dae464ba1919bca69eb213009c24385a759
+    app.quarkus.io/build-timestamp: 2025-04-10 - 15:54:11 +0000
     prometheus.io/scrape: "true"
     prometheus.io/path: /q/metrics
     prometheus.io/port: "8080"
@@ -37,8 +37,8 @@ apiVersion: apps/v1
 kind: Deployment
 metadata:
   annotations:
-    app.quarkus.io/commit-id: 1fd284c73cf7d419152c8bc99644d0ed8955b355
-    app.quarkus.io/build-timestamp: 2024-04-08 - 17:36:46 +0000
+    app.quarkus.io/commit-id: 4a4c9dae464ba1919bca69eb213009c24385a759
+    app.quarkus.io/build-timestamp: 2025-04-10 - 15:54:11 +0000
     prometheus.io/scrape: "true"
     prometheus.io/path: /q/metrics
     prometheus.io/port: "8080"
@@ -57,8 +57,8 @@ spec:
   template:
     metadata:
       annotations:
-        app.quarkus.io/commit-id: 1fd284c73cf7d419152c8bc99644d0ed8955b355
-        app.quarkus.io/build-timestamp: 2024-04-08 - 17:36:46 +0000
+        app.quarkus.io/commit-id: 4a4c9dae464ba1919bca69eb213009c24385a759
+        app.quarkus.io/build-timestamp: 2025-04-10 - 15:54:11 +0000
         prometheus.io/scrape: "true"
         prometheus.io/path: /q/metrics
         prometheus.io/port: "8080"
@@ -75,10 +75,10 @@ spec:
               valueFrom:
                 fieldRef:
                   fieldPath: metadata.namespace
-            - name: DEVICE_SERVICE_HOST
-              value: deviceservice
             - name: CONTEXT_SERVICE_HOST
               value: contextservice
+            - name: DEVICE_SERVICE_HOST
+              value: deviceservice
           image: labs.etsi.org:5050/tfs/controller/ztp:0.2.0
           imagePullPolicy: Always
           livenessProbe:
-- 
GitLab


From 8b2e451f4437f73645076c547db18298e1ff8fae Mon Sep 17 00:00:00 2001
From: "Georgios P. Katsikas" 
Date: Mon, 14 Apr 2025 20:31:43 +0000
Subject: [PATCH 394/463] fix: generated code imports

---
 proto/generate_code_python.sh               | 2 +-
 proto/monitoring.proto                      | 0
 proto/ztp_server.proto                      | 0
 src/analytics/frontend/Dockerfile           | 2 +-
 src/automation/Dockerfile                   | 2 +-
 src/bgpls_speaker/Dockerfile                | 4 ++--
 src/context/Dockerfile                      | 2 +-
 src/dbscanserving/Dockerfile                | 2 +-
 src/device/Dockerfile                       | 2 +-
 src/e2e_orchestrator/Dockerfile             | 2 +-
 src/forecaster/Dockerfile                   | 2 +-
 src/interdomain/Dockerfile                  | 2 +-
 src/kpi_manager/Dockerfile                  | 2 +-
 src/kpi_value_api/Dockerfile                | 2 +-
 src/kpi_value_writer/Dockerfile             | 2 +-
 src/l3_attackmitigator/Dockerfile           | 2 +-
 src/l3_centralizedattackdetector/Dockerfile | 2 +-
 src/l3_distributedattackdetector/Dockerfile | 2 +-
 src/load_generator/Dockerfile               | 2 +-
 src/monitoring/Dockerfile                   | 2 +-
 src/nbi/Dockerfile                          | 2 +-
 src/opticalattackdetector/Dockerfile        | 2 +-
 src/opticalattackmanager/Dockerfile         | 2 +-
 src/opticalattackmitigator/Dockerfile       | 2 +-
 src/opticalcontroller/Dockerfile            | 2 +-
 src/osm_client/Dockerfile                   | 2 +-
 src/pathcomp/frontend/Dockerfile            | 2 +-
 src/qkd_app/Dockerfile                      | 2 +-
 src/qos_profile/Dockerfile                  | 2 +-
 src/service/Dockerfile                      | 2 +-
 src/slice/Dockerfile                        | 2 +-
 src/telemetry/frontend/Dockerfile           | 2 +-
 src/vnt_manager/Dockerfile                  | 2 +-
 src/webui/Dockerfile                        | 2 +-
 src/ztp_server/Dockerfile                   | 2 +-
 35 files changed, 34 insertions(+), 34 deletions(-)
 mode change 100755 => 100644 proto/monitoring.proto
 mode change 100755 => 100644 proto/ztp_server.proto

diff --git a/proto/generate_code_python.sh b/proto/generate_code_python.sh
index 2954e72a1..1c205a523 100755
--- a/proto/generate_code_python.sh
+++ b/proto/generate_code_python.sh
@@ -42,4 +42,4 @@ python3 -m grpc_tools.protoc -I=./ --python_out=src/python/ --grpc_python_out=sr
 python3 -m grpc_tools.protoc -I=./ --python_out=src/python/asyncio --grpclib_python_out=src/python/asyncio *.proto
 
 # Arrange generated code imports to enable imports from arbitrary subpackages
-find src/python -type f -iname *.py -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+find src/python -type f -iname *.py -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
diff --git a/proto/monitoring.proto b/proto/monitoring.proto
old mode 100755
new mode 100644
diff --git a/proto/ztp_server.proto b/proto/ztp_server.proto
old mode 100755
new mode 100644
diff --git a/src/analytics/frontend/Dockerfile b/src/analytics/frontend/Dockerfile
index bfc727d3e..679861f91 100644
--- a/src/analytics/frontend/Dockerfile
+++ b/src/analytics/frontend/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/analytics/frontend
diff --git a/src/automation/Dockerfile b/src/automation/Dockerfile
index 1818284c9..7bd035be6 100644
--- a/src/automation/Dockerfile
+++ b/src/automation/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/automation
diff --git a/src/bgpls_speaker/Dockerfile b/src/bgpls_speaker/Dockerfile
index eefeb9a1d..d68236d60 100644
--- a/src/bgpls_speaker/Dockerfile
+++ b/src/bgpls_speaker/Dockerfile
@@ -84,7 +84,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/bgpls_speaker
@@ -107,4 +107,4 @@ COPY src/bgpls_speaker/. bgpls_speaker/
 
 # Start the service
 ENTRYPOINT ["python", "-m", "bgpls_speaker.service"]
-# ENTRYPOINT [ "ls","-R" ]
\ No newline at end of file
+# ENTRYPOINT [ "ls","-R" ]
diff --git a/src/context/Dockerfile b/src/context/Dockerfile
index 10986e1a1..3f3065bcc 100644
--- a/src/context/Dockerfile
+++ b/src/context/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/context
diff --git a/src/dbscanserving/Dockerfile b/src/dbscanserving/Dockerfile
index 069b109a0..a8e359014 100644
--- a/src/dbscanserving/Dockerfile
+++ b/src/dbscanserving/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/dbscanserving
diff --git a/src/device/Dockerfile b/src/device/Dockerfile
index d760e0c70..bff47f929 100644
--- a/src/device/Dockerfile
+++ b/src/device/Dockerfile
@@ -66,7 +66,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/device
diff --git a/src/e2e_orchestrator/Dockerfile b/src/e2e_orchestrator/Dockerfile
index f875663c1..31db2b55a 100644
--- a/src/e2e_orchestrator/Dockerfile
+++ b/src/e2e_orchestrator/Dockerfile
@@ -64,7 +64,7 @@ RUN touch __init__.py
 COPY --chown=teraflow:teraflow proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create module sub-folders
 RUN mkdir -p /home/teraflow/controller/e2e_orchestrator
diff --git a/src/forecaster/Dockerfile b/src/forecaster/Dockerfile
index f521eab40..47b5416ff 100644
--- a/src/forecaster/Dockerfile
+++ b/src/forecaster/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/forecaster
diff --git a/src/interdomain/Dockerfile b/src/interdomain/Dockerfile
index 57f55007a..f4cc9931f 100644
--- a/src/interdomain/Dockerfile
+++ b/src/interdomain/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/interdomain
diff --git a/src/kpi_manager/Dockerfile b/src/kpi_manager/Dockerfile
index 12455e4c9..0207fff4b 100644
--- a/src/kpi_manager/Dockerfile
+++ b/src/kpi_manager/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/kpi_manager
diff --git a/src/kpi_value_api/Dockerfile b/src/kpi_value_api/Dockerfile
index 91e169006..5a21886a5 100644
--- a/src/kpi_value_api/Dockerfile
+++ b/src/kpi_value_api/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/kpi_value_api
diff --git a/src/kpi_value_writer/Dockerfile b/src/kpi_value_writer/Dockerfile
index f6f8b1352..4db2df5a6 100644
--- a/src/kpi_value_writer/Dockerfile
+++ b/src/kpi_value_writer/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/kpi_value_writer
diff --git a/src/l3_attackmitigator/Dockerfile b/src/l3_attackmitigator/Dockerfile
index 9d80570fa..12e0dc0c4 100644
--- a/src/l3_attackmitigator/Dockerfile
+++ b/src/l3_attackmitigator/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/l3_attackmitigator
diff --git a/src/l3_centralizedattackdetector/Dockerfile b/src/l3_centralizedattackdetector/Dockerfile
index 718b4ff95..6dcf7f0ef 100644
--- a/src/l3_centralizedattackdetector/Dockerfile
+++ b/src/l3_centralizedattackdetector/Dockerfile
@@ -55,7 +55,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/l3_centralizedattackdetector
diff --git a/src/l3_distributedattackdetector/Dockerfile b/src/l3_distributedattackdetector/Dockerfile
index 95914d22e..b3b18018b 100644
--- a/src/l3_distributedattackdetector/Dockerfile
+++ b/src/l3_distributedattackdetector/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/l3_distributedattackdetector
diff --git a/src/load_generator/Dockerfile b/src/load_generator/Dockerfile
index 3ef1470f4..c74d0a342 100644
--- a/src/load_generator/Dockerfile
+++ b/src/load_generator/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/load_generator
diff --git a/src/monitoring/Dockerfile b/src/monitoring/Dockerfile
index 1c7a03c53..60f2b1ad4 100644
--- a/src/monitoring/Dockerfile
+++ b/src/monitoring/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/monitoring
diff --git a/src/nbi/Dockerfile b/src/nbi/Dockerfile
index a9be06d37..7cfffda4e 100644
--- a/src/nbi/Dockerfile
+++ b/src/nbi/Dockerfile
@@ -66,7 +66,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/nbi
diff --git a/src/opticalattackdetector/Dockerfile b/src/opticalattackdetector/Dockerfile
index 60220dc63..b473627fc 100644
--- a/src/opticalattackdetector/Dockerfile
+++ b/src/opticalattackdetector/Dockerfile
@@ -64,7 +64,7 @@ RUN touch __init__.py
 COPY --chown=teraflow:teraflow proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create module sub-folders
 RUN mkdir -p /home/teraflow/controller/opticalattackdetector
diff --git a/src/opticalattackmanager/Dockerfile b/src/opticalattackmanager/Dockerfile
index 2af1f282a..a5739b2ec 100644
--- a/src/opticalattackmanager/Dockerfile
+++ b/src/opticalattackmanager/Dockerfile
@@ -74,7 +74,7 @@ RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 # new line added to generate protobuf for the `grpclib` library
 RUN python3 -m grpc_tools.protoc -I=./ --python_out=./asyncio --grpclib_python_out=./asyncio *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create module sub-folders
 RUN mkdir -p /home/teraflow/controller/opticalattackmanager
diff --git a/src/opticalattackmitigator/Dockerfile b/src/opticalattackmitigator/Dockerfile
index f4c5a2b5c..97dc16e85 100644
--- a/src/opticalattackmitigator/Dockerfile
+++ b/src/opticalattackmitigator/Dockerfile
@@ -63,7 +63,7 @@ RUN touch __init__.py
 COPY --chown=teraflow:teraflow proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create module sub-folders
 RUN mkdir -p /home/teraflow/controller/opticalattackmitigator
diff --git a/src/opticalcontroller/Dockerfile b/src/opticalcontroller/Dockerfile
index 366864686..f323cd7a8 100644
--- a/src/opticalcontroller/Dockerfile
+++ b/src/opticalcontroller/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/opticalcontroller
diff --git a/src/osm_client/Dockerfile b/src/osm_client/Dockerfile
index 1c7427404..c3ce9b15a 100644
--- a/src/osm_client/Dockerfile
+++ b/src/osm_client/Dockerfile
@@ -54,7 +54,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders
 RUN mkdir -p /var/teraflow/osm_client
diff --git a/src/pathcomp/frontend/Dockerfile b/src/pathcomp/frontend/Dockerfile
index c96db7293..01b8656d4 100644
--- a/src/pathcomp/frontend/Dockerfile
+++ b/src/pathcomp/frontend/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/pathcomp/frontend
diff --git a/src/qkd_app/Dockerfile b/src/qkd_app/Dockerfile
index 26729f384..91c264f34 100644
--- a/src/qkd_app/Dockerfile
+++ b/src/qkd_app/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/qkd_app
diff --git a/src/qos_profile/Dockerfile b/src/qos_profile/Dockerfile
index 20d39cc1f..9a53c5d6a 100644
--- a/src/qos_profile/Dockerfile
+++ b/src/qos_profile/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/qos_profile
diff --git a/src/service/Dockerfile b/src/service/Dockerfile
index 564cae1b1..2d4b980ed 100644
--- a/src/service/Dockerfile
+++ b/src/service/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/service
diff --git a/src/slice/Dockerfile b/src/slice/Dockerfile
index 1108030fe..175c3a47a 100644
--- a/src/slice/Dockerfile
+++ b/src/slice/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/slice
diff --git a/src/telemetry/frontend/Dockerfile b/src/telemetry/frontend/Dockerfile
index 0e7827895..e7eebc02b 100644
--- a/src/telemetry/frontend/Dockerfile
+++ b/src/telemetry/frontend/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/telemetry/frontend
diff --git a/src/vnt_manager/Dockerfile b/src/vnt_manager/Dockerfile
index 3ff0acf3f..baf43aa36 100644
--- a/src/vnt_manager/Dockerfile
+++ b/src/vnt_manager/Dockerfile
@@ -64,7 +64,7 @@ RUN touch __init__.py
 COPY --chown=teraflow:teraflow proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create module sub-folders
 RUN mkdir -p /home/teraflow/controller/vnt_manager
diff --git a/src/webui/Dockerfile b/src/webui/Dockerfile
index 0327b68ef..64e319f3a 100644
--- a/src/webui/Dockerfile
+++ b/src/webui/Dockerfile
@@ -65,7 +65,7 @@ RUN touch __init__.py
 COPY --chown=webui:webui proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 WORKDIR /home/webui/teraflow
 
 COPY --chown=webui:webui src/webui/requirements.in requirements.in
diff --git a/src/ztp_server/Dockerfile b/src/ztp_server/Dockerfile
index bbcc282bd..425a96c43 100755
--- a/src/ztp_server/Dockerfile
+++ b/src/ztp_server/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/ztp_server
-- 
GitLab


From be439e4d167da642c5019b44e7782990a11ba06a Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 16 Apr 2025 21:26:05 +0000
Subject: [PATCH 395/463] Telemetry backend:

- Correct Dockerfile
---
 src/telemetry/backend/Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/telemetry/backend/Dockerfile b/src/telemetry/backend/Dockerfile
index 07459986d..df23aabab 100644
--- a/src/telemetry/backend/Dockerfile
+++ b/src/telemetry/backend/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/telemetry/backend
-- 
GitLab


From 4d8c519ee22ff89b74679ad177a3d45527b43cce Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 16 Apr 2025 22:39:44 +0000
Subject: [PATCH 396/463] Corrected proto generation in multiple Dockerfiles

---
 src/analytics/backend/Dockerfile                     | 2 +-
 src/dlt/connector/Dockerfile                         | 2 +-
 src/dlt/mock_blockchain/Dockerfile                   | 2 +-
 src/tests/ecoc22/Dockerfile                          | 2 +-
 src/tests/eucnc24/Dockerfile                         | 2 +-
 src/tests/ofc22/Dockerfile                           | 2 +-
 src/tests/ofc24/Dockerfile                           | 2 +-
 src/tests/ofc25-camara-agg-net-controller/Dockerfile | 2 +-
 src/tests/ofc25-camara-e2e-controller/Dockerfile     | 2 +-
 src/tests/ofc25/Dockerfile                           | 2 +-
 src/tests/tools/mock_tfs_nbi_dependencies/Dockerfile | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/analytics/backend/Dockerfile b/src/analytics/backend/Dockerfile
index 82eb9ca92..6921d4991 100644
--- a/src/analytics/backend/Dockerfile
+++ b/src/analytics/backend/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/analytics/backend
diff --git a/src/dlt/connector/Dockerfile b/src/dlt/connector/Dockerfile
index 7e1e90932..aef9987e5 100644
--- a/src/dlt/connector/Dockerfile
+++ b/src/dlt/connector/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/dlt/connector
diff --git a/src/dlt/mock_blockchain/Dockerfile b/src/dlt/mock_blockchain/Dockerfile
index 93bae2f87..27a94bc61 100644
--- a/src/dlt/mock_blockchain/Dockerfile
+++ b/src/dlt/mock_blockchain/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/mock_blockchain
diff --git a/src/tests/ecoc22/Dockerfile b/src/tests/ecoc22/Dockerfile
index 996d515f3..2617f6612 100644
--- a/src/tests/ecoc22/Dockerfile
+++ b/src/tests/ecoc22/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/tests/ecoc22
diff --git a/src/tests/eucnc24/Dockerfile b/src/tests/eucnc24/Dockerfile
index 2bf88714e..5d0a4dea4 100644
--- a/src/tests/eucnc24/Dockerfile
+++ b/src/tests/eucnc24/Dockerfile
@@ -46,7 +46,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/tests/eucnc24
diff --git a/src/tests/ofc22/Dockerfile b/src/tests/ofc22/Dockerfile
index 6e4ca36ec..56a3c313b 100644
--- a/src/tests/ofc22/Dockerfile
+++ b/src/tests/ofc22/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/tests/ofc22
diff --git a/src/tests/ofc24/Dockerfile b/src/tests/ofc24/Dockerfile
index f2afcfbb7..04bfbb9ba 100644
--- a/src/tests/ofc24/Dockerfile
+++ b/src/tests/ofc24/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/tests/ofc24
diff --git a/src/tests/ofc25-camara-agg-net-controller/Dockerfile b/src/tests/ofc25-camara-agg-net-controller/Dockerfile
index 36ab9d366..92b0bfeb4 100644
--- a/src/tests/ofc25-camara-agg-net-controller/Dockerfile
+++ b/src/tests/ofc25-camara-agg-net-controller/Dockerfile
@@ -46,7 +46,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/tests/ofc25-camara-agg-net-controller
diff --git a/src/tests/ofc25-camara-e2e-controller/Dockerfile b/src/tests/ofc25-camara-e2e-controller/Dockerfile
index 79b709c13..040f97692 100644
--- a/src/tests/ofc25-camara-e2e-controller/Dockerfile
+++ b/src/tests/ofc25-camara-e2e-controller/Dockerfile
@@ -46,7 +46,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/tests/ofc25-camara-e2e-controller
diff --git a/src/tests/ofc25/Dockerfile b/src/tests/ofc25/Dockerfile
index 0439d980b..1be34ec59 100644
--- a/src/tests/ofc25/Dockerfile
+++ b/src/tests/ofc25/Dockerfile
@@ -46,7 +46,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/tests/ofc25
diff --git a/src/tests/tools/mock_tfs_nbi_dependencies/Dockerfile b/src/tests/tools/mock_tfs_nbi_dependencies/Dockerfile
index 9e79fa1e4..bf19a7e45 100644
--- a/src/tests/tools/mock_tfs_nbi_dependencies/Dockerfile
+++ b/src/tests/tools/mock_tfs_nbi_dependencies/Dockerfile
@@ -51,7 +51,7 @@ RUN touch __init__.py
 COPY proto/*.proto ./
 RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
 RUN rm *.proto
-RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
 RUN mkdir -p /var/teraflow/mock_tfs_nbi_dependencies
-- 
GitLab


From 4ab6bb8108e064a0c083253cdbcf1a4e9a48dfd4 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 16 Apr 2025 22:59:22 +0000
Subject: [PATCH 397/463] Fix GitLab CI/CD pipeline

---
 src/analytics/.gitlab-ci.yml |  1 +
 src/nbi/.gitlab-ci.yml       |  2 +-
 src/telemetry/.gitlab-ci.yml | 30 ++++++++++++++++++++++++------
 3 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/src/analytics/.gitlab-ci.yml b/src/analytics/.gitlab-ci.yml
index 5f30c9aa8..1477219a3 100644
--- a/src/analytics/.gitlab-ci.yml
+++ b/src/analytics/.gitlab-ci.yml
@@ -78,6 +78,7 @@ unit_test analytics-backend:
       --env ALLOW_PLAINTEXT_LISTENER=yes
       bitnami/kafka:latest
     - sleep 20 # Wait for Kafka to start
+    - docker inspect kafka --format "{{.NetworkSettings.Networks}}
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP    
     - >
diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml
index 2e280ed8a..4b3ec01ac 100644
--- a/src/nbi/.gitlab-ci.yml
+++ b/src/nbi/.gitlab-ci.yml
@@ -82,7 +82,7 @@ unit_test nbi:
     - docker ps -a
     - docker logs mock_tfs_nbi_dependencies
     - docker logs $IMAGE_NAME
-    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml"
     - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml"
     - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml"
     - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml"
diff --git a/src/telemetry/.gitlab-ci.yml b/src/telemetry/.gitlab-ci.yml
index 9ac995e63..1f82042af 100644
--- a/src/telemetry/.gitlab-ci.yml
+++ b/src/telemetry/.gitlab-ci.yml
@@ -72,10 +72,19 @@ unit_test telemetry-backend:
       --env ALLOW_ANONYMOUS_LOGIN=yes
       bitnami/zookeeper:latest
     - sleep 10 # Wait for Zookeeper to start
+    #- >
+    #  docker run --name kafka -d --network=teraflowbridge -p 9092:9092
+    #  --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
+    #  --env ALLOW_PLAINTEXT_LISTENER=yes
+    #  bitnami/kafka:latest
     - >
-      docker run --name kafka -d --network=teraflowbridge -p 9092:9092
-      --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
-      --env ALLOW_PLAINTEXT_LISTENER=yes
+      docker run --name kafka -d --network=teraflowbridge -p 9092:9092 -p 9093:9093
+      --env KAFKA_CFG_NODE_ID=1
+      --env KAFKA_CFG_PROCESS_ROLES=controller,broker
+      --env KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
+      --env KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT
+      --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
+      --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
     - sleep 20 # Wait for Kafka to start
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
@@ -156,10 +165,19 @@ unit_test telemetry-frontend:
       --env ALLOW_ANONYMOUS_LOGIN=yes
       bitnami/zookeeper:latest
     - sleep 10 # Wait for Zookeeper to start
+    #- >
+    #  docker run --name kafka -d --network=teraflowbridge -p 9092:9092
+    #  --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
+    #  --env ALLOW_PLAINTEXT_LISTENER=yes
+    #  bitnami/kafka:latest
     - >
-      docker run --name kafka -d --network=teraflowbridge -p 9092:9092
-      --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
-      --env ALLOW_PLAINTEXT_LISTENER=yes
+      docker run --name kafka -d --network=teraflowbridge -p 9092:9092 -p 9093:9093
+      --env KAFKA_CFG_NODE_ID=1
+      --env KAFKA_CFG_PROCESS_ROLES=controller,broker
+      --env KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
+      --env KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT
+      --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
+      --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
     - sleep 20 # Wait for Kafka to start
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
-- 
GitLab


From 9be1839c66bdeeec907c36aac280850f5ee51629 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 16 Apr 2025 23:19:32 +0000
Subject: [PATCH 398/463] Fix GitLab CI/CD pipeline

---
 src/telemetry/.gitlab-ci.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/telemetry/.gitlab-ci.yml b/src/telemetry/.gitlab-ci.yml
index 1f82042af..4ce841858 100644
--- a/src/telemetry/.gitlab-ci.yml
+++ b/src/telemetry/.gitlab-ci.yml
@@ -196,11 +196,12 @@ unit_test telemetry-frontend:
     - docker logs ${IMAGE_NAME}-frontend
     - >
       docker exec -i ${IMAGE_NAME}-frontend bash -c
-      "coverage run -m pytest --log-level=INFO --verbose --junitxml=/opt/results/${IMAGE_NAME}-frontend_report.xml $IMAGE_NAME/frontend/tests/test_*.py"
+      "coverage run -m pytest --log-level=DEBUG -o log_cli=true --verbose --junitxml=/opt/results/${IMAGE_NAME}-frontend_report.xml $IMAGE_NAME/frontend/tests/test_*.py"
     - docker exec -i ${IMAGE_NAME}-frontend bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing"
   coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
   after_script:
     - docker rm -f ${IMAGE_NAME}-frontend
+    - docker rm -f crdb
     - docker rm -f zookeeper
     - docker rm -f kafka
     - docker volume rm -f crdb
-- 
GitLab


From d7ff768955de99d23eedf8499fa9890002ce625c Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Tue, 22 Apr 2025 08:34:41 +0000
Subject: [PATCH 399/463] Fix GitLab CI/CD pipeline

---
 src/analytics/.gitlab-ci.yml | 34 +++++++++++++++++++++++++++-------
 src/telemetry/.gitlab-ci.yml |  2 ++
 2 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/src/analytics/.gitlab-ci.yml b/src/analytics/.gitlab-ci.yml
index 1477219a3..ce17a040c 100644
--- a/src/analytics/.gitlab-ci.yml
+++ b/src/analytics/.gitlab-ci.yml
@@ -72,10 +72,19 @@ unit_test analytics-backend:
       --env ALLOW_ANONYMOUS_LOGIN=yes
       bitnami/zookeeper:latest
     - sleep 10 # Wait for Zookeeper to start
+    #- >
+    #  docker run --name kafka -d --network=teraflowbridge -p 9092:9092
+    #  --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
+    #  --env ALLOW_PLAINTEXT_LISTENER=yes
+    #  bitnami/kafka:latest
     - >
-      docker run --name kafka -d --network=teraflowbridge -p 9092:9092
-      --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
-      --env ALLOW_PLAINTEXT_LISTENER=yes
+      docker run --name kafka -d --network=teraflowbridge -p 9092:9092 -p 9093:9093
+      --env KAFKA_CFG_NODE_ID=1
+      --env KAFKA_CFG_PROCESS_ROLES=controller,broker
+      --env KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
+      --env KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT
+      --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
+      --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
     - sleep 20 # Wait for Kafka to start
     - docker inspect kafka --format "{{.NetworkSettings.Networks}}
@@ -157,12 +166,22 @@ unit_test analytics-frontend:
       --env ALLOW_ANONYMOUS_LOGIN=yes
       bitnami/zookeeper:latest
     - sleep 10 # Wait for Zookeeper to start
+    #- >
+    #  docker run --name kafka -d --network=teraflowbridge -p 9092:9092
+    #  --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
+    #  --env ALLOW_PLAINTEXT_LISTENER=yes
+    #  bitnami/kafka:latest
     - >
-      docker run --name kafka -d --network=teraflowbridge -p 9092:9092
-      --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
-      --env ALLOW_PLAINTEXT_LISTENER=yes
+      docker run --name kafka -d --network=teraflowbridge -p 9092:9092 -p 9093:9093
+      --env KAFKA_CFG_NODE_ID=1
+      --env KAFKA_CFG_PROCESS_ROLES=controller,broker
+      --env KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
+      --env KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT
+      --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
+      --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
     - sleep 20 # Wait for Kafka to start
+    - docker inspect kafka --format "{{.NetworkSettings.Networks}}
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP
     - docker logs zookeeper
@@ -179,11 +198,12 @@ unit_test analytics-frontend:
     - docker logs ${IMAGE_NAME}-frontend
     - >
       docker exec -i ${IMAGE_NAME}-frontend bash -c
-      "coverage run -m pytest --log-level=INFO --verbose --junitxml=/opt/results/${IMAGE_NAME}-frontend_report.xml $IMAGE_NAME/frontend/tests/test_*.py"
+      "coverage run -m pytest --log-level=DEBUG -o log_cli=true --verbose --junitxml=/opt/results/${IMAGE_NAME}-frontend_report.xml $IMAGE_NAME/frontend/tests/test_*.py"
     - docker exec -i ${IMAGE_NAME}-frontend bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing"
   coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
   after_script:
     - docker rm -f ${IMAGE_NAME}-frontend
+    - docker rm -f crdb
     - docker rm -f zookeeper
     - docker rm -f kafka
     - docker volume rm -f crdb
diff --git a/src/telemetry/.gitlab-ci.yml b/src/telemetry/.gitlab-ci.yml
index 4ce841858..3b362768b 100644
--- a/src/telemetry/.gitlab-ci.yml
+++ b/src/telemetry/.gitlab-ci.yml
@@ -87,6 +87,7 @@ unit_test telemetry-backend:
       --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
     - sleep 20 # Wait for Kafka to start
+    - docker inspect kafka --format "{{.NetworkSettings.Networks}}
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP    
     - >
@@ -180,6 +181,7 @@ unit_test telemetry-frontend:
       --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
     - sleep 20 # Wait for Kafka to start
+    - docker inspect kafka --format "{{.NetworkSettings.Networks}}
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP
     - docker logs zookeeper
-- 
GitLab


From de40bc0d933c0ab947e0312b20d9669900861537 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Tue, 22 Apr 2025 09:12:29 +0000
Subject: [PATCH 400/463] Fix GitLab CI/CD pipeline

---
 src/analytics/.gitlab-ci.yml        | 38 ++++++++++++++--------------
 src/kpi_value_api/.gitlab-ci.yml    | 39 ++++++++++++++++++-----------
 src/kpi_value_writer/.gitlab-ci.yml | 35 ++++++++++++++++----------
 src/nbi/.gitlab-ci.yml              | 13 +++++-----
 src/telemetry/.gitlab-ci.yml        | 38 ++++++++++++++--------------
 5 files changed, 91 insertions(+), 72 deletions(-)

diff --git a/src/analytics/.gitlab-ci.yml b/src/analytics/.gitlab-ci.yml
index ce17a040c..79e6fb23d 100644
--- a/src/analytics/.gitlab-ci.yml
+++ b/src/analytics/.gitlab-ci.yml
@@ -59,19 +59,19 @@ unit_test analytics-backend:
     - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
     - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create -d bridge teraflowbridge; fi
     - if docker container ls | grep kafka; then docker rm -f kafka; else echo "Kafka container is not in the system"; fi
-    - if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi
+    #- if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi
     # - if docker container ls | grep ${IMAGE_NAME}-frontend; then docker rm -f ${IMAGE_NAME}-frontend; else echo "${IMAGE_NAME}-frontend container is not in the system"; fi
     - if docker container ls | grep ${IMAGE_NAME}-backend; then docker rm -f ${IMAGE_NAME}-backend; else echo "${IMAGE_NAME}-backend container is not in the system"; fi
     - docker container prune -f
   script:
     - docker pull "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-backend:$IMAGE_TAG"
-    - docker pull "bitnami/zookeeper:latest"
+    #- docker pull "bitnami/zookeeper:latest"
     - docker pull "bitnami/kafka:latest"
-    - >
-      docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181
-      --env ALLOW_ANONYMOUS_LOGIN=yes
-      bitnami/zookeeper:latest
-    - sleep 10 # Wait for Zookeeper to start
+    #- >
+    #  docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181
+    #  --env ALLOW_ANONYMOUS_LOGIN=yes
+    #  bitnami/zookeeper:latest
+    #- sleep 10 # Wait for Zookeeper to start
     #- >
     #  docker run --name kafka -d --network=teraflowbridge -p 9092:9092
     #  --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
@@ -87,7 +87,7 @@ unit_test analytics-backend:
       --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
     - sleep 20 # Wait for Kafka to start
-    - docker inspect kafka --format "{{.NetworkSettings.Networks}}
+    - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP    
     - >
@@ -107,7 +107,7 @@ unit_test analytics-backend:
   after_script:
     - docker rm -f ${IMAGE_NAME}-backend
     - docker rm -f kafka
-    - docker rm -f zookeeper
+    #- docker rm -f zookeeper
     - docker network rm teraflowbridge
     - docker volume prune --force
     - docker image prune --force
@@ -141,12 +141,12 @@ unit_test analytics-frontend:
     - if docker container ls | grep crdb; then docker rm -f crdb; else echo "CockroachDB container is not in the system"; fi
     - if docker volume ls | grep crdb; then docker volume rm -f crdb; else echo "CockroachDB volume is not in the system"; fi
     - if docker container ls | grep kafka; then docker rm -f kafka; else echo "Kafka container is not in the system"; fi
-    - if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi
+    #- if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi
     - if docker container ls | grep ${IMAGE_NAME}-frontend; then docker rm -f ${IMAGE_NAME}-frontend; else echo "${IMAGE_NAME}-frontend container is not in the system"; fi
     - docker container prune -f
   script:
     - docker pull "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-frontend:$IMAGE_TAG"
-    - docker pull "bitnami/zookeeper:latest"
+    #- docker pull "bitnami/zookeeper:latest"
     - docker pull "bitnami/kafka:latest"
     - docker pull "cockroachdb/cockroach:latest-v22.2"
     - docker volume create crdb
@@ -161,11 +161,11 @@ unit_test analytics-frontend:
     # - docker ps -a
     - CRDB_ADDRESS=$(docker inspect crdb --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $CRDB_ADDRESS
-    - >
-      docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181
-      --env ALLOW_ANONYMOUS_LOGIN=yes
-      bitnami/zookeeper:latest
-    - sleep 10 # Wait for Zookeeper to start
+    #- >
+    #  docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181
+    #  --env ALLOW_ANONYMOUS_LOGIN=yes
+    #  bitnami/zookeeper:latest
+    #- sleep 10 # Wait for Zookeeper to start
     #- >
     #  docker run --name kafka -d --network=teraflowbridge -p 9092:9092
     #  --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
@@ -181,10 +181,10 @@ unit_test analytics-frontend:
       --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
     - sleep 20 # Wait for Kafka to start
-    - docker inspect kafka --format "{{.NetworkSettings.Networks}}
+    - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP
-    - docker logs zookeeper
+    #- docker logs zookeeper
     - docker logs kafka
     - >
       docker run --name $IMAGE_NAME-frontend -d -p 30050:30050
@@ -204,7 +204,7 @@ unit_test analytics-frontend:
   after_script:
     - docker rm -f ${IMAGE_NAME}-frontend
     - docker rm -f crdb
-    - docker rm -f zookeeper
+    #- docker rm -f zookeeper
     - docker rm -f kafka
     - docker volume rm -f crdb
     - docker volume prune --force
diff --git a/src/kpi_value_api/.gitlab-ci.yml b/src/kpi_value_api/.gitlab-ci.yml
index cbbaab22c..4c7f9f9f6 100644
--- a/src/kpi_value_api/.gitlab-ci.yml
+++ b/src/kpi_value_api/.gitlab-ci.yml
@@ -51,33 +51,45 @@ unit_test kpi-value-api:
     - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create -d bridge teraflowbridge; fi
     - if docker container ls | grep $IMAGE_NAME; then docker rm -f $IMAGE_NAME; else echo "$IMAGE_NAME container is not in the system"; fi
     - if docker container ls | grep kafka; then docker rm -f kafka; else echo "Kafka container is not in the system"; fi
-    - if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi
+    #- if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi
     - docker container prune -f
   script:
     - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
-    - docker pull "bitnami/zookeeper:latest"
+    #- docker pull "bitnami/zookeeper:latest"
     - docker pull "bitnami/kafka:latest"
+    #- >
+    #  docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181
+    #  --env ALLOW_ANONYMOUS_LOGIN=yes
+    #  bitnami/zookeeper:latest
+    #- sleep 10 # Wait for Zookeeper to start
+    #- >
+    #  docker run --name kafka -d --network=teraflowbridge -p 9092:9092
+    #  --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
+    #  --env ALLOW_PLAINTEXT_LISTENER=yes
+    #  bitnami/kafka:latest
     - >
-      docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181
-      --env ALLOW_ANONYMOUS_LOGIN=yes
-      bitnami/zookeeper:latest
-    - sleep 10 # Wait for Zookeeper to start
-    - >
-      docker run --name kafka -d --network=teraflowbridge -p 9092:9092
-      --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
-      --env ALLOW_PLAINTEXT_LISTENER=yes
+      docker run --name kafka -d --network=teraflowbridge -p 9092:9092 -p 9093:9093
+      --env KAFKA_CFG_NODE_ID=1
+      --env KAFKA_CFG_PROCESS_ROLES=controller,broker
+      --env KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
+      --env KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT
+      --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
+      --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
     - sleep 20 # Wait for Kafka to start
+    - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP
-    - > 
+    - >
       docker run --name $IMAGE_NAME -d -p 30020:30020
       --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092"
-      --volume "$PWD/src/$IMAGE_NAME/tests:/opt/results" 
+      --volume "$PWD/src/$IMAGE_NAME/tests:/opt/results"
       --network=teraflowbridge 
       $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG
     - sleep 5
     - docker ps -a
+    #- docker logs zookeeper
+    - docker logs kafka
     - docker logs $IMAGE_NAME
     - >
       docker exec -i $IMAGE_NAME bash -c
@@ -87,7 +99,7 @@ unit_test kpi-value-api:
   after_script:
     - docker rm -f $IMAGE_NAME
     - docker rm -f kafka
-    - docker rm -f zookeeper
+    #- docker rm -f zookeeper
     - docker network rm teraflowbridge
   rules:
     - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
@@ -98,7 +110,6 @@ unit_test kpi-value-api:
       - src/$IMAGE_NAME/**/*.{py,in,yml}
       - src/$IMAGE_NAME/Dockerfile
       - src/$IMAGE_NAME/tests/*.py
-      # - src/$IMAGE_NAME/tests/Dockerfile  # mayne not needed
       - manifests/${IMAGE_NAME}service.yaml
       - .gitlab-ci.yml
   artifacts:
diff --git a/src/kpi_value_writer/.gitlab-ci.yml b/src/kpi_value_writer/.gitlab-ci.yml
index fccf1c986..39c174d75 100644
--- a/src/kpi_value_writer/.gitlab-ci.yml
+++ b/src/kpi_value_writer/.gitlab-ci.yml
@@ -51,23 +51,33 @@ unit_test kpi-value-writer:
     - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create -d bridge teraflowbridge; fi
     - if docker container ls | grep $IMAGE_NAME; then docker rm -f $IMAGE_NAME; else echo "$IMAGE_NAME container is not in the system"; fi
     - if docker container ls | grep kafka; then docker rm -f kafka; else echo "Kafka container is not in the system"; fi
-    - if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi
+    #- if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi
     - docker container prune -f
   script:
     - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
-    - docker pull "bitnami/zookeeper:latest"
+    #- docker pull "bitnami/zookeeper:latest"
     - docker pull "bitnami/kafka:latest"
+    #- >
+    #  docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181
+    #  --env ALLOW_ANONYMOUS_LOGIN=yes
+    #  bitnami/zookeeper:latest
+    #- sleep 10 # Wait for Zookeeper to start
+    #- >
+    #  docker run --name kafka -d --network=teraflowbridge -p 9092:9092
+    #  --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
+    #  --env ALLOW_PLAINTEXT_LISTENER=yes
+    #  bitnami/kafka:latest
     - >
-      docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181
-      --env ALLOW_ANONYMOUS_LOGIN=yes
-      bitnami/zookeeper:latest
-    - sleep 10 # Wait for Zookeeper to start
-    - >
-      docker run --name kafka -d --network=teraflowbridge -p 9092:9092
-      --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
-      --env ALLOW_PLAINTEXT_LISTENER=yes
+      docker run --name kafka -d --network=teraflowbridge -p 9092:9092 -p 9093:9093
+      --env KAFKA_CFG_NODE_ID=1
+      --env KAFKA_CFG_PROCESS_ROLES=controller,broker
+      --env KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
+      --env KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT
+      --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
+      --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
     - sleep 20 # Wait for Kafka to start
+    - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP
     - >
@@ -78,7 +88,7 @@ unit_test kpi-value-writer:
       $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG
     - sleep 5
     - docker ps -a
-    - docker logs zookeeper
+    #- docker logs zookeeper
     - docker logs kafka
     - docker logs $IMAGE_NAME
     - >
@@ -89,7 +99,7 @@ unit_test kpi-value-writer:
   after_script:
     - docker rm -f $IMAGE_NAME
     - docker rm -f kafka
-    - docker rm -f zookeeper
+    #- docker rm -f zookeeper
     - docker network rm teraflowbridge
   rules:
     - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
@@ -100,7 +110,6 @@ unit_test kpi-value-writer:
       - src/$IMAGE_NAME/**/*.{py,in,yml}
       - src/$IMAGE_NAME/Dockerfile
       - src/$IMAGE_NAME/tests/*.py
-      - src/$IMAGE_NAME/tests/Dockerfile
       - manifests/${IMAGE_NAME}service.yaml
       - .gitlab-ci.yml
   artifacts:
diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml
index 4b3ec01ac..f8aa68726 100644
--- a/src/nbi/.gitlab-ci.yml
+++ b/src/nbi/.gitlab-ci.yml
@@ -78,16 +78,16 @@ unit_test nbi:
       --env FLASK_ENV=development
       --env IETF_NETWORK_RENDERER=LIBYANG
       $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG
-    - sleep 5
+    - sleep 30
     - docker ps -a
     - docker logs mock_tfs_nbi_dependencies
     - docker logs $IMAGE_NAME
     - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml"
-    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml"
-    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml"
-    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml"
-    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml"
-    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml"
     - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing"
   coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
   after_script:
@@ -103,7 +103,6 @@ unit_test nbi:
       - src/$IMAGE_NAME/**/*.{py,in,yml}
       - src/$IMAGE_NAME/Dockerfile
       - src/$IMAGE_NAME/tests/*.py
-      - src/$IMAGE_NAME/tests/Dockerfile
       - manifests/${IMAGE_NAME}service.yaml
       - .gitlab-ci.yml
   artifacts:
diff --git a/src/telemetry/.gitlab-ci.yml b/src/telemetry/.gitlab-ci.yml
index 3b362768b..43d729292 100644
--- a/src/telemetry/.gitlab-ci.yml
+++ b/src/telemetry/.gitlab-ci.yml
@@ -59,19 +59,19 @@ unit_test telemetry-backend:
     - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
     - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create -d bridge teraflowbridge; fi
     - if docker container ls | grep kafka; then docker rm -f kafka; else echo "Kafka container is not in the system"; fi
-    - if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi
+    #- if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi
     # - if docker container ls | grep ${IMAGE_NAME}-frontend; then docker rm -f ${IMAGE_NAME}-frontend; else echo "${IMAGE_NAME}-frontend container is not in the system"; fi
     - if docker container ls | grep ${IMAGE_NAME}-backend; then docker rm -f ${IMAGE_NAME}-backend; else echo "${IMAGE_NAME}-backend container is not in the system"; fi
     - docker container prune -f
   script:
     - docker pull "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-backend:$IMAGE_TAG"
-    - docker pull "bitnami/zookeeper:latest"
+    #- docker pull "bitnami/zookeeper:latest"
     - docker pull "bitnami/kafka:latest"
-    - >
-      docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181
-      --env ALLOW_ANONYMOUS_LOGIN=yes
-      bitnami/zookeeper:latest
-    - sleep 10 # Wait for Zookeeper to start
+    #- >
+    #  docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181
+    #  --env ALLOW_ANONYMOUS_LOGIN=yes
+    #  bitnami/zookeeper:latest
+    #- sleep 10 # Wait for Zookeeper to start
     #- >
     #  docker run --name kafka -d --network=teraflowbridge -p 9092:9092
     #  --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
@@ -87,7 +87,7 @@ unit_test telemetry-backend:
       --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
     - sleep 20 # Wait for Kafka to start
-    - docker inspect kafka --format "{{.NetworkSettings.Networks}}
+    - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP    
     - >
@@ -107,7 +107,7 @@ unit_test telemetry-backend:
   after_script:
     - docker rm -f ${IMAGE_NAME}-backend
     - docker rm -f kafka
-    - docker rm -f zookeeper
+    #- docker rm -f zookeeper
     - docker network rm teraflowbridge
     - docker volume prune --force
     - docker image prune --force
@@ -141,12 +141,12 @@ unit_test telemetry-frontend:
     - if docker container ls | grep crdb; then docker rm -f crdb; else echo "CockroachDB container is not in the system"; fi
     - if docker volume ls | grep crdb; then docker volume rm -f crdb; else echo "CockroachDB volume is not in the system"; fi
     - if docker container ls | grep kafka; then docker rm -f kafka; else echo "Kafka container is not in the system"; fi
-    - if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi
+    #- if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi
     - if docker container ls | grep ${IMAGE_NAME}-frontend; then docker rm -f ${IMAGE_NAME}-frontend; else echo "${IMAGE_NAME}-frontend container is not in the system"; fi
     - docker container prune -f
   script:
     - docker pull "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-frontend:$IMAGE_TAG"
-    - docker pull "bitnami/zookeeper:latest"
+    #- docker pull "bitnami/zookeeper:latest"
     - docker pull "bitnami/kafka:latest"
     - docker pull "cockroachdb/cockroach:latest-v22.2"
     - docker volume create crdb
@@ -161,11 +161,11 @@ unit_test telemetry-frontend:
     # - docker ps -a
     - CRDB_ADDRESS=$(docker inspect crdb --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $CRDB_ADDRESS
-    - >
-      docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181
-      --env ALLOW_ANONYMOUS_LOGIN=yes
-      bitnami/zookeeper:latest
-    - sleep 10 # Wait for Zookeeper to start
+    #- >
+    #  docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181
+    #  --env ALLOW_ANONYMOUS_LOGIN=yes
+    #  bitnami/zookeeper:latest
+    #- sleep 10 # Wait for Zookeeper to start
     #- >
     #  docker run --name kafka -d --network=teraflowbridge -p 9092:9092
     #  --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
@@ -181,10 +181,10 @@ unit_test telemetry-frontend:
       --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
     - sleep 20 # Wait for Kafka to start
-    - docker inspect kafka --format "{{.NetworkSettings.Networks}}
+    - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP
-    - docker logs zookeeper
+    #- docker logs zookeeper
     - docker logs kafka
     - >
       docker run --name $IMAGE_NAME-frontend -d -p 30050:30050
@@ -204,7 +204,7 @@ unit_test telemetry-frontend:
   after_script:
     - docker rm -f ${IMAGE_NAME}-frontend
     - docker rm -f crdb
-    - docker rm -f zookeeper
+    #- docker rm -f zookeeper
     - docker rm -f kafka
     - docker volume rm -f crdb
     - docker volume prune --force
-- 
GitLab


From 26958fe067bc6b8a5c1f74bac8244c1f4229129b Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Tue, 22 Apr 2025 09:29:31 +0000
Subject: [PATCH 401/463] Fix GitLab CI/CD pipeline

---
 src/analytics/frontend/requirements.in |  2 +-
 src/automation/requirements.in         |  2 +-
 src/kpi_value_api/requirements.in      |  4 ++--
 src/nbi/.gitlab-ci.yml                 | 21 +++++++++++++++++++++
 4 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/src/analytics/frontend/requirements.in b/src/analytics/frontend/requirements.in
index 6363d8a97..5e8904d71 100644
--- a/src/analytics/frontend/requirements.in
+++ b/src/analytics/frontend/requirements.in
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apscheduler==3.10.1
+apscheduler>=3.10.4
 confluent-kafka==2.3.*
 psycopg2-binary==2.9.*
 SQLAlchemy==1.4.*
diff --git a/src/automation/requirements.in b/src/automation/requirements.in
index 0f291eca8..5e8904d71 100644
--- a/src/automation/requirements.in
+++ b/src/automation/requirements.in
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apscheduler==3.10.4
+apscheduler>=3.10.4
 confluent-kafka==2.3.*
 psycopg2-binary==2.9.*
 SQLAlchemy==1.4.*
diff --git a/src/kpi_value_api/requirements.in b/src/kpi_value_api/requirements.in
index 6addbfdfd..ab6bc5a0a 100644
--- a/src/kpi_value_api/requirements.in
+++ b/src/kpi_value_api/requirements.in
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+apscheduler>=3.10.4
 confluent-kafka==2.3.*
-requests==2.27.*
 prometheus-api-client==0.5.3
-apscheduler==3.10.1
+requests==2.27.*
diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml
index f8aa68726..141d87c26 100644
--- a/src/nbi/.gitlab-ci.yml
+++ b/src/nbi/.gitlab-ci.yml
@@ -61,9 +61,25 @@ unit_test nbi:
       else
         echo "$IMAGE_NAME image is not in the system";
       fi
+    - if docker container ls | grep kafka; then docker rm -f kafka; else echo "Kafka container is not in the system"; fi
+    - docker container prune -f
   script:
     - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
     - docker pull "$CI_REGISTRY_IMAGE/mock_tfs_nbi_dependencies:test"
+    - docker pull "bitnami/kafka:latest"
+    - >
+      docker run --name kafka -d --network=teraflowbridge -p 9092:9092 -p 9093:9093
+      --env KAFKA_CFG_NODE_ID=1
+      --env KAFKA_CFG_PROCESS_ROLES=controller,broker
+      --env KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
+      --env KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT
+      --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
+      --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
+      bitnami/kafka:latest
+    - sleep 20 # Wait for Kafka to start
+    - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
+    - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
+    - echo $KAFKA_IP
     - >
       docker run --name mock_tfs_nbi_dependencies -d -p 10000:10000
       --network=teraflowbridge
@@ -77,9 +93,11 @@ unit_test nbi:
       --env LOG_LEVEL=DEBUG
       --env FLASK_ENV=development
       --env IETF_NETWORK_RENDERER=LIBYANG
+      --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092"
       $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG
     - sleep 30
     - docker ps -a
+    - docker logs kafka
     - docker logs mock_tfs_nbi_dependencies
     - docker logs $IMAGE_NAME
     - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml"
@@ -92,7 +110,10 @@ unit_test nbi:
   coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
   after_script:
     - docker logs mock_tfs_nbi_dependencies
+    - docker logs $IMAGE_NAME
+    - docker logs kafka
     - docker rm -f mock_tfs_nbi_dependencies $IMAGE_NAME
+    - docker rm -f kafka
     - docker network rm teraflowbridge
   rules:
     - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
-- 
GitLab


From 26b6c5e84d655a627e84c282500c22498fe8ab50 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Tue, 22 Apr 2025 09:49:51 +0000
Subject: [PATCH 402/463] Fix GitLab CI/CD pipeline

---
 src/analytics/.gitlab-ci.yml                  | 6 ++++--
 src/analytics/frontend/tests/test_frontend.py | 2 +-
 src/kpi_value_api/.gitlab-ci.yml              | 3 ++-
 src/kpi_value_writer/.gitlab-ci.yml           | 3 ++-
 src/nbi/.gitlab-ci.yml                        | 3 ++-
 src/telemetry/.gitlab-ci.yml                  | 6 ++++--
 src/telemetry/frontend/tests/test_frontend.py | 2 +-
 7 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/src/analytics/.gitlab-ci.yml b/src/analytics/.gitlab-ci.yml
index 79e6fb23d..496d86867 100644
--- a/src/analytics/.gitlab-ci.yml
+++ b/src/analytics/.gitlab-ci.yml
@@ -86,7 +86,8 @@ unit_test analytics-backend:
       --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
       --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
-    - sleep 20 # Wait for Kafka to start
+    - while ! docker logs kafka 2>&1 | grep -q 'Kafka Server started'; do sleep 1; done
+    - sleep 5 # Give extra time to Kafka to get stabilized
     - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP    
@@ -180,7 +181,8 @@ unit_test analytics-frontend:
       --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
       --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
-    - sleep 20 # Wait for Kafka to start
+    - while ! docker logs kafka 2>&1 | grep -q 'Kafka Server started'; do sleep 1; done
+    - sleep 5 # Give extra time to Kafka to get stabilized
     - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP
diff --git a/src/analytics/frontend/tests/test_frontend.py b/src/analytics/frontend/tests/test_frontend.py
index 7d8a08d3a..526fa3c60 100644
--- a/src/analytics/frontend/tests/test_frontend.py
+++ b/src/analytics/frontend/tests/test_frontend.py
@@ -41,7 +41,7 @@ from apscheduler.triggers.interval                       import IntervalTrigger
 
 LOCAL_HOST = '127.0.0.1'
 
-ANALYTICS_FRONTEND_PORT = str(get_service_port_grpc(ServiceNameEnum.ANALYTICS))
+ANALYTICS_FRONTEND_PORT = 10000 + int(get_service_port_grpc(ServiceNameEnum.ANALYTICS))
 os.environ[get_env_var_name(ServiceNameEnum.ANALYTICS, ENVVAR_SUFIX_SERVICE_HOST     )] = str(LOCAL_HOST)
 os.environ[get_env_var_name(ServiceNameEnum.ANALYTICS, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(ANALYTICS_FRONTEND_PORT)
 
diff --git a/src/kpi_value_api/.gitlab-ci.yml b/src/kpi_value_api/.gitlab-ci.yml
index 4c7f9f9f6..55d6c3504 100644
--- a/src/kpi_value_api/.gitlab-ci.yml
+++ b/src/kpi_value_api/.gitlab-ci.yml
@@ -76,7 +76,8 @@ unit_test kpi-value-api:
       --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
       --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
-    - sleep 20 # Wait for Kafka to start
+    - while ! docker logs kafka 2>&1 | grep -q 'Kafka Server started'; do sleep 1; done
+    - sleep 5 # Give extra time to Kafka to get stabilized
     - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP
diff --git a/src/kpi_value_writer/.gitlab-ci.yml b/src/kpi_value_writer/.gitlab-ci.yml
index 39c174d75..4393bf556 100644
--- a/src/kpi_value_writer/.gitlab-ci.yml
+++ b/src/kpi_value_writer/.gitlab-ci.yml
@@ -76,7 +76,8 @@ unit_test kpi-value-writer:
       --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
       --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
-    - sleep 20 # Wait for Kafka to start
+    - while ! docker logs kafka 2>&1 | grep -q 'Kafka Server started'; do sleep 1; done
+    - sleep 5 # Give extra time to Kafka to get stabilized
     - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP
diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml
index 141d87c26..0edeac5e1 100644
--- a/src/nbi/.gitlab-ci.yml
+++ b/src/nbi/.gitlab-ci.yml
@@ -76,7 +76,8 @@ unit_test nbi:
       --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
       --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
-    - sleep 20 # Wait for Kafka to start
+    - while ! docker logs kafka 2>&1 | grep -q 'Kafka Server started'; do sleep 1; done
+    - sleep 5 # Give extra time to Kafka to get stabilized
     - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP
diff --git a/src/telemetry/.gitlab-ci.yml b/src/telemetry/.gitlab-ci.yml
index 43d729292..35a5a005e 100644
--- a/src/telemetry/.gitlab-ci.yml
+++ b/src/telemetry/.gitlab-ci.yml
@@ -86,7 +86,8 @@ unit_test telemetry-backend:
       --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
       --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
-    - sleep 20 # Wait for Kafka to start
+    - while ! docker logs kafka 2>&1 | grep -q 'Kafka Server started'; do sleep 1; done
+    - sleep 5 # Give extra time to Kafka to get stabilized
     - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP    
@@ -180,7 +181,8 @@ unit_test telemetry-frontend:
       --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
       --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
       bitnami/kafka:latest
-    - sleep 20 # Wait for Kafka to start
+    - while ! docker logs kafka 2>&1 | grep -q 'Kafka Server started'; do sleep 1; done
+    - sleep 5 # Give extra time to Kafka to get stabilized
     - docker inspect kafka --format "{{.NetworkSettings.Networks}}"
     - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
     - echo $KAFKA_IP
diff --git a/src/telemetry/frontend/tests/test_frontend.py b/src/telemetry/frontend/tests/test_frontend.py
index 767a1f73f..0e5e7d47f 100644
--- a/src/telemetry/frontend/tests/test_frontend.py
+++ b/src/telemetry/frontend/tests/test_frontend.py
@@ -37,7 +37,7 @@ from telemetry.frontend.service.TelemetryFrontendServiceServicerImpl import Tele
 
 LOCAL_HOST = '127.0.0.1'
 
-TELEMETRY_FRONTEND_PORT = str(get_service_port_grpc(ServiceNameEnum.TELEMETRY))
+TELEMETRY_FRONTEND_PORT = 10000 + int(get_service_port_grpc(ServiceNameEnum.TELEMETRY))
 os.environ[get_env_var_name(ServiceNameEnum.TELEMETRY, ENVVAR_SUFIX_SERVICE_HOST     )] = str(LOCAL_HOST)
 os.environ[get_env_var_name(ServiceNameEnum.TELEMETRY, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(TELEMETRY_FRONTEND_PORT)
 
-- 
GitLab


From 13eccfac140ece41cb4c9a7a778ca104e9a68e81 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Tue, 22 Apr 2025 10:02:54 +0000
Subject: [PATCH 403/463] Fix GitLab CI/CD pipeline

---
 src/telemetry/backend/Dockerfile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/telemetry/backend/Dockerfile b/src/telemetry/backend/Dockerfile
index df23aabab..14870bbaf 100644
--- a/src/telemetry/backend/Dockerfile
+++ b/src/telemetry/backend/Dockerfile
@@ -72,6 +72,8 @@ COPY src/service/__init__.py service/__init__.py
 COPY src/service/client/. service/client/
 COPY src/slice/__init__.py slice/__init__.py
 COPY src/slice/client/. slice/client/
+COPY src/vnt_manager/__init__.py vnt_manager/__init__.py
+COPY src/vnt_manager/client/. vnt_manager/client/
 COPY src/telemetry/__init__.py telemetry/__init__.py
 COPY src/telemetry/backend/. telemetry/backend/
 
-- 
GitLab


From 74e65dc3fd232f286db2d53d54039fa38e2b51ad Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Tue, 22 Apr 2025 16:14:50 +0000
Subject: [PATCH 404/463] Fix GitLab CI/CD pipeline

---
 src/nbi/requirements.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/nbi/requirements.in b/src/nbi/requirements.in
index e21aee4f6..9ebb937a3 100644
--- a/src/nbi/requirements.in
+++ b/src/nbi/requirements.in
@@ -32,6 +32,7 @@ pyang==2.6.0
 git+https://github.com/robshakir/pyangbind.git
 pydantic==2.6.3
 python-socketio==5.12.1
-requests==2.27.1
+requests==2.27.*
 werkzeug==2.3.7
 #websockets==12.0
+websocket-client==1.8.0     # used by socketio to upgrate to websocket
-- 
GitLab


From cab37076d14f65b754d39357499f320e7cd60a3c Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Tue, 22 Apr 2025 16:28:18 +0000
Subject: [PATCH 405/463] Fix GitLab CI/CD pipeline

---
 src/nbi/.gitlab-ci.yml                      | 3 ++-
 src/telemetry/backend/tests/test_backend.py | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml
index 0edeac5e1..12c2c010c 100644
--- a/src/nbi/.gitlab-ci.yml
+++ b/src/nbi/.gitlab-ci.yml
@@ -96,7 +96,8 @@ unit_test nbi:
       --env IETF_NETWORK_RENDERER=LIBYANG
       --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092"
       $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG
-    - sleep 30
+    - while ! docker logs $IMAGE_NAME 2>&1 | grep -q 'Initialization completed'; do sleep 1; done
+    - sleep 5 # Give extra time to NBI to get ready
     - docker ps -a
     - docker logs kafka
     - docker logs mock_tfs_nbi_dependencies
diff --git a/src/telemetry/backend/tests/test_backend.py b/src/telemetry/backend/tests/test_backend.py
index 1329aa969..1ada9cbe2 100644
--- a/src/telemetry/backend/tests/test_backend.py
+++ b/src/telemetry/backend/tests/test_backend.py
@@ -23,7 +23,7 @@ from common.tools.context_queries.Topology import get_topology
 from common.Constants import DEFAULT_CONTEXT_NAME
 from common.tools.context_queries.Device import get_device, add_device_to_topology
 # from common.tools.context_queries.EndPoint import get_endpoint_names
-from .EndPoint import get_endpoint_names        # modofied version of get_endpoint_names
+#from .EndPoint import get_endpoint_names        # modofied version of get_endpoint_names
 from common.proto.context_pb2 import EndPointId, DeviceId, TopologyId, ContextId , Empty
 from common.proto.kpi_manager_pb2 import KpiId
 
-- 
GitLab


From 1ddadc4cae584c9bdce17859e9b54e68075bd839 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Tue, 22 Apr 2025 17:28:33 +0000
Subject: [PATCH 406/463] Fix GitLab CI/CD pipeline

---
 src/analytics/frontend/requirements.in | 2 +-
 src/automation/requirements.in         | 2 +-
 src/bgpls_speaker/requirements.in      | 2 +-
 src/device/requirements.in             | 2 +-
 src/kpi_value_api/requirements.in      | 2 +-
 src/load_generator/requirements.in     | 2 +-
 src/monitoring/requirements.in         | 2 +-
 src/telemetry/backend/requirements.in  | 2 +-
 src/telemetry/requirements.in          | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/analytics/frontend/requirements.in b/src/analytics/frontend/requirements.in
index 5e8904d71..4d403781a 100644
--- a/src/analytics/frontend/requirements.in
+++ b/src/analytics/frontend/requirements.in
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apscheduler>=3.10.4
+APScheduler>=3.10.4
 confluent-kafka==2.3.*
 psycopg2-binary==2.9.*
 SQLAlchemy==1.4.*
diff --git a/src/automation/requirements.in b/src/automation/requirements.in
index 5e8904d71..4d403781a 100644
--- a/src/automation/requirements.in
+++ b/src/automation/requirements.in
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apscheduler>=3.10.4
+APScheduler>=3.10.4
 confluent-kafka==2.3.*
 psycopg2-binary==2.9.*
 SQLAlchemy==1.4.*
diff --git a/src/bgpls_speaker/requirements.in b/src/bgpls_speaker/requirements.in
index 5fbf034d5..a0a49002f 100644
--- a/src/bgpls_speaker/requirements.in
+++ b/src/bgpls_speaker/requirements.in
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 anytree==2.8.0
-APScheduler==3.8.1
+APScheduler>=3.10.4
 ncclient==0.6.13
 python-json-logger==2.0.2
 lxml==4.9.1
diff --git a/src/device/requirements.in b/src/device/requirements.in
index ca2cdea47..7c57b4398 100644
--- a/src/device/requirements.in
+++ b/src/device/requirements.in
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 anytree==2.8.0
-APScheduler==3.10.1
+APScheduler>=3.10.4
 bitarray==2.8.*
 cryptography==36.0.2
 deepdiff==6.7.*
diff --git a/src/kpi_value_api/requirements.in b/src/kpi_value_api/requirements.in
index ab6bc5a0a..b4b105d9f 100644
--- a/src/kpi_value_api/requirements.in
+++ b/src/kpi_value_api/requirements.in
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apscheduler>=3.10.4
+APScheduler>=3.10.4
 confluent-kafka==2.3.*
 prometheus-api-client==0.5.3
 requests==2.27.*
diff --git a/src/load_generator/requirements.in b/src/load_generator/requirements.in
index c7552cd3b..d74621fb5 100644
--- a/src/load_generator/requirements.in
+++ b/src/load_generator/requirements.in
@@ -12,4 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-APScheduler==3.10.1
+APScheduler>=3.10.4
diff --git a/src/monitoring/requirements.in b/src/monitoring/requirements.in
index b888a579f..326b20ff5 100644
--- a/src/monitoring/requirements.in
+++ b/src/monitoring/requirements.in
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 anytree==2.8.0
-APScheduler==3.10.1
+APScheduler>=3.10.4
 #fastcache==1.1.0
 #google-api-core
 #opencensus[stackdriver]
diff --git a/src/telemetry/backend/requirements.in b/src/telemetry/backend/requirements.in
index 2843bdbf6..e7ca6546c 100644
--- a/src/telemetry/backend/requirements.in
+++ b/src/telemetry/backend/requirements.in
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 anytree==2.8.0
+APScheduler>=3.10.4
 confluent-kafka==2.3.*
 numpy==2.0.1
-APScheduler==3.10.1
diff --git a/src/telemetry/requirements.in b/src/telemetry/requirements.in
index 36ba1ca04..1b329093d 100644
--- a/src/telemetry/requirements.in
+++ b/src/telemetry/requirements.in
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-APScheduler==3.10.1
+APScheduler>=3.10.4
 psycopg2-binary==2.9.3
 python-dateutil==2.8.2
 python-json-logger==2.0.2
-- 
GitLab


From a8616fdef78fd6bc54a38673ed6df1fe522d8bf3 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Tue, 22 Apr 2025 17:31:24 +0000
Subject: [PATCH 407/463] Fix GitLab CI/CD pipeline

---
 src/nbi/.gitlab-ci.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml
index 12c2c010c..dd50983de 100644
--- a/src/nbi/.gitlab-ci.yml
+++ b/src/nbi/.gitlab-ci.yml
@@ -96,7 +96,12 @@ unit_test nbi:
       --env IETF_NETWORK_RENDERER=LIBYANG
       --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092"
       $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG
-    - while ! docker logs $IMAGE_NAME 2>&1 | grep -q 'Initialization completed'; do sleep 1; done
+    - >
+      while ! docker logs $IMAGE_NAME 2>&1 | grep -q 'Initialization completed'; do
+        echo "NBI log, last 20 lines:"
+        docker logs $IMAGE_NAME | tail -n 20
+        sleep 10;
+      done
     - sleep 5 # Give extra time to NBI to get ready
     - docker ps -a
     - docker logs kafka
-- 
GitLab


From c6d4374e6403c825a11aefe121265dfcb477e504 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Tue, 22 Apr 2025 17:50:44 +0000
Subject: [PATCH 408/463] Fix GitLab CI/CD pipeline

---
 src/common/tools/kafka/Variables.py   | 2 +-
 src/kpi_value_api/.gitlab-ci.yml      | 1 +
 src/kpi_value_writer/.gitlab-ci.yml   | 1 +
 src/monitoring/requirements.in        | 2 +-
 src/telemetry/backend/requirements.in | 1 +
 src/telemetry/requirements.in         | 2 +-
 6 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/common/tools/kafka/Variables.py b/src/common/tools/kafka/Variables.py
index 515a43f16..4537c3e0d 100644
--- a/src/common/tools/kafka/Variables.py
+++ b/src/common/tools/kafka/Variables.py
@@ -82,7 +82,7 @@ class KafkaTopic(Enum):
             LOGGER.debug('All topics already existed.')
             return True
 
-        create_topic_future_map = kafka_admin_client.create_topics(missing_topics)
+        create_topic_future_map = kafka_admin_client.create_topics(missing_topics, request_timeout=5*60)
         LOGGER.debug('create_topic_future_map: {:s}'.format(str(create_topic_future_map)))
         failed_topic_creations = set()
         for topic, future in create_topic_future_map.items():
diff --git a/src/kpi_value_api/.gitlab-ci.yml b/src/kpi_value_api/.gitlab-ci.yml
index 55d6c3504..fa27ccc4b 100644
--- a/src/kpi_value_api/.gitlab-ci.yml
+++ b/src/kpi_value_api/.gitlab-ci.yml
@@ -98,6 +98,7 @@ unit_test kpi-value-api:
     - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing"
   coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
   after_script:
+    - docker ps -a
     - docker rm -f $IMAGE_NAME
     - docker rm -f kafka
     #- docker rm -f zookeeper
diff --git a/src/kpi_value_writer/.gitlab-ci.yml b/src/kpi_value_writer/.gitlab-ci.yml
index 4393bf556..e4aec2aa8 100644
--- a/src/kpi_value_writer/.gitlab-ci.yml
+++ b/src/kpi_value_writer/.gitlab-ci.yml
@@ -98,6 +98,7 @@ unit_test kpi-value-writer:
     - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing"
   coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
   after_script:
+    - docker ps -a
     - docker rm -f $IMAGE_NAME
     - docker rm -f kafka
     #- docker rm -f zookeeper
diff --git a/src/monitoring/requirements.in b/src/monitoring/requirements.in
index 326b20ff5..aebbb2684 100644
--- a/src/monitoring/requirements.in
+++ b/src/monitoring/requirements.in
@@ -26,7 +26,7 @@ numpy<2.0.0
 influx-line-protocol==0.1.4
 python-dateutil==2.8.2
 python-json-logger==2.0.2
-#pytz==2021.3
+pytz
 #redis==4.1.2
 requests==2.27.1
 xmltodict==0.12.0
diff --git a/src/telemetry/backend/requirements.in b/src/telemetry/backend/requirements.in
index e7ca6546c..828cd0330 100644
--- a/src/telemetry/backend/requirements.in
+++ b/src/telemetry/backend/requirements.in
@@ -16,3 +16,4 @@ anytree==2.8.0
 APScheduler>=3.10.4
 confluent-kafka==2.3.*
 numpy==2.0.1
+pytz>=2025.2
diff --git a/src/telemetry/requirements.in b/src/telemetry/requirements.in
index 1b329093d..95ba72010 100644
--- a/src/telemetry/requirements.in
+++ b/src/telemetry/requirements.in
@@ -16,5 +16,5 @@ APScheduler>=3.10.4
 psycopg2-binary==2.9.3
 python-dateutil==2.8.2
 python-json-logger==2.0.2
-pytz==2024.1
+pytz>=2025.2
 requests==2.27.1
-- 
GitLab


From 79d3859bd5e8542c7ceaefc5488f97e71fa71367 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Tue, 22 Apr 2025 18:12:20 +0000
Subject: [PATCH 409/463] Fix GitLab CI/CD pipeline

---
 src/nbi/.gitlab-ci.yml                       | 15 ++++++++-------
 src/telemetry/backend/tests/test_emulated.py |  2 +-
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml
index dd50983de..67568d7fb 100644
--- a/src/nbi/.gitlab-ci.yml
+++ b/src/nbi/.gitlab-ci.yml
@@ -96,13 +96,14 @@ unit_test nbi:
       --env IETF_NETWORK_RENDERER=LIBYANG
       --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092"
       $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG
-    - >
-      while ! docker logs $IMAGE_NAME 2>&1 | grep -q 'Initialization completed'; do
-        echo "NBI log, last 20 lines:"
-        docker logs $IMAGE_NAME | tail -n 20
-        sleep 10;
-      done
-    - sleep 5 # Give extra time to NBI to get ready
+    #- >
+    #  while ! docker logs $IMAGE_NAME 2>&1 | grep -q 'Initialization completed'; do
+    #    echo "NBI log, last 20 lines:"
+    #    docker logs $IMAGE_NAME | tail -n 20
+    #    sleep 10;
+    #  done
+    #- sleep 5 # Give extra time to NBI to get ready
+    - sleep 10*60
     - docker ps -a
     - docker logs kafka
     - docker logs mock_tfs_nbi_dependencies
diff --git a/src/telemetry/backend/tests/test_emulated.py b/src/telemetry/backend/tests/test_emulated.py
index feb5b1f7f..68d6941fd 100644
--- a/src/telemetry/backend/tests/test_emulated.py
+++ b/src/telemetry/backend/tests/test_emulated.py
@@ -35,7 +35,7 @@ def setup_collector():
 def connected_configured_collector(setup_collector):
     collector = setup_collector # EmulatedCollector(address="127.0.0.1", port=8080)
     collector.Connect()
-    collector.SetConfig(create_test_configuration())
+    #collector.SetConfig(create_test_configuration())   # method not implemented
     yield collector
     collector.Disconnect()
 
-- 
GitLab


From 4337c35c3b383df4ec6cfc97ed61316963fdba2a Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Tue, 22 Apr 2025 18:49:54 +0000
Subject: [PATCH 410/463] Fix GitLab CI/CD pipeline

---
 src/nbi/.gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml
index 67568d7fb..46fe30601 100644
--- a/src/nbi/.gitlab-ci.yml
+++ b/src/nbi/.gitlab-ci.yml
@@ -103,7 +103,7 @@ unit_test nbi:
     #    sleep 10;
     #  done
     #- sleep 5 # Give extra time to NBI to get ready
-    - sleep 10*60
+    - sleep 600
     - docker ps -a
     - docker logs kafka
     - docker logs mock_tfs_nbi_dependencies
-- 
GitLab


From 900a3749ec167ad34b99b551666dcb0a7d312c5f Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 23 Apr 2025 07:02:27 +0000
Subject: [PATCH 411/463] GitLab CI/CD pipeline:

- Disabled tests but NBI to focus fixing
- Enabled NBI CI/CD to destroy all docker containers before running the test
---
 .gitlab-ci.yml         | 70 +++++++++++++++++++++---------------------
 src/nbi/.gitlab-ci.yml |  8 ++++-
 2 files changed, 42 insertions(+), 36 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2fe405733..9be1647b6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,39 +21,39 @@ stages:
 
 # include the individual .gitlab-ci.yml of each micro-service and tests
 include:
-  #- local: '/manifests/.gitlab-ci.yml'
-  - local: '/src/monitoring/.gitlab-ci.yml'
+#  #- local: '/manifests/.gitlab-ci.yml'
+#  - local: '/src/monitoring/.gitlab-ci.yml'
   - local: '/src/nbi/.gitlab-ci.yml'
-  - local: '/src/context/.gitlab-ci.yml'
-  - local: '/src/device/.gitlab-ci.yml'
-  - local: '/src/service/.gitlab-ci.yml'
-  - local: '/src/dbscanserving/.gitlab-ci.yml'
-  - local: '/src/opticalattackmitigator/.gitlab-ci.yml'
-  - local: '/src/opticalattackdetector/.gitlab-ci.yml'
-  - local: '/src/opticalattackmanager/.gitlab-ci.yml'
-  - local: '/src/opticalcontroller/.gitlab-ci.yml'
-  - local: '/src/ztp/.gitlab-ci.yml'
-  - local: '/src/policy/.gitlab-ci.yml'
-  - local: '/src/automation/.gitlab-ci.yml'
-  - local: '/src/forecaster/.gitlab-ci.yml'
-  #- local: '/src/webui/.gitlab-ci.yml'
-  #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml'
-  #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml'
-  #- local: '/src/l3_attackmitigator/.gitlab-ci.yml'
-  - local: '/src/slice/.gitlab-ci.yml'
-  #- local: '/src/interdomain/.gitlab-ci.yml'
-  - local: '/src/pathcomp/.gitlab-ci.yml'
-  #- local: '/src/dlt/.gitlab-ci.yml'
-  - local: '/src/load_generator/.gitlab-ci.yml'
-  - local: '/src/bgpls_speaker/.gitlab-ci.yml'
-  - local: '/src/kpi_manager/.gitlab-ci.yml'
-  - local: '/src/kpi_value_api/.gitlab-ci.yml'
-  - local: '/src/kpi_value_writer/.gitlab-ci.yml'
-  - local: '/src/telemetry/.gitlab-ci.yml'
-  - local: '/src/analytics/.gitlab-ci.yml'
-  - local: '/src/qos_profile/.gitlab-ci.yml'
-  - local: '/src/vnt_manager/.gitlab-ci.yml'
-  - local: '/src/e2e_orchestrator/.gitlab-ci.yml'
-
-  # This should be last one: end-to-end integration tests
-  - local: '/src/tests/.gitlab-ci.yml'
+#  - local: '/src/context/.gitlab-ci.yml'
+#  - local: '/src/device/.gitlab-ci.yml'
+#  - local: '/src/service/.gitlab-ci.yml'
+#  - local: '/src/dbscanserving/.gitlab-ci.yml'
+#  - local: '/src/opticalattackmitigator/.gitlab-ci.yml'
+#  - local: '/src/opticalattackdetector/.gitlab-ci.yml'
+#  - local: '/src/opticalattackmanager/.gitlab-ci.yml'
+#  - local: '/src/opticalcontroller/.gitlab-ci.yml'
+#  - local: '/src/ztp/.gitlab-ci.yml'
+#  - local: '/src/policy/.gitlab-ci.yml'
+#  - local: '/src/automation/.gitlab-ci.yml'
+#  - local: '/src/forecaster/.gitlab-ci.yml'
+#  #- local: '/src/webui/.gitlab-ci.yml'
+#  #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml'
+#  #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml'
+#  #- local: '/src/l3_attackmitigator/.gitlab-ci.yml'
+#  - local: '/src/slice/.gitlab-ci.yml'
+#  #- local: '/src/interdomain/.gitlab-ci.yml'
+#  - local: '/src/pathcomp/.gitlab-ci.yml'
+#  #- local: '/src/dlt/.gitlab-ci.yml'
+#  - local: '/src/load_generator/.gitlab-ci.yml'
+#  - local: '/src/bgpls_speaker/.gitlab-ci.yml'
+#  - local: '/src/kpi_manager/.gitlab-ci.yml'
+#  - local: '/src/kpi_value_api/.gitlab-ci.yml'
+#  - local: '/src/kpi_value_writer/.gitlab-ci.yml'
+#  - local: '/src/telemetry/.gitlab-ci.yml'
+#  - local: '/src/analytics/.gitlab-ci.yml'
+#  - local: '/src/qos_profile/.gitlab-ci.yml'
+#  - local: '/src/vnt_manager/.gitlab-ci.yml'
+#  - local: '/src/e2e_orchestrator/.gitlab-ci.yml'
+#
+#  # This should be last one: end-to-end integration tests
+#  - local: '/src/tests/.gitlab-ci.yml'
diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml
index 46fe30601..41a1e4c2e 100644
--- a/src/nbi/.gitlab-ci.yml
+++ b/src/nbi/.gitlab-ci.yml
@@ -49,6 +49,7 @@ unit_test nbi:
     - build mock_tfs_nbi_dependencies
   before_script:
     - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
+    - docker ps -aq | xargs -r docker rm -f
     - >
       if docker network list | grep teraflowbridge; then
         echo "teraflowbridge is already created";
@@ -61,7 +62,12 @@ unit_test nbi:
       else
         echo "$IMAGE_NAME image is not in the system";
       fi
-    - if docker container ls | grep kafka; then docker rm -f kafka; else echo "Kafka container is not in the system"; fi
+    - >
+      if docker container ls | grep kafka; then
+        docker rm -f kafka;
+      else
+        echo "Kafka container is not in the system";
+      fi
     - docker container prune -f
   script:
     - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
-- 
GitLab


From 97ded09166047800206a0aa2fde88bd56411148d Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 23 Apr 2025 07:05:56 +0000
Subject: [PATCH 412/463] Fix GitLab CI/CD pipeline

---
 .gitlab-ci.yml           |  6 +++---
 src/tests/.gitlab-ci.yml | 20 ++++++++++----------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9be1647b6..c0ee11e13 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -54,6 +54,6 @@ include:
 #  - local: '/src/qos_profile/.gitlab-ci.yml'
 #  - local: '/src/vnt_manager/.gitlab-ci.yml'
 #  - local: '/src/e2e_orchestrator/.gitlab-ci.yml'
-#
-#  # This should be last one: end-to-end integration tests
-#  - local: '/src/tests/.gitlab-ci.yml'
+
+  # This should be last one: end-to-end integration tests
+  - local: '/src/tests/.gitlab-ci.yml'
diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml
index 787b25ee1..61a48c05b 100644
--- a/src/tests/.gitlab-ci.yml
+++ b/src/tests/.gitlab-ci.yml
@@ -14,15 +14,15 @@
 
 # include the individual .gitlab-ci.yml of each end-to-end integration test
 include:
-  - local: '/src/tests/ofc22/.gitlab-ci.yml'
-  #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml'
-  - local: '/src/tests/ecoc22/.gitlab-ci.yml'
-  #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml'
-  #- local: '/src/tests/ofc23/.gitlab-ci.yml'
-  - local: '/src/tests/ofc24/.gitlab-ci.yml'
-  - local: '/src/tests/eucnc24/.gitlab-ci.yml'
-  - local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml'
-  - local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml'
-  #- local: '/src/tests/ofc25/.gitlab-ci.yml'
+#  - local: '/src/tests/ofc22/.gitlab-ci.yml'
+#  #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml'
+#  - local: '/src/tests/ecoc22/.gitlab-ci.yml'
+#  #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml'
+#  #- local: '/src/tests/ofc23/.gitlab-ci.yml'
+#  - local: '/src/tests/ofc24/.gitlab-ci.yml'
+#  - local: '/src/tests/eucnc24/.gitlab-ci.yml'
+#  - local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml'
+#  - local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml'
+#  #- local: '/src/tests/ofc25/.gitlab-ci.yml'
 
   - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml'
-- 
GitLab


From 31679c7e2969a5824d23af18098678b819cf0b36 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 23 Apr 2025 14:15:54 +0000
Subject: [PATCH 413/463] Common - Kafka tools:

- Migrate from confluent kafka to kafka python for generic code as confluent kafka is written in C and imposes particular restrictions, see NBI README.
---
 src/analytics/backend/requirements.in  |  3 +-
 src/analytics/frontend/requirements.in |  1 +
 src/analytics/requirements.in          |  1 +
 src/automation/requirements.in         |  1 +
 src/common/tools/kafka/Variables.py    | 67 +++++++++++++++++---------
 src/kpi_value_api/requirements.in      |  1 +
 src/kpi_value_writer/requirements.in   |  1 +
 src/nbi/requirements.in                |  3 +-
 src/telemetry/backend/requirements.in  |  1 +
 src/telemetry/frontend/requirements.in |  1 +
 src/vnt_manager/requirements.in        |  2 +-
 11 files changed, 54 insertions(+), 28 deletions(-)

diff --git a/src/analytics/backend/requirements.in b/src/analytics/backend/requirements.in
index be6197173..93db082b9 100644
--- a/src/analytics/backend/requirements.in
+++ b/src/analytics/backend/requirements.in
@@ -12,7 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+confluent-kafka==2.3.*
 dask==2024.1.0
 distributed==2024.1.0
+kafka-python==2.0.6
 pandas==2.2.3
-confluent-kafka==2.3.*
diff --git a/src/analytics/frontend/requirements.in b/src/analytics/frontend/requirements.in
index 4d403781a..eeaeebe43 100644
--- a/src/analytics/frontend/requirements.in
+++ b/src/analytics/frontend/requirements.in
@@ -15,6 +15,7 @@
 APScheduler>=3.10.4
 confluent-kafka==2.3.*
 psycopg2-binary==2.9.*
+kafka-python==2.0.6
 SQLAlchemy==1.4.*
 sqlalchemy-cockroachdb==1.4.*
 SQLAlchemy-Utils==0.38.*
diff --git a/src/analytics/requirements.in b/src/analytics/requirements.in
index 5ca81a10f..413084a9f 100644
--- a/src/analytics/requirements.in
+++ b/src/analytics/requirements.in
@@ -14,6 +14,7 @@
 
 confluent-kafka==2.3.*
 psycopg2-binary==2.9.*
+kafka-python==2.0.6
 SQLAlchemy==1.4.*
 sqlalchemy-cockroachdb==1.4.*
 SQLAlchemy-Utils==0.38.*
diff --git a/src/automation/requirements.in b/src/automation/requirements.in
index 4d403781a..eeaeebe43 100644
--- a/src/automation/requirements.in
+++ b/src/automation/requirements.in
@@ -15,6 +15,7 @@
 APScheduler>=3.10.4
 confluent-kafka==2.3.*
 psycopg2-binary==2.9.*
+kafka-python==2.0.6
 SQLAlchemy==1.4.*
 sqlalchemy-cockroachdb==1.4.*
 SQLAlchemy-Utils==0.38.*
diff --git a/src/common/tools/kafka/Variables.py b/src/common/tools/kafka/Variables.py
index 4537c3e0d..814284716 100644
--- a/src/common/tools/kafka/Variables.py
+++ b/src/common/tools/kafka/Variables.py
@@ -14,18 +14,20 @@
 
 import logging, time
 from enum import Enum
-from confluent_kafka.admin import AdminClient, NewTopic
+#from confluent_kafka.admin import AdminClient, NewTopic
+from kafka.admin import KafkaAdminClient, NewTopic
 from common.Settings import get_setting
 
 
 LOGGER = logging.getLogger(__name__)
 KFK_SERVER_ADDRESS_TEMPLATE = 'kafka-service.{:s}.svc.cluster.local:{:s}'
 
-KAFKA_TOPIC_NUM_PARTITIONS     = 1
-KAFKA_TOPIC_REPLICATION_FACTOR = 1
-KAFKA_TOPIC_LIST_TIMEOUT       = 5
-TOPIC_CREATE_WAIT_ITERATIONS   = 10
-TOPIC_CREATE_WAIT_TIME         = 1
+KAFKA_TOPIC_NUM_PARTITIONS         = 1
+KAFKA_TOPIC_REPLICATION_FACTOR     = 1
+#KAFKA_TOPIC_LIST_TIMEOUT           = 5
+KAFKA_TOPIC_CREATE_REQUEST_TIMEOUT = 60_000 # ms
+KAFKA_TOPIC_CREATE_WAIT_ITERATIONS = 10
+KAFKA_TOPIC_CREATE_WAIT_TIME       = 1
 
 class KafkaConfig(Enum):
 
@@ -41,7 +43,8 @@ class KafkaConfig(Enum):
     @staticmethod
     def get_admin_client():
         SERVER_ADDRESS = KafkaConfig.get_kafka_address()
-        ADMIN_CLIENT   = AdminClient({'bootstrap.servers': SERVER_ADDRESS})
+        #ADMIN_CLIENT   = AdminClient({'bootstrap.servers': SERVER_ADDRESS})
+        ADMIN_CLIENT   = KafkaAdminClient(bootstrap_servers=SERVER_ADDRESS)
         return ADMIN_CLIENT
 
 
@@ -67,8 +70,9 @@ class KafkaTopic(Enum):
         LOGGER.debug('Kafka server address: {:s}'.format(str(KafkaConfig.get_kafka_address())))
         kafka_admin_client = KafkaConfig.get_admin_client()
 
-        topic_metadata = kafka_admin_client.list_topics(timeout=KAFKA_TOPIC_LIST_TIMEOUT)
-        existing_topics = set(topic_metadata.topics.keys())
+        #topic_metadata = kafka_admin_client.list_topics(timeout=KAFKA_TOPIC_LIST_TIMEOUT)
+        #existing_topics = set(topic_metadata.topics.keys())
+        existing_topics = set(kafka_admin_client.list_topics())
         LOGGER.debug('Existing Kafka topics: {:s}'.format(str(existing_topics)))
 
         missing_topics = [
@@ -82,33 +86,48 @@ class KafkaTopic(Enum):
             LOGGER.debug('All topics already existed.')
             return True
 
-        create_topic_future_map = kafka_admin_client.create_topics(missing_topics, request_timeout=5*60)
-        LOGGER.debug('create_topic_future_map: {:s}'.format(str(create_topic_future_map)))
+        #create_topic_future_map = kafka_admin_client.create_topics(missing_topics, request_timeout=5*60)
+        #LOGGER.debug('create_topic_future_map: {:s}'.format(str(create_topic_future_map)))
+        topics_result = kafka_admin_client.create_topics(
+            new_topics=missing_topics, timeout_ms=KAFKA_TOPIC_CREATE_REQUEST_TIMEOUT,
+            validate_only=False
+        )
+        LOGGER.debug('topics_result={:s}'.format(str(topics_result)))
+
         failed_topic_creations = set()
-        for topic, future in create_topic_future_map.items():
-            try:
-                LOGGER.info('Waiting for Topic({:s})...'.format(str(topic)))
-                future.result()  # Blocks until topic is created or raises an exception
-                LOGGER.info('Topic({:s}) successfully created.'.format(str(topic)))
-            except: # pylint: disable=bare-except
-                LOGGER.exception('Failed to create Topic({:s})'.format(str(topic)))
-                failed_topic_creations.add(topic)
+        #for topic, future in create_topic_future_map.items():
+        #    try:
+        #        LOGGER.info('Waiting for Topic({:s})...'.format(str(topic)))
+        #        future.result()  # Blocks until topic is created or raises an exception
+        #        LOGGER.info('Topic({:s}) successfully created.'.format(str(topic)))
+        #    except: # pylint: disable=bare-except
+        #        LOGGER.exception('Failed to create Topic({:s})'.format(str(topic)))
+        #        failed_topic_creations.add(topic)
+        for topic_name, error_code, error_message in topics_result.topic_errors:
+            if error_code == 0 and error_message is None:
+                MSG = 'Topic({:s}) successfully created.'
+                LOGGER.info(MSG.format(str(topic_name)))
+            else:
+                MSG = 'Failed to create Topic({:s}): error_code={:s} error_message={:s}'
+                LOGGER.error(MSG.format(str(topic_name), str(error_code), str(error_message)))
+                failed_topic_creations.add(topic_name)
 
         if len(failed_topic_creations) > 0: return False
-
         LOGGER.debug('All topics created.')
 
         # Wait until topics appear in metadata
         desired_topics = {topic.value for topic in KafkaTopic}
         missing_topics = set()
-        for _ in range(TOPIC_CREATE_WAIT_ITERATIONS):
-            topic_metadata = kafka_admin_client.list_topics(timeout=KAFKA_TOPIC_LIST_TIMEOUT)
-            existing_topics = set(topic_metadata.topics.keys())
+        for _ in range(KAFKA_TOPIC_CREATE_WAIT_ITERATIONS):
+            #topic_metadata = kafka_admin_client.list_topics(timeout=KAFKA_TOPIC_LIST_TIMEOUT)
+            #existing_topics = set(topic_metadata.topics.keys())
+            existing_topics = set(kafka_admin_client.list_topics())
+            LOGGER.debug('existing_topics={:s}'.format(str(existing_topics)))
             missing_topics = desired_topics.difference(existing_topics)
             if len(missing_topics) == 0: break
             MSG = 'Waiting for Topics({:s}) to appear in metadata...'
             LOGGER.debug(MSG.format(str(missing_topics)))
-            time.sleep(TOPIC_CREATE_WAIT_TIME)
+            time.sleep(KAFKA_TOPIC_CREATE_WAIT_TIME)
 
         if len(missing_topics) > 0:
             MSG = 'Something went wrong... Topics({:s}) does not appear in metadata'
diff --git a/src/kpi_value_api/requirements.in b/src/kpi_value_api/requirements.in
index b4b105d9f..9aca20012 100644
--- a/src/kpi_value_api/requirements.in
+++ b/src/kpi_value_api/requirements.in
@@ -14,5 +14,6 @@
 
 APScheduler>=3.10.4
 confluent-kafka==2.3.*
+kafka-python==2.0.6
 prometheus-api-client==0.5.3
 requests==2.27.*
diff --git a/src/kpi_value_writer/requirements.in b/src/kpi_value_writer/requirements.in
index ac0c82cc3..089098ade 100644
--- a/src/kpi_value_writer/requirements.in
+++ b/src/kpi_value_writer/requirements.in
@@ -13,4 +13,5 @@
 # limitations under the License.
 
 confluent-kafka==2.3.*
+kafka-python==2.0.6
 requests==2.27.*
diff --git a/src/nbi/requirements.in b/src/nbi/requirements.in
index 9ebb937a3..80fd024d0 100644
--- a/src/nbi/requirements.in
+++ b/src/nbi/requirements.in
@@ -12,7 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-confluent-kafka==2.3.*  # only for creating topics and compatibility
 deepdiff==6.7.*
 deepmerge==1.1.*
 eventlet==0.39.0
@@ -25,7 +24,7 @@ flask-socketio==5.5.1
 #greenlet==3.1.1
 gunicorn==23.0.0
 jsonschema==4.4.0
-kafka-python==2.0.6     # for publishing and consuming messages in an eventlet-compatible way
+kafka-python==2.0.6
 libyang==2.8.4
 netaddr==0.9.0
 pyang==2.6.0
diff --git a/src/telemetry/backend/requirements.in b/src/telemetry/backend/requirements.in
index 828cd0330..5e9509a59 100644
--- a/src/telemetry/backend/requirements.in
+++ b/src/telemetry/backend/requirements.in
@@ -15,5 +15,6 @@
 anytree==2.8.0
 APScheduler>=3.10.4
 confluent-kafka==2.3.*
+kafka-python==2.0.6
 numpy==2.0.1
 pytz>=2025.2
diff --git a/src/telemetry/frontend/requirements.in b/src/telemetry/frontend/requirements.in
index 5ca81a10f..99b7551e3 100644
--- a/src/telemetry/frontend/requirements.in
+++ b/src/telemetry/frontend/requirements.in
@@ -13,6 +13,7 @@
 # limitations under the License.
 
 confluent-kafka==2.3.*
+kafka-python==2.0.6
 psycopg2-binary==2.9.*
 SQLAlchemy==1.4.*
 sqlalchemy-cockroachdb==1.4.*
diff --git a/src/vnt_manager/requirements.in b/src/vnt_manager/requirements.in
index d8f9537b4..f916d1f13 100644
--- a/src/vnt_manager/requirements.in
+++ b/src/vnt_manager/requirements.in
@@ -12,5 +12,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-confluent-kafka==2.3.*
+kafka-python==2.0.6
 #websockets==12.0
-- 
GitLab


From 77efd29e66ede28bf4015e87f1e6b05b3556adb1 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 23 Apr 2025 14:16:14 +0000
Subject: [PATCH 414/463] Common - Type Checkers - Assertions:

- Corrected assertions for Endpoint
---
 src/common/type_checkers/Assertions.py | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/common/type_checkers/Assertions.py b/src/common/type_checkers/Assertions.py
index f241dc0fb..cbe095396 100644
--- a/src/common/type_checkers/Assertions.py
+++ b/src/common/type_checkers/Assertions.py
@@ -15,6 +15,8 @@
 import logging
 from typing import Callable, Dict
 
+from common.tools.grpc.Tools import grpc_message_to_json_string
+
 LOGGER = logging.getLogger(__name__)
 
 # ----- Enumerations ---------------------------------------------------------------------------------------------------
@@ -472,7 +474,7 @@ def validate_topology(message, num_devices=None, num_links=None):
 
 def validate_endpoint(message):
     assert isinstance(message, dict)
-    assert len(message.keys()) == 6
+    assert len(message.keys()) in {5, 6}, 'Wrong number of attributes: {:s}'.format(str(message))
     assert 'endpoint_id' in message
     validate_endpoint_id(message['endpoint_id'])
     assert 'name' in message
@@ -482,10 +484,14 @@ def validate_endpoint(message):
     assert 'kpi_sample_types' in message
     assert isinstance(message['kpi_sample_types'], list)
     for kpi_sample_type in message['kpi_sample_types']: validate_kpi_sample_types_enum(kpi_sample_type)
-    assert 'endpoint_location' in message
-    # TODO: validate "endpoint_location"
-    assert 'capabilities' in message
-    # TODO: validate "capabilities"
+    if 'endpoint_location' in message:
+        #assert 'endpoint_location' in message
+        # TODO: validate "endpoint_location"
+        pass
+    if 'capabilities' in message:
+        #assert 'capabilities' in message
+        # TODO: validate "capabilities"
+        pass
 
 def validate_component(component):
     assert isinstance(component, dict)
-- 
GitLab


From 69ede9c5ecd4930d45b2009fbf7b21b13a389486 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 23 Apr 2025 14:16:41 +0000
Subject: [PATCH 415/463] NBI component - Heartbeat:

- Reactivated thread distributing heatbeaths
---
 src/nbi/service/health_probes/Namespaces.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nbi/service/health_probes/Namespaces.py b/src/nbi/service/health_probes/Namespaces.py
index 5f6a5205f..8a3f9323c 100644
--- a/src/nbi/service/health_probes/Namespaces.py
+++ b/src/nbi/service/health_probes/Namespaces.py
@@ -24,7 +24,7 @@ class HeartbeatServerNamespace(Namespace):
     def __init__(self):
         super().__init__(namespace=SIO_NAMESPACE)
         self._thread = HeartbeatThread(self)
-        #self._thread.start()
+        self._thread.start()
 
     def stop_thread(self) -> None:
         self._thread.stop()
-- 
GitLab


From c0548e9b4399ef654ea50ab6d226ab85cd8b8f74 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 23 Apr 2025 14:33:38 +0000
Subject: [PATCH 416/463] Fix GitLab CI/CD pipeline for NBI

---
 src/nbi/.gitlab-ci.yml | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml
index 41a1e4c2e..58a21a2cf 100644
--- a/src/nbi/.gitlab-ci.yml
+++ b/src/nbi/.gitlab-ci.yml
@@ -73,6 +73,7 @@ unit_test nbi:
     - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
     - docker pull "$CI_REGISTRY_IMAGE/mock_tfs_nbi_dependencies:test"
     - docker pull "bitnami/kafka:latest"
+    - docker images --filter="dangling=true" --quiet | xargs -r docker rmi
     - >
       docker run --name kafka -d --network=teraflowbridge -p 9092:9092 -p 9093:9093
       --env KAFKA_CFG_NODE_ID=1
@@ -102,24 +103,18 @@ unit_test nbi:
       --env IETF_NETWORK_RENDERER=LIBYANG
       --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092"
       $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG
-    #- >
-    #  while ! docker logs $IMAGE_NAME 2>&1 | grep -q 'Initialization completed'; do
-    #    echo "NBI log, last 20 lines:"
-    #    docker logs $IMAGE_NAME | tail -n 20
-    #    sleep 10;
-    #  done
-    #- sleep 5 # Give extra time to NBI to get ready
-    - sleep 600
+    - while ! docker logs $IMAGE_NAME 2>&1 | grep -q 'Initialization completed'; do sleep 1; done
+    - sleep 5 # Give extra time to NBI to get ready
     - docker ps -a
     - docker logs kafka
     - docker logs mock_tfs_nbi_dependencies
     - docker logs $IMAGE_NAME
-    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml"
-    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml"
-    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml"
-    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml"
-    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml"
-    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=DEBUG -o log_cli=true --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml"
     - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing"
   coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
   after_script:
-- 
GitLab


From 7c7b8932adbaea6edf08d84159d0f4cc95e0c636 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 23 Apr 2025 14:33:51 +0000
Subject: [PATCH 417/463] Update NBI tests to be executed locally

---
 scripts/run_tests_locally-nbi-all.sh | 83 +++++++++++++++++++++++-----
 1 file changed, 70 insertions(+), 13 deletions(-)

diff --git a/scripts/run_tests_locally-nbi-all.sh b/scripts/run_tests_locally-nbi-all.sh
index fd05ab3b5..a8b01b31a 100755
--- a/scripts/run_tests_locally-nbi-all.sh
+++ b/scripts/run_tests_locally-nbi-all.sh
@@ -14,22 +14,79 @@
 # limitations under the License.
 
 
-PROJECTDIR=`pwd`
+docker ps -aq | xargs -r docker rm -f
+docker network rm teraflowbridge || true
+docker container prune -f
 
-cd $PROJECTDIR/src
-RCFILE=$PROJECTDIR/coverage/.coveragerc
+docker pull "bitnami/kafka:latest"
+docker buildx build -t "mock_tfs_nbi_dependencies:test" -f ./src/tests/tools/mock_tfs_nbi_dependencies/Dockerfile .
+docker buildx build -t "nbi:latest" -f ./src/nbi/Dockerfile .
+docker images --filter="dangling=true" --quiet | xargs -r docker rmi
 
-# Run unitary tests and analyze coverage of code at same time
-# helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0
+docker network create -d bridge teraflowbridge
+
+docker run --name kafka -d --network=teraflowbridge -p 9092:9092 -p 9093:9093 \
+    --env KAFKA_CFG_NODE_ID=1 \
+    --env KAFKA_CFG_PROCESS_ROLES=controller,broker \
+    --env KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093 \
+    --env KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT \
+    --env KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER \
+    --env KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093 \
+    bitnami/kafka:latest
+
+echo "Waiting for Kafka to be ready..."
+while ! docker logs kafka 2>&1 | grep -q 'Kafka Server started'; do
+    printf "."
+    sleep 1;
+done
+printf "\n"
+sleep 5 # Give extra time to Kafka to get stabilized
+
+docker inspect kafka --format "{{.NetworkSettings.Networks}}"
+KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}")
+echo "Kafka IP: $KAFKA_IP"
 
-coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
-    nbi/tests/test_etsi_bwm.py
+docker run --name mock_tfs_nbi_dependencies -d -p 10000:10000 \
+    --network=teraflowbridge \
+    --env BIND_ADDRESS=0.0.0.0 \
+    --env BIND_PORT=10000 \
+    --env LOG_LEVEL=INFO \
+    mock_tfs_nbi_dependencies:test
 
-coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
-    nbi/tests/test_ietf_l2vpn.py
+docker run --name nbi -d \
+    --network=teraflowbridge \
+    --env LOG_LEVEL=INFO \
+    --env FLASK_ENV=development \
+    --env IETF_NETWORK_RENDERER=LIBYANG \
+    --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092" \
+    nbi:latest
+
+while ! docker logs nbi 2>&1 | grep -q 'Initialization completed'; do
+    printf "."
+    sleep 1;
+done
+printf "\n"
+sleep 5 # Give extra time to NBI to get ready
+
+docker ps -a
+docker logs kafka
+docker logs mock_tfs_nbi_dependencies
+docker logs nbi
+
+# helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0
+docker exec -i nbi bash -c "coverage run --append -m pytest --log-level=INFO --verbose nbi/tests/test_core.py --junitxml=/opt/results/${IMAGE_NAME}_report_core.xml"
+docker exec -i nbi bash -c "coverage run --append -m pytest --log-level=INFO --verbose nbi/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml"
+docker exec -i nbi bash -c "coverage run --append -m pytest --log-level=INFO --verbose nbi/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml"
+docker exec -i nbi bash -c "coverage run --append -m pytest --log-level=INFO --verbose nbi/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml"
+docker exec -i nbi bash -c "coverage run --append -m pytest --log-level=INFO --verbose nbi/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml"
+docker exec -i nbi bash -c "coverage run --append -m pytest --log-level=INFO --verbose nbi/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml"
+docker exec -i nbi bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing"
 
-coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
-    nbi/tests/test_ietf_l3vpn.py
+#docker logs mock_tfs_nbi_dependencies
+#docker logs nbi
+#docker logs kafka
+docker rm -f mock_tfs_nbi_dependencies nbi
+docker rm -f kafka
+docker network rm teraflowbridge
 
-coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
-    nbi/tests/test_ietf_network.py
+echo "Bye!"
-- 
GitLab


From a79cde81332c0139eb7b044514a88db2d72725ad Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 23 Apr 2025 14:38:35 +0000
Subject: [PATCH 418/463] GitLab CI/CD pipeline:

- Reactivated all tests
---
 .gitlab-ci.yml           | 64 ++++++++++++++++++++--------------------
 src/tests/.gitlab-ci.yml | 20 ++++++-------
 2 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c0ee11e13..2fe405733 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,39 +21,39 @@ stages:
 
 # include the individual .gitlab-ci.yml of each micro-service and tests
 include:
-#  #- local: '/manifests/.gitlab-ci.yml'
-#  - local: '/src/monitoring/.gitlab-ci.yml'
+  #- local: '/manifests/.gitlab-ci.yml'
+  - local: '/src/monitoring/.gitlab-ci.yml'
   - local: '/src/nbi/.gitlab-ci.yml'
-#  - local: '/src/context/.gitlab-ci.yml'
-#  - local: '/src/device/.gitlab-ci.yml'
-#  - local: '/src/service/.gitlab-ci.yml'
-#  - local: '/src/dbscanserving/.gitlab-ci.yml'
-#  - local: '/src/opticalattackmitigator/.gitlab-ci.yml'
-#  - local: '/src/opticalattackdetector/.gitlab-ci.yml'
-#  - local: '/src/opticalattackmanager/.gitlab-ci.yml'
-#  - local: '/src/opticalcontroller/.gitlab-ci.yml'
-#  - local: '/src/ztp/.gitlab-ci.yml'
-#  - local: '/src/policy/.gitlab-ci.yml'
-#  - local: '/src/automation/.gitlab-ci.yml'
-#  - local: '/src/forecaster/.gitlab-ci.yml'
-#  #- local: '/src/webui/.gitlab-ci.yml'
-#  #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml'
-#  #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml'
-#  #- local: '/src/l3_attackmitigator/.gitlab-ci.yml'
-#  - local: '/src/slice/.gitlab-ci.yml'
-#  #- local: '/src/interdomain/.gitlab-ci.yml'
-#  - local: '/src/pathcomp/.gitlab-ci.yml'
-#  #- local: '/src/dlt/.gitlab-ci.yml'
-#  - local: '/src/load_generator/.gitlab-ci.yml'
-#  - local: '/src/bgpls_speaker/.gitlab-ci.yml'
-#  - local: '/src/kpi_manager/.gitlab-ci.yml'
-#  - local: '/src/kpi_value_api/.gitlab-ci.yml'
-#  - local: '/src/kpi_value_writer/.gitlab-ci.yml'
-#  - local: '/src/telemetry/.gitlab-ci.yml'
-#  - local: '/src/analytics/.gitlab-ci.yml'
-#  - local: '/src/qos_profile/.gitlab-ci.yml'
-#  - local: '/src/vnt_manager/.gitlab-ci.yml'
-#  - local: '/src/e2e_orchestrator/.gitlab-ci.yml'
+  - local: '/src/context/.gitlab-ci.yml'
+  - local: '/src/device/.gitlab-ci.yml'
+  - local: '/src/service/.gitlab-ci.yml'
+  - local: '/src/dbscanserving/.gitlab-ci.yml'
+  - local: '/src/opticalattackmitigator/.gitlab-ci.yml'
+  - local: '/src/opticalattackdetector/.gitlab-ci.yml'
+  - local: '/src/opticalattackmanager/.gitlab-ci.yml'
+  - local: '/src/opticalcontroller/.gitlab-ci.yml'
+  - local: '/src/ztp/.gitlab-ci.yml'
+  - local: '/src/policy/.gitlab-ci.yml'
+  - local: '/src/automation/.gitlab-ci.yml'
+  - local: '/src/forecaster/.gitlab-ci.yml'
+  #- local: '/src/webui/.gitlab-ci.yml'
+  #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml'
+  #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml'
+  #- local: '/src/l3_attackmitigator/.gitlab-ci.yml'
+  - local: '/src/slice/.gitlab-ci.yml'
+  #- local: '/src/interdomain/.gitlab-ci.yml'
+  - local: '/src/pathcomp/.gitlab-ci.yml'
+  #- local: '/src/dlt/.gitlab-ci.yml'
+  - local: '/src/load_generator/.gitlab-ci.yml'
+  - local: '/src/bgpls_speaker/.gitlab-ci.yml'
+  - local: '/src/kpi_manager/.gitlab-ci.yml'
+  - local: '/src/kpi_value_api/.gitlab-ci.yml'
+  - local: '/src/kpi_value_writer/.gitlab-ci.yml'
+  - local: '/src/telemetry/.gitlab-ci.yml'
+  - local: '/src/analytics/.gitlab-ci.yml'
+  - local: '/src/qos_profile/.gitlab-ci.yml'
+  - local: '/src/vnt_manager/.gitlab-ci.yml'
+  - local: '/src/e2e_orchestrator/.gitlab-ci.yml'
 
   # This should be last one: end-to-end integration tests
   - local: '/src/tests/.gitlab-ci.yml'
diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml
index 61a48c05b..787b25ee1 100644
--- a/src/tests/.gitlab-ci.yml
+++ b/src/tests/.gitlab-ci.yml
@@ -14,15 +14,15 @@
 
 # include the individual .gitlab-ci.yml of each end-to-end integration test
 include:
-#  - local: '/src/tests/ofc22/.gitlab-ci.yml'
-#  #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml'
-#  - local: '/src/tests/ecoc22/.gitlab-ci.yml'
-#  #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml'
-#  #- local: '/src/tests/ofc23/.gitlab-ci.yml'
-#  - local: '/src/tests/ofc24/.gitlab-ci.yml'
-#  - local: '/src/tests/eucnc24/.gitlab-ci.yml'
-#  - local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml'
-#  - local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml'
-#  #- local: '/src/tests/ofc25/.gitlab-ci.yml'
+  - local: '/src/tests/ofc22/.gitlab-ci.yml'
+  #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml'
+  - local: '/src/tests/ecoc22/.gitlab-ci.yml'
+  #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml'
+  #- local: '/src/tests/ofc23/.gitlab-ci.yml'
+  - local: '/src/tests/ofc24/.gitlab-ci.yml'
+  - local: '/src/tests/eucnc24/.gitlab-ci.yml'
+  - local: '/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml'
+  - local: '/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml'
+  #- local: '/src/tests/ofc25/.gitlab-ci.yml'
 
   - local: '/src/tests/tools/mock_tfs_nbi_dependencies/.gitlab-ci.yml'
-- 
GitLab


From e5b080d80672dabc5564b68a6284644c0f2e2c02 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 23 Apr 2025 15:00:46 +0000
Subject: [PATCH 419/463] GitLab CI/CD pipeline:

- Deactivated broken tests (not related to this feature)
---
 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2fe405733..904228d4d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -48,8 +48,8 @@ include:
   - local: '/src/bgpls_speaker/.gitlab-ci.yml'
   - local: '/src/kpi_manager/.gitlab-ci.yml'
   - local: '/src/kpi_value_api/.gitlab-ci.yml'
-  - local: '/src/kpi_value_writer/.gitlab-ci.yml'
-  - local: '/src/telemetry/.gitlab-ci.yml'
+  #- local: '/src/kpi_value_writer/.gitlab-ci.yml'
+  #- local: '/src/telemetry/.gitlab-ci.yml'
   - local: '/src/analytics/.gitlab-ci.yml'
   - local: '/src/qos_profile/.gitlab-ci.yml'
   - local: '/src/vnt_manager/.gitlab-ci.yml'
-- 
GitLab


From 1af7c00123d84185bb0d4cfa2f2e3c6c2f9f165b Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Wed, 23 Apr 2025 16:41:57 +0000
Subject: [PATCH 420/463] Common - Type Checkers - Assertions:

- Remove unneeded import
---
 src/common/type_checkers/Assertions.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/common/type_checkers/Assertions.py b/src/common/type_checkers/Assertions.py
index cbe095396..d7aac460c 100644
--- a/src/common/type_checkers/Assertions.py
+++ b/src/common/type_checkers/Assertions.py
@@ -15,7 +15,6 @@
 import logging
 from typing import Callable, Dict
 
-from common.tools.grpc.Tools import grpc_message_to_json_string
 
 LOGGER = logging.getLogger(__name__)
 
-- 
GitLab


From bb971a4896ec81c2e480c7485e6033bb84096ee4 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Thu, 24 Apr 2025 07:02:39 +0000
Subject: [PATCH 421/463] Fix GitLab CI/CD pipeline for NBI

---
 src/tests/ecoc22/.gitlab-ci.yml                          | 1 +
 src/tests/eucnc24/.gitlab-ci.yml                         | 2 +-
 src/tests/ofc22/.gitlab-ci.yml                           | 1 +
 src/tests/ofc24/.gitlab-ci.yml                           | 1 +
 src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml | 2 +-
 src/tests/ofc25-camara-agg-net-controller/Dockerfile     | 2 ++
 src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml     | 2 +-
 src/tests/ofc25-camara-e2e-controller/Dockerfile         | 2 ++
 8 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/tests/ecoc22/.gitlab-ci.yml b/src/tests/ecoc22/.gitlab-ci.yml
index 467f2f8fd..7e238dda2 100644
--- a/src/tests/ecoc22/.gitlab-ci.yml
+++ b/src/tests/ecoc22/.gitlab-ci.yml
@@ -70,6 +70,7 @@ end2end_test ecoc22:
     # Deploy TeraFlowSDN
     - ./deploy/crdb.sh
     - ./deploy/nats.sh
+    - ./deploy/kafka.sh
     - ./deploy/qdb.sh
     - ./deploy/expose_dashboard.sh
     - ./deploy/tfs.sh
diff --git a/src/tests/eucnc24/.gitlab-ci.yml b/src/tests/eucnc24/.gitlab-ci.yml
index 1ae05f274..146310b62 100644
--- a/src/tests/eucnc24/.gitlab-ci.yml
+++ b/src/tests/eucnc24/.gitlab-ci.yml
@@ -93,8 +93,8 @@ end2end_test eucnc24:
     # Deploy TeraFlowSDN
     - ./deploy/crdb.sh
     - ./deploy/nats.sh
-    - ./deploy/qdb.sh
     - ./deploy/kafka.sh
+    - ./deploy/qdb.sh
     - ./deploy/tfs.sh
     - ./deploy/show.sh
 
diff --git a/src/tests/ofc22/.gitlab-ci.yml b/src/tests/ofc22/.gitlab-ci.yml
index 0fbe2375a..6ba746bb0 100644
--- a/src/tests/ofc22/.gitlab-ci.yml
+++ b/src/tests/ofc22/.gitlab-ci.yml
@@ -71,6 +71,7 @@ end2end_test ofc22:
     # Deploy TeraFlowSDN
     - ./deploy/crdb.sh
     - ./deploy/nats.sh
+    - ./deploy/kafka.sh
     - ./deploy/qdb.sh
     - ./deploy/expose_dashboard.sh
     - ./deploy/tfs.sh
diff --git a/src/tests/ofc24/.gitlab-ci.yml b/src/tests/ofc24/.gitlab-ci.yml
index 7937fd1be..412f4ed5e 100644
--- a/src/tests/ofc24/.gitlab-ci.yml
+++ b/src/tests/ofc24/.gitlab-ci.yml
@@ -112,6 +112,7 @@ end2end_test ofc24:
     # Deploy TeraFlowSDN
     - ./deploy/crdb.sh
     - ./deploy/nats.sh
+    - ./deploy/kafka.sh
     - ./deploy/qdb.sh
     - ./deploy/expose_dashboard.sh
     - ./deploy/tfs.sh
diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml
index f69c37b38..2fc933827 100644
--- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml
+++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml
@@ -41,8 +41,8 @@ end2end_test ofc25_camara_agg_net:
     # Deploy TeraFlowSDN
     - ./deploy/crdb.sh
     - ./deploy/nats.sh
-    - ./deploy/qdb.sh
     - ./deploy/kafka.sh
+    - ./deploy/qdb.sh
     - ./deploy/tfs.sh
     - ./deploy/show.sh
 
diff --git a/src/tests/ofc25-camara-agg-net-controller/Dockerfile b/src/tests/ofc25-camara-agg-net-controller/Dockerfile
index 92b0bfeb4..d6aedac80 100644
--- a/src/tests/ofc25-camara-agg-net-controller/Dockerfile
+++ b/src/tests/ofc25-camara-agg-net-controller/Dockerfile
@@ -71,6 +71,8 @@ COPY src/service/__init__.py service/__init__.py
 COPY src/service/client/. service/client/
 COPY src/slice/__init__.py slice/__init__.py
 COPY src/slice/client/. slice/client/
+COPY src/vnt_manager/__init__.py vnt_manager/__init__.py
+COPY src/vnt_manager/client/. vnt_manager/client/
 COPY src/tests/*.py ./tests/
 COPY src/tests/ofc25-camara-agg-net-controller/__init__.py ./tests/ofc25-camara-agg-net-controller/__init__.py
 COPY src/tests/ofc25-camara-agg-net-controller/data/. ./tests/ofc25-camara-agg-net-controller/data/
diff --git a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml
index c78468180..22f6e38e0 100644
--- a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml
+++ b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml
@@ -48,8 +48,8 @@ end2end_test ofc25_camara_e2e:
     # Deploy TeraFlowSDN
     - ./deploy/crdb.sh
     - ./deploy/nats.sh
-    - ./deploy/qdb.sh
     - ./deploy/kafka.sh
+    - ./deploy/qdb.sh
     - ./deploy/tfs.sh
     - ./deploy/show.sh
 
diff --git a/src/tests/ofc25-camara-e2e-controller/Dockerfile b/src/tests/ofc25-camara-e2e-controller/Dockerfile
index 040f97692..35ca5d4db 100644
--- a/src/tests/ofc25-camara-e2e-controller/Dockerfile
+++ b/src/tests/ofc25-camara-e2e-controller/Dockerfile
@@ -71,6 +71,8 @@ COPY src/service/__init__.py service/__init__.py
 COPY src/service/client/. service/client/
 COPY src/slice/__init__.py slice/__init__.py
 COPY src/slice/client/. slice/client/
+COPY src/vnt_manager/__init__.py vnt_manager/__init__.py
+COPY src/vnt_manager/client/. vnt_manager/client/
 COPY src/tests/*.py ./tests/
 COPY src/tests/ofc25-camara-e2e-controller/__init__.py ./tests/ofc25-camara-e2e-controller/__init__.py
 COPY src/tests/ofc25-camara-e2e-controller/data/. ./tests/ofc25-camara-e2e-controller/data/
-- 
GitLab


From 3334ca9933ec48db36972306015cdeaa68ba5fcb Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Thu, 24 Apr 2025 08:47:07 +0000
Subject: [PATCH 422/463] GitLab CI/CD pipeline:

- Defined fine-grained timeouts for long-running jobs
---
 src/tests/ecoc22/.gitlab-ci.yml                          | 1 +
 src/tests/eucnc24/.gitlab-ci.yml                         | 1 +
 src/tests/ofc22/.gitlab-ci.yml                           | 1 +
 src/tests/ofc24/.gitlab-ci.yml                           | 1 +
 src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml | 1 +
 src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml     | 1 +
 src/tests/ofc25/.gitlab-ci.yml                           | 1 +
 7 files changed, 7 insertions(+)

diff --git a/src/tests/ecoc22/.gitlab-ci.yml b/src/tests/ecoc22/.gitlab-ci.yml
index 7e238dda2..13b9c1e51 100644
--- a/src/tests/ecoc22/.gitlab-ci.yml
+++ b/src/tests/ecoc22/.gitlab-ci.yml
@@ -37,6 +37,7 @@ build ecoc22:
 
 # Deploy TeraFlowSDN and Execute end-2-end test
 end2end_test ecoc22:
+  timeout: 20m
   variables:
     TEST_NAME: 'ecoc22'
   stage: end2end_test
diff --git a/src/tests/eucnc24/.gitlab-ci.yml b/src/tests/eucnc24/.gitlab-ci.yml
index 146310b62..7af69f4b8 100644
--- a/src/tests/eucnc24/.gitlab-ci.yml
+++ b/src/tests/eucnc24/.gitlab-ci.yml
@@ -37,6 +37,7 @@ build eucnc24:
 
 # Deploy TeraFlowSDN and Execute end-2-end test
 end2end_test eucnc24:
+  timeout: 90m
   variables:
     TEST_NAME: 'eucnc24'
   stage: end2end_test
diff --git a/src/tests/ofc22/.gitlab-ci.yml b/src/tests/ofc22/.gitlab-ci.yml
index 6ba746bb0..ab0938245 100644
--- a/src/tests/ofc22/.gitlab-ci.yml
+++ b/src/tests/ofc22/.gitlab-ci.yml
@@ -37,6 +37,7 @@ build ofc22:
 
 # Deploy TeraFlowSDN and Execute end-2-end test
 end2end_test ofc22:
+  timeout: 20m
   variables:
     TEST_NAME: 'ofc22'
   stage: end2end_test
diff --git a/src/tests/ofc24/.gitlab-ci.yml b/src/tests/ofc24/.gitlab-ci.yml
index 412f4ed5e..ff6c641fa 100644
--- a/src/tests/ofc24/.gitlab-ci.yml
+++ b/src/tests/ofc24/.gitlab-ci.yml
@@ -37,6 +37,7 @@ build ofc24:
 
 # Deploy TeraFlowSDN and Execute end-2-end test
 end2end_test ofc24:
+  timeout: 90m
   variables:
     TEST_NAME: 'ofc24'
   stage: end2end_test
diff --git a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml
index 2fc933827..1e9fe2203 100644
--- a/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml
+++ b/src/tests/ofc25-camara-agg-net-controller/.gitlab-ci.yml
@@ -14,6 +14,7 @@
 
 # Deploy TeraFlowSDN and Execute end-2-end test
 end2end_test ofc25_camara_agg_net:
+  timeout: 40m
   variables:
     TEST_NAME: 'ofc25-camara-agg-net-controller'
     IP_NAME: 'ip'
diff --git a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml
index 22f6e38e0..eba1d203c 100644
--- a/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml
+++ b/src/tests/ofc25-camara-e2e-controller/.gitlab-ci.yml
@@ -14,6 +14,7 @@
 
 # Deploy TeraFlowSDN and Execute end-2-end test
 end2end_test ofc25_camara_e2e:
+  timeout: 40m
   variables:
     TEST_NAME: 'ofc25-camara-e2e-controller'
     NCE_NAME: 'nce'
diff --git a/src/tests/ofc25/.gitlab-ci.yml b/src/tests/ofc25/.gitlab-ci.yml
index 52ea2e3a4..b24f59927 100644
--- a/src/tests/ofc25/.gitlab-ci.yml
+++ b/src/tests/ofc25/.gitlab-ci.yml
@@ -37,6 +37,7 @@ build ofc25:
 
 # Deploy TeraFlowSDN and Execute end-2-end test
 end2end_test ofc25:
+  timeout: 90m
   variables:
     TEST_NAME: 'ofc25'
   stage: end2end_test
-- 
GitLab


From de22bc5dec4af53709344867632eaeda8e4002a2 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Thu, 24 Apr 2025 08:56:28 +0000
Subject: [PATCH 423/463] Service component:

- Added temporary logs to debug CI/CD pipeline
---
 src/service/service/ServiceServiceServicerImpl.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py
index 3a376c014..fe6bc74aa 100644
--- a/src/service/service/ServiceServiceServicerImpl.py
+++ b/src/service/service/ServiceServiceServicerImpl.py
@@ -271,9 +271,13 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
                 device_uuid = device.device_id.device_uuid.uuid
                 device_names[device_uuid] = device.name
 
+            LOGGER.warning('device_names={:s}'.format(str(device_names)))
+            LOGGER.warning('service={:s}'.format(grpc_message_to_json_string(service)))
+
             devs = []
             ports = []
             for endpoint_id in service.service_endpoint_ids:
+                LOGGER.warning('endpoint_id={:s}'.format(grpc_message_to_json_string(endpoint_id)))
                 endpoint_device_uuid = endpoint_id.device_id.device_uuid.uuid
                 endpoint_device_name = device_names[endpoint_device_uuid]
                 devs.append(endpoint_device_name)
-- 
GitLab


From 05051e46b0c3537be3a7ef5f07d2b38848a75c13 Mon Sep 17 00:00:00 2001
From: gifrerenom 
Date: Thu, 24 Apr 2025 12:48:43 +0000
Subject: [PATCH 424/463] Service component - optical logic:

- Correct device name mapping issue
---
 src/service/service/ServiceServiceServicerImpl.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py
index fe6bc74aa..bb8dfe3f7 100644
--- a/src/service/service/ServiceServiceServicerImpl.py
+++ b/src/service/service/ServiceServiceServicerImpl.py
@@ -269,15 +269,12 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
             device_names : Dict[str, str] = dict()
             for device in devices:
                 device_uuid = device.device_id.device_uuid.uuid
-                device_names[device_uuid] = device.name
-
-            LOGGER.warning('device_names={:s}'.format(str(device_names)))
-            LOGGER.warning('service={:s}'.format(grpc_message_to_json_string(service)))
+                device_names[device_uuid] = device.name # ID => name
+                device_names[device.name] = device.name # name => name (that way, if not present, crash)
 
             devs = []
             ports = []
             for endpoint_id in service.service_endpoint_ids:
-                LOGGER.warning('endpoint_id={:s}'.format(grpc_message_to_json_string(endpoint_id)))
                 endpoint_device_uuid = endpoint_id.device_id.device_uuid.uuid
                 endpoint_device_name = device_names[endpoint_device_uuid]
                 devs.append(endpoint_device_name)
-- 
GitLab


From ee102495cd1c6cace57e083aecc2bf817b6b2cd4 Mon Sep 17 00:00:00 2001
From: hajipour 
Date: Thu, 1 May 2025 15:42:16 +0200
Subject: [PATCH 425/463] enhancement: - acl handler registered in
 gNMI/OpenConfig driver - openconfig-platform-healthz and openconfig-acl added
 to YangHandler - Initial version of ACL handler added to gNMI/OpenConfig
 driver

---
 .../drivers/gnmi_openconfig/handlers/Acl.py   | 140 ++++++++++++++++++
 .../gnmi_openconfig/handlers/YangHandler.py   |   2 +
 .../gnmi_openconfig/handlers/__init__.py      |   9 +-
 3 files changed, 150 insertions(+), 1 deletion(-)
 create mode 100644 src/device/service/drivers/gnmi_openconfig/handlers/Acl.py

diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Acl.py b/src/device/service/drivers/gnmi_openconfig/handlers/Acl.py
new file mode 100644
index 000000000..bdfeec430
--- /dev/null
+++ b/src/device/service/drivers/gnmi_openconfig/handlers/Acl.py
@@ -0,0 +1,140 @@
+import json
+import logging
+from typing import Any, Dict, List, Tuple
+
+import libyang
+
+from ._Handler import _Handler
+from .YangHandler import YangHandler
+
+LOGGER = logging.getLogger(__name__)
+
+# ──────────────────────────  enum translations  ──────────────────────────
+
+_TFS_OC_RULE_TYPE = {
+    'ACLRULETYPE_IPV4': 'ACL_IPV4',
+    'ACLRULETYPE_IPV6': 'ACL_IPV6',
+}
+
+_TFS_OC_FWD_ACTION = {
+    'ACLFORWARDINGACTION_DROP': 'DROP',
+    'ACLFORWARDINGACTION_ACCEPT': 'ACCEPT',
+    'ACLFORWARDINGACTION_REJECT': 'REJECT',
+}
+
+_OC_TFS_RULE_TYPE = {v: k for k, v in _TFS_OC_RULE_TYPE.items()}
+_OC_TFS_FWD_ACTION = {v: k for k, v in _TFS_OC_FWD_ACTION.items()}
+
+# ─────────────────────────────────────────────────────────────────────────
+
+
+class AclHandler(_Handler):
+    def get_resource_key(self) -> str:
+        return '/device/endpoint/acl_ruleset'
+
+    def get_path(self) -> str:
+        return '/openconfig-acl:acl'
+
+    def compose(  # pylint: disable=too-many-locals
+        self,
+        resource_key: str,
+        resource_value: Dict[str, Any],
+        yang: YangHandler,
+        delete: bool = False,
+    ) -> Tuple[str, str]:
+        rs = resource_value['rule_set']
+        rs_name = rs['name']
+        oc_type = _TFS_OC_RULE_TYPE[rs['type']]
+        device = resource_value['endpoint_id']['device_id']['device_uuid']['uuid']
+        iface = resource_value['endpoint_id']['endpoint_uuid']['uuid']
+
+        if delete:
+            path = f'/acl/acl-sets/acl-set[name={rs_name}][type={oc_type}]'
+            return path, ''
+
+        yang_acl: libyang.DContainer = yang.get_data_path('/openconfig-acl:acl')
+
+        y_sets = yang_acl.create_path('acl-sets')
+        y_set = y_sets.create_path(f'acl-set[name="{rs_name}"][type="{oc_type}"]')
+        y_set.create_path('config/name', rs_name)
+        y_set.create_path('config/type', oc_type)
+
+        # Entries (ACEs)
+        y_entries = y_set.create_path('acl-entries')
+        for entry in rs.get('entries', []):
+            seq = int(entry['sequence_id'])
+            src = entry['match'].get('src_address', '0.0.0.0/0')
+            dst = entry['match'].get('dst_address', '0.0.0.0/0')
+            act = _TFS_OC_FWD_ACTION[entry['action']['forward_action']]
+
+            y_e = y_entries.create_path(f'acl-entry[sequence-id="{seq}"]')
+            y_e.create_path('config/sequence-id', seq)
+
+            y_ipv4 = y_e.create_path('ipv4')
+            y_ipv4.create_path('config/source-address', src)
+            y_ipv4.create_path('config/destination-address', dst)
+
+            y_act = y_e.create_path('actions')
+            y_act.create_path('config/forwarding-action', act)
+
+        # Interface binding
+        y_intfs = yang_acl.create_path('interfaces')
+        y_intf = y_intfs.create_path(f'interface[id="{iface}"]')
+        y_ing = y_intf.create_path('ingress-acl-sets')
+        y_ing_set = y_ing.create_path(f'ingress-acl-set[set-name="{rs_name}"][type="{oc_type}"]')
+        y_ing_set.create_path('config/set-name', rs_name)
+        y_ing_set.create_path('config/type', oc_type)
+
+        json_data = yang_acl.print_mem('json')
+        LOGGER.debug('JSON data: %s', json_data)
+        json_obj = json.loads(json_data)['openconfig-acl:acl']
+        return '/acl', json.dumps(json_obj)
+
+    def parse(  # pylint: disable=too-many-locals
+        self,
+        json_data: Dict[str, Any],
+        yang: YangHandler,
+    ) -> List[Tuple[str, Dict[str, Any]]]:
+        acl_tree = json_data.get('openconfig-acl:acl') or json_data
+        results: List[Tuple[str, Dict[str, Any]]] = []
+
+        for acl_set in acl_tree.get('acl-sets', {}).get('acl-set', []):
+            rs_name = acl_set['name']
+            oc_type = acl_set['config']['type']
+            rs_type = _OC_TFS_RULE_TYPE[oc_type]
+
+            rule_set: Dict[str, Any] = {
+                'name': rs_name,
+                'type': rs_type,
+                'description': acl_set.get('config', {}).get('description', ''),
+                'entries': [],
+            }
+
+            for ace in acl_set.get('acl-entries', {}).get('acl-entry', []):
+                seq = ace['sequence-id']
+                act = ace.get('actions', {}).get('config', {}).get('forwarding-action', 'DROP')
+                fwd_tfs = _OC_TFS_FWD_ACTION[act]
+                ipv4_cfg = ace.get('ipv4', {}).get('config', {})
+
+                rule_set['entries'].append(
+                    {
+                        'sequence_id': seq,
+                        'match': {
+                            'src_address': ipv4_cfg.get('source-address', ''),
+                            'dst_address': ipv4_cfg.get('destination-address', ''),
+                        },
+                        'action': {'forward_action': fwd_tfs},
+                    }
+                )
+
+            # find where that ACL is bound (first matching interface)
+            iface = ''
+            for intf in acl_tree.get('interfaces', {}).get('interface', []):
+                for ing in intf.get('ingress-acl-sets', {}).get('ingress-acl-set', []):
+                    if ing['set-name'] == rs_name:
+                        iface = intf['id']
+                        break
+
+            results.append(('/acl', {'interface': iface, 'rule_set': rule_set}))
+
+        return results
diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/YangHandler.py b/src/device/service/drivers/gnmi_openconfig/handlers/YangHandler.py
index e7cff19eb..ff90dcfcd 100644
--- a/src/device/service/drivers/gnmi_openconfig/handlers/YangHandler.py
+++ b/src/device/service/drivers/gnmi_openconfig/handlers/YangHandler.py
@@ -44,6 +44,7 @@ YANG_MODULES = [
     'openconfig-mpls-types',
     'openconfig-network-instance-types',
     'openconfig-network-instance',
+    'openconfig-acl',
 
     'openconfig-platform',
     'openconfig-platform-controller-card',
@@ -59,6 +60,7 @@ YANG_MODULES = [
     'openconfig-platform-software',
     'openconfig-platform-transceiver',
     'openconfig-platform-types',
+    'openconfig-platform-healthz',
 ]
 
 LOGGER = logging.getLogger(__name__)
diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/__init__.py b/src/device/service/drivers/gnmi_openconfig/handlers/__init__.py
index 6af371ceb..8b05873fb 100644
--- a/src/device/service/drivers/gnmi_openconfig/handlers/__init__.py
+++ b/src/device/service/drivers/gnmi_openconfig/handlers/__init__.py
@@ -14,7 +14,7 @@
 
 import logging
 from typing import Any, Dict, List, Optional, Tuple, Union
-from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES
+from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES, RESOURCE_ACL
 from ._Handler import _Handler
 from .Component import ComponentHandler
 from .Interface import InterfaceHandler
@@ -23,6 +23,7 @@ from .NetworkInstance import NetworkInstanceHandler
 from .NetworkInstanceInterface import NetworkInstanceInterfaceHandler
 from .NetworkInstanceProtocol import NetworkInstanceProtocolHandler
 from .NetworkInstanceStaticRoute import NetworkInstanceStaticRouteHandler
+from .Acl import AclHandler
 from .Tools import get_schema
 from .YangHandler import YangHandler
 
@@ -35,17 +36,20 @@ nih    = NetworkInstanceHandler()
 niifh  = NetworkInstanceInterfaceHandler()
 niph   = NetworkInstanceProtocolHandler()
 nisrh  = NetworkInstanceStaticRouteHandler()
+aclh   = AclHandler()
 
 ALL_RESOURCE_KEYS = [
     RESOURCE_ENDPOINTS,
     RESOURCE_INTERFACES,
     RESOURCE_NETWORK_INSTANCES,
+    RESOURCE_ACL,
 ]
 
 RESOURCE_KEY_MAPPER = {
     RESOURCE_ENDPOINTS         : comph.get_resource_key(),
     RESOURCE_INTERFACES        : ifaceh.get_resource_key(),
     RESOURCE_NETWORK_INSTANCES : nih.get_resource_key(),
+    RESOURCE_ACL               : aclh.get_resource_key(),
 }
 
 PATH_MAPPER = {
@@ -53,6 +57,7 @@ PATH_MAPPER = {
     '/components/component' : comph.get_path(),
     '/interfaces'           : ifaceh.get_path(),
     '/network-instances'    : nih.get_path(),
+    '/acl'                  : aclh.get_path(),
 }
 
 RESOURCE_KEY_TO_HANDLER = {
@@ -63,6 +68,7 @@ RESOURCE_KEY_TO_HANDLER = {
     niifh.get_resource_key()  : niifh,
     niph.get_resource_key()   : niph,
     nisrh.get_resource_key()  : nisrh,
+    aclh.get_resource_key()   : aclh,
 }
 
 PATH_TO_HANDLER = {
@@ -73,6 +79,7 @@ PATH_TO_HANDLER = {
     niifh.get_path()  : niifh,
     niph.get_path()   : niph,
     nisrh.get_path()  : nisrh,
+    aclh.get_path()   : aclh,
 }
 
 def get_handler(
-- 
GitLab


From c44a2bfe0a6730a257141905a8dca0269168c2b4 Mon Sep 17 00:00:00 2001
From: hajipour 
Date: Thu, 1 May 2025 22:33:47 +0200
Subject: [PATCH 426/463] fix: ietf acl retrieve fix in NBI

---
 src/nbi/service/ietf_acl/Acl.py             |   4 +-
 src/nbi/service/ietf_acl/ietf_acl_parser.py | 194 +++++++++++---------
 2 files changed, 107 insertions(+), 91 deletions(-)

diff --git a/src/nbi/service/ietf_acl/Acl.py b/src/nbi/service/ietf_acl/Acl.py
index f259e36f6..b17ad1165 100644
--- a/src/nbi/service/ietf_acl/Acl.py
+++ b/src/nbi/service/ietf_acl/Acl.py
@@ -64,8 +64,8 @@ class Acl(Resource):
             _config_rule.CopyFrom(config_rule)
             _config_rule.action = ConfigActionEnum.CONFIGACTION_DELETE
             delete_config_rules.append(_config_rule)
-
-        if len(delete_config_rules) == 0:
+            break
+        else:
             raise NotFound('Acl({:s}) not found in Device({:s})'.format(str(acl_name), str(device_uuid)))
 
         device_client = DeviceClient()
diff --git a/src/nbi/service/ietf_acl/ietf_acl_parser.py b/src/nbi/service/ietf_acl/ietf_acl_parser.py
index 493fb00cf..929b69233 100644
--- a/src/nbi/service/ietf_acl/ietf_acl_parser.py
+++ b/src/nbi/service/ietf_acl/ietf_acl_parser.py
@@ -13,106 +13,128 @@
 # limitations under the License.
 
 from enum import Enum
-from typing import List, Dict
+from typing import List, Dict, Optional
 from pydantic import BaseModel, Field
 from werkzeug.exceptions import NotImplemented
 from common.proto.acl_pb2 import AclForwardActionEnum, AclRuleTypeEnum, AclEntry
 from common.proto.context_pb2 import ConfigActionEnum, ConfigRule
 
+
 class AclDirectionEnum(Enum):
     INGRESS = 'ingress'
-    EGRESS  = 'egress'
+    EGRESS = 'egress'
+
 
 class Ipv4(BaseModel):
     dscp: int = 0
-    source_ipv4_network: str = Field(serialization_alias="source-ipv4-network", default="") 
-    destination_ipv4_network: str = Field(serialization_alias="destination-ipv4-network", default="") 
+    source_ipv4_network: str = Field(serialization_alias='source-ipv4-network', default='')
+    destination_ipv4_network: str = Field(
+        serialization_alias='destination-ipv4-network', default=''
+    )
+
 
 class Port(BaseModel):
     port: int = 0
-    operator: str = "eq"
+    operator: str = 'eq'
+
 
 class Tcp(BaseModel):
-    flags: str = ""
-    source_port: Port = Field(serialization_alias="source-port", default_factory=lambda: Port())
-    destination_port: Port = Field(serialization_alias="destination-port", default_factory=lambda: Port())
+    flags: str = ''
+    source_port: Port = Field(serialization_alias='source-port', default_factory=lambda: Port())
+    destination_port: Port = Field(
+        serialization_alias='destination-port', default_factory=lambda: Port()
+    )
+
 
 class Matches(BaseModel):
     ipv4: Ipv4 = Ipv4()
-    tcp: Tcp = Tcp()
+    tcp: Optional[Tcp] = None
+
 
 class Action(BaseModel):
-    forwarding: str = ""
+    forwarding: str = ''
+
 
 class Ace(BaseModel):
-    name: str = "custom_rule"
+    name: str = ''
     matches: Matches = Matches()
     actions: Action = Action()
 
+
 class Aces(BaseModel):
     ace: List[Ace] = [Ace()]
 
+
 class Acl(BaseModel):
-    name: str = ""
-    type: str = ""
+    name: str = ''
+    type: str = ''
     aces: Aces = Aces()
 
+
 class Name(BaseModel):
-    name: str = ""
+    name: str = ''
+
 
 class AclSet(BaseModel):
-    acl_set: List[Name] = Field(serialization_alias="acl-set", default=[Name()])
+    acl_set: List[Name] = Field(serialization_alias='acl-set', default=[Name()])
+
 
 class AclSets(BaseModel):
-    acl_sets: AclSet = Field(serialization_alias="acl-sets", default=AclSet())
+    acl_sets: AclSet = Field(serialization_alias='acl-sets', default=AclSet())
+
 
 class Ingress(BaseModel):
-    ingress : AclSets = AclSets()
+    ingress: AclSets = AclSets()
+
 
 class Egress(BaseModel):
-    egress : AclSets = AclSets()
+    egress: AclSets = AclSets()
+
 
 class Interface(BaseModel):
-    interface_id: str = Field(serialization_alias="interface-id", default="")
-    ingress : Ingress = Ingress()
-    egress  : Egress  = Egress()
+    interface_id: str = Field(serialization_alias='interface-id', default='')
+    ingress: Optional[AclSets] = None
+    egress: Optional[AclSets] = None
+
 
 class Interfaces(BaseModel):
     interface: List[Interface] = [Interface()]
 
-class AttachmentPoints(BaseModel):
-    attachment_points: Interfaces = Field(serialization_alias="attachment-points", default=Interfaces())
 
 class Acls(BaseModel):
     acl: List[Acl] = [Acl()]
-    attachment_points: AttachmentPoints = Field(serialization_alias="attachment-points", default=AttachmentPoints())
+    attachment_points: Optional[Interfaces] = Field(
+        serialization_alias='attachment-points', default=None
+    )
+
 
 class IETF_ACL(BaseModel):
-    acls: Acls = Acls()
-    
+    acls: Optional[Acls] = Field(serialization_alias='ietf-access-control-list:acls', default=None)
+
 
 IETF_TFS_RULE_TYPE_MAPPING = {
-    "ipv4-acl-type": "ACLRULETYPE_IPV4",
-    "ipv6-acl-type": "ACLRULETYPE_IPV6",
+    'ipv4-acl-type': 'ACLRULETYPE_IPV4',
+    'ipv6-acl-type': 'ACLRULETYPE_IPV6',
 }
 
 IETF_TFS_FORWARDING_ACTION_MAPPING = {
-    "accept": "ACLFORWARDINGACTION_ACCEPT",
-    "drop"  : "ACLFORWARDINGACTION_DROP",
+    'accept': 'ACLFORWARDINGACTION_ACCEPT',
+    'drop': 'ACLFORWARDINGACTION_DROP',
 }
 
 TFS_IETF_RULE_TYPE_MAPPING = {
-    "ACLRULETYPE_IPV4": "ipv4-acl-type",
-    "ACLRULETYPE_IPV6": "ipv6-acl-type",
+    'ACLRULETYPE_IPV4': 'ipv4-acl-type',
+    'ACLRULETYPE_IPV6': 'ipv6-acl-type',
 }
 
 TFS_IETF_FORWARDING_ACTION_MAPPING = {
-    "ACLFORWARDINGACTION_ACCEPT": "accept",
-    "ACLFORWARDINGACTION_DROP"  : "drop",
+    'ACLFORWARDINGACTION_ACCEPT': 'accept',
+    'ACLFORWARDINGACTION_DROP': 'drop',
 }
 
+
 def config_rule_from_ietf_acl(
-    device_name : str, endpoint_name : str, acl_set_data : Dict
+    device_name: str, endpoint_name: str, acl_set_data: Dict
 ) -> ConfigRule:
     acl_config_rule = ConfigRule()
     acl_config_rule.action = ConfigActionEnum.CONFIGACTION_SET
@@ -129,18 +151,18 @@ def config_rule_from_ietf_acl(
     acl_rule_set = acl_config_rule.acl.rule_set
     acl_rule_set.name = acl_name
     acl_rule_set.type = acl_type
-    #acl_rule_set.description = ...
+    # acl_rule_set.description = ...
 
     access_control_entry_list = acl_set_data.get('aces', {}).get('ace', [])
-    for sequence_id,ace in enumerate(access_control_entry_list):
-        ace_name    = ace['name']
+    for sequence_id, ace in enumerate(access_control_entry_list):
+        ace_name = ace['name']
         ace_matches = ace.get('matches', {})
         ace_actions = ace.get('actions', {})
 
         acl_entry = AclEntry()
         acl_entry.sequence_id = sequence_id + 1
-        #acl_entry.description = ...
-        
+        acl_entry.description = ace_name
+
         if 'ipv4' in ace_matches:
             ipv4_data = ace_matches['ipv4']
             if 'source-ipv4-network' in ipv4_data:
@@ -157,14 +179,14 @@ def config_rule_from_ietf_acl(
             acl_entry.match.protocol = 6
             tcp_data = ace_matches['tcp']
             if 'source-port' in tcp_data:
-                tcp_src_port : Dict = tcp_data['source-port']
+                tcp_src_port: Dict = tcp_data['source-port']
                 tcp_src_port_op = tcp_src_port.get('operator', 'eq')
                 if tcp_src_port_op != 'eq':
                     MSG = 'Acl({:s})/Ace({:s})/Match/Tcp({:s}) operator not supported'
                     raise NotImplemented(MSG.format(acl_name, ace_name, str(tcp_data)))
                 acl_entry.match.src_port = tcp_src_port['port']
             if 'destination-port' in tcp_data:
-                tcp_dst_port : Dict = tcp_data['destination-port']
+                tcp_dst_port: Dict = tcp_data['destination-port']
                 tcp_dst_port_op = tcp_dst_port.get('operator', 'eq')
                 if tcp_dst_port_op != 'eq':
                     MSG = 'Acl({:s})/Ace({:s})/Match/Tcp({:s}) operator not supported'
@@ -178,14 +200,14 @@ def config_rule_from_ietf_acl(
             acl_entry.match.protocol = 17
             udp_data = ace_matches['udp']
             if 'source-port' in udp_data:
-                udp_src_port : Dict = udp_data['source-port']
+                udp_src_port: Dict = udp_data['source-port']
                 udp_src_port_op = udp_src_port.get('operator', 'eq')
                 if udp_src_port_op != 'eq':
                     MSG = 'Acl({:s})/Ace({:s})/Match/Udp({:s}) operator not supported'
                     raise NotImplemented(MSG.format(acl_name, ace_name, str(udp_data)))
                 acl_entry.match.src_port = udp_src_port['port']
             if 'destination-port' in udp_data:
-                udp_dst_port : Dict = udp_data['destination-port']
+                udp_dst_port: Dict = udp_data['destination-port']
                 udp_dst_port_op = udp_dst_port.get('operator', 'eq')
                 if udp_dst_port_op != 'eq':
                     MSG = 'Acl({:s})/Ace({:s})/Match/Udp({:s}) operator not supported'
@@ -203,55 +225,49 @@ def config_rule_from_ietf_acl(
 
     return acl_config_rule
 
+
 def ietf_acl_from_config_rule_resource_value(config_rule_rv: Dict) -> Dict:
     rule_set = config_rule_rv['rule_set']
-    acl_entry = rule_set['entries'][0]
-    match_ = acl_entry['match']
-
-    ipv4 = Ipv4(
-        dscp=match_["dscp"],
-        source_ipv4_network=match_["src_address"],
-        destination_ipv4_network=match_["dst_address"]
-    )
-    tcp = Tcp(
-        flags=match_["tcp_flags"],
-        source_port=Port(port=match_["src_port"]),
-        destination_port=Port(port=match_["dst_port"])
-    )
-    matches = Matches(ipvr=ipv4, tcp=tcp)
-    aces = Aces(ace=[
-        Ace(
-            matches=matches,
-            actions=Action(
-                forwarding=TFS_IETF_FORWARDING_ACTION_MAPPING[acl_entry["action"]["forward_action"]]
-            )
-        )
-    ])
-    acl = Acl(
-        name=rule_set["name"],
-        type=TFS_IETF_RULE_TYPE_MAPPING[rule_set["type"]],
-        aces=aces
-    )
-    acl_sets = AclSets(
-        acl_sets=AclSet(
-            acl_set=[
-                Name(name=rule_set["name"])
-            ]
-        )
-    )
-    ingress = Ingress(ingress=acl_sets)
-    interfaces = Interfaces(interface=[
-        Interface(
-            interface_id=config_rule_rv["interface"],
-            ingress=ingress
+    ace = []
+
+    for acl_entry in rule_set['entries']:
+        match_ = acl_entry['match']
+        ipv4 = Ipv4(
+            dscp=match_['dscp'],
+            source_ipv4_network=match_['src_address'],
+            destination_ipv4_network=match_['dst_address'],
         )
-    ])
-    acls = Acls(
-        acl=[acl],
-        attachment_points=AttachmentPoints(
-            attachment_points=interfaces
+        tcp = None
+        if match_['tcp_flags']:
+            tcp = Tcp(
+                flags=match_['tcp_flags'],
+                source_port=Port(port=match_['src_port']),
+                destination_port=Port(port=match_['dst_port']),
+            )
+        matches = Matches(ipv4=ipv4, tcp=tcp)
+        ace.append(
+            Ace(
+                name=acl_entry['description'],
+                matches=matches,
+                actions=Action(
+                    forwarding=TFS_IETF_FORWARDING_ACTION_MAPPING[
+                        acl_entry['action']['forward_action']
+                    ]
+                ),
+            )
         )
+    aces = Aces(ace=ace)
+    acl = Acl(name=rule_set['name'], type=TFS_IETF_RULE_TYPE_MAPPING[rule_set['type']], aces=aces)
+    acl_sets = AclSets(acl_sets=AclSet(acl_set=[Name(name=rule_set['name'])]))
+    interfaces = Interfaces(
+        interface=[
+            Interface(
+                interface_id=config_rule_rv['endpoint_id']['endpoint_uuid']['uuid'],
+                ingress=acl_sets,
+            )
+        ]
     )
+    acls = Acls(acl=[acl], attachment_points=interfaces)
     ietf_acl = IETF_ACL(acls=acls)
 
-    return ietf_acl.model_dump(by_alias=True)
+    return ietf_acl.model_dump(by_alias=True, exclude_none=True)
-- 
GitLab


From 48324676ce3753e6afafcee938e7bc7069eda64d Mon Sep 17 00:00:00 2001
From: hajipour 
Date: Fri, 2 May 2025 12:48:45 +0200
Subject: [PATCH 427/463] enhancement: port support added to ACL installation
 flow from IETF ACL in NBI to gNMI/OpenConfig driver in SBI

---
 .../drivers/gnmi_openconfig/handlers/Acl.py   | 20 +++++++++++++++----
 src/nbi/service/ietf_acl/ietf_acl_parser.py   |  8 +++-----
 2 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Acl.py b/src/device/service/drivers/gnmi_openconfig/handlers/Acl.py
index bdfeec430..9617471cb 100644
--- a/src/device/service/drivers/gnmi_openconfig/handlers/Acl.py
+++ b/src/device/service/drivers/gnmi_openconfig/handlers/Acl.py
@@ -63,16 +63,28 @@ class AclHandler(_Handler):
         y_entries = y_set.create_path('acl-entries')
         for entry in rs.get('entries', []):
             seq = int(entry['sequence_id'])
-            src = entry['match'].get('src_address', '0.0.0.0/0')
-            dst = entry['match'].get('dst_address', '0.0.0.0/0')
+            m_ = entry["match"]
+            src_address = m_.get('src_address', '0.0.0.0/0')
+            dst_address = m_.get('dst_address', '0.0.0.0/0')
+            src_port = m_.get("src_port")
+            dst_port = m_.get("dst_port")
             act = _TFS_OC_FWD_ACTION[entry['action']['forward_action']]
 
             y_e = y_entries.create_path(f'acl-entry[sequence-id="{seq}"]')
             y_e.create_path('config/sequence-id', seq)
 
             y_ipv4 = y_e.create_path('ipv4')
-            y_ipv4.create_path('config/source-address', src)
-            y_ipv4.create_path('config/destination-address', dst)
+            y_ipv4.create_path('config/source-address', src_address)
+            y_ipv4.create_path('config/destination-address', dst_address)
+
+            if src_port or dst_port:
+                proto = m_.get("protocol")
+                y_trans = y_e.create_path("transport")
+                if src_port:
+                    y_trans.create_path("config/source-port", int(src_port))
+                if dst_port:
+                    y_trans.create_path("config/destination-port", int(dst_port))
+                y_ipv4.create_path('config/protocol', int(proto))
 
             y_act = y_e.create_path('actions')
             y_act.create_path('config/forwarding-action', act)
diff --git a/src/nbi/service/ietf_acl/ietf_acl_parser.py b/src/nbi/service/ietf_acl/ietf_acl_parser.py
index 929b69233..66259f281 100644
--- a/src/nbi/service/ietf_acl/ietf_acl_parser.py
+++ b/src/nbi/service/ietf_acl/ietf_acl_parser.py
@@ -39,11 +39,9 @@ class Port(BaseModel):
 
 
 class Tcp(BaseModel):
-    flags: str = ''
-    source_port: Port = Field(serialization_alias='source-port', default_factory=lambda: Port())
-    destination_port: Port = Field(
-        serialization_alias='destination-port', default_factory=lambda: Port()
-    )
+    flags: Optional[str] = None
+    source_port: Optional[Port] = Field(serialization_alias='source-port', default=None)
+    destination_port: Optional[Port] = Field(serialization_alias='destination-port', default=None)
 
 
 class Matches(BaseModel):
-- 
GitLab


From 6043618872050a2e377d6eb721bb8f5f3ef11b43 Mon Sep 17 00:00:00 2001
From: Javier Mateos Najari 
Date: Mon, 5 May 2025 09:47:37 +0200
Subject: [PATCH 428/463] refactor(drivers): respect the driver's interface

---
 .../drivers/morpheus/MorpheusApiDriver.py     | 136 +++++++++++-------
 src/device/tests/test_unitary_morpheus.py     |  36 ++---
 2 files changed, 95 insertions(+), 77 deletions(-)

diff --git a/src/device/service/drivers/morpheus/MorpheusApiDriver.py b/src/device/service/drivers/morpheus/MorpheusApiDriver.py
index f9b033cc3..fd4d2a72f 100644
--- a/src/device/service/drivers/morpheus/MorpheusApiDriver.py
+++ b/src/device/service/drivers/morpheus/MorpheusApiDriver.py
@@ -1,4 +1,4 @@
-import logging, requests, threading, json
+import logging, requests, threading, json, time
 from typing import Any, Iterator, List, Optional, Tuple, Union, Dict
 from queue import Queue
 from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method
@@ -46,10 +46,10 @@ class MorpheusApiDriver(_Driver):
         with self.__lock:
             try:
                 if self.__detection_thread and self.__detection_thread.is_alive():
-                    self.UnsubscribeDetectionEvent()
+                    self.__unsubscribe_detection_event()
 
                 if self.__pipeline_thread and self.__pipeline_thread.is_alive():
-                    self.UnsubscribePipelineError()
+                    self.__unsubscribe_pipeline_error()
             except Exception as e:
                 LOGGER.exception(f'Error during disconnect: {str(e)}')
 
@@ -94,7 +94,7 @@ class MorpheusApiDriver(_Driver):
                             results.append(config[key])
                         except KeyError:
                             results.append(None)
-                        except Exception as e:
+                except Exception as e:
                             results.append(e)
 
                     return results
@@ -120,23 +120,72 @@ class MorpheusApiDriver(_Driver):
                 results.append(e)
         return results
 
-    def GetState(self) -> List[Tuple[str, Any]]:
-        url = self.__morpheus_root + '/restconf/data/naudit-morpheus:morpheus/state'
-        with self.__lock:
+    def GetState(self, blocking=False, terminate: Optional[threading.Event] = None) -> Iterator[Tuple[float, str, Any]]:
+        while True:
+            if self.__terminate.is_set(): break
+            if terminate is not None and terminate.is_set(): break
+
+            internal_state = self.__get_state()
+            if internal_state is not None:
+                timestamp = time.time()
+                yield(timestamp, 'state', internal_state)
+
+            pipeline_error_empty = False
+            detection_event_empty = False
+
             try:
-                response = requests.get(url, headers=self.__headers, timeout=self.__timeout, verify=False)
-                if response.ok:
-                    state = response.json()
-                    result = []
-                    for key, value in state.items():
-                        result.append((key, value))
-                    return result
-                return []
-            except Exception as e:
-                LOGGER.exception(f'Error getting state: {str(e)}')
-                return []
+                error = self.__pipeline_error_queue.get(block=False, timeout=0.1)
+                if error is not None:
+                    yield (error.get('eventTime', time.time()), 'pipeline_error', error.get('event'),)
+            except queue.Empty:
+                pipeline_error_empty = True
 
-    def StartPipeline(self) -> Union[bool, Exception]:
+            try:
+                event = self.__detection_queue.get(block=False, timeout=0.1)
+                if event is not None:
+                    yield (event.get('eventTime', time.time()), 'detection_event', error.get('event'),)
+            except queue.Empty:
+                detection_event_empty = True
+
+            if pipeline_error_empty and detection_event_empty:
+                if blocking:
+                    continue
+                return
+
+    @metered_subclass_method(METRICS_POOL)
+    def SubscribeState(self, subscriptions: List[Tuple[str, float, float]]) -> List[Union[bool,Exception]]:
+        results = []
+        rollback_stack = []
+        operations = [
+                (self.__subscribe_detection_event, self.__unsubscribe_detection_event),
+                (self.__subscribe_pipeline_error, self.__unsubscribe_pipeline_error),
+                (self.__start_pipeline, self.__stop_pipeline),
+        ]
+        for i, (sub_op, unsub_op) in enumerate(operations):
+            result = sub_op()
+            reuslts.append(result)
+            if isinstance(result, Exception):
+                while rollback_stack:
+                    rollback_op = rollback_stack.pop()
+                    try:
+                        rollback_op()
+                    except Exception as e:
+                        LOGGER.exception(f'Error during subscription rollback operation: {e}')
+
+                return results
+
+            rollback_stack.append(unsub_op)
+        return results
+
+    @metered_subclass_method(METRICS_POOL)
+    def UnsubscribeState(self, subscriptions: List[Tuple[str,float,float]]) -> List[Union[bool, Exception]]:
+        results = []
+        results.append(self.__stop_pipeline())
+        results.append(self.__unsubscribe_pipeline_error())
+        results.append(self.__unsubscribe_detection_event())
+        return results
+
+    def __start_pipeline(self) -> Union[bool, Exception]:
         url = self.__morpheus_root + '/restconf/data/naudit-morpheus:morpheus/start'
         with self.__lock:
             try:
@@ -147,7 +196,7 @@ class MorpheusApiDriver(_Driver):
                 LOGGER.exception(f'Error starting pipeline: {e}')
                 return e
 
-    def StopPipeline(self) -> Union[bool, Exception]:
+    def __stop_pipeline(self) -> Union[bool, Exception]:
         url = self.__morpheus_root + '/restconf/data/naudit-morpheus:morpheus/stop'
         with self.__lock:
             try:
@@ -156,10 +205,9 @@ class MorpheusApiDriver(_Driver):
                 return True
             except Exception as e:
                 LOGGER.exception(f'Error stopping pipeline: {e}')
-                return False
+                return e
 
-    @metered_subclass_method(METRICS_POOL)
-    def SubscribeDetectionEvent(self) -> Union[bool, Exception]:
+    def __subscribe_detection_event(self) -> Union[bool, Exception]:
         url = self.__morpheus_root + '/restconf/streams/naudit-morpheus:morpheus/detection-event'
         with self.__lock:
             try:
@@ -174,8 +222,7 @@ class MorpheusApiDriver(_Driver):
                 LOGGER.exception(f'Error subscribing to detection events: {str(e)}')
                 return e
 
-    @metered_subclass_method(METRICS_POOL)
-    def UnsubscribeDetectionEvent(self) -> Union[bool, Exception]:
+    def __unsubscribe_detection_event(self) -> Union[bool, Exception]:
         try:
             if self.__detection_thread and self.__detection_thread.is_alive():
                 self.__detection_thread.join(timeout=5)
@@ -184,20 +231,7 @@ class MorpheusApiDriver(_Driver):
             LOGGER.exception(f'Error unsubscribing from detection events: {str(e)}')
             return e
 
-    def GetDetectionEvent(self, blocking=False, terminate : Optional[threading.Event] = None) -> Iterator[Dict]:
-        while True:
-            if self.__terminate.is_set(): break
-            if terminate is not None and terminate.is_set(): break
-            try:
-                event = self.__detection_queue.get(block=blocking, timeout=0.1)
-                if event is not None:
-                    yield event
-            except queue.Empty:
-                if blocking:
-                    continue
-                return
-
-    def SubscribePipelineError(self) -> Union[bool, Exception]:
+    def __subscribe_pipeline_error(self) -> Union[bool, Exception]:
         url = self.__morpheus_root + '/restconf/streams/naudit-morpheus:morpheus/pipeline-error'
         with self.__lock:
             try:
@@ -212,7 +246,7 @@ class MorpheusApiDriver(_Driver):
                 LOGGER.exception(f'Error subscribing to pipeline errors: {str(e)}')
                 return e
 
-    def UnsubscribePipelineError(self) -> Union[bool, Exception]:
+    def __unsubscribe_pipeline_error(self) -> Union[bool, Exception]:
         try:
             if self.__pipeline_error_thread and self.__pipeline_error_thread.is_alive():
                 self.__pipeline_error_thread.join(timeout=5)
@@ -221,18 +255,18 @@ class MorpheusApiDriver(_Driver):
             LOGGER.exception(f'Error unsubscribing from pipeline errors: {str(e)}')
             return e
 
-    def GetPipelineError(self, blocking=False, terminate: Optional[threading.Event] = None) -> Iterator[Dict]:
-        while True:
-            if self.__terminate.is_set(): break
-            if terminate is not None and terminate.is_set(): break
+    def __get_state(self) -> Dict:
+        url = self.__morpheus_root + '/restconf/data/naudit-morpheus:morpheus/state'
+        with self.__lock:
             try:
-                error = self.__pipeline_error_queue.get(block=blocking, timeout=0.1)
-                if error is not None:
-                    yield error
-            except queue.Empty:
-                if blocking:
-                    continue
-                return
+                response = requests.get(url, headers=self.__headers, timeout=self.__timeout, verify=False)
+                if response.ok:
+                    state = response.json()
+                    return state
+            except Exception as e:
+                LOGGER.exception(f'Error getting internal state: {e}')
+        return None
+
 
     def __handle_notification_stream(self, url: str, queue: Queue[Any]) -> None:
         try:
diff --git a/src/device/tests/test_unitary_morpheus.py b/src/device/tests/test_unitary_morpheus.py
index cf754e091..3fa1f8688 100644
--- a/src/device/tests/test_unitary_morpheus.py
+++ b/src/device/tests/test_unitary_morpheus.py
@@ -3,6 +3,7 @@ os.environ['DEVICE_EMULATED_ONLY'] = 'YES'
 
 # pylint: disable=wrong-import-position
 import json
+import threading
 import logging, pytest, time
 from typing import Dict, List
 from device.service.drivers.morpheus.MorpheusApiDriver import MorpheusApiDriver
@@ -56,36 +57,19 @@ def test_set_config(driver: MorpheusApiDriver):
     assert results[0] is True, "Expected a succesfull result"
 
 def test_retrieve_state(driver: MorpheusApiDriver):
+    results = driver.SubscribeState()
+
+    assert all(isinstance(result, bool) and result for result in results), \
+            f"Subscription error: {results}"
+
     state = driver.GetState()
 
-    assert isinstance(state, list), "Expected a a list for initial config"
+    assert isinstance(state, iter), "Expected an iterator for state"
     assert len(state) > 0, " State should not be empty"
 
     print_data("State", state)
 
-def test_pipeline(driver: MorpheusApiDriver):
-    result = driver.StartPipeline()
-
-    assert result is True
-
-    result = driver.StopPipeline()
-
-    assert result is True
-
-def test_subscription_detection(driver: MorpheusApiDriver):
-    result = driver.SubscribeDetectionEvent()
-
-    assert result is True
-
-    result = driver.UnsubscribeDetectionEvent()
-
-    assert result is True
-
-def test_subscription_error(driver: MorpheusApiDriver):
-    result = driver.SubscribePipelineError()
-
-    assert result is True
-
-    result = driver.UnsubscribePipelineError()
+    results = driver.UnsubscribeState()
 
-    assert result is True
+    assert all(isinstance(result, bool) and result for result in results), \
+            f"Unsubscription error: {results}"
-- 
GitLab


From 6b03c8fc01c6e73ce3f93205b4470fcc8b26ac05 Mon Sep 17 00:00:00 2001
From: Javier Mateos Najari 
Date: Mon, 5 May 2025 09:50:35 +0200
Subject: [PATCH 429/463] feat(morpheus): add morpheus driver to controller

---
 proto/context.proto                                   |  1 +
 src/common/DeviceTypes.py                             |  1 +
 .../service/database/models/enums/DeviceDriver.py     |  1 +
 src/device/service/drivers/__init__.py                | 11 +++++++++++
 src/webui/service/device/forms.py                     |  1 +
 src/webui/service/device/routes.py                    |  2 ++
 src/webui/service/templates/device/add.html           |  3 ++-
 7 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/proto/context.proto b/proto/context.proto
index 01e096233..42b8a69cc 100644
--- a/proto/context.proto
+++ b/proto/context.proto
@@ -226,6 +226,7 @@ enum DeviceDriverEnum {
   DEVICEDRIVER_IETF_L3VPN = 13;
   DEVICEDRIVER_IETF_SLICE = 14;
   DEVICEDRIVER_NCE = 15;
+  DEVICEDRIVER_MORPHEUS = 16;
 }
 
 enum DeviceOperationalStatusEnum {
diff --git a/src/common/DeviceTypes.py b/src/common/DeviceTypes.py
index 9a982d1eb..b917524a6 100644
--- a/src/common/DeviceTypes.py
+++ b/src/common/DeviceTypes.py
@@ -50,6 +50,7 @@ class DeviceTypeEnum(Enum):
     XR_CONSTELLATION                = 'xr-constellation'
     QKD_NODE                        = 'qkd-node'
     OPEN_ROADM                      = 'openroadm'
+    MORPHEUS                        = 'morpheus'
 
     # ETSI TeraFlowSDN controller
     TERAFLOWSDN_CONTROLLER          = 'teraflowsdn'
diff --git a/src/context/service/database/models/enums/DeviceDriver.py b/src/context/service/database/models/enums/DeviceDriver.py
index fe0d83fb1..216cd4461 100644
--- a/src/context/service/database/models/enums/DeviceDriver.py
+++ b/src/context/service/database/models/enums/DeviceDriver.py
@@ -38,6 +38,7 @@ class ORM_DeviceDriverEnum(enum.Enum):
     IETF_SLICE            = DeviceDriverEnum.DEVICEDRIVER_IETF_SLICE
     OC                    = DeviceDriverEnum.DEVICEDRIVER_OC
     QKD                   = DeviceDriverEnum.DEVICEDRIVER_QKD
+    MORPHEUS              = DeviceDriverEnum.DEVICEDRIVER_MORPHEUS
 
 grpc_to_enum__device_driver = functools.partial(
     grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum)
diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py
index e3102cdf5..fdbf4739a 100644
--- a/src/device/service/drivers/__init__.py
+++ b/src/device/service/drivers/__init__.py
@@ -217,3 +217,14 @@ if LOAD_ALL_DEVICE_DRIVERS:
                 FilterFieldEnum.DRIVER     : DeviceDriverEnum.DEVICEDRIVER_QKD,
             }
         ]))
+
+if LOAD_ALL_DEVICE_DRIVERS:
+    from .morpheus.MorpheusApiDriver import MorpheusAPIDriver
+    DRIVERS.append(
+        (MorpheusAPIDriver, [
+            {
+                # Close enough, it does optical switching
+                FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.MORPHEUS,
+                FilterFieldEnum.DRIVER     : DeviceDriverEnum.DEVICEDRIVER_MORPHEUS,
+            }
+        ]))
diff --git a/src/webui/service/device/forms.py b/src/webui/service/device/forms.py
index 4fa6829e7..3005c4cb3 100644
--- a/src/webui/service/device/forms.py
+++ b/src/webui/service/device/forms.py
@@ -34,6 +34,7 @@ class AddDeviceForm(FlaskForm):
     device_drivers_optical_tfs = BooleanField('OPTICAL TFS')
     device_drivers_ietf_actn = BooleanField('IETF ACTN')
     device_drivers_qkd = BooleanField('QKD')
+    device_drivers_morpheus = BooleanField('MORPHEUS')
 
     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)])
diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py
index 16b86c769..a7dbd5e02 100644
--- a/src/webui/service/device/routes.py
+++ b/src/webui/service/device/routes.py
@@ -135,6 +135,8 @@ def add():
             device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN)
         if form.device_drivers_qkd.data:
             device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_QKD)
+        if form.device_drivers_morpheus.data:
+            device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_MORPHEUS)
         device_obj.device_drivers.extend(device_drivers) # pylint: disable=no-member
 
         try:
diff --git a/src/webui/service/templates/device/add.html b/src/webui/service/templates/device/add.html
index b5628ab59..b39ce33ad 100644
--- a/src/webui/service/templates/device/add.html
+++ b/src/webui/service/templates/device/add.html
@@ -96,6 +96,7 @@
                 {{ form.device_drivers_optical_tfs }} {{ form.device_drivers_optical_tfs.label(class="col-sm-3 col-form-label") }}
                 {{ form.device_drivers_ietf_actn }} {{ form.device_drivers_ietf_actn.label(class="col-sm-3 col-form-label") }}
                 {{ form.device_drivers_qkd }} {{ form.device_drivers_qkd.label(class="col-sm-3 col-form-label") }}
+                {{ form.device_drivers_morpheus }} {{ form.device_drivers_morpheus.label(class="col-sm-3 col-form-label") }}
                 {% endif %}
             
@@ -159,4 +160,4 @@
-{% endblock %} \ No newline at end of file +{% endblock %} -- GitLab From fa23a381ec0ef4edc9a84e6b12b8978ebd2ea25f Mon Sep 17 00:00:00 2001 From: Javier Mateos Najari Date: Mon, 5 May 2025 09:51:10 +0200 Subject: [PATCH 430/463] fix(morpheus): add copyright --- scripts/run_tests_locally-device-morpheus.sh | 13 +++++++++++++ .../service/drivers/morpheus/MorpheusApiDriver.py | 14 ++++++++++++++ src/device/tests/test_unitary_morpheus.py | 14 ++++++++++++++ 3 files changed, 41 insertions(+) diff --git a/scripts/run_tests_locally-device-morpheus.sh b/scripts/run_tests_locally-device-morpheus.sh index 1af88264e..b96fb6f05 100755 --- a/scripts/run_tests_locally-device-morpheus.sh +++ b/scripts/run_tests_locally-device-morpheus.sh @@ -1,4 +1,17 @@ #!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. PROJECTDIR=`pwd` diff --git a/src/device/service/drivers/morpheus/MorpheusApiDriver.py b/src/device/service/drivers/morpheus/MorpheusApiDriver.py index fd4d2a72f..3bef23a50 100644 --- a/src/device/service/drivers/morpheus/MorpheusApiDriver.py +++ b/src/device/service/drivers/morpheus/MorpheusApiDriver.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, threading, json, time from typing import Any, Iterator, List, Optional, Tuple, Union, Dict from queue import Queue diff --git a/src/device/tests/test_unitary_morpheus.py b/src/device/tests/test_unitary_morpheus.py index 3fa1f8688..b909dddb9 100644 --- a/src/device/tests/test_unitary_morpheus.py +++ b/src/device/tests/test_unitary_morpheus.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 os os.environ['DEVICE_EMULATED_ONLY'] = 'YES' -- GitLab From da3611de12c56c844464bb37c72a62a9536f5eb6 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 5 May 2025 09:45:54 +0000 Subject: [PATCH 431/463] Pre-merge code cleanup --- src/device/service/drivers/__init__.py | 21 +++--- .../drivers/morpheus/MorpheusApiDriver.py | 71 +++++++++---------- .../service/drivers/morpheus/__init__.py | 13 ++++ 3 files changed, 56 insertions(+), 49 deletions(-) create mode 100644 src/device/service/drivers/morpheus/__init__.py diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index cf163474c..fec407df9 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -173,6 +173,16 @@ if LOAD_ALL_DEVICE_DRIVERS: } ])) +if LOAD_ALL_DEVICE_DRIVERS: + from .morpheus.MorpheusApiDriver import MorpheusApiDriver + DRIVERS.append( + (MorpheusApiDriver, [ + { + # Close enough, it does optical switching + FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.MORPHEUS, + FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_MORPHEUS, + } + ])) if LOAD_ALL_DEVICE_DRIVERS: from .microwave.IETFApiDriver import IETFApiDriver # pylint: disable=wrong-import-position @@ -232,14 +242,3 @@ if LOAD_ALL_DEVICE_DRIVERS: FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_QKD, } ])) - -if LOAD_ALL_DEVICE_DRIVERS: - from .morpheus.MorpheusApiDriver import MorpheusAPIDriver - DRIVERS.append( - (MorpheusAPIDriver, [ - { - # Close enough, it does optical switching - FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.MORPHEUS, - FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_MORPHEUS, - } - ])) diff --git a/src/device/service/drivers/morpheus/MorpheusApiDriver.py b/src/device/service/drivers/morpheus/MorpheusApiDriver.py index 3bef23a50..10181171f 100644 --- a/src/device/service/drivers/morpheus/MorpheusApiDriver.py +++ b/src/device/service/drivers/morpheus/MorpheusApiDriver.py @@ -12,9 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, requests, threading, json, time +import json, logging, queue, requests, threading, time from typing import Any, Iterator, List, Optional, Tuple, Union, Dict -from queue import Queue from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from device.service.driver_api._Driver import _Driver @@ -38,8 +37,8 @@ class MorpheusApiDriver(_Driver): self.__pipeline_error_thread = None size = self.settings.get('queue_events_size', 10) - self.__pipeline_error_queue = Queue(maxsize=size) - self.__detection_queue = Queue(maxsize=size) + self.__pipeline_error_queue = queue.Queue(maxsize=size) + self.__detection_queue = queue.Queue(maxsize=size) def Connect(self) -> bool: url = self.__morpheus_root + '/restconf/data/naudit-morpheus:morpheus' @@ -62,10 +61,10 @@ class MorpheusApiDriver(_Driver): if self.__detection_thread and self.__detection_thread.is_alive(): self.__unsubscribe_detection_event() - if self.__pipeline_thread and self.__pipeline_thread.is_alive(): + if self.__pipeline_error_thread and self.__pipeline_error_thread.is_alive(): self.__unsubscribe_pipeline_error() - except Exception as e: - LOGGER.exception(f'Error during disconnect: {str(e)}') + except Exception: # pylint: disable=broad-except + LOGGER.exception('Error during disconnect') self.__terminate.set() return True @@ -84,7 +83,7 @@ class MorpheusApiDriver(_Driver): result.append((key, value)) return result - except Exception as e: + except Exception: # pylint: disable=broad-except LOGGER.exception('Exception getting initial config {:s}'.format(str(self.__morpheus_root))) return [] @@ -105,16 +104,12 @@ class MorpheusApiDriver(_Driver): for key in resource_keys: try: - results.append(config[key]) - except KeyError: - results.append(None) - except Exception as e: - results.append(e) - + results.append((key, config[key])) + except Exception as e: # pylint: disable=broad-except + results.append((key, e)) return results - return [(key, None) for key in resource_keys] - except Exception as e: - LOGGER.exception(f'Error getting config: {str(e)}') + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Error getting config') return [(key, e) for key in resource_keys] @metered_subclass_method(METRICS_POOL) @@ -175,16 +170,16 @@ class MorpheusApiDriver(_Driver): (self.__subscribe_pipeline_error, self.__unsubscribe_pipeline_error), (self.__start_pipeline, self.__stop_pipeline), ] - for i, (sub_op, unsub_op) in enumerate(operations): + for _, (sub_op, unsub_op) in enumerate(operations): result = sub_op() - reuslts.append(result) + results.append(result) if isinstance(result, Exception): while rollback_stack: rollback_op = rollback_stack.pop() try: rollback_op() - except Exception as e: - LOGGER.exception(f'Error during subscription rollback operation: {e}') + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Error during subscription rollback operation') return results @@ -206,8 +201,8 @@ class MorpheusApiDriver(_Driver): response = requests.post(url, headers=self.__headers, timeout=self.__timeout, verify=False) response.raise_for_status() return True - except Exception as e: - LOGGER.exception(f'Error starting pipeline: {e}') + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Error starting pipeline') return e def __stop_pipeline(self) -> Union[bool, Exception]: @@ -217,8 +212,8 @@ class MorpheusApiDriver(_Driver): response = requests.post(url, headers=self.__headers, timeout=self.__timeout, verify=False) response.raise_for_status() return True - except Exception as e: - LOGGER.exception(f'Error stopping pipeline: {e}') + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Error stopping pipeline') return e def __subscribe_detection_event(self) -> Union[bool, Exception]: @@ -232,8 +227,8 @@ class MorpheusApiDriver(_Driver): ) self.__detection_thread.start() return True - except Exception as e: - LOGGER.exception(f'Error subscribing to detection events: {str(e)}') + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Error subscribing to detection events') return e def __unsubscribe_detection_event(self) -> Union[bool, Exception]: @@ -241,8 +236,8 @@ class MorpheusApiDriver(_Driver): if self.__detection_thread and self.__detection_thread.is_alive(): self.__detection_thread.join(timeout=5) return True - except Exception as e: - LOGGER.exception(f'Error unsubscribing from detection events: {str(e)}') + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Error unsubscribing from detection events') return e def __subscribe_pipeline_error(self) -> Union[bool, Exception]: @@ -256,8 +251,8 @@ class MorpheusApiDriver(_Driver): ) self.__pipeline_error_thread.start() return True - except Exception as e: - LOGGER.exception(f'Error subscribing to pipeline errors: {str(e)}') + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Error subscribing to pipeline errors') return e def __unsubscribe_pipeline_error(self) -> Union[bool, Exception]: @@ -265,8 +260,8 @@ class MorpheusApiDriver(_Driver): if self.__pipeline_error_thread and self.__pipeline_error_thread.is_alive(): self.__pipeline_error_thread.join(timeout=5) return True - except Exception as e: - LOGGER.exception(f'Error unsubscribing from pipeline errors: {str(e)}') + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Error unsubscribing from pipeline errors') return e def __get_state(self) -> Dict: @@ -277,12 +272,12 @@ class MorpheusApiDriver(_Driver): if response.ok: state = response.json() return state - except Exception as e: - LOGGER.exception(f'Error getting internal state: {e}') + except Exception: # pylint: disable=broad-except + LOGGER.exception('Error getting internal state') return None - def __handle_notification_stream(self, url: str, queue: Queue[Any]) -> None: + def __handle_notification_stream(self, url: str, queue: queue.Queue[Any]) -> None: try: with requests.get(url, headers=self.__headers, @@ -298,5 +293,5 @@ class MorpheusApiDriver(_Driver): queue.put(event['data']['ietf-restconf:notification']) except json.JSONDecodeError as e: LOGGER.error(f'Error parsing event: {e}') - except Exception as e: - LOGGER.exception(f'Error in notification stream handler: {str(e)}') + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Error in notification stream handler') diff --git a/src/device/service/drivers/morpheus/__init__.py b/src/device/service/drivers/morpheus/__init__.py new file mode 100644 index 000000000..023830645 --- /dev/null +++ b/src/device/service/drivers/morpheus/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. -- GitLab From 26b8ec13e0a9e3fcef48cb61fb4d3cc3fe1d2d09 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 5 May 2025 10:06:51 +0000 Subject: [PATCH 432/463] Pre-merge code cleanup --- src/device/.gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/device/.gitlab-ci.yml b/src/device/.gitlab-ci.yml index 0c093b570..c216b14bf 100644 --- a/src/device/.gitlab-ci.yml +++ b/src/device/.gitlab-ci.yml @@ -20,6 +20,8 @@ build device: stage: build before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - docker ps -aq | xargs -r docker rm -f + - containerlab destroy --all --cleanup || true script: - docker buildx build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . - docker tag "$IMAGE_NAME:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" -- GitLab From 58af26b9e5486d9f667dd697a913caea781e3f7f Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 5 May 2025 15:49:49 +0000 Subject: [PATCH 433/463] Pre-merge code cleanup --- src/device/tests/test_unitary_morpheus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device/tests/test_unitary_morpheus.py b/src/device/tests/test_unitary_morpheus.py index b909dddb9..518cea9ed 100644 --- a/src/device/tests/test_unitary_morpheus.py +++ b/src/device/tests/test_unitary_morpheus.py @@ -71,7 +71,7 @@ def test_set_config(driver: MorpheusApiDriver): assert results[0] is True, "Expected a succesfull result" def test_retrieve_state(driver: MorpheusApiDriver): - results = driver.SubscribeState() + results = driver.SubscribeState([]) assert all(isinstance(result, bool) and result for result in results), \ f"Subscription error: {results}" @@ -83,7 +83,7 @@ def test_retrieve_state(driver: MorpheusApiDriver): print_data("State", state) - results = driver.UnsubscribeState() + results = driver.UnsubscribeState([]) assert all(isinstance(result, bool) and result for result in results), \ f"Unsubscription error: {results}" -- GitLab From 4f227e51bd4fd51f588cee03f917807444abab1d Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 5 May 2025 15:58:58 +0000 Subject: [PATCH 434/463] Pre-merge code cleanup --- scripts/run_tests_locally-device-morpheus.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/run_tests_locally-device-morpheus.sh b/scripts/run_tests_locally-device-morpheus.sh index b96fb6f05..f9666e424 100755 --- a/scripts/run_tests_locally-device-morpheus.sh +++ b/scripts/run_tests_locally-device-morpheus.sh @@ -17,6 +17,11 @@ PROJECTDIR=`pwd` cd $PROJECTDIR/src RCFILE=$PROJECTDIR/coverage/.coveragerc +COVERAGEFILE=$PROJECTDIR/coverage/.coverage + +# Destroy old coverage file and configure the correct folder on the .coveragerc file +rm -f $COVERAGEFILE +cat $PROJECTDIR/coverage/.coveragerc.template | sed s+~/tfs-ctrl+$PROJECTDIR+g > $RCFILE # Run unitary tests and analyze coverage of code at same time coverage run --rcfile=$RCFILE --append -m pytest -s --log-level=INFO --verbose \ -- GitLab From 7f2d5e26917c1f87344b88ea13bd2ed382add304 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 5 May 2025 16:09:28 +0000 Subject: [PATCH 435/463] Pre-merge code cleanup --- src/device/tests/test_unitary_morpheus.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/device/tests/test_unitary_morpheus.py b/src/device/tests/test_unitary_morpheus.py index 518cea9ed..c3c2788d1 100644 --- a/src/device/tests/test_unitary_morpheus.py +++ b/src/device/tests/test_unitary_morpheus.py @@ -16,10 +16,7 @@ import os os.environ['DEVICE_EMULATED_ONLY'] = 'YES' # pylint: disable=wrong-import-position -import json -import threading -import logging, pytest, time -from typing import Dict, List +import json, logging, pytest, time, types from device.service.drivers.morpheus.MorpheusApiDriver import MorpheusApiDriver logging.basicConfig(level=logging.DEBUG) @@ -78,10 +75,11 @@ def test_retrieve_state(driver: MorpheusApiDriver): state = driver.GetState() - assert isinstance(state, iter), "Expected an iterator for state" - assert len(state) > 0, " State should not be empty" - - print_data("State", state) + assert isinstance(state, types.GeneratorType), "Expected an iterator for state" + for item in state: + #assert len(state) > 0, " State should not be empty" + print_data("State Item", item) + break results = driver.UnsubscribeState([]) -- GitLab From 98b68808068ba818bed77ad9bf0a6119215f342b Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 5 May 2025 16:19:00 +0000 Subject: [PATCH 436/463] Pre-merge code cleanup --- src/device/tests/test_unitary_morpheus.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/device/tests/test_unitary_morpheus.py b/src/device/tests/test_unitary_morpheus.py index c3c2788d1..bb96289b6 100644 --- a/src/device/tests/test_unitary_morpheus.py +++ b/src/device/tests/test_unitary_morpheus.py @@ -73,13 +73,13 @@ def test_retrieve_state(driver: MorpheusApiDriver): assert all(isinstance(result, bool) and result for result in results), \ f"Subscription error: {results}" - state = driver.GetState() + state = driver.GetState(blocking=True) assert isinstance(state, types.GeneratorType), "Expected an iterator for state" - for item in state: + for i, item in enumerate(state): #assert len(state) > 0, " State should not be empty" print_data("State Item", item) - break + if i > 3: break results = driver.UnsubscribeState([]) -- GitLab From 4295fcc41e282f1f050caa71d350f584fc10bbff Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 5 May 2025 16:23:43 +0000 Subject: [PATCH 437/463] Pre-merge code cleanup --- src/device/tests/test_unitary_morpheus.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/device/tests/test_unitary_morpheus.py b/src/device/tests/test_unitary_morpheus.py index bb96289b6..6e4af77a2 100644 --- a/src/device/tests/test_unitary_morpheus.py +++ b/src/device/tests/test_unitary_morpheus.py @@ -76,9 +76,14 @@ def test_retrieve_state(driver: MorpheusApiDriver): state = driver.GetState(blocking=True) assert isinstance(state, types.GeneratorType), "Expected an iterator for state" - for i, item in enumerate(state): - #assert len(state) > 0, " State should not be empty" - print_data("State Item", item) + i = 0 + for item in state: + if i == 0: + print_data("State Item", item) + else: + if item[1] == 'state': continue + print_data("Other Item", item) + i += 1 if i > 3: break results = driver.UnsubscribeState([]) -- GitLab From aa2859d14059d12e8b3964050a2de7e73954a877 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 5 May 2025 16:26:42 +0000 Subject: [PATCH 438/463] Pre-merge code cleanup --- src/device/tests/test_unitary_morpheus.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/device/tests/test_unitary_morpheus.py b/src/device/tests/test_unitary_morpheus.py index 6e4af77a2..27de889e5 100644 --- a/src/device/tests/test_unitary_morpheus.py +++ b/src/device/tests/test_unitary_morpheus.py @@ -80,6 +80,7 @@ def test_retrieve_state(driver: MorpheusApiDriver): for item in state: if i == 0: print_data("State Item", item) + i += 1 else: if item[1] == 'state': continue print_data("Other Item", item) -- GitLab From 41ba7fc42623d8a8f959cfc5bc820ef5c8296236 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Mon, 5 May 2025 17:15:30 +0000 Subject: [PATCH 439/463] Add missing header --- .../drivers/gnmi_openconfig/handlers/Acl.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Acl.py b/src/device/service/drivers/gnmi_openconfig/handlers/Acl.py index 9617471cb..4173b8f4c 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Acl.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Acl.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 from typing import Any, Dict, List, Tuple -- GitLab From f2bdaff9687239c9db22a59a8e299ee2b6794497 Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Mon, 5 May 2025 21:04:26 +0300 Subject: [PATCH 440/463] fix: ignore default rules when service config exists --- .../frontend/service/algorithms/_Algorithm.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/pathcomp/frontend/service/algorithms/_Algorithm.py b/src/pathcomp/frontend/service/algorithms/_Algorithm.py index ea54f7797..0a0861a0e 100644 --- a/src/pathcomp/frontend/service/algorithms/_Algorithm.py +++ b/src/pathcomp/frontend/service/algorithms/_Algorithm.py @@ -176,13 +176,19 @@ class _Algorithm: service.service_id.context_id.context_uuid.uuid = context_uuid service.service_id.service_uuid.uuid = service_uuid service.service_type = service_type + rules_nb = len(config_rules) - if service_type == ServiceTypeEnum.SERVICETYPE_L2NM: + if service_type == ServiceTypeEnum.SERVICETYPE_L2NM and rules_nb == 0: compose_l2nm_config_rules(config_rules, service.service_config.config_rules) - elif service_type == ServiceTypeEnum.SERVICETYPE_L3NM: + self.logger.info("Installing default rules for L2NM service") + pass + elif service_type == ServiceTypeEnum.SERVICETYPE_L3NM and rules_nb == 0: compose_l3nm_config_rules(config_rules, service.service_config.config_rules) - elif service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE: + self.logger.info("Installing default rules for L3NM service") + pass + elif service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE and rules_nb == 0: compose_tapi_config_rules(config_rules, service.service_config.config_rules) + self.logger.info("Installing default rules for TAPI service") else: MSG = 'Unhandled generic Config Rules for service {:s} {:s}' self.logger.warning(MSG.format(str(service_uuid), str(ServiceTypeEnum.Name(service_type)))) @@ -208,6 +214,8 @@ class _Algorithm: service.timestamp.CopyFrom(tuple_service[1].timestamp) for constraint in tuple_service[1].service_constraints: service.service_constraints.add().CopyFrom(constraint) + for config_rule in config_rules: + service.service_config.config_rules.add().CopyFrom(config_rule) return service -- GitLab From 4ed9cff39c6f1f04022626ef581f6a5a52b5ae94 Mon Sep 17 00:00:00 2001 From: Javier Mateos Najari Date: Tue, 6 May 2025 11:21:45 +0200 Subject: [PATCH 441/463] Pre-merge code cleanup --- .../drivers/morpheus/MorpheusApiDriver.py | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/device/service/drivers/morpheus/MorpheusApiDriver.py b/src/device/service/drivers/morpheus/MorpheusApiDriver.py index 10181171f..1864e810e 100644 --- a/src/device/service/drivers/morpheus/MorpheusApiDriver.py +++ b/src/device/service/drivers/morpheus/MorpheusApiDriver.py @@ -152,7 +152,7 @@ class MorpheusApiDriver(_Driver): try: event = self.__detection_queue.get(block=False, timeout=0.1) if event is not None: - yield (event.get('eventTime', time.time()), 'detection_event', error.get('event'),) + yield (event.get('eventTime', time.time()), 'detection_event', event.get('event'),) except queue.Empty: detection_event_empty = True @@ -282,16 +282,25 @@ class MorpheusApiDriver(_Driver): with requests.get(url, headers=self.__headers, stream=True, - verify=False) as response: + verify=False, + timeout=(3.05, None)) as response: if not response.ok: LOGGER.error(f'Error connecting to event stream: {response.status_code}') return - try: - event = response.json() - queue.put(event['data']['ietf-restconf:notification']) - except json.JSONDecodeError as e: - LOGGER.error(f'Error parsing event: {e}') + for line in response.iter_lines(decode_unicode=True): + if not line: + continue + if line.startswith('data:'): + data = line[5:].strip() + LOGGER.error(f'Data received: {data}') + try: + event = json.loads(data) + queue.put(event['ietf-restconf:notification']) + except json.JSONDecodeError as e: + LOGGER.error(f'Error parsing event: {e}') + except KeyError as e: + LOGGER.error(f'Missing expected key in event: {e}') except Exception as e: # pylint: disable=broad-except LOGGER.exception('Error in notification stream handler') -- GitLab From 210ed9344c3f36ea667182a531488edfe62d00dc Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Wed, 19 Mar 2025 19:34:34 +0000 Subject: [PATCH 442/463] fix: basic P4 refactoring --- proto/context.proto | 24 +- src/common/type_checkers/Checkers.py | 79 +++++ .../service/database/models/enums/LinkType.py | 13 +- .../database/models/enums/ServiceType.py | 3 + src/device/service/drivers/p4/p4_common.py | 84 +---- src/device/service/drivers/p4/p4_driver.py | 32 +- src/device/tests/test_internal_p4.py | 28 +- .../service_handler_api/FilterFields.py | 3 + .../service/service_handlers/__init__.py | 6 +- .../{p4 => p4_l1}/__init__.py | 0 .../p4_l1_service_handler.py} | 48 +-- ...ert-acl.json => sbi-rules-insert-acl.json} | 0 ...t-b1.json => sbi-rules-insert-int-b1.json} | 0 ...t-b2.json => sbi-rules-insert-int-b2.json} | 0 ...t-b3.json => sbi-rules-insert-int-b3.json} | 0 ...son => sbi-rules-insert-routing-corp.json} | 0 ...son => sbi-rules-insert-routing-edge.json} | 0 ...ules-remove.json => sbi-rules-remove.json} | 0 .../descriptors/topology.json | 310 ++++-------------- ....sh => run_test_02_sbi_rules_provision.sh} | 2 +- ...h => run_test_03_sbi_rules_deprovision.sh} | 2 +- ...t_04_cleanup.sh => run_test_06_cleanup.sh} | 0 src/tests/p4-int-routing-acl/test_common.py | 27 +- .../test_functional_cleanup.py | 1 - ... test_functional_sbi_rules_deprovision.py} | 0 ...=> test_functional_sbi_rules_provision.py} | 0 .../static/topology_icons/p4-switch.png | Bin 6288 -> 244738 bytes 27 files changed, 261 insertions(+), 401 deletions(-) rename src/service/service/service_handlers/{p4 => p4_l1}/__init__.py (100%) rename src/service/service/service_handlers/{p4/p4_service_handler.py => p4_l1/p4_l1_service_handler.py} (95%) rename src/tests/p4-int-routing-acl/descriptors/{rules-insert-acl.json => sbi-rules-insert-acl.json} (100%) rename src/tests/p4-int-routing-acl/descriptors/{rules-insert-int-b1.json => sbi-rules-insert-int-b1.json} (100%) rename src/tests/p4-int-routing-acl/descriptors/{rules-insert-int-b2.json => sbi-rules-insert-int-b2.json} (100%) rename src/tests/p4-int-routing-acl/descriptors/{rules-insert-int-b3.json => sbi-rules-insert-int-b3.json} (100%) rename src/tests/p4-int-routing-acl/descriptors/{rules-insert-routing-corp.json => sbi-rules-insert-routing-corp.json} (100%) rename src/tests/p4-int-routing-acl/descriptors/{rules-insert-routing-edge.json => sbi-rules-insert-routing-edge.json} (100%) rename src/tests/p4-int-routing-acl/descriptors/{rules-remove.json => sbi-rules-remove.json} (100%) rename src/tests/p4-int-routing-acl/{run_test_02_rules_provision.sh => run_test_02_sbi_rules_provision.sh} (95%) rename src/tests/p4-int-routing-acl/{run_test_03_rules_deprovision.sh => run_test_03_sbi_rules_deprovision.sh} (95%) rename src/tests/p4-int-routing-acl/{run_test_04_cleanup.sh => run_test_06_cleanup.sh} (100%) rename src/tests/p4-int-routing-acl/{test_functional_rules_deprovision.py => test_functional_sbi_rules_deprovision.py} (100%) rename src/tests/p4-int-routing-acl/{test_functional_rules_provision.py => test_functional_sbi_rules_provision.py} (100%) diff --git a/proto/context.proto b/proto/context.proto index fb0111e14..0f2c8011f 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -199,13 +199,13 @@ message Device { DeviceId controller_id = 9; // Identifier of node controlling the actual device } -message Component { //Defined previously to this section - Tested OK - Uuid component_uuid = 1; - string name = 2; - string type = 3; +message Component { // Defined previously in this section + Uuid component_uuid = 1; + string name = 2; + string type = 3; map attributes = 4; // dict[attr.name => json.dumps(attr.value)] - string parent = 5; + string parent = 5; } message DeviceConfig { @@ -271,6 +271,7 @@ enum LinkTypeEnum { LINKTYPE_FIBER = 2; LINKTYPE_RADIO = 3; LINKTYPE_VIRTUAL = 4; + LINKTYPE_MANAGEMENT = 5; } message LinkAttributes { @@ -320,11 +321,14 @@ enum ServiceTypeEnum { SERVICETYPE_UNKNOWN = 0; SERVICETYPE_L3NM = 1; SERVICETYPE_L2NM = 2; - SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; - SERVICETYPE_TE = 4; - SERVICETYPE_E2E = 5; - SERVICETYPE_OPTICAL_CONNECTIVITY = 6; - SERVICETYPE_QKD = 7; + SERVICETYPE_L1NM = 3; + SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 4; + SERVICETYPE_TE = 5; + SERVICETYPE_E2E = 6; + SERVICETYPE_OPTICAL_CONNECTIVITY = 7; + SERVICETYPE_QKD = 8; + SERVICETYPE_INT = 9; + SERVICETYPE_ACL = 10; } enum ServiceStatusEnum { diff --git a/src/common/type_checkers/Checkers.py b/src/common/type_checkers/Checkers.py index e1bbe3f06..694f14102 100644 --- a/src/common/type_checkers/Checkers.py +++ b/src/common/type_checkers/Checkers.py @@ -13,6 +13,8 @@ # limitations under the License. import re +import ipaddress +from ctypes import c_uint16, sizeof from typing import Any, Container, Dict, List, Optional, Pattern, Set, Sized, Tuple, Union def chk_none(name : str, value : Any, reason=None) -> Any: @@ -107,3 +109,80 @@ def chk_options(name : str, value : Any, options : Container) -> Any: msg = '{}({}) is not one of options({}).' raise ValueError(msg.format(str(name), str(value), str(options))) return value + +# MAC address checker +mac_pattern = re.compile(r"^([\da-fA-F]{2}:){5}([\da-fA-F]{2})$") + +def chk_address_mac(mac_addr : str): + """ + Check whether input string is a valid MAC address or not. + + :param mac_addr: string-based MAC address + :return: boolean status + """ + return mac_pattern.match(mac_addr) is not None + +# IPv4/IPv6 address checkers +IPV4_LOCALHOST = "localhost" + +def chk_address_ipv4(ip_addr : str): + """ + Check whether input string is a valid IPv4 address or not. + + :param ip_addr: string-based IPv4 address + :return: boolean status + """ + if ip_addr == IPV4_LOCALHOST: + return True + try: + addr = ipaddress.ip_address(ip_addr) + return isinstance(addr, ipaddress.IPv4Address) + except ValueError: + return False + +def chk_address_ipv6(ip_addr : str): + """ + Check whether input string is a valid IPv6 address or not. + + :param ip_addr: string-based IPv6 address + :return: boolean status + """ + try: + addr = ipaddress.ip_address(ip_addr) + return isinstance(addr, ipaddress.IPv6Address) + except ValueError: + return False + + +# VLAN ID checker +VLAN_ID_MIN = 1 +VLAN_ID_MAX = 4094 + +def chk_vlan_id(vlan_id : int): + return VLAN_ID_MIN <= vlan_id <= VLAN_ID_MAX + + +# Transport port checker + +def limits(c_int_type): + """ + Discover limits of numerical type. + + :param c_int_type: numerical type + :return: tuple of numerical type's limits + """ + signed = c_int_type(-1).value < c_int_type(0).value + bit_size = sizeof(c_int_type) * 8 + signed_limit = 2 ** (bit_size - 1) + return (-signed_limit, signed_limit - 1) \ + if signed else (0, 2 * signed_limit - 1) + +def chk_transport_port(trans_port : int): + """ + Check whether input is a valid transport port number or not. + + :param trans_port: transport port number + :return: boolean status + """ + lim = limits(c_uint16) + return lim[0] <= trans_port <= lim[1] diff --git a/src/context/service/database/models/enums/LinkType.py b/src/context/service/database/models/enums/LinkType.py index 68624af84..97eacdd8b 100644 --- a/src/context/service/database/models/enums/LinkType.py +++ b/src/context/service/database/models/enums/LinkType.py @@ -18,15 +18,16 @@ from ._GrpcToEnum import grpc_to_enum # IMPORTANT: Entries of enum class ORM_LinkTypeEnum should be named as in # the proto files removing the prefixes. For example, proto item -# LinkTypeEnum.DEVICEDRIVER_COPPER should be included as COPPER. +# LinkTypeEnum.COPPER should be included as COPPER. # If item name does not match, automatic mapping of proto enums # to database enums will fail. class ORM_LinkTypeEnum(enum.Enum): - UNKNOWN = LinkTypeEnum.LINKTYPE_UNKNOWN - COPPER = LinkTypeEnum.LINKTYPE_COPPER - FIBER = LinkTypeEnum.LINKTYPE_FIBER - RADIO = LinkTypeEnum.LINKTYPE_RADIO - VIRTUAL = LinkTypeEnum.LINKTYPE_VIRTUAL + UNKNOWN = LinkTypeEnum.LINKTYPE_UNKNOWN + COPPER = LinkTypeEnum.LINKTYPE_COPPER + FIBER = LinkTypeEnum.LINKTYPE_FIBER + RADIO = LinkTypeEnum.LINKTYPE_RADIO + VIRTUAL = LinkTypeEnum.LINKTYPE_VIRTUAL + MANAGEMENT = LinkTypeEnum.LINKTYPE_MANAGEMENT grpc_to_enum__link_type_enum = functools.partial( grpc_to_enum, LinkTypeEnum, ORM_LinkTypeEnum diff --git a/src/context/service/database/models/enums/ServiceType.py b/src/context/service/database/models/enums/ServiceType.py index 45f849a26..899c71acf 100644 --- a/src/context/service/database/models/enums/ServiceType.py +++ b/src/context/service/database/models/enums/ServiceType.py @@ -25,11 +25,14 @@ class ORM_ServiceTypeEnum(enum.Enum): UNKNOWN = ServiceTypeEnum.SERVICETYPE_UNKNOWN L3NM = ServiceTypeEnum.SERVICETYPE_L3NM L2NM = ServiceTypeEnum.SERVICETYPE_L2NM + L1NM = ServiceTypeEnum.SERVICETYPE_L1NM TAPI_CONNECTIVITY_SERVICE = ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE TE = ServiceTypeEnum.SERVICETYPE_TE E2E = ServiceTypeEnum.SERVICETYPE_E2E OPTICAL_CONNECTIVITY = ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY QKD = ServiceTypeEnum.SERVICETYPE_QKD + INT = ServiceTypeEnum.SERVICETYPE_INT + ACL = ServiceTypeEnum.SERVICETYPE_ACL grpc_to_enum__service_type = functools.partial( grpc_to_enum, ServiceTypeEnum, ORM_ServiceTypeEnum) diff --git a/src/device/service/drivers/p4/p4_common.py b/src/device/service/drivers/p4/p4_common.py index b55296a65..b4c0d8832 100644 --- a/src/device/service/drivers/p4/p4_common.py +++ b/src/device/service/drivers/p4/p4_common.py @@ -23,16 +23,15 @@ as well as static variables used by various P4 driver components. """ import logging +import ipaddress +import macaddress import math -import re import socket -import ipaddress from typing import Any, Dict, List, Optional, Tuple -from ctypes import c_uint16, sizeof -import macaddress from common.type_checkers.Checkers import \ - chk_attribute, chk_string, chk_type, chk_issubclass + chk_attribute, chk_string, chk_type, chk_issubclass,\ + chk_address_mac, chk_address_ipv4, chk_address_ipv6 try: from .p4_exception import UserBadValueError except ImportError: @@ -60,17 +59,6 @@ LOGGER = logging.getLogger(__name__) # MAC address encoding/decoding -mac_pattern = re.compile(r"^([\da-fA-F]{2}:){5}([\da-fA-F]{2})$") - - -def matches_mac(mac_addr_string): - """ - Check whether input string is a valid MAC address or not. - - :param mac_addr_string: string-based MAC address - :return: boolean status - """ - return mac_pattern.match(mac_addr_string) is not None def encode_mac(mac_addr_string): @@ -94,23 +82,6 @@ def decode_mac(encoded_mac_addr): # IP address encoding/decoding -IPV4_LOCALHOST = "localhost" - - -def matches_ipv4(ip_addr_string): - """ - Check whether input string is a valid IPv4 address or not. - - :param ip_addr_string: string-based IPv4 address - :return: boolean status - """ - if ip_addr_string == IPV4_LOCALHOST: - return True - try: - addr = ipaddress.ip_address(ip_addr_string) - return isinstance(addr, ipaddress.IPv4Address) - except ValueError: - return False def encode_ipv4(ip_addr_string): @@ -133,20 +104,6 @@ def decode_ipv4(encoded_ip_addr): return socket.inet_ntoa(encoded_ip_addr) -def matches_ipv6(ip_addr_string): - """ - Check whether input string is a valid IPv6 address or not. - - :param ip_addr_string: string-based IPv6 address - :return: boolean status - """ - try: - addr = ipaddress.ip_address(ip_addr_string) - return isinstance(addr, ipaddress.IPv6Address) - except ValueError: - return False - - def encode_ipv6(ip_addr_string): """ Convert string-based IPv6 address into bytes. @@ -170,31 +127,6 @@ def decode_ipv6(encoded_ip_addr): # Numerical encoding/decoding -def limits(c_int_type): - """ - Discover limits of numerical type. - - :param c_int_type: numerical type - :return: tuple of numerical type's limits - """ - signed = c_int_type(-1).value < c_int_type(0).value - bit_size = sizeof(c_int_type) * 8 - signed_limit = 2 ** (bit_size - 1) - return (-signed_limit, signed_limit - 1) \ - if signed else (0, 2 * signed_limit - 1) - - -def valid_port(port): - """ - Check whether input is a valid port number or not. - - :param port: port number - :return: boolean status - """ - lim = limits(c_uint16) - return lim[0] <= port <= lim[1] - - def bitwidth_to_bytes(bitwidth): """ Convert number of bits to number of bytes. @@ -245,11 +177,11 @@ def encode(variable, bitwidth): if isinstance(variable, int): encoded_bytes = encode_num(variable, bitwidth) elif isinstance(variable, str): - if matches_mac(variable): + if chk_address_mac(variable): encoded_bytes = encode_mac(variable) - elif matches_ipv4(variable): + elif chk_address_ipv4(variable): encoded_bytes = encode_ipv4(variable) - elif matches_ipv6(variable): + elif chk_address_ipv6(variable): encoded_bytes = encode_ipv6(variable) else: try: @@ -471,7 +403,7 @@ def parse_integer_list_from_json(resource, resource_list, resource_item): return integers_list def process_optional_string_field( - #TODO: Consider adding this in common methdos as it is taken by the Emulated driver + #TODO: Consider adding this in common methods as it is taken by the Emulated driver endpoint_data : Dict[str, Any], field_name : str, endpoint_resource_value : Dict[str, Any] ) -> None: field_value = chk_attribute(field_name, endpoint_data, 'endpoint_data', default=None) diff --git a/src/device/service/drivers/p4/p4_driver.py b/src/device/service/drivers/p4/p4_driver.py index c89a42bad..0b109529d 100644 --- a/src/device/service/drivers/p4/p4_driver.py +++ b/src/device/service/drivers/p4/p4_driver.py @@ -22,10 +22,10 @@ import logging import threading from typing import Any, Iterator, List, Optional, Tuple, Union from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method -from common.type_checkers.Checkers import chk_type, chk_length, chk_string +from common.type_checkers.Checkers import chk_type, chk_length, chk_string, \ + chk_address_ipv4, chk_address_ipv6, chk_transport_port from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_RULES -from .p4_common import matches_ipv4, matches_ipv6, valid_port,\ - compose_resource_endpoints, parse_resource_string_from_json,\ +from .p4_common import compose_resource_endpoints,\ P4_ATTR_DEV_ID, P4_ATTR_DEV_NAME, P4_ATTR_DEV_ENDPOINTS,\ P4_ATTR_DEV_VENDOR, P4_ATTR_DEV_HW_VER, P4_ATTR_DEV_SW_VER,\ P4_ATTR_DEV_P4BIN, P4_ATTR_DEV_P4INFO, P4_ATTR_DEV_TIMEOUT,\ @@ -336,9 +336,9 @@ class P4Driver(_Driver): :return: void or exception in case of validation error """ # Device endpoint information - assert matches_ipv4(self.__address) or (matches_ipv6(self.__address)),\ + assert chk_address_ipv4(self.__address) or (chk_address_ipv6(self.__address)),\ f"{self.__address} not a valid IPv4 or IPv6 address" - assert valid_port(self.__port), \ + assert chk_transport_port(self.__port), \ f"{self.__port} not a valid transport port" self.__grpc_endpoint = f"{self.__address}:{self.__port}" @@ -395,18 +395,24 @@ class P4Driver(_Driver): # Path to P4 binary file if P4_ATTR_DEV_P4BIN in self.__settings: self.__p4bin_path = self.__settings.get(P4_ATTR_DEV_P4BIN) - assert os.path.exists(self.__p4bin_path),\ - "Invalid path to p4bin file: {}".format(self.__p4bin_path) - assert P4_ATTR_DEV_P4INFO in self.__settings,\ - "p4info and p4bin settings must be provided together" + if not os.path.exists(self.__p4bin_path): + LOGGER.warning( + "Invalid path to p4bin file: {}".format(self.__p4bin_path)) + self.__p4bin_path = "" + else: + assert P4_ATTR_DEV_P4INFO in self.__settings,\ + "p4info and p4bin settings must be provided together" # Path to P4 info file if P4_ATTR_DEV_P4INFO in self.__settings: self.__p4info_path = self.__settings.get(P4_ATTR_DEV_P4INFO) - assert os.path.exists(self.__p4info_path),\ - "Invalid path to p4info file: {}".format(self.__p4info_path) - assert P4_ATTR_DEV_P4BIN in self.__settings,\ - "p4info and p4bin settings must be provided together" + if not os.path.exists(self.__p4info_path): + LOGGER.warning( + "Invalid path to p4info file: {}".format(self.__p4info_path)) + self.__p4info_path = "" + else: + assert P4_ATTR_DEV_P4BIN in self.__settings,\ + "p4info and p4bin settings must be provided together" if (not self.__p4bin_path) or (not self.__p4info_path): LOGGER.warning( diff --git a/src/device/tests/test_internal_p4.py b/src/device/tests/test_internal_p4.py index af99bb86b..48501bfd8 100644 --- a/src/device/tests/test_internal_p4.py +++ b/src/device/tests/test_internal_p4.py @@ -17,11 +17,13 @@ Internal P4 driver tests. """ import pytest +from common.type_checkers.Checkers import chk_address_mac, \ + chk_address_ipv4, chk_address_ipv6 from device.service.drivers.p4.p4_driver import P4Driver from device.service.drivers.p4.p4_common import ( - matches_mac, encode_mac, decode_mac, encode, - matches_ipv4, encode_ipv4, decode_ipv4, - matches_ipv6, encode_ipv6, decode_ipv6, + encode_mac, decode_mac, encode, + encode_ipv4, decode_ipv4, + encode_ipv6, decode_ipv6, encode_num, decode_num ) from .device_p4 import( @@ -172,10 +174,10 @@ def test_p4_common_mac(): :return: void """ wrong_mac = "aa:bb:cc:dd:ee" - assert not matches_mac(wrong_mac) + assert not chk_address_mac(wrong_mac) mac = "aa:bb:cc:dd:ee:fe" - assert matches_mac(mac) + assert chk_address_mac(mac) enc_mac = encode_mac(mac) assert enc_mac == b'\xaa\xbb\xcc\xdd\xee\xfe',\ "String-based MAC address to bytes failed" @@ -193,13 +195,13 @@ def test_p4_common_ipv4(): :return: void """ - assert not matches_ipv4("10.0.0.1.5") - assert not matches_ipv4("256.0.0.1") - assert not matches_ipv4("256.0.1") - assert not matches_ipv4("10001") + assert not chk_address_ipv4("10.0.0.1.5") + assert not chk_address_ipv4("256.0.0.1") + assert not chk_address_ipv4("256.0.1") + assert not chk_address_ipv4("10001") ipv4 = "10.0.0.1" - assert matches_ipv4(ipv4) + assert chk_address_ipv4(ipv4) enc_ipv4 = encode_ipv4(ipv4) assert enc_ipv4 == b'\x0a\x00\x00\x01',\ "String-based IPv4 address to bytes failed" @@ -214,11 +216,11 @@ def test_p4_common_ipv6(): :return: void """ - assert not matches_ipv6('10.0.0.1') - assert matches_ipv6('2001:0000:85a3::8a2e:370:1111') + assert not chk_address_ipv6('10.0.0.1') + assert chk_address_ipv6('2001:0000:85a3::8a2e:370:1111') ipv6 = "1:2:3:4:5:6:7:8" - assert matches_ipv6(ipv6) + assert chk_address_ipv6(ipv6) enc_ipv6 = encode_ipv6(ipv6) assert enc_ipv6 == \ b'\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08',\ diff --git a/src/service/service/service_handler_api/FilterFields.py b/src/service/service/service_handler_api/FilterFields.py index 34f5ce59a..170f34a61 100644 --- a/src/service/service/service_handler_api/FilterFields.py +++ b/src/service/service/service_handler_api/FilterFields.py @@ -23,11 +23,14 @@ SERVICE_TYPE_VALUES = { ServiceTypeEnum.SERVICETYPE_UNKNOWN, ServiceTypeEnum.SERVICETYPE_L3NM, ServiceTypeEnum.SERVICETYPE_L2NM, + ServiceTypeEnum.SERVICETYPE_L1NM, ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, ServiceTypeEnum.SERVICETYPE_TE, ServiceTypeEnum.SERVICETYPE_E2E, ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY, ServiceTypeEnum.SERVICETYPE_QKD, + ServiceTypeEnum.SERVICETYPE_INT, + ServiceTypeEnum.SERVICETYPE_ACL, } DEVICE_DRIVER_VALUES = { diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index f63866d9d..933725aa5 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -25,7 +25,7 @@ from .l3nm_ietf_actn.L3NMIetfActnServiceHandler import L3NMIetfActnServiceHandle from .l3nm_nce.L3NMNCEServiceHandler import L3NMNCEServiceHandler from .l3slice_ietfslice.L3SliceIETFSliceServiceHandler import L3NMSliceIETFSliceServiceHandler from .microwave.MicrowaveServiceHandler import MicrowaveServiceHandler -from .p4.p4_service_handler import P4ServiceHandler +from .p4_l1.p4_l1_service_handler import P4L1ServiceHandler from .tapi_tapi.TapiServiceHandler import TapiServiceHandler from .tapi_xr.TapiXrServiceHandler import TapiXrServiceHandler from .optical_tfs.OpticalTfsServiceHandler import OpticalTfsServiceHandler @@ -105,9 +105,9 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY, DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532], } ]), - (P4ServiceHandler, [ + (P4L1ServiceHandler, [ { - FilterFieldEnum.SERVICE_TYPE: ServiceTypeEnum.SERVICETYPE_L2NM, + FilterFieldEnum.SERVICE_TYPE: ServiceTypeEnum.SERVICETYPE_L1NM, FilterFieldEnum.DEVICE_DRIVER: DeviceDriverEnum.DEVICEDRIVER_P4, } ]), diff --git a/src/service/service/service_handlers/p4/__init__.py b/src/service/service/service_handlers/p4_l1/__init__.py similarity index 100% rename from src/service/service/service_handlers/p4/__init__.py rename to src/service/service/service_handlers/p4_l1/__init__.py diff --git a/src/service/service/service_handlers/p4/p4_service_handler.py b/src/service/service/service_handlers/p4_l1/p4_l1_service_handler.py similarity index 95% rename from src/service/service/service_handlers/p4/p4_service_handler.py rename to src/service/service/service_handlers/p4_l1/p4_l1_service_handler.py index 49bedbb22..b1ff9c600 100644 --- a/src/service/service/service_handlers/p4/p4_service_handler.py +++ b/src/service/service/service_handlers/p4_l1/p4_l1_service_handler.py @@ -13,7 +13,8 @@ # limitations under the License. """ -P4 service handler for the TeraFlowSDN controller. +P4 service handler for L1 connectivity services +(in-port to out-port or input endpoint to output endpoint). """ import logging @@ -28,7 +29,7 @@ from service.service.task_scheduler.TaskExecutor import TaskExecutor LOGGER = logging.getLogger(__name__) -METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'p4'}) +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'p4_l1'}) def create_rule_set(endpoint_a, endpoint_b): return json_config_rule_set( @@ -79,14 +80,13 @@ def find_names(uuid_a, uuid_b, device_endpoints): endpoint_a = endpoint.name elif endpoint.endpoint_id.endpoint_uuid.uuid == uuid_b: endpoint_b = endpoint.name - + return (endpoint_a, endpoint_b) -class P4ServiceHandler(_ServiceHandler): - def __init__(self, - service: Service, - task_executor : TaskExecutor, - **settings) -> None: +class P4L1ServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : TaskExecutor, **settings + ) -> None: """ Initialize Driver. Parameters: service @@ -106,7 +106,7 @@ class P4ServiceHandler(_ServiceHandler): self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None ) -> List[Union[bool, Exception]]: - """ Create/Update service endpoints form a list. + """ Create/Update service endpoints from a list. Parameters: endpoints: List[Tuple[str, str, Optional[str]]] List of tuples, each containing a device_uuid, @@ -126,21 +126,21 @@ class P4ServiceHandler(_ServiceHandler): if len(endpoints) == 0: return [] service_uuid = self.__service.service_id.service_uuid.uuid + LOGGER.info("SetEndpoint - Service {}".format(service_uuid)) history = {} - results = [] index = {} i = 0 - for endpoint in endpoints: + for endpoint in endpoints: device_uuid, endpoint_uuid = endpoint[0:2] # ignore topology_uuid by now - if device_uuid in history: + if device_uuid in history: try: matched_endpoint_uuid = history.pop(device_uuid) device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) del device.device_config.config_rules[:] - + # Find names from uuids (endpoint_a, endpoint_b) = find_names(matched_endpoint_uuid, endpoint_uuid, device.device_endpoints) if endpoint_a is None: @@ -151,14 +151,14 @@ class P4ServiceHandler(_ServiceHandler): raise Exception('Unable to find name of endpoint({:s})'.format(str(endpoint_uuid))) # One way - rule = create_rule_set(endpoint_a, endpoint_b) + rule = create_rule_set(endpoint_a, endpoint_b) device.device_config.config_rules.append(ConfigRule(**rule)) # The other way - rule = create_rule_set(endpoint_b, endpoint_a) + rule = create_rule_set(endpoint_b, endpoint_a) device.device_config.config_rules.append(ConfigRule(**rule)) self.__task_executor.configure_device(device) - + results.append(True) results[index[device_uuid]] = True except Exception as e: @@ -177,7 +177,7 @@ class P4ServiceHandler(_ServiceHandler): self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None ) -> List[Union[bool, Exception]]: - """ Delete service endpoints form a list. + """ Delete service endpoints from a list. Parameters: endpoints: List[Tuple[str, str, Optional[str]]] List of tuples, each containing a device_uuid, @@ -197,15 +197,15 @@ class P4ServiceHandler(_ServiceHandler): if len(endpoints) == 0: return [] service_uuid = self.__service.service_id.service_uuid.uuid + LOGGER.info("DeleteEndpoint - Service {}".format(service_uuid)) history = {} - results = [] index = {} i = 0 - for endpoint in endpoints: + for endpoint in endpoints: device_uuid, endpoint_uuid = endpoint[0:2] # ignore topology_uuid by now - if device_uuid in history: + if device_uuid in history: try: matched_endpoint_uuid = history.pop(device_uuid) device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) @@ -222,14 +222,14 @@ class P4ServiceHandler(_ServiceHandler): raise Exception('Unable to find name of endpoint({:s})'.format(str(endpoint_uuid))) # One way - rule = create_rule_del(endpoint_a, endpoint_b) + rule = create_rule_del(endpoint_a, endpoint_b) device.device_config.config_rules.append(ConfigRule(**rule)) # The other way - rule = create_rule_del(endpoint_b, endpoint_a) + rule = create_rule_del(endpoint_b, endpoint_a) device.device_config.config_rules.append(ConfigRule(**rule)) self.__task_executor.configure_device(device) - + results.append(True) results[index[device_uuid]] = True except Exception as e: @@ -338,4 +338,4 @@ class P4ServiceHandler(_ServiceHandler): msg = '[SetConfig] Method not implemented. Resources({:s}) are being ignored.' LOGGER.warning(msg.format(str(resources))) - return [True for _ in range(len(resources))] \ No newline at end of file + return [True for _ in range(len(resources))] diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-acl.json b/src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-acl.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/rules-insert-acl.json rename to src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-acl.json diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b1.json b/src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-int-b1.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b1.json rename to src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-int-b1.json diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b2.json b/src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-int-b2.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b2.json rename to src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-int-b2.json diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b3.json b/src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-int-b3.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b3.json rename to src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-int-b3.json diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-corp.json b/src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-routing-corp.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-corp.json rename to src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-routing-corp.json diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-edge.json b/src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-routing-edge.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-edge.json rename to src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-routing-edge.json diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-remove.json b/src/tests/p4-int-routing-acl/descriptors/sbi-rules-remove.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/rules-remove.json rename to src/tests/p4-int-routing-acl/descriptors/sbi-rules-remove.json diff --git a/src/tests/p4-int-routing-acl/descriptors/topology.json b/src/tests/p4-int-routing-acl/descriptors/topology.json index 3b1f6e410..30e1f5e9a 100644 --- a/src/tests/p4-int-routing-acl/descriptors/topology.json +++ b/src/tests/p4-int-routing-acl/descriptors/topology.json @@ -1,287 +1,113 @@ { "contexts": [ - { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - } - } + {"context_id": {"context_uuid": {"uuid": "admin"}}} ], "topologies": [ - { - "topology_id": { - "context_id": { - "context_uuid": { - "uuid": "admin" - } - }, - "topology_uuid": { - "uuid": "admin" - } - } + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} } ], "devices": [ { - "device_id": { - "device_uuid": { - "uuid": "edge-net" - } - }, + "device_id": {"device_uuid": {"uuid": "tfs-sdn-controller"}}, + "name": "tfs-sdn-controller", + "device_type": "teraflowsdn", + "device_drivers": ["DEVICEDRIVER_IETF_L3VPN"], + "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.10.10.41"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8002"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "endpoints": [{"uuid": "mgmt", "name": "mgmt", "type": "mgmt-int"}], + "scheme": "http", "username": "admin", "password": "admin", "import_topology": "topology" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "edge-net"}}, "device_type": "network", - "device_drivers": [ - "DEVICEDRIVER_UNDEFINED" - ], + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_config": { "config_rules": [ - { - "action": "CONFIGACTION_SET", - "custom": { - "resource_key": "_connect/address", - "resource_value": "127.0.0.1" - } - }, - { - "action": "CONFIGACTION_SET", - "custom": { - "resource_key": "_connect/port", - "resource_value": "0" - } - }, - { - "action": "CONFIGACTION_SET", - "custom": { - "resource_key": "_connect/settings", - "resource_value": { - "endpoints": [ - { - "uuid": "eth1", - "type": "copper" - } - ] - } - } - } + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "endpoints": [{"uuid": "eth1", "name": "eth1", "type": "copper"}] + }}} ] } }, { - "device_id": { - "device_uuid": { - "uuid": "corporate-net" - } - }, + "device_id": {"device_uuid": {"uuid": "corporate-net"}}, "device_type": "network", - "device_drivers": [ - "DEVICEDRIVER_UNDEFINED" - ], + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_config": { "config_rules": [ - { - "action": "CONFIGACTION_SET", - "custom": { - "resource_key": "_connect/address", - "resource_value": "127.0.0.1" - } - }, - { - "action": "CONFIGACTION_SET", - "custom": { - "resource_key": "_connect/port", - "resource_value": "0" - } - }, - { - "action": "CONFIGACTION_SET", - "custom": { - "resource_key": "_connect/settings", - "resource_value": { - "endpoints": [ - { - "uuid": "eth1", - "type": "copper" - } - ] - } - } - } + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "endpoints": [{"uuid": "eth1", "name": "eth1", "type": "copper"}] + }}} ] } }, { - "device_id": { - "device_uuid": { - "uuid": "p4-sw1" - } - }, + "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "device_type": "p4-switch", - "device_drivers": [ - "DEVICEDRIVER_P4" - ], + "device_drivers": ["DEVICEDRIVER_P4"], "device_operational_status": "DEVICEOPERATIONALSTATUS_DISABLED", "name": "p4-sw1", "device_config": { "config_rules": [ - { - "action": "CONFIGACTION_SET", - "custom": { - "resource_key": "_connect/address", - "resource_value": "10.10.10.120" - } - }, - { - "action": "CONFIGACTION_SET", - "custom": { - "resource_key": "_connect/port", - "resource_value": "50001" - } - }, - { - "action": "CONFIGACTION_SET", - "custom": { - "resource_key": "_connect/settings", - "resource_value": { - "id": 1, - "name": "p4-sw1", - "vendor": "Open Networking Foundation", - "hw_ver": "BMv2 simple_switch", - "sw_ver": "Stratum", - "p4bin": "/root/p4/bmv2.json", - "p4info": "/root/p4/p4info.txt", - "timeout": 60, - "endpoints": [ - { - "uuid": "1", - "type": "port" - }, - { - "uuid": "2", - "type": "port" - } - ] - } - } - } + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.10.10.120"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "50001"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "id": 1, + "name": "p4-sw1", + "vendor": "Open Networking Foundation", + "hw_ver": "BMv2 simple_switch", + "sw_ver": "Stratum", + "timeout": 60, + "p4bin": "/root/p4/bmv2.json", + "p4info": "/root/p4/p4info.txt", + "endpoints": [ + {"uuid": "1", "name": "1", "type": "port-dataplane"}, + {"uuid": "2", "name": "2", "type": "port-dataplane"}, + {"uuid": "3", "name": "3", "type": "port-int"} + ] + }}} ] } } ], "links": [ { - "link_id": { - "link_uuid": { - "uuid": "p4-sw1/1==edge-net/eth1" - } - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "p4-sw1" - } - }, - "endpoint_uuid": { - "uuid": "1" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "edge-net" - } - }, - "endpoint_uuid": { - "uuid": "eth1" - } - } + "link_id": {"link_uuid": {"uuid": "p4-sw1/1==edge-net/eth1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "1"}}, + {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "edge-net/eth1==p4-sw1/1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "1"}} ] }, { - "link_id": { - "link_uuid": { - "uuid": "edge-net/eth1==p4-sw1/1" - } - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "edge-net" - } - }, - "endpoint_uuid": { - "uuid": "eth1" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "p4-sw1" - } - }, - "endpoint_uuid": { - "uuid": "1" - } - } + "link_id": {"link_uuid": {"uuid": "p4-sw1/2==corporate-net/eth1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "2"}}, + {"device_id": {"device_uuid": {"uuid": "corporate-net"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { - "link_id": { - "link_uuid": { - "uuid": "p4-sw1/2==corporate-net/eth1" - } - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "p4-sw1" - } - }, - "endpoint_uuid": { - "uuid": "2" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "corporate-net" - } - }, - "endpoint_uuid": { - "uuid": "eth1" - } - } + "link_id": {"link_uuid": {"uuid": "corporate-net/eth1==p4-sw1/2"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "corporate-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "2"}} ] }, { - "link_id": { - "link_uuid": { - "uuid": "corporate-net/eth1==p4-sw1/2" - } - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "corporate-net" - } - }, - "endpoint_uuid": { - "uuid": "eth1" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "p4-sw1" - } - }, - "endpoint_uuid": { - "uuid": "2" - } - } + "link_id": {"link_uuid": {"uuid": "p4-sw1/3==tfs-sdn-controller/mgmt"}}, "link_type": "LINKTYPE_MANAGEMENT", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "3"}}, + {"device_id": {"device_uuid": {"uuid": "tfs-sdn-controller"}}, "endpoint_uuid": {"uuid": "mgmt"}} ] } ] diff --git a/src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh b/src/tests/p4-int-routing-acl/run_test_02_sbi_rules_provision.sh similarity index 95% rename from src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh rename to src/tests/p4-int-routing-acl/run_test_02_sbi_rules_provision.sh index 6709d66c6..7c485d401 100755 --- a/src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh +++ b/src/tests/p4-int-routing-acl/run_test_02_sbi_rules_provision.sh @@ -14,4 +14,4 @@ # limitations under the License. source tfs_runtime_env_vars.sh -python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_rules_provision.py +python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_sbi_rules_provision.py diff --git a/src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh b/src/tests/p4-int-routing-acl/run_test_03_sbi_rules_deprovision.sh similarity index 95% rename from src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh rename to src/tests/p4-int-routing-acl/run_test_03_sbi_rules_deprovision.sh index 3a67fad8a..4032c01df 100755 --- a/src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh +++ b/src/tests/p4-int-routing-acl/run_test_03_sbi_rules_deprovision.sh @@ -14,4 +14,4 @@ # limitations under the License. source tfs_runtime_env_vars.sh -python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_rules_deprovision.py +python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_sbi_rules_deprovision.py diff --git a/src/tests/p4-int-routing-acl/run_test_04_cleanup.sh b/src/tests/p4-int-routing-acl/run_test_06_cleanup.sh similarity index 100% rename from src/tests/p4-int-routing-acl/run_test_04_cleanup.sh rename to src/tests/p4-int-routing-acl/run_test_06_cleanup.sh diff --git a/src/tests/p4-int-routing-acl/test_common.py b/src/tests/p4-int-routing-acl/test_common.py index 8254eddc5..f2d00f1dc 100644 --- a/src/tests/p4-int-routing-acl/test_common.py +++ b/src/tests/p4-int-routing-acl/test_common.py @@ -22,9 +22,9 @@ CONTEXT_NAME_P4 = DEFAULT_CONTEXT_NAME ADMIN_CONTEXT_ID = ContextId(**json_context_id(CONTEXT_NAME_P4)) # Device and rule cardinality variables -DEV_NB = 3 +DEV_NB = 4 CONNECTION_RULES = 3 -ENDPOINT_RULES = 2 +ENDPOINT_RULES = 3 DATAPLANE_RULES_NB_INT_B1 = 5 DATAPLANE_RULES_NB_INT_B2 = 6 DATAPLANE_RULES_NB_INT_B3 = 8 @@ -39,6 +39,11 @@ DATAPLANE_RULES_NB_TOT = \ DATAPLANE_RULES_NB_RT_CORP +\ DATAPLANE_RULES_NB_ACL +# Service-related variables +SVC_NB = 1 +NO_SERVICES = 0 +NO_SLICES = 0 + # Topology descriptor DESC_TOPO = os.path.join( os.path.dirname( @@ -47,51 +52,51 @@ DESC_TOPO = os.path.join( 'descriptors', 'topology.json' ) -# Rule insertion descriptors +# SBI rule insertion descriptors # The switch cannot digest all rules at once, hence we insert in batches DESC_FILE_RULES_INSERT_INT_B1 = os.path.join( os.path.dirname( os.path.abspath(__file__) ), - 'descriptors', 'rules-insert-int-b1.json' + 'descriptors', 'sbi-rules-insert-int-b1.json' ) DESC_FILE_RULES_INSERT_INT_B2 = os.path.join( os.path.dirname( os.path.abspath(__file__) ), - 'descriptors', 'rules-insert-int-b2.json' + 'descriptors', 'sbi-rules-insert-int-b2.json' ) DESC_FILE_RULES_INSERT_INT_B3 = os.path.join( os.path.dirname( os.path.abspath(__file__) ), - 'descriptors', 'rules-insert-int-b3.json' + 'descriptors', 'sbi-rules-insert-int-b3.json' ) DESC_FILE_RULES_INSERT_ROUTING_EDGE = os.path.join( os.path.dirname( os.path.abspath(__file__) ), - 'descriptors', 'rules-insert-routing-edge.json' + 'descriptors', 'sbi-rules-insert-routing-edge.json' ) DESC_FILE_RULES_INSERT_ROUTING_CORP = os.path.join( os.path.dirname( os.path.abspath(__file__) ), - 'descriptors', 'rules-insert-routing-corp.json' + 'descriptors', 'sbi-rules-insert-routing-corp.json' ) DESC_FILE_RULES_INSERT_ACL = os.path.join( os.path.dirname( os.path.abspath(__file__) ), - 'descriptors', 'rules-insert-acl.json' + 'descriptors', 'sbi-rules-insert-acl.json' ) -# Rule deletion descriptor +# SBI rule deletion descriptor DESC_FILE_RULES_DELETE_ALL = os.path.join( os.path.dirname( os.path.abspath(__file__) ), - 'descriptors', 'rules-remove.json' + 'descriptors', 'sbi-rules-remove.json' ) def verify_number_of_rules(devices, desired_rules_nb): diff --git a/src/tests/p4-int-routing-acl/test_functional_cleanup.py b/src/tests/p4-int-routing-acl/test_functional_cleanup.py index 60c8684b0..fc29be24d 100644 --- a/src/tests/p4-int-routing-acl/test_functional_cleanup.py +++ b/src/tests/p4-int-routing-acl/test_functional_cleanup.py @@ -14,7 +14,6 @@ import logging, os from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId from common.tools.descriptor.Loader import DescriptorLoader, validate_empty_scenario from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient diff --git a/src/tests/p4-int-routing-acl/test_functional_rules_deprovision.py b/src/tests/p4-int-routing-acl/test_functional_sbi_rules_deprovision.py similarity index 100% rename from src/tests/p4-int-routing-acl/test_functional_rules_deprovision.py rename to src/tests/p4-int-routing-acl/test_functional_sbi_rules_deprovision.py diff --git a/src/tests/p4-int-routing-acl/test_functional_rules_provision.py b/src/tests/p4-int-routing-acl/test_functional_sbi_rules_provision.py similarity index 100% rename from src/tests/p4-int-routing-acl/test_functional_rules_provision.py rename to src/tests/p4-int-routing-acl/test_functional_sbi_rules_provision.py diff --git a/src/webui/service/static/topology_icons/p4-switch.png b/src/webui/service/static/topology_icons/p4-switch.png index 9afcda1c0e38cb5757574024f1a3f96001b03943..178943d67e0b0a1e501d27b32a5356d8afdd4e56 100644 GIT binary patch literal 244738 zcmeAS@N?(olHy`uVBq!ia0y~yVAW(`V7bG=#=yXkq0Yd|z`(#*9OUlAuNSs54@I14-?iy0V<4uCMDMoQFe28RDjJzX3_D&pSEWv__7dbd5+ ztD5*w=7w^=Rt|N zZthdoi}UTX-n=hgWOzOJi&am2dEJ|@)r-D;zL6_Zz5A1Vbrajzw z$|-97wh0HW9^G{=d&adh%d*$be3#wpben(X(x&(Alh%E9pQQIgIe6M@t7SfWuDfr2 z!DMc5y0lR`N9uWh?yL*_xi=TeN3)*yUlhhMZ~l~mebS4&q@Md9&3W#BcF9*Y<3eq( znB!-ezuwKcXqES~DmN@8{=PxSsq<5As{fAcHaRz6YG(Dq*IsvDw|d!Yu9CU-S{HKvPb{kKyZ`5~{^=aGL zcgNm%Ym)q?O@6~|o$$>+yPOj5KApDZ?ewRqxqGH)t_Y7es`R;gR8sQwK6fE0y;GsL z^?kfI#~hHc3i**&Q}gF%*4AHpcI?U7(`%jB#VL(0WoR?FnH z*8$*YQ=K?`R9ZH<(y{SN-)J&PCTIpV;zopGxOv_2{kh zL}m+kOsrV%^(1Dc>Ky%0H96DZCwmWjSG+HnS=>9Jqgv(iF>80vIoT$cSG|@=R()qE z^j<>y;eV_ig^rw=r<-lH#7um9J%z zpT#Ub8*@Bk^)bs+t1{(Nua)*~DOe{sZB3t`T5s_V*Vh5kmf@=mS1Vs#Q@E-p%Dro5 zvATF_nToW@ThG>8*N!|oGp(g*&9dJ-yUtZ}Z=UteFhlw=x6!uyv2(V5T~~AVnKkds z=sf)kZ+5J;sJ*?uYtuIVxeIguxfX`KUi{-_^7Azr*5f@rG9WK73lTWRG|L{@OD~IXOAS zc_odWH0{{2BcRT4lehNySD1}vXnKyJ?oxro6WW5 z>~@htS$l1@bw>z%%BWg%^)(zaP9LS2k=-wx>a+Z0EBxeJPul z#U6b$%k#3`oe5VB51mko2|J$AysdUk=WB`MPV*+dmdL+Wx-8lveVOO;Q%1#pYeS!3 z>fAGXa*3Xj&~}BQc{!2K&k9!FXPNoge@oWg$*Sj!U9VIw_u69~{-ow|%G~r_C#pZ^ z>@oLO+b1dX@yY2u+Z}}Nv>JUB@!YdI;>jI0=|bt0M}}T|POAuSk5r4>>~cqJ*_rA! zn=UMOiAf5Xxnt=;5z)EKA$I-6onhw`yY`$uwMAfgYo;3C=9$GaboZQ2QT1CKc|CJW z0bg_IYYns4b6msDMP^*H;?l87-xv9KPU1zYPd--HOBNrqJiDayiInL%O}4ekMHAN* zPYQfJBVbMTY0XR9UUzSb^4z#=qW-C@OQNaoE{J4F8FO#iwp={@&5r#Mmo3(5Y|ivq zxU4e7@mil?YozYV)?3G>IOQfMIbPfLn``s7dxsaLO?>yz`qL%ze_6+V@a~^c^ncZS zf4SQREj=rDdrHLqo&06u=JoRH_5LPCbv=Dm{eEuIQ`zzr>vw#;7OlVc+pQhlj~_kK zdn2wbsKp46<^$84axdn<(5nLlGyY~^W@x6S)!EW23}Ew}&cI;VXv z=P~X3YbPe(8|B~S_&Pv(N1veEzS=39lqS5ENPiM_Z1$G7l4`N((;^>VnYESg+@z;U zVr!lAFO@!5&rP#DAJh5${A7#yvCsB$tK8ciptjFd=zXk`aQxCE)zeNL ziB=Vi-+HDxOXbnpshzw19@&01`e=6I$lf!@s;8Ykve`-L-c+Oal@4Ni_&ttn?$Q+c zo;9-~{PeGmNe}8KXbNAKnpyGdWt8&KQ`Xl#_Plm9)GA!RP3U>n#PYS9KCNS4b7b!& zr#afXNA?~%wR>80NAb+oV!h3;=J1NmU3_m<>6OTmb5WbGh2~zgTzy9BdC=x_JC7_W z)HBPJ?e>v+&NTU&>HQUj=ZrICi+OJKMIPOCt}7|mJ#yo+wM!x{tBIy>jq2WV_L53xDR=e0h|7nhO?0EgjJvm5ztg{vCmFrw zw%I0!-y5o`j_sOq=ge2m$(Q8zlzZJewOj4p{Q_ypNXroGQ~y4H2{g`^o1d|#FvaQO z*H_i8^7ks!PhH)9x9s-!cAlRHQ}-VHwCG+!=hUh2RKSoB5HZE(|1s(OJq0fUzN)^m zHVNq>n#Zu?s&{QiW&r@Y?A z^5V2dVrP!b%vF*VKD#G*)65b-(~0L^rk%4qe8iI5H%dHOFvBEsj@aaDinB`fZl1C9 zJ`)u_GxGI}%xjkEvn`LubYC;Qzob~tpm3dQ*u9-cRu$`REn1hQ{eGQjrT^X&JEwQ< zNpC$;8Sb?wf9jD+`6-t7qdGs^s}%10YV`iLLh-(K)qC4LpVdU??8#q!=J)oKd(zuo z_VgNkH1piEK2q(T*vyLP)O(lp1k2lfY~~7mv`BeWdg{pQNv!L=)$F$W?2(I1_+>Nc z!PirPoyU()={TPMTD>}2>7B5MsIA?^^3A8KXDSs|&j@=|7TtL~RW)yU>ke75dv7-g zg)eU{FO9HF-+f}|?KM{6t6PiBqf6GQb)UPMadGFi*`@1p)8=M(dp^IFb7`l%S=L?Y z9;@qCi_h)6wxZM~<3i~=qYUdXsV%and2W5HTD)!Vu?3kcwXSW^(Y&@rN9UT^&F-zf z#k{wsMIOC%&8T_X;j{~79Y=SSO?JE;6|*M$qlAoREOud9 z@Ut&Hy5IfJR%E<+^80$voGJUXa;c5FyZ6tERl85DaNVBTJID0PKatz#F9-9O z_xqpOU6{fYcqsMM+{|!w9@*c`KW0DH-~ZKX+pSNxy7PBDZ0l}2a&+U{htI#S+tD*G zv2y|^Jn0mO9ZWiJnKPr)AmoRhbjcyM`95CJl{b%kF}52v?$>msgCN`7LsY{QQX#d9^rA4O(% zp3hLU>z?||do&|eah+w@J=^n#c8f<$dGR7H>1yS)D9e5!SzRmt zy{*Oin?Jl04LkR_VQTUEZJ*|uik;l?Rb6P%@x`AGcIgh zYyRriHL0z#t9_%6driK!@ywZ>uX^UJzIDV>%Qxn@lJN5x`Oj{r&n|f@nznB3ktNv^ zdtx^4jJTbnamh?nB+b-M|H7LYljiTNJ@n;F``61x<^{o*uc!KY$6MEB9cxZ5z8uyw zYtptLTh+C8s^)7I6N94e?wx$>>K)t4oWrt{k6-zlb?U{_{WFZZa%JOfQ$Ef3YW}qM ze#K*xr*BT{UVomNyXTyS3)`O!2kj;r0Ry`n1* z_nhH%{&Z>k-!9%z%~Ls^=g#LyMb5Z6C2UFVHHi}4Cdb=WHxFz*XYlftuiCo9Y0qSg zb?0R7Yu#|;MO2pRzAWvJ*CT&AG#~jr-CJctkV<3dq6f7BD)+W3eO$Ad>mF~|qsoXU zwX{9k*<9|) zi*)Mid~DR~{88;R-(8{i_mw9dud&{;dtV)<_Agz<^}c-d zU*=$yealrJ)q5%3Tkdl2clE>{b?QRz-@DxVzT`x8y>`*P`w^A**RS34om2aH?VVHA z@|%nHx$EwEzhdfl*^LGF4vXFU-ZAsDoJsM$zhd`xUq7?+`;5|ev1#Y-CO?abO}i&* zRJg98wfNVWJ*ShO&C%n2{>r5IT^aZL+>IaZxp6g)uP5q1yY);=Q`>0vX|Anjw<+Z=j#!dwBAy}5 z>v~I;_2{j)l}B&A-PtRnX+EnXyGp~ltd?kZGq z#*4|nL*+wuCriEZr-S#sRDLY+VA?pw{b4CKdtg(j*rv%+btJ9ZxZ;^?bB2rD#BDhxmDpat2F1oxtiRK;;D*1 z7U{6WZQ@jPjgUTuX!TJ*_ANV_2Zk(Q;@~GZZ zsZm_@QMicbgZD}w|Hmr*6L)!3?Wpo^zvq$v;S<0A4^{cM-{Z*tJtx@b30M9v4ioyZ z+2c?BrcaIOu0j>ZPO<;Xc=)$|!>4`A*Y0`$J?z|fYwq{emrhmJpH^Dl>gxBX`pl`{ za-yB@S4@rlzUTb}k3a0L_x8`f>!!ohy(fRU$DX@JAKO$P@w#o>Sba0BboDu?0h43&iMG5ooP`O{wrsepFE|YcrMZ4b05>>b;VZEJF}nMR+lJw>ojp) zX!x4k^9HY?F7rg{F6O=Ew$<_SoRkY&?_^)uayRo#&VSX}e&^V%HwxHS_WYgoMda}J ztIk)aZ#eGozN`q5-agnr_><_|7IW+zi;w@-e?InEFZW))biL=a|9zX40hdz@GoqhM zZsgYF#V`Jz9RGvGoYuSY>`zmEcs=)5$0mU)XR$;1C!AjRMu*hC@QswO(q84uu~*h` zjRyC^^1jvY^DUG(_nzLuoAf1FUFyx`T3;d4AAK%OZ@z9%6|z~U!g9Y$;)UstwDtKO zDvLat)*GuTewiilalR7gzhI?>;jVT+R!MX&)$jJP`@lbuC2rHC1KvuUdo+ZeTGcr! z9o+A!@*})+LxXgcolt4B&bxn}N{#8MLKSXGjrNKv}M~&{UhJ5 z&KA7!>i(fK*S0jRnI_0O>)Dc~p10-xXJh`KezWCP^a+ojzqW`JmDc<@JN?i2RW06@Jh`*D zY*uCX^w#v}%D?7MxKWlaCiFF@R54mr;?MG4miXyZ=;ksSHoa#R0*_cps}p7qW0r=30|&lX6sKkPX*>FxL5+M8ax7=B57V#TfL)%9>i z?e&dzfA;mZ+~3amu>PxLmA~4V1xYIV*zRwAx!A2~t*?C5Y}PnW`ILQ{oD0oeYCn{E z%GdZ_YLA=xXWv-6o;(8%{QH+=A zuMg^*?EXw#!(V@3(TX+vd$lzSjlaxNVTqr}lDhhL{7uVwZ*tC^xK?t0vDm%89j!ac zW?P2eIAggtZQtg@C(6yFcJ}$YtxH}TczxfY6Qv>2C3CrbcAevDzNWaz^HbZJZ7W?P zeU~U?C;!@V##DKEijMyrlf096EgwJoH%U77n{l4Y$=*oMWv_3r{NBiET&K{Zw`b1W z_>*j2uI%q4E-{HmTndXz5Wlq#Jo@Zh!S(q1-2CwOcKSv=%iqR)i`abo?eiOt-$~{25O5sBe|ec=9r@aPAg8z35quXu0OJI?2udjZd=${)~9@ z-E!r``@7$l_s5xU+#mh^_te+L>ys*b-fa78vv~XaLiMka2j}eQpEm!&y^d4g@2vf^ zN7YhCt9*08$&`nmoIT}}R%hOPb=zE3@q>TokN*eHJrL>qem?BpZ+7nYm6x3E^v~@4 zy`go-x0#)*kGsra%!%_A)QmqtFHlYXUaisa6);*IMJ z_eX55^h&&zwos#Z?=pqtyMJ3HrQJpQ?$3ytvC(j&LH1)?x3kZzxlOF|j5B7}Ctk9u z%e!cmXPCb2Udq{w-<_`8|FU^r|EX-2ImcHr{qj-n*3#+Htyia~q}Eecz$f2D6$W$L#bPwnTH{a}R)5o!u37b5XWwO@9sV6VOkDf>n6Vte9**;(E_U_HQ zr%s*nH(8E5?$oJMb$mQY%*qey^*P+O%N(~z;Ql<_ye#_5gJXHy`|eiN7AfCPe{e19 znfTABmHMljZE9e{($kocB8NpMBzw zdVS7=_dQg8>~LvvR~4#g@tqj1c3L?8#Hs3sH`C5VCOwl$+k7o>fsferZLfM~TALi5b*!+hXYDJcx6=}hjm+=Z zx$b`TJlJSe{iMm3uWx<%(s{rCe8>N|Ia1D*@G$L_9Hh_OIR8_s$9D6^`!{=;d-k3Qzwj;I?A!0!tM7j= zt^0oCbX{U{{(b#do$>0QjLW|UTdx0P9LZ6?N}_jaPQygIGi`Dke=jw<)86Wxx^(F# zQ=2bl($|Dq%{lDx z7pJq=-aI<9R`Tb}*Y1Ajt6uC|Ia51t{)D*C#<8>hw)ONJTAk;+>+7W*3r{)7ty#eW z3&8`CzW)_1pKsDUnk=LqZ=9L(^n&I~{+@HE?^vu=$o@Si$@j9>;&oe(9x446Vfp>B z()(&ZrN--1M6)KoygJ`4Y=dn5N|%$9Z`;(k z{x8pO&a$+>)~mVCZSA#~!rwD)>&s0td(w0-_kqQFM3XI@_kJR?l?T&KjocYejbf8d zn%>O%?XTXSyCb>k*Q|>_U-J9wCTVMw>Vn!PW|P+yPj4;%d&_H2ePa5blPW(1qt7nO zc^ta!q1(3m^9*W#|5&wMFIDvEfdH0=;iVHqm#9astUMI<)p6Sj`TMKv6thyYcNT5S zWt=W&3XNKLKHht@}Yb$R}-7dlvT^}@M-_xq>WxsE|%v>9OUSX}hfay7HuGVd* zKW~be?kBhTZIV-ze$wP4H(3hJEa&+0xL-jeiI=A=IXRy!;>`LTI{COwLGZsHU(3aM z?prJ}DAo>NlBr{q75&C7_I8x=^@j$Z`}T_6`x>qN@sDeWS{b{2g7(FTEia{~9Aca4 z;+(1yrWAB&{r$S=%j_(tf{&lPQEb@nZ)l(RLP+|Zu<;R3!y^0eb7xcHyKDKs?QIp9 z>iHp9OgmMm!aq!D-~ZH95B~Sn*Su=>Zx(u=9Cq(-$JFxon}os-9I}=TJ9jnZ;hfo1 z8f~n?_f9R>Gc4}gDYkF(l_lAmXZ-xeWSluO>)EW$XJfjro!HuAUM#zq_g2_e&(|J0 zXR`JmKd?LBJVSQBLE1Jx!y;L8Ki~UBf1eoMUN>{bzGuIiZq;>0&8=Q&RkTeNX*$o( z`&{Vi;`K8uvTmOJnfY3{%cwk~Cvq*ToA2v4C#HoQH{*W)Y4bsgut#-KDsg5a&r2t= z+)GdQ-IO2_St}-+A+&kYruqeE`gnZ>{w?Pd(%yf<>y%?y@H`3K-^&hs=l@Xa)^6d- zF1qo(Y;36HFBi3(i2hBoe{v_X#7*~jkUEj&pPu0V&x;myq&q4$oR zKgzm~h)?S{uU+`hZ{l}T?>+gePgI+C9N8VE^p4H5KzFOq^t)OXX;B@)Mj!iz<4yNui+-UxVLl-}cAg)Wh6!#xb4%<_Tq!^5F(u?s%9+2> zVj}iaBUhw2FK)TOE+l>K@UkxM+Tf$AiXXakSmGwNJm8)r5W@EHgvys5pF{qqYhHNH zt8?z-oA~|B2BGs+-0$NOpT&Cj&PiV9`Fu)Gl)K}^ zZM9C0VcB7IX|GSbjJ*AB_MCkm!zUZR&O0Sz`TEwy#jU5SomFpt11&j$l#c~b1%7vW z3&rnMum9#{ly`CM<#+cDmU&zb65*Wk&TRF$&EZe>?4Mfs|MMn+ilb^R_qJ`!y!-3I z@`(nL%Z$2>{>oTLJP$c`OqJumINzK+xsA)`|6ShU{(gUsLCBH1e&$q;eiemJj<=E`6QXTe3IUY1h3iA7j_wZqfU8 zqx#}99}#{V<%tLKT_0I13BA|j{#fC=XZO)1#knR$eNWwDpF1_L+k9ogTMeB{+x$+P z&p9_^-o{W{-Ny@eFTWH2zc@8&$F2{nmMmH0-OeLf#F&Jbxc(Pjqi$#SuV!mh?ZXX; znbUh^EFVYZeYrE=chCRECrv$Tg?ndxs}x&Xy!u4tcaJ&$HD`X`e`MS0TP+vZ%@n_A zMq3`+w%zUgoD}U#5nFz~T4-b@=J;d3ky*ezpR$`bJZ}E~cW3Py9l0})wJjDiFRkk3 zd3e+F^rrHQMzu$R64iADcdhh&@oS3GKh@64OMuj~iU*=ui-a*Jnn7TaVzyu;Y}`LEj} zX8lttKl*%{_A5?2(5>|G@5xiY>#`N^9ZtKq`Sh7;Td{MOQy$v9K07CSr|0vSoJ*G4 zJu&S!7i78>w(?X@rE{L`E*7Psbh8SiY7 zIE^*Ik5sv*=NMTa6@B~s&Rt#cHr(f2&4Xo`lCR(Cp13t9ZpCf0yDM_%WnL;>x9LM( z`_%8UiHB`dgldA-4)*6TaZlN+tua;ep3XX#@E|v(r=Ew;CU9{~`H)jE;X&P@RVVA7 z$H>hukvCrOykbdD+o`&ZL7Y?0*q%zg>E->+He$sTj~BJyeu#KJ5S{q_zpqMTy34)) zOHTamkE;A1r~R>g&5`F@gz_g(t&lSl{+`ACex2#(bFFIkA`_M7iWy%wJbYrizd_b* zQ?}gSH-Y)tzndI(Kb=-{_m?!6@wM2g(?g3hZ%r`SW-2og(L{*n|M;=+ zIjCWu70Gc1;s*4cAA_vzktmq+z(N(aNI3MjSMB{RD#H9J+= z+HJKqQhEO5VcG->%?&S)@8#>T6PTy^EjrY)z{CGc%g4IrN~Oz(l)uSeTioJTrnl^Z zuj-+;Pc8OI{r;UT_a=J0;O$KBzy6?Gi1VMTN@KdJ(4W07P5vD!1uiQ8{w{j(Ua<4L zzEFI-$DZ4|d%i1jzh7zo`CY5pz2K}TGHk~0XXHGH+R|F{c?DD5?b=E!vx4W1vx|(h z*Prz|wcA8buW#)#c-_wM<9y)itJ8gaqbt2P=H2#Kylv}&BiqAgS{~=)e*a3S^88|@ zkM`P}2dAgjzKD&K|22bky0BWQcK&xM>9oGztW2s-sy4c^Pxe`_*f`((#`EKKYw~aZ z;1oVyEnD%^F16NtDr?&HbfcHQLeygCpHTU;(dUr-DV0Br(z}!=U#Q+BQ0Fe@lz&p? zOPi0=8+oaJirfpuQxw1KQDOP7G3h~m_2H*_+8--*_H4iCv?p74&*p1KET7HzQ8szv z7GJGrvyHiS%C3APZ>*NSPEKjXTYDcTq-JdRlKG3RpWlHR7y z*E5nI%FbT9CwuwS?;AP~)=zCYkUdGD#{XKoebVZKi*ASf4)dvtYw47dE)mdtIP-zR z_uG@De(#+B-84zx_{3ueL#vuDU#|XJzwH`xKlinHnfWZ=-)uYY#&eftU8kLXC`WSq zo&EQ4^Ai4jdM};pr?(t1Ui6^;j@O@R-6OBJet73*{5~dGsn1LJeq5AK)F<90ff^U` zuY7sr0*{-wodn#+Wy2n*f@Oi=V!;Hc7|=+TfB4X4%@Itl};-A_Ioz{_w|&onZI^H zN^`+4{@)!r!M(i(%}1tBZk@&GsAjgx;m7{63BTWZ_Wr$d{5@+h4KkMW?30c3 z%uK$$SM=t!_Z`Q#cWOr;E!TD~yCFI4P0#5UJExyY-tpbW+f)A6jK9h)OZfL{aUI;> z(e%GO?2&Db>b*Sfk0ntR-_^eDNqA%}KI3N@Xc{o#a2eN@v)`X*Z(Ge}wC%oa@}Fz* zKEAh$yc3UIoBt%$G&X$A>pgC2Ywb7qaK(ffrQJTd^VM1LO)nobDa`3E)`73G5fB$o zw^vs_{BJL(Sv#gb=~Eg+!OQJ#Q6Tc3#Y8hJC0O4i2SLa)^b34lfWMb zA*cD9HXI7``^Nk0h3o`lg+n|-@oc@O>YT>RcI=1#Z{65fXpn5LeoepPCu4v6iKo9G zrNl4k$r0{%IW?L6lrZ~;4bug`U)aQ1J>|HOwesY@$}K7__a?U}M4SF?@?fgpBJ^K4 z?2&DT>b-*eHFvTe#_~s1g!j%YKWF?|@8%Ip?%rMJJk?^CuZwuSE@jJhGE`|19R`KeAq1U_c&W5N4?tX!}40%TAm+xJ6YnUc|2Hus-@sj{UxuO z<1PpH`>Wj3)Bd>A_2Bg!)qU-*k0Mha+M0@;GrsS0M^)`!XwH*4!9G^g&nGdy)n<&s$zT zR5$)45vHWdx%r^A{5L<2`f#D9{7#h*yHr@>1zQhz>qL1q{r4C8_&-kQPk;B3au1O| zyImfA?>ur_OX$5D_eZ_WAKtO%OkEoI`h;=D?VX?j|DUtYmOtx@{vG^w#msOul?mN9 zHVSV%?+edzKg14hi#d1Vj=>Uz?Bg8D*Ufray@c<7oX~19XVC*o4bFe*DT+V*x2@_r zdh&$VniD@KGc$9xe0XExbn+ob{)gmby62_h{P0`zJY)qgG|&h4x8yU-qf6 z-0$SM&H1nSZ*!Z-QZt+RP%U3&wnviGc6TfR~B z&gA1)VkeuODT<7Wy2aW7UwU+4`{d$fJyE4kd(P-?7tfq+3YvC*WE~#avH7yso!@JY z{GI}8J-0rn)``+czx9>xcEWA_vjkB@I3S8m?4DE;EMd5J$~ z>af^PYB^9nNua{_68k?b!Tax3A5|am+QZ2GK6gvOI(A*F=SjlP1$b|LJLx*>*hkh` zxt^@Ee7B2cY`V;%-*nG=8*eey(^H-^m}R8Pubr`@f13ZD+tvl`b5l>M^|0GdZauI+Rq?~JCH#M4 zmHydx94S9@s=B;u&+&s{p`gJN?&q`e75%z9%b!SX;X8N0`q-?UeNU41{nazR{;}Rw z>bXC6$?bZRWF6@Zn}1E(vSq3`N8u?IxWgIdxYneg=BE-qwm;Yg$;n?srcTsPGnZlHZ^^KSwn5egm(W;f&nxZcAD|yxDkP>r~ysPe(j< zMt4rC4L(?{-mJY^>!#(_oJ$oSgh2&&t5@WQ{VKx$=c@|+SnKkqUG>p>!Or`sPiw7R z9z|!X{)^InKQ~=5?&P8B&u5P4N|escOglF>X36V4iydy)obEZpdp%9{YK)Y;e0|*; zVM%y;KIie~`G(AUna-E=BxK_YE5F_NCI5VRey9GWZLfTDQib1VZsXdQ9QNq{?iD^%=VN|FXUQ!awcr_8RxL%#G)Rm6mS$dV5*RsRy?= z2~_y19TZO$s)$o-wD(Z?AsxvfH?8GDULeOWRiT`XlMYmg>F6G@K7C>*uiHJt#-pc{ za$j%Ad^x-B*txZ5I>OZ&lTX8^aSE0lK3A^H`NNLTf4Y{ zciRS``~Zv+w@vz&Rj+TD zy>I$Bds3Ha@1B{(Q)XJ8Kdkgoc0$X8?nwfFW~}W?x@|Sp^WHBx)gU*QIV}RmPBEok znUK^uZ|#A!P4y2F+BBo5<_0foE3eh!e%PNXp@ZrU^3 z(`WY-Z)rX2p7l5?1!W$Ry|Z#8M*@9p@ROJVWeVBG!QM=rSB z(E7fve)i+Ft&+W+MK|Ep_;j^Y-Q(Sj<(dEk}OeoJ9Wc? zQL#nv=7%{emfpO(MQ8Th)ZLS(X+MvAx9F+m?x~D1ISl@p=kiiTm#MV;*L`_-eV59Q zH6BgwYmdlp`mis}_~SaWV!hpw&rN3S?8}+FEOn0O?O7Qoa`xX{lKXFGXvXi(z>MDy zc`p5G-m|86`m<+w`!;MSxcjqd0nZJ`9q`twU+})eVS&%m^LBUU&eyrNHBGWK*Hvw9 zaii&`u1)Srji4!X*==WcJ9SQ}7SvR1iNEuB;-tBW(w2uO9rgTXBg8x9;>!oA!rv}U zdJ`KWw99U4%ewC>ieHLULfGUsPdbpN{l2{W$o8YBeou?;Jgz6SUFFj{n~6JEjokPcwV4fPG`DbaJdDiy|MrgH?|H(% z_S*|-DQ`3~Dp{WY;F_Lms#C>#uTzuW%ncFSwZi3)yqD7tSx=6QYwyY^N0MjivLBOKc*yPip{y~vm`iOZLMt>w@wo0UmFa3rd3brMmBJKH*}e%A7en>d4j}{Ri9cnp+kh7I?d2X*i$c zq%y}h#fUvAe#}>1-Qn&wIcsnF>Fr{jBe@+p3%^*ZKB{+7`e%Pa<-;Ohjy<7DEp{4$ zPFs8|{rlFobn%>WT+;I4_KO1!KV6lca&pDSJDB+_55M%4Q+idh@GiRzFAwKv{irru z_?maN-Jc+p2sZxirt|q1tGCVgy3T6yg~-Gw(VuyCE&C#QOZV`y<@PnjZMW(|Yibmu z11sgiLYZIzxLk1Zr8m>hUda2~>Un);>chRFVUOj?w{3p<_S@$>YwO_I=79Nu30t;s7a4`e%wC_{lODZS_eglAYNKB# z%X|UP5AQb#)Od?E{nrz0lE2yVV7clqfz;p^XJqzn;zDmcKR@X(u4n#WjLqaUGyMx z^QU+1I!8h?AIg{+KcAC!tt5jtQdZd~^6mE-#!~;!FUb5?nCSL6v@+6k`m&{wdN1ZO z@WDd3;lEK%wQ{s>$-4=P&UzPC9Mx7!w<`!%ygn)G(VSMXNAa4I5~h0`I`8H5!gpqi z{gl=R>1K*wX8Ll}9aB=Zp1x^`c@R$rAF~o$%ZE2*2`g+W*Sx8oXK_&YQOcEl9+I)H zlATlb`XwwhlG3ccas9uGP}BR9zaD4{eY95>yq~XnusT5L-U5$3Ys1cMzIUoRd+na` zZK2N%XIZ9i^So|(Y(Z|%{E0ggJ>LDeYM-+D6szNpyf>58U`}V)mv*D<*pDBFKHs#Q zve;cb&hOIn7<=E(7jjv5Eh`azzA3Wvf1)<0trFLp9`kLjMnO+W29Jg?hn{z<17!L#kYboz2^e60B|SJ>(O z4UZSR(wzI0CO^2JqjG?)QFgM2g2tzNzG3%vUU0efiFeoAm#mTe_r-aqHYMy=Ik#?& z1$+bDfqG`g4C`{x_?&0d)2ow>U+2x5wDs9Ko43<89^EyqM)>`@tpfAIl^)uAI9=cG zwYmIqSLg4{pDndpbkf7$zdE_kqjJ;R+02ibS_JC;eq;6ecIV2{H9yjv_nz8RoiTG? zw59!a7t2*jUpDr(+?Y8v-}B9y*hl|+PgFODJ&MbJX7xVks;uN`*& zT>3iSV9ENQ`&4tEvX&iz&+9&TeSF=$+PH@=N~imKMOQk<{hAf;dp=^h-kDo!5?j`q z8NZK8R{ST|*)ngk$Mtql?K4xDUt?iV=ajw8MSeELe2qd*KlXoYc|P||Uh2{E$a8*C z^ES^8(|EV&=^GvIZKiY99#C26pQ8As&xNTzSzF8X(btY6d$0M(lnLL@Gn%+fM)eT96x^ z`B2tx;&)pu?#AgUVwyMqKk&cfep>y_TXD_g#}02o?%(Kl=6G0tdEax{Z!)61Q#WpM zv{pS;IW2M9tWWWq1b!{oVVO7Gh4(va^FTXW!KKTA=?doM-&V&U$v!E%$YET5NTD zYq^|2=lA|e59)oznB=EF`*PtE=kCm#EM|9SuXRci-k0p0nxo>dq(z`E_?X@IIcFH> zf4}+hdh3UDGogP0Vov#IF#UFUR36b$KDV_(Y-Z=?6AQ9^&tHGDqd2ST z@YkkW6`fXk?`)7Vfwt1*Yu%uIY!aqt7x&z{#?-uR>7=!bOp0Y4wcl5TDBXLWdhq|U zHT>UPPtEaIvPCh-iNjwzd44sUan;R#+S)g#eTdy+qrNF<&farLOLbcAO>Vv5EyQW3 zItjGKZ}*xb+wXbVluce|e1A>u{`(7Zd-OeS7lGFM+RvF0_qEn>@2^QQU!QT`4A`{8 zqALTD#st;+Z}f%NI}mu4h)9w|Qdu3*TMW40C>$D_;Lmf7xVq-I=zD8y8yb zy}Tc>S*#)WVAx-YEob)|yo}o16O%o&^>xLGL)JB6_exz<=B2AVs*e<6dcX01WIxY> z4wqAt^hGq2A2Whu?%2s2&zIcr*tz=qnY()@UY&At_oDdc%#rd{-eOMrUQRFiHwoCN zaUI;?^2b-{eRQg--R{;Mx@q?e4=#Bv6TBdMr?q|YZQq;~er|1ltFyMw%4J5By3Z$0 z-}>=VQtavVXKt09J5qYauy}5?&XJ4Bs_){vkNlo~qH@ZqC%63Ua)shVcYkz z%(#$4Y+rF>tHo@cJ=y!GR?HLXeD4~`u}72pVEty!9jE>ung7B5L&p?>Lz_=dUdQ*p zXRVsOoObI5BgPn&gZ5r36<56eD008Qo$}}|H_xtZFI{&nGrU~Nf8Vh1&nxNW8Pm12 zwOAb;5QE5m$ChlFI(=rTZutz4^uE?|J+aQ+zAE#a7d@zS6ROeQ{8=Ma@yo#n6OF#r ze^6}s@MhxL4Jq0uyo+yed4Jn;{88!;SMpFtqE) zT}7eqf!ZJcL@MnIS5-U_#{1RPYn!alL?Ne&Yqxi^+Nc|aEU!8A?%rcPrHw(?+U+NM zyl{@>*sBQ|n>|v0#jD1T`{SBT0>^cf@6StrGTYQ`p>C_}%ESvM|8E#<{P=t4&e{4$ zR>7+_g|>YjFXtsF&hyg#SkiT*Iz;83z4wv-t6ZAiyD6oLE2*}8h)((Mv9o)c=EP0r zA>ZuSPdRn8o~rj&0WCPTQx^KKsQq#G+NSd6)*Y+YG=Qsf4++1hc1i4bDo&PtS zV4o-I`QJm*b}}eNy4aiQ8w@d#V*UY*y?_0zuSg#B_3 zdsKPDDdw|pO?6&l+3y>fyL`P?%vls$x-=?xzri<4_}I&jup*nFS8Q%xoheCka#psr*~ey5st+ALqK9_LUlOPyKmI_v7Wu^804C zo{DLK#}dOtAt#RgYyO4@yQM}SI9;{9)m=}#D*jq~+ys{YfvX?9HTir_lx^MOJssJz z(=M1Ueg1lz`jhPK|7zUQE^l>9{Hoge@%6d>?(W}yZ;DM|Ve(<^gC)23cFKdyX8(A^ z;b!rlJE!((KCr$SFxNj-@k^V_jf;}|nBVM)=YC&x;fS^PjMBMo&Ff+{E}8Iy_gEVw zzxH3&bF1pTrKQ@(Pwk!_QRyGQBxIX58>qKl(9pbQNlNg6 z>gDyfza(l+eDHgcK#i*sXtuB3<;h;hi51(TE6bZ_7Eh7fc}??Z%;O!0)~x;R<9+|j z<~b9k*U1*={&=**qDvG$7P>E%r(;TstJnL)i9hB|Z8>njqx0oG0Vj)&i=Gd1KAB6e z5?*E|^vgr-;CB_FideOS;weHEUP}L(!|uJ_^68wZ+PY-FjoUQWN97kpBB;jZsXQ z;t^rXViWR(_hoPA|C{%4*N@NK+>g(P-@f{sGxyNWCV}$2IkxZS+-vmfcn0xv!+$-n zKcDvUPEmL9O5NdS67X)3sAYA=(U!elD^gZ#sS5pCeuVX3!quPOXIjSZj(i@K{OGp$ zjG{7;?n?eF)y%|ATQvSpSABi_j>++#r{%TF?vy^B6L!_tr~1Rb`9{yT@CDy%`&&|f z_E_ED%U6T{tWjONYPQy_tM;kqZW=y1*0uJe{l?s&zY%fPpQ>IeUhVI?t`ZlV(Z4_I z(U~dl{WtOK&N=hswtm>^{5=MGdh=v$4>-YAGyExc1ZB7N&rUL_21_nGtdx3AFKV63 zDce)8->mWKEZM>yDkKW<-TZW{am@W>UdhFSMt`7FAXt9#pkAU?UJ0i*(|MR z*3}t{=3SmR!|L?JMf0vsv`XqTuBTpR!CvOe)TXWR-g|wM(bsj4b{&a-s_*;r z=M&4rc}hixzGhy2zsIWX%h~D2kKQc^jERv^I|p5a^Y6DpkQ2wl>-y22k~4qp{d{EQ zeJAm$KiBc6u6v&AdHpkg;Pt=io!s_%sk_ThUf#BK+Kliudb7>59gl8$`RUBp$fLz& zJ#!3qo0{hPtadCt_{ETO}XRx{pj;4_kW)*Ic#gb`q!#-j->KI)dH$yo^oYnHsy(w|Kt4{9myE>`z+!NK$cRjlopDR|=+h{#``i-g618?5G zFZbMfl6Lak=RQ%t=1ctkI%DJg?YrV^V)=A-@afZL%eqvhgSd282QQPDre173O>K$q*88)yrreR8Kehb! z+QXOH?i3tOHUFcar}wTpA`sdn{jt6YR0RFt)qb zO^yZ4J&wcJ1ou9fZb)S0b=DX9kbXwk@ zyrZ&F{b%&ryHmHQUi*1&$=c6%|L@!wKV9BQ>>Od^Yj~^TSnWJD=*LK zo6`P#%krEVmls8uFZcZV;En7mQRD5aSDiLrdgJL=&(v#MJC8jQ<=p97df21x>)yv| z=eqsRY3_afZA(-9JtM2v*IvJqExkK+yIO4J%U<()6^S)9GUrx72bya3f)k{PRZZO{rBX-gE0@h`E)XsSh%UPc74*v6buI9dv6L$4l zr0%NH%~HYBrssLD+mh=!OE=$d+7e&RpU=J?R*R6^rG9zOvv(7ZX20_@Shw%H-{I!+ zzlT0uxV!y^+1<~NFP(iQf3Bow*QQ0eU!JPoJ{B`)cVz8C1)jg_6gZwMB|wK$_L+bS z#`usI%RlYA=dm*V^1knvjm!elvnEUvGpUaX-1X|NrT6o_HubRw=ZkMG*dPB$?(=I^ z$FGmQ53O>aIW_U>#-k6XBzy0g)Nge2_0)huPm8A)h2Oj?F0}Z$amC;J|98rF|E$`0 z|9#2yyXIo-q5VeUtf9xnSVNAB{S5BY<66O||79hg?x$6JI-gd3)A_J!*PC}D_iMtv zj>n{*>Z|OV!dq+=9Cr4d&$^j!JvN;$Rhe@3rH{$kGL>g%3swAPy!N?ru2`*a_H&QG z+p?2h5Hi}6eWO~sZEuS3%g7qS^jX?cIK z-J()0u6y>T?`gI2%bRTYbtN)dJ zXmv>a`dgEKU0-$g)$>(ltLH`TivD`#(%n_}!`_G5Mr}2JI&o=rP+8bJ&u@A!Ju@R^ zyl!qdusmzS?x5%Av;DW8%L(z_lpEA*yvC<AAw9>X;t9I4!joO}T~>gg=zRr|x<2ixu~nf~g=q<2^5 zb~kAqXX^j;@MqtZT{qXh+H@&*W$@9js|tUHYJR-A)N^~!oWlEC4_|7FHA^`$fqTPO zX-I?RLn~;&JxR-r1@IgmMsq-c=EV+P_crZo@eRpG3qm}{0P)+|8xE4ojJT)7_`8T{MJ}21X5rGxw_DC^ zaORw{`MK`$&#%QU9hFvzx@tM~+WRw$PV@IK(Vp+IjQ@|?#C3m4g<^kJaK(Pi(26be zvF$kgvdg{w^3%PWuJ50^>Gi|?iEqAJp6$8!?s)$18}seIl~?-6ek^=eu^05+cd4Ku(1@WH-C|8v%$=oG1%(=^FP-YWelq2I9gGR*nt6SmQC3;-CEHZ#$$3++ z-z%(5EdBG;xz)mqQ3e`=zaUYVVd5vZ-8^VhvHI7&6DO@*aOGXsiLU|Cee)Tk=d3Q@ zzjn{@?N#6J|Koiq{z2pRJK3ps&nspDYo}}0`|Ip&G{;Kb@J8Sq3)~8SC@sp_bb)CJ9E>{P1Z~E8qIeedgpO&_T4#4 zG;iDasIJ}refqM{@>ug_Pi}Q5|CfUnnl+~(4ebXF4wfEEQlj@Qo)~mkDb;+d?}v+< zn$oORr|8bzUZENL!ND^2&xS_5+;dAq^BS+U7-zhFcX7+R1+%Wn`z`zGJ}Kkx#FVId z57*c7fyZZfz2;wfsm)o7qkr|Ca6f~k_g_!^&10Qi)X;v@yNvH?=QUfSIoD)+T)ei; z3X(jxIsR+nS-Y#hO@9a9TYGnX)#|eSufE>;yDB`3f62eCW%aM#ul~M*Pv`E^A|1Y^ zYhoXGZakmqYjoz;JP)sJcV=f*d{`InvtFjCG$!WG&yDqyp>ehED7cXmUf{4mMnd!E z?c>|4jXh`FQrn%mGf{f3ZMN#x>t~mDU!VQ*(z2MSr&lh|a!_0QR?t@H|Aq?AhYqjh62H&>x9PiKaOPd*SNaJme)BTEB(L1^Zb8>I zxscjpahrZ8$yWaryvkn69(;er&H2A#uD+Y1JoT>TyVieCN=nZ+fTvbxtkWWq#fI?(DhlmTQ~CBIK79zu8)H z@Kn*RlxVxPMJbnOIf$)&>$iC8Zug73Y7Z+~o8RAP1qth#Zb%w>(cp3O z{5?ghVE z<~p+cQ}#yh71VmD*>k7-7yGG5v_4rwS*6ynI)!m`>YhHQU#oU}K6d~kwZ=1!0p#2A?hoqIO`fn{?w&ZNK z|IYldXY8TI{CP9({BBsw04oFa~QVze$ra4ak?k^ zrH+}w@;bfPJv(QF?fkN3TeZ#F`__}L$p>8i)jTnGOS7Aos>d<5QwN<=-yDCi{dD8T zq7T2_&iq`a{x{-Cn{!sG=+lo=r~FM)oh`M_htK|)-tl*bHRZ3r^RL{V7Jo|n>h8(& zSKpia>Gi64Pi(!bgRHa;Yi3XX5y~xI9kPtoFVt-Izu1ksKl#M8j!(JM2M_CLNLXi; zWS5%+l?6*DPTXYu>Ej%Mt-ddKr|jg5in`&V{p4%OxhAQs`UP|JGUu#YvuMq2fZwUR5WHF&!&=L%`D>MO?L79l%7M+G0BVl&66q{;T*svQ86~Tzd}Z$Pr>HyoAUXgZ7*Hax~|Lm zB;MX{zs7dLr?j*CrtH7^#_z9hssF2Yt0wHq^>o-ayKZ?_kZW?0*FWaNc|qLa z@j~L_-{;=g9}Y>a4C$8O#($`cPSCf2nfE=PW-OWWV!3K?>=u*#Q>V?|eyQuy){<>| zr=5#8o2{1=y?1U^)b8RrLPb)2sxCH@BqDt~Jvh%B{GMNZv%tf3y1Z|14s(4^E_e90 zhWeo0{$I=9-n$~cs(hJU5i~_xx+0Yg2RgexG+p^rQX74)eG| z&}N;-j~<=t?(Vi`zX(~*-jL4-b)JM~>b~|ODzvRm%#n0rpAw&UEq z`wq{q>MY>CcH_mQV>VGwA7|*^epPF+)I8{(dB&2SUPpm>eQwOE(T*p#)#}?%^9r|H zw@iC}M~m0DeYgIul)w7Uw{~?JKljwb^J8wUy%#MRwq1vF*)`oStIib9?YuR!_q*CG z^W*>HOFosai|w2W+lD;nEjYu3e>~!$IXO=?z-w1*NYcVdYuC&GSS(t$l|9IQ_1*cu9N+G{VxC>L`hVQ!=)cz6zV6;+y>+G0l%U-P3no3=9jtby zP_<`WhX0<`DejMYTVFrYe;@1135i>a*^u1v=zzz`M@yF6b#)cfx_RXNO1-GG8-D4b zYnByjPY?LbELw8$u-dLAmea#_a;|+T=b!z(x5ve^OiuN)M^XL~8Hq*(o7%VbPc)0f zQvXg2xm7S_W!M_~HOor-S7hF8yyBnzeYO3XyUXi#m#zPGbe8R_`=M`r?gn3-d~1`% zlBk^)GmNSm^(&9r_<#CaY(4qCLEgUa?H@mWe181jUugH!;xwco@#=twrq;wF^{HPJ zvu0oOJiT`Il-zsYQj1?K>P?HfX)-s=a`V*CDW=xPFW&mAoFUsiDTh_{vqATi8;^L; zoA~!k>B`ACxA2ODvhbnT{F_3jzVgrdzIx#<-rp*TUOYdboTC+dU>WR zv?OkAY^3YXEwx5#Kfcb;z5Q%&I?vkM=1tdRQ=$`sGh$7GHib^@nDU|LbGNHkncmY+ z$%kKd9e2AR+TXX}G#~%+Qubi`G;OWb-&g$$+^YVS-@AONT+FWEtNT>u1Z`KC5@c|E zu0_zjX$C1tS99;n8>O6JwU`ghr<+Awyeg_BjSYXYBeOKhsp>s?9IaVFK<&(1PEbu=qbalQFzZO-pL zzO#}7pmf*EJ7wd-O?qZQc2b2m1-E_OUHZ>`a z+N>4Xwen2Qz2%#oLr(FzF+EKY*PVIM>GV=iw<;@j_4iBDVxpw4T=-?1ocXu$;oidK z|9{qA^pKp{CnMdcU^BP3ck*%D8|u4b4lfK*_0hAJD!iFk=9aoj=yf*#3cGbT*H>+? ziht$p{e4AU>`w2ekrG~!hUX_|tj&;HCTM1vMVdeA!?jDXjT=vE8B| zr_{p_<8Hp*o4+|CvfANm=GVGZ*QcMo%UAR1yz;u4_+4FZ=GAEdA-j@i9NYGGo=V|k z+wIeGy!Ra27hRk9=00@FrNLOj#p{Qwtc1}1oFzSf_nbF23;M=CmAT%GW54HA3(u-v zw^N*TS;0)H?7F%+OP)Srv&zn6o_pV*UGH9y%WB(}YwzW}r*E8^;yyX!@Wm4<`Ko@$ zTISwhV0rj5?@jHGAGJH{7rYVI`hA+|snNDgp8`#DEmkcvWe=Sn@;>};@ymNt)WyH5 zu#2-yzIL`$?cD6Eb@7g_-cHZXyzTrx?TyEtjc2BoWMXk_GPCOKUsf|VZv6DQ=kG7U zja@?X{M?jM`KSJz=dt1pU(jt8echSYJiWPRXUt5UY-EsrZj#rogi_75IdlB7nWCch z=ZnOasm#=~p5`!J)_V!B`=lwx8ldo9SM=-u$ba_5XXl;BNm5VxPZxUi~ilyV&{1Rw>>ocl@*r zf8O)3yy@%xIXYu!<>pOitIst_S?y2Mi`~-b`*og6_F>5_iT^ovz3~XjU*fZX*L_m; z`K3K>^BO<0A2L45*!aoY?bOu06N4gsD;>TjeyzK@IA17p1Hf% z?Y>>>U;FvBd*>WX`MzJ+Hu6pn%W1u%H|{eY`tKp8`Ezc_rMHVFm5EQ?A*c1ac}vQw z=4qn&%Z)ZI^i{l4y-GJRFqa+|Fs%d_fJ{k@J) z3Me|vls_ra&;3wFW$7V-tyM2nH`ZT=Nitr-_MX=j%N6g69X>RE zcoQZ$r&y&(@9Cz+D^HcZztz0TA5@;KNnKd9{?*i1dsn5eDqGDL@@>hR2qCYT$>l1= zOZo4W?+*K2AAaoU(Zo~GwcY8=9aBDV-_{RsO99PvyS?38Kc~ht<^P2rsc-fd6-`iB zc|%-PQ0-y;S;mQ*+HV!rY|+`@dQPXZ<6QKnDS8p1e&YFN7nZIKp4w<>`miKwdv%CP zkepXni&v^>s@Hq1Q~$tzK5ZisIP*iTMd-|;`09YKlAGT(2x;4|xI6z>)!Thn>_grM zv1&W7YGa+-c{%sB(Bw_L`~Q4gTNu8H(dzlpqep9(&xZtggE6m**N>xbHA+*C3e1x{r4S*R`S%Uz5cyrZo-V4`8W93-XB;Wn7X^1f9e*UkWI## zhp(7j^gZ3Z{qoJtatl7cepB+1O*{6MQE%ApuUph+xMr94EiSEgzwnDWr#jnct^JX( zz;E|o^?GpbfBLQM)Gz1S^eDIGb>=c*mv=F*l)w7c|F8R5xvLA8-qn;A-!*yZr}p=| z_n)YHe&OSx3-b4>p01tF*C}1pIP0ia^&QKN^{*kGU^vGBN;jL!9sKeaOo?0|vdeCo z=MQIT&i(q6FH{?G?$w@n!PxlcE#d@=iN z^R&3t;P;>Msq0l+?oAdw{D0Dyh2L|3UHH98;MaDY7P|>w7xK?EQ~WY<4S%i9Yv=hV zoL*esmmt|W>C`K)qc5^fpU67XsBM}Yo_(z9QNz5)*N->6=A1Y8+wQ%sdZ~-HA1Mv) zOm|-LXN$`A=CBC4WyNnwOAa!NmYm$?6!rAXLQ_ZHwXZ!FmsY!7{8fASx2uingRZ1IFq2bB^-t0_?qaVcFMql0jMqps`mxKU zY5fV650g|_;wNa` z?V3HZ%QhY03AD6!$ekRs#bkfyIh{!7=V5xwxaEbW=H4@9lwEs!rrYc9eT%;Sj$Dvp zILTF_j4$4pLzApHI|)!9wxfP)aI`$yeYe1C#vZ9SFzt4PPdpnymMneY&S$YL&ua4SHAgv z+V-+~3g`Vz0{>Q&KYe09^@K-F{iKfnniGG_6X|?^UFoA;p6b2hE(bram|D>n+4()< zN$LCKQ^zab3tv0&v@ZGS-u+tz?oSST^n32q?{=xG`+T6_Ll@$m)ppKb@x}?6PbbS>sx)(c1 zd46qX^!vS+_C=pPw;VbHG$&Ib=uq(O?Y_6B)!GErDR3?{zj4ZQ;*a@hA3^7AZv6Dl zR_xx^%ZGOF(m5h(^!eO^RtsjaM_dt=;TI0=b`E>Q7hO@ly>&;m&Ytw;Q@_74+I(Jl z-rlr(d++<$u%F%YeM0MZnT?;kZq(dys@b0?IJs88lVzS@>x20>vwS?||LoRbiJ$iM z;B}>gMnBeV(w&pbdcEDQbKR<*W2YW#YxW;M^>5Snw{Ll;Obne`JNd+Krl*_}KefEQ zzwx@X&EsA+uS@zt&stXGE}DO9nF~{D=0~%rylC%q{WXieg)S}ed|VRs_WGq=w#gaH zvtw#3TFo?q_bgtm_S?zl%bUG+$%}bg?yKEQUUJ<%q~zwrkX?^%6zqC*@!_eRQ%u=| z>{r}d{pYPyFPD2O5Ew%V>izpHZhid->sj$>$O$&?F;XZ{aXv2 z(YIiBSkkiGOiELE`|dUT^~bhFdOLj(4NO=qTkF1dPx|uK9eczcy)yXNCuaQqM&dK; z?K5|t(^cD7Y&>~y-ov@kzH^Fq&n$jt@Ohn^@$($BkL$#Y3%AXzEZ^O^!^(Hg>C{KD za>nmJ&8`f;aHe{f&Ytq+Q@_94_-P-r(nonA&j&M9SmdX-902Vkjk?4>Z|c{^=c%`DJg>FKZGG9iesi&Y?ym_#dbz(ou$$HXP>z)U=W?yQHtTYE?Xo|0%;(nj6dtgg z!ZGQ-R3vC{=1tF@l=rg*7N}0P-I7vet*d*>@$^yNl4on4mgH@ns~3~LaO&I1Q!?*; zWpBIOrhKyG=0%sMONF$4=f0Jb(5OEDNLnCI;muW62uZ3BMB0 z#$C-0-5oS9Qpm3^WupDXtp}!VIQPzLhW-7C6Rg*pI@&HTz2RGweaIE9E?JqnF>m>% zNfY)?Y5kBcWX&JMu`fZjQGLyk(_yaLW>y|o6MkQD;Y_)Xd9iG%+q%WKPHfjV{ruK@ zhT6KtmyVQ&&9rpi+F5>OhNb&l&*v-5Kb>P!ejkzdNJjhYp4W`Z&nqsRu)IF2^17Aq z`&${$?#$NNlfHW9_ct3p+!ND&pS@jZey~bizX}VJ5NC;}Q^NE${BI_IX>?antOybM z(|`KcgM5{}|G#gt`@k+{s9O8MGE)9m_Zt4a3fv3DQ)_?7Z?gN+wT6Gc)@$eWH@`f* zp6m337rfeYitdy5r<`8Io7MiPeQLOXzdj@R_MONlDZXvc=iw$(1D z=7u~g50Vaku}D?;<^maZUG1DjPp|csJUhew;*G2K%Ri!`B^ReT?Yg3>ad}T2Rur5cEL0Qc z`GHmC(QBcvjdLdn+|cG~WS%5oqr#OFy6k_U=ZF7pO8@SAt9)<|qOy7qRF(f00J z9_G3;Un~Yq)7{xK^W2&U*XKH`7JZg_c7gS^PKjr+-r8?3Gv2;4-12Zjmzhj==M=Aw zm(r7jr8NXKA8x-j!{cUw##BA)MPbWo+{1!a*{!`f{a4*pxvQ_e%UAx}wI%xNY}Hsz zYjO7AZF-+pKRa8h@;d#!$FAZw+lTDnCFOssp)+d*vzk3P{g)Q)*1o*)yT-zx&M7Kq z)T-oe1y$$po%d|uJK&iL*TYoo5xxsh)778<^^DpfmoQo2+x z>B-%y$>*jfKe7?los-@*wfuQhMfkkdice>c1gEIUEuL8(d3KNYHjRmw4KE+s`7EOI zaNfhY-Di)4=01%5D)uN&lj|M(TF`zqo7rod(%U_3a>E{#b{%;v-nrfV$==_t_o_{d zZXEy4KJmN#au#pJ53`o6*_5(y(`(_>)jN!AYqlFDJa6fIXgRUb`eH<-O@!7$qpH7c z>@oM7f4l0l@85Fh!1t3~cSF={z2;2WTD@Y;UEkaqbKRLwLc;>V&HBgy@8{-cmU7EY zdhzJ(&ytnOvq6(rva?^DRZ_kE>hA8lyX~Yjlizet=9uy!I`6+n-F}8hQ5LmHw=6%l@s-@_+T(yL{=t(wBZ;A5V?VI{#?Fs=9sJsZ}qpEji+O>8^cO zcel0uxA)NTj02f`N~$(f-)u|UxYj0py^vPw!q>qwTjHm-UNF?=+%lumJlZibU`_T} ztqW$WxJz!oH~rwdU3$ye{RWe+DW+Yj621&NZs4L-p5`N~y0oWOb!nHZ>g2Z0*m5t* zCuaMsoqgbogA$@TvR6#Z|DU>X-RE$%-p^*t_v>~CUM@>74Er6+mK(iCbM@bOpe?&e zvEEINm*-7cpBc9Cef*kismLYSQo$>-y|k~rJ7JI^wbdukLH-|I;={u6Wbua_64M$+izu{1e>Pt>5%!UqEHjl9Y#ruMWJnP5OU&&Z|uy zyiYz#sjt4j{>aG{IjgtlnNKyTUa=-|;->Cter1=r4x3q3U-PospT-!wg5?y`t}V$* zYrnnD$UXmeOWyqx9!pZv12=_EX^&ju($eywxVLx8sjO2cy1c#>ifP`=I(3VArTq0b z{(sBQ-g}rI@?P@a^QE@0_I4jy`TF_ptJ5asb}DZ^YF#HKUjFuI1atuTfFv6z&W$2i*vCGUe{9>>|_I>osP|?6WX0 z|J*ul%K_FmOMRmBwInycP5SmPqSxuRYT)NhW^uEoKMk5QW!qmP?_1wagLWOyIl1p0 z=&A_yWa&DC)GMpB)mOY;f2nunZnuEz{|vHA&X!u0e&xN>an#&TCbaZ(%SBWB*+z9g z^_Qis+hJ>7>svGL+rlGEZ>>rj%O2lwI=k$Q(p|Bj6?g4+MqHnff59}etMsg>TkLD6 z$?NvsTasIUV#(_}d6z8bq@BB&`qYNq_0jLGDlGF7gO94#zA%lH4+{(R`t@PCPS~c< zsT*(a_5NyIy}gQmTi2(MhlXYWb@x&qPB$_O+O+cPU*^>OB~v1noau5qWuQCv)dFK( z{>wYLvtBl_YrS~1*0m(_xJuO9#~HrmyEa|jo%g@Pqa<EYb=A`@~4ZuGUH~wwRY#xTW-yc*JH9SY|%5w zxc&ORmmp%<{m<h~pjTDPYu`K;XWeBJIzd3*Kr z-o5g!a#sEQ{*dLy{|CVV%)l@w4HU$clRSPdQfc|tvFE>|@^dqhPiGew?JWJj{PNY< z$qrAt|FJiIO4%^~@tz&hkM(3$$yIrJojUUV^)Zq7#opTc6O*d0p4}<=^}o68-$v_Y z>9!^Jzx0&8syVx?uyt1Mt)#PkokwRKt69A6YSxvqGbS&s#AlbDW8;1vm;Lna?Hdkq z6My_s;(W73=)dx!2lYNG|L%9Ie9)2Jq0H4dT}9~6a-XLBQz}2!`855X=J`TdHA-vZ zBwwHRvMY+4Hcmc}%&hA4^!l>~kDIccQ*t8w{(GGK9?f*-GC;Od&ufm$l9mtLlCoM$E0WgqxOtg5r2ky3 z{NmJc_e)QYyIs1)eAs@?J@Y?1Psx>@co%qedY<ONo7?H|thirqVV?%9`!O8@OsEBGTizZX8`@qYBb+vShG zx5|fQE=~U@d3;EYOt`Koz3njD>o4=7PqMvv^2W+AEX_T?`G!NM$Iq=lDkmCAX|?8Q zP1MukOw@Y*BlF}Hzo@)hKI!LIFaI`Gw8S%cUJ+mF-FJms{xRHsbXQt^vD;%6Ce@bZ z-&#Cwrkez~DL?H34V?J*EYX&eb|ai){;%G#=3Q-m8a?Ukv0E)$Iv?#V z@4I~GWAN5r&%=9n{{7bdnESDz2c+%Oa9P&Ht3u0PO4BoAed~{Fvnr;qY{-|ho_hb& z={ajcucxMh&drFg*!7ox;U-ZVJG*y(wrttLZDho?U!CKd_l;{`G;b{p-(+m^c~e+y z`h}cdg>}!i&Hl7Cx;}2o*4m7T>z?wNEjYd)(@*P?3BP&9?Bil7x#x{uNVO`(J`QQ# zw(`b_ty3hn=9V#AAD{HP;=~!tvKf`_$4~8s9Ig7%M)}h{ao0!n&PoTrs|x+w;&Oi3 z(#;R8ev6(~dlRa*eEPF5eAg5E*FRopwov-t+oMxjIc>x5LV?)}z3 zrPfXPDYJi1K-@JskH1?$b1qZwYO=q5_rzE9wvhH2ZK2l8&21|^E^b)3%X9nP1t<4D z?lL(oP{smHj1NlKCJN0vHQD9V^c106=}(#YXI4(%IwOC7{jR**vcX1Se_SN9oTc=H zTDD!ztd{Mb@|>foU|rN&yY&Y9KGZmFsJ}jGTae_7;29g=RZl*ivwH^bn?&cT8wGOC zRgb@O8%wR%x>g!DdHU9mR%QYjNxwGDR_|TC(^P%!w{I(xrQ4n^TQ6m2TU_f__w2AR zmq~P2*Vf)tw%p*Qp4WFBTauk`SUfk8`@K!l)4TqWpp&EJD`Hh1epkKpHPX{8+VNzY zpevh@Ygo`XyKRdajb`%}J1+UN-Xdbjlj;>`-uJY4nZ2}DcX`@br{!N5c)KSoD(jY$ zwwBz2;_Npi58Z@gU!7UD)%x-j(J7}?-Y?FXWZw3~;m1@PIgQ`a(wf09yWFpqJQW5_ z6ka)X12ROGi-PnxAwrlK<`T-8rMqUiqL%W3zD--n#OyItV)+;CybMpm;iVB-i^7gh)O#6AKnBQymJio5=@xSMj!~Z9ET)!>!@~4B+-TB|v-jbG3VK@Hv ztug-Szs66+N>5uDw)z%cp0vj-D(i;Z>0JJck>8@M@_+j5%7|uM`{~n`yz?2VKA>qH z={{AhjY1QJ4y}LC;2`<&vvMle+IzGAoIf@1$#Lt zk%!y-X4QW0=X(3`jRa(tl;OZj9#D&_V@mTOwWD!U3``!fC%>QhEjjnqop>LKXxkjG zU(Aa?8(sUzI!pJb>nz!)Y_Z-`JG1Lg9I~9Pv*&jD!@bpOYaSR*Y?&|Sc|Bg`($`HM zyW*y|e6XG*@NfDW{(6O%&hp+)FM=cGf9VLRvENhsU|*WBWXjJxtzzqyXWn+Tc$Llc zw2Ly@J9(Pe`vp%wRaq6EE3#UirMPwd)R&W<#YD+oxUj2MIrH#Dm0fQxws@?tnbhLJ z`7r!r%iDW@l~dzaglwy}U$u5*V@0vV6=7Hy@b6H+7s`gU?($+|u zElv2iVdKwl)$h-2=ij|>$-8ge$@7mur?8hxc1-yYq7*bw_4s`OhCaWa>{rD9(C+1!;6P4JxO=$AE;>MZb%bM43FSw^>{Qi5y&jWhe@-|7T z3-5QT{FtM{5i{7CHH{{8l@(F9i|yCi8_Y42NqZis z=4R6aN(hr}^Qvr5fRDDgn|}CTx7SN^++3y0iY#_0DzAe$DRMyzTz1^*3wM7j82wbbGeV@Mq-hQr26`?l8r! z-WqXz--Q#U>r6lAwNI_!?`VqWoH_|~Hi(n_hO1Llf5}Bn+dF&O^9_#HyOWhtb7u6E zK6uMH^Dh&q?QS8aSsom?SzSnTbMuyxD(kfq%r04ev&xD$YX{AvdrN)Jn5sPc8q4O4 zx9c`eoI0gFXv)}?}y5FPn%@L2t-R4i%o_hBr{q4LX zwZ^lBXD#JDEakJhZK|009qWx7-rc*hXx8t#un5`u$~Tjtb94_(m_Y+fE~h3Rs@wkl z#^X27Z@m3he8Z%8ch&dG){n2x_0KXpQsn5i=Wn%6+^b`{zXQvn-s)OrYUjR8(u$;jKw#9v3H&#pM$EcU3ZtLgg!6_$CRvxbE@_va}u{GPky^<<9~ca}z++E$}| zdv9{{lLWp!wuwiC*@QNNnuCG6ySq+#os!Es{qZt*oof#7-0-b4^kTFxpE@SF<&Ad%p3?8)8QY&r?%cLB?NL;+=$^Tg9^BXEJa}AHs3uJ8 zkp9h<53|iKeck8FQJ*7xXuf819NUo-lPy1dYZ3IHv22~osXVQhWo{}t8GW;-NpHJ& zb8~n=_2HOZDVrO^N_`fY*2%7YE9d{ZtUs{r*%kSYHP3<`El~;!bo%ks)^kaU{O>&; zKRdd@-g{Oq-(>ysC+oc<&c@NgbGDs5EN8NQXa2mztG1VUPrs9ljgbFe|LBwTx{g{W z$l^a}?*ZhkqIVY-I_pbX79HC)`pcOW%0oOJ=oD2)xQ~~OD*1r(%owE1# z-l-mvkw;^8hhLS}oXmGV%eUa>wmaLe{kmYV`(b0Ev5)qn<1^$PpnGN>^ngb}T~4i^ z`D4fD$&)teot3eC9kuOmHRuY*=dZW*>O708P=2prAY8t)_4}2G&gY2}f5a+%d@ua- zK)$L_MV#8f@KnVg^L*uhwX~l6G$(e;pC1l$UzmMp+^*OY_+r_o!r%FS`2wTM8m9S_ zxo@kQzHaH~X?n}LuSI8u{#J>SKGnl=>aTLuV$XaBOF7NO3subyIB?kCcRaV`&Hsp? ze})Qa1${!A!O9aisXzV6`fthM&9{VNm+Azq^WQLAUdHV3mRI`>pRo%GLXUN{5C+Xz z2u=Ky{d|sMW~O*b>eSd%>sEVaYUj_Gw(n*7&snnNV%f7okM6n#-gEv)X0y(o>eklp zCf$3sdyCZccQyS#4>~RG8oPbU#7#+u@}dkA^HWy%ebYO2Ze0qa-lGGzg*G`zc1|(7 zw7ST)b)~MgN3QT6uLU}1vzLo5)1A2X-q+7B9-Te9<<{EerPh}-{x%BM27VG0UHiK9 z!UiVAKSJ|<6_z|Id4I!WW=(}(^`y-?*^i_uoe$NVo|RY$&oYj%Ec02`QQ%zab^mp@ z>JmYxBSc1;PS0}J-8+f(^vap9>mwKBhKRq8D)NZ|jWxgWos+%0wZcj1qph0Y|M*nJ z4}HG!L195*J~xUdd7KOjO-g;r(9eEqUWZOlT6>14Nr2z`1y7G!zwo(jWmTTY8~edw z=ccQ(c~7srZ9U6OCdhSJg)#q9nf@v2$4)gCvO4{kzx&Mzg^5M;U%g#wt9f4k({h)?rXl@Q=%6(7c9vHX%*eqc)oP`nLq!weA#M$`t+?yQA=`X zB|N$1)iY=Dxih=Bbso8_%DM0U38x3HvjzT$b5EUUtXa;-Go@on^J)=<&GW9xsYm-VmiWxklkK091-lW&uUtU$;Yyb!e~wx9 zFFCub3UvPM#LZgK>QX<;ZXU7DTC=Bmw#%Nq3ypp>>9E|}#JRBkw9|{^ZxUNMW9M(= zINp>R(sD}Trsb3x{;50XcIAYoo@`;zJzIL|(;+ph;5#1a=c^jd#qODMD?IGN(de!W zP=EZ}5>3Y?4>OcyZ3;hTHx3%~)a{6TjeQ zNi^sVX|~wi2~Vufh&@^*Qu$tOVny?$2h|};|I$;1{wg4bY{?q0d(wri?t(60-I~VW}cgMk||Yn?*1IH*d6zLv}Z5Blr_Ka+B>Pm zIZy56H2YO9{c_$ou_z&=QJ}6?DG1W`FAxKb(W@#wHTMVIBR~1l8}Oa;>%bS#yp9s$ ziE&>xvs@&i^K_o#yi%o)J6sNK_ZRuIf3nAe_g*WmwA&~4pWnn;E#h4qvEoSb*8N7e zU!4W565^k_W%tT6<(DUU#zh?q3!JuQX|Y)7#h<6swHk{GADisDqIuy}fYsW&##%-9 zo=jZgvA|}I%j-qyL2^F579L<1&eIBV+g_~2m61UR2&4uk^EVe$TI-eaky#=ax%~7gjl_t$hjJTd|;& zJ@k}VzLQIV^}PF>2E5 z1y3KjS*0h6Ze73a;?dj7FMFvk3~l6zx@$b`+B-?l?C-qcN=r9Y8A)mUUccy#so5$A zj{SD~GnO2A0Nw9%&H<9}ZER=QEPI#KoOZeY^VZ&vt}&-8m@{YRiOCr29@%&xd~dS=cH#X`?-^^VZksiU_rgie3zsBww=62r1ut5> zk+8`7mbymcre*0oYwsF2U3(XNc^9*e)23qe$T@GO?(Oy9d}yu)JI+1b5ZZ~5<0w3| zQ~2`rn)<3=ht0)bY`Y(Q#{B;JH7iusS-$D<^8CQ+qWB@(Q@+OW8vFezUlx8>Rg{?d zYc0RFw${zum3#h}wR$bw?f>-cy{l7vYG>S1tIo&_RGw>@tvdI*LA&0qAcyI@ETit) zPP_I_*6%gnieEO0LErZEzP%?$p|abj9qXd+tuZsHiJG+FsW#T6#~r#G0)db<=F(wUWF3ufHw7^vl_E z%fEu8Cr_0%x6I=`7wD9FWuHZ-2j|23cvzWwE(w~nbS=|A&6w2PeQA44{)KHvqbu5v zIo%QC{&+2_qkQ+&ABU7a+Urd`5TB~}W19|(eX_Pj_eq_5e?A~n!q4>ofe|D<~ zRd^{i)}M0vpe&}gc%sp!NuNYkYn(q2V41PxN#v3{p575FQYIEHnm^62^x~yIVNq%K zytGeUyL6K~`{kdh#xEb`vTiwb`r=o=BKjl&}Ca@VZ|c zBi-*?arM>buF~7DU z83E1e{MR=uDwnyRdeIXi7-m^t#{oHBN+b?!qYJaijCvQpKS*BeN z6g%}YXL_w>j@*)WpF`DWo=p&6&*Y9N0{^~armoqbvrom+a{hW2hFy+j%l#dp{CrN* z!#kVT9N8YH(wOJTVWZ5waC@ralANDmR3K1z@xIs$$aWhIjz@afswms z-zwR?!k6RnCC$93xEn6%r(VB&Q^{MB_thyYKGsV-S9giGb#aDoxYgR*_H)c+616qo zFXlZiH0AnlrPM4J7B7zdg_tpSY|^$*OwPY%z26)VIptnayW;BPEuqh6onw31p>jcS z@&n;bc3-kmPMPnv-JR)awmWz6#7V5D<8Hn>9C!YO$I3r%bb{W6FfCnk(>XOaf61BB z3tX4Qz>{$6vjk%|teT>CE5t`TTK%%t`o3%5mR$VBd^q#)!<1VECWem^%^pUZD$H=; z*dNK>JLPxCd!4tQmGfLrSdXCc8hL@pE|Um)+U-S1HvbV4i>$`%eEk z>$EQKZtXY~lHccg$~NTEo25eCQ*%!J{8DBWe9Pgv-kN3Kramn(!4_bO|dFZj}la-Qc%l~S7`ye&>w27N)svk++es-kt(XJzV9#1SXhNZ*h zw$SqT+L!%x=TCNQuh+NF{maYdTRo}u`!i3K3knkx0)(3UPyhO`dXwEB{n-L(+FJG# zzsAnrWNTYP4(QBAa>TL9_R{&upu8S|ao0U%{ivn-*HO zy)F4R=joMwIbyMUmNtZ0vP22@u$`KCs&dL#_N#j*ZVGqt;_&Adgt-G&p`U3|IUz2Z zF+1O|@LplqBXL!s7-i0b4Js`1Q(HgGPpN$&sv5!-E5Ff0veM`Mt6HD=FDGu=eSM$q z{Zk)g_RT(Z(=lq&>m^U8`GU5!?Mf)^+|;${*78o4Q?<$&pk>hkS`&>-h13`G3Hd0r z++P!K78G^;o;lk@A@IOUgE0$a+~vFu*JJMU+h17aZ{V6IviZU6G|@lZYn>8ShjO&2 z)P4x;Y?-&2^Wk-`mUaAIU*BxIyY__Kb+08?+#jV}x$*mOrgrz_CD${S^c=hPX2Pbf zO)C4RhTXV!ap%1-ms^cBu;eS?kNOKV%XA{_{$ymFMz~ z?(>j*_x!-`!1s7-bxA(2C<`3=zjt}h6xq&opWb$6!()dTG#e!}@zWV6fm`QHGiAfY1g{4u zzn4i>ShrH`V05D5KGCp8`O`fg2+kI$yQkK2Py6!s3tUgP-E}@)R2CThZKjmw;>Jzx zmhC~6vGR+yaWY03&1Cgr*VWBh_VkjQ)$KU<=j+!j=q~qJ9{Nuw>h!isdA~)x?!p;| zFSWjkl?$k%#s`@Oc> zI-SW6^h|{N?|Rknd#l_~o_s;xyXC{}rN7?Y^Vk{QIYl+SWXT)QQnZuj7R-6Fbm?W8 zEo(N+oEB|4l=tVyXe4EnByypI^ppKI7%2X)Cv!TE5tH_c0eG)o9PkH+E6= zHM`A~R9luW#z>ma6ghJ5r}n?S^Ko{)h3oFG&s%RDa}mCNuzSyLC$)XLWXOUF9DsmU0vVK>$u~m<^SdKr9){}o4+Vpl^2R`-7Gpq+IP#QOsTa+ zoLj8s_+@|ZSyZayA?Mk};`L3axmdv_7o&DH<~MsddqP{c$*ia0KECnQwe#|BukSL| zeY|GQZJm$z+H+JktZ!+F+cfdQa#73OenuAQ4{9HlgmzBZb@$4uo6-~Sdp+F<#vscl&;6`=7u|l;2$IWhr#P@rdB(r2o-|sc8w%`B%Yu$ZIPD_E#SsF6)e(!qM z-J%j!Y;pZ)`S;5E#~E+kdU?Urf7-NXFLsAs_#Sauc*M95&!N zY|tZlc;X~kpS~%F`{r9(S;ZM=gm?NOtx z&ZWUKoX=J#@@-wNJZHAx%S&Ax)6-slHDf!KD6aW7YC}cX>@^nu-o|#Fc))aIY1V{I zRw9zOYZqv4Z(mm@_2tow^4}FNtaG1wXfD${%Cb~M!!l^on}Dgxs$j?P9G+n)qj~e- z6Aw!r!TR@yvfX-T)lL2_{IZ<&%q^3wjj)U`}saFBNgH|NJHP1S}t2pt}>l~gbZ5}W0bOfj;{$JlYKjyewls6aR+{sD8_%xEH}85iYdJ3wVQf)WJg<$Z=}25#A#O+O#+39 zG-jBj9o%|ua`^wkcW(}T+fBK4 ztCKq>KPu&yUNtd@#cT1ouN=jz9e0GYD*fpew9L0&boI61^bIVXmLEOt8i>za+IPXs zzo~A$>89_!j_3Xvwt1}FA)sj)vgyr)=@_XqQ|!;3)JLc8v)_Chq+6mfcmIurS-u;b zLyJ3-&z^pM|G8hOy7Qb@=Q@<{iz_Xyn9sl0V`W)J+pT?(w_fSGdVSYw`TfrE$sO4a zK23+5GhQkwDN2>0ESI+bR9szTR zTLf)tJ~{D{O@ZY8H|53iZl&%$u+Ai7VeQebqkN&I2l=k*vshoL5qK2wxpYJD+rq;p zs-2u($xEgz*Zf@{`zOW9#4-0i)7IE-5iRGruLPe3c6Kz}?TFeVxbfm@f%(fEFHN#o zvM#=(=dRp^D|W1Ncl2+%E};4Sd+(H*C$m%AyD`#-*XM+9Du45v({i`ZNe_Ru|G>JM zlS;q4R=IwgdS0(=O`ZCUjla4Rj?Y@Gc3+^R8`t2hv#k0H_nT9v#BNQMk9ZOA@mW&)D*tBLY`%7j zt8pDu^d9}SGf`eDqLIEuIVElOk1CfL;hIX~c}_Whf>d4zPn;v&v}G;h35~MWWmRe= zXD2Uwzr}IejaRzUp1qOgu3bO1#C>VqdX6dLCcPl%$YOKOYTtWv|6ShJKhL;&`}H|D zRU<#Az1N(VAAW1|g?)dnx_%RtXSWWK4YIyAFU0z4&<+vJqt&$Z1LEMAR9tFxw=xUS5etKjan(ZXHlj9}v?_r58+_Hv!%UbqQYS!Ti? zle_8tm)RR18~%@Mm2=$Oed+lbt(&IhWuDKOc5j+4c58b5h8qiCy%sn=OZb?Fq@vQ& z(*b=`-g3;m%C)sv_t0N%LD`K`oVQYztch>J25;ls~IhX0OB3f1HS)Q}cogfvxUdLC{7*eKL zJ6!&tQj#mY@V$h(e_&bX2}PzQGFraMs`5Y6ZZ6cvmT6|pDc=2j%Gv%OKKGx!`G4hG zOM|4fIqO-SoH^#JpUh+}Tbi$1w&I7>N6u_!HFY-6ig`LDRQXhlhe%L;GZ zLwmm~WL-;?zxo}a9-p0951^3(VBoY(fX*{K)K%(eZT zCcb~yg?(=(C$z6xoaOGkq~tHB(o@&QO^geZqAsoYv9n{c-d2v{^-ep&EtQzcl(R0X z9XY1!9^_|p$?UviSSxeM+Q}2{E_OL*r+xBGoS;_k!pBZ4-bicvCUczLzn|uQd&(~E zO+cy1lSLjkKRw=i-IsZ(VbCpe#VZRvfBpRF@G@47{S<4opzy@*A0fJv!d;b;+vQD6 zjTgR`=$})2?S!R)nB{NXiI=l;J0|^I%zk>)VRtOfcwk}pKCIs}Tkb;)Xl1jm!#Z$sD~|)&RMbZ z>eJ59|KH~9N!xW@IJRVQh(`W6Hb7)9=5xOFU}Q@3~s6+HPZ7=lLst=Kj09eao4dkw5M<-CQbv zV&bO0BP^*c+0sfeQT0c@?@H9{^IXC+^RAM%($Z+tLq|nYKe!z^sz06i>8Xq*`4J6g z?#5jRJKwgibd!kQlH_~O`>VTItzmy!#Jn|~% zz2;AAre(Q#v#d9N*w6jO>%P22klFX&vvz!vVpd{CV3?`<*Kb&-KKf*V~|7t$$B;__ zrkt9*e|@+1>dYl;T5koqoO06)U^}1ZxM9YcFKZl*G_CFE6~Dblcw*Rw0In&wxYS>~ zN_V*bsb!0adiDBV5w)es_iS8GZc0pT(bh{I$(vXUy}jM`q>LT{ere z3flGO#KcP*&#NpA)^$2!vebF6h=%hWZ9%ae+<}7G6Bl^8zWU{QLaVTSUEVSo4Qtm0 zTc$EE<&aYH`BvKS;NYe=A0}ZotK`1)PSKk@O{ZY?o|xyFN>3+COEvdQy!3B**OX6b z`GrTKeFC~1R+g=s$Wyqo?bceRg?2|d;x|Yd7M`B4LxnGMcJqRj1rxScmP_?jeCL&t z(TKeE=84BiP&bF?ut6G+yH}ZkWza14V;(O}0)H?0d}L1Ry2;aC?p?O#o}NytGqPP|rSY$&^P+oRytaqy?0=RqqZ{yt0@lai1#(|E;zYM}Ky7Ms`*B3I$!$ zb#a@hy@l7`>3(MSo4D-5V)@y8lXbF>6)j1DbYUcn+muzUXUJ%tWlmmFGH=1$cSf4& z8(%L;^|oEUM(<1QrUj-SR?40~KY#0UX3Ze0KOz%11@=w(=3BHvWa6c@LJRMya`4}3 zJmJdP(HGOXV~UQ7Ua!-uWezFREFEs!NdC%G-SjF1l$KLp`0tIayxz9ec149ta{gXaS}LOP zcD6u{zEZ006}hJzpS4|%H2HS$#rNKDkrmp~=@BQ~^X2Wm6RT#i#=d5GQN3p3-g=%Q zK2SGhQyR8nbVlanFWJjIf3e5Ri?BNUwe#u1cfn!nzRa2x{>VHxIsL+!xuBB#*TtmY zuap)0O4~ecUQ-YH_J7xoNvDFRoaNXiY<6<;lzFL_L{dXeSRFa`TtQKr^`y4agl&m^ zC0C+@tz~z8E4=VM%5$R8ZwCLMO>1^yE5y=n>HOV#yJZf0tor&HPyZe1;yAx@_4Nw> z)B2z5vx>jZnYlYI&S3YK$49?~xb?WuWJvQ?*e}?|^&wV@Bdh>^^tYxY5^~zREQ(oHLF=efQe0|UN zT~RWh=iP03Fmr8$&1nJ6z1{*lGngL<6-}5U+`gr>d&17U;)Pbl2R&=qpP#$;_ZZXeP3Og|L*yqbr+)Sq(iE3gO6>^dJycV!95uJSWsA>} zb$rgxt}$eI$1GSqkG1x3$ct$8Qxl8U2hCeHg=y)GMd0%6)l)aGd9aKzBas7E1n^BR z&ig)R(=);IFMpofclopM-+8w--2A`ttgqwdG8^msvWvI5-=5wd@g|_w=E%yvLou@i z|0TP56{;__c&58dmg)Uv!Z&`MNdDp6&7tHNC-(2&&P~OwN z@3h#jys0+6nwm`DdNv$O9yz#%b7pyk|7rQB#$#i~>*zeS`cqta&J@!>F>fz42yDE1d!OU2H?pr3-z~n=b7P09 zN1Rl1k8b0IY1U5n4R~+nPM&brQ0`_@*QV2MeN!%(sIq%aGcDh*8?-DW`n|E+sQ`Eb z$oS6#aChJ9^MR{szx~!{{#;zUJoghHv z$zMG+gSx)|y4o?N&y9Ct(4QMC<+2tg%U(HW8nAn+@|pDlfd^j;%%9XcAw zp7qIWGFo0NvuSs(%GXIsL8lg8GRfGWlO4w=rumq?W6I~S{-5ITB2*<#Dk13^dw}$j` zrQO9cMMsV-dHBxLGU%3sQtJN&2RE&$w2WBNqrFL||3=cx)#v0V@5wlOqrr8xyFcGE zc;#}K88U2S!d>^w$nJ6ZKmXh76uTo25Xc=(h`7{U-GnOPg1I*Lb3N$_^HgaYjLAn)eLdPH8wV;dzK~9yiQ+ z>k4Pi`11R}OIEYbY47IQ*O#5V#ag!XEce?}@sTO*J|Tf`R~Sd-~Hh5{Fyt^Xy>V_{T)*#&OZLE5HowS zUbpn~`8E0emtNs#=kCaEDk#f5sPy~Oxuf5v=Id@-|I6sc!e={XEaE9#Wxcv=)qaa0 ztJsqsnGq9`ud8S;)0&$t@GP>eqan5obp&o0QKuDnHFT%_XSme680LDcpFV;l})K(~gsQPM6~U%)e!ndhg8L ziQR8bZDYF~{+55+`hN;X7C!UnaDMwz;P|a##lF(#M}(v^t3Le^dHTI`%Gc+i-U}}Y zXfO4+*)rkgS&n&kby&T(dYc~F<1JvBubp)0nv$Joze=o7(6tt&+H8hRr(_o9&Qg+n zYbUSyy}xyyva0r*oh{4u_nUI>_g=yiXR0;<-g4qmh71N3-T1uu_WRv`!}%Tu{TH;z zz1;J2bJt_>o1t&`3Rl$W9a;FScx&=q&#lR_p3>XqzFOK}w8W(1=EP4j>R-R3FI zPwTv$mx!D$c3JV{sHJjH@`N|07fph?*2^w@IX}I9?sQ?z!@LuV9b zxx!CRT*=mLKNY9_;^-q8K~3J-do6?d9Q4(Lq?lFPy*7U+QcAtCY~$-+Zl@{{6;#Cm zNCkCR=;QZ)#oXN8@evUbcXGa-=()e!$EW_x|C7FQ+-c%3o8D??U*$8+Un%>_uf=

& zvA(Jla>pH1*-!fF5hvN(lUuw%x43m(p4gYO{z|)Rg*I6qKRq$1#Y0fbb-@!4%TFep zea9C6vx+p*_#3lJ?m)=pdO7Pid+vDb)F>~}0>%CrHU{Q8XI(pgm;FkM?h9Xx?|f0G zR3&jhW3kH@jnkWSPV+xLIVsWPj~^X@cT z`?k;U-&}LMt^Xc%J16_>zjs6axcv_E8EB`B<**I@e%gw5*LL36K`uRQm1cgT^(OMCvEid|B`FfebQlYm1^@PS zyi;Dp&J$RqBN)jX(9y4RdXtXzoSN5L{nf9F?0YhI_08E+L~rfVwA-*y_0;Nb^$+E? zzHi@krB3u!OnHy;(-UO}JYHV<;JU{DbFt><=+niIc1_ET*k`{d=lAA)Z*}!=+yDRb z+kfBhcjChQ^`&=?eRBu~`DI;u;O+E4iGz z-!kJys>c~Whg-)gFHG6#aNk1qrtIVimu>kh@3uK)_DreWV-Zla#3a4A>X(L{`ZCqs zA0jp-EfLut|I7Hz25>7^S&rd4!;a35I%k*v z21iavx;*i6iF0}4?efn>B;m)4{_RiaE?M;T{L^(_H=}0?-YHVB z+wkzL#`|6V$~Ld~T6bQV%Tc<{TKH9nzV7u0pd{TpWnmw$$kTgYe1igBXWtBr&3#?W z_fF&f$3L6SJ-a?RzT#bTNBO;N&<@M&@j(_}MuKsM#*JJ7j*{kEa z*RB4OA9ZnBtvC0y(!3b4`(aZzuK4M&C;sy8z;(Rthv!NO)CMjwX*r@Ts44qe@YMx| ztnbc!P-=X>+EQ+&U!oeY{YW$_e6 zyLt25c3XtZa^tyXW7<0<$ty@-P2F`y&UVXLSF@@uR-gSgVcFSl9n0=M+rcsQm*3T$ z`zB6ue)<6#dP=*F7HoQ*P5*B>-b@|~~>2qyX=Fn{E$1C#sa#4)% zrLUQB*BY;ToA0mKu=wHGYvTWZCw|@iz9#V3&-C`LJ~_LMub-SWwua=(#qIv@em%Im z{@b7TJNZ}dii*!(rCGUeb-~}u{_8J)*)vJ@>PN>@bEf4lvX$~bIWcI@wnu)arrAyW zY(feM1Uii@n2s(L%@ zR2QA^c;T${t06UVT59{^(Z?eg4QV z(|O&Wau#ry3u-)#I6ATDNv4$M;W<(hB`%beW%`_7`F8a@>st}OZkeC|w&(xR==HV# zUaHH>|N1dIzpuXJ(T|n<{`2h)-&g+2GSAvwUdFQK)8hVn|DR2s9{=OX=6m0^@5|As z|M~in?|<7pg(vqVpMJEA}woz)L+b6<`F#E^7onvo9_qx z(zxqv>98Tey+g_CUFf{i_g34?-Wy)2w%c2^uUP*2*4r|dws;kOn%r}&P@c9Z&MFZEZ?I;j@|5{#3^LL9^ zW>=8QsWi)r>+T`bq!f30-Iz6;xK*3G$U^6qcXv5)!b zSNiLX7bpISmh63e|GG*4Z=dUF%F8tUrInvfiW4nrkv+fXL0+k< ztK*8xmbQ+p&KIdlR!P6kDuAZhdBUM>hKj;xXCiC3N6S zmj2#ov{PED)Or%rY{94Z7z{lnUtUs@e0QlQAieO&Z>J?Df1`G6sa0MYF(cXHmF_Z) z^z8~MWyV*Of~ux?2Tw6vSlQu!N!fFL#}(6s9`|KB)(DAbyatW9%H7<1OTT_XQ_cj%J$(~=$s)=qz=9ozm&ICl4|+T7W%a(y?y&7R5oIPTmE>HkSp zXIsQCXCL1`CC>ic*)?jn`?tJZwZ3%js>#3dmVP-Oz3IGwmSqrM_J02*Ppma1+a#|^ zh&@@+k-;bUvSUR@$2Z}NyIo3Vbo{W+YfF?kmILYRo_ct6W$^NkN7LIszUrR8X!lFq zDf!icv!}@)Sal`uh0?8wM*CR{_w{xZtZu*YPFGE%_2KjTmus7o|F3WN*8W$yDQJmE z@D!zhb2+Xj)`+c;l>&7qe44OKW24_T|;bO_zoGW_YZfb74x5;YQP? zMNZ{WZ-1m4OXc3buw|9q7_kZ@A4--M2PV0a8&U53z-+4+^JsmbY z+(lBIFG`iHQhuGC-@r4YZXRf9N1HHoZApzqx!)c4N|E>bzOwR_?d@I_`~Ps;oWCdf z-c4XiT@%l&Wcyn1U08d7cwu?U-Y-?Bx~|`Ta^o9AJpc5dmXrHVP26-q4QAoSN zekGUI=ZbdPyqd3@CT_gVJuAyPLz=g7Q}G@d&F`xgh!Du=!) zzw)kH)-Hb~9lQHgu5b6*gKMg0FYA$-{pri9Lf4g|kIU7k_v-uU&5oEBW3|z2XOfe5 z)Ylzi|jlyr(#L&yyi7r z8_!lteR(Uq@Vyj!?RMQScg>2Hm>l!uo1*M~I51yOW4hcHQx~tNlCjHQ702#A>pe>? zG}~>hZ(-Haw{265Zts~g>Er83-fB5McZ>_ugI*rl^yCxg*G$vL-_uNP?VECS)i00R zD=kh<1hA$2VZrT-OC6@~#U^dZ#RF{ABIo zb=<8bHs$coxAz{+DDNoNy%M*SBYp>`VW*`>lw{|Zx%)0$IoGr=S7_7j-1GTG)0k54 zd+eO9{IuhufTnAU5Tln*NSDXT_aU`wazpJVU)5042z?#om0RlRx@~5stMHc2R^c!; zG2c5gwxlN&79Blu>&mQ;cbVP2MBTlNL4DF6&o)+eUx$oAoY`=oV9#$ihV6nE_qv!c zI+zHC3SEqrQI~8>oH3CFGL*@e>o?b?_i%gP!^{2qkKN9%=@Oq;CqI`re?iV`?uhlb z`Ex7SAN`pn@GPp|V7gn&PLtRzM}Hs6&Xv;GpS+|*!0e>F>yjz|ewGI8zT)sUuh3sPja6954&Bn?>n4*_doIXtMm<8 zJK0}$-x7R#RfY9r!N#Mvm%jg9zQLn%=E9(^DM|rSN=r+wr|LT0T_x};vMu1hQ;YtM zmK86ac3f9gTAE;I z`tih_GMfG`twQrNqo?vpZta@tSuL_~V{}MdAgh_&#MwE|kGz$UmyWk7tSowYWUl5^ z;q1$=j(txtyLGBOs7#~3aEXaNbUe0Ocax6zL?erOpHGWSlbJ1ojCejzR(4wQ@_A1O zr`O@8IfX7FelE8=GV}%adb-35UDUjs{}0?Qngd;`wea*zT2u)MtgrR?qccJ1<~*pnYO|*ygvZXPM3R ze{$5)ODKA;Wzekl>B5@I+ajKUCcDx+k}V$n)mGZo-l4$3ZiG z%J4!@#=1;seq9O2`h7n*zir*y`fJkkfRGPswp^^PbTT(;zAgCtdQ*Y;$9uVsE#AAo zM0I`NAR?|`wbu9XlTY(4dFVUuhepNK~9#7{LH@216G%5F|&&r#jH zJ9Nt3wZFWsFRW2p?YdKS=_xCls^c>x53WAeGjn#bt(lI$scF^kmIW=7I%jG=72duy z%y-TC74rM-S7+XN4GNFaxvP?Y>Ge%{_C!@Vb@QX#%N{!`-bU2-P2oArqsj1RPDh=m zOTEG(_s$G8K~~|5QA)2EKlHvduLflv<4Mq_&%)Ni$Uci_e~&JA|8Q;f{Kqr*zF)ZW zQRtMMKl)~Rcl$#%?_P?Xa znP=c737zw=c299HnY-$HN$#m_XWWjidg8VEK*!nS+&`xMf3y{@{<{C_>Nc~B(drfI zZ)VPz6=PVKowZd&lRw3@zdH7E)@Mm~ug}FBJS4+&BGr^qPyE{GsT8CaXPqVlDn9B$ zj(mLQE&GwJz_`JlIY3~dy`Zk@qAaDVK2Xo>^0NCs40#S4obhOaHi+1cSyVpy;VJX$ z*9;TKpWm|QKi>cQo_qAy*BW;}*_i3tDzJLRy08a5->!6SeWcYZU8hAdnzxrI-%n(A z^LqHbdrH=CwH4{x9c)*J&RZrj@lrLv((`;rpC?+N#ao4*I+H$&Dd+CyH#+@xVeTBJ z+UdMSRlF06?nk5)FER0c+WS_#-ODmSYiY)e%gM^^r}VB`)=t0iY^}}0*CDlw-v-n! z$PBifesz(K@9OP-{#x71xNaJJ3!J~>_`er|=D+Seh`DWOcw23U>J%R@Kh61DT>GX7 z^QD>I+_x}y^G~1K3$4ygytHS}91qEzSBrE(fzu}AQexX+FF0{h$DfW2QNgc57q8du zyScb~|KDT@P~E}`ty_4{&9!cSeBAHRYW=8?=U}be(HUzTl$f>&kkD(x6qCC%N5zh1I7_+u;yw%)D!wXV8)E zaa=&Nvam0*(k`g%beDX0g2tlB2I=d0zsx1RpbRnNY# z9sM;W$~D7j4~3So=LlH zZkoI5e5u;RB2D*GiQr{pZL$pO4DZv^GyD>y>C}CdOoxGdBK}2 zk~O;TSgmSg$!!ew$nGU-$m~x9|T^#XbMtiC4U6Ub`x1tOtLd zb4`NrqTct>;y?Fh*T^1aS^DLp7ps>uXiZMfgqdqO=3Q)?5UCV&O+hI^Jn7JNB|~G` zmDz_TY%~>!RL#2(a=vX{p;k$*@KX=XLrXZO9+Jy`p&zy4(8NnIQY#G zyJ*_G?NgPOu5&Jpy1npE6w9d|wWpt7@}8P@rRwUsC0R?=Hab0&j?GB5On-a0zFzra~8AyOdlqG5Qy9PVnK0&dU{_ zKRdsudz>6%^WCgWzQ%dekC*0wpLoEd%CX$laYvus65m*M`|^pnUE-OXxgGp@P9*`% zN;R(p-zjeUVx}-f`Dw>hlb|lnJsS7ZR94Ql`|@zGOx+1Wqf$F+ORy@`dMD~;U-zxh#i}mxqIa!r=>=gb?i*= zmKIx=d(bIXSnTNa#)TitwX={)799AyhUR({KI`EbWgr!V8k zp)GDY5tllCX3sXLuQh&_pLMWlZEnPly?gIpm;QY>cEeuY&)c^o{QIS*6LGbHbyt** z$I4@eW@zc~tUa=bH8esdpjTjh)QZ^G3(8ix@94hq$KF_ z*6EFuppMhiH)<^w*A&mJ776S&Q?iR}pAsr~;?6_%*r|I(G&bK>Q;cRg<#*d|Vo)N- z6dBF4H@lUW)|`pH^<-~+&L^?SQ%)_u6?S#Er0=P}nx&^c9q~GP>xS*BB`@xB-QO_x z+O~tz$N$_^eEv@QXmR|FX`cIiwC4Ref92B2&6iHi?+~46v^RfAPH62#^B}#)9+_g` zR?H2BX-_1~D!N%MPj{}E))A+?=<%||k6s0jzC_lPeo?t+P!F z!@-F~OR}Uik6u6Iw7rVu$F&2sb*gU;o%)b+N6yDb@7RtnNjFlaIV{y|^s4!9eBioF zwd5jL(&@F_YQi?>)1bc>AtiSCo+Z_7Kl_+WJ6&I0LUXYV$uGnXH{x1A#| zPW3~fzUzc&)@Qpz5;qpVZPoO;Zsu7z=@Zw!@TCqnIkq-m5YTj;A@cvW-c^pTD;#FT z3o41{xaGVtQt4cLZ}u~X;CCHwo@oXxn6k~{dk2H&ajm%>Jj_QtZ~mLuB)jia^uFGS zK`zeHI`$dbt*74TX$IBJyt=B!Zn0zNw2+lCLYt#EdhB)0wAVj>Nz1|h*FDcf{=b)g z$Y`i(2Cr88r@c4l(wi$?CktQxRZ{g2nza}_3VBIF?1_z=OPtFTH<#NTD<*f`6Nui^ z`JyK?Wsl6hwQ+Kml~Vcjg%WGm*J;SU7b`3}^~uX-(l+Vu$8wJ5JDESY_TcNJ?X4Sh zPH%d1;hTB)^~d_3%^yu%uvX&vc46baT@Rk^W3OBHbjItT*4A?}n(n)pT~F=Q+geb( z{y@lkr3kj1y(+?cq%Hyavb;kRcUe|M5KZz{~ol-%o9>E<*HP%xdKcfX@=XLK0;hhxjs*v2Szvb%Y33tr`xu#g| zO$zL@xVP4X<0pUwhSFO{d}yA2)YpSI`38&AU{${^_h=9`3WvfAtKJ^An3wPJpUOMec_A z!WU~@p18SacdnS(5vRE5{Q6@}GL41-W&8daezJ~tdN3_a)2}OEWBu&u+LeE6ekR|a zzZn$30bif(+_^(L!}i_x+bpf$%Y43Tv~)*v*2JDNIKESedrtO-h%WiBGMerym|ag< zp4(bbrhQ!H{9TEsn?>ut>K}-0d|mK+PRt#na@{&heR1Y ze{|>D$$ii~kg?u(!`B;aneTQ#coM}VKfUNo>AF|K>PKA`2kc4flxQJd5lrsJ9GoYhCA@b4W<##pDUI_H)d1eRtuizkAtp3(bIMZ#Fx9 zv)ib0+$885Kd8VyAs6{^mo%uB^ya_e6}|6k?5fGT{H|8d5=+gFYAz~uYE7#9k#^K2 ze($4yo^sRnZ{4ut|E_)Kn`Ye=&Of_q-me6&pDM?%eDdVX6rF4)t(>an?zI`bG}xJ| zaL?_6?@!)$ytwaTGP&bY=Zbk9_mmbXPq#W&yYf7L+mB%N^K*`-xA#9j%D>;`@Be$w zdB6WJxObQJ_8X%+lDini>a-Id?v42;vEx@#a|EcSd{LEqAnVS{>FxV}=QJ#R9%l10 zj3ZsMX^LWpvTAjwhvbtOX7%evJ_Y(m4#&;@s6M~u&cp3u=D*h;`^vcbWA}lpKP>Cz zzue`C>74(2{Q=%O?ZVmbv+lf|+g)GvEP2Xrw-tA`C9HbQXR$-%;OWRe@*JTYWviTL z1UHwkFAdn^rxf(<>X)s54t9BHK3WoMe5K6yQsMi6>sl>8rzj-7D|1=-Sx|br%*UCM zpn?(PlaL&&A$(!vi-|VzA1Nq!f2`*9$IQ4C3{uK#5>#5Jb%w3gV zBD*SlQ&h;*mtR+{IU=;Q+GE|-WWHA$>o;tW(AGWu(mQD7+4aHN>h^P@{WEtS#K zzxD3y#7jDmGMnjuZ`*J6heWPP*!PC@v?~@+m)87A1#`*&fMZgqWAzPq>Am#vU2~lilOHcR&lT}QT50J^^SR(za+jyzC2gm)U!QM!vVV3qQ~2Yk z#D*W%(XG;d!yk(6zq;dcx$eIgbKC2y)*aXA@7+*%TZ`4pdivcD1^1dAo_pyOt(wY| zx+GhA(VZicWPbiT8SwnrYALO!i|?J~n0dEHKv2tdNy&Pb9rcQf#PVHy&UhVJp01dg zImg6x=El?D37@TgPT%5Ki@x={erw!VwB*fG56h%C6CW=S;i%@FxGB2Q@A_KM5`cL^ z6Fsjltckz8%x1#PMR(>!t?%j7-#BYyLF-fd+#ESM13lf`xj$cjS>^d(aH7%Dq@<+( z9+e*-%~>j=dDaQs?U!VTads&eyr`n&rLw3<>6gA>Z34%X<-W|1`CWYi_x*k}^+2fsRI z7v={1U%y>2|AJJE^cJ_O`+toJbn8SXbl?6{ymbHW`@h#7o?rXSlIr^!Vd z+^e--w)@>AH4WDVU&_}Vs9B!%vSWK;_x6q{pC-+Dwpv2Hmvnx`g2uH~3{S4sE0 z;OQczXKyCFTiD}&Q7O|?Cg^k1#C>PwBdg~uTsxbu_IE|fcZ~^q&kNoBecb8%(gxiVCy$O!=j!+WG(OQuZ8+pjnNey6&eZ z;|F5~bA}zF2j+L2nA9Q0bR*Z|UTx^Rc_MQxy?=aoo&2KWt@4wt|M?g0-fdXwI(187 zV9n&rhsyHr#TtWJyucyecTZxA*naL4$L(v)58d+ao1!P9dDAW~Y{?hx1NqFK3bG$W z-BD4xGiU3LJiq_zw@-Yx)p2#9^M$NCGCSC|vp#uL{;%@K;&{7vpLGu~+esUqsy1G; zXIs*q<9s$R_i=BI?SAkmNJ;i1U%{#aHp{g#yDt5x>nX^c`eygh-|a45KhK}|9v$~3 zyRXe76EwdwVP-Ce*uo$euk)Ke-`*o!>KU})%#Bz5YlOlxR;4>#|HAS`_VE(WQ*Yu5 z<(H~{+55=P%Xx`O&JVL*(BQDUAluPNGJ;&LE3TAlFMJy`=SrEz{!>}Od#2x9RAIN+ z^Wv;~3vSGdTJGV!E~w(zw21z>`(J(hzj?!kpRF&A7dg0`y0VG0UqU%G>*^8T%uwNT z?q0sL-#-7Vyp-4dR3dntcbyT>&Lyk1wM4_TTG|{{Jajdh%rbPmzQv-_oX_TIAV>9fr5(H8HE#Ew zX<}=6d?gq6oUA1dn(r1(QCd{I_{%Mi_pTcc{{ADfw6L?!GehRczWR5I?DILM)GDWL zFa&SxtL9(S#JxoG)Rd`$CvFHa_;zw{Q3^2gYus1L^kwe03-3jx_qxuR!o0NRNjQsk zGc$`<-;}fmKUpo6^iD1e=$bOOYw@hIqwO^0NX!y{J;pIV!C zOhi*I=z0I%yI&+Pp7`kznbk2xRM>oJxc>_O_0r{bL0L;ZRw_OI|4*oI%HcRr=@Apk zGkKD|@!vfTIwu%Eq$>ppUbIn)0?!^!N^JfvYJX2xfV=2c{BMDsZ}pWnrRdN3^eS$*?yR()m}p1g2!1^+drBOCp8F<&xKnbmf(ZsJEH)4!W9 z&3`Yfq2D!SbCjTtn%3NG!DrzuFFtJbIOF9S_0K6qbf;suG4row>J#poG5+F<-ncW8 zD>!I{iB{b`^Po7TkXdeAWiv86rkv)xk?_+oS~DoET=V=(E7AD$t(x~vWNdopw|cXd z=eliCa|043<>RxSP7X*j)!SEb=DyOYHF<`$ZYD*FL4G>~G*_!#Nx#xtZ8ceW>CIE1 zHrITXw@-O4A;*^ zXYY73XR*rZO*+|jMc_SePq$a+%C8sp`u{dtWj%jXuQc!R-Sx5?*!F)tee~|W${(x! z?f$)uZ8&aYe(;#{p7&)3Pp*}?w{9s%k>+ux=UO^t>l{0Rb)Ak@pI`a$&u={+AKy47 ztyx*WqUvTZs}JK^v~1#~g@I8slr^Wl*b%Czl);{q9HyYDE+;vgdEwd(?q!#SPh`rs z&(WK@%*uibynG4^=*qX*0FCxiRH!qcZb&i{D(!|MlMFKt;; zawJ+~o8h;gX;;2Thk}bpKUk<`^h_+i_UM>p_Q%r;w(d~X5Z})B?9sLZF?SMolz-y? z_qw1z-|pYD&2s<0-D_|^nj~{xSK|4`Sgt93c}G7?VoGHdvkF(dv6F4#xzeBsBHV>a zF;M~!llD|^dfznXU*adH1%DP!+~gQ`$2zlTirdlmh_=ENZyTv4#O$v8WDsJa5 zG4)s6ooiFHYwC%c*}C^#HCa6mhovu`E~o*Tq$pal<*l&h)a4~_Pw{V#68U}Um1t|H z=(JliCT;9qR32&7mRlVox~KBY{zKa${+VTd|9gF=ow1as)|{H%hC$1w`FnY+p0i`4 z|B{-|mnL3Xc7MOTbq#1A)0uv@hS?o2;tqdVqAs{p=pvueE2Tx{>#j|jb6DN);ZOd3 zE*~%FJ4JuzY2p!{QtyAG@Ag&J9d&ikh1RnB8y|PTcUpD z{|kK(l__~HpXt+w>i?xbCdb?Td$nEe{}GLw54>vkjzH6QF zGK?ktx=_W=X^Iz?GJRgkc`9qgQNyg~Y%RM@JSPSn@m&1;{Q?;cox1Z5n%e&@Ed!*K zmNwhiYWjwFeNVWicx5Ty!n~^-pY_~bF6gL~Crg!7k9%(3mcJzClD6w9;az-BZ%68$nzqI2^`0X}t25bv;=1y+|vs$lM1SZF%P2-0@CrQK5@T zd&e}PKxV=BxyddNCn&h4aezS5o*(!tZhA03<$`@{K3+8wDqal7h+ zaz5=#J13PnD@dd6-h1f~aFSdGO_Hi}HcMS+U3fZmG`*fk62Ky=P^*fqBH9cou8u;<`x~&{vS2)e^msDyhQ_k9WZcx=QqmEh!;fTq3~X@})NHk^c3l!8dvWXPxRY67Vau*+ zlzeoZR+lL4)<1uB{Ts&TJL>;m)ctkvw#=2}{F0I_JC1#sd9eeW7)ySA^T>4e{&q9z zC1Z5olr#m<6v8?yhIOiob{}C;ZBRJ;@tu@X)$6P~)|KC69{zY~{NvXR&pls{DuP;^ zM%nX^ZJBy?hk2TIUfdM@+Q*u*AH}$fj(p6E>pQ$j=k%^)-&_8yRqqR%y-zLts9ocynk8HEr%Ze5F)^qm z`1>pF#-fX1M_isM+J*K%5jFIiv2>{Q_ zFL`-#Utv(rd$HrYErUPXOMQ)`xe%+I)etoGQ%OMk$n zVQ6zlp7|Yn&1sLH2wap?vT|^F->G}={`ZdW+k4~YSrm)O*VMACU0>HQ=h**4+0Mcu zyKH|%|0x6Y#6i79rKL9>-2J{dV#?+B(qW*?Y|3mIw5d6>XUfENvKlHV0+IG-vaky1o6n7k7S((yDtF>f+{XPaiE?5c9`KL)@JG zsh4*_ov4QXp`TkL+Jq-`TmQNKX#2mNmoC1u|M~2p-Ta!&s!xLJc_ox{U*GG}d}qDH z;pMX^p7`lOX9}l@Kk8U~XQ5x|rP#?6*RAa+60KjKdnrlgqvcDD?TS&ej-8aZ4eHYL z+O3v3dHavT6&+LVrFP8NEqrm|Yr)wYWH@K>sI2dCyS1$Hgic}ewmPdXvfE@d-8Up< z1?60rwmrjp;-@+Lyer+VFSJ?tIzaZ)*4s5JG6VN6$P5cjGh0!za;nz)7rfK@tIyQF z*e)g}c72weaa@!~xlIN2?NW~~Qxc6MqBT>RR`d#|qT<;gImD%k_(pwViDz6yD} zN~!ntr7XYi{bPA;9p7~RSlXTWTZFgkoZA0lo~NPd$?txk^r`F$TA(w_?bHOjiA7EB zivJ$(Wv%}f-EYlYROr3n$E-=p3tnEo<-e*>s_2|njQEzQs50e$wypttEemw>COW0a z<#C@lEX(-%!|aCAA9L&N>fX=q-~IRcWBO9g(1-)H)BcRR!XPd6LbYs?-AzW0@Q zyOs6Yyy(Q&8)YZoEl=7Nt@tLk`@yqK?ECamXFQJSZ1ua!F^wtpZ>z)0YkJyBOIP2x zqkAvB4K#mm*PT;$!D-Ivt@%qt-1p92Fz;^Dgh<_h+nv3SwsL&eoVcy>_>na(HDPR% z!d#TMCMaGiuT)-rNbc4$%?stX6r#JPJle7Sp`TaZ6y-xQf)lGkFR{H}`ul0Z%J)HY zu9j-_XWyP0pA{AQK6UF2oB3BWE>F6-;MR<|wLP918|TUHJo)Q>pX1^@)7rE@W)?wx zKA_Em#YY)Fa5HQd0(E?jZ8#Wx$Nr{|OMcf&&&xY9p8US&TiM5P+;8qd_xmzOi{IBb zz7oH8aMm{Q4H@a|BDZXJ*e-FncjN7DCNajVukqc-_0C{DsXL2(kN6=bz* zTH+peMY(VHnyUX?d)(I$1L|I0XFqwlYgv4@{mM&$Z$&RHnk~)rG}YXkeciFOjM)Xz z2cqu0oZo)`=i0;X|9<-De*f!^>)RRXKi@5|bNhF^+Ssi!|DeSBwHrR&Vw?KBtmpHc zPEWbr23Hpg`0spwENAB=U4kSj(B5=BjNnn#zC5l%wYM?-0=yntoJaX#(S= z@?Q#@&j`-i_42}2pQe4M*={B+-acc2$TuyEpji`Zw{J?Ht+8kc$CT52C%Qn<(V=-N ze@pJE^3AiRo=-JdG0XT>i1npaqPw1OJ)P4MbhPDzZ&>|YIg?jvm!BWcZ&rSKVhU)@ zVK|S{ucb5Qu{`i_`RKCcpn>Dhwiyfl>^r`DfA3;-|HpUr`I6sD%O`)n7cQ`OIXmCZ zQi;itJ-e07AGiIi44N~=DfPiCZs|R~`!|ACh({Vv1uaEjc0J{A+2iGIx$+?v0*jX}vM|)7E*X?zGLM|`*6Q9<+ zNp-K=PUW3W8%VOPE3rozs&n-=9R@WQX;3Nx-SB?M)rg(+4Ew@_V-nPj@k3?=lapvU+o=OWLhV< zBk0z?+S&tLcLX*tnX|4rp!-j|VD*2mJ9@c~<9h#pj&9yvTl_J7e(8_d->d$d&SsYT zbf+V5-t5Ge8(GcdZX2AeWuI4azjJ0@Ye9i_+v?YH6+5RLJipbcZ=&AS8SjIdSg~CjepzS}D7oTB_{Oa#?*@*Mjw~rS}Z+T4&((#%2XvvHPPc*$YUoi3GlhF)~ zxTX$Td^h)0vX!Ch%_VPqSBHwIPmk93*VxwAr@iG{-_1l@&9v^P%!aL9_gS9y?t1fE zgLQh>lsy*5_kaWZJKF(MhCHQ3)*Ua_yO_-DSk$p%PRBjPMZ(aEz*~Bcy?x8KaQh?2 z-c1(_ztz1wEbOs=VDyvTyK$!zAMOsax_7p45@?k1B&hZL`H{!XvVS|aZ_c(<+xh;O z#`?8CR{Jx)`xM=NoA-OrKO>Jgm*T&3Vq(n0cZB`YsLOlB+pM9x<>l%h>C$^nW;~Gk zV-#>le<#~^mNf_0Gle}4`+xP)mM5}xtCwp0wBB#}WAFQ@OyTeIYd?JmpI`c;{d?7) z+p8J)tMiT|%PINgwVtY#R@?RVz~nq@!^>L*`X1GJUKgs^Jw@rjQl{cq9_d|kvlo`F zo8Fh+zSG3B+^fx-yWq&*NozTZ^BiXcb34tQCHP9^p8la@cJ)RCWgq zOqMM<4eBpi26g=wzJ1>Pl%?O+f>O=nBHxvIKHh1o|CMuOe$D5P_5Uh&7%T8^XMOhY zdSm5}&;Yr-my3V=TzkmjW<2{k>-V{A`P0uFmt}iz@?$o`&HHR?CjW^&VD)GI1$+5& z$!T}~INs5GIbHwn?msup<-h-W@_4=7&mX(bSN*wMZTs%K-ht+O(jVm4_ewn7%DLFq z{P3w{?J07%4bIiFtL=PyWO82XjF-El`PR7>6lyjuPh|9)P|W(wIy`Y=G4GXgrI!SA z3+FGnaZdK-wY&|^*FKbszRT&EsuUuXywosc*0JNKH~xQJtUBemO6fo5H4LA2}@p-i12ozX^-uh+t-6EBlcprGB2>E4kxc zn3U2|8{eHOV;Zn<_;H0mt({T$QczWgaII8Uwbe6b}nVUJKv%?k<8 z2;6I{c&97#cn%-+$&!nRfHf-E!uC z4|fOtn)P@3d$&Kg%Z24W+-zyDF?*ai|7^vP>h3L1o)xZNEAe)#XtM40gQtq6Mdsa3 ze7sTiu}xV*({Vqaviq%??^;$=b8Kp@ALc~pZ?3nQUad){5p8=xqQ)9`n5Q*dHak7Itq*a$F6;R*Ntz! zMQii>y0)fw(*-x}=Dr*r`Z(UxdZ~q`{_#l7R?o}r#-QGaEVytC?wWE=x1%J}xutlu z$fhGf68h7*&J<}MtmvOB@pdOGe`WrZZHfQSE@!C!s(T>*4_CqZc*cJ@0Xb*>b-!o( zbG4lL-DlDL`ON>`Z5I6h;iiUf(!bN`!tcJ{Y^kr#Kh}J2_Qwg|#a`|^?Y?K*gTVD` zE6!xE7LhyJ_I6{N?rpC1Zv!gdHmtqQ*Yo{WXXm`#1~)eg1lyE7_WZ8oQ?7rEXM57i z`^DR$Ip5s<=E0pmC&v5XqbM%(>qeO$dzX9f{BmD;+Wj9pLzE8e6mmS*#%giy>ZOl) z8y8yN_z*XtucG^V^TUqqH?HYU>93Zaa!>s%$L<#^%I`Z^mP}z`Q`1t3nAwl*44^vsy-t2e&Y$Tg`4u1JjwLhyeWUq z8)=Q=Dv?Q-HmNwT5DA{T%kOFA#;eiS*VX8*b`70>ZAHYakaZkfx2=wuDg6Gp|2$vy zi|uB8-|yG_|NA}u`HPIg-j~Hs6AG5d%mj}YZ8ErHU%5Ha^4wyVFCv1vN{d2Wu6Vk{ z&vZMgeQ;*+^AA@yPOkX7Ie!V~sXyzcFSvKNRXsfH@xdvvJCsYBZ7g4ImJzelUc%}1 z(V^@u1AiuXXj}+1E4l23o9sIsrI^(snnwj6u=`WZv%+7QTCw<%yq9;r&kayX6lxzdN0ovMpEq@WH(-e(ydV%QfF# zRIwxM!0D|*c6y;7N>?`R_cmpUSta-)sMk`@bjE8P>+?I=KC5OgWwqeu^)3+e^e%X{ z#6Xkh<>rWIhwk?m8gK7>-kcKu`~O`&&hzZ2)P63uc=R@^*+5X^ugiivoiirzc67&f zy7)>3eRi6#^EUIXU6~ikZ+R3NRsWAjdB3@3-*J^7uj7r8#RUsM2TjD?e6#o3h4RSB z`@9SN?yt01oEwZf-qVzPo*s zJ}l4e?C_TTXvX5TQN~^7{WoPLTfwP<7caYf5fq$j#M=|z9#G5NeG{l4ouZt&Sw!Qg%hHZ1 z+;d+&cpt+WKHca{f%YMl?{hB&W@Vqxm3Xb`Z{4-{TGFSBD>x=3+iX7+)HUID!rP6$ zR$A-6+|YCNi~cTqY3~H#JLO4}ZtK}R4C`2#_o?vB%XPaA50{#!?R?iZ_u)Q|^ze^Vin6In5F~c{*w0zCyW8-z=Q3Te$9P zFSsA^!~+#*?m*evhF)n+68^n+K>`I-{WR(ZP@kH+Mw$zEf(cYf48W{cD3ux zi5HjLnGlsOD;BtDGkko9>A@wKUU9P;2=v@uW$=^w?td>+NaK3&LS=M)d`oS0az z2k$nyN2Mum%l*A`il_AU<`}J|Yj1y!UA6JTQnBv2uLU0IER%CBnezYcQ{Jba=1vS; zC)-hEd`nOJ-87s0)i##5p1;`k@pW8~PrxkC9aH+MZksC~S?3z`$L7jjsfYiLc0_HF z+;}m2iNnk-DvT>%J5AVlS$vk4^^0h=(+jiqcTD-DvQ$R%x6b*89+_s}c&7v{c@vm) z(oS{S8*%xkkMI4;dma4C?`UG~?oYwKvp@B&NqgGZqn27()m-FRv{lI#;`)@u9(P!4Fo$_By!53Joa`eb`=-2k(4~ClQ?~xy^)GHH)cSTL zUrL&F>F`pSbL*CFnEtL-^ZUD z4qROt5*7FOT@ai9bE68&=?9NT>TJ?%-oNF{vY1=jY_IPW`aEa#h65X}q-`wLb(-^f zL77?2UaxZ3Q-wi%ljnBG9oTm;h;L@m8WY~Bmt-dgtuUGFp(*yXL;0Rkz_~2v6K~8i zR~d!qoaVgM`eH+AhyO+8OwTdkZ-h14n3*219saVUspC$EMq`JWP@u8kUN;waU+`+#mBtmH zH#=w4ysUk)ZGT6{qrEeB?sA*8V2|@&#_MNKPwgx5?k;L+OlmdDjC{u}5PkJS~_$W%{KrSDjxdX-~U)f;;=v z!`uL!bst4fXV1}A{X6%ms#)VDrP*GYr?+uT{=C#6vbDALQOX7rTTS*;+}*h@2_g$O z@(Ko3n7EzT_ig69H^z>YCpAyimHU1B|6A(UHRrb)ITQLT&*!sHUQ@%%?E)SAwo|f|e z!~s6{-}{z5G7VEmpD*OiziPvuOu^nKAC|ukk-OTJdr$XNx{;J<>C3HMzALA8t$9*( zbWe-zwcunf_xtbnetD=Z)NKJB@-kL%`C_d!%faQK%a%zUSsgE2m43zKeB38>eE0de z$~8qVEM~?3W0+~`e^_xlUw^vD!+SH;v(vSDAE}YnFsCO!U_w;K&e*4H~Nc#QXKmFli!vHCfiA7=B zPHA5{r^JbNMD5`$)U;Ar&o_NrW%@L0hhTfzUDMPT=1H$VM8FtI2FJSkl#(N|%gXK`{_$Y-;v3(uEkBW4E%@%W^vC{|w>we;_kC$leK%J`c#4zVJ@A0wbbWWPZ$+kg z+sw2UEr@VY<|*5^U>f=_=Q;}~2 ztj!efY!|th_|xOU5~ZyPjW&)qKY$MCUGRQOD`*@pc3aVsDUTZWcpNnW9rq!wFRGcl z@z2b{h_Zq?KW14hf4$|W&*eo`W}ua)QMr3p<5_@b2af||Jk&G$;~Uf(|Lu?U#g-_*u= z)Zp>OjOI^;FQ3)5eGis7xi8_yQj@t^f6UwuxxJHLP;w;tl7ObHlwgv&*z+w;Z!h!& zY>#qbdF$r$B}+xG)BV;phLq6rlbDxoF>uxK3{;BNIch1d+4`4R)!nN&u=LY(5x$$5B(8DfRz>1AO66bMH-R^O$*8nO#|s;p<(q3uUYNGH!*g zPv3gu%JQqL!qlc}in-@*p0zU0yej9zrQ`nuXZ(8++dawczm`V+m95Lp&$`bJOCBAX zr?QVsl2IxW`|i(_VeI2y=jo#E`}on+2R||^n?4=5JwNgHzUu;eR&!5_RNWD*oBv*n zKlJ*!$^DhwzVbUj>olkBwXqD^H2pcl#7}>&y|+7^xy1L@+S(k$iigF^6papTeVXLE z%t)VaO3{)%6}vtq9W7C3Kjocq=b3J%#i92x-2vC7TB<@6&ny=aEG}2Fvf=+YbEd~h zZa24$(p!9kpJ;jsYJBgXn!J=_;xXNOYO~r{%T{F0>3OrbqIT)a8+PA*8e7_WdHyUl z|1(ogaLLiwDQ3&J%C6Ek$u&ElYNqLZDQoJ>&ZS)EJ9rmQEuL=ojsN=%_xDBdCcnb( z-TQv$!HX9ay)QpMgI8KT0X)Zd=PNGS-SNT^G-kTeB_w^uJexErv3iY172i)@PXG9G zqHx8}$Lp7{T1xMVcgx9KZ{ql~{lwW%$MW7k-S8p0^4~wtd2=8+22@Ub5=q=7x3I6) zB=2uomeY*j|Eea-+;^t#f4bwl>T)H0A9ty#N=sHU%X}2O+$b*ga>n*!|F7l$%`X!v z+;nomjVp2O0oSuys=^fRtd|h{T&Cc)S8gMx_rw{K8?N+zo)GzrCH8cRrq|Oq^4gk8 zOH1BdH}RWg<&ct4@1-xQ{`=N{(=!v5mMVrwDJ|XS?P+z>_>xF!``PNqwPw}EvqPnW zv!@DvtQNT}zP|De^9uocC|pFafmQ@XySbo1cG&)#g0`40l{yz6)LqIn4H6 z6x4WHFV$Bb|7yy&@6Ud$G_H8wefY-jXUA`B{a?ByT)yS~vNWHFpuYXb^N*kHzIO7v z|F3lul9qN%NvbyY4+2f9y!k#|S+)A+H{L1Fr!N2O@@JCCpL+%$zg`MY|9J7o`B(D7 z`nmt_7k|7v5~@1isJxcVg9+=5?i$O3s+4?_cV<#Dryax6)DzrhCU3otS?ITR1G(bH_uouZ+9; zX@DlX*U`w><)5Z3bFK`zyzZCD>e!z}VXIf!?e*NLwAD>eWb5f5Q~lo??faxkr$-PxevZ*@;sP5r!o0N;lNN5LUcJ{cSm+@KY3@w~y)lf2&VId-1+ z!+G2P*|nyBZ8t5u`0=*$(wFadf3Yv$ar^)Nzd{p(T0DQJMG9(zmU~6^eK-)?!E>)+ z#*C>Q-j@{$J!OKf={vbCR0o~zoj<=}j+~&TuezqM@={OGX=E*X<~Ue7tT1sqb#LFq zphCavOD!}XO;{HDGcs)Ur`|JRSNDBMOAV}Q*3#YS^-wA_5Dt(%j^KAp(UwwrqUT&SH zuDSH6t)OLDFjuPdX)f*?D{Pzv7@77SC!+VUs7y3=H<{1;&DZCw3g`V6|je)S00yD9iAn zH!}jVMr*!|RonA>|Cvnn_cTw{J)ivX9G_2oWN&*=*~7BZ#)o{TQa5~v)N}QkHxFDM zXluKBeY3XASRk_hyom*$oP4VO^Y1g*PW(%J7c}wGm-)$l-~Q+CcUiI}e-iW4HDNCo z@0e_KW;x5mZZjpbI!&PxPmj3OZnvf>q=@Zy4z}gq^-S}`yDhGM>zOQnuTgpW_8zmV z*W`em)0;0`_*kU0^kiVZ^AeH9qMMA;I`$dOOMf4EE}C94w`={@w_V#eM@?nFJbTL4 zmAqZPnp>~E>-w_o&C0^EA^RE5O`#fK`B}F_^ixbC&6i!#GE)zW z%zk`&O>^?;HR;F2B5lPs9)9(`ukU+&`mZ;YOC>ad(h8QCR9gla^~_XeQUz@bRu!z2 z5_|GSyxf15+fnV#8H;LOE?&Q(^1XJ%hQ+dzr-eO;_p~lZf5GbeqqI>n4729aC!6;$>ZyI=3cJIkB{?vr@XoFIcVah`WYs@Q%--o?a>(2vT&(VP?@%0hPBB1)U6s- zpw)CIr-uF7VH>t^Vr%kUrLxH0?mL#x;=8#-_H&+^Y*rO73N6EWB$H;W61hBizw#pX z&I~TWv#LtAf>(tvx-Sd-=vDCSj-`xMA=mr*QW5t1KY6Ub@9#S?X>UbR<Tm7ox{>)(a$o6}Clh#+<$0s?EB!wlYp zCFL{s<@Af%M;#_kdcVY^9u#$wPA=w5Kez=~cAV($25@ zFZ0q{B{L@`+g|zB%OSY%(mKwp<5n$|Q*)p18@a_ly(&i&x7OcgOnpcR8dA zDW7*g_3vYY>?=MI&EM{xo*#ez{!`((en)qZ&RM~OQI&4@SN`$2ysW}(vuEI(sO+ht z;VGgL8!OLD=Dyx1Wt)C;#{RRh$vzH)?Or-K%`;(1eudd%GqZxV4#)NmuB);BB#{yQGy^84$_|Elm zMR`eto{&-S#98|pBCF>t$e-8qMz8S9^{87fYA;?{(lJ>^qkZFaagC#2mVEiW`{>`v z;&s0FS6VH99U^yeoA&*STePf=q(oRXuZB$w+g&C7(i8q(xW9MuyZ`pzmt5Q* zwdK#g*NokaPNveKO0>^z{25aeyz_cX7&o2hF~c)3a|Ly;fE`{nZ>9_0Z*|Z&xMXGP}C` zmf6+r$g`_feX)8v33Q6XjM&A;&&GbfVIPwu_hatV`}TP|^H0@Yx3-FkNlq-Bs+{_A z$^RwqCMu_{645+fyu_p!oP-%3L^;o?>FG!l4zv(ltGq}}sj3yc{7t*j;@;nL)7vk8 zJ?4Jn)^Dvz+WZGp_cQ+Y)IO4{$a-nX5<}3+;K*sIH|M+cP0`6#lX^eTB=3`0B}5Ht>Ren{zK!kDz-0gA5XZP+&brP^3woK zv8Ox&+&2=JWloUs5Y(*ZQCxpqLUU?*$=p?wckx{n%$@zJ*th%a?8vjL=B;tN+PB3j zG|6k{A;YZC$^8|t-~HboxcJ?!lZTwTCWp%=FY(cz|71pxnWEj=tRzRbvn{iD1U03f zdaQiC#q!w1OM5`e*wPpp;)N%g3Z6BWd9SCwXnE(0S|uwdmvmp|$4?!W&3|$Dq;dMk zj|-E77Q|fqWK&~i=DhH3^Zujx$Mc=c9~@(?ytFZ|kbNn~WVfRe^DnongN9C1*Utkb zYo0wC0aDYR-01eWsiUp5G+XzO%~8R8L5=O8F384C?+FY1olfmKdg8`gzO_60HwCxI zoVJ^IX;-{PLi@sHjztQ;UAz{q^LE|kcU3dD{Z)q>*OYDf>83aBX5Y*Ro*ubAYI5A_ zs5x8QEiG#ybUO9eiiqa}F7)q%2jg zOjWsL#;&;f3g@n4nxAT?DEYmUZ=Un_n8(T6d)oIdb1Y&w8aqYlQKvvk&y-t!R||7@ zpPe4L*6e+n*-g9o7ZYyJic8;Zy!M!x@zy)X)K_|Bicb3dBG&#I%hHLBN~u!rUYkK@ zXYx2R{5fP`Td6M?DQQ-rZz%J=&fCX-)-hM*`{prS_GN#rNY?y0YiRTRpZJQ(hp}sN zs|6KXV@g}p!B4`!wL?ag$FKakyZ1R9TcF-oooyZJzE##tK6UGjKl+<5F0);GZJEW|V`Zsct-cjrGqcM6=)G>g zYWe+s-Y=i3tvgeetdZY8UwP?IaD*wklq^oHx-_vvs54`8V$&zy!z@p~TiyGc+u`u@ z-*op4@7MZo*!w;7$kcC#47bZAZ|eHE{Dtn0%!gJHENiAQE&ce;^WFpSaFYFA&>b%p z8e;cn)U8|pRlLo?0VPZyT_F8G219W+J2W$Oq`V3zTwe~vUvSprOq>^ zOtD`+ZI6IvbGoT=MAwv3j?X%-Pnvu?y5qZ+%wf?CNPG9Gb=e)sTe~DLnA$Ve99&D1hn zcS6meZu!|S9cRt@Tk`_`U3C6`p}$Ig=>e0VW#N7?^W$t6M!9(TUfyxtGHBLv8BNJF z35Ew!O21SE|F(7f^K%gf?WOYSd?Bl3l_@2*p5@qY_51%G8Cb>t1}~pF@~L)1ba40Y zr0t%^ck1q$cG`Upb9gaiC_que-D{fcs#z>vC-?2ID_k;#dFjD!rBvlBeWo0r^_)Tq z?1X|gPuQi#Gt>I-g0&?r`yOh(h@RiDua@b{+-;xSp6}(d^z&+*)L%8b`PaUQmlDdh zKTwB*Vmck|A&doxw4;Os{cVq86MAjEB z5V0~-II>Srv8!?G))zmB~;kvG3(&N|SDZ|gqq zeeEA=j#%Y`Dph@7=B0mrb#dG^57Ig>|6MH5|Nc^|wXXyA&cC|q&50G^Pu0UTl$Ew? z$%s9V)PANDe#c%t{f+#d$vJgk}vgkWQjkC*g@U%qtV)YAupB>kDQ75_a(Z7>>tZb$Qw%EJmP1{xx zZ>}FcZwXI~F1uIU1kl?2P0m4mQ*^9b_O9{JbobnNF#4^EiOf&2@?fiLPH$sc4bBU> zoV(j{;|Ao?iM5OuLT@TA&owIAmAkZ6^QP@1i4Ct7d1$t;`M0n^wr&>NDQ>}EPD{?* zTzzCxt(MN+bmhCzD_;l6UMyP`cQz~Z+LEi9(^aNvGC7+^`Ei_){Jo&~PI7%oK>yy_ zstYS-Pnwidm-uT=)z*g|mPUK;c&yZum@P3U{pInAlM?Gx*ls*{>+SNo<3;Q0(ml63 zEFS&6|K0xhw0YqIfqTR^U%T=Ew3B1&jCmr`d;W%b6<+$H*a7aKFH{F5+CyC$nLU%; z*uneGH+qKsxwBJlp`Iy6>1vl5&*fZLa@~Vn4-?zWITcbAa<4(QShwHpvc9>^cPgUP4yUO46?WuI5=qar$ zOII!VVSCL_@%37{V(;oF^D^`J@0pdoxgqV|D^;2sH0kJh-}&K?0%>~B6yL7x!K>F+ zKlWPVrMx|AUEp(RrKetfQ+SF)4e!`ja)bKqa?A#&4IFpg+Hml9@#Pg2ssi8r>q_6K z#QlFGU9#t!pjpX&9oAEltFu4M-{SPgEN8KauI63)mz!g{rar3J9x+4Nq*fsbRJE36 zfQzffziJvstApy|y@IFk`36{ zTE;H_)U(aGH0JiYUqP3bRT*y%y*lsSim3Tfivx~N)mX-|zVeMc->cvG+c)g+m-#4G z7&PbC?k6YruV!^WHSy(wiJMmVFNsNhDZVM~jf-ZG9;n+M&dOjee6hCn-TX6(i@21k zrghluiVB``+<*STV)>fJxxeGxy`D1u$jdtRL-py8@JD=q%yO9XVkWfD@AS}A(`e@| zxn$1f82pN*_Oi&6lGRJV^XCOiOv2f_rdTQkeLH1;t=zNm)0Az_l|Gl({W4nZ`!z4D z`_;`Jwb0b6$wulcqa+2kACD5;Q1j((dH>$u?(tKSxjR0!@79;pd^=m;#p}6SOLd6i zq5Tqp+}jk)YIGk7fAzSerdaCBVYKbHLvSK{?Pryga_xzivs>TPPP;JM<?d>8Srwf-HwfLvK z^rfeu*3rX!^6x>5;BGzyb!BBw&2l@nuMsp|!!z;HI#;f#3(xU#d|&18WKL{H;ClC( zKS3&KOO;YxRW6yIaekIpo{^pAaNo)?Zq}yrpK6v|DO_R_tuLzSdSJ5h(pOuyIhT4| zUiV93b?DdqJ!zroQO!mES$m6Ii`Hscti1Hn*r7K|5)2 zn6ja=@X6E36Q=FwkhHE@s9D^y?w{w2+s75F*MC)2e(LJjZOVOq|GY;lwsTBje^N31 zZnn14Q&2O%drjHXY)Rcydoy`gZJJ`08W+^7WVrIuE$xL@yd<}s{UmpM$?x^XwP}Af zA3zsi+Z!^xQ&EyW{AG#7y;xTl{VrC^NB=yPlrA6m;Vk(7h<@K3hv(Vyj`9C>=3Kv; zT#_dEuJ>k_^;Om#nU3?m1Sl_B61dUi_?Lz4kOEmBR3NVcRTc|BEjntc6m%}n?Zg_f zmK&yyZ)3VahcB|{JJdW9QqlEvh^jL%+QzPs-LJjH)Oca`Jf7Nii)Y&J7Hyd_rLUTQ zgT-+Zp$%yX=UZ=Ve)F>M#LaZ>*zK>DY`gqy@fx$Mn_v2#dUd7h>8>YUucx#at=+)qqqGR8Udv_gN)(c(? zyu6`8)uQy74&Qu>UjF@dUCZzPRGLv@;1zCV$sVwY0Ut=`ZSwqZ{*o?r=KnK zZGSa)P1x+dEo@J(Ey;TQWruCp=Opgq=lJfMU9(F1J!AjM&&Thbn>gvOCa3_lH)2?4 z=;QxycE>!0ML%7(bahB|z6e$Nb<0Fg>gT@TsgL+&?MvA}+v?Bn`E7aX|8KKt=C|UtW^IT=1eYXiapLl9tjUIi)J;1LiIz$4rdk_>^4Y zRwZ=(R=5B6OoDIEXGyd7wXC2+8**Jm<@|J~m{t5QdT6ET(Pfc2XMsuHXS3Q1iQvk! z;v}f8zv=JdB`?>nlzkdV~8 z3*O76cTC{2^yzZY^bOQ{QgBl}D2Gnm0SfiMQ~v+%|L6Jr{0+_|cl^*~cunR$-B!QkA!lKj_@p9Tln;g}>IAIR5;ydw%lwgXT+EEwySj>!f!% z-nyjQS1!H1G~W0?GcUMXdN{goijMUZQ_d-Uyy7N*cHP>@m(?ECViD&2Hmc3weryNN zIp>%xwMp08lop@hzSTDKLb;FIw|j+`0^@7@XDl*t^Agms44Sn$smRD(=d_`V*GH@F z>tXkGw^eyJe%i3@^0!>y-M-OPle1!rdYxorQ!H&O?mqti(P!6xe^5JMzFf(5U(kT{ z^eHJHi!VRF0WVdHry91Lj2FBp-|-?*X%?r#OwdX9u}W5XQewS-COp2IR28Iiyz=Sf z^%p;#V!yHFyQs>P_lM71HT_Y1ChVuj_U}azKi1mRZ<(zQ9$dHv+E%#9Ir6f@&5i(e z&~oU{=eBZ`u5?-vZFy)G?r<6y?d(oSKd>}*y*p9tULT{!@9%I zoPBqnEuOj7O!Q^1R&7x4*7z%W-k}dZx&PN`GU(U33GWt)xbHdYq6(R#T=Ns0ZX1ui^b}NoJ3HlQ|Iy!s3p+&>CoO*8O`=>%L+HeuQ1tDc1a|4 zeTVg?q9q}7E|zKaXIoE=&%PBZpSJbZo+($eE>F9eve|O0pXl_El?5HQ5`T7VfA{ad zG0Q1ML))9;&>8z;QN=~CJ0WAdNu4X^bo_I7nJ;uvP{}G+N@6|Bd^x+mz4>)YckLy^ zZ*@mzXBE_6;=8jhu3!4u^GCNTKV5wHx!j-cg9Eq=v!)WfJ+554x* z^F^7>=I!8Bld_Va>*5u2?ptf{22aV_E#@hxc{nCZ@LgnE$AQ?6s4a|!f!c!87da;R z=>%Or?+&^Ut@QH3*CNt$)=u1e|B_0O)ZuBFbKX2=SlICQ<=?!Cm)N}dJ3KO#_g=fD z_q5O#d?3WrY)Ri!_r9=&rbf-xvR~>paYoF_68{^?sggTOzuXO8cBg#r%g=8DU=!;x zj-Vrn^9*&4Z&Xq;SL#w~F-$(!(Q?v!^6Ox(Qo)q{uY-CIE8NF3QhnpeeLPr0@1yyg)+W#Z@UN@_K_k0yQb zxT2<5S*meq8;io`D}uL_vl@RA`vwUzzJ%+7$#_ zXSGi`DJUr8S7qbFe%QG)eT8*LV%@xwHPJ^r3&p|fj2YWNZJ)@`Q$Q0-fxp?jl9z1BZmKHdzOs4t z!mH6uE$CBI`{XI_p&;dZc@Sr7Irr3kZ9tMxVZsw;2 zfpu?>q%7erN%Ah=-n(UO^#YHbCHr}&+2(dHWzT)O;O5dlZkHF<=x%nsI4^GborzH^ zFQ`w|bb9P9qQ~hPcIt(0^84s5HCrrR*`|Ox+@Ll>IESDHvUIJz%ZRXN$HxBqAmAH?L`yAHVDkLuALbAj3xJP$%|WRryj1l z&UN$mFZWa3N)Gn}GJj>inGnP^<@wU_Zr@}`A%i?X`^h+jxB$V1}(TUWv4^9weYTInitA@rZ-RBF}Y~|)<1zd7bO)KHXQcQbnAMNvEg*s zub)RJ25Gu`X};3|?S3b{>3bl&Ez8evfS2JP(*dyte!-=}7xk2GdAqz9xM&FLip2f@A`O~B zn`ZJ)oV&a%;Z|3c&5TXl|HbzSn(M}tKdji!F%{ZhRt^Js(S)}+=gs1dDZBx<&6SR< z<2+c#%Tc(_ZH2#}66kbi*X}7(C!V+=#<7-TO6leW`SZHoeDgdZ=3VTv;Z>lA@RUh1 zn(aG}b$Ujpl=r?)zVD&we?;%4p-+&VEuZ&y?}?wLtULYe?wYXK)4s4>U3J9hHS5IL zy7MDu82?H-dg&mZt%p*hJu!{NnJs86Q&

kN_o^uEL5k*~{jX{Mz&9_WfaS);Hh z>TuJX%gYi!wioqrfCfCKyZb*{tIxOa^Vj|jtG=>Uh?qQTd=k4OHn!pQv*)KSPj37q zJ7tdyxVIIl2x_D^S($mYb@JYGDtvN#CEr57tpV289o~j1`UbY02VL8?)Z$m? zFHEsk-kmv1Mq~GJMfW2*p2z#5eK$B_d+Ap)ZQ!S4Ltb89dX`eT1?ete` z_FaB9W8LLv%DKDG9$X_f`)y|FsTV(-R!eqI>)%&@XifdS#Kc6!z6$B-2l#gIl&ydl ztjrAS1Pg@@XfSN<(CF#7CI}jdXL=wFPM?Lpc<%jw#qn+5Ps43r_jO%a#e9kF{l%F_ zf5iT9(+r4WIazpV$HChb?5dzLXOl9x;mRU9@si^Wm0F%+k@x$fT6TpgURf-YXm^xj z{$}2Z3wL&SUsb3KWicxI;TUZzeKU9R(g@YQpU=LWm|XH){*z_Utp4ZIpGdr4WWwep zt@CoK^U{6Mp1bspM#fJ6v}9dyrOWk&zg(^_t8%@(DC=BS&|1&cp?V$KTV(9hUmmWP zE4?1;Tou>{+amGI+QDVJz{Ly(N0%*AI=mQVM7WDOUT6r;HRbKGpAwvY-s|}8?|c7p zUfZ_6qv7n@fLC50xBqziBlm{eojnJK@(q=q<+-Pvs5){)*SX0|QuDQ#^5zrFyMDbq@lHbj=tJ@W=v&TYH>^Vs73OUka<^1HTW}cPnFM(4qcx$d#dd$HrK+my-M19Z{5;fd8F#i zpV0pQ^DQ3b{;IK_0;?A8H(A`u{bMM2*Tdz%f|9vXl&6dCql)b_=BX$ZhCUH>mH8+p zy~qB?FO7M1-;Lkg`7b5*{>_oclCC>SKUTf8*#1Gvd4Wi||17&HptD|ePJ^2-D>|kq z1>EA~op@<0*TZ|N9WypF2OebY=#1>#@kK{Px8Lp7Gs_cNrA_NHxi;-~>DcIY&Q2S& zU-ffXe!!oI7Ei%P(_}U{p0m>ons>QOvoGuR)cILaqU%#lwZ5gAYOFHKUVA)3 zY0b>sR|9rVHx#D57e&F{I`Xf-MKW^lpL)qKUr>8#faQT^ zPH==lQ)6jH%dLH!S-aC#EcJ+NH~7xw@!R8bm$hy&tN1!^c7oQ1{_>O0&`Ni{ zZsZv^ZPR%n%ip?712lC{OFl@PFZ=J+cP)L5zHje?JsXQ&I!Zrz6Yh9@t;OoMK{abL zgZE6nn)A0LZEtC8+S;Vzw5_3GZmnPE^c21J^sE-C?~lkY?S8rWT|hf@6GIJm+sl*n zj0Gx-M3ioMxx9s59n{-1{q$0yVX{tODio6);(l_cZ-h*irA9yj|CN zq+ZLue0t40=zE0glBrRa%inC=!`a|;$$rk~S0C56$X;S@YrS3+QK3J5nR;aw zxY>O3G-%d5PPeyk)B0oa!tOhcwk&!1e(hwtRkBh~G*3n9UUJtA`X#1pRbl&R@>h>I zxonOp_fD)TXxa8p^W}=|`!0udO$nMK5--z+l>PQD&(E4D4~%ifFGBHL9}Z~i&--tF*mcat)tq`&V8iZxS{-pRE}OBW{^o~!KLAJ5_ynY@I@(9P?) z)JwZlGd{$qq%Bn}jqMQ8FrCVG!OW+9-BZpNw~ssDPi6iaxA9_hiTZ8vB^f(gs$WCCc6Nj_G!PD!jWV=H-m-B3ehy^6xzY&!4|3pP;OII*#|ZpPQ6v zP2K{Jml=QdZk?3X{)_wg-nUXq&)%EpXuV|dJx}jP6Zci}nLPEoVCvVr&(|lQuX*3; zu)ZmGAN^R*F;zyxy-O*mD?;rSf9>Q&M!n?AMn zgxBihOpn~|zkX%)%1?Us@BFfoJ^yz>ju-e3&uq$akJ<7W>J4)~d{bSt)#Xb(XwF!4 zy~=UFxyQWaYgIwr^K0D4_f*+T+V=aoUY3Ul@nJ#RJ(W`=bjk! zCnEPg!`8ito42RWERj!*N#Y9%b5ly5&cCJ9ctQUBjyLbPFS>Sx25p%1Uh|1Z=Cf}n z}Z&x^z(u3EJmw)(` zet*H^ul*Z#J{LXm=4IpETj1%^`|df1wtl{Ls_|0#&Mil8?=X0Ni&4%7yip)^zb`l; z{#iG%s3Ab}Ur#abp*z|F54THSd{v{eBwfi=UjlT~hN-V>*>>HcD$x^$GN6mTmu7nL zO-ak{=dwI>kNcu8*W|mWjCbWd^{id~X~VkUj}x~!f84VyHgMj}jJ3Y2wtVZlV^X%I zy5p0cWk8&WT6^gdpS3e2jzf+DH>^GqJ9*iBVS$VKoiFT^r2JhNU8Xp@gt~l@5v&EJ zKL5G4>c0N(?0&EXt>!zBU(BthxAMUL$z_kqA4-2b-THco^4+ASAS2j80+HXUPfwhb zy1uRU{X&z@DUYt7Z})UwQDUHB_dKROV7gSxt}x{@i)9|}bM2V3pVjc9_QVz5PPf`B zPiPgl>?<`YI^y>HZ`cVz@1i5NQ<9o4326Gtzl;2QQ9{GDMEIhci+AkyPixkBSH|34 z`2%#Fh{NS&f8xVdZ_-^Hxlwa(oaE$yG+XPOy-%4hKhwklRtKXs!JVis%SSYEtWlWXO-Zy(7uBGN-pPacfGh^b42y^ge^8w zFQb_ktlZMPFPEvPYR$yW_k}Ef>pXR}OsWcE@mkDm^JMek_`>f?IP$#tPjtoyQ?yLhD+i-rfEk)CTqw#Is}AF;R}-aWiqRa1=txuk!(A{+|L)%4@x-Fjs65aQdgyHKk>a_O`@L z(q2o}IN#`~YU#}|_kjL8#Bv{^E>_bgod;Cmon zP+w(wo?OQnU*?H7pE*q2)E~h1B*)PI_GaFb%e(hV zBxfDFk#sDAJNZqp-ND;t2J?DLzx?2=`F-2Yr1p<(+V(yDFHEHkl=gc`PAHE4!4zY+ zkU^X^YFYW`$9EZxZ@*ul(jwr*@pH3AkWkUO5@FTcNTt*l9c->QPE@t*4p%(1Tw-E! zxRO?A@S9jPyM?EC$({9? zV*C8E1q!*ANjZ%*vI;d=6a=l-|$J-+dOT3&vAf1o%| zcb;#2@9$+g2hT42T=4YB%~OY&?eCraXtDCoj@j%yP8^CY6YQImR283lnFn5)R?O>E zxuj+>e)vkE>L^HSR zseLPwmz=q$<+$JR!Nj8J%OZbhto2*rze+?*O{9C}#??nVFKQnZ4AgdM?-1qVcM<=( z|DBV}q|0|-=>;tdT=M3tM$n~KTTfdV95*`pJL=dC;U2^IV>f(`Mc5|4F+O&~?)HWX zvuhKR)i*qUAXu|M+kRX9U+!sneo*-5mQ`3X63C_af< z=;3){=Oy1MTaGF}?XYUucduc>^`CjCtWp#Fj?7SUX+P(>#!5KYc$t!+y@+Nv^Mrl3 zm~VAGykO4b+SYko%g!WS!N~m9Z1(3{f|k7D{_$YWnzKTiwx2q2>rneMj^m|jSI^H% zdwBLr)YV-_xD1W!wq_MwDVpm2gK28=38$;|PM?liGjacl&-@)zvv6IWaw@Cqse64& zs%ztRGyGvbaJFaTe}iN5(tCQhzgh64@l!Cv?%c5}OD%Qnc0TRl6%%B^=vgfwlAgUZDNn?X5OCkO%;1>LJvN%)~LT# z9l$x|v{`M_iL25dF7*`IOpNK+y+~}Pdc|iCNrT{})h`60?@ifxse#S*<@#FnKUSE@`DxOBb3DLRjD%CBP!4YpWB z9-5YL&+%lgKthJ7^~Tx*>dz(r8NNC3sZLH~?Ue6ZXO{b?MX@XA3QSeLKXdkv!2F5s zr)r}X|CqVVbA{hJ!R5ZXg2&x-gxh+~2mL+n|F+ zFQ;>&w=FUyr(9<2pHlNZ^ReTa z#=ljWg7fG4>-f!N#(R-!)J@C_2&7f%? zJS@NPD5sjsvlks);NiLYy3Xm3?_TQ&@0p+0vo~?(gV-$2DeO6iAKi?w@%y*yzkuDn zjovdK>|OCzd4;!`w(uVLzW8NtCT;mVlg;}6%eRwvXIk)qYa1;QO-{@39Ob2^e%GQt zoV@qP&r42gwV=@=riFP&Ilf2ty)dY|Vl8;`vzkKfTbjhl{p+*DIMtYXycX_J^C+V|4uQQ}Z3p$Y=2_9vJ z|7=Sw^EhU5TieMT&u=T@SH17+**HnSi9@ko6;!)=Z`-YrEoipsoX^inQ>VGwg0F)5 z0=_4;REjGZW!NqAIeFyD8BLE!8@5}U%o8%I{5mJkl>TWL?_HB)uXHD|T-Nmzx4U^` zQ0El0g+ZNDq$}r4oN$zRwr9&h6}hX@N11nteKcPi_{;6G&fdBAG{Tl#>$W_3H7Mau zROAeU!w>zeci$`CbGvMA&y@4?d!~r0D=*!4@}qdyl)e0}UQyzI9v$DU``!N@>w$@e zX03){ha`T_F#M){-|?h`b(XZm`D3?s{@);^F+KNJ#7$dEqy1d}ePb3LIq7};`F4Am zE%$A2o^56Z#q5clE)yqB*xz9q(6_?;v3>bUry0?bhitDaCY2~E9oGvf3p}Q}T*=U! zXQlR@g{!MVZ@R8zIdxVmCGXMqfKLWDKR(=>y<$u44)y0V^O#brm%I_sn(DAK(#>pp z=lcbrN>3H%2HshjJ#F7LlaCIXSC?P&_72KcDNUOBMlM+83;&r3`P*vE-uZUBpL+7O zdHxe?&B@*EYD=c@MNSB^+i^-pQ&uzRTabumX6%O5&U5xmHT=ere5TV-?1)5k%1zs! z?QDJ^nf)tHb%zoR1#yZ~0=+ zdY_V=V&j*VSLX0c%}%3T=?Uxl*$y`~gQA>N<-Z(amgYCMoPGBAA6~V>`P(9Y#a&j} zH#Q8^)*E@gxeP3b!PurIDSw~-2 zPJJ;yti@VM{DJ)APYLE#vu;YrY5Mb>0Yxas&((oTRG!2<+O4WP=k*i^$zN`Zo8GVD zDc5&@^1`%3YCB8tp-+P1(;Hj9xTu`taDJ6kpK-0fWnbQmB6ijO$s(H76Z4o-w@}Q59i9QH`ZKMKlL&1{m;?~Jg+|_{0X`vV#Pn*Un5|Viu{Dbn&kmy zpEo#gD7FZE3Wqd06a$Ksf9jobYuR@%rEki)tsLKVoUhDqI^r|0eaDR)l_jdmhU#3J z#my78UE;pA>H30viB(5dpYi1r(X5^=r=J!WpHJ8|XQ#7i%^yQb_F z2Ia{+n|MxaWb=wY7QvUiW~$+~<7Qg(&K{Nca5n#Uz^7}|JL30y-n9K0;wAX5BckK< zvFF;m)z)6#oh#1=@{!X&J#ZPjt8+??cxt!Tw-oGPD85uId_I`hwqDNYZkJ?KiDe$!6-`?6A_AiL+YLYyXUTED=< z^L0~1jr&qnzk3HIs+$bIaV6&%CFe*bubE}|tv5HsM!K8vM*WW!MhAbN&96JS%Y46s z*Ud1C=i!e%y%+4MscEzf_*AX&H(g`5`cLMAs&{QvKsm4F&sA_^ex`Ej3e}*tJ=a<; zT(4ZR#gw3S<}J(>f*=wl2zk z;&f6oYu}fM8#N#2Uu1P&7i|9R-pPA4rQ({wr`f`nhwZzX68moL6c2r0-~49RcELS|I>L)ie{?BYD5SA|mPNE= z&tjSP%jQl2by+O=L3wYzpw%Y7&dD}GZF}ymsPS{{iEDl_VP}W`HN`?Vl^}8U2&Sjm z7q0JPaDFV1BJs1?qJN5(_kt}x-`_oBoEKxkBYh+V0u`YG-Toig9-NSveL`aPIf>PYJ+*b~9xW+-YgHk!cK%-u=dZI1 z^j0|izY@AbJ~sAk==Xh zcEEKnmmlJaYD)5)w^CHj^19v1^3TwYYu;BU!Q<VjF zC->lF>tQLiuVQnRp0ar_F*$kSP6FT5KWh)F$Qnu${r~T;e&Fi2dYeE#J#7}GCdwZ>CCKVY%95NZ^-Dc&{tj5O zr1YL1!~cYy*hI@mXVoh{Gg=x;B!~8F^p{L-&t3dze(axnC!O8rYwM>S=JI;kSF@+@`mj@a@^$`dqsqSl+n;_*J72y4~$&=W)aWl zxb_pA-2&F8%&+cvED`(V5dD|y%Q44ikMBtT+?aPzM&q`!D(k6x2h0LyDKGsgQJ*$@ z$sOC7nSE2#dE9=kIH)0Ow8dlhSKUYDztTSH=1$(>7p%TSJG-px{qE${o{i>` z$@h(qeKS7Rcbn~){q7%sC;zGVZhil6mus$k;-ODz7HMmaD|4PMh(5v;BW&X?*><=* zucLX*6!S*0g^;SK_)D)kAkq3z}uwDji$nQWC-V=<=lr5eAZ( z*>@JMu4iQ1*PS<+*~rXVq4~b!$;YA9E0%cNw2mkbD(je%`{!O@am&NQMN=N%b$hwv zpoZ*)?H<-&&tAH|%k86V?&5&?aq4HhSBov07*UbmJuAFkrUwYlDZfWk6@>kYwr_PFKRx^VFpgZ-Z<;t9J_5#b~ zH;l(-tbY3MWZJPC;yoK}do~JhEBts~Pfq>2yk(bcHUERX@5>kcSgS9vdmZnjMAf)0oPrTIie$km*Dw@{+eyHTjY4NJP zTyan1-6d1+_{`Zy%rCz_dh3f+Vr16V1)l3fj<2}BQf9F@&yMhEPfzF0Us(P7QF)No z#7#F&+HR~U2nss6VCl)!=2yY1=iKvKU-;*ijOJ43SY_4ykFS1v?5HP_E~TjqYHm#L zzHiU@ph`}ik)y{@|JaOkMgLXgCu}}%rWYli{73Di{Wd;X+qU`Nv4&_o>ps&yX>=OA1SX~;Ime6`jQY1NzbLL z1WGr)>b()l=YL#J@coPDcisoxPJeN4pGoQ=-dB?x{a0SMtW;TB?&GIb8Z#~C*_9bl zPk;DT&3%0RmRjZVdGeFZPwI60yWc;fz9e|bo(q9XmXyYU`h)Hg$@vDyuJmj?I!$)U ze8wAp)BDQjuS$@!En~8OXV>sH{(sNa+jh=gH^nN>tZiHn-_8DL+M{15i>IEvTVvt3 z+`$u4Bo;A(+F&bhu$>Iv__O$J;;Pm^C0fPjwqEkBGWQg% zi9t3CvIX~FG3i=%MXJy>X=OsddhtWc)(PEt9JW&CXW;t{P5;bKXQd|i&5wF@sL@<) zy5(1YozgEpTGN6jdp(_c@@Y|V*4969RdXM2-{tnxTu#&2$LRDjkDJ*6OO|}yuE!uA z$@KJY&&Gv48&!@)^rn7)qIc}ZLVIBi|E(1}{#3qqEM9Qum*gbx?GH@%RU74TuA32Y zA#=M*y|=YGs75GSxX8ov#L64TPF#NZ;klLDDf2TEjqa>v5?p*;Q7c1pS&O(rUY6Rj zSCb~pknWt~+UODgm@W6K_l4~iii^)4l+iHfZCTi>l=?oUcZ$06QXx%q?-|>C-T3^9YX#Qu^u$+c)|R@xz}_7yXneg_(Q%gpPJOZlJjMd|APE8g?=hVg!N-FE)c z-r82($@zX-6Xyj^_qum-Y2U0RM#n=nr*6{R>h{ZEZ`{AQ>nd-rNiRKI<7M@B$s5~q zCPA0xPT6wq)uZFPC6lik9DA44V|z}by3tVVn1pspPwgoQ>l|sZ^T({}niB6nT>PWz zxn0hWKkhoWe{2-euzh~*LFbdHJCd9j-?;f3OHW??X2}u<@R$gaXk3sy_BH3z;E z(0r>I^es!t$okE)C-&R!d7galcV&Cm@lv;!>baA5m~Qpc@X-lgdUS2rPj|hdio&4A zzs8S?+3h53e0QjBSnz*p*@oa}=3kbYE)Ce>8mq(aqc`?V#@F? zy@xlcr#HDL)#%tY!(;c-dj6(Ki=V&ttMa|#p097$Yt%m1_E}xeJ~>R{qgS5gJRi*? zxeq^2m7Q`*c1p|vAJw2+b&LH$t@|QHNM30>F)!lZoZ?;~HRt$zhZots9JS5vr;47g z_&#OB%?|%diiYW2LC^eLZWYC6T-)go{gdkpuXCco$!Cx6N&mbcBc~ZU&6-;?=$o01 zSCr<$N&k2F1}*cKj#7QmbICEb`%7un=r#+0!$DZ+2oUqS5 zkXvWfo;~Mk?Rz_~eQIYV3!?8tO`Q;-*5|u!O4^dp)1fa-Ki!^H^;0^x`OoZik#-Br zPr09+IO+YeEk3@>Jt`foLznox7tmZh&FT!#{Cs)&S@s9Ym0Z1|(s%g@Yp!Q2&`hVqL(M|2yds5=}ME(wjy9<@^)zOpShMx}J~OG`pbui&BiR zjr4T3r`o&Ke%_sY?YDaF{*&sU=Elwo0ZUY#gyblzgr^?7h3xhjYrhXS+3Cw>jRo*K|(_=S3wu|kqxsfob zPcrIkVi4yPuO)AOeN+(dyX<;OC3{JXnZb1TQ=UJWYt*0K=3nOF`I=w%G|PKwiDZ7p zf|Q=0#>YNMB;P)N^<&;^tBNNQcK0?)zrOc}sdH)c1H0{F=a;NMw)P?S6xqqA&UyZq z6j1{eI+tF917;WJgjl6i^M#Y#!KIE%=aj7+-!)vn>`?9KKJAqBO=O84S3p_7s~>!) zemzgjkm6~+cv435=f`(u+_M+o6Va?@FJ3TZLMrD}uLUNZ>O5*6cdT=@T9rTXTh{EQ z?@fI_ZTrHu(O{=nfWNNT9CiJQXZ3lR|M$M_`&S;5nZEpp=f022Z=bc_TN5iZ1e5+LlRwMIE%fkw-6MWK@TA1ERge6g0))PMO*x&}N( z%`FHijROAld90NA{%qkS{&OqcTCQ8U_|NJ8;i5a~lhedF3$9(K!V@33?}^qaoRmE^ z;f6xg2alVU0YOXN$WC$Cd9lgeIF)^Afls~&|LfUH_wGu|Y+n}m&th*}me=a3&s0J? z6*s;FY=Hq&F9 z{;RD!B0G`0u=GRDQ|au#7*S^N~-dc zHlLKy;#Hd{+4D%ScJm4ruiVLBRxWeAHziDct^Z0fVt9SG+rwJvBbI zrt9a^^*+1aZ+o!Q-(GV6y?eS#-Mp@wcr3k@_EUN9#lq?LG~~^+2Xpm;)WTPo9f?#*)o}HSs!xe53%r*rIl*|Iq1jyU*!@8>t$A<1p5EuY;`ayZ z)T-|vW{OrQ?Gz|?{rFq``Ih^((Duru+aRBp;i&J!E@I z;NfPrKu2!@>r|;LGe4dR%+Gx(ZD7J{$nSUa1pCt!XBJ+P(%jt%8Xn`9Q`>BQ`ov8o z?fjp|L-R%WU(H%Nf2;4K<+G{^i=$-scL&Xy9in-3m3QmJjjnwExldKUVY{9F%5GD| zoIOkC*POn(zTLiVb^N!>{Vsa7*D|v@vvRU}En+XLTzwg}ME|Q>rTzVhb9P=7l*|>; ztX@1%dFkI-FP45YJ|xD|u^60DlHV8|yV2XTv0XCxyy3AX$>g0q8?}zzc;2(|@wUK^ z=k<=AIb2wGt6D(*?+)%#`MT~mx3)ht+#bd`WqZrnV$Cl81OeS>P;Z?tUH1=+u-C{ktc=UnH{snn_pm z<*cKhu6PyJ6}8S-rYFoK+!gAq%q=VT@v?1E@7v9#^CQlc{V$Na|2|9ptMT^!({;Zl zZut3)uW@(#7Qf3i$^K=JaIPP!oXT$G?qW@219{=u$+svr^dG!VR(y2vzes^)Qo;r83@A&SYd0w~kpMVNs zrz&AkXV~fYyAyr8RdPT4Rtt)I{MTo@)hiQb{#!Qr)3oE6dp-a7-qxv`5vPA` zX&5K>WbKg5;BMKb$JbZg^N3L8;fT+w@1Oqgqg|!^(#^Z>FKv|ko6k2}*X9iK(B zaqiptddIrU)gK}Q`WauYE_^>lb%$k%+`3s7(KmH}_HV2_wRiHf?UkoC=A#AIbdQtw z@B1!!QuwL2s^vrHJ>_h{XK{@mE@lf_=FL}9h2907Obxplw8&~ zG01h|rv8lnDYs<}|LPVmxiZ^jnQ@nW=IkSDGfNM>dQ!yRT($S_k{_YWvCDL%HT)w# zjpsqpsmTlcGH&HRz`ChO(YmQtsLq?t?nR*OB)e09_+ zcJq&o_cY!-WbW9s-Q(1|D{Ic$1Vyz61g?0aTh%dTtxeD|oz3&txt#jbXs1{yqM3P9 zr|$id)bCGJ8S)Z(Y!6C&PVIThn6XLb{k?Q>o4M!>OPRb))BCcw$7kRF(=>Iq{m~~= z-BbhaNf?E5PORCka=gFn^LA);J{?q@i+~H`)Dy3HIVu-3E2%6>wdnOMsTSW~X%DlT11%=pR8vaV?w|7K z{S2kl{42#vLNq5D<@`Hvu_8!X^81;EmDLjeyW-ZonG^DE?iQK1+vMIa^8oiI z_O&RfDlSiu*4W)SRW7oYpHqC9Y7@%&kDWF>C=pEM)&5bwv;OWTF6aTOJ9d@wae(RF!9 z=jBVQmQH4SwQcJkGJwhNDn6>spCO#Um89M@yWoSdVZoMW8)Ci~cpd-ldE&qG*0zxXJ8 z>dU+GeYZOo>CR6)b*r}`)vfY3%lmBgvw{0Gx4)bBq&%?b&x-AD&EJ9A$%=cyJ+6ah z0aoGK^V#S2tO+d(XxnpbNsHIN&mRJhcFfu!v9a*-gazT-*-vdTmAf!)KVR)#Zi6j6 zVRGw!7Uru4CI`y|u<$@`FuY4Zq-x5pQy)1C6(b8jy zt9Df^@c!{=IU7r=ZQ1`7Gu-p5EI;&Vr*6G_bldq`d&@2VD;sS1KQ)o{)7e7pIdTE( zg=K?Ir#zp+WvH|@>Wt@V(QcEkNzFy#shfXny{GZUXhuu2*OEI*n(q6~mIsyfOu1Xb zbAomGZjY7Og5NWwj+~#Q9kQ&&l&|%ox9q0F&n#V9pYea0G2^*{-<*GMYHPo)Vu_lT zYWe7I{WQ&c<;KV2SQe!Am>M11x9QD1n=EPZ^T(`;-dL2qvFzBs-}wCkAHCa6;>)K$ zTz8`Nl=-8Y<4a84f~J5L8F|FJPnl#ovoav?!rr-3{$HnAK_Vh$*^|yk@CR0rI}(;m!v~BPtJa$etfFU?>kR+ z_S+s}e%j1`D>f}X{d@hk^LO@^uhjpji&9GzDe#O!=uJlQfJEpJPWjmEq0T5l(QI_r0N zZ~1cbj`^xnxsUxYT{Sh(J0vo(_^q?Z^47c4Y+VgusZiJ0=_wkc+fAc@SJil!5&&TgK?s%K5GBvO9^&6=_ z?t7W0vpzkX_r>H!@4R&_UZ2l-THW&nEtA;S3(CaTRK0eEC@)$3&Esavh3nE&?S)@% zXA3^WZ4f%U=gCgt3Hy%m-a0jXVZH>H^JZZlH%Un~Z=0J6Gn`Yamzca?7hEE)p}B3& z_g!!5p1$Ai;`RA>Xxl-R%{^hqli4OecHDdNqxjsws`$%mwES0ZKku`0<9FYP-#vd@ zcKYA@`M^Lm;M+>mf+q*G|6FFfD;B0;Z6D3^-lZ(*iCJ}uXXff4 zrPK>1)$I;zU&a4<#c=z&)LOeu;8{+&4R`D%&q-)+@cHm>g5kDq!?HtW2LEoBHW`A3 z+;8vy$@=>KFQ&Fv=7JlR2s&@}zTm%?$-MPkaMO~x_jx|sPHC($S7r4A^3RQ=o}^L`)Kf&B~?M#q#S zlV3|D%Nrjn`y@N%`Kyla^PJtMyu9lgZSNfQGi=A%l?NZ6)Gl;B5fdY1!u?-j`tlm# zbuFG$2D;6)8^$d%+re z)<88NEl&o#8gl2wh2AUP2x;i_za?SeqjE4ub z|MC1g|Kb|c&rg}6hxNGUnY}T3TEBY5{iThpfAt@(uYLO2@n_7o-6uZDEC0GuKfz-8 zX(9FX2|ag@u|HvuI3&TH)N?kuXYX+d>m+H>^Vc3R7nQxUU*hv2ZtGX$B~$WSzyGna znY_=7b4pp=<;3Tc7r$BXaNlHW4>F4v-Y|%q^v;^M;u46g1 z;=t5Xf$v+kn5dlRbNeL~{^E7J(qiA%GiT2$6@O+($=mc^Nb_fN*>s1KH{Hazbj2I` z-1k<_*>-2*j+0WFb0em`+`0JXGV$*z((%947JqC#n`!E|da_naPm54u%^R=Z&()t> z+87;)?3^NdsP)$(c6phynL58?>h?*S>HOIAAn~x?=Z_QhzkmF=^N#!5;>wH{C$yc6 z-QxuJRlEp&rFwYX)8O69&j{yr#wyuf1;8AzgCzQ99e?AJX?7Pco;T3;W#iWlis2p%;%QU$6EF7VKb&4} z++no5`bz4jx0y$q^SalHyblOJQGR^t&HKe#uY|7duiLJ4b^oJlo&Q7DPki5}D^np} zU+W)f_rUC5)O>@-GiR%%pT7QCL4L)%`llNb{{7U6KV!e$+RQAfJ_)iCCHajV0~2V? z;IuOm(Z?iiACdTd)J$jI+O4k-B-VU5oWG*-fApEWO8LNSvxJm7QMQb*$M06S?l8#^ zdsDM~_WOljmV1C&Z~~WPA*EMP+b4^Y?-x9&Sn{Ot(q5T|ajG33Vw+cNJS}KkDfj5n z=7r~a+)p)aydcuwu&~g;$jnNi_%y@jzKNHtB91N!Ua)1+i6X~M_uNlDPPvw5ET?H4 z&A#!?HF17_W8VLzQJ&q*mVpkRUtP0pWDdypWsbQ)t%fq@oUv3Rrx6ChU<;v-+ zN_sD;#ZCtGB;Fa!Xkq^IKJ2FJPFFY3$`alB_uB#|*_Btx%4z;QUVAId{Yg${|CHaR zy^p?YnjYHSnd+2$C+g}e&DAnoi?~BqUTj@;GB|9t&7-cTiLZnr1EzPKUv>KF@}IX` zgihKmj0h-vWpweO%5S|%TC#5@d+nMY@F-#Zx&Yn~@!3b$1@iXj%KXT2ns~v!Y~|tq z%XGH=&%eR++ggxH2vl99FcK7&i-kzJgr7EIk`;xc6 ze}GEh`$c=Ib&_@F8>T%G-oyCDF8ugz|2YXiJ{*tLxbmCTV|FAY8mEo|KHiM zhPT<@C%^V*!n(pIeUiR;`DtOjF_U+^vW)$rWNER+p-e8nU{cL;p4aAYz9yF2e}0i| zez*AUhu8AIryu7ns{cMazVhkR+i@jj`~KEEee+c&X ze!6Py92~z(Tj%l4`eRRc_u1E7oKU|y{G|Wt?xT(;Q&*V>X@}HhhJJgv(v(m0u_7qyQX{Zp>VuCfWxI=(me|2xn1Q%)*B zP1`s7QsB=$kKRANeAm?Xk^jolL+YMWSNU=-UG=KvD_`r!*Rr1;U$b1IzD8JCsB7tg zBSG%|r5m3ZZS^S&o9?OiacR@-D@F(JYHbv*{{AGW+I;nqBKGUSfzx?Q0;jKxxpGu% z`j4$z(^qD{otqqP-O~~K)W9Zf>EUj}(=Cb*x!*4RP|3{ZbFTEq{UbcT-Twx?dH<1X z`~K1!8xpVEWgK@_eY@<>W$pu0YuHsmYwXP045uBIF#c$fDJ^>bnbpAt`7&9Dr@QZK zG){Uyug0oW^j%L($LZtZ2l9N@HMM)*&OZbm8SzLL(d2v?H{BzXcS?SQaw_Ygz1J0u z3M?0?pLfm4;d>N(dBM4PO;0KxPYip)nfr9LfeC-mqLgQ8)th^@RKsrC)l9zEetffz zT*!}&Pu5=ZuzYgl%e9B>X|wL^n|;$FD>!ZE?MpwF>aTK6w`TR3XZNJHaMr@+KS}L2 zwppLL|JNPFwU%oKyzsz;M zHSeWuU-q`|*f>$&)Q%Dc)dcJhT~`GR%^60P~XZiUP5sk||t(Q>#g%}sXB;r%AXGN z`Hyltr%W&TeAYq{R1g?029*O=?-y-x@siW{Y4TohD@XBaha)dcJ7#U*2wqeqIDOH< zD{CTDp830-3bJ3azPN4OFIS1EIcFvoO>UNSJ!Q9ex5v!2E~l>ZoiW)}Z@&3rb+X&a zvn{DsB7@dAU?dgYtSG&YUt<9>7n!76E_JXWyW~=U9 zGv|(%>N&K&#=)=6GbQrR`;E27mz@3bCGX!o&-Y7f{62b|?Ejf>5sGX4wWd!~o90C}=tOSml6H^!XuTQgvMV-CS{*X;r0BPqCq-ACIbsx= z7Bq8$;no`m7sTmjEMF%a^yvBup-17?F2}@Hsrf}N{L~+{>QhJD69b!~bp{qT@e%@) zUVoXdaQ4A(^%d=REEUr}_|7|cKF->xow|7)*yY_we_r>oH=Nqp5C+icHd1UoY(F&ub9ObThN3I^+JT-sQ)W>&i zLfFnMvDN^W7v~sUy^88q=ZfExy>7qg9nZ(Rlf?8&Iiw@|HwgA}R4)$vS-7KGRq1c| z%=Zg@P8t*I-7X3_2n|yrR8n5S9Jy*A-9?>hECA7KX!;%@T&CJPSyx%%!+22skdMGe`2CMVj z#m{&PJ7?P8FipEB@O?(>-O7J5oBrN^rE}@ocmGJ6Gr6Z8EzJ9Px^36WaK6&u^%8F; zMwr|%F5G%~#go!zx8+l z#H_6WGs2YD_^b}p49X7G7BO8Vnz?n=)3B9criV67$=bZcD={)?=LVCNJ`qzw^v?L| zgq{r&=eG3P5~IK3>g$#jpp~L4U7Oxt3Efou$LrmN{vE5edg|S2BKm8&51j2W>@+l+XgDqVrtMG3gHs@j8y5L>w>v`t|xqZ}y9@Cz_^ZPxB6c`p2O?J*}nRM5(5QQ}Eo`jxTH6N*-t( zaXaVc6t$~}KlRfhhT;V}wX(Zri7(8TY2sO&(>FyrbXx3`KXzVSQ)-=}%bSbYHqW^> zo$q``?ceDy&nnxUS|NFFLXcHS{ZD)LjVq zXIA)Ep)_b?uu}d1mAvns)$SMnpB{1ZUsSo@zkf>}9qbHSnd*Ec^J%m2<bAHwSIxR+oAy3(-=+32I(GAp;Ok0qSEOC1 z?LBFuaMbGL%=hz*-M#E)yjY@F|9;8!NAmSgPkeWa+&O>J{__{KfzljRf*A2b8k!w)0evZYDt>$Ld&%aSAXF%=}nrvEbi)* zysHW(Wol;2u6O^*b*|bQnYH%9gec`J%dc^muDqI*>a{guR*>o%&y_;qD&bt*!CFU~ zrf?am?~J*iGQFEqb81k8SF6C3AjMxx!cLuAIrWkEtD?dQyPV`C;$MAnITQ8p;SSM9 z_RY^ZxBqx4vrf{ihwW`dxqsYIiQV0X&lnUoI4}6qVpw*;OzYE8iR5kXf7`zPu<`Ma zw+9kywifG~)$U~GzHR4pVN;sT?0r((+s=b#tEL*<+*fT>pmx*~G#oMkwEoo6zT}4P zO+~*laV39Q$=M=-%dhriX!Eb07TmR|$Xw~tR?&&dx6j1*bV!AEYdWqLke|(7+IFjm zUzLB#;e~4}8Gp4Y8kkrs9zG(!jy2`eLra^0OM0j59y|$5$qso~5o7HCz3yFx-|Oz` z;vW6_=@$*&#QLrc_KunwGdE0k`qI$TuPsg>gX z_jv!bl*7O3mg|{(ZSLCgwYke=tKaG^rGBeROFv2F?%fl1Ut#TK^HZw3)HViPS224v zYiaMUw2!f|o4@Q_=laX>y3*S#l1KkmEiRdI+&y*D=d{lv>8b&rG>$5#wu5HY-Ur$( z*ZFatckLriy8zF05&lW#=X`D1A^WLmW z*B7j=<@=?kF41FT-BhXnTqS}e&IckS2eIi%ku_VBu&&m;ZxBPTr7 zw|eY<(fjGV)w;-Ek=frSZ;QNh@bPZY)|Bfyb*rg+7;6)_LR$q%Xhb*)}E1(r%^KycK$dpE{zI`MKkjY>n-L>n8ZKOi%s! z%1&BKGI_e;v3Z-`%zJXUP)i~?-}u+F1mB^Npz zXTJXEameV7*gl5qKC_y=o6qdluzuveFL(b-HBeJgak=}%NptFRnxC%hub=OAWM1{n3(a@ zFsPO1-?VnE*Cvn3?%GsLjyq@;G;3yg;HMMIGD=e<*Y>F!MalL{`Fu)j_Ox1H?)95j zt#JN9jkme!lfIQqxv2H_DbL)Fdg0gq_ti`ayq9fY`Oa|i*&n}qHvPPRTjkwp1OHcc z2ihM=L>+Zz6Yih%DX?~RiBJBd{@1>rIQM#{%~?3LUa$0uX~3nqQ(O}Hrk+UXz7kPork3dDr{bQ7yi++%~GMb=31(J2h>2 z$mv^4xGa;hHZJx*v?K$Eb7OXykj@wj@{tAz2ir^c>mGEqQkFGTRbZAPJrSeLjzL~rHzVyec^7Th+d0p&YqJB7yo8Mh`;(NYm zwfi!Ap4`m7%KhZ@)!t7>v$o!KE!*(h-rD+T>wbnm@(r&gllcvgr5u~VpX_s9Vs%na zZQ-t$ck7>3e4m)C{^9jM=N~VQ$FBJQA^J@IUxtsb%^&qfPCdnU>U7hm#OLOR&lJJd zB%he?K5^2Y(p~ojZx*I6HVWMBJY&wAptXDcHHl80@gk}-;kuVk(R!y2chN(8RtY|h z?T)x#rSijEA<>6<8JmfN>OWR)O)Q9iC@B zo~xNV3tvhS%W|pe5Ii|~mZ1GYM#1E4fj7~ug^N!a9$U@w@7`(yvjV}U#YF;{9nOai z8G1avyyvIvl-VIC?j-e}Is5IzgXW@&ElWIZrhk#q{An2K-E!y1`eRo~B0+C*Kdf zeX6{si~Y+VjmqvHqWj$(FDvAGte?Ir==D<3m8L;)UR!6JYJa0Lt@EE}>ZanLl|O2N zHZJheE3H!68B*o3*KJ?)UY~t4{h7kWzwX|0-G_m_Kr{IbBg1+|kCYzW^q!d#$@7_E z%cnodPTBv?y5;-6`<<7z?{C_cCGB>0ed_|q>gl!#J5QNkC`{S*UxVb-ROnVvFLXj-Cu*qhy~GeYviFG1|+H<{$X7Qrf_I zFXPV6+!-^kwC$NIZ4_aU(?u~uQ;c6 z`XSQ>foN~!S|O#_P5 zm6uk|@VoAj*(W6%;gqoaKzSUi*EzGGs1lAT*9T{Am<+thbb;AMr-EUBkXzI#o~_d1?>#9VeM`-p(=RvW9WPF1nNdVF45 z6X$vAl~kydbym19>Epk?arcJ)M&=zH2cGt9v}Uw0I`&8hytk+S&rFBPT}Ra`_J9AI zuTlS8JLSqA&h3__6(z5XVk{@}A2*bLzwgK=UlZPA-~kQG-5NoY?k~U9_I7>w_v-9j zyi>fEl;pciIV7c-E%+*EDa)x&y{Q~UD-T3WFJjp-EwLwBlF9az!NuiFfyvnuOm;Hv z>JUpgCNWVqJBaDY7nb50lXiDGS@VSsn>mY1W*c7LAoIWtoEnv$*BitYs~sAHtl?!aB6ZKMdS0*Z`}y_W*J8(?Uwfa`mmg-c`{8c0sKsmY4)63Sb(gk!+$>k3P=vzC1LqIJ`J>zTreQ&Eu}@rr+~ZO;F@mUvih z&zWt%V+BC7PR|M_8Ge&U&XE9bM3hW^qb#Qm-otg=-$2H$OlCKq%(3bF-yLl`Uw@?Q z?0luQNzyf9S01mtqNEydtMd7QbK2Zxix*tUUQ_&WNxm3c&t*qG-=o}x9}BLv9onD3bBHT; zLd4%iszFvt)w6rvto?J(ZlaRv%gEz9E*&qKSL1gg^4dewwBNU^tIw4Cl+CiLWBWhb zZ2fQHQ!PcG6Xq%Z3i~+Wp32+pJS%RkHTSgUUHhoNYVw!Xdn$XE=1-LV!dok-K7G`3MX1o_P?n?U#tRP_<-ZDFpKtEIPxrgmyo;(c8P=ur+&%n${uZAP=Ms9> zruOVTDsej#yonMtboi@OKg#~UU~9B}^R_H&rfDXL9%Y0;_};NuKi?<3JygE2?qsz_ zzby$@=sXvSLE0(|G?<4ir2*Uci%j{ zUBPZWXPjoLgiK_My1L#G=f=$i`|Hi*IIld~*r_QYFq1*ORHaQ??Lc}Tzf)Lm%dTgv zFMRw?^=+E-w(rEfQ|w(OeN))FK>JE}U6wQdnfGY&`_1o6%-VfkCbW6}I(b2f+^()86w|?wg)}sYY#-!^+b10I{Kk3mf!z+X+ddhw_skj!JS&(xX)4C z;s29ZT0;~qH?nTtWS*RPaCXGj2ePV8({%qcJk_>$NWIv;BJQtX*0s8xU0>%fSokE^ zWLj<8vs332*8G!Mc1wT5!hhU3IlqKvNAEinb~*gUwujk!c7BxJv-hX;maTP-pKkFR z*555tIh)_Oe4WgBH=X1AnVvriv#(P<#B;~gjQe}v^+y*csMtsfb1NG1=%=zB%zmfg z6ZMyE*)<+x_fu>C_}P8V^Ri>TdBM$ElT)$f#)}=BFMYekep-~PCZNBF{q5{$>$U$} z=Uw|qvDx$1!u)A=SIoTBa`$er+Z#4(a+K=QB_SM+o=5o(CtqK|*0#3d*+b6a`Fk#_ z|L%OveD&}8lCb}0nM-x7we+7EPI^CM%bQty4i)YBZN||5>9;y#Pg+l^@v&Qe=6iqV zteyW&&gHWD{p6~{)-yINVmDmVwF zpVpoH?9soE+#gaN2wD7Gd!XQb=!Xw6-1gs-dWy9VyIki=-5$L{Xr4yUx7=-on|23e z%1ua~cP+Pa?v7867JoFhS6+X@vYqScR?}m9MHbt3J$$*9PjB(HM_&V1f9(3MwdciV zF8v>C4|OxH{&?$0>4!cY_c_}nKa20_ob|{*am_ELWwZ1*E_|n*lke11f3H8Z zT>f9ndHY|I@ArRao@G|sxHR;=LhVtuo|%EXnhQC~duF$<-cwZgbw%cmbN1}pSyLar zOVE|$@jjGnxKUz;NZWJc;|FWsY52taWfPj>ak4yM7JK`XoX7lg{y1LQGkeqL4|DS5 zA~+RWzVL24esJx?OGW>6=2zv*?mEo;v}gOADck@2J=Nzmd53@gl)4LM+SXdPO?Z=B zqvmcgSQ~al?fMEe^=X{%IFGJcxbd~@yuKK-2Mawl%+8qkVD5Q|)u}zT$3vHP%aRafmCcMNS=Y|k|4Y`y zq_(sF-Y-e{{hy8PD!+@@{Q9T=<4tq?$Di%{A9eSaJ?ic+e{|Zv?9pof`oq`f|82{+ zyWg6>??!9>{yVMj_ucA!zyDsZ{JxvL^80T$%ie!~u>AhJW6R_JboIWkYd`die`3rP zw)ZnbCj^H*{d4_SRvYOZ%%23;!2cj8ctEfLqU=DG7yLfi76-M{BQ_D*G6ye0g)(kDji z`Ps9Nnw$D2#YXMjV6@e5&b*-2UH+>|B&G+vGf+yL+bj|J;)6$mrx#_1SzQ1#RWuZrjV$+zGZ3jgk3etLZ5p&yt7?O zLUfhXLzM6A=SsX6%JF%P+l=b1sUJ99PwhKv=2e#3H|5#OyEZ|eGVj?0wC(zMJxKJB zd$?kfkEqh|aAm7CY#R$pJN&Z`Tv?;0axTa5lZ>!Q_pJ%RTUbAzx_4~WvHpPVKecoI zKX9-4`c?1EpO*|}|7sZa|1ApG_&U6MF8jvn=ZbIsy%qQt@z$zk?{2=t^Y0Gd*!|n! z+grSSa{ngx(0*w~k5FZScv~K;#XlR1ewC>| zZTyr1*+ck5WS8WcgfBex{umtr4>3y zHAl<}Q$OdwQt->kt4=F+`8=Jp;o8BvPfd*9Pd%P`cS`;Fq@LKr64D32Yn2ju)+YCC zH9BUO&{KO};`ZU?<;KTm^*?l_ z?0)(Egk-Xx*;n`c6}@I!+oZbs-oZ0>&R$TJnkaFtVMpQCj&ExnpRAB_sfbu^9K7Vs z?Okps*ZJ-9`w{(AFZg?wOW&$vBLAgSde*xJMcA4Y`kuHn%fPr?`I+v$w$#`6kIlNp zACUD&Vr#UW`|aQNA3a`Qf7IXld*c6thb^kUSoFz1_lq!?^WtP@@a^Ic9QXd`se9f3 zB@}6zpZMiZmCekUj@9bt+UC};d$ed{<&KIwIx#kS^3&O$K6=Gzxx?^AgSFG;4-Q{K zY!>!4ElyN&JNMBs;JC-mqiR8ATvJ3q_1GUzY1OCalK+KW*D{J-T@jEiRDW>`M|{St zmfTFftg8-tGB zxIImFvW?%o4ZNMti#~c(et2Q{#;zh_=j2bX=T?9G*ca=y=Ffxn`%~oW|9#G@`FC0l zG@vi=N&MG?+3_1co_!w>_>*(mnQCt1OSczv<}_8+*e3nW7JQrAH>HMy3tW16%#-S$ zoVf04$A>kJXI@09^sIIF@=*S=QFq3?TU|GA&fZXRuWU{1SG`r)c5RuL!*Be$S6=bH zTlUAF_V|s-*W+X?%kF&J_{e|#W19dutET?4H%>2a$2-Pvl}#2ice=9v@LNId1amd< zvU`@N0#^R#HgWf=%m26Zar&cEoR&N4CNXYrUG{L_iObv9my4M>+hbp&=}6b_HF->n?Ln;EuUmqCYt;v_1F!aV>f2^ zY@9Ed%r239JZFEz{MSeOt3UtN;Fq;+t8MR30v%zIdS6jB;@_V43ZPYZd-~md^2EW# z%TMn=JBsD)e!NKEVp7w2wfnwnW1TRMp{~cQ8x1=QOFO=;b6wJ28DtC&UAJordzk<2 zE09yWyGrn7;Nm@HkN&)#V6#y0*9x&S9`_o4-i+Q*^e$RMuZF)=bbdnfNAEpyI3n>%+-y*77>O;DVX9e=pbiG!t+jS8YOtlss8J>LH+W46ann-aI1GMYbC z!s_a8sD1vMC<2-^{uB8u`GL@;9|d!Bjf(D-xO^*(aVJ$tmp5@SzdoAC8w2J{m3$M+CodYo{gc? z9^X9`{%e1g_|npk!B1_%KK-vcx!>`@#ZM;+KS!@lmMy8V2ZyMo`L}nrJ^J>)d1puM zbNsl8-@rVX+i1DOM4>w!KMYGd7J7KzD!rka*$dhNyp`j5@ZQ)}f-mEGGuBHT>08%o zwLva(@~jD>*@tr8rmZ9lRLCf z*?menYn{sPoOrLTzaI$h`M%dOAT4A+XaCNvKl~qYfljaBoK*AtiT$y2L3Mxnzb(F( zW)l==nRx4@hvZempuRAr)H|8Vs-Pp2)FYKu?|bgNx@mUNYRe$0TT=omV{R+SU5Ru~ zUA)Ejvcj~_0W-r?RhNf(Jf7T@`h3aOrZsvZzkEUK2IaTb?9BDI(dItzpK%Ar0egm+ z{FyIgSr@#F;XAs}wOdR#YD>n&MWqkdHM93UxUFBFy!vJIl(jzuJ{xb>3e+^+A;@VH z^y`Y!rO8UF4~2J~ZM-CE#C)va%t)j=Uu9pR+9fAXZ`o_+UyPbx3n7us@8Mee%f(&k%Y znakHj{s}tmytLB&>7*}Nmdaa$`h4`J+gy3=s+re%m>IOkI_LMJ$Y{{+pug>g--MEN zrWkH(G5q%Me&LbX(2#QNzV>s!M$jbVtA;^Z%!N9W_b5-j&ho#|bXkwl`vq5gwy}7< zRai)_;7-ZvS|>{P%?W_nIwgesJ{3T3@phIKHR))0@2cPjHA-P;%#{CbC1@LLPz zrA~bwdXw*U#H-p$+W7A{dhXmirQ7>{EEjL^X0XY!d^9&xa@uFT>_V~a*=WY6j?f3e9-SGMKKj(_?yXR_D|JKgX-hQ~W%=F*v9YW@<=MF!8{CVo* zyQgfYFdE-xe_HZ9WyzT%xr)y`GIvil>QhoxY?-jXLrBfq!2i#*sf!={S-UW_b8363 z?j^n2&0p4TbF7Px*596y^>on}smSR;dhDPRNDhnJSI@WEcmHa7>Z9#XE509PSeMfC zce0^bkKwd5&}l-I?~{9ExBgA?g{6DfZn1a~&66{^-im1Hu4mug_RT}`X&`s01M`=M zZfCr1cBJmS9k}a@t;y8-uI*-Z-RtfCita9Z7hdN7Pqdr=%@b>l$^~cE)pFNyOMeLQ z5?nXS;FR87Z$_@L=JvUJCQkzUs(4}Wf;$RjJ62y3ycsQX zcHt!z$NVXLucMdT-Iey!I(G4&dD|SMrM(NBiZlEby&SKejHKvyy&ieOv zs-jg*_|y0N)Be2kJa%I%!@JZT+tU)#CndbWEv4FX64t-}cTR#Q*Rb_bARoTc3;N_B z`SRL|H>-L+u5v#0Bh9Bj|L~(XZ#5!6+08m_fB4(A{11}$&;I_Edvm`$Pd@O+0zbQ! z;`0lYe>_=!_mu3EU8~-DEfD$ox*+|D)8})Z?`1vs z?H?b{FH8QO&tCB3!cN;Kr7vC-{@L?=!KUU-ulBB=>hRKRH=F-bG0nzLr#e}md7LZ{ z>N^>#R{4LPM`dh*S|0Dk2lGy-{8=8nM5c4ctiE-r$W({oQQ^6;$dpS*BW@scO| z#h%}0a6ZDObEZaksHYt!;S{$$^uaJ+o?#_H#cPq&tRdGT?xoy_vbw@M!v*!^f^ zKb3E=_@8V~TtNTvNnx}4E27_lCV>ALn)&bSzhve%kE?%5&93jI!j(&|%u-H0B*HPx z!*ZK#kk!1NDYxfNiPhc4KdD8)=|tplRsV5&gSK7gyj08l@LsH@7)6Mh)hy)t>$1liN=Pxmw*yQKf&;5XSHA8*^< z*!)_7Pu`{}*}ebqk&nX9O@iw7XWL8J|Kc;2zVG^hOF8AR)g2+T`+JHf$$$Jdd*P9j z@6;;h_X%kpFPGPhe=npt*Wj;i@scyoCQh=~xn<`AIx6_NME{gOuLa~^Oxt@^NGtm2 z-d$o7-!IGYTRm~wvMJrSmI!4|s#^PG(iT6VtJ$sXS6k2DjR<-2hyS+T%}mA}_l@>O zGa1Y>T*er1MB?@_iQAdKS!cn#)h)Jmo|voGr|L-M)EV0Ku`}Y?1LI0Pq^|c!zB(IW z+V21PpVa)?588FVQ|f+^u z=ktFrSAMFi81+Zni1V+N+bJdRc;h+!Kl8lm+@EfF+c)FeGUZL%K3HoVRkm9Eh55ek z%sBn9C1IY$leL#jnG$5FvC^eVwQ}#5ls8fz`AP%#d*|*>S$SS)j_*-El6M=nBq)Ch-k$V#5&y=W zFRg3--qd?@yO=}W?@wv?)BNAR(w9uhZ%uwybw_e5N4VddwJvVE57<0i@qMP>=WV5# z$2}}(x}Qq<;@#1@V1Cc_^xuKt*7?1Sy;Ew;m)12`#NP@5`-4o>gm2 zte1MtniZp0x%zr{P|U;4-&w`J?7y_lyDSQPHnzpS=1GQO$-Ap3&AiSjed^VZ--x_) zaT6$+`FwbJH|&~+Vn6nYL>WG~f9}@r z^_$;Lnk$yM$n%QR>FEz`5Ugx?d-*(b5b7kW+X0f#Wt*b)kKYHtH|LA!B z_eUQV?k}6S{N-kO!_1|E-;e4A_Lbf4owx4If-Sv$`>&t$nAtj8cjBk}(>#7kL42c_ z+QBD3XY`TC1?BQXU&qiZPNSc)Ribp&7DpK-I`Jt?w>CB zzqYKbZ2FCDC%+w)&`#@_YIICWx4CHFjYJO-~c; zKF)6Ux~=~Nk=TB{Tjb$cmBu$kQ0z~wV4i8mr!}rU{P$gNHf-_KoiS~Lpm*Ay-dm;f zAKzVT|8Tkdx5qCgKHjFkvv^mO{cpjAt!g$R`_I%InSI|?GNW(GsgU=1OiyOMkkKr? z>*AFT%`Vq6?@OQkab9=gr>FHd`%ztbZ%*c)w|HpXtidOJAOFDH>FLHJ&v8 z;r;JlCcj;`ZS&^W77ov!9LYZx(cL=Ha9g9{wu?pjOGW=z&VG8`jN!&9iQgTD-;&z{ zPL_xKdv|xrpZ+-(2Mhij;gqqhlWFghJ$`WU@iTq0hZVuS=px5kTc0b~{eKg_#k9Wn z>*;&P=k%OCF(b*vtAP1Y<&rP!T$ixBp4z9g$2RCwf357H$|WV{?-$K^6y3fuS$cxp zt)|S*+=xlv#a3Of@7liYU&s4>_nZH=_mx!b-D>YF^VHtHPx*NN;~SmA76&DM1fP0e z7qBrhcm8{aBd>UW^jER!@t$hGJ0s@ljqO63$DhqT>M^saUj4|ygF>3jl}pxu_j5n7 zIlP}OQep?M%>P?YIBHibe^EQ`Y_<3?|E;vjc0_|2O)KPp=N-w=E|_KIPU-sXri643`FW*?TAeO5wy!=9&~B$JILlPh~Ry7qt$ z!Pq@*?zBHYzF)jAtobwlN#dsq7a!j!{=iXpW3N1@foxX)Rk&yVzlLZ2``bTmmcQTy zo)6UX=zU+?ylI;M#+tLcPn^HajlbBx{lm;3_d~u20zqp0d zZ2oQN-*x}(yjSe&zXskf-dQ~H^U2t$J%;t%b`Hm98$LTIQJmhhGxA=M9z$Gm&)$O) z+zCCBItxDupWgVvdH?eh=I>{=_sJbz|C{gO=lSK@_kDD3eGr^Q)Zk)ov$tc(wcpQz{8jb+TP0@a!1-(tsszR{Ob~ zV)I_ICNxg?&sIUBRYH?%wGAtCRMq@fIh~jy)spo}&}=j3!|vXWh^x0=eigg+P*Q1Q ziSe_Ub`E#j??3u0U-qc|F8hY}9|BXupUTHx^Z0rHi0F=-KR0`)gqMhGmMT`PJ@7we ziHVg``fA~2`(L(X-kvjIFX)8QmIS$GmTEwl=c<^}iR$`5->5XJft5v3J{c ztUlbI&s<=e{KoCrje3Tjw4Srud2anYXcY6jN5AdieT6r+B`o*f+-diXe-ps;^vF}) zfS1=E-P80g2*08Ps&M;Nbd(_>x1esL_eJ|6%O@vWD=P13?fA8}wf}n+OU1N=J=Ky; zceM;|Zsl5d>Vrtvl-h}wLD!UnI;ZfSI`15_+Th|^rpI?qKX@P66S(-=p`+!dahy7b z7IbPGD%7yb^+)!(KeFC`@5koDcQ1BNN$0G7E5)Ld=@NH&x7Uh48OQbB+^Od{?my?K zhh&1V=J7J#3F(i{C_Uv~-Zy1!th^XFt#z3OlyyysW>-vB?w``vUZVTy`Yg4RGorNh z{Pe^pUwJKa?8rKqA6|z(F)}A{vD>YPyY~OtgRaEsTis9H-wke&wMD8mZI5bu`C+%_ zd5fS=`2uCK7Cqnfu9rJ?_|;6wZ3Kb?W~@%*nWrWK|TeV$5q7TG*@c|eG9BvwB0nQ=+E=Xv8xR3 zEtUDFcl1M1Y_H%tZNoFUk}@`83+G?Ax$`o%VYS=yhyQcpi~rm_XzX1%ZHHot-n`SA zjzKrY)>MBk-t+aX{*TP}jxyH$%1=#&Hy2z^`77T&MMR5JvE`31&ss6BB~x@KUgDIT zJ!S3`_bs}Y`e&(CMpy0KVz)GE*2EySV=Cg^i?3$4B)%%;`yaf%e24Mof(N48-hS*6 zZ}65#Zk9}z>@mD7-#cZ$tVNH1-L2kT{QFuL{_@>puvR3T{e0WpYPL6XzHaz@!i3!$ zQiLDenG(X6_ia{ZyX~_B_i6>>N}?IVuZK#!-Ne_Zrz)c9+3s<3#Rj)i3e$~#>|E2{ zep+kKyG=6Zck8w7y3#@@^sDQ=5EHacQbbsIWfu@UsqmOAsm+f zpXc`epRCqXJSvZE4=#;-ZWoj`TRGK5OU}0=TJ;ONyxjUIaB*G zqnE^+p8drBk~gR}s&|XY))<2&Q#cY&9-ZXvHS@)Sl~dlEhVVaiF8O!E>b13|{V%?o zTk{itoZ-47V|D+JFWdk13;yhH`}G{uFm9Q^eL=Nu=Z?w}JGpPm=1y5sy}WzMKE2lu z-bJ-skC~pl;&&3yml^%;?q?6m+Wp*d%AEgy`tMoNwMFVrdlf%_sPS8ws{T}5{Dj}B za}zJciQg(-vW3kH?CO7fvdXEy{k*)F+&RPk+`}h*N?CUF5`B~2OUu4gZB$tsHDhv| zrrOfbj(?h|hXhJ@e%O$=_pm7_wx&OgI~6XGd|5I%w`XI%uJFG4@+E)%Jh#pG^`qKn zeLcJK=hahoYn;8G;uEg7c-vnkKS-6q6V7t(P;TRuW8~2!e#rO zrFU2>i9dRJr)WuNj_b$U@sHlVuRD6ant$H)@}MZ?r?G-7D^%{81x2wxw}1>b*KKt1 z`j@O4ls9eS-m8K$XQ%F)Jn5y+BfH%0AA3QkLPYDEWo8{+^d(EtJ$Uh~IdQ6c=ESW0 zso$CB&!>jj;A^T`#m*CIwjBWTh*jft1m7B89eBq+0UO7_ENQ61rTrzLe9 zSK|3HtH1ttgmP+K|HMyI#q6(}c1D->I!#^YXBr=^ek3!C<@uGY_W!M7e0wf#vz_;Gkq3B-uv3-O#7SS4 z6fZI1KWFHEN~otSk~#eP)QYRQoNT-Gk1(vSthkcS_wI}K0uRrLlLVYjR34VmI6E=O z<(ZnCmg>{B`$7|bg+1JGQ02`v=}`L@vs?SW_^t}8ogAnj#~v|oleb0Sl5p3QCF;*SZYC7p+0B$3>-FIACMi9=(;qjzR^lm|-Jfpr z{K3RHInDefpb&Y|bjdO(?Sse4H_JpOZVYU3yy>~pD$jt^-N@%qU31{q?t>aNSq7_S zeL1^|DR*&JlGoBxh9wUV>;~Nevh8hu`WEo0o?^>{c>zmQY%}|(yxTT$lf*r})eqim z;?du!*E0FGjm=w2>HZ4w2YmZ$VlKZ{ddgG0WKPO~*oT=FDt3*a5SqZ<;=5!^i`Tzo z=hX-18f@XR36VRSA^Kg)=g@Yx#Tz`YE9rQx4|iP>Vr^qyd9?`*T5cM&C0 zU4HJ+p18@AbLzFn_pW(ZUP_gWD~V)q-@fz3dqZjd>gUl)PuJWN*HoXO{B-Wa%nA!T zM&_;4JR&P*d3ctCh9)ibBb=AEoH65+6l)8U({fF_kx+SCOU`Udm;GzsN71{)76x2a zIiePRbHB{aoCD6Ee$<8E{&w6r3OubP;N;;CO4bp|sZ)eBXWvpzUEpo#X1V?l$MdBX z2UG1*u3Nr%AK1{o=X2ri`)lGPHP^qB(0r^j(FnA+z==cg`S!~-x<*^P3_i$jKY8Mg z#^?F-4YqXcE_M6pyf!dqdYrzRYWS*q9Z~%&Z)n`UN)=?{pE98X4Zs<(G6O8@tKY2BY|)$ca`{_DO^6BJUg z=zb`lZFhC|ZjYBwV_M9ocv$i;%4VGR<;3x35zUu=;O->k{VMzZXRP^D!ggC zmFB{r`&zOWXD(U4#cie4T1NwwaO;Yr>#Ck*+TWdA&L>-SJ9HcGrsJ-lyvL!~@})&d z_2o%T<)xb~gZ91K!*YK2ndSv9ry{+U>{)x=?Uc-&3%N^59CN;MznxfQ1@TD$VwZ0|Vyk2@Cz z8!l+~n0eJO=$4%csM4vQsyFe{pMT#xb_TkA3v++6=Vi;AT)zujy?kzK)vnJKl)fx= zH1p(Et^GSfzwtdTe*0e1?q}!gTJHb3 zmh|}UDGw`_Ixo30Pb(;D*-Egb;;B{JKW$s>H?e59@_o;fC2KG7OD(=J<(`h8|60N0 zDr<@boIkbv{(F@F49_f7NAG+OKVCoo%N z*5%nt?p%q|G)P>l(0*>BJWt4J^V=9fJ6Ab1dAY~ShcO)w^}G#^2x-cHpVRugHtpfH zI2q0L{O1n5O_Z{cSbc2stjQCLyq0^s?2z$Z^5%zu$3jqf9KSYu#+y@8n#&`Vmew_M zP8^E1FJ&~Rmv&7_)(o1Y zH}TUGzf*>?N>3B6S8gcRK9D?bb3y$2zA2XrY75eqd;HwwyX497r_1(VRSen&HsI6u zjl7fYzLe1Xd0k&lvsA6HT{Y<0(yJ#NUnLa=JP}&%e&}=Cy)4j}FT5=9b34^~*WF7z zdx^<$t*$Ax=U*zP3dU`9In|iA`QwcAy7#?P9Mc6feT_D4KRF|&u6bDgE16g%VKP@~sShZl zov1wU=j(AZpIdIH=B(XR6wA3k_@<2JQrW7>DOb!qH(z>ng!7eAqQ@1km-hvCetL_N zL6>+h`J&M@`*x<%Qfb#y`;N(IN((-{meV<VrnjEStm1PuDQ~2!@Q8ZL0fgx$?J1rsSV(XE`O;8u6%Qwy%pc%9L7KBc~aB zszvdmO_1IKP>t0h;B>C>n}_AD*&Z*QCQd5pnDWjh$ZWg2SN-#(9hTw`RiCRCl+5f; zzmv9je!AVekMmk*|4ni33aj&E_bDdL< zdsyBT()_A>$-gb_cL?3@Owp#+>bEZzOYHJLSoCdnx+U0o~~R}#l`GF9%^ z?z6}C+kXDIK2AzgpZnC&sg9Qm?zZUMky>>0uVH6}l`fP1Q`STIOSO|$#TmGJ)h)lS zsl4=Uv$A4~K+(EV-YLtwrWkLVt(=;+x`$`+mc_q4e)2%ep`verOH^z(x}D1SKJA-_ z<;9&sb?1&26zUx^n64@i^ZcRbcP5)hmfYpPpFCU^C#I<{IlcY#v8Ru^7QEb%R%4bo zZ^`k!7f)7bnR4l$k>S2Cn%A+eit(kJd&*XRxfgmtK`T^R1U{AjcswyEf9K>&HFv5R zVD{#f^iF9lD2{HvxbC&#wWYIP-V@RMEmOQCCrBxEOEmYP*jH0MUcQd$nW)!VaWB7T z(2J+(&xmpo}M{-XQru@H zYfrr7*f~Y};j3*@i({`VURcT^9CJ!D=v(1k*HfJ5rhX`l?7toxo;2aMlg;C}hPrvi zh3{9y+%dBfzyACD5z)O`LFWz~P5xZqnINafedegCqva0ekoNzp9vi0Ia_NbB)q3L7 z^oiGOI3j1KJjvPaa>`d$DRp)S&$(|0CxVjbbSu_VlNU}p?x|h8WJ+T1lt14kdY*Z# z%%1e=QdY}?B}OMT(^@|iRLuLk7RBK$?x&)UpE;(y?{lJk7H8at7)J5!p&!a(yBV$v z^@J;>s=A)Cd-J3)UwP4w!u;n}szFt|*BmdnE;`|^_yf=W8k;v$yX&jYAJE-rT<~_r zJyA{3Kj-`Awt6#tD!97i_o z4UF=AquZ(W+ULm)-;-?K@03x#)BWJ-HnxB3j&c-fI&V-7a*I%28qIvy^Je>;Iq!1i z<_JHFX;zrdRk3s3;nR8A3KeILC(rx2qdr9M-Itk-v;U+$m}R(g$DZx3Uaod}d~;g0 zkDWVkcCyh2j~b;XX9RZWe{u9UneCA!!Bx9@&6{OsZs{l|C!0^4*)0+62v- z;&F3DuF&%3A>IEtk2YmJdXxVCbBAEw29)N6P0&4)Weneco;y1E9=AfZ?m=(4(}tJU zaxB(y->1GSq@-g?@3VlLa+;MVHuXk7Ih58nIW3fXxl}1&dUE5n4ZP5Yue$f zwYqIpI_~xBD=Q9Ei{;7NGMoSKJ%06{aY3bnp5EK76N|+3_|6dF4H)h&+_3(sSCLC6i&&Yqc^^x7>A4A5~rw_q-<2a9u{H)8JmJzqyPW6PnY&ob= zyFP!S^d;$|bEaq=G+%b%pq;_;|NGlmzU@D^&GFj~c*o|0M`f}DwD+5&aO#+koEuNj+!$(F;X*D`yAd@yZ7rX56e8Ub@L`P*Sju% zD4DAgH&?cyK`GrObWg{UUy2_2Wi974obxwzPLT#T!GC6J7H)cMlK+~o{@?4j6NBs| zHMeU`{IuhsO6}_WX|GJaCZ!eaJY}7A^FaFE;Q2dN&%g6N3pL5zyb-xWaREd5@3RN@ z*FJkVGm!hii=7hsJN3iaUVw(d6s8xYeverqq&a&^z)9uQiscJj7jD|l@!Wlns7+AV zwsx<5i;b>qx_7BfBSlE zw$jt7kC#7Qx1z*ms$8#ldT;A{F7uXY`TsDR~nnYz+(p*9)J* zH}OuHtE8IVJ7u=))RXrtqbrt70d1zezDsPU)n3O7{<@_f=4>f&_%E*f>uz3p`FBzD zQtdUk(Qa=>M_fNO!Hn>pDDJNwszWvA9LsOH}9!zR@xx=DhnPtGYPac&=e@O07 z4(dK0ygVV}T}6fN$0J8d*DLON#Jb{jo6^=ofi1dy1~XD-duWzdHmHDFEuyy_GW({; z*75gGkxog;FA8Bwz2^2b`?_PZ=f9ZyO4G7mwR~Br%C}DVx$W;G2KU*2ro2C$gVHbP zpK_h$+2gSPOm|*eOaHBT_UL6Gw?ehvLG4o$-wO2CmoiE5^{|ukH z?^?TXlKUxv>0Ul%YaKRZTQ=P}_279Nk9fan#kp+NU%z#Z)$S`UX#TJBRL)B^pzO2N z=2yNGKYdytxkJ~f{lCi5gPFHncIbR?OStIKGHp-OjaAQekMEni;Q7Q&zE0oN{xNv$ z1~2Q}x{K}9x`~taoBls;Vs|sztqruF*-JiC`skxAR*IGjk0c)Xar68i_YW04{AYLG zK*?b-r`})Vp3^FQ{K;d#{WUfQRc3OZ=do9>cdfXW+-f9~+G85D%T)2!;f{>&VyO*Y zJG|HWE?E*#`S79q;mJRaPmzBb-uHR;HKi*{xhBVI8C={d^Ek%);rlQi|Lp7(L#Oy~i|KmB zO>bOPuGlPpv+Rm=YRX5CosqB<`Fd0LrpF5AulG)wCNJId$gnx^*2;Xr`&UgnR|l;= z%JQ|UJzV`v-Lr@8GIBeQp^Q)*QhqwMadScL0i8Qlkq?Y4aJfCA2tKX~s`2OPOsZhpn_A`f$CRf+#y~v&TX_*1DoR7zm z&ASSCW=nEhXN{BCT%@A5zFss~t6gzt;)Wvq)N5{>ma~7>#v5%igLHVzH@ungWJ+S* zpI;NrJ~x;*dnU0dtIJ(C?`G%KJ=Fh8EphfT$B1cBi@W?Z0{03``u^o_`Tf7_?-oCS z_hC<}PUE~E&id@(F2l+lN9)D@J&kVo|Km)%L6&4&^_pWD+k;p>zr44+d&)V}xlF39 zr??&49Wn*q1+A~inacSt@9U}K1&gv-nPR*RPvy$G?OK1xTTc7Ii>)I5mHJ1T_kAvS zJ>%vMtqrfUS6lDZ3hJBRDeY`rn4e=b&!@XB_#6w*{I}fekG|uG`nqe=Y@>~N99wj! zdF*WU_gf0;LOjV&xT%}TJJlv2E$W?Tn9|Zfn}z0F$G_+vQjFca!TY*K&C=|Ety!-^ zK3`rPqUfpmt@&`8-Cuv}-T$WFKpF9=ShA-iM^2A_PUmW-v`4=TD|g)Of4^)_JL5g? z4~w2_RqULeuqRveP|RzAm-m`9zNe*bpKF;jw`Yn?%}qBiuBp#=2D^IIy=d)w z@ZMIYeR)RZuZNic^JP+cL+3LZ0^ZSpp2Yr*d3S8xTr(ADOc{txN^M`+sjtq}t zg`K&8^7G2W^{vKE-SL5aHQ7-z)~;T4`l{fjeErP6#!E$Ob_Xvp@$|_T>VMhmwcyU; z+@QZJ)`r)vSQ&gZGfO6IS*Rt8>Qt)^#h?Cn6VubnC+61MEJlpJxS#Sq_Uz%MjmCwQ z33}`JW^~T}lm0O7zGcO!bi=kP(L-lzZJA=Vrzqclc&fJbkKL(V-z+58$%vY{>)&?p zocPHmU0O4?a!F2B|CGtGs}0X>m05h}+GF1Dp%v$fB}3x6KiI$jc`D?+_22ZzzZz;% z&DXsJ#iwRaoRo?1b-z=`WG715OfeAkU+U^~ZdONl+Rww;8`;&?)%r>cvg>y`hbkV`f3yBHNyP_@A*Yux*~Z*WwD7`#SHgnsM4^N{7tPeiagZDLdr#=l9$q|c77(;#55t!CEl-_`Urlvb`DWTyms1Yg zjdtu_fB3Xq>x4bi9;^)f{Bgy3nWs?=(SJS{`a0}0Qr-9Z^{UnPK;6>P4<>hnmL0b> z)O@kL@95@P20SyxSe{qjlZZB9GMuVEL;0zi_v?)>Lu)_6%q^K7G0_2$K& z!ftwIitxXjb#(46w};xkYhS(nA{APjH8smKt95~&-q!Nq={z-BX~&GsZ*Dto90wj} z5O6y2{;2cQtBjR9?$(>heT`*cf1g@$vsl#T&h_M;Y|Uf4rzB7ER&|=Q8eI3c809Q| zH)Y`_ZxQAC#h3k)o=-IDa`);_bJ_LTBeK;nFSX!XMDxOV+8@rWX!TmKC%uF*@9XT= z*T-kD>&I5LeOzzuddj=$Q^C`gmpkf;)bjYRKiW4#<&SwGSI94cJ+tiD{%OYuhW-<} zG@D)1eb4gz@M0IEYRZm$>T+9*BEW9LM6uR2!F z|NQBFHbGA5BHv%nS|V@q^$>gJ)h5HOUJ;Xn6wi2Q3Lcu&CEK?8`i=kPpO}7DArHy_ zynF1~!>$81cWjn1@c%e_+}O_B;7YctTg95NzCWKBwXOw7zKUt(m@eh=X}4DFYr%J3 z6F>dAW*AVG_Rr$uLytfAF1oo?et3MZl%s5I%lc~0xX%&1pf=v;dHI}EDtFwo=MQK7 z@Z0Be!AZ$u`|pWq>dVjXUakJ*L7S)K4rQNa_GK!MR$kGtu~+6;Jgq`$&zI08X1r$a zmxL%Sova!Z#U?t(?K-<(7ihfAYQx`O1+yG7H$14Jymm<-KH0_=mewY}x{s*uOt>6 zdBL}@2bNcbE|HnO{El~J+K z2Z8s0N<7#r(Y$xs<4}G(mvr8myVsOYY~`68t0nj@Cbw@&-tw*~+ZOixsoiz#q``Hm zmYwr@rp)`LR><>TE!I8R z`{>M9rcOCE3s32nt$fw`!u8VRjoj?_rbb$P;6h36$)5^BAL!gMN;7-+d3N`4cm0OF z-;;PgM)f_EbNx^dzgp%uU)f5B9p0vk?nntdz1G2DzVG+CZNZ=m8=_Zk>Mq*xJj-M8w8!>~#UJ?XzqzCAj8BZ%hu@Eugywfo5&v8- zCq83&%c<9DX%FWIW>#pKO6i}IVZZ-Wu0x}iwX^iR5&SEg&t&;QfL(BAVu>Pvv>l{q4A?A%DfxGd}y3YI4@p9WC;o z`=VD$N$)+8SP{{<*ZD@y!-txmTcVq^+hWsh%bl+PH)xzV6zi{uCZ}t}_6CV7v=}p-vo%wddb=Ox`we(*5o;{~t%B%~rneS{ZX)=lvD4lljZ9d#;{* zx^>DAC-(Id_M{&zJn3)$Nb=JQ*>jEGAXV@+lyLugheKa&u6>auz_!)(V3$*Z)eY`ukh(Bd0e>D^`P?8 zl<8VMrMky8wkPd5$h`Ep7e}1;$0gsDY)q=`-hG(g{F;etN<;4ND$C%#wn1@5d1~wC z&uOhr3i_Cm#nbl0=fDZe#SeF1S!)}z>UEpa-kYACQ%*f-(tUQ2^{(3~zs5^zPD3*N zb06l^X!f`6`+m+3?W;7d?XC&9uTsB0bHc4lSxbL*E?xCuMk;fhO!klX{R`v1->ybC{|i&cz0)6NJ(v2i zYkE>swyIO?YQcA5={H?7ZQq?`UK)Dc!|h+(pX5}#S9g~@DDU(uS=ll_TQla)wMVS| zP95{SKVDhkT5%=a?%zvuar6F}y{nl%pRbryUS3tb6aC$Fw#8LDrLcq+ef!Tzk27tZB3Z{Ga-(a~}n ztk?1Lam9_3hmR(wKe}`vCPvgi*u4Mb@#cM>Kdd<~wC6!6OL_lSiN|5fT26Vc3q4i% zP~f$mS9tN3CmJF1_^o(OKC}<7J7aJ6_0)RbO>Y)`DbhYx@cnARmzcig?z)He*FJlE z?_zP`?Eg8b;!j1BKku$wJ7?!U0nPPu3}m;rNEQ5_l43JahB?q)QvaL;_w~wq95F9@ zIxbD0dUwj76Xy1L$C*=?Kfd>te_<>$qi6_gqN=qo#UKt`}>Hu-2Yt%w;BIi35(!4qRF49$WFb^ ze&*2rDVg`XA6R6u#(j?A_5Yrfdg7GDbuOQhr4`|C1IezEFF-^o~P??kATIx2_9@+n%X;Qr%ox;8(rm z3IDuY*%HnvBA_9Hg1anUvpr6-KS{}-G;y=5+qtmM*QLCd+*zJIsVqZ!Nxy07r?xFw zm9<$*O>CF?aQH>!{{OQi@_+Sn z@oKBk`pPwJyMJ5#h;mZBKk;~Z;3wrHH5%OYt6L1arqm02FDO|Z{%*mO!@WQHf39!U zxV%SO;7Jf${dJ)oyVo8)E$1q*ciO|k_pLk53u&zXKEHJ}Q`*B%4xeL}Zd>1bf3d#H zDevaAN2@q57aU%~b4PI5LD1xmjUijnG0@%-en#zBfzW?KK~ij=e;=5#TXX8md(x^B z6*KN+ENnTo&i(r?J8*>-ZB^$h;P*;IOEo2T$`l97+TD|z?lhcz; zLg%cdTl9AN%$m9*u4{JGlLwO958YGDd3O2#9`|j#@1R7zZRHN5f@wwi5BJu6{&3?( zYr%(S3yWCWs@DWLsm|xJJ-9T8GubAb3x?+pBR~nZ~N}Q=bm_}X8P){ zcGo3$XlY1qZ_D`TQN!eNIHhOKP_yP8GT{+cg%RyA|3 zT98(}@fqeDn{NFG%y*wr9>nML&COlHN67xw-^{ADA@gJO&iY2^`t-&=GEl49_iE~g zKa9*ypIUw=e`=9V*;=zPH~mjAtZ=iOttUIXKbwhr%H1jdzszoKcRzpl{~mECP~}|# zYQe8HlAZN_8BgK5Joz(8`zBwKI-Bw6d;Hldb=CO?&M`ktxvteyuG_vp+Ov8=&B0{W zl=Z3=r>Ys{WNgK^|9bv-Rl}amQW`t=32IvJR!L~vwD{A!6(V2!yN`75eEeYV4dH{? zap6v>PG^ff@??6ph`DD(slK?avv3k!rWzP6TV)NeO&x>_0_E1-8t5e z=Y#fr{d^@ad*h#!B52T*|8DKxeJ%caa}k67%fcEWe#C z4{4jar|HJ4M2{Sqo|46DT)g&8HoClP_NLQ^H9>9kwb@I~Z1MXPcEW4HnT)5+MJdw~ zC-q78d}6HK{AcsN$bSyE6~dQ?dHj4;n&fgOsrtF+PUe=4ZRx*zePt`A_y6jA-MpN4 z_nB>m|6amN_1v0W#`|YaYCjeIhkHuE&l4|xg4&pDn%{%hwYA^2`mu9b!W?hQrl0Fh zee1m6+fkAo#I|FG^V63~sk(>eds`EFTb6)zXdes!odo}@V zJEk4-=A5$H;7YNjjGOK;VY|;CKfJK~u{@qJ@7w&=)y$u!RBPng|Emv+@0~KecXp$+ zdisNTGem4A+OQ@aOW9*$EU@nLUcO4s-sgl4_lj zJ(mP)H*ayjuJV6D_7wXI*G`^&X?khW6eGpTS6Wm3pE$8EPdL2!@1ErOJFX}Q|JUX7fzJ9aO8ap=>)+Sii@zN(z9yr! zo?}jHHq)oV&k}N4&llZ)!7A}0ci;R^rsew<7wOjAc21otbfIEFPf@<%{m_*>mp95W zKNsBW+_AZL@-{11>woEMcd_mL9Dlt2|K$)u!#|#(0-cv^SM(CWTIW=i}p8uObGVUT}Hh2foX(oQf@TmRtQ}SL^S?NDd;Q7?U+3L%SnQevM)=NrW`{f-zKR^EW-tWhKXPf8WJ8|sT zGec?V+3sg#AJ_AFdOb>Px_$72vL4q*iH(Ib8O`>lZ(!Bz^16I|#=brUjwS_;(+u|$ zQu6f{`5el&Xxd-KoisoFkkI~Z`35Ghq+VW=Z8#WKnDsZYg~9nz23JTqBbpKe~a`9bLPfFB#K z=lr-;spqlF{c!)Wu2bvg1}*FlR^xd!gZuD|6-RPU9D94uyu)g7&uUeb*N?&`t>1QM zbIh6j-)H~l+4>|UcG9K5H=ZX~Y4-NNztFeSU_EG~SqO)L=;{w2eb*N43tIfVZrEu_) z$F`Gx$O%8%VYYbDTl;tG|2+EnJIFFqZqk$^hZj8)+o=BQe2ZGM(}J513@Q>|gl!}sSpFRTrg+F_My7}y!S z|LCgyS&ZpY?~E2HfAcpHpY%*(wQj!F&n#}c(?|bQ@Bex}FxW55-_ty)Dn{am#PdS} z?uFgu^29a~N8K%lg06zLeINS_Z2p!@%>QjXd1}t9@|nyUUyUwE z1cY>%Z(kNSB{=VeZ{%;bZP$Da9R*ktCGV_UvgTsY+yvRFWJTvd?;4GYT`bNaR>46vTY(Jd#Xu+IvsoB4e{1yU* zH-mV6PP9bc+jq9iQoJ)*^ZPnm^7lM;T;!Lw<%@5_dG+Imem{PG(EIT74P9Qr_fNI& zDp28QQs`jwx_XZNxa(t?u*0=|6>y?rpY z`NsX)P5R#q=VZR|mt>RwI)^uYiwv}D?xJxdp?iGCMp_U!(COVj;g%S*aL{JoAJ=h=Qve51Yj$&-$Kkr&n{ zt9>c+YSx=O>EZfwoNL%sujk5bG2l8?Ue$icyEg6M<#mo9D(>DR8WQP{y*<)6d8-bIya*h>jy#G_}!0qJ4 z5vEIDrXAnX0g4iiM+XnCJ6!R%jI$-p`B3BKB?l%%*sdrFJFw%)(GTCx#AN8jA1HHq zFuVKB>)$M04_IF8J9x~|%J|_?yUh4Z&tL7w{kz=ZhQFQ+ItH>)YqmR+??al_d{luy!dzK zNmJZ@v29*^|2*%v_UrDN4<2_;eqeo6qhQ7(zWuDbot}5dJ&?LB*tYa9pYW$!jpZM| zFSvGf!W8cw^W~?H^go&~cNVym-N3emJO9qM*xn!MYK|}4^W7FMIKp}FGz-T8MoVqk zBmX9M-<&YVYipnVLanD|E4_Avb}6m9vAm)C^SOzBU(Y;ot6K6Q_L%O3I(xNA|I=JF zzR#;}`11eG6Wv*NzQ;{jHerd1oY*qCDL-EGtDR}?Q>=V2d#_B|)V0k2|AZPSEu7Qo zH8WnT#v)P9=CRzVyaJCPAr?o0BZnJf+XH33&STW)o6WnQJ@xRFrmGXSWvRR9-{MK0 zB<8rg!DpK=)AoAvQvTJysvm8Qp2N~BI@R}1)54jreJYNsvfMN8^1Ab@H?*ccl=re{ z`#;&u2`iHIR?l+*4Y|y#b@_NqW$EOVvo5J<`X1ubHV`bf%$z&v(=oZprmCrWi(fr2 zT6Iq>f0do9Wv0-c#dExFnEi6>yZPYR490V^!3R!i3f8?B;l5wq*?8@)@sVY@GV?hmm~YMbwcRsFPq<#!k4b#{znS-0K!x@+ zHgzs9;jJo5e^jbz_)gk%NJDe_>4aZe>@zlUsV-%H9lGY?=k$=Jf8<;Zw;$TxaQ^eT zhe>-jS^hsMIZ5!7O6Kyy!l1+>Ihmgm|Lr&$U9s-4!R_TNjt8_({l4EX8nL7%wI12FdmB}6}ja~n8P1L9Pkvk1m=h(j3Ce!f9_jlsEL%s%zOPS^< zcRi^7Z}KDMQB6hWkDQ9E1diR`ZqL|Oznk@7a*mY=-{qN{>vy#rXy1G2;cGcTg|}k7 z_GL5q>&yDmZ}-Q}F}mR(E|RUGRVcMpL!eiy5 zDN~=_eo`pCXLmB+m((UBQ7bFeL-}))9=7X!KCmrXrRG|)*`CYVEdS24Zhyw^n7rK~ z0iUutRvHIp{`#Y&+->>6 zIdEr4!lI&EMr#&LNxb^hwKvXUfzHEg8eBVS-plCSG7f&F?*GuOO2uoJPlUq6UcSfn zZtZDsyQ~iBW)*dVRK7So5SwE~<_KEvdoY0ke`trp{`W$v9;h zFunM?>C-!=rIzKPnzR4$ zUGM9CpK{p~zkl3Z@XARw`S!%%343a!dpx5!_WK=wd!PHp_03-y_|C3Y)ZFOwUUGYa z*$md-@{3j+>GFEh{iF8!&kxblD_-2Nl-yPBmAq-w`d~4hf>Ujdvc*{*r=_=BUOyC( z8F_c}rCA2E&%F()U|uupiiL{%8+Xl9-ZB;@OOp9^l%GkPy!&_A85Z&7B`+RM;hJlu zy4maM{9QT>`(E2*T-6oY_rj3fu7I!kde!-+=b(n#0rqS4oAf+_t~uVH`Jp9Rz~r4Z z^E^od(SP|JZ1#%To<0%CL&(5n;*5ofOT*3Emm(<4Pk!M$K*kU_Jf#VV5;d6UUw-Z_u6b8a1&8zlWhIm>px``X9mt4{wodP>Od^7e-LkLT)! z`kb1;bCB!QM(#KDGNQS^-*!0cF2D11?Y!EA=-sbDQ5dJ3_uj0rdrv~eqW?N(tY3C2 zKK$@(#?A{~6B%k3btP`AV_v<>qUzft-s6`y-E~j!I+*oBW*Yz6shuCLNlb!ds11hG zr|f4HF_)KP3G3 zXem?IDfgJ>1rxIcZhz}#j=J|om+$h=GnITb*Oi5K#xb|8t zZJr&h##17+THDn#l0n%@RFeIu#CG#?t+f5?@9qwA5vhL`bYYT#_+-}}!8gyf5_?|7 zFewXuv;1SpedBRsQ<1{t$&xum<>t#%3f@fN*k9h4Tom-eia)BnyJh_@_XEdoG;dPp zIweqXFjdXwtrSmhK+v^99vcmhpnEKfR~+d&mDarMfcD|5AO2bB|F~3ab7Q6Zf$x{u z4(1!*UGP{Yy`b+UPpz=^feBykCx)EUe-QXVxnf!kKi6Cylc$f)>hfJac#zBEEawJ` z1otV^%}iCa?2zgJ14k zoF%(GIP}=s(5au;LJg-c)p_(>lWRw&-OfKPCnJNdcdneYe*^o|85$?Uot2{YTNk*U z7N0v;K1o!yO+~d(-_bF0>(<*X(FQh_3N5A=+%0b!n(!Y}({H)i#=GWI(*2Xg1y5gX zmF`=vx%wZA#c;XMC+CaeDLmIKjy4?kEuZ}UU$=NuU~Wm8rC z{>L%wFYjbue(vOhJDO{~Lii5qo(r8MbTsyC=C!2%r=-;zyEk3hq?(%RXvy@uU=~a2 z^B{@TUy_mQns~o{kb_jmaK*v;XxTF3Fk0d|=sclMOFzW#x*wlP)g~ zoM4+gW$OAbe2v?yTMzx8bNJzDx#Am7UYf-wFQ}bvQSfRGi*0s?*TzLc+pVQtmlhu2 z^V^)}Ty}jj!phMM`L-_xu)>yvnf+2`~GG*9K7ye&ICa__D2nK+IL@5@~q6> z;Qn;--{uD^8I5l^%uT<${7|>^-v_31{@LCW-uFe0U1)#e1-%vWB{S{{R~;#7``7v3 zAn;}22Vv0YL@#50o#l)!^S#Snot$+=V2U}1=cLIjjsoAO&suaTCQQ#XEJ#m0p(`*T zORR7~oW|Zo*NUHSYzkWXxJ=9Y=hIV4cE`=<_kTDyMQcycPsL9xncF)#C(S>8+$-n! z(Hpf!IqTj^J1gz0TE~3KbLWR0y?35nY~OWN8r0CdKBFq&QPcXD4-6_&Q&?)uDjBoa z^*<6^tzKANe)iSLS&o^RH_8M|c4}vNobrH{t`m07TyiA)_dMbBnN#)@t^M{@c6(F! z8w-}tV)<Ah(i8};T} zo^K1&(As_UKz{7eu2XVzFE8+4?(^dL6kg`J8`zceN{{X9aXa|DsOv$^7`uZGIDC8^|~vCzo%N|b#Lm4U#0P|xc2kUopv|pynhmsx8Qh9 zW_w}rTUocZTlKa{Rja?VX+`b3ktpH!q3%S`B^wpZ&i`E5P4UUu=6OH!j0{-f-}DQM$sQ2yNI$5wBd)i$|zYxQdGDa+g|pU1lX zJ6Dr*rwxe}yHvcA6``_c4G^L!KD_vx&e)4*+WY?v8%PjsF)GGXuyToqg{;lEO z#<>XzpY9vjJT8}*{Fl4ud^WosGzndGdg4+t2xeN1B&B+Za)Pn`sqW-hvrh*9jQf*S#~}dVXqf&xZT@LI?5} z9yqr%in-o*@$+?AC3jML8+Wg`Sp57d+snw(onMyhnq$4l$m9FUFPCz)Y`2H4oE)a% z{nIIxbNUjEC(e6|E#&Xqvo)OfJN-~hpS*4J|D=ZPcdhjf=fr1Re|K2@?B4~hEh?&o z+Y`Pr*R7d#tM{_iZ(&6-=)B1U2FTV5W`PKemUST}PX=llMCvH!J? z_s5p5E$3}HW)ZU7-(b%Rqsd?WYSxEK)Z8lOt9dQM`OWrOp6-6$2!Ef6fhTwm*Pbz`>rzaaA7phjq?7s{OU8U&(3XrxOd*d4^iu9eptk9H!s4`l6l^S0LRV= zOZHSteV@;Gmd(HMy4$J;e>vkm%zV!B!_QJ`$v@|XZ+jX)M0aRgoO{W6chPRg_pE*w z^cOPkSpJ9e@TL0Zi;?>e{J2wQVEEttgU&C;8n0Uoi_S1!sglg#edKGrd*-?WjMhdo zwuw|nUSnYYXwXw%w)@H-bB;%Gfu%NK^3!kJYS?OS;JYQ=$V23V+q&?R6^rgA-m*G- zF7b^`+LN^BDxc5aKmIwC;V|Pe-O_~T*EPFS9)#;Pgq@GSI_2ZkS4RKl?CP;!sP~v} zWyvL5uel}Nn|wA!t(>eEG{uukbm^rKS55J^(MMQ+ihbgGZ&SCWThQD!M7j z3g&(P`5<%BcJ{v9pGm*J>CU=wW5e3J)5IrDIa1%sd+Olxo&E|Yuk5+wYVHt;+nG^5zCF2wxsjQ0&#t=qLH$-4s@5>$Jlk`gR&zS~Du6EV;-byl7EQzQ{bC^%UOZPB%1%f=Y8-$w%6jz@)@39BC9nb z*h|ke{gX9b*dJ_VVZGGpx!=hT{?A>0@E%Q>&Z_WQtIKmvS08h`-8)O^d+$Zr^1tyl zPLEAH___8&Ay1Rqx}>REd8^Iq`*c|+O)2N+yINWGprj)2gh)l|5~+Jques$bDh@55 ztbXXa-QxvQt5gd9IY*X0U2lB%!Tb+#7gRS%f0@;P=u^JLoKNgMXEOL77uT^>9`t_@ z`-fTM^sNRr{d)%fkvjKQJl-((rM8Sq*dzBpdo7RI@0a~>KjI~WF~=i416g~eXU7+E z$ZdW!K|^wKkWa`x4b8v+qccy%693*&(3mc9bgL(yUU|Y5EB&hpZoaQ9*z)UauC=Z? zR+#mxI@cv^OJl>*+=N$2>>nLH+dQ9x1|)m+BsK^ZIXIx9qL-j-$Il zGeLP57abLTmUkh^Y0{(}!3Ealw;#O~JHn!>_o$%odX9(19&5c>zK@SRmlv-CjZ4g` zJ^tX+)Z2D*R;ez{Ea)>5ytnM2C3raF!q0Ng%AeCFU7F$@zHZaQO7C*nHp{2d3-0d; zny_MW#Qam@ZD-rmnw@U`|DJJQp@OIS?aqe|b7x*SlB+g(szvLsqjts*MW;vl9H_mZ z&0|+Qk6E|MrD;jENzM6fO~()2kA1YT__<5LyE#0dxu*TWRy(XyrCd|xX8-6Fonp>) zNUG=)pUTq{Rx30$T^%d6Ju@dQwUW5&I_H}0qRE~CX@?i|&AhNa*=mQyQm69eDKBnl zHu4_%x$$((gWYbPw)w=o-yOUafRrAj;>Ae4vWiIsA@@? zvIOKFnf*W7@NfJR2FE*g=3FPG4Y)KnE($uf?b2`?E?JUw>Q{Sawz=K= z2v^JA&QsE>C5{#cNwZn&Uv*uZ{O%gdoraG!nTINJ9$jBJ$7Pv*HuGhzTMhdUGHyxb zo4$1^U;34!eC|_PH^rWEx*6r#81QcP`PAy?p2>SYEp41vS!OqR^BXsxbDLhP`fvYT z?9}CAW)^pgiT!a;XU5-mKO*mBCo4zqdm(q>Rpgv|Z^bS>;@oMWaNG#gt_+^Bz{Ga_ z-ere{|E3>Wt*rb&d%eZB)a(m2vOc;IyqenO2fFUMKYTH>`&s)L-R4O``DHgs-Wx1l zBI7*?+})EiGoL!;_Isb8qyixeKbGSsA582v+xX2O_7L|CJ}#ME$N$;C3B0K;AXj+Q z+^zXWfxwjP-VO0fvlUDVd0WzdvmE@t^GwV3s@4PltJ)5SpA*dC+Ht{Fs_vDU{J$4c z+DkU(+nT zZ(Xur&l*lY#q}Ta!~Wm?QGWE_&7I_G+F*3IOT6PD}|XE`kV zw|QaUe}#-QOP-cgq+Kw{cxJ~MC$*~ey1UkczlHNY{Cx89LX@S3GMKS16lU@aevR)?@w|6K=~rVYP2IKXvMoyu;FBhF(XuTSbk$Wh;aje`FW$JZ#q< zUoI>b_Sj$Gf9I~gy|a_wd@q-Mx`cD`0++%}y`3FZ9#=mGeBPrH);s&d`lj^bGdg~5 z44*yg`L?WA|KwKvpU3luchl>CY>`Xn$Cdd7KP!ldeYC+p^u>nI$OjvOCO!{%HCua0 zRqE&BJ)4$9RW3_;v!vwqKDm`;vd7NkUrkGKIlaE!C--mO_l>&oB_%okc)ra&vdVL3 zOoffzy^n@dCNqecX&eW&f2~_Rz24a0OqPnav9q?|+4rq0`TWltPh17IW*CROvEX6% zo0tA~`MVOv$l#!|v`I#t(AE#bR@GE97Lm1$pWe1-d7Qev``zPf`7!Dbp1eQX?zhSG z$(c)~7qasNh278Z2#^2nyFpgQbpP^wju%dpve{f#7lCcOQ57oyYy){kp;nE4`UYUeDpNwO-!jy}Ts(yw{Wl3rQPkHpxPBqZt!}ecgqV z>Q7iFb|mZZ>}z~g&)=$f%Hxk5o5cS4`}`s=EDvV;@@@*>xw%0LvzMn7yqd#MU)t9k zzw1o9S?uD2>u$&V*!5fH#}apmJ-3Zn;@*n#oZrpjG}+Gh0q1pw?sZfCn0o}>QxEv` zowsHAFaLJX$j|A+As^mF=>PDslZ(=HYdBLcux0i|@qb*Ujpqc^p{iXLk%e#}Z z2^GKM4YXdDOH98kr}pG8kMQT)je7*x-~Hj3%zgWw$3($z>HnPqP3MJm{rLO%{2%3t z>3>+H{^|>Ccwx>F^@*M3KC7eX{`mQU7yrHba@0PYP3PCkKUZAs=gi!+;VfsaWqnBW zIeEprrbhcm=@0morI_0{oL7`$E)QA#yf5?XpTf0`)+fGSxb9kZ;^Q2Qhv+JJT5zVzMKY9MZ{O{V&&;OA85gf%_AGBJ$FZ=5u!?liO zF3AFY8D9=19y#A}O(8_qJ9LJ8eW{Xx2~S*$Z2y}XA{RfmAFU6zQ2JNDsrg@3yKSA- zO*7xl!&Rk)vr|tovCmbyuXtPixZ*YIXtT@O!5_Z*Oy`@v{Koe$9$S7FpV>3*PsfM% zcJE(*zAD|6{5f4`+x;hRK~3@94}2S69%INC64=xDBjr-f4`U1VW6O2gc5<5=I#xcq zqx$*qlWoO|m*^;XdV;20#18qYKHX+LeTr%G<^6$HFSpAugr4L2VXM)-RzFV8u-*4x zo=t+-WH*ieGyB!2=tYEPu3B-VZmRqju6FR@q$83S z<;#9azP)Mn%V_59eUd!a`y?+cPiEU;vD7(#dC7~bn!IzYmpYbDnK(CiVexYjGmhoX z(^Y<~_GbEXPjy~y{Qr%wYYJYN@vGcj{J`35W3}1jP5Ixs8pEs4w>*z+dXV`>@SWA( zZ;w+_CoI`>eg~`LQP zFU0OLR~;*1oz6PnzkK$xZ$7NFHqJnx z$uZlYxptm;2G5?j#lnG)-(;IH}y3aUi{b^wReN-;^*HpdH!(r zHtt_w_~H5uvHUlInQwwUBMguIo4oAg%^#Mzmi?DEp3nUH$MD;o*FWA$$?gwaEPO5F z>!G6FxUhv+Pl~Pj%E#90x9s|>6syPXwQC>0Pdom|*KWPr7quT*r!1Ox@z{T2^OanG zeTtIP%4IGZA>yYug}U--o@z4tEc%o0;l7=@Of{QiYxWwYB&#hy{makm;T$y;&)dEc z3F-D#d8g0cVUF5+^XlHKo5OT93{^BcqYoZYd2KJLlee>oGi82tU4})CL86?;m6I1r z%NQ$C^;%iIw;ec?+n#X0v$)``y^d7=3s2A6dqLA)hmux!2l;8ccvcF0li9!d?Y(D? zft}6YHeGwe6nd_xpi`%9Tkz$F#y^?VwC77n96Azs_LbM=Du(4D=7ro%Y3qz1F16eI zz;t>*#cfrdd+%lWlQzj zX4`CeKZ~Kh#J6StF117Uv6ByM^cE^fQ8JdaD)(#Cn;X0!Tm4Sa+(Ru&mzWE^Qk!!o z%u};k)>M34#I3(i^TOU_qmtJ%cw*;HTF@OVRPt&Hi>$S(Q~SBj59QBUek}I3+45e9 z-QHMoC&R6h+5Ar1CCmgk+8=ItC3v(d?@`&eXSUA|xZ9>5-o5wGgRiR=S{Of+yq=Kp zMv9|9`oooXw_8=7{#_n;Um?RN!OF(`hJ2jdy0-1dejH*Kws|Q0(*-mrRI^%wd+pW5 z4v);4S~Q&>{$?ouQFzSZhvf=+=^dYc>xBPMUc&!J^3@?N{r`N%LhqRV8~i$Oe>-Pg zuIT2q{C|G_pLLb{AJ9;RKWl^E&)9SJU-)J-P5)(U=Wj7i zJiB7*MeSc=tsxdif4{Eh37&qksdLxGDV8iNPqiqNt`z8au-_S47&V)_p znD{E_CX;XHgk={wk4DMv4_f@VJbUA;b#rz%6$$+o?F!!iS|GmV>VYc%Fb;#G7AIxx zm+QJqo|SdAT&edsJnIz8++86jLZ_Yz`miHly2Y8$>DxF#IBdGrnS?18ELmPMO;?s~ zdJuJ`kmsLvX#ITtFr}k48&-922Pw72Ojy*wAM%Wwao^9T{Yw7JzMK@asV!EC&zJi(t^TR_`N!Y#il3*KDtda} z;hDT3<@WBtfJdKi6kC}{8LVDaRaA1xX-4QazM|{z8%uxpA6|G_{K2EAx9v(^`S^Oi z6q&}qc8bN_*^tWKCI>WtJR@w!tk~`4|J^++|5|N$`Cxb7+{UBUe2#ZEtyS=kXR2p? zZV>qM(g({ADfLr49g}WLPIuV0nt8we6kQ9RHr{K6vsusYY&+1sPVqy1t<%G+b_+kW zc}wiMYt3`-wJe|fw^_XM-{&x&t#&&gey;do_H&OP>)b`Qyc6V|Bxks2&zpS=buZ+& z?aR7b%kDmUaD82&k3y2`SpfWzHNQ6$kg_ECnT9?RoR#&bg37fq>IT`sZboe`yw}*zx_1n?#Ff>>qTMWxqPSml<+6nqF4v+((*n`0am`C;$wRU2~SQ~&YThP39!PHDCO5-3*lzHPqn%Gxt`rz8pI zx^mtA7W!oS%kbU{=gs}EUAJz3{d)4*-IeJcu}@#d$X9M!vfak>QgYCyEuW8wyp!)w z$^6~vS#z6nrHs8{=(VVMN;PjMo~gG=Z2ZgqX-QaqU&p5EN{=Jq=XairHW6fbSO`z< zfk9pJAJrO6*Ohapoqbb3XBwYerl`RF9BrMOl@j0P*_@VoaKC$o%2KO*R*TkW&f2VA zNQ3Pwm)yykG-YbJuBM^d(~!!qT5s&?*e->=P58U+HfxGQ@tPGbfhSvn1fr*3iQ#`> zFvG1j{m|svbf?GrHa}RoZ}WoA*&6TX70%^6zw2Df^IvD0#DAS>`d>Vgb^SNKM)Run zL)Lqp9{!Dc_+fwC=9xSGY)V(Dc`d`LJ9qKHZR~k#kF7dgsqk8iId|951N^biH|Jir zFO6leFOOu{U((qcZ++aUT6uq|(ME<_<+J$rmvuG9Tb*q#o4e@YaleZnoS$nHybxlo zx$d#yy%^`(-RE1y?kYc6Emyo?XR$@i6B(}e-{!F9f8%PqUd4L&^xo!&uG163G&_UO z7VfhAXY-?Y;gs60zk42?@3r4=A#(iJbx#$|_x2X7djjj{u;}q!tIT@9lVOx$W%F2$ z;rtH&=4J1KAKp9|9I^E2XXif;jxLnCcKFlPhg=o4E&6*bFG=5%d&>L1=UdzNV-<(1 zllMOSTX^pSqtU*^kMA=4E6R_kRFr>7nXuw-qR*w86LHaO)_v>R?jFB>$8dMw+EsVT zQhvVkW#@Ui`uj6|jr-FUoQQe)-bi`>Z~uEMb1N6+*%;S7ve|sgYmagLmhV2<+KK!9 zb00sLd2QL+@MHY@f295Uu-$)}Gk@y7oQ_Qn0oh(H5qH?uUH$m`FHenX*qw(fN!>F@D)oBaOSjDP3! z_uS#Ai|bR__VnpSzCTA;ZOj$jCiL}8@M>$nag%@M)m>i?Nb2sF7P#>#`}@qbv-mkS z|1Bs;>E6!XR{yzbzsBzA?MH9!YX~X|Syg*kFfiUuS6@)-^yAs)haOsp*>3$^<~(WA ziq4hyg_B-ccXr3VvHkg}gX2fVrJ5g!SynvV<_=#To!wA!J@H2UE18&GLEj%1nR_44 z^4z(pZOIZZ@VsEfjXNPhVWC0)%snHGHMFk3v1SYGHrqH?x=*n(VYye+_hasxw;5|p z%gXz|&NSpXTT^7|L*X2)3IUVCqc5*Jeu$9|WO!7TdB?2x>NNQ;vv~i%ZjD~`{E)cq zQ7`X1X?HidtK2B-PrBMSDevNe((bgY{hQW(KCm#GXLVc7Wz{y{JOB1=_LzO{;)4s8 zTq$#v8{Zp=FNsw;u4{dMY}BbG9DFC@A0zt1^(!&D{g;2^ zGUh)EZ#vjlPbwN1*>Q7S zU*D{}oc}=Q=Jt0p9;frgSyfft|JJNtCic#9muAW1eW{DTNMEk!J}3SCXUmHF_mp3` z$$dP&Tlmobx^$nE-`fTM%yB=nUcR?G?|O{f{cqXlcg%ld6I}P>r1|NE-TGmnVy6$8 zq}Hswc3@jgcoJ)BLtxg-Z5+baIz27e*Q}T}MT)sTX0hY?4SYB%;iHuCIv<9z1X0`Ekg2+TO}j`_x4uf7tE}@mAY7>x0-1Rww1{4i%?N1?CmQ%eyw0u9DuCu-NBLr`HL7h}~}aA$R-D52f1+er&3?sJW-iV^_-8 z+&|~=gW4&R_c}fJdT(>YRTaPIVoy^TY&wN^6>|773r;pw^vpcCKqviCjg`$yGg+zc zbNT$g&gJv{b+%#oZ)wR38!9f9O4-~z%|Gvrv8dhGjt0TPqXD}L+2>f+vz?2#DL+2P zy8hXvo1fFS&9kdEdj8|(Vq-qJyXFOt&u!iG;>`u~-`cxv{I8r9*!j8m-KTZuzsX(Q zt$CnDpbci{K@HMzf3JE_V-i{s93&>Gsyh2!ZNBQ$t*@`& z%ioHt@e+TJ}d zd-Xgf{pyR<&b{)7ANWo$sMu}pb-Li%Wg%_djq9Jf?{#VH{Hq(7q%_}ZwsM$f-5VLc z|HXXG{BxaWPN})Bp?3d`EYo^P_WOHYG~K?~{9vY?hQBN0mmRlxHcmSGr#hcu!jdfo zA2t>p<~prVaVK<5P+m*Id~e~uQhfb8&omsb@@YL@<=_6lx4-FOq1A=_d+g$Ru}!C^ z>)$t=I(52!SXkV>nvY4T&vtT)FPmpseC+Fmg~{7qzEst>w6-=^d$laq`n!7c7LH1% z4HND4ZcMT1+b^$BUbAffr|Zw%+5UZcbz&!&cuLKoW5?Kjdzsl-W^#FYHGQ48#!!RZ{(4FRhmE<4%smNF&iLx1 z&eJzA%?R8hrd1}_rkt+7iF3|(ZBy0M=Np(ds6xkV9AhULJ+SjSHOsQ@pODU-IsvEB z*NG{QoPO9E%>KIa$XBkq{2gWow(|VW__Our_j=`nA6UA)WOh9k?es56e$FXd?pZs}B~AL08UDxa!*9Xu*UXM^c?qj%u4ULJx<^Xp zh;oy2WmeGV^RLwVzwouV@A7YUuR7b%f6V>x2McD2ZE_9X)7Kxky88ON8QS6N;`S6h zJ@xGL^z~^WVR0YV?}@ni`^w7Cy5Z~Y{G6k3LSFsVv5RW|3NTv z3Xk8@)y@=GxX-)r%=^91L-zSh_k2T7`3AmTvUAarDRGB9FQ{m~X7>rwTkjn7>c`Yo zNs5ty3O|0PoMNk1{ePh_DMy;Uzw&;)q1CRtv)?hs&Oe&`(k+{@Z|V6qjS;wt_9;635= z_p28inE=|Oqrh?c$+AgBzyD63^5gxZX+?jpF&pH6O#5&qg6nRYIMZ_9#(tZm8Edv2 zoU4%Y={wK1v>jVBR*CUkWiHR+x%<+Zd!E~!w1dWOvv#!_%rj+Ps&;s5Ucs+zoKqGo ztLOipEAy_oX-n0Q-j}}*Y2M{6-|IZ-l9a*pDM_na+fFF!HGc5u&-~!=Uh>1kmJA8O z{DkkuH=@7a+WNZu%+>7cdU3nUaxY(99d5iXcK5UJ$jF<&|NK0CU)H+pP2|p)e;R@2 zrmRaPelGr0aomlWsWttWTiyRhGdxb-mec$rKJVtG_j^AtU3bdpT>R4MPga~>di#n` z(5FR9V)P~~*;4ds+7y||Q(g%vdQMdT@iWbONA{s2ayt41{+x-t-y!au}wEx)SD;ny)4+`%TxT<=dYU7Oa`KUa(?uX37qt%|rzioVQsdUY%PumaV{3tkN^YQF;xywi1-mhg^UDk1j@7bk=dQx|t&-{NoYes!O zui&I9Ev5(GE&p)mu*y@LYtxb*eseB(Ds?aDabZ<@%>KH!kG{UXZXUb8&i3!Gudi>d z4qyLmSIy6&?#1r?W?LC&yLVXa=)6+Mo%ylFX0Pky#Kdj-J$^#>WTvNl-)VDtU9bPb zT6x!*SI(Q-60wbdZbIqOZ-(FFSBOpAz9_LxCH3&J5YJBeK&E|0Mof0I_b}AWoya-ac$&k( zw!H;EzOa7lyVu;cbIFo<;N_)>k~TS>nOvv5{`~*&zc+5rOyB=yAN*UVx1AT<@4hCh zXz|u2Q|C#OHmK$4X}*6~Q}OrLS7{YhhA(^S{{Gs|@S*4DUz?}bCZ5ifEA11I>hH|I zm~*A(_jOyN=z6X56HnB1sqCF@A;`vmkud;rsVaHigX7s4>c`n;rf{)hYRNa>u6z=SiCq8@bo5dU^N8i(5D9 zKmBhz-`KBytYLv~@A{H@Zsv4P!8&W3ThUW`%wuJ_fj1pLWB<>}d`_Y0Gx zrT)}wm&vs4SQ_m(aj(oT7qRA$xjgIpI#!6q9+R6I5qmNvRn}fQF>=BZl{K7`rc9Gw zv!vwwzYix36?JDBdd}>e6r{Dm%WLtHJsT$pRR>*qAd~$(ZPKL>&rChdjgx}rUHO(; z$r2i5_hrJ8oQMrwOgS3;=R30nZi}@x3C&;6xw2a^?`Bv;`2&kN`yx7dXXi)lEwFcn zOmyl@zBS26nyKrW!_RHbrYcXHV{K!06^ZuE-OF*iZ%)$XlIId;4)VN*=^OuZl0PGmaI{~a&_{i zs35MK-P`l0DK2kKwVzV>WtV&OLbnext4*kvY7`6?fi@^I1WXN&Hb z9NgXNZ)4H+#L!W4XNIuO{aTiDp>byQUGf>Q&@IaLtbDi7!z)-Xb{`kJ|J?RZYuOXB z4r&$5nR=Qp1CB5h%wOg-iY9oDz-VKMXQc7e@O20G38yP&pVgC?y+vT(cmLE+4BA?SzK!<% zE8Um=Jnv~!;}Ilujm6XJG_U8Wwv)Nur+5}N+gxp&zI@V>Ei)!8Sz~|Yjcw+wV=dil zmc2{-@a%=hk7L$-z8~gI*d!sQbCb)vT(0e}`gzBvzN^&V*WLVn-wB!ngtI42k&s!n zx$b}AjQEX`$5i!`tUXm;sr*PdWCPkgtF}BMb!lO38a@F<)0U}Lk5#0)UK&%7A`;Wu~b#`>oL6R>CoQD6?__uWhien2968*oqMGPCVab*|6PD!6n6PBaqX|p4#0B_t zb!!O5L_FO6?>rAz>fdSiq{UgwPPr8HYPA*oWsBJNnj`u`Xxz@X%fBsbL9+O4@vB3s z206A2#$DGBEcj{lqts2U=A|h2`o5lo*E})q4`*>LUAp7z>}%5e+{j7n)B8z5Zj&wr zIZwJ&wer@j+$VzD70mYj{u)@kaI2EwuC}Mm?yr)<3^x?qcDz>q>C)5Nby4zBup%Sr z?W9kywr0Qi?Gh*%yiszG@pPy29ZC~^F5UF@{&{|0@#|6=#|7TJk3Ig_;Z8j)wVmai zWb{~U(xyFaOJdw6UApzt-1B9$#^p&%wp^I7WQ$+H!JOndw|e_^xx8z>|8HIR@Wa+{ znJ--$O_8au9k!?1=h)VC={`9Z9=CCY<~?(6$UwjbpEa>TNqX^nkKMZWVAs}y!*Lus zk=*aNzkDcmP@Bx{|7AX>*}2OuzgQ-%sq%o8TeD|PDk=$DZJw{Dd6n&*(BvtnJ%g^X z{|gNgo3Lcd4NzqG{8g9!I-m6{Tl+??Q~K)158Xd_bHTaDbE{bV=IlQ5%P=w+77{`7 zDye55e2>{uD94})w&*q@4ep8m}btIB^~e|t|w z^R?=BRn5&Uj&UoU*ee$?>-Q^rW*RDbX8wF&miOmGRlp;qn>!K?vx;(^TE8dh;rp4E z3jXU8g!gEd$u!+Pe(u0c@9AgfYpv#h1^cVnOGK8}#kbu(e*Vy;x$TOXN6S9wN1R+% zzkTMUQ)MeRn70?cHea{D=jv3I4e#t>h3~Uv&Ba{#Q>Ls@Pi;NWBIfD!dik^^F&R^) zSUr9)$0@FP(k1oSZ~jx4^r(Ag3MzVL+HUajiqY83vMJX?zkkMImZ$F~E^X=* zl@0H#;f^U&UAl78B$d>^2UO;~o;2l@klxAd4e3*-6oq-7{P@XYWnj=Y1<#)woF`q{ zwDQ)Yw`zIskG;HWQTb`_$BPN;y_)1*81D5o+l%;I-UDP&sFQhtM?Wce0jtAdHFFdc)R77 zf@Z#G;qP+QHx^ylw`v8}#q%dm7I!>8A?C*|YrZ%ME9snw-*X+dZ97`p=@~K0KI}++ zGpqy)@jUh5_Jk?koQ}4M3Yu*uEs<4Ix%Kg}M^KcX zM^KcWPf!xS*EM!chFN@ksoYQe7XAb;h}OM#=9jvxO|2Ywqsg_eim*y;<@-rO&99^0 zyzYIy`YU^%^S?G*gRKdoB|Ima`H!D(R{!1J(cfIS-21HNgCl$4?mF@G(Bs2@a_374 zeY{$H_}Q&}hI;Eli!0k)o&_tsT&rQ2_gydDR?{=+nsT0+=2fe_)f<+^ zXU>d_|L1qGROiK%tbV5aIQmjqzBh-b*XhM+>y=}46g4#LXPU_Wn>CYpau&y_$Ita< z+RKK)GpGrRXQc7;buq2A>gS#A{jxPM+{$#z&o_P1r=^L-4c<&^ zgcK2FCf*=nRzki#hUzhY4POmoiI`$-Y@WN%MVkDt8Fj>O;{^?^)T*EVyZq?PrEReK zh1WMI>0EeRV=ueE!=+DeA57gSGUvHSqt9$EdEXhwe}$O6viE+Ym>0A7L0Q4%Eh_Ki zU^UERiT6KdR3B*f{}y)JT-IjoSM9|~QS~N<7sDRSRerlpW17}gE4|q0bGer!c6|PK ztn+JUw%X%^JPO(=@x6Y>e9}bl-F3w{?$`bL*vLbvGV;oa8d) z?&%v+2mVMbvUxCJNzIQLEUM8DHXW^JxM9J5Ao*|8L*@R;59tMF(tXXf6S>UZH1e|h zZD^Iu`?#(j)<*Mmo-##4(&zP^Pixr|?=3p(lb0B(%4d{gWzn5b&WRiR<0*Qvj% z;OV>#Pg4t)luR+tzmj`ox<7x&mYPDBjMd+dso&oA>FngPAQ7*l7xiWoHQRku=-5<|ARP*iFBKzLniQ6QsqksMT zAn;Ii%`Q`DV_28@a*BtVR$)Y6w7?#d8nZ1kC!JzRee@}JL(O-=8}*-LVpi-)`X_Q_ zHN4DsD{P+XA%?uqu zZQB)lg1%oa`tEIV8eY{)?OJl=!TB8(#}zsBV!7XOm-x)9eJsnL-`CdyYN)!@Kc0Qg zEzvW3+HP2!Jvfmow{_#j$}O$EXNBM1jmy5||NH6b#m~3@Iinu^Y4$1)qp;{>M>D?O z;j(A0KeK+$?k3SG8aw`oOR6pn44AZJOU;(2b51z%EerV&I_c7myT5mBn`6H~?=kNw zCA&M;;S!qu&;HL7c$#3Zb?4#ZkDKeNa(zzlpMCPNulEeU;wff6&r|IDVLqGgO+I#1 zd-a?*!Y9PG=J(9w-eblZv)IdF>Smco({o#w?&dq(82tRfp{KuM9l>Lu3LH%vd_01> zZtv%xXLbHsx~KNGW~*{b3wMzwm$@wOd%N4x+1oo`+lb`&Y)VXB`s2sNZ|`rnLyP1W zHc3w|K0BK$RVw-W=;s^t0rN6%`-SSruDj-`{O8M`Bzxxa3+w0X?zlQ7w5dq3e($m+ zDT_AoS-M3qxjAMYsW&|Tt9#SDDW_8-JS#(^&%M7o<>S&*Np?5PuOEz^_u|9pA1}=A z_i^O@o>%R#`@gh+hRtKpa^cU+;Gv372ZMuyuB};gWUZ5K&7+0&KALA@cTC*tz5nx# zOpCgAO0VrJzn?Y$Z4L%+S@7`)T4a;J)c7{fvf`Bts7Dpd9cCD)8LEERI(hMej|T+Q zw0$P^E~~q539YkT*;$ur_W!--F{|H#f#LrbPZ!6K-;bAp_NQw5Z_Zw<@q{hYYlncn zZ2Yt3&&xBv{>ijwuD`i{&i=GDdv>3D@+3)FMN?O5&4N9SL3+Z=xBACwG4C(h7nJ>= zeAVe6OraAE&Z^%&=sWMpg|w0v{_}Z1|Nq*n_{n~r^t1a9HRrI!KdxA4(=%a7O~HnJ zlS4bY7pOHmJ!oCH`Qh7*6MX{8_)fPsEV}9wAZJ}JxbEK5*0Zx>wt%W?9^-MjsVbVfbEPH~3GxR| z=kf`8^sP46vfeTK!M3cDm}#3l0)D4hewm&)?s9pT6mrN?-hz>F$2qt*@`I zf2O=Kc;JA)ZPh)O9b0c}+zbfVXQtKk)$o_L1-sjk>6`z#9i9DcW9vUqXE$*3H(1Hj zqLTV{&iXw}(){xp-fZ2SnD)|2ZC`_b}Kr^$wS>&^bZw5P zkLyJ2cIj(x?a%#^nY+70a^1taMQqSb=!r8YELkHPv;N_(-2W$wb1o!)>Ux_Kdp$o+ z)8fbSO?8ibf)*WkA$dT~dD4{se9#I#_NDxvqo3s@C#~O8q#`TY8nkoMjM?k89`e32 z%3JJqT>iqVoxxGe<$|j4LNBzM?)-QpxQOp@(|Eo}Bo%i@A7C`=5_0uxbft2y^L!~fVS63Fj9u-)KMQjwC_;xRI6Y5AvtKuu%|EwgPU-GM zP~)^$uW?!zONNr+0un^e7%nf-0AN5Z5@onC8}nRsr{3e42g@C><^pT%`*)}%>a`H#j=|9t)E z^LA!?=5pWc2j{X+@BAypyxk-A*x5j_&(3=`?=Wk2uB-Sxw|tKDY8WC>w)uIXhA)=pCUj^mO-PLn@`NiVpTiF&biBWQzbjfIichIA- z8n%Bs8C6xwL!-~dUX!wT<67yHJt6Pvi>0osj65f7no&MEz35x>@~xFekF{+pkB;#O zx)<$pdw1m1C8v1`qy5*vys+ZG&bJECIamABpBTmtU~?k>F%vbM5>NKa(!QNmI5$`_XH)`#wGE zJ(hlB-@}=jxo@XxzI-wFbnlmwkC$n3?OSnh=vg{RHyE4^BIn5J181a?O6 zTdk_99^~yeX~CZNR{~v6wmk{yP>P%~<&NvxM*D?^AF55P^47W?7hPQ%vt(D#=MTD5 z%08TWw7-BqEB(UQ!NhuzB*Cx!Xa};tJY_m-`>60 zZGL#uUH2PK^Mb53GMD)#D;KOfDH|H+;iv-)vqPA_z{ z~mTj#&%H94v<@5d@Dc*PYeBN=gi>YqfrjGL=(>b+Gsvb5RI}mQK3^Mk;qQuCfvM1jN2zO^l8v6fc-*Arw`&h=t4S~Pv%7gGz}0Sf znApdSuYwlFtQG&Zg7?o-O>Y^61lQSFo}HH$WqW!(K9VUkmA_4DlF-tPncj5=jHXO6 zdgECcy7;+YR>_~TQpx=hvB#FK_Aay#GLH;YdHXb0Vd6>SrSEsQZplch%L&j?P|^Hv zy+dHlIz0hZsc#E%^x_X_F{-EQw61WS?YRFd!yAjLS*9WTYrekIi{MrC3Cgo%*mv{v z!}AYh)T-ho%%Wq~l+9-|ySuEbe{-gwzd+~}3q2q698<0Qk6*neO;X6?-{a_h^WeF? zYr6I>b2xZiYHqusZC&yh>yXML-TekU|&W~r0^d?O)=Uw-Ega6ZW$>|9v&mEqy zp+>sLKa$7Z$Fupm+c{Boy+@|p^2wK_H*Mc~&2X<+Z~nbWOZL2-utepZs*2`X?V_C@ zc7WyyoMgVwv$^`uy0Yu9e%#C$|M@X>O^Z7CgQs$}YR%o?yH@<%@9+fCr)O1D&uV!I zP37k>_UybmIc?IXO>XDq!(RW``pQTzKJ<{QR=35}MKk2zL?8M8Hu%KWps5`Br<7S{ zy~*uV^sIbu5E}ew{e2l>&iy{;Q*Q4To}SdlH;aCVoLPT^>F=|to3@$d z_x7dSe!g*)(DHioL)ULN-0J_o_P}-ZeSY&_*ss2peNzfiw0-RB@AcZ6uQfma|1KN9 zTQT!=CZ4*iQvdr&QFBfAkCmr_?3|a1U(4n>r1{oK(&y;BDW_$!zAV|ZQGV&p1uC9D z8CEQwBy=!7+1{&n-tE=bK8mgivI`76;`>?miM#fv)_41M)lXAR{YdjbF-Z1S!hn8b6dJd7cdTBPbUcwmGn)PIW1gH(=3W+enDjD&Z@fP9XXAQqzsXEZ@mvMBM85s{ z1D%if_AB*o%Ik``(cJJ{t~cHOm3;c|D>qI|)9>ThUY&lY=H>KHD(lWZ@yRTo&vY<2 z^3d^BC5O1SHrlT;%aZ)Y(H-oYm3U$xq(}^-rmA`?#5#7 z|8M4Q47`vR#n#hd?htS?3N)>M(rnFwJq16v$)97Je`@vhgzq1XbE<3ZTv}_eI!E^P z{U|H^H<$9Z{u`^whU z5&n7SdzQZ0)z)vhuF~dJg`Pl+^ux~&X6_WZBmQDRtOMH~d%Ib@c_zG<4qo4E%H<6m zH`>LN@VO)A-kysbxwn_!{S&pvBqi;2`SIgL_p6q9*L^GSbdwrZM3wd^LFD0}{VVCegO-J~hrDUY7yGnWUgetd1^sU0S%hU>qceEzF4 zt!V$L$vea3I{&yozOe(a}uMXXJz^f71h_@gC8r0&APFA(u@T?@w-IB z-qI-(Tdk0OH_sz(r|dJmJ4d3}9w-S$>+dnwo3*#jx0&_Dvu1@nmUwy48IIL!jyXAY zicX$;_|r^*&X_HobGyCG-ZwY(R^NPm_Rm(2EBPO!=4`A|Pg!%5lU4fLflaaPk@H>m zZCHuQ=`){C&f!&iik^o?W#hd;dFKNoY)*VlwNu zu(Gndw#cd(cd?2FkuSr~#a@*9p&TW+QXFtnchwS?#b}{b|u`_p|(v?6E&tXtL?S^WC9p#Wzyi z_H-8aYBd_%tpZJo$yiqluDeh$XE#?^Ld=dD*1q|>Iez=kZH_(ecX*rf@`TR|CvW)p zpi|3CR;eRvn~WW2bnkJ_dwUX6{h!T>6^Pj-_RD43f$8%$uGv35^O5=88i6Cd8_GCp z3)&Cxe9NA~bR%ldj>=7^V5T zp5NW8e%{Ej^Lp+c$>Z5S?q)A;lU?IvTlP-rjddkonT++>UtzQ4KF?lT{oys=9IN9l zhFsov3Y*s7PHT4c%v{x@<{4?NqS;x^>FKrloU(k~kB5{0ZYk66_uTM1t*CFy=6ufQ zi!Xd!=_R}0FZV(JijBt?Htt?^_4D<=U;dQVH*0A6F8ajgnJF^$Sy1ne_6O76wc2Ey za{W-8vtVN5{&iQ2pa12#lec!BcIfn?gI!E787jrDr$tP8+kRJ6H-3w3+Ha9lnNzN4 ztUk-n1}>2H2ix8ad1K$X|M;?JI}#4v^8pPNhd&FNvAx1L`h$!`W#3+7zn!}u6bZBH z-}^9UZwTjdy_h6(2MyiAkA4EBjmJ6WwSTZUC_TM-`39}0A|g3AxF=tpzCo_4;_|U& zB8!)7x%4)lrEq`3TY(LiB-FWfvu)H}T%qf(+3%(icrDt9Ip zeOYtjSwfF5?8@OvCWF^Qo`Qwad=S%K$_+?+YZp&VOL;GXfd%A;O?P%3v-XFX6d0!^a z9m}=z)_=KN9KKrRsnX?X`Nf`^-&U!-W7bd(4AK+wne=Jau>-M}r8YE8vVOn(IbSyK z9jo3x@9^nfQ}6AJx&D#!+x?wB*?+lCWqf`pw4^XGd5&rA{NAK7z?x^C~@|D}uh zd56-B$ZdS5w#&B29zS>BWASuQ*XPyoFY?X(@^axC+WPUL+np67QXK?J5B3Q@-k7v1 z=~(}5zWGf7cdLFFTS&*rn@;y#wzu$iv_Yp=lYys~2-Dr=hL#^%({*?{uR1^K%H2@) zJ}~TN-LE87YxT#LQu%vc?76ey;B)zY_C0Zv7wj=l%$}cpHCz7k@jHJ$u9sYsGcRaE z7q66x=g;?`{aoH2K~eRy%=7PM{9t;wwsYn;zI#6}{oC>M_V%9B0n-XkhggYB{Uf+` zp7rbH&-EXdyNm{7r8EI~+y{2GcQ@7ZZ$va+D z7yGD4ANhFwj7-22o%T(->^IK)FAUJpU#=hGbnBGt1@m1Z`@RXWzj)xlSYsRhefrv3 zK821pwz$_3s;TQ=ez>PbPYLC9uIjnJ?Bd7c8)g-q zQetG9c1j^(CeJcG!5d+Zcd4l6{{E*wW7+cX=BA=kLUPOWgcD8~iA?ngio5t?r?Hgn z_V~q<^Day&s`AyGzCdf@FHPbWKOH8CnXonvFNpZUnXPg>-$Jkg!}B$)8RLlRP5RKvpS8h=CSPg zyfP_%o|RQ|XXklwELxcOYG==N%QZ&FW*6;=tk3pQsowiwOX3^OnyOqsa4&2H~p9yQHsqkwPhqOPkVSJKXBF6X;aK6PQBs&F>OYDuI*8iFU!nIZR=z* z#0ww9A3S&^)y5}U^T3v=Ml&`|Vc*)gdyQd%`xUFa#jAW)1y3#dxGE`c*QN&Pr?b`H zKA4>P|LzZ!cU#5sbmtk=AJP<)nl$C=174}Rl-s)tcd*sn*E7Cx=;_vpf**RrW&Ri& zvp<1uzPei~@okR9>8j#D4UyA4dF|2L|681i-^6MYr2Sxiy(*6@=|6N zo#_XsaEat^pESjETm5YBld}WcZ>-k8A~rd#=~LVB0If|PT3)A~+OVtLMkH98a3G`V)Z?6S$5qtsvg?d-I=_ft>STbb>A+MN@?cht&h(k8Pt`r=`M zyI3~e-*1$}Cp@K|E%oq^C$4Xn{DmSb1M08;Loz?nRrcEy8@cL#U#ky25ST&U)ENGp8!|oZ( zzB|7xiPFEjKxgVREiP3>yPcOf@68kvKkxG{e16F9_j`=r-kX@dy=t0TWptoNP}h|` zfrni^A2TX`_;carhkrjR6#~_ruYahSF=Lm+BJtd&snva(Jg13p9sShYeR#6CR^so# zkAF}P*?O-`%{BGfen0*ZYxX!h0JlU;K^)W4C^Lq*D z3yuo|bnLBrCT;31EZ|$0=^1nnbgo4;r{}3(g5Mj;{2xtwFZi(Rea}qYpIK*W*7dqi zx^Pl^w*2GZ1MRE4T9l^x-B@;!JKcos;jaHlB2$_I_sm?S>UxG%)zeGx&ab%WfNP4H z`7hixy}b4xmGOx@w2{l}&(>uzRi3#M-UYwjdGu6JUgM&M&tFeY+f})&u>M4_MRmW$ z@BZUw^Z$1Jce=g&%>3*w)^?SpH=4Uoa{aNZX4}BZ^=*F6!^sTwY|jsDuwZ7Hx~6rF z>FygX!7(DS%hjfcbcM3Sude8`Du2mk?S54EF4x{?Vh4XeUVPMCJti&W{t-z-dv^hs z+E!17=L}_Uojo(xdo?9~WSg$Zhw3EuC^Bwuq|J zoFMg(6{Uyrw#Hd3z4m#k6mz|A^Q7E`nV+`&xR^h2<`Nxs&(1sRmZUTni50H7uimu( z*m04IQ;M$#24tOD>VB0iZ?D(+ry5>M8uzhYO8n$=^1iU}QlWm*A*~Oqi%U!)cKD})0 znx@Y;^VYAs8x1ds318k}UsKe&(2mtU~7PqHlSv}#F-y`uQz6|+y!HKD1coL+Lv!af+}b{6^PZ<6m;HhKTl=S9^~;Oy13O zi#26KmY0aJKQE8q{WS&L%RKM9G&8Zbc{1&>HRGD2%oVxyr|ESo9G`adV9|%H+}F+7O(s)e(c<| zefEY2=S@!My1VC7OXt4UO*i+sZjy0bnX__H$c=L@OB;7Dab3BMr&{$?f>f8+;w5XQ zO;*vIsO4GNyk?EAW}w%iIXn?s$v&|v4fE&iU*@X0=6U~$(m!Tf`=S@=JiatVHKxH| z(fow5|EJCFO;0vY6x5BERmlI>GdsFlT}C!HARx%zE8EL?@{}D94zO~(K76$8aYwXm zV91~I%58gp-!Wd)!OP!#UCpFguXUQz$>>~@KAU;a7Ui}h+Y_9`-<^NY0}AL^}s_@veQnZ7Jn zYtqA;m2Y^?=)`irO;0)Wdhs)-#s7}&+x#PqCCpd)_qy5hg>^(HO=&T8oV2NKS!MBT zx5Lg+drb7My(_Mqbs?{)Z_WDfdClv~8=YJ7C+bMMF7-P8K1BLQ@T{VDQei=U(R#wG zH4AT>zjm$^Z`!2j>2>U^iYk{EJI9IwhW|xsn)+F#e*#M-_xpyP(hr@+ar2ar-JR_n zpFf8b7KJZZ{}>~&rNj}9&WUb5k(C`12O?lkeq`iwPY_~7J%FK=9>q#PDrSuA5wD%WN9t{HTk;e#64>SU(;x~zLVf$?68 z?2;#mRm@4Qo;=te_{9bpT!;=&d<{m{x%9v*ji@pqZz?E z_t2-CNkaKPH_lGr_Vij*ryLf_x+(i1w{!Yo^~ui;_g}u0c!5b4wAySo|6G&$n*kak z+8poxct&jN-8+pnmuvU7y#^*SQeWK})xRy@qV~}ZGNpCxK8KlE|K_YyE)OSjayFe& z4t;UNC3T+9%UBJUUt*tGPZ{N{J#|1nKzhgKSw%0WuG-fXA=t53tMJEZC7FLsSErV8 zcox4BsQ%h1{p5+#9kKq)yL_43d*a*sn;BQDx2~?Udf2o-uI$QspBu|GMYTeXZsJLu zD6mdLsHT>irF?zOzx+zQ>sd}*-=}TIL&npwSlWz!{-quXCTFsMlW z67%DdwpiV~d5p?JJfQ7B5j&&j+^hZRbys}K?s%?14H0jSeLo9+oMDaF{oW$`rGZ7* zdA8Jzvv=GxUNLFXit7(Ho{gIOW!Ax#qpOvb8?G;NxL>){U~7RWsMpEvH`f>vSfG`` zpdoWmy{Nd+>W8gCckKN*Y0-nLmVJ~7*gE^f*-xvrJi$w&PgTuzXJav|PrFj{`}*;t zT=V@sN*<^$JN@tDnQ6QqGzDsEyMJo9a>g&wd31WbC2rj1;t?wL`Cu1Q;v#>!_s^zk|9Lt0^v&v&5AwaeIX@RE+_1^} z#}c$g=WA?GnC>y3FPuq#w+93~GCR*`nEK|JPU%y=h>gEFRxj97@pD^!30G@U>On$leRK=c&MVu|=$J{{YHUD_N zzGcnU-3f;qg$rIeE&X}A&1qqTqh3f{<6iZ1pf#Tgg+I+coQ-0ed-&5s>-iPi-sKu; zEQ$K_u<}5~-oy8{JbTXN-2hpXvgZE5&in5e*Upo*>aNbsS@NYmS$N4>+si-i?) z<#gP~dMM()&BEFFV)x6Ey0#o`N%_t1=5lkdjnb>r%X^#qHLlHJQ`YQ#FR^&Rk+-?` ztB!+~P;IO#Iv;p#`MWPiy{^?yVw)MH!K-ZDH>YjFrqVUHTx5(4x;s7hBpQb%OkSb# zO4uhTNi_9)=9^>xFMEDISlh@K6qeWS+wQl)OXt;LpM??W1%JEpkHqe(nR@cnp3>b1 z)w4A%&Yfy~U-NkNx?-PzYZInS zRrObsrf6s|hiz%h^p-uaK8B$;ZpVUaob7=DtGogNP8o@~I&~<;n;o>C{`%ESJ<%tf zW%GObpT!k(XI?xLsb@0nH0zp0OByY&&HJUH={wo`=)cL2k`|v_5CFOgt0F(fWJ{2W z)AS8B92!x)-eq!WMU$Ksn(UFWuAUe=dxz`v4JVK7Q03Fsy6HP-qbI<;9~3@j{?zB~1f7q*meA@iaVhA~OSeEx|4BEhQoXFIo);T-DTUcvs`B>FZ?x_=653vsEUKFK_t@Ke&u;HN%bMCeVTxP9?(b7njb`k+!njP& zFf@>B`jx7ifu%EZR<8<)SmWXtsWW@6hJel9&8d3#B4eaMZSeM=xA$ED4UC?dFW)tF z`92S?%VDBse-4=(y&x*x!fx!?**!bI_R+)nGj|$T6)K+5ie*=w{q69+$eE&cGB zOQksxd|X~!tx2^zZ)%BMf42I&Tl@Oaos+)$e0f+UvA(pIy{+SQ>f;L*-n;KX zN4pmFY67oD?g)UdNOFeNNt*{COp-HcgnlUh66M*3>^)Yv?cG~0_Q+}8`cx4Y@jInL!(I&(v0 zs9N+2ory~|yHXNw{J*U3Z+5_V_J7}bN;S3?Yrbk*TsiTla^aQcE9Rajx0OHsf08YM z#SzqLJJrGQa`|()ky*$S^Zhw9*eE8wrj*JN_CMO>F16s)1>&v<< zK;x_S4mpM+Fiz$ynIFrsc4}u%dthk)t+>m&@2cD(b)?xI3+w%t zD?sgHInPP!pS--&A2;(--oDC9iKm$SKo=vd^4^i-E4kfe_2X?BU;i+!ZM0r_wOIVm zsion6PFWT{+FqEzlUMm|{ey%2hJHKKCLi#~tKM&iHc8UfibPbFO6+KKfFXVVwczP|m7qIp40n-l7 zAKQ<)G_5t7$b030)}u$hzi*h%aawrg{sV_KSF8ISnfR`p6k~r?V`nKgPf{eRv~I!M zdn%fpyW3S#4|DrXJeK9P?X9)rucbDwN}o?n`SW)2;jh6@J{P4j+6PCTP+i&mQ>avO zd(h&?aO(v;s=R` zOUvHL+hsz+uzAUvoBr(Lk~gy1#f|6t#xdkBU)JoM!ucabx49+tb_DBF(4x1E3&6>$ z;K;l!yZh&}9=_IWurxt*H)mDlkvXgO)q?uI?QabXyvnCcIs5eUL(pAK(38F&F|F>> z6!H3d?xC@G!q0cg6SgE-|47qs&)dv>z;7zc`~LnkXVv*f>dv?&W^zXF_k=V-*k-!V zefr)+PWaNIn-?PQ?|UYA`ImBK)8Fz>CYjdjb@sKF^V#1rkN@yp_rc;Rt})wowL~wv zSa^FY+sneYPA5gzsH99PYUNp`H~rugX_uvEG_+Q$F4fS=<~UU}Q!vo)+LCPxOvIX>Ob}$=S0qE_Z@l$m=E2 zQd7~*o#kBFtypwX?Lw|4Lp1;Vr1vVp8X{cBuDoJY zU--_dj7=;gr%|q$D{{SESZ&y1byevjp~ru=E9l6UEq*U^AaC9VcG* zcJk|VCZ%PaTHA#zH$_}?W_jXN8}+m1>; z&|V*r(RSIt_ivtWv-^v-)(vi}RF)Pq+|In9r@*{SY+X~=-1Y|tRu&hm`}C=P*Tv-l z8rP;4PYsWl@3m%?Pvl0~J;u|G7=Ju_;ZY${ePb6(*juHF8Tsd+6^;mx*OrBwcU(W_ z%IOnwYI2L;iC5aZV zQp=Jby}cn|Jp`A9h`+!Q~d{G|T(ctwo!*E!Z=2iAd|?`e{>4HK)g2pHh6? zl&xj|GQ)y!Q?`Gbw#`|6Wm@s{Kc|*H|10L@_e*!myX#Ua(pRij#ziXme$t(E?#ro( z6@KR?@ywZ#_y2qgi}mk`#c%BkrqzFyIhFAF`0OD6;Cz+T`3`0qMfADqS)U(x(xWP{ zyF`1{p7{3ZGVV zP;0JA;Nt0G#*vv5@&aD}l-07`@82rCw)7C^)_L};uYDHZ!nQ6bdqQ05BB9lqHw~oL zteYZPXrRQrU#mr0VE?@nPD`p@S6mhQB(+y1+gHL}?7GCWV&-M{CM!i)p8UrvGUMqT zQ{SCmx{e))4SN0avy^SU*V^ZON%uY1Hr`%)(R+Iq@1(0y%}ZhyZ$2M3)oW30_uJ)F z;$FwAQ@!s#nK@~{y2`DOi^aG6yJG9`tNz$4PcP@rtzKT+zFyi#SpyY6etZA(pjDpj&kH*ER$miS?f<#6LqSJy z&q1?T>5sfNcb@f5uG#uU7LEe!=`bGo(f8wyDH?yIxXREn>DXjy^|51`t(le zl&0XDVVN@p*=KA!(pW2UP;Q!9Pws4OsR%U;A-6Onv zeHPCh*WP*dYxN%Yukik9`zokz^QtM)EA^i8WX&}R57qJvneO#$g_mlui0Y(HyPuOB zCl|lneQNXD`ibecZh|(4%bQ*Q*2~z)B=>pC*4>InrBs(@zE(}T)%WvCgFr=ch{_+C z37r2}SKknuW;}hxf0b6JoqrSZ_f0zcJ24HsFP5GCe@I1X3X669%)BXQ&bzZDc5XRRRX;4`u!gk9Cna?)Ui>&2y!lF6xi-%3fBW^PnTOgx`8>=%FEj7+sj1t(pWFKW zRj`8WgWv> zjpGU-S-gKVxAxhu(0aOkrPq(pQ%Zj8bsiasu*Pgrnm>D;#)OKh=br7=&pl&mik9@v zvn;b;IA_Xo&;4^IWc0yIQwoxCQT#PFNEc^i6!V%RD&|uKfParf z-Q9m+W%pFjD5uTIaNZLO0yL)VYI@GGM(1|L2Nh`zgRKRo7Ol@VuUwvEA@1pQsLOzN zigV=8KNkuz^x_Y!Y7X4zu6v6`nt$Gc*GjEUiI&A5jow&PNtHzNAILe(R?w^0cwS9k z;JoUNw(^-D16pJu9YoKS6Wt#@mX$B&&-nhNW5qWA{`R}BJp-tdW9B#~NlMMW#s%_k`&CvSgJ***REk?k33{`nV=81Ac7c6Wc}dhlsGBoI>-DRds?zV~s;;Q{oRZkZr05xXNPK0< zpQ5evZm-guE_Y#yw|~~@ou8BDd%ar~c0T^QF~@`WxVzbteE+8fA6Q-O(=~Zpw$B~6 z8`n9nPC4Bp@qe$DPp$URmyfR2>iE|8hx)`_mrA+5y}Kf|d4wK$uJL)t&#oN13)aC_nMGYo*1IqIa=!5Ml1U4TRp;|^Y^h#8|Ju9M z?+sz+%RX$c^_sxlKij@-3Y*yKsZ-K~*#nhKO8J}1kGVC@)#9{jeRlZAl%qKnd|^E^ z+L!~tEeY8NS6aOycDz;a@ryrnPW}9j_D!?J*Z3trpD$%w$a(0}fox@A?uyM@ zmTLa8=$OLJ6=oiKnWuUsRHjNbZwX3%;PPdUVB_^c~ujc5K&b`nXqSGn=;@w&%5uiq-o{raX|zOEyB*UI-Q zu0315PR*LZ#`0kO#zjKxv3rcoq*(TcNX*{DQFQHX+u!BqHhQ*!lDzfJsvjb&t$vrf zsqHbW(zD*4P|aE6eB?^rp+7M$0@IlC&Zn4r>otC`@0XAe2ximN-oE)R>vFxArc>JC z`I`Em;b-1`-~8j(h-|OOzsYaxeZ8sJMR9WJ*|wIA*>hjUBuO1et?R24m;hNkGsXIZ z^7}o?ChzRN{T65UeSS|`_+-7Ze^JI`&_Ti0!OtGeJ@U3zKms-Ty0p({)Fukxw#h*h&(q&HbE`1O+G zSFKKRZjCDvy7*%0auchUnp^u0d)`*RY8AJn$9}0{)BdpOh3clMe>h7u%bEVmhR%Gl zVpT{{M5vbK0-dSvLZ=p4hc3MnmfE?&F;r_!(9~1YR(YpBU1ijsR65gn+paaflU8l< zowDkPqDQF8iYY(;RJe+npRkU-6+2HS*WR#iyR=;5_s-S)-*3I&`*!xN8yBABbw$2v zUUGz$_1j&e+9TyP^JN5>K%4LOr$1{l%U6A}?mq8pewlXX^mB(>Pia51XKHm?cxQt1 z^7GDjF0H*_zKbPFTlnEx!-*f>Bz%14yGDm|k+j62MG4kCJ;zn7-F~xdsyn;wl*@$W z`i-A**=H`;<5xAwDRaWXYwpjr*B@vMeh%8KJz;B_ILp*EtlwF!!W@5I+Hf;zHAl_l z!#j!}Bto~W1ijNa^f-6-*4kTV{VOt$*tD112+7!e_L;i%+qp-#DxQAWU;UhWZtZ8* z@cT@OGx8aqFVuM=y00~+VUdH>yJ&@(>oq1U(co6K>~hNN%wJfta8tl8pFow!#Trv` zLd3kcX?UsJo~k-2_EgZzywH^?{kwcNg~zJhU9LCvUGUVR-&a!a#Feh>Sk-cWxt8mW z+EYS#^B2vyy;^75yFfATa?LIk>nX0^qHDR|nrU*WW{bK`db*GGlIyS+j3EhOU9;_`*zQ_vy*whoD{73mBuYwvq{Cidikx7ah!k5 zi6PmE$V(CAbW?Yee#6rGny>br9#%r6ZvDxn6EGYmDZ*pXSS@dsDjsJ z;=Kw7j>)eqe!M)tAZJG4p0>S#9MAa-NI)(%w!g zIL10&u#+1FQTsFmpo-v$q^v*7+2k)%XvM zuK&W6UjN3wTJLLqKfPDE&3jMrTb?+}vZHa9WjE*D{N_2&a?*>FkufKp=+wP>qI2)I zaj?YenTkBK=DfRbTKnw6#o@QUzqJicxqmv?qI!MEKk4-;|AOC}ytDmT^ZR;x`<4pM z-~LvoTaPsz_~n1eEdNyRO8!Zk)YK9?<$a^~-5f4H`JIZ&b)i#fp748Nfk}bZpQVMIg7Su3xIFGlCYAt zn_;j%E5Yy0q_rD<|A_p2c#hLTlL-l@7r%A)cRtv**I;vrtTfN{WA?oFWW{+whjy5o zeeksi=3Y9h_P)Frq?@n$l<#v#j9&c}!+ReMD?2~zu-R9sT-kCVLQdbt*v#$Mp9dSv z*7MB&{5X2?vp*j$p4geYPexYvM&Io7+hymU_-m|qa@}=e?Vgc;3f&uFIdd#9^YoW|)|V*Hl)axr+i;xldsYl3k=RVVdTV zeyjUVEAK52SoK|R!mB-8Dyj1-zp2Jmerug)xvg^Y=A6xH>D&BfPRZPz5VY&A5fy}fN`H4Oco`)jmEIt~eA(gX zXZBGpd(ee{8&zn>Iy+Oftol{cy!G>)J2ATmMz`ONJ7 z2}OOeJvOJ!vVziH-<*6Y>iidvT-&S4TerS%QMvu`vC!MLp6( zp0togjje-X&5i0S{Ofn``18Z*_O{&ldH42IDo>g)#oDiS%9Lg0jW@65-e}YDbFBO3wG~fa;jY^1w9|0MiX-NR-{#vKSF8Q~e0@_HqvQvr zZ*LBLp5?uD$(EKb;YEpu*OhCWul7s7z1M!Gg}hbUlg9FAK^^hiM6bQEW=q$PH3J8` zE#J5KcZ&b$RBz@jXU+H&)(~By`Nu+6)^47K{JcVb;q%hxR5U$`1Z3~%O%8) zZ7t%TVD|oP?sq@-@|XW_-hON#<34Hfl->Tdlc#iKRxqsAG34VvaFi`9c%Q8qSCppE z!r%xy=@rfQ^}RT1rq6U*7;vWe>#NcmwQqRNMDLlI`|}v1RfXNbVs7i}66eiTv^v{4 z`FfJC2Hah~@qYdD*$46_1O%+RQQN|MYQbxn)*$<0W8dxHk650F-`~FW^v0@B=O5&h z@-^{f2iS)Pvq ziBqRktS#kB5Z+rqV;0*#R_(--=bS+s46f~au>a1PU=5Mir*3vnUzl_}(adCZd5YnQ zKS2+i`zw9?W?efxEzB|#x*ZxEQn&W(Ojb6p{H>O!Xm3(HU-$3+z|U{v~51m2PH?Af(P zoS^lGeBGOCvs|uB_wV=Gns24H&vo<0nU|g)SKD3_I8Sd+OYouNOSje?-M-i;sRlm94`}^1b5C0DywEOY@(SLh|fC{$#@_+UfDDc(I zH#0NgY5ydDxjBM3TNehri==ad+r6z7=LSwd@y+{ z59qwpv+aIHfj{HL>_oVh{$n}MTJ1llb(8LI#XB1q+m26fZmySFy)5Oq#hy+jPfweK zth}2pjz5pR*!iKiT;`9hal7vqz58Voc+V{e(BM^W_nY5-=IZVP%B6;XTK}roK6?1p zaN?S#OC{$7p3a_VbxwO43)GPd12n#C@OlPaYstNMq_zLE$u@?Z3cn14L{m{(wHhVUBufuY1q*S(bF*5{wk>_79?q=**< zbD|w5P1>O55fr2$a>~}LdD@h{uAZ5XjhN%4?4+Z#gccN6*!lRZZkW-f8;~fo!g;EO zh}U7hbC*}`DdP2uUD2Z3?&tXE)7uO7%XsYOn#>Pfbmh*w+?P`|UH&$Dvd?*Ox0-E_ zMUL5rTO!-eTDxrTi|zhC*XDR%ELZC#gH5k*NOEXKv)8kvZl31W%YJ6ntJyx2HkCma zM}oSt{g(n%RbK~ohH4y}XS2iNVCUZV{vB=amoM4qHRXlt?3*b^YSqsjT&i7aFH^qX zWKn>|HHkShqV|1N@bOvO5Z1+V&4?*~$*TMumow)rSqj&$+@<)+QZ`Of^5C}0$9WBx z&i+pLeK9zv;aKUWDI#9YC(k9PD{M&7-NJn$;jPC9o5WYq-Pv(}wwmsp2wg7)2_)yK zQ=Z+~A<&h;Z8JrHdsnj3PgDukH0!VjOnY#gzbtIKQ8!Gpz}FWWBs zk#QFIE)^#EROZ0C&F}l?v)4YKx~WkTRNZf$uD7{NRYg;CN}F)a+sD$PKhmtXH5hby z+QdgJE>VUoTGJHadMekdvUG>-=2wRv+4Sm$%sMT8z}~nxA?K3PjNBUs*wP+YUrE;s z`?s7`u+?efzl74SO{&qLGcrME{p|gC@lBh+dG(5Q!rQN0wYx5Gq~3MS718`fM_;W- z$ap2kwpOGwC!#Iyb)7}&!%06Cy%z>ZIc$@+JzJ%A`cKf!4Km-{+GcMQ?Gz3BIT_OJ z2S<<7q@WhvmJRD;-b>~remZoa;KzJ-9*ZB#o$kK~`eyue-ECfJzBviZCa<{kCcmp& z>9R0jjjH?kxRyu0zYpwB5dG4rmAIGTzKpEqwuuKmd(3xO{pz=C1b+o{@6PpX9C?D1sbt)SM=0u zx;o`ilMBo0;19+6yz`mYPVMw@@zIUpjm$1P_{>>7|JLG3P7AO6f50$z>+gQ&TdU?S zI2p|udx-mnfUJo7o3>M_Y`H(x-dV1BC10(%o9&?R-}Ft1mOs*>r2mIVSj4k`*50<^ z?K}~#rHO3u|ChbJcO!l7w(9#yOmiH=MR?Rhk&OZKIdhq$x*g8}>G~ z-8PR++i*YmtKK&07pB`eOe(b(6g-ZzsCm}(^P$(m04a|$Ioq?>9;kW#b8}_Lo zp`Hs(Ry?qL|LEyz(2>YxlNXjKjeO+)QdvYplJ*YqUD~$YJiMT=s`IZgxN8=RAE^f3}85SLhR~1M8C06Y_q#6{I}hv-3?& z<5lft#hkk@u6%6cEKtt1Tkql5Ex%2^z0TkBIH6(>s(_BkSShvYvU*3T*TbY|-xuge%nabW*ll+3R_*ZzkDh8jA-^Q!7>zv*t zo;y+g5oV8yuWo4bn7cE8bLQ&ugAFr`ew@-4i<7dOy?5os75~?)QdBQl?0koNm6m3; zU;1&0ZHfnT?|GNWH6=gSb9#Dp_5YV`ccYSana!AA-_hRua*qGc_d92o`k&3QR^mIC z>3n-{zBXFwG2ii3Iyy)X`?5%;<6-To!g}n-{x9y zKiBpQ`*;08k#PUY)8Xqk>TVU+T7O{YsnZ4TE~Q>$pR&Q{!_R|py;H;2Z+zZ=ch4;Q zonH-Zykpc}C3^Gp!}Skje%!L|yX#}y`d9NK+iHJ-ugg{5&3d&k@6mhtQtmXSKWhyq zK9HEi4muqA+v4T#eyN?1I($nvX6LDMmgzk+=J$87GuyHMP}7ZDzkb%e6-M=kG|EM` zecM?yb**~g+vI;UW+zv@ef&DyGVdhSL#pSXT6 zd)tPU_btwTf8M|&vB%+f6~ohYx6jU+cA4w%e%Ab=fIo9~MsOZKAKP*`{oLWk;O7bV zPZn?Zek5|@HDtbXJgnYQZ5(QJ#S@0#-8 zJxuQGf4R{3`OU}KRcG?IeY33k#w7gpN4Z#@JxAP3@0$*5)0_|8*ts|=sB6ajWF6?n z+DT3e1KtIC1l^NcHm@jW*Q(hOlC9?5@;&p}o6K0NTtyn=?|EIwy~n>?|H6Z&|3a6Q zWRE@pZDal0_;^Fn`#`f5E0Ufs)SC9j#>Xb*LuJGsXO{W%xBl)wxNY(B8@*RQexCl| z&r|LHFWC-BHBDVyu{rNXmB2H-J1ok=;+wRliMO9k3!ZV4ciQUG`TslG*>6AUHGh@o z_~FZf0JDp~t>?3p^@gVDv)`S@T=48s>gU6o?i~$D?9XplFy(H|3l*K)wJc(}_8i@1 zGE1@#F|){L*PIc5Yr%55T)y#ayZ@num!Ge8O=YeqepSb^UR6V?T*mtBHQUwSn#Fzt=M9PW zG2Ncm6Z$2@_vd>@&B|9!s<&GkCJA2ebCv$?q_wVcT3+J{*Vzh558b}ac>J+;bF$2S zzWs9Zxl7-1y%3tmfA%Ri_~^(xtCmFfn%`N=3hffW(voCosP2#Ao#0x`X|v)(pO7Ti z)cY@ju5FRYUr@mP;wD?b!=m-gmoqndsTH5q+tynbRK>dE_$$ysWZQnclbOaJdzgE{ z?VLkG3Fkd4?7qwh=E%FKnsaMI{xu`ehTkn9K1F*EQjrmJPA)AAJpLoO$AtZ*&Lk|H^Qi=~sN-rL~Gb z+}eK}yIQDmW5e{lk*12JhP%~32YL1_tSs@ZXn62b?s`R^;?4(Rv0QaOwIg@W)@}FS z=;ct={Ox{o|GAUg(`RIOM{Se^EmG;s6gAMf$M84VYhihcp@qAM(|60(t#b9nbCkPo zT>svqkyJZzW7nszfyI&8O4;JMD&XV4RY61aizh7EV;o>K3l~H~jt~d2RRi{dbl` zJD-c)#Wb65UJK}KHMfsZ5?dVD?R|XP`)!gQT%9P$vrEm!V#8C0Z%>aYHpN#Qb6UUi zsKMg|6a?c`*D{LN$MLjl9 zex#U`Rhw|@(jD^|ot80kO6N@F-uzWMA)HzGYlP$5`TM(guU6&9h)BmZi0W4Sx%P(N zO<=q8+1Vu`LV6RAf|@dKtjcC}^6mL|?fcrT>gVE<%&QbrUnhF3VXT`qjq!b7w^+GZ z!c@(qJ3{_83?C}qn6c*U@^4MQb9h0lgW3=AHB5i6HG_tcuPJ}c%RlwHc*8D{`z^Lr z-;`Ec9bJ{+dame4Y86}cXVKeSp|-~=Y#x`2uHX2qzdrWLAFJg1C7+8sO<^-Hpzaix z=c(Q7tF>0Er1qY?zrLrVA%E}Vn`Scq|4ao<-K@D=-lOZ2$$e!%yQ(T*^M{jBeD!S4 z4PO2}bm8WsZO7kTKCtX|NTJ{b;q4AW{GyW;63!nl`IvS{RbZaH5FcONN*|NQ39Nez zvo#zwrGq!JvK^V?DE&Vq?CsY(6AA)XJlJ{2v}0SX@OGB`zO$;#a?ZN7!Vy#TzSY=* z8u$yt^P8jhZfxcH_Xczf&eb$u_V!L8_Vw%>w}t#|1a|qeN~_y%c=?3A_t*KR_sf?w zi?Ork*)r_zo8Nj_MKhaKp19_YPT8t;z;3fITU&$g`fTuz+t2Y%ouYVk>XbF78niTZ`D=P-ud?`1`O;K&-W&Vw&R-KbxfQeD=G`d#!n3>Z zXd~BGTaA!{2f}<8Udjiv8T}6_(@SyQUe$SA_wEmY?M<@U$LyBv$o>4k?R?@|k%HCV zr!Yk(6GCN=o33A7?jjHx zbk7mFGwU?z)4j%S$;oSuti2!cx4pKh;KIQN5w@=bcfLOo`MJG6XejdB; zX>Uv|$2{)q@)if#>=yU}XKgeD^)p-z;)gwTxl!ZP_|cZ{O^BMz=<2 zf#E#{N$q_vjH&3 z;ELt7-Tdv{H4k?>>|wL;PqzK-@xn&NBj{iChaX2{6@UB9OV;(j6!x~E;n3AJyd5rc z&qOUU_<4=__sXuM9?tJpa_`%CkOy;AG~dhaSde)8ON^^$=B;(#|6C}zR?M;eRj-#u z`q}>*pDX2YFTKL&>GgVP*6*d+0;^U2-O}c>I&-F#^H}D0Yv}_5vTv-rqYDcY#JVDL zq8t8N&Oa(wbxgPNM?~ONoVRref0Gl>)2oGc2AgwyCr* zJ5_1+fwL_V+5Jk}7z{nVJ|Ew;&>3kwh|BX-HMcPTvGT)(3!5Jp$cmU*^lky&0B~Nf z<-w(`8>-$1?kH(prFqtQ(xoax&#Icbf@rm{#@ffC$JJ_+`;Tq?-8b9*?pLebee)V` zw())lFW{Sf@79X_6>$fSpE8kYb>R*aR@3~rOs2hMC)>t@iH9HYOxTsho?}tL)HioG z$Mkh~zCFE})qM4YhCsmqj(sN^nTzj9CBJ!_^~N*j-wi>2wnV&@fiYWDe~`Q!96!k%nXjV@|n3EXSMaq zkQG|pe&p%xgv$$s3;x`3-S+kOejV_skx}|T_G}1auT9_d(9&Y#m#c!s2jZr(Jf1AR zvC)Iqal?$J=SR0pwO;Ul&!tt20Tq+Go-c^#VpUKkF8SA{cyw7_kr2FEsA-tX=P}4|GoSgCAOur zHtyn)XPzPqT8<{aeCgp6Ekzuc*QcMovR&Sm_qq1URYIUh6V&eX<*r$?hNo#c+nFYR zwPPFRRcUIMANV)<`Rcrc_y4XPvT9nNSs3)UXj|&`rAm#VA!c#{L0iAh?n_;i_S7~k z@}U5)$e;H;y-oFLPdB}0@nbutXvC|ip}BE+cEZW17iPN|a;A2^*_dHv!6SF{^~#O! zH~)O>VI$!YbnRU0DQ(a#25NgBP0M4x|K{lh<3$oFbt^wCbnmhFz^UEf8FWt&t!Y;O z;L)*?$B~=eQ#UJu_I7BLJ#KyEG;uFam)W~q0cY1dbrsFE(wDzIoh9o3|NOn`hU=km znYUB+$+t;)X=t)INnEN{o-o1bmC8&XCpIRQf~lR=2X`a~-z^B_7x$QlhvTRRjGTyr?BA(_j?ZuOMYaM?qWZJXy<$`~EPJfL3tLJ@C%P6O?a;e0$ z>e+wJcr2{B?o!YDbY6@|??>rx3Tm5As7`xo@#4iRw4c0NUexn`pMhw zw!VGN`OxRDJ=oparpQ0bi8U7b?3Y*>WOgj~#^S_V-|u%`_@2Od{poc6U;mQs`<#FO z{^`jHlV*9gO=%HG65!EfcXLnB)VKY#No(`VcQYPzAAh#y@aKJ;5qqu0BbTrG`eM6C zM)>DTsbvyDQOa%jlDk>V>Gh@0 zhPqkubwBIY#PQ$0#8P%8p!)h=k;i%WZaHdh7Ee8R>~mdb)s^UZt2cEV4xRA)!Lm0( zJrT1P?Z0rj`XtBsd+$8i*sq7TO_5)+aVs->_v!~bA8WL+y*&`zo&52|n$lm~na9tY zS=awoclOFslME7a>TonzA|oNIxODO2p!KIc^zZ)oJ^ANEiQRSmc?Q0gg>35DuLCaM zsSDMQOKVeHYWjv(v%T`cwZeTr?pX^;h)ro)+8KFcO6;oppSPVmz3=P{p-RKtjMo>E z8;agUPt*95`!sB>?@C$I!}@IcS4!W;vMnywsQq}hQu>RemAannYyM}i4{5IczvhJC z`@VH@SGH}*{=QMB@c-{qYo(g*8k~_e=PA8jz5nyp#mxH7UbpoZteSo6i{-Z0MEIZC!pAr|@i6U_yys!9eesM-=&WbgcH=Gkq^vLARJ-&Bu$jpNp$HSL) z7d*KovO_&xdGCr#pNb<=_jk7F3mHtElkak5p%YK^X6Nn*+ef$4)s~7l-}&-(R+ggP z=2vYyvORuocD-n|x#Di)WDosyR~9dsd-tz)(V3<{KUE4Ws-D@HrA>XY`NMVZ#|6(_ z_TP&y+wi)g;KT%>6`7gG4^GlrbF(^T`}zGZrgzNO?K-Hu*=b8~oSX0qo1)*lNZ-iO+FmF@o9$UtEk&^?dwh}b&D=}>~?7R`@O>J z>_6A8pPnmoqZpGElLq#8@In>!bnO=M; zb+3*l_u=cy9<;xAdv(6^+_tyHcV@@M$J#EL5^v?n{&d%u$v?jDiv96(k%a9%-P_Mo z9nbZCySY;SgV6Pfb(?rJSI$iF@Z?ZrJ2>IfuN&nn``+GI-v00J;?2$4J@7_9@lx)$!{3!Y=>J!-eJ56> zAkW^lIw0=;BO^yuXRp^UUMNl6|9?tL!Q!w-_f9h2GSu0uX?%Ls)(@L2{$28ZxRb3# z&Z3huapjN2ztw7L-&Nffl0AO0;@q8LN!jo9bA!|QKdOHCd9iw8g>9Dpr2hG3EBzjS z_RYN&t9yEB-ToToeP-ph@8$|+@bgvNm-pEf+imNA~TUt+=$%XvvbaNs6k9EfOrwr(Q2-o7$%*_4}K<<*(ZFOBiY@!#L_b z*6AF}ztQ~QuX@3g5YtssYxna;CU|7pKCRAsE%EKjImbvbQ{^iAZ8Eyfj-kx2qO4*b z?T(GR-!oVJeA3f(GQ3(_xu1VEmDe~@p>x5s3LF331K;nU)OxlhG2K0TlK{q|bR zr4`km75~&;4U@h3@#xF!uhV^m@=ksau3J{Ue|3$!p$kfRU{S&{?N(&w{Xe?yj;VzW zJgNOBbuKLka^jmAoS7;S6y;xe@%qjp=eu7wPu5$Rm>u+BvpWB7|7oxHI&(R$R-WD6 zpJ{$h^X`|wi|QxsJCT)ebi$>jSE^_J<=Ffu>6P?nvyAe!E!P!as+T^SyIR3L^YgiD zFLX}D>vkT^eOz0@()IZH!G)hqmt1$(ZksaQY1`TBCfgPFZ<5nIe*VRw?aynrz1E+Y zFQt3^;J44OEhG;+oUTAgS`Px7WsY;-6o{Uo{Q38i&2CMn4(vU?@%NKRk?`A0b5~ay zN}n-UvSr@3376{h3qD`#{U&tc#Km(5wmkkN6n^*0vp=C5WQ;aB{+mb@#)KiM_JN&%e-Lvc@mG zykC!X(#L8nMa(|~iDs5SQ?)~J&F8$}?mb>pyy}fd` z$OiRu3s&r63)80UkM|17+Hlv`N8|GiU61Cl<|G(PGdU^3TMXSXg-O=F- zo*!bpvc2TRvuEYoWsaQ}KYpVt?zfHc-niPd%AnUP7w&Dj^exHlU4GG-O4lMWp-+A< z51B-&B$v**W&Jf$ZGX+=by+Xh{ktXo`lBYNX8W$!f1B*toBda}Pq}2PdAe}h(5Vb7=d0uEWghSs$u#ZhmumjtuwtFY{_Uvt8Hwp(M5+Z=?e}HmWV`YmvBA zXsUFh%q48yW|8usCy~5uQ?6|(XS=^Y{AK#j1KEvH5`XTm%KhMFxyqX}rt?uT?}wXn zS3ACKzI^S$GsD$it?u4P*S6}8%l_3kp=il;y?|K)+t@!w9zC&s)#X;pbq4)G&vf2v zuW`6=@9_+|z4GYJrjvOzITep6NCff4J!M_FeZthF1TTiVttxzz4_)4nRjw!0Kljqk z)JuiMruv!9Am?8Z+;j5&X&Zgcr|;$qb?}ySQ&$hnLag9#jIQ`yrP+P5ho6Mzmw|-qKd%LZa)$5$O z(l?Kd|NhuNpS&RP!r%3*H~Xq@Z@+82M5ZQ6cgdcDhfKG2=Pb4;IydKfyqJ!sMN_zQ z*`w+2kH6BtQnGB*-&mizhtFz!Uu>O->L=4BQy#k%y~&-?zR#gHb6M`|?-Lft&e*TZ zTo`%OqUzb7<9Ywy{eOM?Yop>))3>)P7b&*P-p)4l{*2vm{g;oXPkm65YkX^WRmtL2 zSBq!0UE{NTwyUCAEsoFQ*kta-rYo*YxU|ov`+o6jjr;ZP0s7LbpVrkKudt6j^zqE9 z++W@5md|QUS-0Ojp}qd1?|1zls*l*;yFK8(eC@%vk9FJpyv+049GgQ{w@xY2pZ3mk zX7{Vb3sqLIv;QCB7L zzKZ$sQ=)X2Ot~ms=-&15-n7G2dw#!MTKMCY^uitGMGb6IKBZqPRIR;t6vKC3pI5N1 z+p~uE>w&Y$H6P|~KlGs}!ALCkyo*oT#Ilf6&l5l`?ECkW%6BXm+qpk_pWtURxhs#) z&rH3#A}8Y_@9HqOzHQzbr3;pDCAM=J=vK|wyEsw#zSIMwC0nNa;$A-SUQ~{^fbPRR zCFl2vOlWDnZM5<85y>l25B}BeJfVMe+p{UJb}+wGn_A#7Kfmv3;Pf4BB?TE%Cu~~& zoN1L*)P$lxTgtZlKW#7QuhVg9zVF}EiF@{+GJGFcQ@=M3HICNnT$-@|n;6@!oP*KZ zee5Vo;=K<};lMx$Covouj zX}{K$4?5+&T4$eC@a;AF8&6N({89Y8?v8w~1-WMqbNJVt*IiPU|KrZ`4@#Xq&It+ERYeJv4-*KVdJL4-xc@yZ5GSi_dLE^Le>JgHdB@jThr zi(40-`Cp}~5NW>3>&Cx8!O-pvYD(q&e7{E|Ybx*BTe`Zjmp`30eYt4bg42QzjF!m! znPt0V3ajPr&*u+mKh;ocS^8-Gz32~z%ayk@2U*=rO?$)Jmo9SOeBEl~cIc%!UI`2J z^ObWypOu>_*<`=wMoVX6X2e!)@!g+Km(J{yO!UaCHEogJ8g$qza$fOs7JD0;THU&B z22#O?E^n~i?z5XGwsqP!Jr#NDUeAXsf84wMa7Xr{{dyNBCPj9s+^*TjAMc(e_w}A? zw|U!+?C&4s@0uqb?aPtTTI-aW%pGODd)=xVX3UpdHBUFDcuwoll-#DqYG0=x^jyb! zSNqd_4{F}NcyQ^A;?h5JPUX@MH4NZSOpP@|}{9-Ff}h-)}*S*~S=+AeS{%+UlwhD-0T|d`SLUa@N{z$QY_w@Cf zW!G;#|N6=Inh)9ACT!ZfI{NwEY4h^0=>5IG{BwrLyk*7>sy`Cy(<^=Fn&dwOMiS;q7&Elm5PgqAZd&9R)$ zXJ#9Bx_Y;!NwA0J`{kx*b5B^s_MYf*I&*(kfw1-#o5b=!;qtG%Cpe8B~Ma!y$=lF{ItaT`Eu?>9~RXsJv%0UVJVML!;GcA zAire3=K6MNy46dWDX9UQlP+(3njz^Ia^+!7@$Rxi5t5vVOJ7GmTk><6+~Fx5dn>9U z_v9|@DEW4y+vIt+JNx!Ny@;Lho)VvaUcdgL@LzgZ?&Vb3mq({ovD^v;6_W2RivJP% z_~A^#9hMGD6j5|T}Ph1Kgi_l zbv?-0Yo|ZY=L5^*VmsTHu|NKP+B~VKLaL_hcG~Jwg|^zts?(D5X0c2)oarjDJ+WWR zFDl@6{ko@B8!w-+$r4{<^WUxF;XcjAA6F+u%$3|zRjyYy*Jkm4i%nLW_Qv&9p8oCV z^iK0kpYL)1XYRMwou453tN8ryojYaDD5koX^Pe-{{;;C;t+<`h{OYtbb$^ntn*C*+ zvCsX6_4lvm4^AiwI6VPrRkFRRp? ztQ^oR+BRj~(sSWk^>rrfpT6k3^k=gdIj62GeN(bp%<=T=HU455k4Am_#rb(QE8OqD zpRiP^wr*XnyO4d2?8^ti^@U$H>2~}+w8iw+&36+g^@3`Higk4X_uG3Hty~+tdtqwz z-&3(WCH9%QT6=x{$2O-(UN*Ess6@Fx|d67`dgLY5O$w_D7+*$1ko%xt!oxc3-FW@Qn+1tIing z-y|o#?$ObAQHLg6`g+Ch!M%dJ?BD(P4qU&_arNEwsk@6N#D_lrW4h5q=vBr0GY8{s z%wPB1ynXCvMxk!()K7Pxf4?tti%YCrcf)=ob&=$2@7-d;47*lKU$}8?VQgFTXT2O5 zA*B<4@92M(SmyTb@O&Gy$EP4{d{z+fh9F6LgYU|5ySQm&iUvm5~)$;X+1t_-M{bGOe63qk z7V_=fa+%7F6BaeQ|CBrZTX`~HT_$P1lTy)#CC=k)B1lFn>T_Vx1eL1z3J9-8mxS*B-islJq*&ZpM8 z{Neh0(H{?&D}VTznVoZR@*U&1j??Ad?>jQTlg|&etSfD?>su5#`xEK|S);7k{LNLJy{>QDu2J~;*z~lv7e0pazjZ=6uPkNQ_RB5h<(AX7(Tm-i z#nojF?*B8nq;LMY;LZ6i&(0rs5WM@w+wU4b*Qgw*%<0DQ_-6RY|= z(_9bTIJ`8pB75?g@ZLjnh5y%j9jZm-QO2G_0u6esi&y_%75Ag3L2+re_IIwm={(<${9Vub=)1Pr!`>at9QGj{&Z^G?E?y|QyMOWZ zS=Y|#%~_l8=yuc6cAtjpmC4+T3wP^WoVZRwPg-({SKw;*8SWLC9-4R83(ex;z14V> zbLNf0KRl~uui3vc?#0WU3m6Z5yJN(gv2=C_Q-gHdt+W!WcoJ@|UA+-Nw>6-VU1I-TuzIS%35CpZES}m5~P-w(R?LD34!L^~vP= zeWh#q#V+iROM3lb;^T_W%H<`FoqPVo`_FMcHQ#7SiRRbpRgQDS-_3ck-uO-27w;=K zrx?z3-4$}|)!ZpT54_8ZQ=Pdlb!&gU@m>C|`NMf98TTqipuVe8dd!85UcFzfVlfjhnGHoFu%%Y_c!@D+m4mx zwizrj*)7kfx&1(``!>7n`fXGGYM-+2eD+OGB-A{?zs~a7()mYb&*sb8{&#YB(uWgk z1a9jWJ(1H?Tv~JA?dCn()R4B%^PBnVP}1essnd0i3+~?M{`TFR2g|uF>vkz{o&Twl z5ckJ1=bYZro4eAU_g6S1dc3@4l@@gBxz7BZEie1e_g`61R2ejlO+JiYQ`X~wvilw9 zZ}YD#a9`INqwHQj;jxBt^QnUi>&jJSDl1#-)al|`*vyf_5UvT%(Rm!LAPbaZQuJ}CFa^a8o_iJx$EM2g} z%l`a3Zt*WK;{M0~|J7dXaq{uKbxUiuefm3Pzt_cr;}!8W55JmL6gi5-_221UlDvFt z@afPA=bpW_+@`$wezkgxGvm*lQy(Ac%RcIqRj}e=hsYJ@yI~%KwUi-I8S@i6^bx83s>*1=fD2%lKGOFd-{U?`W;Cg zFP*HW*`6#9?SFCexUh{`wQL)kYIgaxukXIedhFU={pG~>L%EVaZl7BF<6Ly2RdCq4 z&d1LWe)MLy`e0SQ`Bb{n{oC!!*kAwkPWv})PX3GXiAiR+tacZ!*uoX3>26r#%T@QW zZjD~{?&Ll5-|jTN)O|mEvh@VTr8V`1t1eXZjBn@9Uf)I=k-z^G}Pa zWo)`{nQw1ZQ%sFYY|S%$$E&&Acu9$>>5q-#oPCS$Z*py=LDI-T5hXsWEWhV)-|JzFw|gd1t#? z>+;0U7lZz$_ODi$yZ_{IzvQSdcCk`lF7#~Obv1fj@8g+=e{bLU_r-)wcP>l_+NF_t zaY~6l+Y;I1TUPwFn&swp<%GW8`xy_G|F^5{FV9Z@srqm3N=uXm{kpY#S}fyET}-M{!-fy=(d{C?4^H*3uQdb7{sO^Z(!5Vm`O( zULKHK74~7Vv)5xQ&8K@eE!^t-{@zWT`JaF4_krHU`fQ$k@i~_N zcLx=tv>;<|?~9$fO>g?t9ffDIY6{&9{=M2O+Pz)=qH>tJ)~kTKH@dE!%Z|^9w_1{- zzEt~`bP(Uy3z9vT94&Huxom=qCQPX2QrCX1yI=QaVZE-+^@h3Mey=VO_EZndXFNXP z)2@}@RV=e!JzIPG#nKy7lYd@b^zG%hhkHKFsuR~pbF{jba&mG>pq%#li^@Cyzum}L z?(<=*u8`ETM*olVawY98m%RD^XwJEJa(nMjy=w9(;H9ODoZgkmvY@`_dEeN@=NT*g z1K%cR|FBDlMJ-`o-}rO4`b%_Qf8VEL%hi8nD|~tL>g^2K*?p$f{mJ!#t$EA$&JsU# z`k>+DNyqoDY@1TVFZpie|34pk68@A$+8kSZf3agnjsL4C>pA@+Vfq3i ztHmC>yY_uMR`tjJWzc5!l%m=jo+ck&*Or-!q{EyE>ZQy%-oZhpG` z;^|FuW<4wWn|kfq9HTRx)(!J@yN;br4v**2v~0g*RF~or`Q@bI)8l_tPSn1u36?H8 zH}CkdH$pnzrw-ltT3yooJ-OH^_dSEv^()`x9=u4HW^nT7{fSY|$hpu{_V@>x#HD|} zrv1M5-aW1D!O7N(5wT_vuY|iujg2LSIIj?^_oKU2F zr(C9#OH=>v-2GqbU){KOw=MbU){gU9$M*EHn@sriY_@bs;EXd5rV4oObLXqvzj+_> z_|2qmR}B{jHFd@p3_xpg$l6i*(_*oeP!w+#=t6wU@TX%KhivE05_E7TsFlf9}|PTeHXB#?4zR_E( zU+1{)-^1LqC*nu&=id_*Qxl)6gJyo7afO?1QFwl)GUu%3(chditLp1h!Zz%k{qNDW zyyJg7pVzBr`68!I)wipamt1*#KS<(*p>4ix+Hd=L(Oa6c-~JQ6F}Yss=vCgR9*Nk7 z`X4*YoxQ@hy)RNfzHwi*I{Sn0_s5g|UE`6_T3NL6sLJx}*(I01&-l9g<7(ByUrM0W z64BRJ)(Ts7|Hxjw`179k_fNBB&zx^FR=Q>m&;!kAmkEKHgfi*lEe? zFK#pCU;OafbYpwZbS};C43EghU{m?}JG=E|W4ArNd#QEz>nD6w=>pG7h}8Rt2x(je}z4pbJL`aCWhSB zee*9ixmaoSK6&(Lj`EM?@k(`@8oG;PZtjbY{%UP`$lIEI|M#*T=l$)3u*DbQwi1*sNqJ4Vr>z_PVLD)_(J*l#C_f>04rxWxJ0(d7m%)yt`VR{ZV%D z^~dkEx4+D>lkC2Df6M4RoW z*C{NSA}l#G^=gN8&>D4hH@4*uUM?;CCA$kW8td8Da_5s=X8k*3lOkP|DEzCD>%KZi zKRYPrRD3GiJP`qXc9rC>?_z2XPClo1^Ho-e`%>j4F;gaV*8fs_q`vEJwXU;QmUhJ3 z+iO%!roUf!exA(|(U1i$&;Lt)x0P9QWqX;z`aNNXBO`S_200k*vn${G_ScE65C81X zUe%J@_j|$}an&Ugs~^3emVe|2Z}oRfQQyyVS~Ba32o-7h|WO+jn1z~}8U$Grb}{`hD8@RsO0b<1BR zEyfSZPzq1gzZSBNsqecV8SvjRJm^3Dr4NVq)ps+WBrh-Avxv|1Z0?I!@9sD6(BG^0 zw2V_zSR&|BT=nz+y&n#xFJE_1J}l?Znj0l+ywAH=6)w%2|Gs`_5?_?{?tqIIn$}!? zUV8cal@oh^87qCZ+B&(2#aeUy(!IxDwO40VD8;VXbn&)s#qzy}|7`KrDV|h$L^k&B ziWT{ePWLo@`aBL_f4+7*>lEj(7vC@ZycL-JW1?bezIy6$)n?_N=T7|be7WF^U9DW8 zq-#a_=|mn*pJT$@iwplxIneF8@6Y$!&3UhOp$rK9DzxgWf8D)^Md7e*X=A6zGog@u zFXp#wHDSi0ka>a-Up z{)Qb=)cnFfE##%4=gl%bSr4gsCkykJCx5zPQQd#_^c)-W{6E*{lvW(n7xWhDPY5pK z{B$bYWXVRWO&6n&)p|_S-@j(ky0pkAOYS?)RXj1_(yF=;kDc2$>?v1!x^&tr({1Ii z9_@X*Gqpkt3Jk4@u0C`{XP5G>?@9oh3NU8 zx|Fo25s`57-#o{q8?!t#&u^I?{^GAkQ<0`iN@35P|Ep$4 zZH+#2%HyBP-914M+Lz3~l9zV##oyMH6*eYI--_eJm*uh*Gt!57AY6vNW*ki(p(u zN*Kqy@4g3us?{gz^jciMa_fEjr=v$LXI9)Z4>W&fv}DPmns?hCl`a(%`84;(ohu49 z8x^=NFaDnRywkW!=2mD%&f5de-URh<-d&scmU%tvE7OVbN-=xF$w%vCTv>mU!ZbdoO5fi-<*r{MPJ%Xi?_3T@nYVUrxt(CUEoJ) zcfFjt>TZryklyv=$ocagw9D_4ZWRA3Y?%L;agF_ie&?m38td~Nqo1eN_f}1u5M*VP zvitkzy3UFkM-jP4W%*h5`|fPF{$TI6_K0qB*yD{iUmGO(cIhQr1YfTSb?u%B8a&;1 zh)d_rv_{Z)t^0e|Ec4l7|AOxHet9&}lljfxdwX{UO@DgA{=UsMcK-7m*LtrxR`)Mn zvCDD#i5*NrM^1&Mou9IJ*ACBToTs+#0QDDs9(X@@X(^xP|LfJO>%>#^HrRY$Iys`~ zSKm6hzv-3o6RJNqja{NV zmtT4BmyVaVlbJtEHFqjKyw+yQ^`-N#R92?Ho@M{(#bfuqVOCCFGqZ=mYUyd4S2i1JP+oo*PFj1>+8I9`EteMLGS0hSpQvx^La{RL`_(yx6bLp3)gNg zJ^xG6@b?#~ns;9n?wH*R@2+uY*MEQU+EuZjUD*{S@1HP$R>ST6e#&_Nrj4QEFFZXo zPk#yee7ZF5>1svmkN4lrF0pAkvt=4<&8K${Bpx1oZnbv`N~3)Q8ixgPAmTw`yO*EB~|~f=gh_56=!-z-oMod8myhS z*3sdW;U1w0OCB!ic{ZW?>)GU*FS{>o*PeID8)emGX8oILnbX_OmbTi>SZe%8`t!BN zk@H#h2$nlcuUaBHW$~J2fzLx?&z(-WKjBi@o!N@2e>dz+W^b#^xcK|-_QQrc8my-$ zZvrh~^9#GSaOvS&pEaL8_he#>^w_w3fsCA{`^Wy!qW7`MzjvmnFID^|=PCPeY3!daKh{<0nYb=YTe;Y5sk7g{{7=uPzC9x(amV!H`D>x-pLRbJ`o`vd*tR-7 zNYDF}+ozAlw@&Jv+Pz@TiWx%l+CZ)F+F+(Ha}NrBd;Pcbe9Ie6_PzW#<-Nik$b_+|2TSziK+VyNh!apZb^7i8_1za;)yJ z?*DMb)zC=z{dMn023i&BHf1TV*SK*WTiYYEa?0=ZEgMy@_I8}oXo~*e2O8Xb+wrNR zdo$zG{zrpVdopT)Llr-6HwO|Wg{0%f<_eOiwg^gl=b)C*Momn`=!GXyua)O!p zKZd%Wb!&3hE%^IF-`VSW!2HACCIp!k|KEN*?acjY3%|=pE_<@s+P~h@vc|XT-emci zl1=;ic7~agVC{^KQn!dXoCS@p{vT%dCM>D|9?)TkT+}^u#^WM#YclVes*^@rWUT&`FqJt-wYzXMaaO_CFSf9mYA%CU=D6-28r=JKow|EF3m{3WMw_jpnNwBHjS+Z~z6@TDjPc}ngIhivTBTX)rtc9+PW z^nQ9p;m@PL5j|WtTU9$FZ%m6`c3(Jh&xb&RB}=9+PJX;eBblva;Yk+zyI=m!IbX)I zOxF43Pq*jmr!SqTw|!}+`-k-YvlS&}9H92V?0rw8PCgRd zc0ylSb;gthMPGKsf+me()6~AFR;F2tX?_$}{o;jEa$e!kmki?jeq`Csn{&L4X?_XZt{)#)l=i9vVwRdxO@B8z&{>4Sd+dCRT6Dg10&a{ZB zI=578mWPJ6v5P>&{ous)aalclYA^=VG&Bzgp)1KLcuwAAi>J z=;hMFTZuaLQwxQq;=I{6{oVJNLre141#OhYJVDA+#jSXS+;4G7{5-D`^XJYL(;xS& zAA(vtcOBkrSLd((bowjnWy$9=r}XQ0JbEPaYoe8td9>r3m9kTd?nH9&Th5BASjSkp zR(2QX?N=dYTM|I^y-4J)yDA1h{=ClK(tRoL#l{!AY)o%#Js&Zpx?d)Gs#Dmz#M6^D z6+8*qdM>j>bV;^J!TUm+*PCTQ>(yjSg06UPpTidL$-Bur#y!jSciG0%#Jm=G?4XKXFk++CpB=TMM~m%I51_uMT!z{dM=f zCw4V!_J~CnpW0w!$qiatlD+V=_0kK{2Pb?g+WL3XQSbfHm*#4JUuVB7|5A1Mi^dv} zd8^C!{Q*rQEKWa{UB2mz)D*tTpREls@;k#~PPu6A6+ z%;qP_%k2ZcJfE|+(fw55o)_o+ys9d1ai#kI?K|=2!23O-ZTlD5cM6K`J#l5wedcd`-cVb*cN*V`f!TGx@ zZ+E6z1O~nq`mB*UFT1d`x$oJBo0FH{J!zC5P=Bp$m+_J%zka?hj@u{vt-9wbZWYRNIa8z|Owu_ME*4Augu#+d93N1FTQx*sfPp zwbp$3^p(bxr5h%^@5-6}_uTBnAIDea7WkjL_TctZjkS3#^{)*7)IJTfvB+I3mhkDb z#$Eru$|4>?z1;U7e@qX5QSQYR@zU$=jM$#Zp`|NwGu@A?POFRL{dsg^&pnP?)iKjq zJ=yo%>3+KV@ryI1`^v7EzOB6$|ES(AvmT}FDOqskP?(kOk{z;7dv72A{pg|O!HT3r zlRHi2N-BR@`a-Wf2+3WXcP@5|ZLs+B6aW7_oTOSrzSefwf(f#dG5wLO1+KA9;uH?qb25&whv`#OJIte&{* z;_mm`DxPP1XfAa_X|cR?SgE))xoqm*9aDKX3WfZu%A8|&Cbc>z#7(j0`;*M)eIm#F z_sXx1c2>QT;^ArU6|H{$=p(0n>YHBvUY+0a=<0;nj*~jaUfz0kulJ1D`571P-0QsZ zr-=7={1^Wt{^Bl~?n`5Yc^|mN=^T5(ZZ3BESQck-zV!Rm?tA}ltg@~N{yZT*bUouz zZH0Qj$Z3yNW#86qYxs2VWp?55iv9PhceYGDcYR`zSMMa0y1DU^Ad^SpZE3bY)lO3d zZ72S|xGHw1MMM$b)33T2dGB|vI&_TZ#3A9x1KOyeIwcX{`^QcPAUv9hQ5mG39;VYK7xBFLRwX)Hag^t>M}m%=BfK zM}v0j?#FiTYGgH+UeQ1;5aX=UI8Mbsl~~2XWIt2Bb@}w8kNxLGe+YlS_Q&MoVt;Z1 zdF1BizFt!D=luqYW%B9yiN<$?%YDBbzwG_^quU?Hx65pbR!NES>b`jK>c02l$c*=| zuB|;|^t$wKV~tP$z2(LUPpb@;{Mm3z*5cAPZvjcs4@X~a3l!P3C;Q z@99?Y!_IfM9+(i{VY5?1>hhxRnGTg3ws1ZDD*k+Cl<3dTp=MjMwr?zvJ$*>#rPH-{ z(bX@`PnZ;B6@XIbSVin9{E`(Lrl{X#-v9As=)cH+#n1o$pHera?`M-x*s1UCPGX!| z_1g@jCLapg_%vgsx9r{A*DnsO6HYfUEz+<1;Ain}){EtvSyR>4B!{h8EuOqr@u@)h z-=!z!+nOIXeyYJYHSA>t!_1GBrbjnOPVl?{S!vErb);KASi8RZML zCzh^~das`HNPph!k6X>1N(H<60t!C*p6&bH71u5pS0$@*K~88&Psd?ai_qI0eR;PZ zUwGBMSNfLKmW=OSCl9WEUG{MM=|`n<8}y<#m8#Mqj^Z5icXMSL?(5(0SlStRLSyx{Jg=Sgk+wBLT<5R8W}2%hn0ZU}M{lKc zN%Pi!J-r)poyzyMg@tzo%q{$#A3Z@=S^eE?p%t48mb<-m{`B$kiu~O2eN(0_UAB`q zy2#7WG)o_}AmP7hx~!e?&23k27urADI|DQNrYtxhrgKy5amg$B1vFF#^>Qn7>|FUBHnJ*=x=dPJ5r~K#qbJ?6RewO4Kd;OxhDLM^{ zjc0yO@_OljQj%*f4GVi7?6v$sK)J5nKD%<;wzZxISH{Gs!taWjC2p0EyDwjV^j+I5 z(d$Uuk9Q{z-#f$=V!qY#{xu!<>h$e$&!;XhQrpZSd^qUi-R+0J%-FmqV0V($+D#hac+Z(Gp4&Zv5W`I0G3NlT`)6$>Bw zmXKV=*|jQ{acPNU)ZA6a!j_1J9Dpvzs;|xguemWTD!H)rMiQGKF9&7bq58W((<-T9F zC9Ck+p0BZ8@sYDWZ+11TNdK(3L_GYKwZ`xGAG10qeeMNqvsrVaza@_eJ z_28%>=cb4kLZE7U{Z^E5o}jE!+1ZbuzW?vMOUu0~GeGn1lw{{}WxLfZ%d=)(xOTI5 z-aPId7yi#WE^=ji*^6cGRXN=aOfuN(_G!3TYn9q9)sft!Ke=#UUt0J+_CCMBmr{Ex zd-y>MS-4x~MQ-)&x1PUZjcfna{S37hVR78==UP^rGj}wfUH|T@0&lMAl9JEY^irO` z_Rw6)tcX%gOxZOl>dOhkF!S3&bD!4=Z>%bpyVSk9VAr4uSMn zv*zkgPks67-Nm0vF8ThM%sO#L_9FRz_xJ19y{me2zbVml=@l823c+io_Da|OJCob0 zUkS~{!71Z`$Ie z60*Cv$jjV;BrF7r#@g48}=UI{dIq|KI zO=RS9*|adXxEZr=TL;En@AysrNE{COEoDnNsLbiuMC#=xkw}Bb5hlf*uQS}fuGrpEuzt;j37`8nIz{B=4GP5EGwb6)rI%-(fQ+3w<#`sN;c^1-C$|J;H*#wX*~cehjoEr`t2 zd&nykaQbsb$L_L=|1Q=FhrKy*?BOP@IoVmR(dpMiMfapF*t=R zc}wm2?K!CvU9Yu!uij8mt@iJFwf4Th&)7gk?)JXV8%yWTsySSIKQG|;v8pUd6a4<{ChfVRbkdq4W{H1c)H;_Ylq%6onORt9^mMOl=# zWXi5tdlya>bKJK0K4?kmd>gZ5*CI2cQ|A^g+bJu1*VgLr`BNw4{ht-&ScT6wdi%h@Y@~(#W?4rfRVgIyTSF{ucy*U;5UUOpgM&0c^TgBq1U7p@{jqk14 zJgJ@H{!Tl@drZC)+L zr8c11UY397)2;9MTQvPWI<@M|?a&E3XTRou@|bnMOHJXis5=(7%6gwfeU*E^|48YQ zDVG}2Dx}y@Ud__mn|J^FZ2mm=z=Z`O6-%EeD84uG3%j=X;-k-+OM^q+-TxW-^+w^J zo_qV}fA>A0Z0wxVo#wO8!}UMUCz+zp*LHT_uQKMT|9Y=$WnlHjcLzLW*00!FvwaQo z%~!h8XYQ7#JT5=|xbSv`{2hZcvD>RQS5FGEx`8tMHzg?i>NU^I*J4xl*Jo52)a}-h zdwl)$OM^eNR@BFfrx^e2vxqZj?p1qN{{O$s0 z)sD|sc&`~X7Z$ll{R#TKVfg}?^w+cI>UTbU@#57*<+nelmfn~Z+!ndgnKBKaLAThn$%lgl=LWWX`X%-}dS2?p zrCLE-_U`0Q|cXip*7ls+(ixzB>i_>)fXg@Fd!-t-PxsNrD&W@4a>6ga6dCTOY zj@|#hZnRt|A-qfaW8_f{+xrdA`uud|*2o2UDb5cIV4Q!q@|G)TdgI5ZH3HEdnu_l{ z^mR|nT`#+IN}NB2L!6f6e^5)DQxbCO+2ifz@=jHSOV52O7F|+o@+g4u*t+|@@%!Yv z-P7A2tn>U=mHWg_&-HPF{+*KQ-G7azo)0^8)!+ZaVPWpYpraVx=&o`|j&A=fe|OWI zRk@dv|6E@DJ$vH+x!VsF{LgNzsx>)cdNAEfv(y&D5tiM3k==c&+W#%9w#v276`0o5 z8>y;cdB0=XH@%Y5=>4zX)dbJJcYL~fdSb{4zduEuI{PeY*S`IAqUMyKc=wKjD{7_* zd1aNq$*3-W^Ms-1X>R~{-CFsyr-tFdH)iq9blq81zD}<6|F1n?t!4*ryLtNSrN@63 z@3=TS$m$1La?RSjU7-lPy!e6Ze-+Tt8GBnrHEi#9v~BY{o!^v~@z&wqO({@!_RIBF8=MDWa;N?_31CW{=Sla{c(2cM=7gzSuKZ1-^HKhZ*TJ0P`BgD zoHEw`C5}_%?wkLf6X>-v`vmfUng%W{Rc7 z{7a7R;uhC?G5=#p?&NbJU++$C7ym0{y5Xv;d=cCV;u{~V=c`>M?3_d`> z_x{4;pfAd2P^LB3m*LK|Kic&cXeW1X^R)1-lpR|@926K zwZ|u24R>+8`u4GI8}GN~C&i1WTX4VNvd5=ai*MLb`S{;;rmYsAd@NVVR&J_r zeP$NtTbRP8vcx7Xu6si>>kQ%Ped*!($II_=9bT^fvvzlewB&)f#w@4RO zeX+CIYZBLA`+9HfgfnJW&U4Km+l71oA zUY>E&R{s9&*EPPq+uz$&hFNgsgZrsBx#pe!xavUN&b z#M^V5h1$lAQZg?o2k=wquv$?$7`B=85n7 z<+dVDnU_uW_P*aTQ{^+hM*I_q7AU{&Qvc`E-w2=HTisiK`)7zhz49R= zHX26lI=^J{r)P$CJF=VPS>8@5jX74qu?6|DuUmvE$-_GY|&^{iS;K`G*t5yYsy?O`FjQH2t-D5U^Uw^Aj)Oyp_hPU~N32vvdW(mwFlL3{)phbc6PBKcPG#R;tDZPpZ2hze$T z>*tSzPIw>tZl;vZy?LGSd*rikztFvYeB%`l>n3~9Sb2#7S{L-o=d2o9VgHb$ZnKVD zx$l?lt!+hjZoi!IXKR47#ZR3j5(S^HB|UKc@1o;>?$EV4Ml$PHly+85>CK(1VS9f? z^!2|%pFemdY>MOlyAISeofU(YLFTVH=TP$b8k1X^LLF#BUnZz7E;? zdF{nZbJk@Znzi@%*SP;jUuJJTFnQ6tV|L!T>p}xEXE(lVl#YvA=sqjeZAD3Go>f$n z@YJolUhV?bu!+lD`YOV&Y)^;}Y%Tlj6`?1+SANbuG4m7USLIe%gSy^Wf4DdIhspWZ(Xn|uK(`- zoi7#QKKNfb|L~q>qtu;KlhoU$ObIf^NFZ00&wP95pc!LldP>^7KeBiInaFm*>|lYZ zfgQ%BXaCkono8%+y?Y}%V&UnixDVb({GYkMT$VrAKhyq~uH(|rrEk_3-CbHClA65r zPdcc3sBG-~VU9l&(|5V+sg^?bb~1f>e#WX+F3!5Rq;X=)Q&6cb`}l88?0&ZRdd$&@ zDRJ}q9-scNs5qfymFGhfQ;z!hoxJy~iwjnKk8-v2KJ)F> zJI5$T*0kfx9;bIN`gn7tqgC63WrnM(ch|`tHCsAm7V4To&86YX&i$EuD02ooXuRxr z@AD(F4sRwVz0I5Kdp~S`r$+SB^Hf^Kb`()S6o|=05>#;RLb5^X_{HMli=X>)lr3>EFESCHI?M|V{ z`8BuN&hOuMtnAM12Yz02H)p)RFeUG7{$9zp^jaZ<^2d%XvRV##mAy}!6OWgD{WXp6 z$=tP#_vhK{efIsN%&CXl-Y=ebeGcX*fY*ATw^5U;Z*%DD<}6wLe&ta^iG6A9dB3Jz zShw@;t=L+lUx7}>mfv(8m!5edv(wBq{>)RUuX8&yT*Bvzt#-Z>%BlIZ%D?+w`&ahQ zg$tGlJ^gxZKKreUcNe?g>Yr!X|6`5NnO^&bc>UhXd2#L;=Paj830jTTm-uq3 z(hWPS7un0rl9CKbJ+NwvzK_3!+})rH3^;%%(7S}&dX?BeRJ9ec{X6y)LsT3;Ieo>=s#CoVaB;j*2)v-_uI1^)dlD*bWm z&evb7Zggee4pIaaA{g=Vszj%2XXTkJ+jlmmS@YXGe};aodUN{~cWg`7FR?dvm13*Q zpC<)XXn_Vx;%97o#_alRYTFd4f?J1uXFC79xiTAkc1!=&+Z%N>xo4(6FPYf0Iw0

pD*f6d6)TDN_^4RcCdlG8oSTDCn;<}bPK^t}9=@scY{q5r_i4QT*btFD^RVao*Q16*A_i4}P-g>&~dZ<;%Qisyd*O)@hBKz-ea8Eb#Vu-nT;nAPMb^4k z^5XBWyIy^je6{X$k%V86*IEr{r1Kh=Ou6)Lb>c*kAmu$n=L0hDK~KW!_(7FIMjN;qoE>bra*(+ikY7_lw=3{BYTx5B(pGOiycj zz`Eb1Vwud<4SM@mol|`lXtu5Ni(Pc>wc)hvw$kg%`L0&5*(ep>? zt2aji??qj>V|GsbyFcd<^XKc1-`~4E$+bwV=-f4n`)0bnH-EalRr>q;RBlDauc*6r zwTt!k@7y8!cXHEK{+20u_o7_<`aBLlTdb;K6W;&pT3Ja+{I}#&TRgU}D0zJ9*pJMM zzdzi6H~Yhdo`lJ>PJ1ZaCyRSbMexKtgXp7L~$d=%(zPp}AZ!%r|Jli*SuE$yZ?Gue>uJD{X83ykgKmZ7KJOm&*9xu{_I6y z`Ar#pV}I2xr8Vc5bc42Sc&!vgi=M1Gw=^^C+q4@e-Qf;@cj{>4B&|6sv)zJ0=QoC? zEm*qP`>-izx_Hj%1N;9>24&2G*B0`(w@SXNJXzq|Z*bdMcWJ_&bkMm>`(uRKITKgj z3XF)$|C?&bS5>9=z@bp}UWa{yx|rMJdzy?@u}^O7VcAv0t1tR32%A&(x?VN#zhiq+ z-e14>_?#Wg9j7!v;|C#EwlCPcyIy}ynxmDQ>IB<}pw zQ+n?y?=9(DdM57A%|#M>WM=dn<#hk@Gw6O6$SqH9{JA#A=uh=sJ>G2lRQ?09*ZYp| z(OepaHl)0=FiZV`L9~FncgeorWjo4*yb@LCwyJBrx{&yB!lu>Fo636Tt<83;3S4R@ z3>xs4n<16Lt>_+Owd4w`i%=5Z=L2VxYqu1DHr&3?v+Oz1hl1N&a>dosUe zX{Y;!{VSZTd1D*by_1`>F4yVELMG6Dc=xo{7p9Y(E^M?|o-eq9^`$_0?aArc-=8eX z@aezVzM{t|WuDdY+3VKcYt^c^`&sODJ-5VdqTJViZ#Pxcq!l%^?T*@DykyCgT@7ft zrT4N~c;V8vsX<>(guT}Hi(Wl@pL*NUq|+CJOm7RZ^_xQ948(e3o~||E&(Oix$T&4{GWA^loonP>)yPkEJseC4{y(r$?PiD>?36_y2TY zvBL2uOADqIT+>ZauiIcGW?rzcDbdc}p7O-;izb7Z`Ix11>YeC_eB{qg$* zy@fY#G2XCkX>5EYUk`J}Gzg_H)*ypP#wqd#&_FZ{Xb0 zVC}od++O{v=jd^9m&B?sbvag1U5`aeE$&}Q`}uRqq=ToJ=3Z$kie*whzAyFIB9S?t zVlF(sd)Q`+!JgVZ^X<&{{m*0hcV3;*d-A3d=N(tq2gaW>-I4^F%zH6^g|SV(?CZt% zRbQScEqPJ2+I;C1^s=EU_sY*HyC&X@<(|L(eC&Gn8GFm0WwbvydCJOUOJud((v~To zYEGc7q?9*;+J{0u<=gwjq0$o$km&(P9avAc`H`9Mv}{BySxxC@s$ zY(M{|H&*UG6VOCqNPRlWT)r6l;)cEi&(j*$yKU$tELWA^v3igy-Wk43kh+aBT_ zT(gdGb@|g*Omo}QS#Iz0Rb5f?`B?a~mZUeo?%tRZ+cfDj@2;0oyLf)bH_d8Zbu8@d zs;@UEFLymFf7kqFS@BHgmB;tKRowo$ygSHitqxiPB73=rRqb}e`(NIN{y4LQ!Dgp{ zRPkf}g!n+#D63s_@>fq=x@w{5#CC2&vl8=pQ8LZ#X)KSwecT5=$V_b3?vD)L#KSYn z7p@KnyWBG4jMAB&oBjLO-)VclSGezY9QT&eN2iRhoSnT{LvyK~I)>FP-hEE);zxVF zT#9T4ovpZ=?eV6rz^KbB9GBklPQBPOb!Bem@pHoIpjNtD>zgaAhM>8;`1#xA>ObCU z5 z`IS%7=Vd({D)+7A<=na4WX;r>bIf~oNu-=EZ3fAd5PLdB-&R)C! zcbNrfyW4DO{#SF{EWcHovQC$r;A*k;>|2eMc}FG&U%fFcxNX7S;}54!YA$`LZn|dc zFSmTlQ+kPOTQ0SGpFe2-RRXk9`R%h$cMEicivIlz@LH*jwuY)Cq2$bxDTiKPE3^Y0 zp7rO&UXDMP)2*ke$Xsk#w_ksAnj_P$zIAyfTT2)1+9>*S>Q~T8!Bd^aQ3hh+<_or7 zzSZ5bt4c4!p>n|zE@{4J+2(KGPtQNXyq@*uKKWWJP0giOLeX-Im4VkqWyhr=jzI!< z4eyE1pD)#N{JDElQH7RJ(di3U?!Bz(-l}73D_+9){N}DSUiDP5RNvy+WzkVHzpcxg zvtosFNt)ojyG0WE>}rqQ-@CrD@v02VGJmRJXRNt&9opJ}OO1igxNnIqTyv=Ro6?JE z8|^^zk$axZZ@Iwy(<1hE%fIO{&zzf1P5Y)-+jeDp*@CP4p58gNrL-*j`WhSU_H{QK zm*49@s%-3B@Vg>DI?(Qt_u-u9@A;Qb*)@p=>AdSnp!I~upQUNm$++)-KUb*1zB1=n z*OQ!-DRVEUYF)}LH$6Ii=8ISFF50h`VV*v{GEyTsRb`5=U76J7Mc*E-JZe}`;b!n| z&Wq))oBCKJp5Bet2=-dJ8a)j@nCj#){RPkG1G$fDK0Y~=ai+%?bWQ;16#dZT)n#{f zG6{K|T62nf)#v|LsysM!yC=nQd0cAvwCv)xf}nlkK_c1P->U92o)YxR3#|^7t*CZB zwea1q^Y`a$XLN2ZJ5YN(Fz2-H<(aKU>nBDqyG!aGzu7L|AZlv(e;``4d4y_FtGWTvw{LR3stq-Y%Et^F04m%ALDnZ<-hM`D z%7h@RSMTO!aBKbFSEL>G?v!I)=-$t7r_Gr1YMI#*u_?({-^KXw_#XuwY7nP(jPI*f4)6=XgQyyruJRc9cxPl(88A5Z;SVAT|7;CujbM(i_ntl z`u(?j)sN1YZ4NpUQ~dAbFBuzT1obTMceGvO`(m)vMD^3g)cIEZKckI5Y<4yL@r7mo zy@VjUYO%vpf_^1RBJXrrIwh{&bjg(JryTw^AEE^6w$~`99eLw^;@{*bkEz$UpWt5o z`R#O`q$iIj@!eR}7N+uS?jg{spyYdOHCa=(|K0iG>%#YpOQ!_Q#&BU&&&g@eC&qy) zsl2*>$5-Xf5Zx^=*v=JjK-FrQ6O-3W^{Q3NJh>AsU;Pbom{fN17E@+9D4Ks6q6gx? zQy1ekPdr(_y%#b=TAhEp>69v``-H%%K4VSa7MZj9>+_H8Tg1ik-oA0B;qQ;_qO(8z zyna1~XUW|kF-xXg>PMg1`x?%r6g%(JD=*z?pf)di9QP6bd)-H_oY?DOS0;5Xqt##HrXBTP`T~6ms_R()^3I$ZJYmed^}TBJO>> z=Y=Bf*`%4u%@u80=x8lawt``K*6ekw6qK3UTc${+K7TN=D5Sp*< z_KDo>J8C&4$jctRd2n!{@`5Q!p6}->?**-Z__6wW81HVrsq>suleMEjCzKi}U!V8w zTwbl*sZWd5#a&+;=5uN+6}Wc3{K~0&Ni#q*ndmuu$CaN`j5Zg{U1S%lc+$cFB zr|I_X<>wVS8IIN0Q|~W2S-N1^PT7q!k4lJbakkc2`d}(k1b4h{gMQm3tgcMW_prR; z%)LB+zi3-H)8vgRA34lYr$4B0)qNh!=adrJC-WJ)>S4{jsondlau0$A##+A_@XLK% zHs#W3^m)Dqo4)V(&f$N@q{>uomRt{bF+z6m1{+Q8m8?%QGF}(#6P^6p$31+z*jdZ; z>hhe_;g0VW~&9;xwPjW3?weC^>g zL%Y4*6F@Damrv1M`e9{v=o{8c^(WL`1Zo$aSE>K=>TkrE`?DIGRYNm!UYG2Xo&4G( zG+F!6W-riwt3QcH-5@20YQXNqtvAX(UpsXD=jLTtGCQB2?Ctqa|7q&)1+S5jpC>eN znK3{2s#k&6Z>`%baPsT(5MN=Y%YBb6=d;+DrOSe9wAc;ix27w0-g)7xxpX>u`|)7z z``RmKqvLDhxjc@oirrbYA9Q-quWNi?_WLNiUASD#xHCO#Lq+v6z0*6Lr#VDj4wdG|oAL$Q$hueX}6 zD}Psdlfc-u)8+ZDi#M(3}X%&3Sp!&$~f|#`b5q2k!6Lo|O4WFlD~o`hsx7GjsZe37elvdQcv)~~U*ZHf; zT8jmWAMro1ywCFI!Cj8KFV-q9wfPT9Mw$E3I`&pOrWRZZ)bV_%(mFfm*RB}1=-Rf@@yG8|xuDA{npHzBqVM-S`{q{?>w3{mZ~nV?+&7{l8bMvZ zmrWXX{zoa~NxoiucU{n(Q|V7NDm0f)iJOU5Wt?5CmojltE_lADKVG-<@S7baF6m;5 zi`Phre$~x*zw6Cy^POB-vu|&-+%2NqTn@Ty=9}`pd3*0p4tn4vzUFhfhvw2RlhKO0 zEV=v%3OO^Di{)+a`+5+xTEv^tGh%}-v*Aovi@3ng9gZB;<>0R8}2Acm~w2*b?@>QlH^MuP8_Qy%J?^gSDyYC@rBq+!kExxkkmS#-K z^Rf)malJZM_|Jz6U$#~xIf@)xd%yR`nk3scpLM)K4D#CRUEfSh(z!LSQ_=C{kAK#J zJCd8`zpcFfe24kcDVP4CO*CGyIo0E=x#)50Af)~~w_-r99~v(uLsdlw&`db&ts>6cgNL8@1(*uA%6lG3~2 zyn8#+C)w9+Hj(Szp8hBxQ}k7o^_P1!3;%zW-pOKm_U(c86UvrHAe(#YhD{4UtZiJ_nTHL>L%=bQ9aNPB# z34hf=9ZVY|ZIzcCsOL$%T30LpIw^KNi`wDp zbiPUb^WEw~ZKa~D=j7j9GQXtsyTbb%-D&En53hSa0(BB@f0cik`rGD>RlVPoAg}c? zXob|XD`G)aH@hs%^J@}sNrBE8Q)^wG^z~iLo0Iz2mHJ|2=iar=$a(GHS*pD4`Mg6t zFTk5Veo1;b=s2o&M|x?RhM}7n(qHW@XnrUx;;!vU`S|&}_6alyAm4sGYGUgMF+(>&=ZXJ#;nPz1^pO&Yc~@Sail(Yq5ZF^7qFx zLvMfBTYjkU{uGD3?|$_Ze@^r8)LhDjo<8@y+9X!3_*H&!SeBu>Ary@AsQmZ%=-@E=Ko=-&M1P8`pkb#bp(~WchO@KC$q`yg!U@ z{r09$vd@#L{W#0pQTync&*_dhjGO%XZGrzCV@(Fo(D|AhB`vaA2M$isnsR;ni)C3w zKS5JY*X9`Y#BGo6=9~F{rQ?QLK8^m$V6T^`w_gN#tuzIlTlTIKv<25Xzx5&OewRI4 zUn+nm*DG9goll(x-JP9yJAkt!#qt_yx?$7>(baI^5`kGGpD z?pUi{_~tWt(M(0vrBmX9(W=lWXU$bAD@2w)`1Pg29(-_TO`VEb&W&bWckhcAZau8w zR`=UdTJ|`?Rdm?9vsJHUwQ^I)65L`innxN8NOM&m3BKso3KFowmMra&z~3*!AQ%`k$~}%6crg zJNd)XnToeuSGumzIam1koo))KN|HwRyuap#ClQ-ODvaiT`uH;tbmrQ}NYxX%>n}d? z>oc9qU%YOis5GD0i%SdJ(^;}V-r8PpHSel-OtF{d(qm|ix+_&)3sY~qyj@rS|Le}z zAH5Pb-J8Gt`Mg7&ph4b3yQRif{hxAlZOUbif{q81eO#M+y|87u*xGZ~X9i(OJYTnz z2Hi3X^uDM%d*A#xsdmGKyC2Rh650Lv{G*!S*`MFuNu9X%`BvSxC)Tey4(gzHd4kR< ze+ZgpdoguUv-=*+r6mv0a|`I0mA)^R_V2HrWWUcyU1WcxR6FR_zCQts=dPGq-#-^C z_EO6>FtGjY&eUH#(o$QP@6XwOP%Ox6qRpZ1xl^VDSv8;)!dsUGf1$3=g!`24Xe>iO-Rr-QEE=(7F!6m*@# z^3av0r8<=_f6u>bd{W+DujkmFAIzX;#jzL(UmMKy zb(UwN&QT-oFfUEi%Q94#PKgS(eD?N+Q|)1m{Jrw`O{zper#&27cfa|D@==X-c`m`# z>brJTKWV-3^V>V4IcwHj);pD6yA9mE%9nkfy}K;$-mQt?+Q+H@-Q)YjyKVDrOq3UNv{p7dw_$lNadq@+(^ZcjecsN%=dL-MoXM062FZz}k`^)pm zoVAYb*HiC*^YuU9%AJw*8ngvRMq^#e`*}8d9!&4h_ba#AerKye*}lFhL0+Jn8c|kz zUkm5b*ZtvE30`LPV5>sS@3Xu=KR0@S-1c2s_l%L%q2|+#J0mu4U-gyxMtt%&1Ppo-k5@o$> zPX7C8OE>RkU;12nz>ugngpJRKp= z`&e%FX1@K=a{W6$vVXaE_tr}*#nkX}e!r_`idz@RG*v?ndpmi*K01Faw!|FYa5iU^1RA53E{}@_O&DnBdi*Y9;gan`=$sySyK7>N2#g+OKzUXX%{& zIOnpUAg`AP&>JLGxB4`zZ^X^GyXWIn%Y_w|3Y_n(H*K`t&ZDmV+M<6Gf6<%0t9P@5 zswoZY_EgVEtJy(fFEVaeU-I4^ENc~?52{Bo%mfWi-pi6})j?Nv$;}h&nSFfCwWiR%v)0oD4Oc9gaw%IIJ#nv$UitK& z^&Mf*p3(eiN3+WxObou7k@4E$dn@-RrZ+X#>I}1PS#8u^&I8*1J^AOvAAh!(g8E%z z8@Hvp1nv3s!hGqJIB!YRfz>GIm+vm?*}wcHz1Pe7f6D6b)6-iYRPJ|KbGP1U`cs2B ze=2TS@17VJ)2Z6&4!T~ZZkK^qdeuFnYs%0l!6-nL68ead#W4D%||_>y_^LTQu!$70r0IX^#Jr#k<{~ z2Q3p1Pdt2(=}edJ^~ayS`*Ciuy}Tr&?6Glgkk|U9=xKgo$@k3Z_c?CMoO-`UblK_n zXSp^Vpy}MOz}1X0KP#ThymsSS=cZX|Z?sn(I2CJIaV_0iZqB}IVJ4d=gG$Gp80M7) z@)d@I>a6`SLftbr{uV6LkZ<=|9dPkN)4J6fFJf3FZ)z4>r&6iG*(#P<*ckC0^$`#h2{(gE`Zu9whF)34SGM$>%r}w2G^PH&S zXU*@TVF_h9R&w*@R~Fl)Do%Vn%UVp-vR({So}r#Xp}F+gwTma8TfEbat^3quqm`om zXj50=vUQwu@7|pd)F=6LYVn>uV(+XsecV1Z8nnW%@ck5qJ67l1xg#_e?R+^q$g3B< zV_Z44=~Q6IU5hHyJh{zLyEW#=Nc7$;dNYRXM>-}`p=#OGJra@?=9_7UIf@jd?A%g=x7 z9M#OUq@yNA1@O(ct(+k=vF-l)8yV4yl&{~5bJ#p%>6D;k^oDob){f2XDc}A0E+l#H z`m5r@Z5`3@=oQ=ZXtSM8pz>$YCce(&exS2G;y8V-CEu_5yR<>>A-K*m#pt?*q${1; zB%}H0&Yq7yGqXR;PW?DTU|Lt`?xGFW|8-VLMbFK@`GhO;{i|a?pP7MX5^KUb#kPX( zJTUM7dNIkx`H^>x-IO4&-{{d?tmQhTE#*^?%^~jid7@3znI=8hYs{{x?zi|sjIGpd zi~dU-DGw*aobK6F3|baH4?0%UmGQfo7<=4-2;t8R@i3g zZ+kZFmEn8P)`zn1@1M?ynRVIJH)8Ym9d?gF1yS_zUk}`3qe==p1$S$Kx|iqysi(?P z%#v7?Kb7g-W#K;`R;w09%$czAZe8zN*&Pl4#PgqAy0U#sa&Q?ZsQ;xd?wTD?`P{`G zG(esw@pP?M;p;y$1HCl&qFjEfx^&7ccTRO#*=qB?xV5cQS*Cn)`ZFh=iRn_`!WFyb zF+Me2v~#a;HMjN#9ZhcM>u*4}Q-fCc-LW}#{M#PshfAfe;~M>1;lAgsY&B^0`gtF| z3)2%{E}A1UuWiSgq!6<$7WbERI&LW`c^KiUo769oeDRyl-7kOlZa-Xj+amsU&4q{a zKof;m7|_bhS?-z(N)~_j$e-J;alCiw?0k;^qiHH~j#-X7&n;59&UW)l?Y4cA?Ox{< zjTQ@RPPz=b%WFsVB>OyxgP;}_>Y+Gd{z-z31ye&;_CU{|Fn_zfJ_r z=|oiO-m=pF{mplsK;^xY6W?zxJ!=sWv~>2B|NDxh?aWP2h{^TukO(Sjc zIFTCQsk!to+G2r~m7rU^cfA&TyuT{{=&HLrr2@jtw=P<{`Sq$Uv!b6RWnUFc_sd*f z{Qcqa_pYyM0yIlfFK_A?3MW+tpjJZW9os^fjX9HL8t1!J&jZZUFXza=^Z}* zvFncis?s}y`sP{oKlO|R9m{81_5Z*Xh1f-l=TDw({yaFyE7Kk=Ia=+Qy2$g8p5}}t z6DA3~*&N*b0W@RXakGDlaQcN4sg~DUAH8C8k?)h2+(5}s}nA6+x&Fy|` zEZt&{R_e&!@p8~SI!nYKRLzPnTYHfIUhjcoJI;uCb6R^g70+?5oV#L0zGGA(E7Nzm z<6B0zScX>6C9M_d9uNE^Q8#g0ZrN{TwZ`P4p z@4D=uzA67o)~73SG79(UPG(%Rc(rutT3IQP{4;t7r*xRq{GVG8eem}49p>9>g1uf& zJ&C#nx8%br#icE=`nTh1}$e>BHh{nul0@ago2 zEkdGNmz9+T@Tq~$u6pNT2-;w0{&ewX=YsDl^>-|yy5jRgx#FLnpM`aHaY~*wrbFF*d7t+Hf_ z@^585u>&A)$DuV$o4qxAWagF!S=_Z&bzt_2oMCKf!+UY2t3~wnH#OR7*Ck)(*oFmm z``%QIm^GzU(b4+D-R*}>Q?5Bx?^w=u{@i@f=r})G6S|~8({)nb7rBQ^TPK%1{#)d! zp;?D_nw)q0XKTS`k8FIvdz?iZ@8wwYsd(&eue|KdTzm#LpdvU%ZW~7dbPAcWzYNxoxL|zK~oLW`t+Vh8}2-JV)KTro4G@K*IL9> z@y*k8{}}#$?T-Ij58S)3b34PnBhUS?%=oiUH}CnhE%$R>YHQmRP-o=LjS^e8Ini;= zuaFYv9j52x9!3?)kE`sEt_(wAFb4R`QTHM`qK8iFaI__ zPpf!q)Ai=^)fKs!&hF*rReE3cL+6v1$k;c7cd30>0&SYyQM#tT?Of2GQ|V`X?@tN( zbrCIp@BL?0e%-S}wei~Y^wtEA0HZ^Eq7Qsxg%5jfE?_*NW4+wi1#}GxsL_7jKf3w$ zv7fiBQr)YHJNcGQsp~;&?5*D)B;lE%S`Rue$IkX3Kfhme_k7*1gIiwIdf1e4eO((f zEm=&(``r3f?kR4H_d4twp4SM02b{mF)Zec0id^#e*mI?&Q|eI9Z4UBUzrX6p?X%Zn z%a2#s*A)JW`jb+pGVi(2A3k&AZ`GCGDXFskRkJyMu6Y%09T0N20W{jR zQ(IjBm-@?(fA7s)3?5nNN1yus8ov8=%Hr<@{&&n(1@=dZtv|l!`aAo+T368(85xE9 zzD{!NnQ|61&ye-r<>XH{&?y3-o5O#vHMqSjzgj_e{@&!r+dr2#1$o7y&#_*Q=Up2Y zw~+NFs08M&>-=zca{HG@UUSyvUfR&zJLQ>+S*^U*%0t$(`5!*-PAa(WVz1j0$rJ4L z(j6`HeEGF{?v$eSC7+L7f41)Uj}5jrCIxq0F7?fL{pQl|od4d2MSCYcfBY(TCuoi^ zYL7=i<>v_bI~nucwOS2#Yhp>_>-&RPEX7@n`aeDIPX6%ine#2zn|Ch0tU0Z!wq(;j z){8S;L4Di%di}@4?{gfroy`1Y^Yw;XXJ@k-E}ilXeVfh!?bzZ=j_UU;sz9rnS8vwX zZt4GCqxDCy`O6dx&o4ID(DRL_e~-upVpL!9G?>8 zB^eY{d~(7h0Vkd&(C9edo}fP&jL)9+&URaWY_C+ny5sU;IY*v!n7E{gJPOI33|@8A zwvA6_{feX4?ilTOZ_%|dyX=LKtZvUz4*7TBF86P=)yE~EMPdCv`MzJ-*}{L8BTs>hx2F6x;-&6 zZ0-EdpqmnnCo|_He)Z7T?RvWVAgk4sAW-+)yKPE~K#~Bc#a8m*>V%>d)_E0`t!+V| z`Gv@hzc-pL7g5)KUDB2a8aQn0>|C)T|6p75&mYt4h4z^kM|3~#Zr!-{^fX7+rB|+^ zH!?oFD$KWhW_?E(wApC0#?sw-zkN(!Mc@9qG;G)VHGO|1pGsc3diV10^liW9@7lVU z+p}_c$+s7eKQI2U^Lq1_8{3uFOkucvG1OCY={mGQt4oc6yB=@xes?w0sy*o6PuR*q zkqIpqnAJ-o`@Sac>fTabx_IAK=BvJIZ`o?O-&w!xg$c9J2|2Bmhc+$I+4Eq2$8m9& zhoFPut`*vCTU4`TI@{E9_vO7bOI6Vtu6#YWY%Nbk|F8NiA%Dm8VtoH^yR8;%!OGuX z>6`+sn2TPM`ts$@hF{alri7S3h^XZKr2RVJ>V-uImrk8HA*k<*d%D=ew`bcwEUFg* z-|;x-L3(wXSNmG&`7@^kT}RtK@$$fmVvVIQq@J!lUJYtnsEfJ1&N;NS(|t=q*4sBl z`;JC&Ssv7L-(|hK>cWLvjgN|XJ@i*yczk~4&-B26)W5BcLP7J^=DSrDs$P>nbNtPY zl0SJr-R}I4TJUzJrmH1r^IbPuW(TjH-Sxz+BJ=tk(CnLit*}A)V@4Mly#t+HyXy9z znZ^3^v+1_dMSJ$K9zUHuvFHzv)3^BtPR+IC@U`!3R-Gyp7d7)8xA=t{*BUp?as&1F zSKZwSy7R&L^}Y8T*sYx6^tw&)U6ucy>PhzV;-r>K?@hh@`QRk25R)wtb&-D2>D$lU zoiej$_9pKKQ;S3{FZz~rW>;)Q^<~GL)0$UrP6>0{?OCmNW1Xw7uvyyFgg3wL{s5hH zUASfKg`Zb6ZW{-8rGP5OUFeJJ*xh(FpR$&%u$HUPjZ8jQs z9e%y{Z0#lj-$0)67OUPTMc z4Q%mznEB)FrwZ^wpm{I)tJQvjc5E4#|6}+j8n)oxqhih9Ma#BDT6-^D@N@Fe+z4q3o9QP}=efq1am&v%EyD4>A{^L9E z%u?l=?@u0r=8j*y5x8S?&7J$gf0?~ehj$jf{;u%NV`G{4sp6%3S4)TOw+hNwE;c3k z>%17BK99@qF14qz+;;NPyx?B(@r3!(D^Jn7Mpd~}lJ7;O^nSTiKaI~zv+duTosz*y zmj&u}Ff4s8JvV>lw56+mGi~yld;HH@$sactWq?b*^>Ygr ztctVNT08IIDYMVQQ%gaukvQvO(5Zj>4D*|FJNdwg8B}a~B8tr~w=`TqTTCi59)1Qb zshyqrQ9^zj`#tO84eI}O&Y5ntx*w$5zGuPql9HEduX8O^XUNQ3=DM(C#=Q@hjP886 zRJ7NR--q|mW$(v^s!F{7R#tkP)i3WD9B|^=CMbYB!$zaBph!lgG=q25&gY`Yh0EdBVe;Rc~x6 z!w%mB4IG}{eC;Mzz)rJEzAvBk?pFKt7<4^^zT9ln6*2V>mc%KqR-U`a)>izBm8@lG zZ>neHkH4RKt(FI`pE&#NPtCbIb!KTUU8jUP;C3lHIp5>wC$71^Kby;y4V2UDw>_V_ za79#~(e}lQch~E$Pjh6lxEZGxySQ#;<*!Tsc0ZNQJR+?y%yC+Wma%2u)3b~G4syGPcV zTOXgz@U*<-{l2-}@5ABz=|__@gTyxZg)iP1o2DDL;ZKmnO97k6$o3D;tTRMsuR9Og zO|kCw>aRPt%cRR?TA!=A{Nn14$Zhle`405o>pgJg#NJzluek0mZ`|}B_Bd; zb{a&vvz#b*=gK%Pq;_ukk}12I&~konaFeI|@!P$N!?Qn>9j~yjO`N*aAp84Vhs@sB zI;SU|eOlB~=~`q4+TN0PN#7@W@$7S^C6fiNpS@i-rE=-Nzn~>O7b6uV#I`Uew&$E~ zwc3@_ud-VIV&>~NZdHM*)6~-wJpzpC_F1@@*II8|&|P$Q&i?W#L0P6~wU^X#w%o;g zOg(miPN$qH(%_!H{_y%~M_$cwjqFkK4vJ|#w@wbUyd~8DROMGMXUW*Uq-A^2+9y_) zT~55ZZ|6?s-y_!Y|LZ-je%YHI`s=PJKfV-r^ZxYO%@^+7?0qa++F={i!+P83Ls5d! zzW;tLYb`ePhlwoPueEV@#ipU65Z_Qj8)(q!o* z<8IKB02>?S8)ZkTTXNZ!#;o7>S@dhY8tY2~{+g;L`MQl3Vd)iaa(YJ|UMjX)A83{s zEjcq#OZqJT)OpTF9y*=rvtA(m@N2~$8_+RkUa>A{JTa)JZ$ORM~2?z|7_67H(R&^uGR@G)Je1muyqsxxZ|hBe_`~vaxuJ ze5Bm7!jn6@_QtMI-n%8Crr=i8pAture^2LkxZXA@ao%xt`U{IwZ`Zw(vwb92zC>bu z+nYn-&srWGySUBON4)z5f7zlSua#5Liq5P#dljDsl-~{dduCPchnthTm6xwBT(>gR znsMpn3#U#Le!H{T^p>SneKcDfm&c*+_xQG-4V{vHsKZ;oeqz%Hwz~;?h5lPsZOz;I z@6i_1ikdnVxAnJMXPi-*Q@*is-fu2#18Xzc{`38ZY$r39Ok3VEwP^2>8PAsGd#yy@ zby8J&%Pjczzqo##{tuU!+~b1oI+bOa-?{ng**)>A|E7mLTd-~^^GepI5%cEsPCRH0 zx>2tpCG7;eS%@{41F^rC~sf&r+|>V5B}7jyL3XZ{JZQ; zsWNZH+W*;&RTaIw>*n)*yob(<9eok_{;pnu z&rbbIZzbl3HhDhGthy7sZT5ZJlkw|&#pdSSlfTKh!hOcu)`gG%zmFCETWbC5&ss@~ zfSAr()5>b!#cZf>UlmZbPjI4SD`@ay5~sgk|{x((Hdo6 zUR`x&{W72KGX}oeYaASI8TxeJ zYq#H#f2jHL^|(7Nc9&iYuLlh$V;t16TrB9D@)@J{pj~(Wz1qvV-us%r-TwK1mMxjp}{QaIZJ`Lm}j-n^TgcdhI%8PE}rD<@W$M)sZao3fy=<+*5U z=H9tef)?zm%x?Vk<&uTZjScMD<H?3)x z{||4?rD14GQ!@Wwoe*?r(e&^af8U+n?DU~1VN>3hX^~ToUggy@><_Z~=NEEK@#76m z&<6kBd+{@cSFz3)o4Lv7h0yi)kFPLY-N*R{v@HFW^uiy9KlMt5v@M%|CHu9O$@cPx zCstX>TTcVKK0aG8a4s_D2BJZnop0GOxZ5?b)M8#an8zAjkTFq z8iGI`sjS_6?|=CFb4QaI;$_-;UUy#tvOB?gurz z%k!l6a((ytbR2Y0UGDWydkS0iLfJpfxjRKS`f_mTz30lCo%E`+t(H!i<%^ylmzAux zw7RaMu&Z(n|GQZ)`auVPJg*fl5iXv{E$b?l64{qyG`;uU{W@(PejnaTe)hbYclUff zvF&r|AC=OReS1Bw{GT^5PAbgKtXkG>ov-7QhfY)G;yfU6eyejI( zW6;RRl_>PVK%;z#)cX;(SDgE+PH&nsoq2M}=c1ahjb*#Hmd1V4y)xxX%#H(uj_ZOL(e80WUm43BH>TlY_t zDa~=-)}pi8(ouywzQ}~VJ99Dn-_DheQ8C^DFF7=OIodQak8J&N>dK+aj@|ouywsn9 zX3W*~WIx_KdSauvU)cLslkMl1=r0owPx^bX=1j-U^|7_zefVCyeN|i%B$b%|ebwyk zai76AELNE_onL#eul2Ukgs_0Tp9wb_d+x1Sk?&aICJ378N%AnO`5rrGG3z(gb;?Vp z%tGJe9KP)Bi;cVQ-F`PuqyakL6J>JMWc$mFF)vNF7;Rdk_C1GJ$(ZZoxo6H57wtLk zSF6jE`+eBl+F85nS5H8f>(BSXOK0p!-m|_;;NOqC96h{u*B(Fn)bfc|N!ix~|9_EZ zI_|a4KhuAtHkfJ4>Toej%XL?;o?~1(<ndN-hF@N_4Z4r@NGfMDE5(> zF*$cLS65m8+-H!>Ter`G%{cj6^6^gNU5U3sSLDAvFm3Tt(4ZgaqBm#bro!hg_R$N~ zKP%teQ{8R5_{xGC|Gr1<>HBhNsp0-uvHqjCjSCm-;JWIY`{Ko`eX9;#)j45ouC>_1 zo!6r2RJ9swOiWD51D^ma$6wWL>U(FRnea~HeY?J2d^hL<8_=oWv)>lnv^;%&;T!MN zT5hLr^N$qUaaQR*nNfKEk>74P{X*H^05131Z9JgkC~CeG&ydFC}H4`~FQbr|rE{ktz{-H5!#o4M;{u_TW9Ys9>Z?4_Ufp7-GcEpfhn_LLCc z$+DNA*{tZrsS_)wSf*!vS@Hd{_v1p)URFiRL&XkVR4g<1?L7}a zT5Gw~A}+4GEiAiytCxr7-8HUPd2h_E4@+OPPi98X@n1#Do~?7d z!yMfF;r7#ypmWBvzsX+D+jgo=?0NL!rxTK|Y?654;wo#FK0PVwirt?Vdp+JRx{_@i zX857GHncR9$3NHqT=5(bZQcp1XT&o1aLydD7>L zK|Y-xmzD2F<(zIS{ayHe-|;7!ORwml6(WBtR3BVCw|9E@gSNzZR`nm_89hIEpFR9< z5!aNfCa;tvS1Zr01|1cox;$jJ7-$31_2=uZvpQ|_^IFfS`RdE(4d<6k*}uPfkv-^i z#{F?ZpjEOP|2f!!4z~FJI$F%~*1X6vKJIO452n9A{%Bq2zrC|Be68AeW7(8h=u*ps@12RQt zS+BY8_|l*cY2RpitnlGI)%Mq;+ARpExtUKY(p2EvBu7b`4Iv4-vZ&&XO zp_y$j&M3`Un_ad~Hfq|tcia{sL9IJKvVVB|bK;KVJ^AkqlXk{c&G}&^T2jk>lYRNx zqnlT6&z>=BR(#*1S8Q{aR+_f1kpwM*{n%xdV;QyVvs3$8&x7Un_>P}VuFbigwgY@r z*~%2;n+ieO?v@5zR6e7;$7D%OMVbL(eetRLv!fXG!cXAI~7@ear9lU%feHo1a(PlqulJido3xPKUjwFA#HgzVmf{YUH^I z3sQ9a&s}v;5u@%?LXrGsJYMSn|)n!i~fi@v0-jce#NM`4D{%I2~ z)h+qi_pvUjzz%YXBQky(DB9k=eaIEx^1X`Wn)2yqw3O<4d@-H!{5q+_&y(q75@8C zz5gs|BirKibBp(Fjdj)s)yHpR@1D?J@A_jQ)0x{90_T6LKKlK><@MJKy%#U}TE6;q z|Mt=uC1;NRIe&3=;cW|f8v|7V`xf5P<5JG>O7>o(H!{=IQ!_XGdHh}J z-*?eT&G5a*tEjc0LzK_Hjs2BAPiA5pXkr9(jQ!ikxw4hFGH<2t{{Hn^VNE2Lw{4f* zCGPJ&Tn9k6h+jIQBcrj-CDa+RQ+b6cv#qW8g!s_@6+KFOc7B|&m)Y#lJx1$_zL&vX zFOQ=wp}4Y)EkEzxukgqNpFZ>?@IH_G;tiUYkXP4<&vWnP+pEzo1-&0QheOWwQB?fYJ~BX2WkFP~sLcj2Z@ z=ROr{JYBKj&gIm$#}_X@|62F&x2SaCaTfdNjTU!`FO>Mlow_%nXhr+K&!Dx?`~OVd zpz@HzEN!a7`y5`W+iPs+2kl$Tn=1=CqJ9h0?Xa?)Y@1x32X7MSnmc7mkTBXr;gw}& zGf%p`Pm}|dr**q+4aT7K6qFqvPYZiES=JY)^^MNwl9J2^M#+?MQ3i>oAS4NtuENMPV%hm z+*_F$sY{skzvu8i+Ux~7GzN5p1(RP|Nf!IPj&9dG2_aoxoDY`l*!%JR>MhFOCeBp+ z@pDl|PuzCyME1{LHN+0xok@~W5S~BCLmMNemZ2tY<4=WotgDy*Wu=BBoU&s}!{~L9CZDxb|%*Ly? zJ=D%`c{I=S-z`b)>t5@GLF=#B(N4a5b;?We(stv3rnTpN_%0|P%Fnl3a@sx0%4%+Y z^|YrxxyFl(xJnmqKeK4c%)TPqC%ax4W|_ZtjNf57?bnI>r_+DSFAjUOuCuP9DA5G8 zRCaHxs8#Xh&z?b!RH`S-GW=R^7`XFoMwiZP4yYL%DAV(Go^H~ZK?>pDT> zv7lS-xQkOBp4j*)3Ov1%7`pf0&j0(0X75WmUHEeL++FX^7#zOv@%@X4HkJABLAQI{ z_*!kU;q>}d?zP_5R=alT-j}W3w~{xrRWxF&wYc!%oQIop)?J@)iN*bg=F)X&U5Z_+ zto8?VDa?$ws1gNTROWb1{;oObHZAbvxbNi8y5~2Ql*c=yMQ$ydaB9;W@B)yxGTvcZ zoIf7EUTCoT|G!^6pDrc5o4=3qgO}wh?h??oXq!*JlD?gK?gi*p;q$hv{ZnLkVkbA{ z@0U!oKBUihpyS|Pp3b0Gvrt=(D_3i|cHCRsR-F}o)7iMGlx=az?aHN368!6SmMx5w z)O`O$?%uVVt(Uj@-YD84^4NUID<3~yf%aY5jW256o=M90usr1L{32ez_i(mgCWnV@ z+m$~>v5S&F_6X(9y=!s(M%$jvTW`z=ZJKHL^2g0Z5^rV7N`m;lSuUOubRBI}C^l5n zZ3{zHs_Xkra}*s?=zP?2d{3@wnGo{a5DlH98k&N^KNh_);BI==_`%!S_<+?W=c=vEJ-`Q$i2hT1x+a zyD{>4kXPWk(-YpfKRH`4Wq!~rDfB>D^;zTTzb~J-bUo^f?1eTbUEXNB{!E$3j;*q? zcmG!JG~vE0u9w07bl#uMAN;MC>0jL+E4H3>Ve-7if3E(#HPe-M(cL{?H}5N*!~d?{ zx9`jPIl6UHx2;X~Z2EOc=H&+KxWMiW&a6@w{>?vMR`VWo z36bZnH*aD))c7=?8edDbU%&2(WY6}Vj|cZoX8v%v{E(rhjVR~N^B-nfmROr`+vC1ba$gm*Jn*EPEl1|a3#<1r5tFT{)rUFo;?BkL?*P9zEm$< zb**&TQxA{I6`}Wzo_#{Fs-_LLEh%F&&PZh zhi8gEJk99IVOt=i`dqr&I_-D-yIIZW*2%qmZG&E!-M+&_ibX$H}C&=@a|-$4=2tDfNs0?>Almv)-rWP=C*H}j>KGC%fPVv znWu|m$eevAf~HP+oc`tfzsJy}TB&RL%VbY&o%A~8+c_)u=WFV|S`Hd>r^kP%1ieP9 ziPkM)3sv5`^~c1w$Kq!R_Na>=%ZO0E+Y+>8OG%04{bxGeB9(#d+*?<_JNPo&^uW}n z4@nEZJh5f1g!!);M-T7=wI}=S#ML7mvuSdQYmMqceDw>=TB;@p`^H-ulE^}e=b^{wj z8?paf(T)7#dB^X}&9s;jyvD6h-@7XJ+LgJkiIt{7#-9YYRPo30#I!{3YQH|aVqe6k z)oM#?zO7Zya?qN*@9AdwttslymdYI7x5nx0vM;G8KmYOxUAxU>0z>VoU4JWVOIY8% zGynW&>&3?N*-jp(ohMJK5H``&>{@h3W!97yfqJLk@Ak?zyuQbIA<@#m-}}ge7TvEm zOLi_5Je1UXI%=zm|Arre0)wS?qc0W@^S6 zefOi;`KSD+zdLg4@Jx-hU*0NO8L@j!*!2F)q9UC;wK8+l*B|F^KX)x|E^l>^SHn5a z`z;fuHL0n7RLcko5^>$>2@0owEwe&4b=0IQy?bFR`ky1R@52-38&fCt?=co#v1aXM zALsaKDVN@!)pDshW!Mw7OZY#Z|Dk^So`bzcI_|%Ow%N+B_$ee*@XBBTpOH;ES5ztY z;n=@v55(oqAFQ63ePzWt>)@AFJ8Hs=Ofs{pVME-X>G$KvbNwMfIfQ%zOzhk@Kt@4R$_fGgy z*dN5syw-YB>qqV2i*?VW{v`S^y^}S#%ysF>yt@n3m+C+CDHA`^BfR+2>sY4(|Nk>9 zR4X{u*5B<`u2fyuetLPS#de8<+20;*J?Z`N#D<%~`|Ic{%Ul^854GF&8hnVx93d z?#)@9FVewYC7T}b9J==Y_k!7ck7@1^n8)qEU`k^DT-y* zlq0hjczOnkJXO26M5X12k>AZ#ES8_rHPff&Y@E&{zWDr{-j3T7+a9x~$K+?*t-iIZ z*yF6mh0bgH|Cz{{mvL_V6>v*!os53HfyUQ87oG<26M!1=6~-K-Rs`wx;oK!@+5&vlh9*j`o%=eBKb)U%bgA0y)kF5 zm)p-^n>5)l^{!ox#jLfBed||$dt)g(quAy@kJx+5#(5i0{B;dib<6g7ES8%Ja>QHM+0P%keK~BU zc5vIJRJ>?;T#W!meg!o7&P8UOP)8KIUh+$GVs$Edndp(pP1foW3w!RWT;5(DIth zxuD{(O&aqh=dbvladyd+9?RQ3pVYtHd6B@&IqA&7+tqFl*qhTI9_{S@@bc1J56hYF zt2An(ZXSJ_b#9;BE}8GVJy%XXzqCHMpw0hchf+(7c1Dm;ev_K2Yv7dGE|Vt-JnA-i zvsUA~JZDiWr)A z@r6#}3Ff`0`uJM=@_mz+E&d+$JL=NwlV;@^8Izwmp_RPx&P~bc3H$av7U8vvD&;=z z+?<{{^K*}Hd%>apwx=FisabCOW^G>Y8`&k#-+xiAC;q)qR;ute{;E$Md}FfmOB{#>u92|8LgZ zu~rZ=_o(-(oVK0!)9KGGF)};bN){iM^HaM%q1b*S&uQ-ee2UY#(Ib$TQ_tk{YG;GI z7b1%!oB8=>wc7XjUT}SU=&pLft~1};pIS`nyeHk4viSWS-&v{^+5H7IOCO7zm7Ah) z=44%wZQnna+MCt86>3(0H`yb!hlO!Y6yCN@nr& z_d$!lofItGu`+u_X-*4Y&9uqqmB07tbIKl>vxVo>XEoJmmI=$yE3tUz&5ul0t4o-d zabC>XaKCTf`eofI!g)TYKdv^4<9s4iwsi5=FQGej|M$`UkS!cBU({VV@zYO6r?u*j zr0*X3Qu9)Lf28-5?Xu^c!wPr$9r~7f^~&6|T>oAY5$AFr4Df26qxx#`~R z{JHy*Y4n-vyy`pky?^HAWwMsdv*`8A{+3m?fTz8%kC%7(=PT(!+c=M0w`zZIG4bM$ z^b+de7|17^hKW`>$Zf1_~ za?_@%EA^O{zmpc|jIR~yPgmEu5V!17*y7Od1!u2Z<2il)>*_rp?khh@LNCXzUpVmW zEkn%rZ!9%?vo-!1s4+SVZ&y+@-D|gD<>!x`_a=#|->i?m{P|6zr7wyo+?+%`uXs_n!f9cw!b$fM>aHl(mK0nilfFp9m6Z% z(nOW=+@;)f?lqbp3eRwRc{cX21}_6Pi&nry@-c3 zHFRD3&2&|@eP15SnACIE*=6bFy%$~hZ0(fqR?RE_?CoE4&rFTnYNp${FTGD)ctf$MH!U!2 z`jp3OHi~uo@@MaHR-I~kqrgNuIef{Zxi43nbbp%1XuNgG&65&K5)0;?_id@q-=uW> z)x0|658FMx1-B*cw|o4@^Y>;h!3_KJ^73-c?+cV{3VW0zuW#kM@=b6Pr^;H!F!@tQ zChb)>NW7Z2_xV19!i9M~HP8QMR_VU{nkqfjWar7J4k!iFk;#FNS5BNS{HQB9OyhYs zi*(X5kATmw{hw!=-PolZS!b%Ve8UuzuOPE1Vy3`*Pdf~eRrBuCVee^ z&yuliI*aswK7XeJt863o**h;k>}|Psz4yJx7cVc3DAw>cetK`-HZFS!quW+?+X^34 zz3F)WI4fwM%pMlu@b?!JVtBlco1C%_?mSxUw;=wHnvML1fL?`{pS5Ote0m?DdVhZY zRYwnJ)CzTr%A~8R@vn`w-^5jZ+WTc)){pxFMTW18?;i=-)I1YZ;yh4R`pICn?5VEEv%mhS zqI!RB+StV)Wqa%=2r!9-(H%NzI(--4*y_tJ@0>49|FrPn<`2s^a=x(1mR+<> z=2~6vzeT5JSuII>lAZSMa^sS-mU*ZVi)u+7?2)_~{H2G7m=J~lT^7RtU-=F6l0kyF##P39qu$wXFXKP{o!#xx z(N1o|w4Zu!PU;lc{;^woW|7g`!e8Gfq*f#(sN}s9TjjX-&h(p)uk0@{)jVn;G&#uV znsL{u66X_FEhf$PT=w+Fl8`-e+nDVCR_MKZWiM=A&b@m5k_THV9&w=*mXoGA_zKVb zlsUcJdx7@BbG6J$pcd(==H~R5E=iFyywoP^D5PFIkubx;)uC`zW%BzD461x^K47S|HX!rgN(MzP7Yev zeXM73uaC3b;q#9?zR16*w6H4q`Gj8#%NABT{1N6%cv>THL}Ox( zIcJ%?oK>`O=@Rj$8!xM_+pazT+P*bTXEUlwKLyzs=}6swV=HQ2#<|sub;imPR}-0M z3%|?m{=X<^-j?}0*^0}SDcbHAd3v>Ug>|~hjDo)wHC{ zov!bTu02{mdD?^U`Ny*R56<4z7Ikxa&IbQE#V5`^nDpS$x42+a=I`epi!Ug@$>OWe~Wf)es1zW%A%h8-}l9qKisw(XrI{BKRr#s_(7HsFLUZlzdzegp1!ii+iq5~ zFl%~1m0<9(=_+Y!cpM|QJZCwk{?_gF%hex`bXeTADXQYU%<`RIFDppy>`HS@ebFi5 z*XJI6ct_~Wy)qHoq{$!Ow6tc0+`D!7+^;f2&CdU*jrS)}4^mW5K3Z>Qedt`>?#16j z{v?Ii>~dT0{-ce#eu5L zEN6>0Gd;_ZRe5~6$Z2!&bDkn^tqlraEv(MOEY1~Hxlyz%c(XNw!-XB+4 z5dSAlc7d{EURvQ!KcjD{of}mq&kpt%P58I2gvam3s_$u;M;A)_nP~oP>z*|wb9#DE zmsa-c4PPtd)Yji_&$}pXvN&j!+LQZ}d%UuPk4EViG#{;B=;^tKbJi3Q*T6g>U#}ul z!QxAtMkd@rr6w9<1cbf`)OPy=%#vYU+HZ|G1Y8~I1 z%G^&zHM`H7XiIy(+iRjZyZ7GiCl%Xxul%0CvgK3H_O|*Q@ee_|zFf3rp%i%&9kzy`P3$_Q(xbA+_YCI zTpbr|FDbbC<|(6}(eFQ&X)~sOGWXv9mm78DAY53zI;fd9GH2V&6?bl^viS4#yUu>O z8dPg{m&qSL_(n-&T6kvXyIqGPZ^iuY{h;#a)#b`rs_v5~nYf&1o%!tVe9l>(KWAV3 zY*2DAOy^!T6Z@v_fPk>4pN~!4V}J5dan&BrviUrwJNKryl)e{D?o~_Oym3?6+G|Xc z{{Ee7cloN%&)Z8>e`I{*J9}%Yk8}ORl#p}YmTlXN!(OvZV*4(;W}#2mHJkQ%Ka9j@ zP4PBJygKhZ@41O~YvWZo?|5siE_L?Ybih7l2k(E5$YqCD9+`0IzA9U2b5DVxW@gAQ ze$;%pPK~$S--C0y&&PjN*8}d@8w71GIHq&I^(wpZ*7dWKHLhNndvu#{rNrzhUG=T1 z51%i7R9OCh=B&tr^QIheRI9XRTr=gtKA9~N!Pnj%zPE-+Bs}c(PnDT%`*co<+?^iV zaYHuqN5aFhKiW2)zgf0T5{l7m%|9&^Q~tn5cG~YgmQCiRoJY4;`5&FEoOChsnw4q9 z6Ui6)tJYe#e|6tfa_Z-K_p?`%6{Y>JwWMVScTL_`JN=l?DF#!`;`Jw%l$3nCV<~e= z)9K7Nt@FTzh~5==E);>EoM&U{pqz_Q|e4jeZiEpJ$nVWF)53` zzrb^9aiyx&*UJ+nysiD_9ow-aWbUOun*)mr!|i8HdGa|j>Rd@ar%sCDjkI4`XYS5y zdo!tM{`@U(R_xgo7Om0~IdRomL6z4(=KV7+U9^2_smzfF_joOGwN(

gZXr=f5yv zE&o2dale0LTc$L>lI{PV^RplEZv7q7=r`$q`iml)uYq&y-mk6Ra#efU^SSRY&G4*D zR7-vA`19zx35z~yy|I|sJ|ow?B=^I$D^q_wRsUFJpM6!=$J}CW^{kqul~3eRtN23o zO$#8PaMhFaFik(7=v_5WO8>ve z2MDUs_o_f28*GXh`|DIon=X%m{9I`rFu` z@M>PkoULN#eIpv$+s_<2d+D9)Iql4k7mvNFKXobpemhDpy3@LF(`^~$K(9Uduf)1` z|2}`<@?)VbQ?f746P{(O`79+g_bw}c{>fES5}sdvy4&Q(Rv#~Q?{>AN_Lo20*|jr! z#x}+uKaUri8izMMkyZCwee$jTDb1A^77Ew%PyD_1>fy5|6DB|C+RJ#iUnW@g*~O|w zY+EncuRlM>cgFNdeYP`OZ>gCZibc{P+g5@a z)cFO0lRv$9>i>P;j1*hV+Oq3%=Z-wtT76NujCr2yeuvG|N|{6I*5?N8+NbxZ8Z|~U z^?2JKTc}P<^7HDPmQwb&qJn20cSOfJ!`FtzpA}`ZidHJbc}1iO99@1oXv>rdYN~}7 z8eDl6eLFa7>(?V45xUz&KU?Ry&zg1Lmp^=ub5Nkpl+deLC)e`KtE$RbR9fp{a9wS} zUxxKcMejGNEoXo6-Cn{7)LFRnO=J_J@^|x-1z%G=tyxb-OcVOf>t1Y-dbdvZ{L}?! ztnB7!y+0juWyzZJOZM1I4tjUB_wM?o^9!o#G$-+;tO&fB`pxQ3qEFLSz86xfZceV6 zce1MC<|8}Q!M{n%9!-hNESqh+#93_0C2Ox!3i1*XD;r&R&s=@AKtwq6`N_*C^j8dOQn%*Ewj8?NJ!k(=1-&8zHgosVfQ)DGJCE8v;Y8B#p)KJqjV!|1vh0Ytk9hv;{?*6|y^S(`) z#E_g_wQgF0=L5ydyY*E$YgCn!O?mZEE4lZ6@4WW!O4pOV zT{~=Lb0l8n`{yZ>e@bjkQ3sFk-BONuf1c+{?Q}QaQ=!v5GkMSLw3+;=TSeOFQdq+6 zk2Ws()=dw)w>^$e)V>n1EACx+5*tTZHsiPDUu;pEt0t{&Hw`yUnCv>2g*T|__k{%WUVVwX@}=OY^_1wSM$`7q0z0bst=!iiH@>uf?SG%wKRP;Z`}v&W?w2i;FZy3t zRex$qer9gr{f3zpg^!ecJiLznTjO-S|LpS8MGtrmnZ3FG{9kkP;wwA;Mm-leyK4I5 zC5P8ZS@s>V&OEbZis$=xW}2>-ZYjO@SsIpj=H|pUezBax-HqKPz6;hbjs5V`ZqJ!p zUoBC68KW8X?!_0jEyfZm8hi5{RO;-q*42I6^nyEXv$!X_-@}xLlGlTuO%j?M)HL_v z>GFqPH;DeqzjyZKy}It?rs(_8jw@J>P1>q@@YFZqN~@fc@hVTJT(WZHx%He`?9s%; zi&ZvHeyr%cZ8xLwYUr_-hqG(*eP@d=4l)a2Q_nfrw)ke9X=+?gQ%meisR^FkZSC#n zt`!Fv-99&e@}BhHT;ish{if%a?3r;@MRMv*)u%TKKba(LlRvtkMYlq=qH~+Lz+*3- zkDqnZXL!EzMlDo!2Bk1APhFZHox0t;jPszgb6RG>EyW_;V{1H)HeGq_aaO}2tnjC( zv`3%k&zqlOqi%iu9QbjTrrYF8{|lBK<(@QE^?Ab=<;gl;CpYoN?w4;b?vC|WoPX`% zoFtaD_qzA{fkrjXA6jdxWa2UXvFi2q$)PUmGN?{7}N{?2*(4Bj7~f3WT-cUY1dbW4|`;`}$+b<;d6HBWA^J-K2^ zVj}0tm%GkY=x52+eZN^#v-x|-Yn$NW1E;o>*PcCMjn-yeI!9i{P%ysAT%!Ej>^}Qm zZnHG**D5%)+j-~Fh;91L_p4{WTwQwLB=20OHOYq){p^mq`kq=H@a}Fv(znxJ zOTLtJt}}Huf8)M;X7-20{7c=JN<0$2Ir;kW1t<;hPp%%vCZzdyIo>$J{O7ULi zH7l02_ZFvaopki+=}8}6&oPYpG$S%(9dq%MzxEayul7VHY>!pAE?2qjW%>oRfcKsC zGLswZip`R49c%Wmo3&Q0s<>)JN&_ei4_m*URe zQg82Nf8{=UP5A5o$vuiQ(|%vOGF4(%f^=G*UCUSZO;;C8@o9hd;?Dz_(@Xx`)R3Ix zJo%FR#7(xg@9*(l`26uA|DuoQwuH{wsLfp5_eAvd&qt?)nuAWY^^4C53=T76{wKIe zru^Fdc;<|tZ3G-JAN`_)B^Dti68G=WGlN zyf(jEpDmk_`2EGx%I9;@a-IaJ(A8ZTud$8uibIUo2J7>2{hrz16JPF|d}DU#ioc6g z7B72w+SR+y^XJP?B7claSnG~~ij!GWk`C=Pbv*sE?x&|sn@Zl%Pk+@5P1Z+j*2q3* zmizI!?xdq{S1u|t)mWZq(_vR^o@w@SdzJs@+j;8zRvdipT_f7y>p$v6i;mU z{`A1n9~B?@a_pvEe!_56dTMyo%I3NE=4})D&fjz8<@4vwb+0Qf8hpx&y0t{a(ru~F zwEJ`Bb-&1UH%z#f2AVz2do9@b`W8#=y(LQmUrt5$;1xY!pU=HU&4G^|e3@6WO!M`l3;*sc z$?>nU>-1Fl`{9YPpH;!CeS3ZTJ`_QPw&;a*KWJId-7F<>GSX2P!$19 zi)~-NHfZy?`E5@-UT#*k4PSoq)YlJ}`=3AZJHF+5wn@k3oM-{{$9Fi>_Fr*qv++G< z`#1eje4_Ri(Y7hCPG3;2zp%5I&Dww7HAk&{HP5T zTi?Tl&)3;}zQvk(a;1c7a`=)}Cw0`kTzzF<%@Pc#Zcec+P+8CNxqNBzlSi_%O8;Lu zVL6NQEziM8)jM7rs@yx=s`gaKCt~aJgAe9pX9smXxn&g^vMhV@PV37bK2Dmui*M>Q z=J>KI>FvC0_QxBozGRKz+aRt<2i4S0_{KUFmhYcgQFq9R*J9}&>%|{OWG!Tb~C%VoEzV|jo;)Ij0*AkWLx69?v9$bCUd#hsY zpL59`*0GBY7p_|tvucJ6H}Zx&l@-x2B9X?|kn zG@b8Puk_Tgthuw+t)FM@rG~X%UE-MKJobA2Jm(_&<;&rPo4?-qTN2roCid>MRtWR) z>8j7y?K$3a$jFqz>Dv3_`wvepxZmLM`rla}ul3ItsXa9`)I1%1W=Tm%TyQtDrEABn zB8j_;u0Nhx*jc4}?_%|;ur>?nL_arG^C}y0lp5iS|D3q`No$wg)cs_6Qsm5cwbg>3 z4lK~Hv94pRI--)@zkF%6|09R8iFN0E@GyWl%7XTyJ+Iz~429M?DB z7T+j*WK!g!eoH zPdgKSlBurxl~+&Pv_&&t7)`u4U3L1hFH5Jyt(xijG-A(lmR-kl0)!nleg696M)SN3 zzDjj*Q%%#!o1Xf5RoXq79;&3O9Pho~K62Kg>kopJA75A%y(leuyIWr#XusbxZ+YX=DX(QuXgMWDZk?tXw^rzV+ak}G_pj)Gx;Jx$ zV`s`DR~2~&uVXKN?W^0D7c?#GYC?Y4!nFIfyK2P$$xd9-yjq3Z!}#K@dHhQ{o+~h} zE$-j7@3F|8OLuq8|5tP+W{>nvxA)6$s{S+n;`vMTy+xgrvRLl%e7m{rx2sy}-&I)7 z%vpDQVujgsGtKCAcXlsKS?un$KXt0aPU~FYL@PFYZkXST^U({%5vVVtl>6E&0Mfr$=k~ooKtq z?d|8>uD|#ivFSTYk=NThdwZmp{_%lCd=61nuAxB8k}z2%FqJ?c*uEQ{6BM-&|$Hh!(V*aC)Sumv)jgGUtIFVevU%m zzVPDZmqlteUk~~7Zu3uxeHpv`+^6w))dz+Z?)-NDjofZWbKWPv_N+~BVY?EwN@K00 zgiWPN)S;YuGo#QS-m*;>S4Gd5R_h%fx^uf|__ZHF_-jOOER@E&KIw$GME9G<_#eCeI|+P_=Q>94-@yYj^^W~mJ)H@kT~C_U_R zrhS{y%6Z?5^AFwj@rqpR_4512CgUs#pW77zbJNydKG?AR>jt&@=<^EM3;II;)js^K zc3lp&xX|B{K1=7nYMO|z*MFxoX140LSy#?f zmYmXGE3h~+y!Khnr5>l5B5%M$j&s%5*wyWqFunfDIWv9E%a4yX2(EYBeC8tHIeJ3qX`YN19UENqKZQ3x0^WIyPm%O7=8@TkX zgCn=}^XpEVI&{~sJAAUqNat29)7?ep8T|IA1vd2PT~Btmkv_d-%O=*N96ul5VENMH z>-OT;--vPx@6*3(V<+iqU4MUYPLj^8VkYM2`4>IER@raA-FJcGgWjH-OGKVd3rjfq zkEdo+$?|D+|Nm|NSy2!mlJ`0I}NTDQ8%SRXY2-TjS^z?Jp4X!)Z3ZM2UI!wOw`oj5jxeMxYuiD1=KHtxxZ-54FB#$Fe8Boc+2o*K((^Se7E31- z$$IU-@?1^lLQZ;Q`U~Te=iWW9TAYg7gS_u{diUI%d1j4L0Ul=l^DU(XC)NmL^Q9}k zEm_GX>Kp%TXSj*x-|jZGr8WAshuBne4uYml;{sMaU9>fQ_O=6`#XP?iftIkzopgH9 z_Vvxr&^FB5+_MPt@_Tz6RtiKfJ93^RElOh&3XNSPzX>X2vdt6y} zHQRLi5~ho{`ySkX=((dlA?5Fsd`S+~HipwVdztgiHJ{dLhg`YxN-g5ex5Y1vs^@OI zzGL(Ik~?=yLyWa#h3CHRoz{#}l+|*pOS_6i1}#&u-@Wj%i0p*o^!t)liQ68pDdo6b z!0@_1CA;$b(Pe7pwKuQZTwL;nUnhJt~?{^E^ zi@F5&zSRJY6z}(qYdhY4{FO_-w)FcNf3HWj7T=S8YW;nu!m)3yyG5OmP1t75rB6b9 zD(VAWOXu!O=e$$*`K68Qg3GI_cgTsSSBSlTJFkEH>?ypV!R2DseoquLzRGQxxi8AR zQ1x--En^S+gx8X)*Ei%Yy1ZrAGL#O-()@xY%_rf#Mj!^;~jmmDnoSV}hp6yUMbE_(%IktY{ z9p~~n7QKerK_72TNd+xINDDk=x&HbV+rn#KEriY=Gkhq!*xAng=2hG6O9|@Qa__kF zJ^$&#kl1RmY`)Z2P2W~dEUdCoNf7!R#-y5E!F;|l-|hX`ZwqGJuJ*n9@~d#zyK4%O zUVoR$7X&j)g4W+%YBx6gYGD^SZIQG0JSj_ebB#Ia)9#4J^vizKsX4nuwNS8>z3*SOy|Zq>~mObL}sH-k7nP*s(IEY30b$(}NR{r>E ziK@i*r0Ho~DPmJIIoI+SeF(X@>Hm%8;Se$>0NWJ<#BuP(OF>;JyA`O%zUNPCuIxl5y?B9NFUrCWX@fZ0Z`ny}GiMsd{}C>%O!gvnf1R zI`3EdtUtS-P5)w#m*Md%D@vBtniu(;xY~%4srHI%OTVpgoAoDBEOPtzt^@pSXAZr$ zpS@nSRbKyIqiVI^gNiy$t-S|+EcAT&`wF{UE>mIgbpze}X-4^+cF&f|T+Y#sm!GEm z-Pdrb-~5$_&P`rky6Ag%V|QV8|A#8$?xpMZIoGPCzV57=UzZYL62~9gDA-*FT2uDs zwAPo(b4o4_wibPV7jlDrG2pRr_uwLJ6vynoWD|g z>-6nk{HONDXZkO?ZlqoxFO1rLvz|D&#`I0f!Z%+$tMWJLEjqg3&+8?s60>%Q21fI} zZjhOo5E&Htc;eH$>lS&w{Qbi6cUi-wRn-#n#S{kjoyIrt6^%F3Tzbmo+Gh99UK@S|EaSV9XTdB)UZOMon0nHKKe`cH zp0ix~>}~pC>OAkWktbrkK?x4LUhq-hy~`iIPe|?Xuxq$G^XCcu)h?lH)4zF_E?>g_ z@ZK6H-Ov9rPWtT;oCjJglRWo%(fyoiy9lLw{Vcny&c8EQSr>3+?tA~^{`Rw)`HZh; zm@Q?w^Ka4S^z(_JjRmTCSADkLervbpdij>V>2rR+`TKn4k4>I816rSkM%1ftKb{nH zvFcXVTEB^o{zhMK?{Y6zewl^lpJw4FR!i@GN;g&C-JY#EiRaD))|m4sV`9{Z=Cx!TH?cbk56c>JrG%Kc>T+U!`2}ofxV^fn+(h} zMRU{E9D9FU<-t5gj}!Hue~b!|L5*YTbEDT?&rSD z^X2Rl>Ca~H3EjDS!!ksD`KbdknZ641D=U51zJB>&^P~q}>#pV*N`s4Cu`OQ~Pf1?f zICD$EgUWZo8JwGCzgW#LT%DKrKiop5$R3D2o@7hfCJK6aEnFtL1D5c?C4`}+AJ zzFzl_Wcn*CYyJ{D<@e#q%8x&+-yq5nwOPE{n7el0k=+aZ#HM6k(EgkJ{*}42H^|JyD(~dLwdEyp$zN~(+K%LVp z=ki0)lAHt8sui8HgfI2KuQ(`qJ@{aHXl!-Z=DF^=cRSj`2H}HC2n)F5I{`^K~%cH-1zLri6yLuxsD{{u3Jo_mB_+ELw-fPJr`9Wqy ze>_e<%2!*eoOyAhs;&5CbJ>u^LG$AI`Dgad-qm((`=gE5a!j`0VMUD!J->K8Q~g_P zug))#36ZPW|FcBy9!GTJLC)xs2PbAZ&$I{)dG_mK#nOzRUvgD?*58}H9o(_`J&%of zqT;VJH&;AgUvtmM;P~~>;Br3IsnZNM7kuaZ(&KwAt|ork8AHQ0D#FVrK6bC+Hr0IV zOusjAO^l9OC_J&&(L}SB zKk`lXf{)i&_Nt$F^mgvc)dJfR?agG)Ueh`CDeL}w_sE#Y=4Q*Ivvk!R_xgO9mi%$& zr)zF~@*i#IoJsomW^3v32a!KM?{F!Zx0P?=Y<|VJTmJK0T)AT9;djBTw}OA3e=J-W zeZJsz-2H=5<|c2RdPd2`n``Q;W*$~JHe-u=GO7bv8y&BJKf(bz42M+BF~rA8EQ*& zcbwk&XR_eNS*BA<6qqGlr#Ze{Ya6oOW#-YRh^2}tHpX?0Y}>v{3zY?U*U0}pv()BG zZ1$<|xweNsK3Jf!M__}%d_C`r|H}U@dGn~qCC{$sy7TnMjgAweoV3^aE=gCf-clv@ zFDJ-qQu?)tHraCZSe=KBZ zmMI?O|8()8ezhv^ndM)$Eq-BKE*!@fw`l3T=gTG8FE06_Jm>e`JHO{TN^dXYKMWrI zKD4TN`IR>x#ixc{%Q(5+$A8+T@9b=@FZUiY;;Xp-UFFZ&C3|jIPb~fxkS7=>bK*eD z)ZL)=z{e{mENYgYFNs}$MSk_SgJ1t@#rCW2G(lM&bo0}RLsw6VTx5-u&i?rS{(Ik` z;&=VYLKpImN!4trU|+Od_9CO@ac-~D7Y+JdYD@DKo`0SG=5v(Mq9w5h*V-z5_;BH7 z)H9pf%Zj%Be?3>0dA^QU*FCye-sN%My~_p3(=YtWo^N~R4|{sD*S_oL@5{|9`G3G; z%e;MDhPV44MbxdF=5*Tl+K(Sket&vpCF>=$qe}nY)K51zcJ9b`P|3USZ;IoakIx-1 zEZOp8O>O@?y@RKimkVr3>)-b1=jkJ^yEfJ&KM#0q@$yN&q}1`x-@Q=!cBiI22d(fe zFfv$>tFZ5)EzkZxDsp#|%@VRcIm-4a2giRty(*x1B9B+RfUnnmhu;BS4Hp$9%uBc~ zcHX-b{B>p_w@Gl$!*`FR5`J`Ny*`(Ccw)|%?)xqCdpev~=OsSxpIXbGAnG`7mO=b39}e%PX8 zqA5Ln&i+jc6^@0wd}934;d!iESp1>8yvYmOHIkRF?L71OM>lGk%kKBHns#(mt{>N? zgsD7Uks5m?C$@alE`Ke+_%gA4)ruJLzh@&mDkolci)qrJ#KEj zy=6{uec8fox+}hZ?7TNg_8H6C!07%3`G3@G`HTdPoaB4V5)m}N^v=DkUWH?KCM!Ss zaO=s^Tiq3ZC+g^Ge&v>25x5hygw$o-LFeZ5tNiB+Zz-;*yl|pWA&6*x8%K z8anF_J)D!IbASFqX@Y8?Ia!HP>3q7CFtvRC{0G|H@+W6ZWc}CN zyy(Mh|K|_CUJ#X-wIlR*;nL^R&9WapJ-f*B<=zO}u=DyKo^BROet7WU<_mU3yh1^j zCq_p-{5-i!_T+)dyzZN~9{Ia=rS`|y{?A|T)M@L!ynga?qf84M-zwq%+wJ6+Jy^F7 zv`uH)&iQ4#t~~es+jeVyXvcx8)gP)}6v;05ym#N_t9wd)^{iqTACB3)3TCZk#BdvNtB0XV#SI z%Xe*l9uN@LdUyGn#DK-q-#hJ|nf)bl!ShWyAvf9PZ1!{ve)Ab+z~|}Kh4+@^NH3}1 zx7EGn+pS42mx6X&p6fG_IjOr*?0foOWsbcwGJ>k~{iaQ>u`^ow<6WKc$IboEAN6if z*{lEN)QS90NoS>}hKBULoXwY+?|71B@;5$SW(8g^Y0JJN^%v(I{j?^-Ht=lDNu@WU z+XX*r9^YWTS)ejqtG4dJ6pig$f_Pg_=(ZbX{0qB#W-@Po+p<>h1pBNh)Acp~PW$>1 zG;ST%qAGvD`f~U~cIUL0pB<`&Z~xWI42t7GX}rbR&RJu0ykkPc<&!$UL2Ic+c1Xl7 zHdn~`%lO7>X1|m@hmF3wiRNB$UX5E(PqVjw?>XS_cI4IGga?0gvyRB0)-V0Lqc+Uw zs&@bqn`LjfYBr&ff2YPRHOHRra;7gGti8k^<|x8_kMogQ(~=ZPp5jHIW^}J*IKm+XI@Ni7JvLuadScSdXAdC z*(=uZzuv5QbM+?FVfQ^&CzO`&o3h+@!M``N_bz+Y;(l^oj&(AxUEC(&&D-U!x=u>z z4Vab@RHZHy^75Yt(p9Lw{=Hb&VQ-6cwy(W3rlilX=R_!%8$I6Be7S9^=Z{Ay1vOuqGxo^rVX=KYNpM@8y_w9( zW1US#Q^KxgIk-hG@_adWg{S88Khf8i-tJ?ZSW$h;%ja$dL-eKM!c{AHp4MIH-?U>B z+waZY8#2yw_V{`o-G6xUmhWq1l(i=tb%3I%O7>*!y18@ICl`2sFQ}#seYJ0E>kTWTB7G&$C`zisA}Pe1?sI4rTpzFav>=7d9-r=?c*>w;~a+@|?K zWuB~I@~5txJQBO;diJv~v47L%nHL_d$$Iib@X>=UTod0v{Ruij;EsL5GCy{?%{AiR zQp9%5E3?zR`C!Jjj|!kwIQ)Elml~ZWRjS$km2qxQJGAw%ktVZUdXV1&&&o)nV^PM_ zZ_SPbjoj8RTX$sf;k3uw<~^+1+Z}mKZmJkcE!)O#if5vg>0F* zk*i*2_5x;6)zz0?`AV1kn{oPc=(+EF2e)aymtXn-B`j{%%xTz^c%bBOb?}D=3p8Z= zl+%tL3EjOh;d|kdlqbrYcf_=31@wCRcxCF@*IeW~d*R2!3mJEG7+30Cxi8WF`d=!m z`}Mu1^R}4e_ieZ1b`(o{+f)#IJwP|V&bEa0khzS*t(QXA`)@4YYQLI;adp|_sSi}G zUO4l3NzQtl5^l^rqehVTx6Z3);kOn3eBW*4qVDzk#z_IKm$~X`6SiZA+ zY@GP%R_zO$>b-dlpbg*IxgUQ?besS5*^$=a`18Np<6ZSV*S7Z8$j#UBK4`VPmDl&w z>7dZJk!Nl0*66ru7O$Og^TdnlP8Wyv|7Ll8e$%pT^OgT4EVzh#G)L;^ ziLN~hx;5{9=V=QM*Sv+mogRPpUON4&O z?p+>vJmQ?HdbZm+-AkKJ{M5U-*6DY`mREA?W-6TTi(e4w&$;{3#NeQZzXX4;d3A2y z;c3Y`B~0qM=gCMeZ(BS0tI~I_Y40a$FHM}F=UfsudymijjguOu&Wm4V`)-!-lIrFs zGeOOL@9(KEs`G7YP3yim_Ds!vCXrsF7GwRyQb#&Czwf%4&UsdyEB|(%S+d7yu626J zWXEf*>RetMGtL)+THE`7smPUonbq~$x+_yGN4B`~+O3&Wt`#4#H`@(r%{Z+O1@G87 zEAD$r+kJCPPV%P2_Xa1Y?b_yv%|Yu}Z(V=Ca$<3b)vv?O>DiobljV<15OeEklINSdcK%6W+C8eJX_j+Si zOV{p~5M3|)_UVk%8~1H~&vWNq_Nr}G6TUtRxAMDK-LlSIdT03$CX}30nR>$Mf}z@6 z&NY{`J^tB8I{f`Kxnhs#Mj>bMoXf7ebsCJiPXz=PfBf`rng05k;7t+Jg)}7R3C}O$ zd3ciDpzdj2&7Kr>yNDgK@;W!#KqvKdxGq^Lx$nd;8_+1u#P0Hhn4neDDvrOmS$1>7 z@z3X9l*GkPn{vzR*@P5zD^-o#aVZ^;w}|8<6vUaE)PCh^U=nx8+%!c@FDmx}7hegD#otYV=reDju^v?SPzlpwve1iQ4e)>GAv9H?Y zVz2-6PKrjujL$)ro}Di8DK$)8o@=$_=6)jvN29ne{}kASeZ4NZY`MRY<<;Bf(ogTV z|MofDZ{Kn7v}3nn(ZwR~KU3{ZDY0Oh14BRfbC^x9mIT&g@b2wb1OCO2M>Gewv^E zq^;-plTx8$bvCM;D^3X3#Om8;JDwefa;miAO}b-hbHS(2y1?6+KWH$Mc**YLwi zK6Pi#IQhs#clyzuDYrfPU0%wn2!}7#N&oqe=j^IUIZUrkshmEuOy5+~e_Gu(yI&8z zwyoHrHsN*rujT)0uEgBAn%_3<(M#LKu@lax?VPZ>|8mk1&T0GaIG#Cmva0W|a>~qU zwx>65UnkjU< z-@4}Z%&g4!VcTEHtvl=#H+PT7VaUN%H)hRSt(tMk`gAz2WY;3Q^~O_8BQ||k*>yDM z0BD4>aY{;r_qEwqr4H4rZJe~aIoU2Fb9svIR_;S3PLFbSp~xv^*5XIF24TwX5^=!szy>#(f+e?UX``4k?n${#0K@-yY` z&v6xU4ZNp%vu8r~z9pO3cKba`zS9-*Co@KApPuSHp@6NNUv6fuUh;H>x#oS&3(v3c zx1G7>D7AR{Qia6uU4Fl&y*wr2`g7WnJJsJ;)~GC7mVBlwwnAHJ<-YG5?}*RYxAk0j zyrE7e^2s-!Z2T&>OHDC)<0R&m%e*z`b9C*pha35mKO8#Z`a){29B9J7QD>5$=zB)*H66x`p*-jeT8Q!Uh=B)imhlJpn1ecS*0{CPFG zLiV0n_UptsT3W@nv6@|<1VgW1eV7qvxM;hqBWR=B#dL6LmnYYk zEqwjbD{u<`OP^3)v!$uYi)`wZuD@bf+unZW*jn2|U*#0Pvma0R{B7O|RJZy2Ol_U; z#vxnsuFBk5KMpV4{PD{Tmo4-5NhyoJKk#O)`vyZ@_L)bYX8fAeu}C97+$~WuseH*x zmwd?us(Trirmwx@zeQ$ytwFPNQD{LA`_FrZI{Po`^4R~c&;#vD`K5eQBQ4&m>r>=h z+j2g2?sExe7y7v5STy|mIQzq^C91a;e*&FUbxcn&?0-~bJ-4h)`QN{;C_VV4wmlA; z=07?3=^IPz3L7gOsr9~*ZT~)-Dd+sHTVqqf)n3%~+Ix>?*Qa>dbGmL9UhTcb^ypvX z#Eh%9KFf7a|8?hhtnuj-mj=y8)-u80W@0Ak^fB4PMy!O}ejBRXv^yK}jzi-{H3b}+_*e`XhRZDG8 z0A=DosgIOEyQgnXj=oepF*fMllXf20zQk~+FGCO z-0uxrc1WMSwbi#{_ph@D?472){u~}9D05bL@g}L~89_l)&aZm+2E1qW&9}u87WJFg z?X5Rb65Ia0XG6O~)Xcx@zVqcHuP^wQ78LbY?d==S$Uh#D&#EVX_^P+i>R_~y#?b|D z#P@RsM)R$9oEaIiPExaXzyq$Yl_HI>0LLb>b%asX))RKH9PnA zhrJ&}K_`msDpXvnuqAvG&z)8Iu8(YI{zFP|pVTK`lI&Z&`?TM)l-HfVj3dwd&CF4< za$9>i{d9Te&ok#HFP|71)7Lf2>iTw{z$x;cJ#sT&%$*j#sP@1UIrYfwqWc*$&OWO; zulOWu(Rst_fXOoijS}OUDmZ&U4ZVYNlCB5OT%;jCIVJen+?7Y>onZo1NslK7eT=&j z1=PcPZgQ^@~>~zm2X|%$1W!emv}h-ZEF{wens&8k(C@1 zp5N>(Gi_kGt$QB(ZpENqN|*UlZyYVZKY!id>U;CH1&Nmi8BLCkYJ7F;blq8CX&Wm65eEo`-3vFBj=c(+Rre9_|f8{FITaX=<8+d)jj=n z*~S;0es7Ae$p0t;Y63laq?UU5Tp*}>^K)&@%_Ub_XI$3V6T6{K-?k#}tz4gcy+HGJ zrAY>fPxEwcmj_k<^!R^r)2k>xsRbIZiYM*c;`!S@bHn#5CoJyV({@^3RloG{lwV>( z_e^>ke(?1jT(I>1r#-piE&pFiHj1n19lEh3gm=P|n_+RWx1Z$jbuHTCeoP|d+O?OZ z`m?h)Z<9O7&b{q%?*Peu1awj3eN9T9n zSm%#x?*)H6apC5V{RfVMHubNuozi;elGl}MbD8&gb}f>cd`CHHyZq7phr%+tIe6#X zV!fKa(QtyIZf_W`hr$1IE_ZHNvh4q%64(5Ghiv9o=Lf4IR2>5Alnu3y9`UxE+5cni zaf76bWqXA7xKxMyyIwtc4Q~y9esGcDv_*(TduFy^hZ{P4a@?g-i~5 zmzig-d3)!KDZP8tob=j`?aA-GUi|G}W8f{noa89K$?Y31Em@**D*vgr+R`b7r?3B7 zdH35QH!<1rFY{J$PY7=kPk!*{Y{#7%j@SJundj#P@rf?bSS9FrEwaqBHEp41fqLT^ zef!SszXDGEUFxgg>-ESmW9N1W-rVLbMGi)F^@dq`|77R! zY0o9ECG)f#4y`NciQLEi-gWI!`C}?8J}&>xtNC}E`8}JHGqTSt`SU|-=9EkOTGdoD z`K0RiS;}4CE8I}c?vmBL;K|~f?+i4Bdkq)oPX440I$QNq<icWu zNp{cy3x85v)=YKG$lvqw$a}YU`npGt`koTLF*)*u+2l_b6HPQdKVRIMSgV$*QkA8a zYL@j{&w9zfIX#9`d40W-&)f#PpZjN%r{=+#dTZ{@T_dTo>A@t1x9{qVKWy%Q4jM_h zkp9li=XQm_%H^N7woG26@ha$){^~=ooM&3qEO~pz^vB;BEO+kKFB83Rli4dHNXXym zoV%kIx5|TmRnG-#`SywI;AmX^{Xu}=#@CsCp!$L>BUNM?XnIvvMpIW&PEu^`;Rj2; z+?Hf}zGh|Yd&BFqxP4ElW(Dc3G1pw35j08c=u7W)(ygp!0P>vqEzpZG(l)MMM@i0Ugw%ZSWv!9*K_2D(ShqvDQGcW&kP)_iO;G+jDUZ4I>e{=85ro`{7{T~_T95hpr zKkFD+X?kvBQ^TS^K}HHeJ*U3>2?DKeDfC?VLSQEw=m1cD-g&LFceP#RZ~NR*re>nq zxqR{3Fe{ep#}`eSsPp`izuS?-j7MR)l2<}5LQ?!&wWT@=C4$P#%(vJdf14**k(DCz zPjC~@-{-m4-gst4%?S)y=FB{6*KF6oDfOCvOElHi-)*1XJUxSLX->n5L&2M_q!_-+ zOf76NIl?*ZNp)uBrPOa#xv>QX%Q;w|hTdAf?&U&T*T8#PHi@e`kDFYKd}odB2I~+M@hfQ;rBv`0RZ4w zKVDa7{9(WR*@Mx+;h-U-OMcUL%`2O(3o5jKuHAEW$)B3Y+bT6L?|Noj)#dT;owHc= zp0Szip=)1ao=l6Y32?YP-BiT&=b{v*{^Y>Y~_O^sA)^S`}-`<-h` zg;G|~t%HAM_b$)$zq;u7BP4%P697_(rXG<=NEe!o$@F(F!4roP^)!Ddq&edhv@t^Np zTDDy>+u&|>qv12->RsO_gVT3q65u z!LCJm;YIS3A1Y~oOV7AAGiCl=bA?aEjgwyg?GW%kvdVzt(t1!JJzTi?W6S}klJ1)g zC(gDPs%$^<^~-XNQ~avgKZ0FTBZ@VG%?+!Lsja@KG}W_8e`1-}+oq@^8y0(d+VH-0 z%>1q@-W=rPt<5&KGyRzUfrg*a0=t!YZ~M>byiA_#VWJZrFFoaxymF_3L#ueM=WD>@s%^oUWU^#=*C2pZfZ{-R}&gKY;q! z-~YZ0JFmF={aT3AGoR_lt2XS~dp+drr;5TyNi~~HT$wfU9tDc1YOP#zuL)sbJALdV<{^)n}qAzhl^F3cWsx7_E{=CLv@}wA< zx6XO?{&R)$S3a5i^`WzK+Qa^2;frabgRZv=i#GCCF_oy;ed{7gF8 z&g|Hp%$~|S5}!-2SIk?aaccRKUbUqOwmNDrm&7i=^SkdJv@7fBeIfmv8_W8;-A{iT z7pSavQLhdbagFtPeoj($nsM4sy**YZjWkj(t@QbtXR-I<*Ep9B^+znBzy9tH+n|5` z^lx^zNA|(tD<$=B%1zx`nsvc=^`u2L!P9qb(azRwE=q=+;Cy~Z%H0LkNiJ*Ft$g}# z;oscb?AtpM%NKg?e6niB6#HKaQRYP%L6eRZXbH0{Kk|E--ojhEzaDkSj#z!h$-{2e z;=l7|f3h(RI#>Mg{JC2*rxY{PB=r1jH+<#}%?hhMZ%V|!mRZ!h@BJHdW>E9_^ucb! znu}$oT1$I2ully>zL0BRo!ZP7y0$w(>pT73EQI~kS8sg$W}fvje#Lt(wY!_PIsQmn zzY=sh+%eU+Zbeaieqz%e`h@DfI=Asw!=jo%aSQovTG_8A1V*&^X723puclVA50>F#)@mRc=7c@yg<_s-`Jb3#rtXhsU3dbah*4x<#W zNl8M%mnW9(Vo6_>wWa92)9#I#M#rv5CV!JkPLoQ$xBc-~d5PqG&!o-=i@5%rQgd+0 zl-3sG)U#fP`NIwed4YrUt{|crsDD?5AB1) zANlPp_x$ED`@pX^o@pTh`L4zeDi`u?1a@4G8ks;^g&WSu# zpVXq8`BfqNQK|bT!`jP=UwZHNq#sj#6uo!(P3P@QU-vz%(%*S4CL?IqwcSdvNfo+c~tKL^>7Hs_XuGmM`pW_NgCg0bYptI!K{1huvGPc+)Zdc8_toFa! zh}&d!*CLJkVU@mf{bcSHelmHsbV>4=u8@*>d*goZ^v>TaZQUO6o$Da;yjpQ{&HmT5 z-D;{kr7Sk{&tZ{xzMALc#Me*sg~b=T=NN&i)UWQFOc{^OH9B_X7F()T!^>kc&N2K; z=&2Mqu$Ez6dGB-0u0=Ioc8Ni^+?E<^9C#_KesfCsmszWXx&B+I34$7rQ%ZkNs43^pt;!POI}Cg60t}s#e*iL~+KeM99Md#M}m|jckOC~p#Yn&=qy%{&V z@9C=snauAWk{%?1rc-C>UsH42aC~M_@9ZhoSC&jkHwT?iSKxE%^Z7FdrW*65EZK9@ z*En98cG#-o-J4dqWKiNWI`(E0@2UPC!~f?cKG!nDm-RjbMOWCqtRSmet@YWm9k2fh zFIfM$`n~`0Vqvk2$&XKFe@_CR%n-R^cS6vsGSPXaBCeGip6pZozUF+`8_?P5nZjRo z|2}_&H|SGZ`n*afGfu^`2Q_1bm%QBn=S}up&@!LPAH6Ol=|)=53O|&t;QDh$*6VW% zcPw(d{`@sxx^l^0pAYvsrZ-Q2;4XjcfwbS%1NCYvBwu9CE)qA^6wVA1GQa%6^5v9@ z)906#-T<8e&bCxy%H!~N$Cf2q=J^+GY=6?>xRc#sj^Q)sdM{6YUG4w4(EtC;jH|XW<>%&3GWYwUwyz=Y-p%{3ciz?W;O)BKH?Li=yDVe> zvp<`(=K7qfJ1g>3`jqzCD=+U(jOKe?dN1u)mW{2RpuLQh^!+!cSF5gh%9r2f__D>< za@Le5Q44bemmIl$Zow4$`nAOxph?N+%wn0H+fxEgZ8qAxV~^+a*yN{om6CmW4b|L@ zG;*7ZCdkgVPwV-qRvi!|^0fR@=;TWWUk1O_F;VGux%5q5LZtOMv)H2WJ8nLa+vT(Q zQeU~4}-!n@l9YV$IVwS=Y+lS+CA1nl5HYe9gb$@|v#|iV1>se-hVxTk^MR zdO+KrGbxIeRXrA1Qg{-Tx&+q#B&^d6*b5En?<#W#*U!iIZURAbW?dw|+2PeGV+bj_8*pzp6 z&ZP9j-wAi@4Y<~~uRHK#$z9M43tx)(%g=KbX}k}Rd?9G$SG7DV0rKDIC)Y`?wsC?;*Y25A1kzzRGY59 zx%&BSR*0lTa#ye6?%d|0C9#imC8xxf_TG%V=NmZX{)u=Wud{L!kM`}Ewtek`H{0X{ zD@r0v=FQ$9@ZNRp;TxhWJ#I|xlU4Uq-o3=>^gWHPPr4^Xjve}x1)4xidR6$P!}nUE zWz;L>W4^Z?()@+yFHKZiYQw(&Zn_j`pU=JSsBX}}_|t>Izy2)NIQ2UuDs$#!?QiJ{ zC3ovgHU0~2;INl4ioU+*>sp^B{7cuI&z*efW$5e73rkeOxtFsqH4Zta`ElRM>={zO z^nGHM{Ec3kzWKS9v|_N;A?L$&r?>NdPZ%bMtpFftLe9N@x+h! zCQD48vPyVw>YxWYIx-F4C1loB}|0iwlv~Q`Rk4hq!<`tN`_I_Pxa%_(Au_w1w?-lnNI`&cyZ4oX!6*!B242>l?GX z7u9%P`cQLqp%2Tto85XBrAs;v%&kq2P+OWZeGB(8PtO`D^=g-M#hJwlvrE69E@+0XRx#U{5oIPGtuxCNYX06$q z1r}+XGA=P$&$4-&oa6Z&DSuQ81m*rJNNxYxv*8_Q(f+LWlHawQ)`RMp8C;k@}wQY&u>0gU|aep=1h%tU@GIi-k9!&(CP_urZr#E`fkVGYq<5;j6-ay z_YU_M{%86i(hwb!Tr#aZSmf#UPv(;^Ewnou-*f8Q!CxCD-A&V8Tr|y0GT%B`)Glg| z>__X%1qQo0Lbpz@_0Z`06!6wAbiv>Bc)qx%_V#nf-tJxY=$Kv*Tl&`K0t5PNfh+MS^y>>-$^9r8VeJP2T zZtVq)8SAs^9(sH@`NP_Km(P8lzh!>5-+9}#pn0IJ+fL?-rDKHS-x+wW=6v_gUidt_ z&Jj?553>9~arKTpo|`$PwBL(KCTH~+S{|DrQtfe0!TMj_5sA|;qCi&jhv^}TDE zV=<|BU$OZ^b>*bO;OiI8v*!M?Z5Ddu{vvH|m5&{XEs2dWbLi?&beUG{uFXb-2B zX4fa4lUiFAE%Wo8l6(BKz_z;md3qh-DgC=8pe@mBWs0tCTX%i$c8AH6c1*6CyvZ4~ za8@$@y-?TtFEiH_b1wON{?6RvTh^~uS$ZP!>KEhJPLj!7QW8@R_ZqI3NPf3_h9&6k znd_g@CvQ?*w>x{2#m<%9EBHhzaz6$2#BStX&6oDbBd=4h>(uJkv$h&6(s*_2#7?jC z^Gr|Z=^fuQB^k8f{@on&IYn=({1uMKuP|qf^1q^JwO`hjfA900EBnq!UoP4*Wy>Mnm&8iHp80Ibma5Gc-6l^m zncl{!dCpXkQ}fa@_oO}dd*=23_la#iaJ71CZqsh_rz)E-Nd)Vt-rMGAc}U`Oe)5^e z$7ZbGdF-jq$7LE_i##L!ohM&%6w~;BS((Y7r~jzE)3oFZe{^Tes&No+Q|CJO!q3b# zaGvf?`?)Juxw<7vnk{|$;;-kXqwikWUX_}n{9S$4lq3EZeY|$^-C}ukOmE?jhZk;E zlwJ}74F&~9^Cjn}Elg7g7P(q9>G_P5a?vTFiS=QMLgh)8_ar{0a-UqAETE^t`QUgV_}<3BO&q(pFT&&kd0 zPmbJDy|;(dD*sKA@|G`gzV)_#q)h* zJ3CjGWw&+OoLTi+@3%pq$W^9EIvaWx8Ra(FC4W{tEA;zr`sdPsX;VvuR&YmLuVzyG z=Wv*Jm$X&;1JK;(M}E+3u&Ttqg57ziLa!A$_brMF>T|5rST5oHecq7{SL+W&7n0sC z)XNTexmx}D<~*yC4Ln}4*UgH~RtuYGdKRykZ+~II{T(4E?_SMUn1XzU>=yZT&ZI_PV*bdy!4pq>p>lH#^K;$RE3b_diE$pM1T2D@uoFQ0_ZKjXZ6X0}1?Wks2j+Kq+T z-#xv{K#jgG$Db1opUr2GWBU-lZli^3pvY6DSyOtIyG2&JIH=9{^2}(^o0PKQfc$Zl z7b32e^SR69kFV>gNtrrjwd5hq6(Ua~C;i(f-Itd9+wzdlyCdxr$!(u&k6ayxo@+@yKkC zz=i=jue~=|G86QNZj9yZhs%zks?u;Nazr&yMkDs`Zb4qU^cz2 zEiT@yO6Ky%rhSPyyJ}BFWX$F10V1xZ?w9(DF3uC)wNXJ>X8-Shpz|DjHXoZ4=elo3 zqtl6}kEXO{J#DageT#Kr=ywCqX>4w~cULyn)J2AFKEu$pXx6$t##2443b>M|y}x8P zWxtGQ|Ly8qy59G;8EMuQZthi6-5Dgc&0r(j!l>Xq?_~u#_xr@OByw*{ytl5z*Wje? zT8CU=w!@}j_jHYpU6D#IlJfaDO>T<5C)?5^x92?Z4HPMzxyZA!(xSF@&ZqpJacBC{ zkEt$-|D$&1R#Akwb>z{fI)9gG@CTI@w)#2zz5QgV)Dw>fA60)#UF+@GD2dF|Qlntwq|ZF$$}f^CKKH%1yA6EQQ;NbUN*`cm^G)q5hY zf#DjnrcCcQOPIz!|4r2Y^d>tFc^R43aCP0SYW4XxE8hQ)s9Sk;`J{s}lT}W$S(Z(j z8Wk41dZ|RvE0x-dTpT+&TAyD1`nUzi0lSTD$M;q5X%#6V7zS&e*Rld)x2HLzjb+d(WvjN4`6|NB_6_q)6=(d&7RI zo=Om}%=3SgcNtgH4~omIlCQa>#_r?_g}y0!P`Z4=u6uS5>CTRrUV z;n&xf?u&S(dtr&n^yc8d*EU><=J7K8Brj(qT`x7g5;4WHfrCh~s$?qm1nJn#(^`O3P;v-0Pa*;6(pOtN!$+YGvB0<`+#ynjST zx$^a_`_?C|ZkE}cKecK}VCB(C3hqn^mUWjdROP2Bmd&&2U3>iVhMy69X0oR*wl3AV z#VNSt?xAascUIj!`TbJ5$2-^VviS$5l>WX@_e{#>n2Y3W%vKivAcCHrk7tl_j>OR(AkM`b0$sff2+Rc_1UjgD*JkEnxD#PpRiOA zUY_dgG4FQLs*|%eyxcbNzn71fp-TT;y@U7GIHksiEsRT^%0n%XO_?*`^7Cmz}HTf{zzTahbF4 zJ!4teQX3xC$1S^zIycUaj#|lm;cC0lM9}H?FD{$Qy8LKkwmP9`^OHe|BlEx(U-r_V z#WB^F1Y$SsZ&S&0Z9lPfS9hKN|C!S~HNP+Uc2MV|+7Z^}b32P`Pb_GB&p)pls)l>S)w%Gi)a2Pe$`6-Sbt;w!nCNkOx9DY zv$r0(q zyH{ps{55^u{a1r^)|4mR89(j_O%7r^aB{1n>OIf`5ysDE+3}ygGzFav%F7aas_Jvf zhQa!c(EG$=GsHo?ShnjkW-rp{+U0X`NsiUmNcC?_ucp0w_~T>y#){HUL7*YS6}s*l zeup%si3dzyKWkU9MO*<}HedQn!#O*u`t>fTb}u-8r}u?z`eHq;-^YZDv&&$Gk5#)wU-X68_j(Gv!V5t#lNKsj<#qB?bsu;M`AsT{>At6 zXKxVL|2JnJ-@hLRC)~7p;^4b_)^3b_pb@6)-*eA@rm6s zH}}$K?}>A!_3pI34BBEl>p!SbA^lJrbWp~wcN4RHj1J9{5M0i-bdB-;i@GwPjk2#p zd`#m_FM|g0Gj3FGdU$M>N;l{>5`9*^YZ5vsf9rB=rY)YW{%%U_qq+KQOAXboNf=8U zxX);l+VfNXdPMY*PkCL7R%i?Oo>~?hpQLbe%G)(X(voLDJN<60h!mTe?;E>PbvbAQ z>dO^Zw@$B(_!~CWv=np@veWhV?%QYZ&YG#!`$$##-9E;NJJJvM{-Q?vZM$(?(~PSxdiFJyMbZQmzzLGTgZ9G%CY6%7YsjkZOV@`o3@yxU(i z*VZIu+PB|Dd-*!w7r$@tFzwlQz1(V^j9`12@!A~Km$GwXlcv^~g96KQTc%r}Bxs}c zi&V`F*y5+`&S{#Td?uHvUJCOts^)dpHVc2I$LeRzC}nrbG` z&z>)LHvHar%2Yu*>-(4fD=us&KTHb?ymUSEoM5J7;nH0$mF05{)sBM)ljL%Ges&u^ zQ)Jj~&^>99#wp%Ko-gfE43kZB=7ro}9waskw3(ntwlX12Z0g~dpPMhO4~Yw2&inKD z8V}HRqz|k8pJxVq;msAwe>=lVZMBXD=S~Ts1C}28Ue{kw6)39A`08-{bzl{#na@?=*RmiQ8V!n~D+ZyTk4tDlFeW6EwsG+7-%Bn^vCNbPs@ludbHZ_#g?p@EteOD)yjHha=FAmO>x@W^9P=k z{@$|XcfI|r#cw^nR82DNtC?!r_aG+u+vYQplOF4zH=Z@+$U)7I*U~3V-f*Fi>)-Np zmO6_Pvw5=n89<|COSb;r@c2mPl{tIg7<}85k{;0IxHGycfa%8piO+3@&(s<6ih9>u z9-O^MW0fQ*wqKQhlaf&0^x`LIqUz0IiP)I09iDCvR@s8*6x$~*dwJ#g(-~9d>-Zl0 zKYNpme_zk#H6fPAc14tmeeC0O^;m3iSx$EHr$gD(1d1}HzWrNOzmJpGoT;N;@%%&c z;}3UjKbHOS<7dY1l2^O;&z>@U)2Wo$$$=5eLY0D~^barpC%8$*{&&T?Z$8s}b4``? z4gSr2T(@t_)%j7=E-X>uR%eA>84Ywq*e$x{UCUFIJQy7=Lo%iJZ}hfCDf+*!*u=SyVD&hO7v z4>K(N62i0br8NJd({H}sO8;GLb>Zx*={jmlV}g4N|K0d~e=}%N@rwHzuN9_d1%J6U zu`zG|@0@+xu0-v4&f+IF@8ZGOck6zx0wEt@Lti5)80nC298{PW0?suL%$>MtJY8c+9q z{_D8;!|jWoFP0sXYRR`~Xts1+C%-;ArAM>OYfrDC@>`+&lMD77Sdj8e1#)xhr&kYW zO!<1VKDYVGiYZ4|zFD-rKc@NO>0pEMbg6CgPk^t>+?MyN=(M@ZkIis2QaLUG8MnQxG_4{S za&7c_IX`{<=MS~IbtAvbng7RDx?XO6$2&u5gWAiEZ!9LZ&zV$oc14blZ+u%N=xAyu z4#jz#p#9cg=Eu}(1oKX*`#AgK_LJTppLAG&_C)WysQczmVUGBbc_*hgs4e}!Xszm# z&)cgvo;t6>H=*LeO-}Bu>`SLqc!OqXwx-X%#=d={-4r2aa1!6Pyn^5C*q@^kpBoIH zNi+OAZ8{G$wsJ>f)|Bgf%gyI4;J;hmT-x}5_xWcFLH((lg(1CO>WeSMyTSu6E~@ou z=#44UnkSTk*Gq0zPukh z$om;@-M`iqo2K+=W*Mlsd+qr@Ut-FcNubp?Zi_rC-xe5YzZQ?p_dhV*iskXX#)%cG z6^3l*?)P*&VUDQ$Fy$T3v+1F+CaW(^M{>%FS-Xm}{N!w7o1jZy*G{T5EHIS&tKjAx zQX2KWUM=GFe!gq7e*ALl)3@XYo%5K;IxDzU?Rv+ZbU8_}-sj9>S+`p}v%hC*vr0~S z>?fI=)oa*#2|Ng&*7I{ZI2f~e&Vm~Ot5raulx?*t_LuJQrM?UFLZVCg4>vb2{?Kmt z`Qx`OQ+F|B-&p=BNtMSpep=(>H-9Su-ApauWFtIl%KY%VH;Zq~j$9$!c7OI(vHE!%9DMZ+ucq8p zI_`5uOx@e(TK&4?Q%v}Lz5XA1d0#)~ej!)hJE^wazs_FKyjS}y=Sb7t)%Rqy=0$#hH1;ER4{`o3!{c=#+dg~*1@2DaHNT5wAkC7O2=Qk<=pXZEEf^M$X!H-Z*} zDd%ic*?j4psJE@1 z+#fGYh}^N&-D2JQ40&}^&E^};n>sHn`I38NM#(1ir>kYEPcE2}{o-QcMJaY($k~ur z%D9%F){3=11RX3C2B*H1p318dpM{gpn8zlk3H}ZU5^;@XzPKc(a^IB&?AbFWIG+E4Vy9|PH0Q(6R^I?^A#S6iAAI8Vc(`N);W5_2}V zMt}M9=CP#}%g1f=1a~aFJmuG=Jj1v(_o`wxo3PHBvaeSr`ESo{)|aJ9d!s?ij6l5# zrvpxFHKO-?XX$$)x_HH+UyE#i?e~CB>M-3%?3tO|Bbn3lle^(J;~kaF!T-!4_sE@lVsN9)TQK0nFKm5Yswef_JjVlOlUckZ7# z#mF(@%*mcZMmhHL+J9;uFR4`u)dQV8H+y&6we)7oP{X8M2GyH>URd(QRw_->+E(M} zgXwZp?Ee|Cf%-=O);&DQzD2#hvbXy295(O-(k%(&BNCtelg~_M$Sdrf?5gvAnMT*H zV~adrMrNp`HXmL0C0nrg9cTvP<3qy=!vaC8^KtDPJy%BTdavRaw^a5R=qzC;4#gwJ zA6+MZ3R=Hy(=xv0T&Fku^AKyg{>F9r&DUE*LU~SESNU%}tDBwsC?)WelI2nhqHsHJ-nQ% zne}XH*wr0%Dsj57bl45LVM~!MHBfTfvgb-khZ(ob-56!wle(dO&1n^8A0M%~em>5p z--1GLj-zFhO!3ZXpphs0K3|9XKYT&wByRH7GHJefcayP(>b1F-nm)dE9rp^QKkh#NZ1u{b*x8++vMP4ArRr*v zEqC}qC&?InT>E(C^={eo9%`FpeuHNIKfn13I;ipQ&DM4D!JAbL*BUN6AhG$fgm9+x zl=YIya;yc-**Rx8LBoN%I^mpG}$Db>X99UPlu>(|%gm8DOElm&J|M~_)<&OJzOnL6V zvgNgxPzwI=Z1LkYr8D-uoS=8hODlVw*UTeZgpb;q`>aWy=G|s1`di4m(DUVAir8*;rCx%xtc}ZDK zdu{-q*|9xYpfy+1V;?7WEz&sE>@xXMb-^aBr7=$8dAZDmv9lfSUfrLcpc2Ow(^L1^ zOu6JR;~I+suWHSw(?b{Tdbi2mt6u;XXr_}lZQ8~csrvNB)QRhZTaT+RU37U(>5tP# zT)`(KTrs_3bn2h6t7FYk zpz;5AQw*1#l9+t^z=Ai~J(Wi#J|{D5-*N1a5@=G_wQ@p6P?b3E>HVc2uh~VEgV&RS z?yl|jfAq2H23JqS7G}=fmo}Pj4(L7A{dHx|uS@S- z@XF*SNR)Ca*i*5F-sb{)Jaq^U01=U%wn!pz$ZshY57JqU7nDs-o-U+oMx@ zEOUEqCiTqB^#53QQKFdNSXHxY(H;*I&Armg{g=M`v|n~X&Dvs)c@lD~C+|PHqUUa% z2+`M>; zk!y88m*q9JfcxwB~t!_s3jn3B)$N)t2gTyb>>3 ztNzN#QLWzI(#Y?$)~@3@4i8@0f^Ll{o3C}?Q5!SI=}1QJ^b;+hKyd$ zcKus@J7hC&6n-k1{CI-*l!|bvWTRfg+iyVgP=EIrJ`?OLmNr(-3u)WXFLAfK1E}%@B(f&&8^k~_t zZ)?^CU;ga9G3UN#&4vW&d9yb#eE&MXGrxrQXtnc+HpuII}y z$ENRi{BYsst;e&M-+V2w^{GMM)9Jh9>b9Sd2)>cf^<5$P%>5oi{zA~W?G*8DwWaSL zeDPjouDR4b^>yd21cAx^%R=|b?P78k+OAY|Ix)v$*4p_qSw!Zkz$y%1wWUvDPrjbG z_1vz*k)Z2^+Ej9m-dEE-s_dM;ICT4l&$`7d*1|o{rldPezEoVuR(9&EQv6)GDMkJh z-aNU!Oy}@{pV6Q$s;pmVROI8TAG1|=AF*EE=%}fBPhUD&j=5lU_8#q|N>JLH-l4Yi zy&`w}ucO=Ue)zj=-NGM!^IzWD^J^z3_eI4bT{qpkoky-b{D*`M6GXUt??GHcOmPIc}xhS4$ijWZ=Pf~xdp2_znu zD!S`2du7<&!yo@T2L7`2e0uFtt@_rY)hib5@^rR-8}yFbE+N@xt?YWQ&h5zocG*2U z&r1{=Z`J_ig5v7|*}5vn!mC&NgtGHp>iOi65mY5sWb@>QiHp~srR-0W z<&V91e%ZE+`Osv3g|8uYS?A*_zdczB8RrW&(qR0uy*j|F^SkdlLp}A1U=i2Km7pHh zE#qZ(Tc6%9|2DgEeyxr8e~!q$e;;Rq_U_JVu1wd8wSSbY1$Et}OKMM-{!4vXJ-uuf z%j>=rMWvq%zs}uV^7`WZS{wHJ)%Cliw031`X9rj7DjH0_WW3PxW#kq9>6>`}y|(td zrg_gu#k~sTf<04`K{cW$zi%LDLFR7urAJmozY%(G_f6!zya&G*XaQ}ZX4fJOeb5nq z?&|ONR@WU=^_aGFM%||0mH!WT$gaAa_A9F;*P_98CTo_+wkgmA=;=Lsig<8p?p(k3 zam5}G%JW8M6zGWkp_!@Ba`T(Fx!tCJShNzLEOeQQI= zRDzv6+^>)4l#f3Dy_)H`Yw$)smdz{>f{@rvsWTYi_rL z8ls>ZZFiqH(JubO%V%sR ze<}OI-A(DwMI@59-Ikofy!43lfy2F$Q^1{!PmC9re9@PhHKl7x<97aQtj9q$|C<)p z7jl~!g~Q(;Tx6@hL4UOX>(kH`#l`V6yAcc?A>|8R;Gr{CotudV$YSHDZV zwfqyP7o?d18W38vHi-bv1=YAd$!FZEyS7VAsW&@zC%NaR6=)5x>(33K%bs{oTckLusV(@D z^DFND%L>f`LA%IZ!l%EdK1e8=Xm)Vjy4`OsFFFYu&6sYcxjuGhd19rgne6Fn()4a_5wYI4d3tsaVTyY=_dK&!!4F8_3Q-kyY>m1f7DFy2Uc|I_@(0(*8mt&8YM<3a$Z!q61z?vGm zX+nXm=$0?P56zF83C+tVTh*Q>v8=gO>+9ncS?%%d$(3GqLyJP~dp#b9-rLPyFF9rV z_c>Y8z6Y;uklF2W_3KyR_l;^#w=Pe-Uv+%J6ruO-?XHjI6;FSBxk*IlUiH58TIGcY z#8-j(z~DA?;_<~v0pARd*<^#7`?{b()4rt|U5jc0Of)^6=UmGFdGDsE8|c)ELo!dHuL>7uWmykD&dEfPN+RZG2Gb-8vT=%C*EFu`SN@&|SYW`hoE(Y5^> zHa|1!k?wlmUe$En$L(yB*E>%BbZfENQWc#S0cSO6uZ&01X0B+9Mn;fgTYFd^GZZ-6GgXS7dHJ8SC{j%CCyx?%j zyI1DSpwq?v^Te*3ykB_|f5O#;J~HQYuYJ-hKWV7xu7AJv`qd?Kx_AGE6q!-8x@S+h znP;w6@7jJjL(R8u^p{JuRM?wnuDAOn_u6~U zTe~SmI(hF!8`ay6zp|=%@<_Jh_QbX+JvF`G?`S6bwAvo6o}C-;4Kh-`;>e11g{wPi zK~0F77!ys;crL`C6!#DMYvy@g05d)bW&)t(M>~5 z=kN#5<a6pRD(W3_Mk1ZQek#KhiT9e zk0PV}EI&8Deyw_s+xOJ!{ypcb7Vkg&6WpRM`XB^4=_^e3%$4luYtNt0ig5Ju`wX9*XLx6JtftouG(j@IOHFmB%#{sO&Tq`F+yZc4YKuYmcVAet=a)xN(~QZ7c;`A5xW8Xnk#ZvkbR0(2F;!)|rxHfpr(^l& zMysgaD`Q*Ab5b$|+!1AfBvNr-uOiKL+xM@s)UegM&w1hKBi~r(!utn2{-k}e0Uf@b z9KPh$mi@LfSx@M$y};A4>{XMG*R*P3Ck{oqgW|KN_|AT(TfcnECbpM9ms%aPF8dwW z6SXT?y}~J4=@(bMc&^vAqP@L=<&U@Ep-7^F&2AY_7 z@kjNEBH0N$YwFoRbsngVt9q|@YI%2$;nia^c&fX$UvB<%zKktZ+wT)-9w#GclJ+4^ zwmEadXZ};?mOi=a&(Re-XMGgdlcrxb_l$e0@7&ibiy|MD~D*r&s2e~xBHdvEuWKXeEC{bcE+{O>cD1@B4q@LRtl<;BdC6so(i#blUfLI_#dAy=D59J99HV zY^Sb&sx*Cf4{RXfoss6#{odBGU9cHX&pTb_hr%<~zpiFG6T<9Top@VqYVrny$(QOE zc)pZ-b^UGGw-KNcztH_LOE>U%PE!6T#7 z`!m7i`@EA&eNUa%{ywcVx$2*!imXNJ$?We7qtCE`t~>e8-{Z3SU1HXP6YnRb+gAJk z(l^n(+q{S0cG{$f3yM4LE%yq1bxXYZ*tA^UsQ35nnf3e80V4f~~% z<(@RibS=_&wP=y2=dAAJAS<>--zH>9uc+0kwJ9m|OW&iy*rlR(eg6;KfddDxY-Ujvh zgN#0vzJ2R=Q}v$Zu^Df-Io>=j@p+TsGegjL-D1diU7*&iDNA;~*m9O_>3zTR(kGYg zS?kUsCn3@rUvI^q@4Dv5i>JFcg(%|WsX^4 zr+)8Vo95t9A;Paa!Hho_rw|})_@|jHQWpfgHBr`zsP`hVpdIpNP#!kx!5-Lwl4ZFpy^7GGq zz6-?*Lbn(E0UfO=zE$k;xR5hOa6FEm0GW|tmcdEf1a2Vqy>rc<^oeq&`y@l z)!$bo3C*OJ<{E>{aWXy zgPJ@3#XYLOuw;*sRG6vdiQkhNrv*Lw`)bM37slnvpsU3H-gMnzz`m&xyoq;d@T0ru zB|e)cpIOY1SJLYUURl$X6=I@!@~T6R7q8u|lT4Sn9F|P+KG!+F&W62y_8yV<=kIoG z;QhVv(*sQz+t^P#<)(tR85=+DEr7H)mnY1eVss}>Det{xV|deag^aUtcVo`zu64N^ zdHSb7b5VX8&>c`hLkDchf(ct~N@znz!c0{Dps4$-F(Qb>$2X z#Np2$WCi^zy%fZ9TP?NBvo*|(L!JAaLfv!2FI~RJ<{wvmbTM)BN6@&T^xZ>O7KkvP zSh-8!NJ`<~*dzNFdRG2C@pbWWZ=V0(4t`~O3c3cZyRqA#=3?0zyD6P_E^%FnODRY# zPU$(h4K%<}9-n+>ey?FU(~f(l-_oX}z@H6xinR9VHXpha~ zqt+js4mjPpoX@uJo~q0Led}1C+V{c*dV zgYjy5PUml=xa3=}y1s08>iKh;83B)UZ8hRekJ+$1*dP1YFU>DV#5FKp1GI}(acRs~ zwba=TcdnR*NI$o?H4}WRd_CjYlS_NmOP7~lyQVBLX@}^4p4f$x55AX{Soz-;oUE5T zz3_a4&FR}LueKzdyfn%4Ab0uv1E-jmPuTF<;?Onu1MJ+}9)fy9ixV&YaJz0$bF!}P zy7S~oHH;>j`n`MH(qna=?U$GuznS;ca=Tg0^{s0Uv~zDy{NWW(nj^RT;bt zDaJdcpiklc>qB0f3~#Z#I=}DpzOBE1pZ0%b`eGu_DbPO7Wcecxs%w`&K6Xwqtl&x` zc!>Ry(3SN3t^C){I?t5(^J>Y`4C7kSe`b}Ma{mp)%*%NKRYF-6usI zCVz5zQhM@h$-h~fy!Jf(@#o89%Uh>oZ>f5Ae*gDoQJU=hV<|l=4UauB)%Z9KJa^`` zC%>rIc;Nu z%ZDPB+&C0lVycgb6#59Ayf-QROR~JnOWx|e-B+t8J-xd`^TLun z6WX%VE7$sUeiv4L^dZef=$Pu#q?`YEWKL*ay0JzxYt5eMlH? zG5`4#TLhfe*`8araK?nMGh;X1+k93y%~z=0Ve+Lzw=Qg7r>U+T$>Vi0sV*yJ&bG)G z=K02t%9cC?-FUYBW{za?Imu+MH$wR@9W4*&ef-DR@H#fx8$9(Fcvi^Q>k(&6LXcNy z1oPrajQpTkJxPndOP}tHnSV2t|MEglPtg5k*|lq~&$xR#be;Cu1#gUb|Np)yv&Xbl z)h>2gQ|0cymxh+Xp^tx=%~nnJX*E>4EV214c>jX_u^H}+cV0<_cV&QPd?2=Io^U#I zQ!%e&bM>2F_dy-FC8?PfCl=Sua992>s~FDZ>y;ib)wIQHo&Ivr!nOalDVCsXx=P(Q z6|CC9^VD>!#q|p7llmdawHm#KrDZWYF1~ZT$$r3?;T>Cn@>vg1i(?gJvIx|znY_UB zro!Y+%~zX)`VK!nocyug(c2*5pP0^_VkXe8i~F;pQ+iICAIsTltigWk@YtUd62+Udbu_`7u0)=iT?AJUpeahBe_27-_!noT@0DAA zWwG}MUOCUy&{$toYn?aIP|cmki{Wyw;oly^ z^ODK$QkH?dS$Y;S?+1!?&mWULU-ICH{;Pdxa&(m}(Y>!p(GGJ1Zl%KoFVOtse=J=i~pPu^5#(dYB=oj}a}<{;4Npf%aA zylS@9hzkW>-l)EsL3OI>y8Nf$H3wYQ|BBn5d@(v^liyRxa$xPcjf)}mL+Mpy_w{>P zo~&9gWPCGt&r(p*@U~H9d%8C zCp`x99mjgXW%gCbYC(v1dp$G1FBF*r?P7U#Zchp5a;!8>nOX+FJwozYUZ>2-CW72DJEcJo$)`jdTMK;_BF1trUS45xmZAhVo3RsQyZ zKNEdEmi3B51`k$bL)LF_D7FarADZra>KEs|w`=adoKj(LXCs#1qMrEY)ZK_$3*pS4 zOEp%m5)8ih^=bV=DewZnRlSDly@t}#Ul#nCZ1~JB`OI0+&|@69osz8vZY)8J)%Q8| zEsWnw64dwlub;tb7qNralih#ef<33cs_u3@Hp3?Qj2gpb#xLf__9T2?07(c}KS4&N zK}%v)YR)d1QXl;9Z(E1s&%583zZQAFzg_1zcoX$s4Zi21yZ7BmJ1r5M{e8imy!3!? z#>e((1@GxKj4$pLgtk=$k&^npl%P`uGB534rubX2Elmlq`+8C4Px>n_(ETIe*@fK# zs#CA7)Bg@h3dufghH2fo0pCoH*>FEdWY}(&<_0=rv1?J33sRQ!pE>3It@rMa7JWOo z!;$CIy|B*j_to?dFFzf;;a`T?r*k2TzP+)$KE3K@)|n+HpyLKW31aDy+Y+Dc8q#|V z?=u(d&Cc-%6mbpIh0Ibx0#Dq>>*Rux33gMOf*<{zELd2PdP(TZ?Cp}D%VeF?3TM9d zF6n+Fl%L-9-GQOr^jMAjf$6c2ow^ojbY&GHdHG&m(5d|kRqwrRzB*^h{MxfQcY`Zsa8dT5Z1SeMrt;egf8%((PA;g)N|CwOZ^~ma_Bj-1ON++?irxySJKTb@(<%J@&YGv0Y2 z#SUJsAo8>jDgEs^yJX5ki(8=@5%24UTPf}2N`OI#H+TiSLIou-&^>v@pu_(%$JdD zuW!*go_@Mq@n;4f*QwPPd#2Y0-gGXSwDd?c=!BO~ehmNLO8p0=k159?OF1A>AT~MZ zpY>6_?_zU69nU|YJH0*cbhX63vwYVvtj5R<0i@X04wB-bJ<=(M%9rpzV>5h`&xBcn0wsP!b-=wxQr|lvwW=IsRUO2m(mq~uAL!a@+-6(p`SQzxDd5sA zX;E*c`Pg14<-&f{+r4 z`HU&EJT=!}e&?tuImN$sPBUmV06X{gx{%31|D;dO5_wYn(zP;qdca%9pR4^JeVo5i+py>(- zuXyOM7k_Lw`0B#BfI=;j5PRp=%~WMyvu8~P*axq$A+e?M33tgy{tZBxrTx@Sts91V-dzgExE z?L6IM_%rBHZqH1{1@;a5nJOd>d|mfZ_VjL0Zd)%3?yG^8@Ty^_`!iXc_eA?;gWv z?F@OPy>DH>gN7Q&20zqPTl&X`_tdt=te{g9WR@TKegB~+N5ocX>B~hEz{fyu&e${i ziTLV`c2kbcu(CG0ogh7B?_0SkZ)6sIJo~@S z#65W~XlM7!dy_3{m!0}Lzr4H0aJh6!0N;k>ZNFn4TY}0`)F8|Zs#|$j<@NV+j&=WM zrUZELpNg*)>IZG{U$N9$aDEXF`{wR|>Th#i+uwikDQ_Zpl1|xHLpmkEYtOe8hR>we zeVo$)?rTi(M@lmpo|A*>w;wUcT|3_swB6_5OZVa{3wWY7i-Q&@*zOle*SpmGsryPq z<@OV18vatrlcYfv{QKWW7CceO2QBeij+~!cJa699{J5{GI^o5{gGQXs| z$8hJd8NJ75WFDJQcWlP_3Ay*r}jQwEitA1 z>+FT_cE$TIe~j1tpR?-a`ek(EjiYMb!oNyk)O14W(|BNe0T zc6rX6*S+uK><^3i7k`}EH@Pr&cIP#g{M#$0$W58#__I6kV}^M$FH_jtgO_U63k{b4 zSfqL{{!5l#;G@{Yo|6+I&X{RbOC--@1&!gvJ~kKR1r6t&Qb+Q3O!4HPy6F;A-!^~T zdQK5sV&CV8ZUh~Pba`XU+(&nBOqg>zG+Aw_;j=li^|>3o_oRB9yL@cMd&VDK*>BuH zWrQ74>Gf#U>?yY<7cHJvUBC45lV3VstJ$CO$WHqFeL||ltR1}F-{&~wWiEYf|4>Xa z`BSf9^jn@&jK^k7XS{RX2h<=wrH|~i+{vI*9jlJ1K4y1LdsuaHNsj!Q;63l(nG1vV zvETBE@4a|B$e=zPw5@dEu5X7fc+^z~$2S@-yCgCB>VXAsQhO>-N_^I62wP`3y8{xs zpOHg%o9E0L6Y0B2*B<|FUUX&29?x@<0D5F`DJTsHeJvXapYQfp-`>m!9uOT$+y&8CYv-l2~95W*fe_rv$xsovuW$| zpVt++U$&p^d%|w_?MW?ey5W4ciXDRm4?^74vx>-`zW?7pzire-kbN#FZ|iIjbT^g|5fDy zaoj%aao1y(drmTWX|covWXfj0tTpXZe#@Wx`E~!_?{mx^&%4&}sX4wzrT+ib)S26p zVz1>@?)#~$>;BJtTiax22mTKkcO5HBCv`WNGrOB#&wN_3-F=U$=j1MgtExPH?p<#7 zT$o?~?3dZkpXY9V{_N6j@h8Ri>vZl{B{_$Ef8&w=f8Mk0GSdY6D!yM;zW2L4Aa33h znS`iGk7eDwCOw&O=?n;1t=T9S^e^G?wVJYnr>^~-oXY;R_kP4g)$HAyldm5TylcPn zeu49;Pw8JL&T%bus1*HBeZbRmnaTC^Nh-cke41xLW~`ZPbz{P(g=V~(*K_Vo{5^f$ zIraT}OzOW+eZReJ{_J`0v+HiIV01o^mQZNDfv5z=0_%dvNt-9n;gK=Eqvz#0NzJx>N*V}U^OUXfxM{yi@o5CJ z86$V&`RlS%o-?h_UUyW*^Ae*>(5#s=XU>dNFMXl-)cd|?_2BJ+mj^DM-5Oze@2z0I=OitJ$u%C9yR0?&pIh^NH9ai*UaujR{f=W~+{ZlG zk8FOdeZ>-*o|hC6iD-vns&)MLyzNz{PuUUzYgL}FQhCmxUiE*8if8*t#ibyZ%q$IJ zmkv7j`hcRU0ZR_sG?kx91-X;D8!|zW7XNO=6qT0>a7TarpX$N+!_Pif!t>?;Df(EG|g z#ixCOZBw@Idr@x(N)czy%=(++QTcM8;?vz~6&{vzs*dblGyk1ek?aS*2fSy$PE+x; z@_8#0wC?52iLCZjX6ALtu6jGZo~}GA8t-wPJHEQ$!-P+`{zp}3H=ZCj1cU6?_y7&2I z$=>hsm%lcip8>YCHzv}0is_M~n~Sf+-2=!OHpTv?=g%XXfBIyrKMnu(cFCS6 z%WC(t>h9;=`$Y^?HW+W7D4nPN^su*a`OjONcRe|C)-a#4Zd~2?xgow}`4Sb++zWk* zPX(52uUGKTuT|_{_xj}C?)hh)^6O;%Jyv|{jHPAiFXWO6EsBhP;S+iB~(aCpjZ|*AozT=)}r2NU3>(*Dimk)^Jm^1H5 z=vmWg&fcDr`W&p=raU!q`9E*(&27cy*KDuP24%$qm#)tI`}OI}pAROTnX%hq^E2I( zUq4R=r~a9}H;zC1Tf$p-xL)V{9M#pE3a+-K1| z^o~JK+gfAtoQY3bp8Z+{PG^D{$0uyk*nd*yhV_(vjR&vgo6W!Z%_*!j|9rCawry24 zkFWhHcx(pt*=E7&n#bE}vpaaBqpj6Xcdpgd|FV30z5g%v@7u1)9rhD(Pu!uHde`bMX_f_DdqZF#^n*(uMbDc?J=@oZ`E z!v{f=mKef38g$+I_3K~H;~tz+NuM6Rr*Sc;<}hJ|n(p&T@V$HE?}q)FuNSJQn_u^u zq>?FfRq-k7fwf=Rzq%!ae`ena3evqY4F1ggjPmSyZ0Ed;w(bnmvevpAs_A*jLeu$_ zia6tZ=4p)4r(|`{%0B_c&X*#FHS6>%_nV)LZkX?Hv~*|KBo)ucE8Z>HBk<$7%6;al zhQ??7MIirISu#w!o_ufr%qP$9=xTZfv3nFTeJFdt_CWAKXVsJH>e`Qa;d>Wvx(+Up za^`4fPn=sCyGi;6Gmj~I|KY^>d)eoSte*e9^nvq%m1nx&bYphI?#A_u z_t);$3cnV1<-Qp-k(WM|TJ`rY{|Ds+-3^R4*uG4E`S`!A=e`KZv}?WMPpjvxo^5#Q z)-%2b{f)x2Un_e~GI4B3Zir{q^DMG0;Qqk+K<>f)tfyCZTY_qpw6w<;_8!=O&GaPm zfy18rV%w*sMnwA6$`+ZY-mSgKyJpq>-3!*`+HuX{{^L|!tKvCHjibQigW7|d2h9gk zOT$xt9{juUmQKPla4~h$;>$&q>x{+?{!H`NHlHqfwffB#o#x|v&n|pY_jN|O<+Z;e zAO2SD`Ca#5{;ONh{vOC@SpU(^%X5;I%cStB$$SSQJk;-mWQmf|1j?)bKB&n|4tUwr&?Z%?d!CUiU0VI<-_#@^RI6` zo6o$TMdtN{ph-*kCO%1@9*cyzdR@J- z52K~;R@Ibho(zN-DSTndt}sn$t+?4wbW7WxZvA@WJ3pV%5*_~6I%~?`#D~70TT>hP z{7UJ0?bpwz|JR%U7F5535~ioJcJt9Hljsd!eM ze5E}9so~uF?CV(GF^64OOtt?I@ptpgudW}0XU$iHs&db1QG6<}Vf8)#$i9a7;P-27 mR{oT1Ef4mZWU}v{`1b9yw2Zf3n!v!oz~JfX=d#Wzp$P!u8tn}L literal 6288 zcmeAS@N?(olHy`uVBq!ia0y~yVA#UIz%Y%2je&uoeB~m31_lPn64!{5;QX|b^2DN4 z2FH~Aq*MjZ+{E}FfdWj%4dKI|^3?N`*Ur~^l zoSj;tkd&I9nP;o?e)oPQh0GLNrEpVU1K$GY)Qn7zs-o23D!-8As_bOT6eW8*1)B=1 zirj+S)RIJnirk#MVyg;UC9t_xdBs*BVSOb9u#%E&TP292B76fBob!uP6-@QabdwED zOcl&6^$g97O)M>S6pRcEE%Xg6^bL)54b7}f46KZd6re!KPQj)qCCw_x#SLm#QA(Pv zQbtKhft9{~d3m{Bxv^e;QM$gNrKP35fswwEk#12+nr?ArUP)qwZeFo6%mkOz;^d;t zf|AVqJOz-6iAnjTCALaRP-81{3*g4)6+?q5IX_pwBC$Z(11LzWTvCfN z%TiO^it=+6z}~jX#O)SCoaRCGrr>sq5l+4Ob_zE7pvXmvY?x4xiyMduPM4rGYNvom z{Hb{Hc27yJ)i%i_Eho1!;I!vF7i+1Pc3##XDM-!J>pmr!#Fi@;szF0p933IQ|_Ob zS5mclRrUR~tIjnwl{jg=d^e~5h05KM<*W1mzPeNV&h~rEAqi#?tq7F_;ROO2B3zAb z3n7%^1q~6VUMB>_BGu}&AW#EAIV=v~FyU&2Qvw+xS{G8djx@(@%ds@jVhU)`-~WTF z=<_EI14fSjLH`Ziwmvru_;HxaXMUZqv}KXTe|x6S&utsiZ9825Z0vD7<+{@8R)h2- zHWeSQ%`=i7OH?Q|b_)L4e~6VSk;SD>*vWFfnZlJ*^4mZ3Cta(SQLC^QetJLk-|i#% zd2B~KXXZRFm*zCQ`f-2c+leuuW&S^3vQ;ORhUR+K#wNEqZ@KZ5U4G`#e>VR;moPW( zGf-7M${F5UQ4*AMq~oVp@e7ed9z5w&X2-Gp3N%{Jd98lJ=D&hv&t$LtQaM|a9TxS! z*r%Rjha~%l5BH@kKTPGC`bl%DzkwH@xy5F_)Ti~45tl=*oavYvI%TS|A;*^dS!OT$ z>@qpa^|%a=-#NUH`?qWgulV!1nLmu5Dfw8gHF&zgW$y3TEsBe`B&L5`ILEhi>eQ_f z3)vg(cIWM`s`JWvV=CXR_L=2w+qTWCY%lBFn}3J>`lGb9y)ztGTYo<>o%HCQzV@YO zZkqY8&oQ6&7o8ri)gi>R_9cJ#*|)|k-k1ItV!bVL>5+Ga9OFyNdC`Bx-fyg^6?UuG zaMGpDfA1TK?-wK2`q~IOm}=eL4xzpGS%Gq-2$sSBi_B1w#~}+b9*yo zNw=QcrzXyfzzv^*b6@3l2D&hOoWzm+D1EzMjFqwFMt#RWyW(so&sidwdh4~+Y(dj7 zm5+(bZfxD|TbF%cLZWkAc23y|rPqDgw-5JruzGoS3%*!T8EwxYU#j2Ia`VWH>HmKG zxWSp^G;^-QalO1_w|*Pn%YJIp*rCH1u>8h{2d^i8mp{Maex=UhU2E3tnWT7O1^4Dl z_Y#AOlXjX~txZ~H$C>$uf#bd8m7Ucck{M|$AOF7MyW70(^56A7QQtmZO1|lP_2A^` zO`QMkzR40Sb?Dz69VlFu75p-5UB|B(7tKxeW32Dqda+1C`d0fr-R%W05AGtl}o_;jL-CeCq|Ihcylkd&_ z7w}($Me1r|ppx^G9ksKLsw`<|x9X^}aoOUwX}9`)!-BIvUbjUFX6%3W@M~t~wO_k` zxmJIuV9*ht+Rz)Fv7gbwd)=ZVGF;_%z6AW4BbezdnDPJZ!>vd4?yU>s@9}t@;&*zj zb?38vpMUtgv-ZBV@#pas-PctWeR{kMbay1VJrR(3`XQX#S7YkRV&TPJs{AcJGV#*( zrGkqR`kvmcjsI6IU&_JjAf0Bg=l^z|6U^CO^U~a}G+dZ3w5elWlbmtEqOYA(rc7by z;^vlQdRs0w>qOqoeHkyNbk)A{`XFC_hu^yFjl!Y~A*I7?5kW%hJ6?$!>l{t%lSysb zpzXWt!bzD;|NfLJZDGq6w=g~b#WCqnO2@1X(>MFvUb9$!R>Ose*JmcaEbRUUay^@%Axq9`3?Pr$MeSFX3>DMnk#o+NT1MfGrGCwsPM5JRjyu9W+e`S5+ zGyC7$zn_dXcI=X}Icd~;KeF3_eS_EORUsEv|9HFjAoJw^mYGi`2PZoR$BP`anK(Oq zV`;>K!)E?}^_;(mR`0%_{yw05S%tltqLYSfpJSqcruqJepATNUm%Xw5cC0t=)|RGb z4M+863sZruOP@5WuJkzj^h3T#$3B;vNv47c z9#YSHZlL`(e9Mn&3tokmWzc=(KUO2d}vj045`|eNDdF8VEY~llhO_$g8*Re6Z-EUP; zQoGS9W1s$cUT<5@q#D*oJr2LuuaYWO+5TpY&3y5-Y9HHs&tFJm&eV^|YI9)kI%8D2 zTYB}4_m=1WM0;e(MF^kX>JV^1?OoVIpTzbgRmPN?Pc4?qDsTl%bb4|`e#6EKPV5X9 zq8Lk$7U}gnpPkPwJLhoi^Pn6Z7Au7bYH7tTZ!Fv2?r80ks%0ohVQ%E(5ubH5>aeb% zW;!?1)#!{@o&rMN%yJoS%+tA9b}>ttzIgU8?V!~MpM;fR!kwK$E`9$!z1@tqbnr3P z3Q8J((Je?)y)pI5`=l4w(+{ovbA3Ym-|)SKRIf zgVzp4)6_QeKD%bQ%WJJ%{)ykgx#bLJ#Wzf!Q?OsJ%f;x^D@7I!CfOysN?w?pUb5wX z?ZLFZx)~G1x;(NCJXj@@u1vk-z?19~t$6P7xwfor&o-y-Z0|UjsLuJI>8{1bBEGd1 zrIIO8Dd{_C@UNbWiY)|uJ-59!X;MrllLYv8UK>vC}D5f z-{P{v;@PYVfrs;E7M?tM_`j0D=?&Lx)1!4ZPjfs~Z+=q1G_U-2?c<6x->sKk&3!K- zzAD{EUPZ;?RjfteWmPDxK2FZ?(+AIw$^-H zA8Xknf2l7$daRXSUMR^=qTc)0p=_6fRjmBlNn4$y3f?&xtTGhqU`l*k-Viu#(#C5+ z-CGt0Mb`ajpJjAp>vZO`i2`ere$=1+*{{E>Xu3knfeR~AjBNg`%l?1GU%>a|0iVu4 zmWlTs%$SqdbiO(B#D>QSohw-%hiSh|El=HEk@LK5lIeaKtJW>wsON!R!0M@gqHJU@cdSsla8E{Q*;^@(TW@z9 zy%p&gFWVM2`|SSK9vhZrAJp;7m8M`?kq+ z;aSecZ;o;7x~pH^;No)WyL&mWYxipA&DWAANog%f-R?g-)!j!hgL#eZ<)ot*1ot;c zgr@h*KIpM}?lhT4ef;wFn>H@V_-FYz_DX)MajTuqJbzfb+qu6ZJ;koc8tS>TE#TxT9PtbK1&T~OU$o5EOZ z*)%&-)MT>kp<^R=>Y?yL;P9Mxq%yf6`Si!dSMt%7A zAG(~sUxhWjb4xuu>v{j1V{PsWct5MnJj*vRneT<_t1axiuRRx7@j^8!N9Whgja$}j zh&(vWeL=6`g*$a^@kJ~xFD@V3+pds(?Pjq4+WVVUeX`hQ#dP=RqI(y4-|0u&2pFmf z^XQ&fxzjYD_S1qbdo=b-v_BEZV3y&{^}5ZXsJz*cBiE#CNl(DF5Z?UsJ@J#DCvR_@ zxtOEm_*yk%Q^zAad<;?^Oy8Qytko4zk+gizrza<4p8XbWZzsrO%GTEz)VL*2-O{TD2y8KfV3z`)O0c zez9$ycfa>JZ{xS4G20GG+r1LtFx#CdyL-XD3!k-f#y_#jzisFlCp2-~`E%KJ5pZNg*p2^;|pgU>(zhY|W`zN$c)dD%$ORA*o=bC=vJL z(vC8J;XSnW)L5Tb(K+A4;CDd9`?} zS?%u1rsSl3JeL_fAPR{F>v&p`gy7~VFt$zB>Yn%o5 z-@APGxx{OAFjlo@`K%ea2FW*$M4a~R=h>HidiKt?7|4O3W{b0vW zde7Z{@@%;_U(nEHXXPbdPkwcEH3p{Kg!vlAKVRHCyqc?~hEuQlRZTXx;>AOY&ChrH zJ1*dLiCTDex%3lZyLAkSU&4(atmyku&gAVQdG&eYQtx=z1-)6Ru4R@h)-P;g;Chx? zc5QQTyRc{y_wvivYyV9XZ8SUOq%F66ed(JHGuw_=bKWZ4auEvskyIV^dx`U+YfZi9w_NCmOIyfUa(r6gu2!|PsY~tNHK~1+m}F35 zX(ic^?GV_=krw$T)Zui<+B+*Nc0F9HvGlBZP3@+|7R%-sJaVzIeqEHYSGst2=atnB z`!auh4GEm{`-=+OVxC2d@=W3*)7SsGcRf7kuf^(^iHiLOCFWL-i(ceO6^f==OI3+p zc)xGEn9RIiymO?tZLzBS9dCZ%lO^s}c{Ct%-B8J~EM zGq?52?=OEEx|b^>G_rDjdhn}1b4o02vX%yzzF4xg*Vi@w+4QMD{(L{ZbN$^2rMe^j z{js)MZONDRnQS+=_RrRMwL*3NnVtVN{ns=9I&kr9(caA!imCy(w-%p`+U|aLQtioi z$*cWJzFgIoxBk$*T=JTew_F&lc`k$1o)~u*g{8VEX?|lC&GmC%h#4R7L z=q+5P&cEEf@tn3+)8W?F_dWz1_u6{T%bWAuG^NM;zLx9mo%c-HAhNKwbWzdgH@UyB zmsq`i-P}4ebb0Z^I494>u$%+8*Dks>Ywp$^QdJDPrdKzF->?67kG`HiZOXE#dluT<67?66zdbeMsL0;ZUX|%N|2Hi7b~|!*`PxyYd0%_{(5B$4wsx0qDQkzFTefgz=A$iv z+-YqQkLQUWwCP!)ZF=%&-oi^wg| z&tGY`Ks4~x-2&s>{gMGITsF<}dhqjVak1Ilb*nyge{HQ}-lA1{`~Jn|yl&sl{ofc@ zpR5u$$d*z(vuOFgExi1hzFr58uCP9?X}b4&@xfd5Q$pl3H8c&=HecQF!Q)f?`hHoF z+wt>qc@6LLG#O2hZ(dm%u6t>(f#64|B-E+GfZ1QKi5ByaYox~ z&+S{%H~3jr6|A*;wcUdK!vkw3*%^m<+N|C++C1rVU|*23d{@XB3*%Q4RahI{N@u^y zl36PATyK8TH$H(AXY$TEF9^K5Om}^Fm{;Dko7Qln&m5!D zm+#X<^aF3H&Q98TX1<5srgzJA-DeACglvEH;d^O(;HkcBuK3Ns@T0} zkBmS@$o4K#{`?K$8>eery#9Xcy0q5}x9_pI+8*pSIC|4Vd}@yOI-VzGoHJ%RUCA%K zdBx&$y`A-|)a(|c@PO{5Ef#!sRSLO3C6&H<9Ho5OUwf)PF0VgZ$l@HWaKUlWm4DL@to1+2=P99c zZflEn`G*9<#^`LvcqP?WmknIjx@s0IYLz;vS05V4qHR~FXTE&X8l4OUhXu_(frjD} z|5v6xX;^XPne^H)!@D`Eg;A`Uc{5X|2R$zAuAas1w0&Lm!{vWowM9wg%$IL;W1VWC z;er?;1dSJ>j1W342t*kn1dSKM2N+Su8NV+17vI3hp!1W-`2C`me$X6&r>mdKI;Vst E0E0JLegFUf -- GitLab From 1338291b933e7851f9b6ef88ac9b6adf522f9f88 Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Sat, 22 Mar 2025 08:09:29 +0000 Subject: [PATCH 443/463] fix: refactoring of p4 fabric tna testing suite --- .../service/service_handlers/__init__.py | 4 +- .../{p4_l1 => p4_dummy_l1}/__init__.py | 0 .../p4_dummy_l1_service_handler.py} | 4 +- .../README.md | 40 ++-- .../__init__.py | 0 .../descriptors/sbi-rules-insert-acl.json | 0 .../descriptors/sbi-rules-insert-int-b1.json | 0 .../descriptors/sbi-rules-insert-int-b2.json | 0 .../descriptors/sbi-rules-insert-int-b3.json | 0 .../sbi-rules-insert-routing-corp.json | 0 .../sbi-rules-insert-routing-edge.json | 0 .../descriptors/sbi-rules-remove.json | 0 .../descriptors/topology.json | 0 .../p4src/README.md | 0 .../p4src/_pp.p4 | 0 .../p4src/bmv2.json | 0 .../p4src/p4info.txt | 0 .../run_test_01_bootstrap.sh | 2 +- ...n_test_02a_sbi_provision_int_l2_l3_acl.sh} | 2 +- ..._test_02b_sbi_deprovision_int_l2_l3_acl.sh | 17 ++ .../run_test_07_cleanup.sh} | 2 +- .../run_test_08_purge.sh} | 2 +- .../setup.sh | 4 +- .../test_functional_sbi_rules_deprovision.py | 2 +- .../test_functional_sbi_rules_provision.py | 2 +- .../tests-setup}/test_functional_bootstrap.py | 2 +- .../tests-setup}/test_functional_cleanup.py | 5 +- .../tests-setup/test_functional_purge.py | 81 +++++++++ .../topology/README.md | 0 .../topology/p4-switch-conf-common.sh | 0 .../topology/p4-switch-setup.sh | 0 .../topology/p4-switch-tear-down.sh | 0 ...witch-three-port-chassis-config-phy.pb.txt | 0 .../topology/run-stratum.sh | 0 src/tests/p4-int-routing-acl/test_common.py | 116 ------------ src/tests/tools/test_tools_p4.py | 172 ++++++++++++++++++ 36 files changed, 309 insertions(+), 148 deletions(-) rename src/service/service/service_handlers/{p4_l1 => p4_dummy_l1}/__init__.py (100%) rename src/service/service/service_handlers/{p4_l1/p4_l1_service_handler.py => p4_dummy_l1/p4_dummy_l1_service_handler.py} (99%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/README.md (73%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/__init__.py (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/descriptors/sbi-rules-insert-acl.json (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/descriptors/sbi-rules-insert-int-b1.json (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/descriptors/sbi-rules-insert-int-b2.json (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/descriptors/sbi-rules-insert-int-b3.json (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/descriptors/sbi-rules-insert-routing-corp.json (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/descriptors/sbi-rules-insert-routing-edge.json (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/descriptors/sbi-rules-remove.json (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/descriptors/topology.json (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/p4src/README.md (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/p4src/_pp.p4 (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/p4src/bmv2.json (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/p4src/p4info.txt (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/run_test_01_bootstrap.sh (89%) rename src/tests/{p4-int-routing-acl/run_test_03_sbi_rules_deprovision.sh => p4-fabric-tna/run_test_02a_sbi_provision_int_l2_l3_acl.sh} (86%) create mode 100755 src/tests/p4-fabric-tna/run_test_02b_sbi_deprovision_int_l2_l3_acl.sh rename src/tests/{p4-int-routing-acl/run_test_02_sbi_rules_provision.sh => p4-fabric-tna/run_test_07_cleanup.sh} (87%) rename src/tests/{p4-int-routing-acl/run_test_06_cleanup.sh => p4-fabric-tna/run_test_08_purge.sh} (88%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/setup.sh (80%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna/tests-sbi}/test_functional_sbi_rules_deprovision.py (99%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna/tests-sbi}/test_functional_sbi_rules_provision.py (99%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna/tests-setup}/test_functional_bootstrap.py (98%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna/tests-setup}/test_functional_cleanup.py (94%) create mode 100644 src/tests/p4-fabric-tna/tests-setup/test_functional_purge.py rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/topology/README.md (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/topology/p4-switch-conf-common.sh (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/topology/p4-switch-setup.sh (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/topology/p4-switch-tear-down.sh (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/topology/p4-switch-three-port-chassis-config-phy.pb.txt (100%) rename src/tests/{p4-int-routing-acl => p4-fabric-tna}/topology/run-stratum.sh (100%) delete mode 100644 src/tests/p4-int-routing-acl/test_common.py create mode 100644 src/tests/tools/test_tools_p4.py diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index 933725aa5..e03c1172e 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -25,7 +25,7 @@ from .l3nm_ietf_actn.L3NMIetfActnServiceHandler import L3NMIetfActnServiceHandle from .l3nm_nce.L3NMNCEServiceHandler import L3NMNCEServiceHandler from .l3slice_ietfslice.L3SliceIETFSliceServiceHandler import L3NMSliceIETFSliceServiceHandler from .microwave.MicrowaveServiceHandler import MicrowaveServiceHandler -from .p4_l1.p4_l1_service_handler import P4L1ServiceHandler +from .p4_dummy_l1.p4_dummy_l1_service_handler import P4DummyL1ServiceHandler from .tapi_tapi.TapiServiceHandler import TapiServiceHandler from .tapi_xr.TapiXrServiceHandler import TapiXrServiceHandler from .optical_tfs.OpticalTfsServiceHandler import OpticalTfsServiceHandler @@ -105,7 +105,7 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY, DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532], } ]), - (P4L1ServiceHandler, [ + (P4DummyL1ServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE: ServiceTypeEnum.SERVICETYPE_L1NM, FilterFieldEnum.DEVICE_DRIVER: DeviceDriverEnum.DEVICEDRIVER_P4, diff --git a/src/service/service/service_handlers/p4_l1/__init__.py b/src/service/service/service_handlers/p4_dummy_l1/__init__.py similarity index 100% rename from src/service/service/service_handlers/p4_l1/__init__.py rename to src/service/service/service_handlers/p4_dummy_l1/__init__.py diff --git a/src/service/service/service_handlers/p4_l1/p4_l1_service_handler.py b/src/service/service/service_handlers/p4_dummy_l1/p4_dummy_l1_service_handler.py similarity index 99% rename from src/service/service/service_handlers/p4_l1/p4_l1_service_handler.py rename to src/service/service/service_handlers/p4_dummy_l1/p4_dummy_l1_service_handler.py index b1ff9c600..6e9141caf 100644 --- a/src/service/service/service_handlers/p4_l1/p4_l1_service_handler.py +++ b/src/service/service/service_handlers/p4_dummy_l1/p4_dummy_l1_service_handler.py @@ -29,7 +29,7 @@ from service.service.task_scheduler.TaskExecutor import TaskExecutor LOGGER = logging.getLogger(__name__) -METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'p4_l1'}) +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'p4_dummy_l1'}) def create_rule_set(endpoint_a, endpoint_b): return json_config_rule_set( @@ -83,7 +83,7 @@ def find_names(uuid_a, uuid_b, device_endpoints): return (endpoint_a, endpoint_b) -class P4L1ServiceHandler(_ServiceHandler): +class P4DummyL1ServiceHandler(_ServiceHandler): def __init__( # pylint: disable=super-init-not-called self, service : Service, task_executor : TaskExecutor, **settings ) -> None: diff --git a/src/tests/p4-int-routing-acl/README.md b/src/tests/p4-fabric-tna/README.md similarity index 73% rename from src/tests/p4-int-routing-acl/README.md rename to src/tests/p4-fabric-tna/README.md index fa935e1b2..fc49276a9 100644 --- a/src/tests/p4-int-routing-acl/README.md +++ b/src/tests/p4-fabric-tna/README.md @@ -1,6 +1,7 @@ # Tests for P4 routing, ACL, and In-Band Network Telemetry functions -This directory contains the necessary scripts and configurations to run tests atop a Stratum-based P4 whitebox that performs a set of network functions, including routing, access control list (ACL), and In-Band Network Telemetry (INT). +This directory contains the necessary scripts and configurations to run tests atop a Stratum-based P4 whitebox that performs a set of network functions, including forwarding (L2), routing (L3), L3/L4 access control list (ACL), and In-Band Network Telemetry (INT). +The P4 data plane is based on ONF's SD-Fabric implementation, titled [fabric-tna](https://github.com/stratum/fabric-tna) ## Prerequisites @@ -16,6 +17,7 @@ pip3 install grpcio-tools ``` The versions used for this test are: + - `protobuf` 3.20.3 - `grpclib` 0.4.4 - `grpcio` 1.47.5 @@ -29,11 +31,11 @@ First we copy it to /usr/local/bin/: ``` Then, we include this path to the PYTHONPATH: + ```shell export PYTHONPATH="${PYTHONPATH}:/usr/local/bin/protoc-gen-grpclib_python" ``` - You need to build and deploy a software-based Stratum switch, before being able to use TFS to control it. To do so, follow the instructions in the `./topology` folder. @@ -41,7 +43,7 @@ To do so, follow the instructions in the `./topology` folder. To conduct this test, follow the steps below. -### TFS re-deploy +### Deploy TFS ```shell cd ~/tfs-ctrl/ @@ -67,7 +69,7 @@ The `./setup.sh` script copies from this directory. If you need to change the P4 ## Tests -The following tests are implemented. +A set of tests is implemented, each focusing on different aspects of TFS. For each of these tests, an auxiliary bash script allows to run it with less typing. | Test | Bash Runner | Purpose | @@ -80,7 +82,7 @@ For each of these tests, an auxiliary bash script allows to run it with less typ Each of the tests above is described in detail below. -### Step 1: Copy the necessary P4 artifacts into the TFS SBI service pod +### Step 0: Copy the necessary P4 artifacts into the TFS SBI service pod The setup script copies the necessary artifacts to the SBI service pod. It should be run just once, after a fresh install of TFS. @@ -89,34 +91,33 @@ If you `deploy/all.sh` again, you need to repeat this step. ```shell cd ~/tfs-ctrl/ source my_deploy.sh && source tfs_runtime_env_vars.sh -bash src/tests/p4-int-routing-acl/setup.sh +bash src/tests/p4-fabric-tna/setup.sh ``` -### Step 2: Bootstrap topology +### Step 1: Bootstrap topology The bootstrap script registers the context, topology, links, and devices to TFS. ```shell cd ~/tfs-ctrl/ -bash src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh +bash src/tests/p4-fabric-tna/run_test_01_bootstrap.sh ``` -### Step 3: Provision rules via the SBI API +### Step 2: Manage L2, L3, ACL, and INT via the SBI API (rules) -Implement routing, ACL, and INT functions by installing P4 rules to the Stratum switch via the TFS SBI API. +Implement forwarding, routing, ACL, and INT network functions by installing P4 rules to the Stratum switch via the TFS SBI API. +In this test, these rules are installed in batches, as the switch cannot digest all these rules at once. ```shell cd ~/tfs-ctrl/ -bash src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh +bash src/tests/p4-fabric-tna/run_test_02a_sbi_provision_int_l2_l3_acl.sh ``` -### Step 4: Deprovision rules via the SBI API - -Deprovision the routing, ACL, and INT network functions by removing the previously installed P4 rules (via the TFS SBI API) from the Stratum switch. +Deprovision forwarding, routing, ACL, and INT network functions by removing the previously installed P4 rules (via the TFS SBI API) from the Stratum switch. ```shell cd ~/tfs-ctrl/ -bash src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh +bash src/tests/p4-fabric-tna/run_test_02b_sbi_deprovision_int_l2_l3_acl.sh ``` ### Step 4: Deprovision topology @@ -125,5 +126,12 @@ Delete all the objects (context, topology, links, devices) from TFS: ```shell cd ~/tfs-ctrl/ -bash src/tests/p4-int-routing-acl/run_test_04_cleanup.sh +bash src/tests/p4-fabric-tna/run_test_07_cleanup.sh +``` + +Alternatively, a purge test is implemented; this test removes services, links, devices, topology, and context in this order. + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-fabric-tna/run_test_08_purge.sh ``` diff --git a/src/tests/p4-int-routing-acl/__init__.py b/src/tests/p4-fabric-tna/__init__.py similarity index 100% rename from src/tests/p4-int-routing-acl/__init__.py rename to src/tests/p4-fabric-tna/__init__.py diff --git a/src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-acl.json b/src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-acl.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-acl.json rename to src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-acl.json diff --git a/src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-int-b1.json b/src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-int-b1.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-int-b1.json rename to src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-int-b1.json diff --git a/src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-int-b2.json b/src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-int-b2.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-int-b2.json rename to src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-int-b2.json diff --git a/src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-int-b3.json b/src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-int-b3.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-int-b3.json rename to src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-int-b3.json diff --git a/src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-routing-corp.json b/src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-routing-corp.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-routing-corp.json rename to src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-routing-corp.json diff --git a/src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-routing-edge.json b/src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-routing-edge.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/sbi-rules-insert-routing-edge.json rename to src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-routing-edge.json diff --git a/src/tests/p4-int-routing-acl/descriptors/sbi-rules-remove.json b/src/tests/p4-fabric-tna/descriptors/sbi-rules-remove.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/sbi-rules-remove.json rename to src/tests/p4-fabric-tna/descriptors/sbi-rules-remove.json diff --git a/src/tests/p4-int-routing-acl/descriptors/topology.json b/src/tests/p4-fabric-tna/descriptors/topology.json similarity index 100% rename from src/tests/p4-int-routing-acl/descriptors/topology.json rename to src/tests/p4-fabric-tna/descriptors/topology.json diff --git a/src/tests/p4-int-routing-acl/p4src/README.md b/src/tests/p4-fabric-tna/p4src/README.md similarity index 100% rename from src/tests/p4-int-routing-acl/p4src/README.md rename to src/tests/p4-fabric-tna/p4src/README.md diff --git a/src/tests/p4-int-routing-acl/p4src/_pp.p4 b/src/tests/p4-fabric-tna/p4src/_pp.p4 similarity index 100% rename from src/tests/p4-int-routing-acl/p4src/_pp.p4 rename to src/tests/p4-fabric-tna/p4src/_pp.p4 diff --git a/src/tests/p4-int-routing-acl/p4src/bmv2.json b/src/tests/p4-fabric-tna/p4src/bmv2.json similarity index 100% rename from src/tests/p4-int-routing-acl/p4src/bmv2.json rename to src/tests/p4-fabric-tna/p4src/bmv2.json diff --git a/src/tests/p4-int-routing-acl/p4src/p4info.txt b/src/tests/p4-fabric-tna/p4src/p4info.txt similarity index 100% rename from src/tests/p4-int-routing-acl/p4src/p4info.txt rename to src/tests/p4-fabric-tna/p4src/p4info.txt diff --git a/src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh b/src/tests/p4-fabric-tna/run_test_01_bootstrap.sh similarity index 89% rename from src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh rename to src/tests/p4-fabric-tna/run_test_01_bootstrap.sh index 76469ca55..81d87476e 100755 --- a/src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh +++ b/src/tests/p4-fabric-tna/run_test_01_bootstrap.sh @@ -18,4 +18,4 @@ # - tfs_runtime_env_vars.sh source tfs_runtime_env_vars.sh -python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_bootstrap.py +python3 -m pytest --verbose src/tests/p4-fabric-tna/tests-setup/test_functional_bootstrap.py diff --git a/src/tests/p4-int-routing-acl/run_test_03_sbi_rules_deprovision.sh b/src/tests/p4-fabric-tna/run_test_02a_sbi_provision_int_l2_l3_acl.sh similarity index 86% rename from src/tests/p4-int-routing-acl/run_test_03_sbi_rules_deprovision.sh rename to src/tests/p4-fabric-tna/run_test_02a_sbi_provision_int_l2_l3_acl.sh index 4032c01df..a3ab51c22 100755 --- a/src/tests/p4-int-routing-acl/run_test_03_sbi_rules_deprovision.sh +++ b/src/tests/p4-fabric-tna/run_test_02a_sbi_provision_int_l2_l3_acl.sh @@ -14,4 +14,4 @@ # limitations under the License. source tfs_runtime_env_vars.sh -python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_sbi_rules_deprovision.py +python3 -m pytest --verbose src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_provision.py diff --git a/src/tests/p4-fabric-tna/run_test_02b_sbi_deprovision_int_l2_l3_acl.sh b/src/tests/p4-fabric-tna/run_test_02b_sbi_deprovision_int_l2_l3_acl.sh new file mode 100755 index 000000000..49a686638 --- /dev/null +++ b/src/tests/p4-fabric-tna/run_test_02b_sbi_deprovision_int_l2_l3_acl.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_deprovision.py diff --git a/src/tests/p4-int-routing-acl/run_test_02_sbi_rules_provision.sh b/src/tests/p4-fabric-tna/run_test_07_cleanup.sh similarity index 87% rename from src/tests/p4-int-routing-acl/run_test_02_sbi_rules_provision.sh rename to src/tests/p4-fabric-tna/run_test_07_cleanup.sh index 7c485d401..c7b829168 100755 --- a/src/tests/p4-int-routing-acl/run_test_02_sbi_rules_provision.sh +++ b/src/tests/p4-fabric-tna/run_test_07_cleanup.sh @@ -14,4 +14,4 @@ # limitations under the License. source tfs_runtime_env_vars.sh -python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_sbi_rules_provision.py +python3 -m pytest --verbose src/tests/p4-fabric-tna/tests-setup/test_functional_cleanup.py diff --git a/src/tests/p4-int-routing-acl/run_test_06_cleanup.sh b/src/tests/p4-fabric-tna/run_test_08_purge.sh similarity index 88% rename from src/tests/p4-int-routing-acl/run_test_06_cleanup.sh rename to src/tests/p4-fabric-tna/run_test_08_purge.sh index 917a2af2d..9aef079f1 100755 --- a/src/tests/p4-int-routing-acl/run_test_06_cleanup.sh +++ b/src/tests/p4-fabric-tna/run_test_08_purge.sh @@ -14,4 +14,4 @@ # limitations under the License. source tfs_runtime_env_vars.sh -python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_cleanup.py +python3 -m pytest --verbose src/tests/p4-fabric-tna/tests-setup/test_functional_purge.py diff --git a/src/tests/p4-int-routing-acl/setup.sh b/src/tests/p4-fabric-tna/setup.sh similarity index 80% rename from src/tests/p4-int-routing-acl/setup.sh rename to src/tests/p4-fabric-tna/setup.sh index c77164276..9418ac3d7 100755 --- a/src/tests/p4-int-routing-acl/setup.sh +++ b/src/tests/p4-fabric-tna/setup.sh @@ -18,5 +18,5 @@ export POD_NAME=$(kubectl get pods -n=tfs | grep device | awk '{print $1}') kubectl exec ${POD_NAME} -n=tfs -c=server -- mkdir -p /root/p4 -kubectl cp src/tests/p4-int-routing-acl/p4src/p4info.txt tfs/${POD_NAME}:/root/p4 -c=server -kubectl cp src/tests/p4-int-routing-acl/p4src/bmv2.json tfs/${POD_NAME}:/root/p4 -c=server +kubectl cp src/tests/p4-fabric-tna/p4src/p4info.txt tfs/${POD_NAME}:/root/p4 -c=server +kubectl cp src/tests/p4-fabric-tna/p4src/bmv2.json tfs/${POD_NAME}:/root/p4 -c=server diff --git a/src/tests/p4-int-routing-acl/test_functional_sbi_rules_deprovision.py b/src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_deprovision.py similarity index 99% rename from src/tests/p4-int-routing-acl/test_functional_sbi_rules_deprovision.py rename to src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_deprovision.py index 2d54ae908..6d5f7dfd2 100644 --- a/src/tests/p4-int-routing-acl/test_functional_sbi_rules_deprovision.py +++ b/src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_deprovision.py @@ -18,7 +18,7 @@ from common.tools.grpc.Tools import grpc_message_to_json_string from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from tests.Fixtures import context_client, device_client # pylint: disable=unused-import -from test_common import * +from tests.tools.test_tools_p4 import * LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/tests/p4-int-routing-acl/test_functional_sbi_rules_provision.py b/src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_provision.py similarity index 99% rename from src/tests/p4-int-routing-acl/test_functional_sbi_rules_provision.py rename to src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_provision.py index 86a82d212..49d9aba4d 100644 --- a/src/tests/p4-int-routing-acl/test_functional_sbi_rules_provision.py +++ b/src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_provision.py @@ -18,7 +18,7 @@ from common.tools.grpc.Tools import grpc_message_to_json_string from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from tests.Fixtures import context_client, device_client # pylint: disable=unused-import -from test_common import * +from tests.tools.test_tools_p4 import * LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/tests/p4-int-routing-acl/test_functional_bootstrap.py b/src/tests/p4-fabric-tna/tests-setup/test_functional_bootstrap.py similarity index 98% rename from src/tests/p4-int-routing-acl/test_functional_bootstrap.py rename to src/tests/p4-fabric-tna/tests-setup/test_functional_bootstrap.py index b5b72cc33..2f9130ad0 100644 --- a/src/tests/p4-int-routing-acl/test_functional_bootstrap.py +++ b/src/tests/p4-fabric-tna/tests-setup/test_functional_bootstrap.py @@ -19,7 +19,7 @@ from common.tools.descriptor.Loader import DescriptorLoader, \ from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from tests.Fixtures import context_client, device_client # pylint: disable=unused-import -from test_common import * +from tests.tools.test_tools_p4 import * LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/tests/p4-int-routing-acl/test_functional_cleanup.py b/src/tests/p4-fabric-tna/tests-setup/test_functional_cleanup.py similarity index 94% rename from src/tests/p4-int-routing-acl/test_functional_cleanup.py rename to src/tests/p4-fabric-tna/tests-setup/test_functional_cleanup.py index fc29be24d..4d98c9e05 100644 --- a/src/tests/p4-int-routing-acl/test_functional_cleanup.py +++ b/src/tests/p4-fabric-tna/tests-setup/test_functional_cleanup.py @@ -12,13 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, os -from common.Constants import DEFAULT_CONTEXT_NAME +import logging from common.tools.descriptor.Loader import DescriptorLoader, validate_empty_scenario from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from tests.Fixtures import context_client, device_client # pylint: disable=unused-import -from test_common import * +from tests.tools.test_tools_p4 import * LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/tests/p4-fabric-tna/tests-setup/test_functional_purge.py b/src/tests/p4-fabric-tna/tests-setup/test_functional_purge.py new file mode 100644 index 000000000..ba37fbd89 --- /dev/null +++ b/src/tests/p4-fabric-tna/tests-setup/test_functional_purge.py @@ -0,0 +1,81 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.proto.context_pb2 import ServiceId, DeviceId, LinkId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Service import json_service_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import +from tests.tools.test_tools_p4 import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_clean_services( + context_client : ContextClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient # pylint: disable=redefined-outer-name +) -> None: + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + + for service in response.services: + service_id = service.service_id + assert service_id + + service_uuid = service_id.service_uuid.uuid + context_uuid = service_id.context_id.context_uuid.uuid + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + assert service.service_type == ServiceTypeEnum.SERVICETYPE_INT + + # Delete service + service_client.DeleteService(ServiceId(**json_service_id(service_uuid, json_context_id(context_uuid)))) + +def test_clean_links( + context_client : ContextClient, # pylint: disable=redefined-outer-name +) -> None: + response = context_client.ListLinks(ADMIN_CONTEXT_ID) + + for link in response.links: + link_id = link.link_id + + # Delete link + context_client.RemoveLink(LinkId(**link_id)) + +def test_clean_devices( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + + for device in response.devices: + device_id = device.device_id + + # Delete device + device_client.DeleteDevice(DeviceId(**device_id)) + +def test_clean_context( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # Verify the scenario has no services/slices + response = context_client.ListTopologies(ADMIN_CONTEXT_ID) + + for topology in response.topologies: + topology_id = topology.topology_id + response = context_client.RemoveTopology(topology_id) + + response = context_client.RemoveContext(ADMIN_CONTEXT_ID) diff --git a/src/tests/p4-int-routing-acl/topology/README.md b/src/tests/p4-fabric-tna/topology/README.md similarity index 100% rename from src/tests/p4-int-routing-acl/topology/README.md rename to src/tests/p4-fabric-tna/topology/README.md diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-conf-common.sh b/src/tests/p4-fabric-tna/topology/p4-switch-conf-common.sh similarity index 100% rename from src/tests/p4-int-routing-acl/topology/p4-switch-conf-common.sh rename to src/tests/p4-fabric-tna/topology/p4-switch-conf-common.sh diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-setup.sh b/src/tests/p4-fabric-tna/topology/p4-switch-setup.sh similarity index 100% rename from src/tests/p4-int-routing-acl/topology/p4-switch-setup.sh rename to src/tests/p4-fabric-tna/topology/p4-switch-setup.sh diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-tear-down.sh b/src/tests/p4-fabric-tna/topology/p4-switch-tear-down.sh similarity index 100% rename from src/tests/p4-int-routing-acl/topology/p4-switch-tear-down.sh rename to src/tests/p4-fabric-tna/topology/p4-switch-tear-down.sh diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-three-port-chassis-config-phy.pb.txt b/src/tests/p4-fabric-tna/topology/p4-switch-three-port-chassis-config-phy.pb.txt similarity index 100% rename from src/tests/p4-int-routing-acl/topology/p4-switch-three-port-chassis-config-phy.pb.txt rename to src/tests/p4-fabric-tna/topology/p4-switch-three-port-chassis-config-phy.pb.txt diff --git a/src/tests/p4-int-routing-acl/topology/run-stratum.sh b/src/tests/p4-fabric-tna/topology/run-stratum.sh similarity index 100% rename from src/tests/p4-int-routing-acl/topology/run-stratum.sh rename to src/tests/p4-fabric-tna/topology/run-stratum.sh diff --git a/src/tests/p4-int-routing-acl/test_common.py b/src/tests/p4-int-routing-acl/test_common.py deleted file mode 100644 index f2d00f1dc..000000000 --- a/src/tests/p4-int-routing-acl/test_common.py +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 os -from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum -from common.tools.object_factory.Context import json_context_id - -# Context info -CONTEXT_NAME_P4 = DEFAULT_CONTEXT_NAME -ADMIN_CONTEXT_ID = ContextId(**json_context_id(CONTEXT_NAME_P4)) - -# Device and rule cardinality variables -DEV_NB = 4 -CONNECTION_RULES = 3 -ENDPOINT_RULES = 3 -DATAPLANE_RULES_NB_INT_B1 = 5 -DATAPLANE_RULES_NB_INT_B2 = 6 -DATAPLANE_RULES_NB_INT_B3 = 8 -DATAPLANE_RULES_NB_RT_EDGE = 7 -DATAPLANE_RULES_NB_RT_CORP = 7 -DATAPLANE_RULES_NB_ACL = 1 -DATAPLANE_RULES_NB_TOT = \ - DATAPLANE_RULES_NB_INT_B1 +\ - DATAPLANE_RULES_NB_INT_B2 +\ - DATAPLANE_RULES_NB_INT_B3 +\ - DATAPLANE_RULES_NB_RT_EDGE +\ - DATAPLANE_RULES_NB_RT_CORP +\ - DATAPLANE_RULES_NB_ACL - -# Service-related variables -SVC_NB = 1 -NO_SERVICES = 0 -NO_SLICES = 0 - -# Topology descriptor -DESC_TOPO = os.path.join( - os.path.dirname( - os.path.abspath(__file__) - ), - 'descriptors', 'topology.json' -) - -# SBI rule insertion descriptors -# The switch cannot digest all rules at once, hence we insert in batches -DESC_FILE_RULES_INSERT_INT_B1 = os.path.join( - os.path.dirname( - os.path.abspath(__file__) - ), - 'descriptors', 'sbi-rules-insert-int-b1.json' -) -DESC_FILE_RULES_INSERT_INT_B2 = os.path.join( - os.path.dirname( - os.path.abspath(__file__) - ), - 'descriptors', 'sbi-rules-insert-int-b2.json' -) -DESC_FILE_RULES_INSERT_INT_B3 = os.path.join( - os.path.dirname( - os.path.abspath(__file__) - ), - 'descriptors', 'sbi-rules-insert-int-b3.json' -) -DESC_FILE_RULES_INSERT_ROUTING_EDGE = os.path.join( - os.path.dirname( - os.path.abspath(__file__) - ), - 'descriptors', 'sbi-rules-insert-routing-edge.json' -) -DESC_FILE_RULES_INSERT_ROUTING_CORP = os.path.join( - os.path.dirname( - os.path.abspath(__file__) - ), - 'descriptors', 'sbi-rules-insert-routing-corp.json' -) -DESC_FILE_RULES_INSERT_ACL = os.path.join( - os.path.dirname( - os.path.abspath(__file__) - ), - 'descriptors', 'sbi-rules-insert-acl.json' -) - -# SBI rule deletion descriptor -DESC_FILE_RULES_DELETE_ALL = os.path.join( - os.path.dirname( - os.path.abspath(__file__) - ), - 'descriptors', 'sbi-rules-remove.json' -) - -def verify_number_of_rules(devices, desired_rules_nb): - # Iterate all devices - for device in devices: - # Skip non-P4 devices - if device.device_type != "p4-switch": continue - - # We want the device to be active - assert \ - device.device_operational_status == DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED - - # Get the configuration rules of this device - config_rules = device.device_config.config_rules - - # Expected rule cardinality - assert len(config_rules) == desired_rules_nb diff --git a/src/tests/tools/test_tools_p4.py b/src/tests/tools/test_tools_p4.py new file mode 100644 index 000000000..4557fef61 --- /dev/null +++ b/src/tests/tools/test_tools_p4.py @@ -0,0 +1,172 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum,\ + DeviceDriverEnum, ServiceTypeEnum, ServiceStatusEnum +from common.tools.object_factory.Context import json_context_id + +# Context info +CONTEXT_NAME_P4 = DEFAULT_CONTEXT_NAME +ADMIN_CONTEXT_ID = ContextId(**json_context_id(CONTEXT_NAME_P4)) + +# Device and rule cardinality variables +DEV_NB = 4 +P4_DEV_NB = 1 +CONNECTION_RULES = 3 +ENDPOINT_RULES = 3 +INT_RULES = 19 +L2_RULES = 8 +L3_RULES = 8 +ACL_RULES = 1 + +DATAPLANE_RULES_NB_INT_B1 = 5 +DATAPLANE_RULES_NB_INT_B2 = 6 +DATAPLANE_RULES_NB_INT_B3 = 8 +DATAPLANE_RULES_NB_RT_EDGE = 7 +DATAPLANE_RULES_NB_RT_CORP = 7 +DATAPLANE_RULES_NB_ACL = 1 +DATAPLANE_RULES_NB_TOT = \ + DATAPLANE_RULES_NB_INT_B1 +\ + DATAPLANE_RULES_NB_INT_B2 +\ + DATAPLANE_RULES_NB_INT_B3 +\ + DATAPLANE_RULES_NB_RT_EDGE +\ + DATAPLANE_RULES_NB_RT_CORP +\ + DATAPLANE_RULES_NB_ACL + +# Service-related variables +SVC_NB = 1 +NO_SERVICES = 0 +NO_SLICES = 0 + +TEST_PATH = os.path.join( + os.path.dirname(os.path.dirname( + os.path.abspath(__file__) + )) + '/p4-fabric-tna/descriptors') +assert os.path.exists(TEST_PATH), "Invalid path to P4 SD-Fabric tests" + +# Topology descriptor +DESC_TOPO = os.path.join(TEST_PATH, 'topology.json') +assert os.path.exists(DESC_TOPO), "Invalid path to the SD-Fabric topology descriptor" + +# SBI descriptors +# The switch cannot digest all rules at once, hence we insert in batches +DESC_FILE_RULES_INSERT_INT_B1 = os.path.join(TEST_PATH, 'sbi-rules-insert-int-b1.json') +assert os.path.exists(DESC_FILE_RULES_INSERT_INT_B1),\ + "Invalid path to the SD-Fabric INT SBI descriptor (batch #1)" + +DESC_FILE_RULES_INSERT_INT_B2 = os.path.join(TEST_PATH, 'sbi-rules-insert-int-b2.json') +assert os.path.exists(DESC_FILE_RULES_INSERT_INT_B2),\ + "Invalid path to the SD-Fabric INT SBI descriptor (batch #2)" + +DESC_FILE_RULES_INSERT_INT_B3 = os.path.join(TEST_PATH, 'sbi-rules-insert-int-b3.json') +assert os.path.exists(DESC_FILE_RULES_INSERT_INT_B3),\ + "Invalid path to the SD-Fabric INT SBI descriptor (batch #3)" + +DESC_FILE_RULES_INSERT_ROUTING_EDGE = os.path.join(TEST_PATH, 'sbi-rules-insert-routing-edge.json') +assert os.path.exists(DESC_FILE_RULES_INSERT_ROUTING_EDGE),\ + "Invalid path to the SD-Fabric routing SBI descriptor (domain1-side)" + +DESC_FILE_RULES_INSERT_ROUTING_CORP = os.path.join(TEST_PATH, 'sbi-rules-insert-routing-corp.json') +assert os.path.exists(DESC_FILE_RULES_INSERT_ROUTING_CORP),\ + "Invalid path to the SD-Fabric routing SBI descriptor (domain2-side)" + +DESC_FILE_RULES_INSERT_ACL = os.path.join(TEST_PATH, 'sbi-rules-insert-acl.json') +assert os.path.exists(DESC_FILE_RULES_INSERT_ACL),\ + "Invalid path to the SD-Fabric ACL SBI descriptor" + +DESC_FILE_RULES_DELETE_ALL = os.path.join(TEST_PATH, 'sbi-rules-remove.json') +assert os.path.exists(DESC_FILE_RULES_DELETE_ALL),\ + "Invalid path to the SD-Fabric rule removal SBI descriptor" + +# Service descriptors +DESC_FILE_SERVICE_CREATE_INT = os.path.join(TEST_PATH, 'service-create-int.json') +assert os.path.exists(DESC_FILE_SERVICE_CREATE_INT),\ + "Invalid path to the SD-Fabric INT service descriptor" + +DESC_FILE_SERVICE_CREATE_L2 = os.path.join(TEST_PATH, 'service-create-l2.json') +assert os.path.exists(DESC_FILE_SERVICE_CREATE_L2),\ + "Invalid path to the SD-Fabric L2 service descriptor" + +DESC_FILE_SERVICE_CREATE_L3 = os.path.join(TEST_PATH, 'service-create-l3.json') +assert os.path.exists(DESC_FILE_SERVICE_CREATE_L3),\ + "Invalid path to the SD-Fabric L3 service descriptor" + +DESC_FILE_SERVICE_CREATE_ACL = os.path.join(TEST_PATH, 'service-create-acl.json') +assert os.path.exists(DESC_FILE_SERVICE_CREATE_ACL),\ + "Invalid path to the SD-Fabric ACL service descriptor" + +def identify_number_of_p4_devices(devices) -> int: + p4_dev_no = 0 + + # Iterate all devices + for device in devices: + # Skip non-P4 devices + if not DeviceDriverEnum.DEVICEDRIVER_P4 in device.device_drivers: continue + + p4_dev_no += 1 + + return p4_dev_no + +def get_number_of_rules(devices) -> int: + total_rules_no = 0 + + # Iterate all devices + for device in devices: + # Skip non-P4 devices + if not DeviceDriverEnum.DEVICEDRIVER_P4 in device.device_drivers: continue + + # We want the device to be active + assert device.device_operational_status == \ + DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + # Get the configuration rules of this device + config_rules = device.device_config.config_rules + + # Expected rule cardinality + total_rules_no += len(config_rules) + + return total_rules_no + +def verify_number_of_rules(devices, desired_rules_nb : int) -> None: + # Iterate all devices + for device in devices: + # Skip non-P4 devices + if not DeviceDriverEnum.DEVICEDRIVER_P4 in device.device_drivers: continue + + # We want the device to be active + assert device.device_operational_status == \ + DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + # Get the configuration rules of this device + config_rules = device.device_config.config_rules + + # Expected rule cardinality + assert len(config_rules) == desired_rules_nb + +def verify_active_service_type(services, target_service_type : ServiceTypeEnum) -> bool: # type: ignore + # Iterate all services + for service in services: + # Ignore services of other types + if service.service_type != target_service_type: + continue + + service_id = service.service_id + assert service_id + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + assert service.service_config + return True + + return False -- GitLab From 578f87b930361b7589ab6e3747b1a7de65caed0e Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Sat, 22 Mar 2025 08:20:56 +0000 Subject: [PATCH 444/463] feat: common service library for the SD-Fabric P4 dataplane --- .../p4_fabric_tna_commons.py | 908 ++++++++++++++++++ 1 file changed, 908 insertions(+) create mode 100644 src/service/service/service_handlers/p4_fabric_tna_commons/p4_fabric_tna_commons.py diff --git a/src/service/service/service_handlers/p4_fabric_tna_commons/p4_fabric_tna_commons.py b/src/service/service/service_handlers/p4_fabric_tna_commons/p4_fabric_tna_commons.py new file mode 100644 index 000000000..eb8077ff3 --- /dev/null +++ b/src/service/service/service_handlers/p4_fabric_tna_commons/p4_fabric_tna_commons.py @@ -0,0 +1,908 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Common objects and methods for the SD-Fabric (fabric TNA) dataplane. +This dataplane covers both software based and hardware-based Stratum-enabled P4 switches, +such as the BMv2 software switch and Intel's Tofino/Tofino-2 switches. + +SD-Fabric repo: https://github.com/stratum/fabric-tna +SD-Fabric docs: https://docs.sd-fabric.org/master/index.html +""" + +import time +import logging +import struct +from common.proto.context_pb2 import ConfigActionEnum, ConfigRule +from common.tools.object_factory.ConfigRule import json_config_rule +from common.type_checkers.Checkers import chk_address_mac, chk_vlan_id, \ + chk_address_ipv4, chk_transport_port +from random import randint +from typing import List, Tuple + +LOGGER = logging.getLogger(__name__) + +# Common service handler settings +TARGET_P4_ARCH = "target_p4_arch" +SWITCH_DATAPLANE_ID_MAP = "switch_dataplane_id_map" +VLAN_ID = "vlan_id" + +# P4 architectures +TARGET_ARCH_TNA = "tna" +TARGET_ARCH_V1MODEL = "v1model" +SUPPORTED_TARGET_ARCH_LIST = [TARGET_ARCH_TNA, TARGET_ARCH_V1MODEL] + +# Recirculation ports for various targets +RECIRCULATION_PORTS_TNA = [68, 196, 324, 452] # Tofino-2 (2-pipe switches use only the first 2 entries) +RECIRCULATION_PORTS_V1MODEL = [510] # Variable FAKE_V1MODEL_RECIRC_PORT in p4 source program + +# P4 tables +TABLE_INGRESS_VLAN = "FabricIngress.filtering.ingress_port_vlan" +TABLE_EGRESS_VLAN = "FabricEgress.egress_next.egress_vlan" +TABLE_FWD_CLASSIFIER = "FabricIngress.filtering.fwd_classifier" +TABLE_BRIDGING = "FabricIngress.forwarding.bridging" +TABLE_ROUTING_V4 = "FabricIngress.forwarding.routing_v4" +TABLE_NEXT_SIMPLE = "FabricIngress.next.simple" +TABLE_NEXT_HASHED = "FabricIngress.next.hashed" +TABLE_ACL = "FabricIngress.acl.acl" + +# Action profile members +ACTION_PROFILE_NEXT_HASHED = "FabricIngress.next.hashed_profile" + +# Clone sessions +CLONE_SESSION = "/clone_sessions/clone_session" + +# Forwarding types +FORWARDING_TYPE_BRIDGING = 0 +FORWARDING_TYPE_MPLS = 1 +FORWARDING_TYPE_UNICAST_IPV4 = 2 +FORWARDING_TYPE_IPV4_MULTICAST = 3 +FORWARDING_TYPE_IPV6_UNICAST = 4 +FORWARDING_TYPE_IPV6_MULTICAST = 5 +FORWARDING_TYPE_UNKNOWN = 7 + +FORWARDING_TYPES_VALID = [ + FORWARDING_TYPE_BRIDGING, + FORWARDING_TYPE_MPLS, + FORWARDING_TYPE_UNICAST_IPV4, + FORWARDING_TYPE_IPV4_MULTICAST, + FORWARDING_TYPE_IPV6_UNICAST, + FORWARDING_TYPE_IPV6_MULTICAST, + FORWARDING_TYPE_UNKNOWN +] + +# Port types +PORT_TYPE_INT = "int" +PORT_TYPE_HOST = "host" +PORT_TYPE_SWITCH = "switch" + +PORT_TYPE_ACTION_EDGE = 1 +PORT_TYPE_ACTION_INFRA = 2 +PORT_TYPE_ACTION_INTERNAL = 3 + +PORT_TYPE_MAP = { + PORT_TYPE_INT: PORT_TYPE_ACTION_INTERNAL, + PORT_TYPE_HOST: PORT_TYPE_ACTION_EDGE, + PORT_TYPE_SWITCH: PORT_TYPE_ACTION_INFRA +} + +PORT_TYPES_STR_VALID = [PORT_TYPE_INT, PORT_TYPE_HOST, PORT_TYPE_SWITCH] +PORT_TYPES_INT_VALID = [PORT_TYPE_ACTION_EDGE, PORT_TYPE_ACTION_INFRA, PORT_TYPE_ACTION_INTERNAL] + +# Bridged metadata type +BRIDGED_MD_TYPE_EGRESS_MIRROR = 2 +BRIDGED_MD_TYPE_INGRESS_MIRROR = 3 +BRIDGED_MD_TYPE_INT_INGRESS_DROP = 4 +BRIDGED_MD_TYPE_DEFLECTED = 5 + +# Mirror types +MIRROR_TYPE_INVALID = 0 +MIRROR_TYPE_INT_REPORT = 1 + +# VLAN +VLAN_DEF = 4094 + +# Supported Ethernet types +ETHER_TYPE_IPV4 = "0x0800" +ETHER_TYPE_IPV6 = "0x86DD" + +# Member ID +NEXT_MEMBER_ID = 1 + +# Time interval in seconds for consecutive rule management (insert/delete) operations +RULE_CONF_INTERVAL_SEC = 0.1 + +################################################################################################################ +### Miscellaneous methods +################################################################################################################ + +def arch_tna(arch : str) -> bool: + return arch == TARGET_ARCH_TNA + +def arch_v1model(arch : str) -> bool: + return not arch_tna(arch) + +def generate_random_mac() -> str: + mac = [randint(0x00, 0xff)] * 6 + mac_str = ':'.join(map(lambda x: "%02x" % x, mac)) + chk_address_mac(mac_str), "Invalid MAC address generated" + + return mac_str + +def prefix_to_hex_mask(prefix_len): + # Calculate the binary mask + binary_mask = (1 << 32) - (1 << (32 - prefix_len)) + + # Convert the binary mask to the 4 octets (32 bits) + mask = struct.pack('!I', binary_mask) + + # Convert to a string of hex values + hex_mask = ''.join(f'{byte:02x}' for byte in mask) + + return "0x"+hex_mask.upper() + +def sleep_for(time_sec : int) -> None: + assert time_sec > 0, "Invalid sleep period in seconds" + time.sleep(time_sec) + +################################################################################################################ +### Rule generation methods +################################################################################################################ + +################################### +### A. Port setup +################################### + +def rules_set_up_port_ingress( + ingress_port : int, + port_type : str, + vlan_id: int, + action : ConfigActionEnum) -> List [Tuple]: # type: ignore + assert ingress_port >= 0, "Invalid ingress port to configure ingress port" + assert port_type.lower() in PORT_TYPES_STR_VALID, "Invalid port type to configure ingress port" + assert chk_vlan_id(vlan_id), "Invalid VLAN ID to configure ingress port" + + rule_no = cache_rule(TABLE_INGRESS_VLAN, action) + + port_type_int = PORT_TYPE_MAP[port_type.lower()] + assert port_type_int in PORT_TYPES_INT_VALID, "Invalid port type to configure ingress filtering" + + rules_filtering_vlan_ingress = [] + rules_filtering_vlan_ingress.append( + json_config_rule( + action, + '/tables/table/'+TABLE_INGRESS_VLAN+'['+str(rule_no)+']', + { + 'table-name': TABLE_INGRESS_VLAN, + 'match-fields': [ + { + 'match-field': 'ig_port', + 'match-value': str(ingress_port) + }, + { + 'match-field': 'vlan_is_valid', + 'match-value': '0' + } + ], + 'action-name': 'FabricIngress.filtering.permit_with_internal_vlan', + 'action-params': [ + { + 'action-param': 'port_type', + 'action-value': str(port_type_int) + }, + { + 'action-param': 'vlan_id', + 'action-value': str(vlan_id) + } + ], + 'priority': 10 + } + ) + ) + + return rules_filtering_vlan_ingress + +def rules_set_up_port_egress( + egress_port : int, + vlan_id: int, + action : ConfigActionEnum) -> List [Tuple]: # type: ignore + assert egress_port >= 0, "Invalid egress port to configure egress vlan" + assert chk_vlan_id(vlan_id), "Invalid VLAN ID to configure egress vlan" + + rule_no = cache_rule(TABLE_EGRESS_VLAN, action) + + rules_vlan_egress = [] + rules_vlan_egress.append( + json_config_rule( + action, + '/tables/table/'+TABLE_EGRESS_VLAN+'['+str(rule_no)+']', + { + 'table-name': TABLE_EGRESS_VLAN, + 'match-fields': [ + { + 'match-field': 'eg_port', + 'match-value': str(egress_port) + }, + { + 'match-field': 'vlan_id', + 'match-value': str(vlan_id) + } + ], + 'action-name': 'FabricEgress.egress_next.pop_vlan', + 'action-params': [] + } + ) + ) + + return rules_vlan_egress + +def rules_set_up_fwd_classifier( + ingress_port : int, + fwd_type : int, + eth_type: str, + action : ConfigActionEnum) -> List [Tuple]: # type: ignore + assert ingress_port >= 0, "Invalid ingress port to configure forwarding classifier" + assert fwd_type in FORWARDING_TYPES_VALID, "Invalid forwarding type to configure forwarding classifier" + + rule_no = cache_rule(TABLE_FWD_CLASSIFIER, action) + + rules_filtering_fwd_classifier = [] + rules_filtering_fwd_classifier.append( + json_config_rule( + action, + '/tables/table/'+TABLE_FWD_CLASSIFIER+'['+str(rule_no)+']', + { + 'table-name': TABLE_FWD_CLASSIFIER, + 'match-fields': [ + { + 'match-field': 'ig_port', + 'match-value': str(ingress_port) + }, + { + 'match-field': 'eth_type', + 'match-value': eth_type + } + ], + 'action-name': 'FabricIngress.filtering.set_forwarding_type', + 'action-params': [ + { + 'action-param': 'fwd_type', + 'action-value': str(FORWARDING_TYPE_UNICAST_IPV4) + }, + ], + 'priority': 10 + } + ) + ) + + return rules_filtering_fwd_classifier + +def rules_set_up_port( + port : int, + port_type : str, + fwd_type : int, + vlan_id : int, + action : ConfigActionEnum, # type: ignore + eth_type=ETHER_TYPE_IPV4): + rules_list = [] + + rules_list.extend( + rules_set_up_port_ingress( + ingress_port=port, + port_type=port_type, + vlan_id=vlan_id, + action=action + ) + ) + rules_list.extend( + rules_set_up_fwd_classifier( + ingress_port=port, + fwd_type=fwd_type, + eth_type=eth_type, + action=action + ) + ) + rules_list.extend( + rules_set_up_port_egress( + egress_port=port, + vlan_id=vlan_id, + action=action + ) + ) + LOGGER.debug("Port configured:{}".format(port)) + + return rules_list + +################################### +### A. End of port setup +################################### + + +################################### +### B. L2 setup +################################### + +def rules_set_up_fwd_bridging( + vlan_id: int, + eth_dst : str, + egress_port : int, + action : ConfigActionEnum) -> List [Tuple]: # type: ignore + assert chk_vlan_id(vlan_id), "Invalid VLAN ID to configure bridging" + assert chk_address_mac(eth_dst), "Invalid destination Ethernet address to configure bridging" + assert egress_port >= 0, "Invalid outport to configure bridging" + + rule_no = cache_rule(TABLE_BRIDGING, action) + + rules_fwd_bridging = [] + rules_fwd_bridging.append( + json_config_rule( + action, + '/tables/table/'+TABLE_BRIDGING+'['+str(rule_no)+']', + { + 'table-name': TABLE_BRIDGING, + 'match-fields': [ + { + 'match-field': 'vlan_id', + 'match-value': str(vlan_id) + }, + { + 'match-field': 'eth_dst', + 'match-value': eth_dst + } + ], + 'action-name': 'FabricIngress.forwarding.set_next_id_bridging', + 'action-params': [ + { + 'action-param': 'next_id', + 'action-value': str(egress_port) + } + ], + 'priority': 1 + } + ) + ) + + return rules_fwd_bridging + +def rules_set_up_next_output_simple( + egress_port : int, + eth_src : str, + eth_dst : str, + action : ConfigActionEnum) -> List [Tuple]: # type: ignore + assert egress_port >= 0, "Invalid outport to configure next output simple" + assert chk_address_mac(eth_src), "Invalid source Ethernet address to configure next output simple" + assert chk_address_mac(eth_dst), "Invalid destination Ethernet address to configure next output simple" + + rule_no = cache_rule(TABLE_NEXT_SIMPLE, action) + + rules_next_output_simple = [] + rules_next_output_simple.append( + json_config_rule( + action, + '/tables/table/'+TABLE_NEXT_SIMPLE+'['+str(rule_no)+']', + { + 'table-name': TABLE_NEXT_SIMPLE, + 'match-fields': [ + { + 'match-field': 'next_id', + 'match-value': str(egress_port) + } + ], + 'action-name': 'FabricIngress.next.output_simple', + 'action-params': [ + { + 'action-param': 'port_num', + 'action-value': str(egress_port) + } + ] + } + ) + ) + + return rules_next_output_simple + +def rules_set_up_next_output_hashed( + egress_port : int, + action : ConfigActionEnum, # type: ignore + next_id = None) -> List [Tuple]: + assert egress_port >= 0, "Invalid outport to configure next output hashed" + + if next_id is None: + next_id = egress_port + + global NEXT_MEMBER_ID + + rule_no = cache_rule(ACTION_PROFILE_NEXT_HASHED, action) + + rules_next_output_hashed = [] + rules_next_output_hashed.append( + json_config_rule( + action, + '/action_profiles/action_profile/'+ACTION_PROFILE_NEXT_HASHED+'['+str(rule_no)+']', + { + 'action-profile-name': ACTION_PROFILE_NEXT_HASHED, + 'member-id': NEXT_MEMBER_ID, + 'action-name': 'FabricIngress.next.output_hashed', + 'action-params': [ + { + 'action-param': 'port_num', + 'action-value': str(egress_port) + } + ] + } + ) + ) + + rule_no = cache_rule(TABLE_NEXT_HASHED, action) + + rules_next_output_hashed.append( + json_config_rule( + action, + '/tables/table/'+TABLE_NEXT_HASHED+'['+str(rule_no)+']', + { + 'table-name': TABLE_NEXT_HASHED, + 'member-id': NEXT_MEMBER_ID, + 'match-fields': [ + { + 'match-field': 'next_id', + 'match-value': str(next_id) + } + ] + } + ) + ) + + NEXT_MEMBER_ID += 1 + + return rules_next_output_hashed + +################################### +### B. End of L2 setup +################################### + + +################################### +### C. L3 setup +################################### + +def rules_set_up_routing( + ipv4_dst : str, + egress_port : int, + action : ConfigActionEnum) -> List [Tuple]: # type: ignore + assert chk_address_ipv4(ipv4_dst), "Invalid destination IPv4 address to configure routing" + assert egress_port >= 0, "Invalid outport to configure routing" + + rule_no = cache_rule(TABLE_ROUTING_V4, action) + + rules_routing = [] + rules_routing.append( + json_config_rule( + action, + '/tables/table/'+TABLE_ROUTING_V4+'['+str(rule_no)+']', + { + 'table-name': TABLE_ROUTING_V4, + 'match-fields': [ + { + 'match-field': 'ipv4_dst', + 'match-value': ipv4_dst + } + ], + 'action-name': 'FabricIngress.forwarding.set_next_id_routing_v4', + 'action-params': [ + { + 'action-param': 'next_id', + 'action-value': str(egress_port) + } + ] + } + ) + ) + + return rules_routing + +def rules_set_up_next_routing_simple( + egress_port : int, + eth_src : str, + eth_dst : str, + action : ConfigActionEnum) -> List [Tuple]: # type: ignore + assert egress_port >= 0, "Invalid outport to configure next routing simple" + assert chk_address_mac(eth_src), "Invalid source Ethernet address to configure next routing simple" + assert chk_address_mac(eth_dst), "Invalid destination Ethernet address to configure next routing simple" + + rule_no = cache_rule(TABLE_NEXT_SIMPLE, action) + + rules_next_routing_simple = [] + rules_next_routing_simple.append( + json_config_rule( + action, + '/tables/table/'+TABLE_NEXT_SIMPLE+'['+str(rule_no)+']', + { + 'table-name': TABLE_NEXT_SIMPLE, + 'match-fields': [ + { + 'match-field': 'next_id', + 'match-value': str(egress_port) + } + ], + 'action-name': 'FabricIngress.next.routing_simple', + 'action-params': [ + { + 'action-param': 'port_num', + 'action-value': str(egress_port) + }, + { + 'action-param': 'smac', + 'action-value': eth_src + }, + { + 'action-param': 'dmac', + 'action-value': eth_dst + } + ] + } + ) + ) + + return rules_next_routing_simple + +def rules_set_up_next_routing_hashed( + egress_port : int, + action : ConfigActionEnum, # type: ignore + next_id = None) -> List [Tuple]: + assert egress_port >= 0, "Invalid outport to configure next routing hashed" + random_mac_src = generate_random_mac() + random_mac_dst = generate_random_mac() + if next_id is None: + next_id = egress_port + + global NEXT_MEMBER_ID + + rule_no = cache_rule(ACTION_PROFILE_NEXT_HASHED, action) + + rules_next_routing_hashed = [] + rules_next_routing_hashed.append( + json_config_rule( + action, + '/action_profiles/action_profile/'+ACTION_PROFILE_NEXT_HASHED+'['+str(rule_no)+']', + { + 'action-profile-name': ACTION_PROFILE_NEXT_HASHED, + 'member-id': NEXT_MEMBER_ID, + 'action-name': 'FabricIngress.next.routing_hashed', + 'action-params': [ + { + 'action-param': 'port_num', + 'action-value': str(egress_port) + }, + { + 'action-param': 'smac', + 'action-value': random_mac_src + }, + { + 'action-param': 'dmac', + 'action-value': random_mac_dst + } + ] + } + ) + ) + + rule_no = cache_rule(TABLE_NEXT_HASHED, action) + + rules_next_routing_hashed.append( + json_config_rule( + action, + '/tables/table/'+TABLE_NEXT_HASHED+'['+str(rule_no)+']', + { + 'table-name': TABLE_NEXT_HASHED, + 'member-id': NEXT_MEMBER_ID, + 'match-fields': [ + { + 'match-field': 'next_id', + 'match-value': str(next_id) + } + ] + } + ) + ) + + return rules_next_routing_hashed + +################################### +### C. End of L3 setup +################################### + + +################################### +### D. Flow mirroring +################################### + +def rules_set_up_report_mirror_flow( + recirculation_port_list : List, + report_mirror_id_list : List, + action : ConfigActionEnum) -> List [Tuple]: # type: ignore + rules_list = [] + + for i, mirror_id in enumerate(report_mirror_id_list): + LOGGER.debug("Mirror ID:{} - Recirculation port: {}".format( + mirror_id, recirculation_port_list[i])) + rules_list.extend( + rules_set_up_clone_session( + session_id=mirror_id, + egress_port=recirculation_port_list[i], + instance=0, + action=action + ) + ) + + return rules_list + +def rules_set_up_clone_session( + session_id : int, + egress_port : int, + instance : int, + action : ConfigActionEnum) -> List [Tuple]: # type: ignore + assert session_id >= 0, "Invalid session identifier to configure clone session" + assert egress_port >= 0, "Invalid egress port number to configure clone session" + assert instance >= 0, "Invalid instance number to configure clone session" + + rule_no = cache_rule(CLONE_SESSION, action) + + #TODO: For TNA pass also: packet_length_bytes = 128 + packet_length_bytes = 128 + + rules_clone_session = [] + + rules_clone_session.append( + json_config_rule( + action, + CLONE_SESSION+'['+str(rule_no)+']', + { + 'session-id': session_id, + 'replicas': [ + { + 'egress-port': egress_port, + 'instance': instance + } + ] + } + ) + ) + + return rules_clone_session + +################################### +### D. End of flow mirroring +################################### + + +################################### +### E. Access Control Lists +################################### + +def rules_set_up_acl_filter_host( + ingress_port : int, + ip_address : str, + prefix_len : int, + action : ConfigActionEnum) -> List [Tuple]: # type: ignore + assert ingress_port >= 0, "Invalid ingress port to configure ACL" + assert chk_address_ipv4(ip_address), "Invalid IP address to configure ACL" + assert 0 < prefix_len <= 32, "Invalid IP address prefix length to configure ACL" + + prefix_len_hex = prefix_to_hex_mask(prefix_len) + + rule_no = cache_rule(TABLE_ACL, action) + + rules_acl = [] + rules_acl.append( + json_config_rule( + action, + '/tables/table/'+TABLE_ACL+'['+str(rule_no)+']', + { + 'table-name': TABLE_ACL, + 'match-fields': [ + { + 'match-field': 'ig_port', + 'match-value': str(ingress_port) + }, + { + 'match-field': 'ipv4_src', + 'match-value': '%s&&&%s' % (ip_address, prefix_len_hex) + } + ], + 'action-name': 'FabricIngress.acl.drop', + 'action-params': [], + 'priority': 1 + } + ) + ) + + return rules_acl + +def rules_set_up_acl_filter_port( + ingress_port : int, + transport_port : int, + action : ConfigActionEnum) -> List [Tuple]: # type: ignore + assert ingress_port >= 0, "Invalid ingress port to configure ACL" + assert chk_transport_port(transport_port), "Invalid transport port to configure ACL" + + rule_no = cache_rule(TABLE_ACL, action) + + rules_acl = [] + rules_acl.append( + json_config_rule( + action, + '/tables/table/'+TABLE_ACL+'['+str(rule_no)+']', + { + 'table-name': TABLE_ACL, + 'match-fields': [ + { + 'match-field': 'ig_port', + 'match-value': str(ingress_port) + }, + { + 'match-field': 'l4_dport', + 'match-value': str(transport_port) + } + ], + 'action-name': 'FabricIngress.acl.drop', + 'action-params': [], + 'priority': 1 + } + ) + ) + + return rules_acl + +########################################### +### E. End of Access Control Lists +########################################### + +################################################################################################################ +### Rule management methods +################################################################################################################ + +def apply_rules(task_executor, device_obj, json_config_rules): + applied_rules = 0 + failed_rules = 0 + total_rules = len(json_config_rules) + assert device_obj, "Cannot apply rules to invalid device object" + + if total_rules == 0: + return applied_rules, failed_rules + + # Provision rules one-by-one + for i, json_config_rule in enumerate(json_config_rules): + LOGGER.debug("Applying rule #{}: {}".format(i, json_config_rule)) + try: + # Cleanup the rules of this particular object + del device_obj.device_config.config_rules[:] + + # Add the new rule to apply + device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) + + # Configure the device via the SBI + # TODO: Acquire status of this RPC to ensure that the rule is actually applied + task_executor.configure_device(device_obj) + + # Sleep for some time till the next operation + sleep_for(RULE_CONF_INTERVAL_SEC) + + applied_rules += 1 + except Exception as ex: + LOGGER.error("Error while applying rule #{}: {}".format(i, ex)) + failed_rules += 1 + + LOGGER.info("Batch rules: {}/{} applied".format(applied_rules, total_rules)) + LOGGER.info("Batch rules: {}/{} failed".format(failed_rules, total_rules)) + + return applied_rules, failed_rules + +# Map for keeping rule counts per table +RULE_ENTRY_MAP = {} + +def cache_rule( + table_name : str, + action : ConfigActionEnum) -> int: # type: ignore + rule_no = -1 + + if action == ConfigActionEnum.CONFIGACTION_SET: + rule_no = add_rule_to_map(table_name) + elif action == ConfigActionEnum.CONFIGACTION_DELETE: + rule_no = delete_rule_from_map(table_name) + else: + assert True, "Invalid rule configuration action" + + assert rule_no > 0, "Invalid rule identifier to configure table {}".format(table_name) + + return rule_no + +def add_rule_to_map(table_name : str) -> int: + if table_name not in RULE_ENTRY_MAP: + RULE_ENTRY_MAP[table_name] = [] + + # Current number of rules + rules_no = len(RULE_ENTRY_MAP[table_name]) + + # Get a new valid rule index + new_index = find_minimum_available_rule_index(RULE_ENTRY_MAP[table_name]) + LOGGER.debug("Minimum available rule index for table {} is: {}".format(table_name, new_index)) + assert new_index > 0, "Invalid rule index for table {}".format(table_name) + + # New entry + new_rule_entry = table_name+"["+str(new_index)+"]" + + # Add entry to the list + RULE_ENTRY_MAP[table_name].append(new_rule_entry) + assert len(RULE_ENTRY_MAP[table_name]) == rules_no + 1 + + return new_index + +def delete_rule_from_map(table_name : str) -> int: + if table_name not in RULE_ENTRY_MAP: + LOGGER.error("Table {} has no entries".format(table_name)) + return -1 + + # Current number of rules + rules_no = len(RULE_ENTRY_MAP[table_name]) + + # Remove last rule + rule_entry = RULE_ENTRY_MAP[table_name].pop() + # Get its index + rule_no = int(rule_entry.split('[')[1].split(']')[0]) + + assert len(RULE_ENTRY_MAP[table_name]) == rules_no - 1 + + # Return the index of the removed rule + return rule_no + +def string_contains_number(input_string : str, target_number : int) -> bool: + return str(target_number) in input_string + +def rule_index_exists(rule_entry_list : List, target_rule_index : int) -> bool: + # Rule indices start from 1 + if target_rule_index <= 0: + return False + + rules_no = len(rule_entry_list) + if rules_no == 0: + return False + + for rule in rule_entry_list: + if string_contains_number(rule, target_rule_index): + return True + + return False + +def find_minimum_available_rule_index(rule_entry_list : List) -> int: + rules_no = len(rule_entry_list) + if rules_no == 0: + return 1 + + min_index = -1 + for i, _ in enumerate(rule_entry_list): + index = i+1 + idx_exists = rule_index_exists(rule_entry_list, index) + # This index is not present in the rule list, so it is available + if not idx_exists and min_index < index: + min_index = index + + # All of the existing rule indices are taken, proceed to the next one + if min_index == -1: + min_index = rules_no + 1 + + return min_index + +def print_rule_map() -> None: + for k in RULE_ENTRY_MAP.keys(): + LOGGER.info("Table {} entries: {}".format(k, RULE_ENTRY_MAP[k])) -- GitLab From afbe8b59cf07312e05ad1e378e40df7ea259c52e Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Sat, 22 Mar 2025 08:27:07 +0000 Subject: [PATCH 445/463] fix: remove unecessary whitespaces --- .../p4_fabric_tna_commons/p4_fabric_tna_commons.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/service/service/service_handlers/p4_fabric_tna_commons/p4_fabric_tna_commons.py b/src/service/service/service_handlers/p4_fabric_tna_commons/p4_fabric_tna_commons.py index eb8077ff3..4b60f9118 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_commons/p4_fabric_tna_commons.py +++ b/src/service/service/service_handlers/p4_fabric_tna_commons/p4_fabric_tna_commons.py @@ -129,7 +129,7 @@ RULE_CONF_INTERVAL_SEC = 0.1 def arch_tna(arch : str) -> bool: return arch == TARGET_ARCH_TNA - + def arch_v1model(arch : str) -> bool: return not arch_tna(arch) @@ -143,13 +143,13 @@ def generate_random_mac() -> str: def prefix_to_hex_mask(prefix_len): # Calculate the binary mask binary_mask = (1 << 32) - (1 << (32 - prefix_len)) - + # Convert the binary mask to the 4 octets (32 bits) mask = struct.pack('!I', binary_mask) - + # Convert to a string of hex values hex_mask = ''.join(f'{byte:02x}' for byte in mask) - + return "0x"+hex_mask.upper() def sleep_for(time_sec : int) -> None: @@ -172,7 +172,7 @@ def rules_set_up_port_ingress( assert ingress_port >= 0, "Invalid ingress port to configure ingress port" assert port_type.lower() in PORT_TYPES_STR_VALID, "Invalid port type to configure ingress port" assert chk_vlan_id(vlan_id), "Invalid VLAN ID to configure ingress port" - + rule_no = cache_rule(TABLE_INGRESS_VLAN, action) port_type_int = PORT_TYPE_MAP[port_type.lower()] -- GitLab From 7b9e30103abab96bf40473c3203666257557e4eb Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Mon, 31 Mar 2025 06:30:53 +0000 Subject: [PATCH 446/463] feat: support for more NFs and fixes --- src/common/type_checkers/Checkers.py | 9 ++ .../p4_fabric_tna_commons.py | 96 ++++++++++++++----- .../service/task_scheduler/TaskExecutor.py | 2 +- src/tests/tools/test_tools_p4.py | 6 +- 4 files changed, 87 insertions(+), 26 deletions(-) diff --git a/src/common/type_checkers/Checkers.py b/src/common/type_checkers/Checkers.py index 694f14102..e797d6441 100644 --- a/src/common/type_checkers/Checkers.py +++ b/src/common/type_checkers/Checkers.py @@ -140,6 +140,15 @@ def chk_address_ipv4(ip_addr : str): except ValueError: return False +def chk_prefix_len_ipv4(ip_prefix_len : int): + """ + Check whether input integer is a valid IPv4 address prefix length. + + :param ip_prefix_len: IPv4 address prefix length + :return: boolean status + """ + return 0 <= ip_prefix_len <= 32 + def chk_address_ipv6(ip_addr : str): """ Check whether input string is a valid IPv6 address or not. diff --git a/src/service/service/service_handlers/p4_fabric_tna_commons/p4_fabric_tna_commons.py b/src/service/service/service_handlers/p4_fabric_tna_commons/p4_fabric_tna_commons.py index 4b60f9118..a97bce07f 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_commons/p4_fabric_tna_commons.py +++ b/src/service/service/service_handlers/p4_fabric_tna_commons/p4_fabric_tna_commons.py @@ -24,19 +24,37 @@ SD-Fabric docs: https://docs.sd-fabric.org/master/index.html import time import logging import struct -from common.proto.context_pb2 import ConfigActionEnum, ConfigRule -from common.tools.object_factory.ConfigRule import json_config_rule -from common.type_checkers.Checkers import chk_address_mac, chk_vlan_id, \ - chk_address_ipv4, chk_transport_port from random import randint from typing import List, Tuple +from common.proto.context_pb2 import ConfigActionEnum, ConfigRule, Device, EndPoint +from common.tools.object_factory.ConfigRule import json_config_rule +from common.type_checkers.Checkers import chk_address_mac, chk_vlan_id, \ + chk_address_ipv4, chk_prefix_len_ipv4, chk_transport_port +from service.service.task_scheduler.TaskExecutor import TaskExecutor LOGGER = logging.getLogger(__name__) # Common service handler settings -TARGET_P4_ARCH = "target_p4_arch" -SWITCH_DATAPLANE_ID_MAP = "switch_dataplane_id_map" +SWITCH_INFO = "switch_info" +ARCH = "arch" +DPID = "dpid" +MAC = "mac" +IP = "ip" +PORT = "port" # Dataplane port +PORT_ID = "port_id" +PORT_TYPE = "port_type" VLAN_ID = "vlan_id" +RECIRCULATION_PORT_LIST = "recirculation_port_list" +PORT_LIST = "port_list" +PORT_PREFIX = "port-" +ROUTING_LIST = "routing_list" +MAC_SRC = "mac_src" +MAC_DST = "mac_dst" +IPV4_SRC = "ipv4_src" +IPV4_DST = "ipv4_dst" +IPV4_PREFIX_LEN = "ipv4_prefix_len" +TRN_PORT_SRC = "trn_port_src" # Transport network port (TCP, UDP) +TRN_PORT_DST = "trn_port_dst" # P4 architectures TARGET_ARCH_TNA = "tna" @@ -140,7 +158,7 @@ def generate_random_mac() -> str: return mac_str -def prefix_to_hex_mask(prefix_len): +def prefix_to_hex_mask(prefix_len : int) -> str: # Calculate the binary mask binary_mask = (1 << 32) - (1 << (32 - prefix_len)) @@ -156,6 +174,30 @@ def sleep_for(time_sec : int) -> None: assert time_sec > 0, "Invalid sleep period in seconds" time.sleep(time_sec) +def find_port_id_in_endpoint(endpoint : EndPoint, target_endpoint_uuid : str) -> int: # type: ignore + assert endpoint, "Invalid device endpoint" + endpoint_uuid = endpoint.endpoint_id.endpoint_uuid.uuid + assert endpoint_uuid, "Invalid device endpoint UUID" + if endpoint_uuid == target_endpoint_uuid: + try: + dpid = int(endpoint.name) # P4 devices have integer dataplane port IDs + assert dpid > 0, "Invalid device endpoint DPID" + except Exception as ex: + LOGGER.error(ex) + return -1 + return dpid + + return -1 + +def find_port_id_in_endpoint_list(endpoint_list : List, target_endpoint_uuid : str) -> int: + assert endpoint_list, "Invalid device endpoint list" + for endpoint in endpoint_list: + result = find_port_id_in_endpoint(endpoint, target_endpoint_uuid) + if result != -1: + return result + + return -1 + ################################################################################################################ ### Rule generation methods ################################################################################################################ @@ -173,6 +215,9 @@ def rules_set_up_port_ingress( assert port_type.lower() in PORT_TYPES_STR_VALID, "Invalid port type to configure ingress port" assert chk_vlan_id(vlan_id), "Invalid VLAN ID to configure ingress port" + # VLAN support if 1 + vlan_is_valid = 1 if vlan_id != VLAN_DEF else 0 + rule_no = cache_rule(TABLE_INGRESS_VLAN, action) port_type_int = PORT_TYPE_MAP[port_type.lower()] @@ -192,7 +237,7 @@ def rules_set_up_port_ingress( }, { 'match-field': 'vlan_is_valid', - 'match-value': '0' + 'match-value': str(vlan_is_valid) } ], 'action-name': 'FabricIngress.filtering.permit_with_internal_vlan', @@ -270,7 +315,7 @@ def rules_set_up_fwd_classifier( 'match-value': str(ingress_port) }, { - 'match-field': 'eth_type', + 'match-field': 'ip_eth_type', 'match-value': eth_type } ], @@ -278,10 +323,10 @@ def rules_set_up_fwd_classifier( 'action-params': [ { 'action-param': 'fwd_type', - 'action-value': str(FORWARDING_TYPE_UNICAST_IPV4) + 'action-value': str(fwd_type) }, ], - 'priority': 10 + 'priority': 1 } ) ) @@ -294,7 +339,7 @@ def rules_set_up_port( fwd_type : int, vlan_id : int, action : ConfigActionEnum, # type: ignore - eth_type=ETHER_TYPE_IPV4): + eth_type=ETHER_TYPE_IPV4) -> List [Tuple]: rules_list = [] rules_list.extend( @@ -377,12 +422,8 @@ def rules_set_up_fwd_bridging( def rules_set_up_next_output_simple( egress_port : int, - eth_src : str, - eth_dst : str, action : ConfigActionEnum) -> List [Tuple]: # type: ignore assert egress_port >= 0, "Invalid outport to configure next output simple" - assert chk_address_mac(eth_src), "Invalid source Ethernet address to configure next output simple" - assert chk_address_mac(eth_dst), "Invalid destination Ethernet address to configure next output simple" rule_no = cache_rule(TABLE_NEXT_SIMPLE, action) @@ -478,9 +519,11 @@ def rules_set_up_next_output_hashed( def rules_set_up_routing( ipv4_dst : str, + ipv4_prefix_len : int, egress_port : int, action : ConfigActionEnum) -> List [Tuple]: # type: ignore assert chk_address_ipv4(ipv4_dst), "Invalid destination IPv4 address to configure routing" + assert chk_prefix_len_ipv4(ipv4_prefix_len), "Invalid IPv4 prefix length" assert egress_port >= 0, "Invalid outport to configure routing" rule_no = cache_rule(TABLE_ROUTING_V4, action) @@ -495,7 +538,7 @@ def rules_set_up_routing( 'match-fields': [ { 'match-field': 'ipv4_dst', - 'match-value': ipv4_dst + 'match-value': ipv4_dst + "/" + str(ipv4_prefix_len) } ], 'action-name': 'FabricIngress.forwarding.set_next_id_routing_v4', @@ -694,11 +737,14 @@ def rules_set_up_acl_filter_host( ingress_port : int, ip_address : str, prefix_len : int, + ip_direction : str, action : ConfigActionEnum) -> List [Tuple]: # type: ignore assert ingress_port >= 0, "Invalid ingress port to configure ACL" assert chk_address_ipv4(ip_address), "Invalid IP address to configure ACL" assert 0 < prefix_len <= 32, "Invalid IP address prefix length to configure ACL" + ip_match = "ipv4_src" if ip_direction == "src" else "ipv4_dst" + prefix_len_hex = prefix_to_hex_mask(prefix_len) rule_no = cache_rule(TABLE_ACL, action) @@ -716,7 +762,7 @@ def rules_set_up_acl_filter_host( 'match-value': str(ingress_port) }, { - 'match-field': 'ipv4_src', + 'match-field': ip_match, 'match-value': '%s&&&%s' % (ip_address, prefix_len_hex) } ], @@ -732,10 +778,13 @@ def rules_set_up_acl_filter_host( def rules_set_up_acl_filter_port( ingress_port : int, transport_port : int, + transport_direction : str, action : ConfigActionEnum) -> List [Tuple]: # type: ignore assert ingress_port >= 0, "Invalid ingress port to configure ACL" assert chk_transport_port(transport_port), "Invalid transport port to configure ACL" + trn_match = "l4_sport" if transport_direction == "src" else "l4_dport" + rule_no = cache_rule(TABLE_ACL, action) rules_acl = [] @@ -751,7 +800,7 @@ def rules_set_up_acl_filter_port( 'match-value': str(ingress_port) }, { - 'match-field': 'l4_dport', + 'match-field': trn_match, 'match-value': str(transport_port) } ], @@ -772,7 +821,10 @@ def rules_set_up_acl_filter_port( ### Rule management methods ################################################################################################################ -def apply_rules(task_executor, device_obj, json_config_rules): +def apply_rules( + task_executor : TaskExecutor, + device_obj : Device, # type: ignore + json_config_rules : List): # type: ignore applied_rules = 0 failed_rules = 0 total_rules = len(json_config_rules) @@ -802,9 +854,9 @@ def apply_rules(task_executor, device_obj, json_config_rules): except Exception as ex: LOGGER.error("Error while applying rule #{}: {}".format(i, ex)) failed_rules += 1 + raise Exception(ex) - LOGGER.info("Batch rules: {}/{} applied".format(applied_rules, total_rules)) - LOGGER.info("Batch rules: {}/{} failed".format(failed_rules, total_rules)) + LOGGER.debug("Batch rules: {}/{} applied".format(applied_rules, total_rules)) return applied_rules, failed_rules diff --git a/src/service/service/task_scheduler/TaskExecutor.py b/src/service/service/task_scheduler/TaskExecutor.py index 51fc42a5a..8f797882f 100644 --- a/src/service/service/task_scheduler/TaskExecutor.py +++ b/src/service/service/task_scheduler/TaskExecutor.py @@ -203,7 +203,7 @@ class TaskExecutor: self, service_id : ServiceId, config_key : str, config_value : str ): service_configRule = ServiceConfigRule() - service_configRule.service_id.CopyFrom( service_id) + service_configRule.service_id.CopyFrom(service_id) service_configRule.configrule_custom.resource_key = config_key service_configRule.configrule_custom.resource_value = config_value try: diff --git a/src/tests/tools/test_tools_p4.py b/src/tests/tools/test_tools_p4.py index 4557fef61..65257aefc 100644 --- a/src/tests/tools/test_tools_p4.py +++ b/src/tests/tools/test_tools_p4.py @@ -28,9 +28,9 @@ P4_DEV_NB = 1 CONNECTION_RULES = 3 ENDPOINT_RULES = 3 INT_RULES = 19 -L2_RULES = 8 -L3_RULES = 8 -ACL_RULES = 1 +L2_RULES = 10 +L3_RULES = 4 +ACL_RULES = 2 DATAPLANE_RULES_NB_INT_B1 = 5 DATAPLANE_RULES_NB_INT_B2 = 6 -- GitLab From 80b308271192264727d37722f52ab3798074f9c2 Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Mon, 31 Mar 2025 06:42:01 +0000 Subject: [PATCH 447/463] feat: P4 In-band Network Telemetry (INT) service hnalder --- .../service/service_handlers/__init__.py | 7 + .../p4_fabric_tna_int/__init__.py | 13 + .../p4_fabric_tna_int_config.py | 425 ++++++++++++++++ .../p4_fabric_tna_int_service_handler.py | 467 ++++++++++++++++++ src/tests/p4-fabric-tna/README.md | 19 + .../descriptors/service-create-int.json | 53 ++ .../run_test_06a_service_provision_int.sh | 17 + .../run_test_06b_service_deprovision_int.sh | 17 + ...test_functional_service_deprovision_int.py | 78 +++ .../test_functional_service_provision_int.py | 73 +++ 10 files changed, 1169 insertions(+) create mode 100644 src/service/service/service_handlers/p4_fabric_tna_int/__init__.py create mode 100644 src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_config.py create mode 100644 src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py create mode 100644 src/tests/p4-fabric-tna/descriptors/service-create-int.json create mode 100755 src/tests/p4-fabric-tna/run_test_06a_service_provision_int.sh create mode 100755 src/tests/p4-fabric-tna/run_test_06b_service_deprovision_int.sh create mode 100644 src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_int.py create mode 100644 src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_int.py diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index e03c1172e..76107f03d 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -26,6 +26,7 @@ from .l3nm_nce.L3NMNCEServiceHandler import L3NMNCEServiceHandler from .l3slice_ietfslice.L3SliceIETFSliceServiceHandler import L3NMSliceIETFSliceServiceHandler from .microwave.MicrowaveServiceHandler import MicrowaveServiceHandler from .p4_dummy_l1.p4_dummy_l1_service_handler import P4DummyL1ServiceHandler +from .p4_fabric_tna_int.p4_fabric_tna_int_service_handler import P4FabricINTServiceHandler from .tapi_tapi.TapiServiceHandler import TapiServiceHandler from .tapi_xr.TapiXrServiceHandler import TapiXrServiceHandler from .optical_tfs.OpticalTfsServiceHandler import OpticalTfsServiceHandler @@ -111,6 +112,12 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER: DeviceDriverEnum.DEVICEDRIVER_P4, } ]), + (P4FabricINTServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE: ServiceTypeEnum.SERVICETYPE_INT, + FilterFieldEnum.DEVICE_DRIVER: DeviceDriverEnum.DEVICEDRIVER_P4, + } + ]), (L2NM_IETFL2VPN_ServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L2NM, diff --git a/src/service/service/service_handlers/p4_fabric_tna_int/__init__.py b/src/service/service/service_handlers/p4_fabric_tna_int/__init__.py new file mode 100644 index 000000000..023830645 --- /dev/null +++ b/src/service/service/service_handlers/p4_fabric_tna_int/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/p4_fabric_tna_int/p4_fabric_tna_int_config.py b/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_config.py new file mode 100644 index 000000000..8fb22ee97 --- /dev/null +++ b/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_config.py @@ -0,0 +1,425 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Common objects and methods for In-band Network Telemetry (INT) dataplane +based on the SD-Fabric dataplane model. +This dataplane covers both software based and hardware-based Stratum-enabled P4 switches, +such as the BMv2 software switch and Intel's Tofino/Tofino-2 switches. + +SD-Fabric repo: https://github.com/stratum/fabric-tna +SD-Fabric docs: https://docs.sd-fabric.org/master/index.html +""" + +import logging +from typing import List, Tuple +from common.proto.context_pb2 import ConfigActionEnum +from common.tools.object_factory.ConfigRule import json_config_rule +from common.type_checkers.Checkers import chk_address_ipv4, chk_transport_port + +from service.service.service_handlers.p4_fabric_tna_commons.p4_fabric_tna_commons import * + +LOGGER = logging.getLogger(__name__) + +# INT service handler settings +INT_COLLECTOR_INFO = "int_collector_info" +INT_REPORT_MIRROR_ID_LIST = "int_report_mirror_id_list" +PORT_INT = "int_port" # In-band Network Telemetry transport port (of the collector) + +# INT tables +TABLE_INT_WATCHLIST = "FabricIngress.int_watchlist.watchlist" +TABLE_INT_EGRESS_REPORT = "FabricEgress.int_egress.report" + +# Mirror IDs for INT reports +INT_REPORT_MIRROR_ID_LIST_TNA = [0x200, 0x201, 0x202, 0x203] # Tofino-2 (2-pipe Tofino switches use only the first 2 entries) +INT_REPORT_MIRROR_ID_LIST_V1MODEL = [0x1FA] # Variable V1MODEL_INT_MIRROR_SESSION in p4 source program + +# INT report types +INT_REPORT_TYPE_NO_REPORT = 0 +INT_REPORT_TYPE_FLOW = 1 +INT_REPORT_TYPE_QUEUE = 2 +INT_REPORT_TYPE_DROP = 4 + + +def rules_set_up_int_watchlist(action : ConfigActionEnum) -> List [Tuple]: # type: ignore + rule_no = cache_rule(TABLE_INT_WATCHLIST, action) + + rules_int_watchlist = [] + rules_int_watchlist.append( + json_config_rule( + action, + '/tables/table/'+TABLE_INT_WATCHLIST+'['+str(rule_no)+']', + { + 'table-name': TABLE_INT_WATCHLIST, + 'match-fields': [ + { + 'match-field': 'ipv4_valid', + 'match-value': '1' + } + ], + 'action-name': 'FabricIngress.int_watchlist.mark_to_report', + 'action-params': [], + 'priority': 1 + } + ) + ) + + return rules_int_watchlist + +def rules_set_up_int_report_collector( + int_collector_ip : str, + action : ConfigActionEnum) -> List [Tuple]: # type: ignore + assert chk_address_ipv4(int_collector_ip), "Invalid INT collector IPv4 address to configure watchlist" + + rule_no = cache_rule(TABLE_INT_WATCHLIST, action) + + rules_int_col_report = [] + rules_int_col_report.append( + json_config_rule( + action, + '/tables/table/'+TABLE_INT_WATCHLIST+'['+str(rule_no)+']', + { + 'table-name': TABLE_INT_WATCHLIST, + 'match-fields': [ + { + 'match-field': 'ipv4_valid', + 'match-value': '1' + }, + { + 'match-field': 'ipv4_dst', + 'match-value': int_collector_ip+'&&&0xFFFFFFFF' + } + ], + 'action-name': 'FabricIngress.int_watchlist.no_report_collector', + 'action-params': [], + 'priority': 10 + } + ) + ) + + return rules_int_col_report + +def rules_set_up_int_recirculation_ports( + recirculation_port_list : List, + port_type : str, + fwd_type : int, + vlan_id : int, + action : ConfigActionEnum): # type: ignore + rules_list = [] + + for port in recirculation_port_list: + rules_list.extend( + rules_set_up_port( + port=port, + port_type=port_type, + fwd_type=fwd_type, + vlan_id=vlan_id, + action=action + ) + ) + + LOGGER.debug("INT recirculation ports configured:{}".format(recirculation_port_list)) + + return rules_list + +def rules_set_up_int_report_flow( + switch_id : int, + src_ip : str, + int_collector_ip : str, + int_collector_port : int, + action : ConfigActionEnum) -> List [Tuple]: # type: ignore + assert switch_id > 0, "Invalid switch identifier to configure egress INT report" + assert chk_address_ipv4(src_ip), "Invalid source IPv4 address to configure egress INT report" + assert chk_address_ipv4(int_collector_ip), "Invalid INT collector IPv4 address to configure egress INT report" + assert chk_transport_port(int_collector_port), "Invalid INT collector port number to configure egress INT report" + + rule_no = cache_rule(TABLE_INT_EGRESS_REPORT, action) + + rules_int_egress = [] + + # Rule #1 + rules_int_egress.append( + json_config_rule( + action, + '/tables/table/'+TABLE_INT_EGRESS_REPORT+'['+str(rule_no)+']', + { + 'table-name': TABLE_INT_EGRESS_REPORT, + 'match-fields': [ + { + 'match-field': 'bmd_type', + 'match-value': str(BRIDGED_MD_TYPE_INT_INGRESS_DROP) + }, + { + 'match-field': 'mirror_type', + 'match-value': str(MIRROR_TYPE_INVALID) + }, + { + 'match-field': 'int_report_type', + 'match-value': str(INT_REPORT_TYPE_DROP) + } + ], + 'action-name': 'FabricEgress.int_egress.do_drop_report_encap', + 'action-params': [ + { + 'action-param': 'switch_id', + 'action-value': str(switch_id) + }, + { + 'action-param': 'src_ip', + 'action-value': src_ip + }, + { + 'action-param': 'mon_ip', + 'action-value': int_collector_ip + }, + { + 'action-param': 'mon_port', + 'action-value': str(int_collector_port) + } + ] + } + ) + ) + + rule_no = cache_rule(TABLE_INT_EGRESS_REPORT, action) + + # Rule #2 + rules_int_egress.append( + json_config_rule( + action, + '/tables/table/'+TABLE_INT_EGRESS_REPORT+'['+str(rule_no)+']', + { + 'table-name': TABLE_INT_EGRESS_REPORT, + 'match-fields': [ + { + 'match-field': 'bmd_type', + 'match-value': str(BRIDGED_MD_TYPE_EGRESS_MIRROR) + }, + { + 'match-field': 'mirror_type', + 'match-value': str(MIRROR_TYPE_INT_REPORT) + }, + { + 'match-field': 'int_report_type', + 'match-value': str(INT_REPORT_TYPE_DROP) + } + ], + 'action-name': 'FabricEgress.int_egress.do_drop_report_encap', + 'action-params': [ + { + 'action-param': 'switch_id', + 'action-value': str(switch_id) + }, + { + 'action-param': 'src_ip', + 'action-value': src_ip + }, + { + 'action-param': 'mon_ip', + 'action-value': int_collector_ip + }, + { + 'action-param': 'mon_port', + 'action-value': str(int_collector_port) + } + ] + } + ) + ) + + rule_no = cache_rule(TABLE_INT_EGRESS_REPORT, action) + + # Rule #3 + rules_int_egress.append( + json_config_rule( + action, + '/tables/table/'+TABLE_INT_EGRESS_REPORT+'['+str(rule_no)+']', + { + 'table-name': TABLE_INT_EGRESS_REPORT, + 'match-fields': [ + { + 'match-field': 'bmd_type', + 'match-value': str(BRIDGED_MD_TYPE_EGRESS_MIRROR) + }, + { + 'match-field': 'mirror_type', + 'match-value': str(MIRROR_TYPE_INT_REPORT) + }, + { + 'match-field': 'int_report_type', + 'match-value': str(INT_REPORT_TYPE_FLOW) + } + ], + 'action-name': 'FabricEgress.int_egress.do_local_report_encap', + 'action-params': [ + { + 'action-param': 'switch_id', + 'action-value': str(switch_id) + }, + { + 'action-param': 'src_ip', + 'action-value': src_ip + }, + { + 'action-param': 'mon_ip', + 'action-value': int_collector_ip + }, + { + 'action-param': 'mon_port', + 'action-value': str(int_collector_port) + } + ] + } + ) + ) + + rule_no = cache_rule(TABLE_INT_EGRESS_REPORT, action) + + # Rule #4 + rules_int_egress.append( + json_config_rule( + action, + '/tables/table/'+TABLE_INT_EGRESS_REPORT+'['+str(rule_no)+']', + { + 'table-name': TABLE_INT_EGRESS_REPORT, + 'match-fields': [ + { + 'match-field': 'bmd_type', + 'match-value': str(BRIDGED_MD_TYPE_DEFLECTED) + }, + { + 'match-field': 'mirror_type', + 'match-value': str(MIRROR_TYPE_INVALID) + }, + { + 'match-field': 'int_report_type', + 'match-value': str(INT_REPORT_TYPE_DROP) + } + ], + 'action-name': 'FabricEgress.int_egress.do_drop_report_encap', + 'action-params': [ + { + 'action-param': 'switch_id', + 'action-value': str(switch_id) + }, + { + 'action-param': 'src_ip', + 'action-value': src_ip + }, + { + 'action-param': 'mon_ip', + 'action-value': int_collector_ip + }, + { + 'action-param': 'mon_port', + 'action-value': str(int_collector_port) + } + ] + } + ) + ) + + rule_no = cache_rule(TABLE_INT_EGRESS_REPORT, action) + + # Rule #5 + rules_int_egress.append( + json_config_rule( + action, + '/tables/table/'+TABLE_INT_EGRESS_REPORT+'['+str(rule_no)+']', + { + 'table-name': TABLE_INT_EGRESS_REPORT, + 'match-fields': [ + { + 'match-field': 'bmd_type', + 'match-value': str(BRIDGED_MD_TYPE_EGRESS_MIRROR) + }, + { + 'match-field': 'mirror_type', + 'match-value': str(MIRROR_TYPE_INT_REPORT) + }, + { + 'match-field': 'int_report_type', + 'match-value': str(INT_REPORT_TYPE_QUEUE) + } + ], + 'action-name': 'FabricEgress.int_egress.do_local_report_encap', + 'action-params': [ + { + 'action-param': 'switch_id', + 'action-value': str(switch_id) + }, + { + 'action-param': 'src_ip', + 'action-value': src_ip + }, + { + 'action-param': 'mon_ip', + 'action-value': int_collector_ip + }, + { + 'action-param': 'mon_port', + 'action-value': str(int_collector_port) + } + ] + } + ) + ) + + rule_no = cache_rule(TABLE_INT_EGRESS_REPORT, action) + + # Rule #6 + rules_int_egress.append( + json_config_rule( + action, + '/tables/table/'+TABLE_INT_EGRESS_REPORT+'['+str(rule_no)+']', + { + 'table-name': TABLE_INT_EGRESS_REPORT, + 'match-fields': [ + { + 'match-field': 'bmd_type', + 'match-value': str(BRIDGED_MD_TYPE_EGRESS_MIRROR) + }, + { + 'match-field': 'mirror_type', + 'match-value': str(MIRROR_TYPE_INT_REPORT) + }, + { + 'match-field': 'int_report_type', + 'match-value': str(INT_REPORT_TYPE_QUEUE | INT_REPORT_TYPE_FLOW) + } + ], + 'action-name': 'FabricEgress.int_egress.do_local_report_encap', + 'action-params': [ + { + 'action-param': 'switch_id', + 'action-value': str(switch_id) + }, + { + 'action-param': 'src_ip', + 'action-value': src_ip + }, + { + 'action-param': 'mon_ip', + 'action-value': int_collector_ip + }, + { + 'action-param': 'mon_port', + 'action-value': str(int_collector_port) + } + ] + } + ) + ) + + return rules_int_egress diff --git a/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py new file mode 100644 index 000000000..efdac5fea --- /dev/null +++ b/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py @@ -0,0 +1,467 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Service handler for P4-based In-band Network Telemetry (INT) v0.5. +The spec. is based on P4.org Application WG INT Dataplane +Specification v0.5 (2017-12): + +https://p4.org/p4-spec/docs/INT_v0_5.pdf +""" + +import logging +from typing import Any, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.proto.context_pb2 import ConfigActionEnum, DeviceId, Service, Device +from common.tools.object_factory.Device import json_device_id +from common.type_checkers.Checkers import chk_type, chk_address_mac, chk_address_ipv4,\ + chk_transport_port, chk_vlan_id +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.service_handlers.p4_fabric_tna_commons.p4_fabric_tna_commons import * +from service.service.task_scheduler.TaskExecutor import TaskExecutor + +from .p4_fabric_tna_int_config import * + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'p4_fabric_tna_int'}) + +class P4FabricINTServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : TaskExecutor, **settings # type: ignore + ) -> None: + """ Initialize Driver. + Parameters: + service + The service instance (gRPC message) to be managed. + task_executor + An instance of Task Executor providing access to the + service handlers factory, the context and device clients, + and an internal cache of already-loaded gRPC entities. + **settings + Extra settings required by the service handler. + + """ + self.__service_label = "P4 In-band Network Telemetry (INT) connectivity service" + self.__service = service + self.__task_executor = task_executor + self.__settings_handler = SettingsHandler(self.__service.service_config, **settings) + + self._init_settings() + self._parse_settings() + self._print_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]]: + """ Create/Update service endpoints from a list. + Parameters: + endpoints: List[Tuple[str, str, Optional[str]]] + List of tuples, each containing a device_uuid, + endpoint_uuid and, optionally, the topology_uuid + of the endpoint to be added. + connection_uuid : Optional[str] + If specified, is the UUID of the connection this endpoint is associated to. + Returns: + results: List[Union[bool, Exception]] + List of results for endpoint changes requested. + Return values must be in the same order as the requested + endpoints. If an endpoint is properly added, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + + LOGGER.info("{} - Provision service configuration".format( + self.__service_label)) + + visited = set() + results = [] + for endpoint in endpoints: + device_uuid, _ = endpoint[0:2] + device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + + # Skip already visited devices + if device.name in visited: + continue + LOGGER.info("Device {} - Setting up In-band Network Telemetry (INT) configuration".format( + device.name)) + + rules = [] + actual_rules = -1 + applied_rules, failed_rules = 0, -1 + + # Create and apply rules + try: + rules = self._create_rules(device_obj=device, action=ConfigActionEnum.CONFIGACTION_SET) + actual_rules = len(rules) + applied_rules, failed_rules = apply_rules( + task_executor=self.__task_executor, + device_obj=device, + json_config_rules=rules + ) + except Exception as ex: + LOGGER.error("Failed to insert INT rules on device {} due to {}".format(device.name, ex)) + finally: + rules.clear() + + # Ensure correct status + results.append(True) if (failed_rules == 0) and (applied_rules == actual_rules) \ + else results.append(False) + + # You should no longer visit this device again + visited.add(device.name) + + LOGGER.info("Installed {}/{} INT rules on device {}".format( + applied_rules, actual_rules, device.name)) + + 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]]: + """ Delete service endpoints from a list. + Parameters: + endpoints: List[Tuple[str, str, Optional[str]]] + List of tuples, each containing a device_uuid, + endpoint_uuid, and the topology_uuid of the endpoint + to be removed. + connection_uuid : Optional[str] + If specified, is the UUID of the connection this endpoint is associated to. + Returns: + results: List[Union[bool, Exception]] + List of results for endpoint deletions requested. + Return values must be in the same order as the requested + endpoints. If an endpoint is properly deleted, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + + LOGGER.info("{} - Deprovision service configuration".format( + self.__service_label)) + + visited = set() + results = [] + for endpoint in endpoints: + device_uuid, _ = endpoint[0:2] + device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + + # Skip already visited devices + if device.name in visited: + continue + LOGGER.info("Device {} - Removing In-band Network Telemetry (INT) configuration".format( + device.name)) + + rules = [] + actual_rules = -1 + applied_rules, failed_rules = 0, -1 + + # Create and apply rules + try: + rules = self._create_rules(device_obj=device, action=ConfigActionEnum.CONFIGACTION_DELETE) + actual_rules = len(rules) + applied_rules, failed_rules = apply_rules( + task_executor=self.__task_executor, device_obj=device, json_config_rules=rules) + except Exception as ex: + LOGGER.error("Failed to delete INT rules from device {} due to {}".format(device.name, ex)) + finally: + rules.clear() + + # Ensure correct status + results.append(True) if (failed_rules == 0) and (applied_rules == actual_rules) \ + else results.append(False) + + # You should no longer visit this device again + visited.add(device.name) + + LOGGER.info("Deleted {}/{} INT rules from device {}".format( + applied_rules, actual_rules, device.name)) + + return results + + @metered_subclass_method(METRICS_POOL) + def SetConstraint(self, constraints: List[Tuple[str, Any]]) \ + -> List[Union[bool, Exception]]: + """ Create/Update service constraints. + Parameters: + constraints: List[Tuple[str, Any]] + List of tuples, each containing a constraint_type and the + new constraint_value to be set. + Returns: + results: List[Union[bool, Exception]] + List of results for constraint changes requested. + Return values must be in the same order as the requested + constraints. If a constraint is properly set, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + 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]]: + """ Delete service constraints. + Parameters: + constraints: List[Tuple[str, Any]] + List of tuples, each containing a constraint_type pointing + to the constraint to be deleted, and a constraint_value + containing possible additionally required values to locate + the constraint to be removed. + Returns: + results: List[Union[bool, Exception]] + List of results for constraint deletions requested. + Return values must be in the same order as the requested + constraints. If a constraint is properly deleted, True must + be returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + 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]]: + """ Create/Update configuration for a list of service resources. + Parameters: + resources: List[Tuple[str, Any]] + List of tuples, each containing a resource_key pointing to + the resource to be modified, and a resource_value + containing the new value to be set. + Returns: + results: List[Union[bool, Exception]] + List of results for resource key changes requested. + Return values must be in the same order as the requested + resource keys. If a resource is properly set, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + msg = '[SetConfig] Method not implemented. Resources({:s}) are being ignored.' + LOGGER.warning(msg.format(str(resources))) + return [True for _ in range(len(resources))] + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources: List[Tuple[str, Any]]) \ + -> List[Union[bool, Exception]]: + """ Delete configuration for a list of service resources. + Parameters: + resources: List[Tuple[str, Any]] + List of tuples, each containing a resource_key pointing to + the resource to be modified, and a resource_value containing + possible additionally required values to locate the value + to be removed. + Returns: + results: List[Union[bool, Exception]] + List of results for resource key deletions requested. + Return values must be in the same order as the requested + resource keys. If a resource is properly deleted, True must + be returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + msg = '[SetConfig] Method not implemented. Resources({:s}) are being ignored.' + LOGGER.warning(msg.format(str(resources))) + return [True for _ in range(len(resources))] + + def _init_settings(self): + self.__switch_info = {} + self.__int_collector_info = {} + self.__int_collector_mac = "" + self.__int_collector_ip = "" + self.__int_collector_port = -1 + self.__int_vlan_id = -1 + + try: + self.__settings = self.__settings_handler.get('/settings') + LOGGER.info("{} with settings: {}".format(self.__service_label, self.__settings)) + except Exception as ex: + self.__settings = {} + LOGGER.error("Failed to parse service settings: {}".format(ex)) + + def _default_settings(self): + switch_info = { + "p4-sw1": { + ARCH: TARGET_ARCH_V1MODEL, + DPID: 1, + MAC: "fa:16:3e:93:8c:c0", + IP: "10.10.10.120", + PORT_INT: { + PORT_ID: 3, + PORT_TYPE: "host" + }, + RECIRCULATION_PORT_LIST: RECIRCULATION_PORTS_V1MODEL, + INT_REPORT_MIRROR_ID_LIST: INT_REPORT_MIRROR_ID_LIST_V1MODEL + } + } + int_collector_info = { + MAC: "fa:16:3e:fb:cf:96", + IP: "10.10.10.41", + PORT: 32766, + VLAN_ID: 4094 + } + self.__settings = { + SWITCH_INFO: switch_info, + INT_COLLECTOR_INFO: int_collector_info + } + + def _parse_settings(self): + #TODO: Pass settings in a correct way + try: + self.__switch_info = self.__settings[SWITCH_INFO] + except Exception as ex: + LOGGER.error("Failed to parse settings: {}".format(ex)) + self._default_settings() #TODO: Remove when bug is fixed + self.__switch_info = self.__settings[SWITCH_INFO] + assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" + + for switch_name, switch_info in self.__switch_info.items(): + assert switch_name, "Invalid P4 switch name" + assert isinstance(switch_info, dict), "Switch {} info must be a map with arch, dpid, mac, ip, and int_port items)" + assert switch_info[ARCH] in SUPPORTED_TARGET_ARCH_LIST, \ + "Switch {} - Supported P4 architectures are: {}".format(switch_name, ','.join(SUPPORTED_TARGET_ARCH_LIST)) + assert switch_info[DPID] > 0, "Switch {} - P4 switch dataplane ID must be a positive integer".format(switch_name, switch_info[DPID]) + assert chk_address_mac(switch_info[MAC]), "Switch {} - Invalid source Ethernet address".format(switch_name) + assert chk_address_ipv4(switch_info[IP]), "Switch {} - Invalid source IP address".format(switch_name) + assert isinstance(switch_info[PORT_INT], dict), "Switch {} - INT port object must be a map with port_id and port_type items".format(switch_name) + assert switch_info[PORT_INT][PORT_ID] >= 0, "Switch {} - Invalid P4 switch port ID".format(switch_name) + assert switch_info[PORT_INT][PORT_TYPE] in PORT_TYPES_STR_VALID, "Switch {} - Valid P4 switch port types are: {}".format( + switch_name, ','.join(PORT_TYPES_STR_VALID)) + if arch_tna(switch_info[ARCH]): + switch_info[RECIRCULATION_PORT_LIST] = RECIRCULATION_PORTS_TNA + switch_info[INT_REPORT_MIRROR_ID_LIST] = INT_REPORT_MIRROR_ID_LIST_TNA + else: + switch_info[RECIRCULATION_PORT_LIST] = RECIRCULATION_PORTS_V1MODEL + switch_info[INT_REPORT_MIRROR_ID_LIST] = INT_REPORT_MIRROR_ID_LIST_V1MODEL + assert isinstance(switch_info[RECIRCULATION_PORT_LIST], list), "Switch {} - Recirculation ports must be described as a list".format(switch_name) + + self.__int_collector_info = self.__settings[INT_COLLECTOR_INFO] + assert isinstance(self.__int_collector_info, dict), "INT collector info object must be a map with mac, ip, port, and vlan_id keys)" + + self.__int_collector_mac = self.__int_collector_info[MAC] + assert chk_address_mac(self.__int_collector_mac), "Invalid P4 INT collector MAC address" + + self.__int_collector_ip = self.__int_collector_info[IP] + assert chk_address_ipv4(self.__int_collector_ip), "Invalid P4 INT collector IPv4 address" + + self.__int_collector_port = self.__int_collector_info[PORT] + assert chk_transport_port(self.__int_collector_port), "Invalid P4 INT collector transport port" + + self.__int_vlan_id = self.__int_collector_info[VLAN_ID] + assert chk_vlan_id(self.__int_vlan_id), "Invalid VLAN ID" + + def _print_settings(self): + LOGGER.info("-------------------- {} settings --------------------".format(self.__service.name)) + LOGGER.info("--- Topology info") + for switch_name, switch_info in self.__switch_info.items(): + LOGGER.info("\t Device {}".format(switch_name)) + LOGGER.info("\t\t| Target P4 architecture: {}".format(switch_info[ARCH])) + LOGGER.info("\t\t| Data plane ID: {}".format(switch_info[DPID])) + LOGGER.info("\t\t| Source MAC address: {}".format(switch_info[MAC])) + LOGGER.info("\t\t| Source IP address: {}".format(switch_info[IP])) + LOGGER.info("\t\t| INT port ID: {}".format(switch_info[PORT_INT][PORT_ID])) + LOGGER.info("\t\t| INT port type: {}".format(switch_info[PORT_INT][PORT_TYPE])) + LOGGER.info("\t\t| Recirculation port list: {}".format(switch_info[RECIRCULATION_PORT_LIST])) + LOGGER.info("\t\t| Report mirror ID list: {}".format(switch_info[INT_REPORT_MIRROR_ID_LIST])) + LOGGER.info("--- INT collector MAC: {}".format(self.__int_collector_mac)) + LOGGER.info("--- INT collector IP: {}".format(self.__int_collector_ip)) + LOGGER.info("--- INT collector port: {}".format(self.__int_collector_port)) + LOGGER.info("--- INT VLAN ID: {}".format(self.__int_vlan_id)) + LOGGER.info("-----------------------------------------------------------------") + + def _create_rules(self, device_obj : Device, action : ConfigActionEnum): # type: ignore + dev_name = device_obj.name + rules = [] + + try: + ### INT reporting rules + rules += rules_set_up_int_watchlist(action=action) + rules += rules_set_up_int_recirculation_ports( + recirculation_port_list=self.__switch_info[dev_name][RECIRCULATION_PORT_LIST], + port_type=PORT_TYPE_INT, + fwd_type=FORWARDING_TYPE_UNICAST_IPV4, + vlan_id=self.__int_vlan_id, + action=action + ) + rules += rules_set_up_int_report_collector( + int_collector_ip=self.__int_collector_ip, + action=action + ) + rules += rules_set_up_int_report_flow( + switch_id=self.__switch_info[dev_name][DPID], + src_ip=self.__switch_info[dev_name][IP], + int_collector_ip=self.__int_collector_ip, + int_collector_port=self.__int_collector_port, + action=action + ) + rules += rules_set_up_report_mirror_flow( + recirculation_port_list=self.__switch_info[dev_name][RECIRCULATION_PORT_LIST], + report_mirror_id_list=self.__switch_info[dev_name][INT_REPORT_MIRROR_ID_LIST], + action=action + ) + ### INT port setup rules + rules += rules_set_up_port( + port=self.__switch_info[dev_name][PORT_INT][PORT_ID], + port_type=PORT_TYPE_HOST, + fwd_type=FORWARDING_TYPE_BRIDGING, + vlan_id=self.__int_vlan_id, + action=action + ) + ### INT port forwarding rules + rules += rules_set_up_fwd_bridging( + vlan_id=self.__int_vlan_id, + eth_dst=self.__int_collector_mac, + egress_port=self.__switch_info[dev_name][PORT_INT][PORT_ID], + action=action + ) + rules += rules_set_up_next_output_simple( + egress_port=self.__switch_info[dev_name][PORT_INT][PORT_ID], + action=action + ) + ### INT packet routing rules + rules += rules_set_up_next_routing_simple( + egress_port=self.__switch_info[dev_name][PORT_INT][PORT_ID], + eth_src=self.__switch_info[dev_name][MAC], + eth_dst=self.__int_collector_mac, + action=action + ) + rules += rules_set_up_routing( + ipv4_dst=self.__int_collector_ip, + ipv4_prefix_len=32, + egress_port=self.__switch_info[dev_name][PORT_INT][PORT_ID], + action=action + ) + except Exception as ex: + LOGGER.error("Error while creating rules") + raise Exception(ex) + + return rules diff --git a/src/tests/p4-fabric-tna/README.md b/src/tests/p4-fabric-tna/README.md index fc49276a9..10303009d 100644 --- a/src/tests/p4-fabric-tna/README.md +++ b/src/tests/p4-fabric-tna/README.md @@ -120,6 +120,25 @@ cd ~/tfs-ctrl/ bash src/tests/p4-fabric-tna/run_test_02b_sbi_deprovision_int_l2_l3_acl.sh ``` +### Step 3: Manage L2, L3, ACL, and INT via the Service API + +To avoid interacting with the switch using low-level P4 rules (via the SBI), we created modular network services, which allow users to easily provision L2, L3, ACL, and INT network functions. +These services require users to define the service endpoints as well as some high-level service configuration, while leaving the rest of complexity to tailored service handlers that interact with the SBI on behalf of the user. + +#### Provision INT service via the Service API + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-fabric-tna/run_test_06a_service_provision_int.sh +``` + +#### Deprovision INT service via the Service API + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-fabric-tna/run_test_06b_service_deprovision_int.sh +``` + ### Step 4: Deprovision topology Delete all the objects (context, topology, links, devices) from TFS: diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-int.json b/src/tests/p4-fabric-tna/descriptors/service-create-int.json new file mode 100644 index 000000000..98956b959 --- /dev/null +++ b/src/tests/p4-fabric-tna/descriptors/service-create-int.json @@ -0,0 +1,53 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "p4-service-int"} + }, + "name": "p4-service-int", + "service_type": "SERVICETYPE_INT", + "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, + "service_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "endpoint_uuid": {"uuid": "1"} + }, + { + "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "endpoint_uuid": {"uuid": "2"} + } + ], + "service_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/settings", + "resource_value": { + "switch_info": { + "p4-sw1": { + "arch": "v1model", + "dpid": 1, + "mac": "fa:16:3e:93:8c:c0", + "ip": "10.10.10.120", + "int_port": { + "port_id": 3, + "port_type": "host" + } + } + }, + "int_collector_info": { + "mac": "fa:16:3e:fb:cf:96", + "ip": "10.10.10.41", + "port": 32766, + "vlan_id": 4094 + } + } + } + } + ] + }, + "service_constraints": [] + } + ] +} diff --git a/src/tests/p4-fabric-tna/run_test_06a_service_provision_int.sh b/src/tests/p4-fabric-tna/run_test_06a_service_provision_int.sh new file mode 100755 index 000000000..12bc82352 --- /dev/null +++ b/src/tests/p4-fabric-tna/run_test_06a_service_provision_int.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_int.py diff --git a/src/tests/p4-fabric-tna/run_test_06b_service_deprovision_int.sh b/src/tests/p4-fabric-tna/run_test_06b_service_deprovision_int.sh new file mode 100755 index 000000000..a501de770 --- /dev/null +++ b/src/tests/p4-fabric-tna/run_test_06b_service_deprovision_int.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_int.py diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_int.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_int.py new file mode 100644 index 000000000..f29f6b17c --- /dev/null +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_int.py @@ -0,0 +1,78 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.proto.context_pb2 import ServiceId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Service import json_service_id +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, service_client # pylint: disable=unused-import +from tests.tools.test_tools_p4 import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_service_deletion_int( + context_client : ContextClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient # pylint: disable=redefined-outer-name +) -> None: + # Get the current number of devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + + # Total devices + dev_nb = len(response.devices) + assert dev_nb == DEV_NB + + # P4 devices + p4_dev_nb = identify_number_of_p4_devices(response.devices) + assert p4_dev_nb == P4_DEV_NB + + # Get the current number of rules in the P4 devices + p4_rules_before_deletion = get_number_of_rules(response.devices) + + # Get the current number of services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_before_deletion = len(response.services) + assert verify_active_service_type(response.services, ServiceTypeEnum.SERVICETYPE_INT) + + for service in response.services: + # Ignore services of other types + if service.service_type != ServiceTypeEnum.SERVICETYPE_INT: + continue + + service_id = service.service_id + assert service_id + + service_uuid = service_id.service_uuid.uuid + context_uuid = service_id.context_id.context_uuid.uuid + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + + # Delete INT service + service_client.DeleteService(ServiceId(**json_service_id(service_uuid, json_context_id(context_uuid)))) + + # Get an updated view of the services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_after_deletion = len(response.services) + assert services_nb_after_deletion == services_nb_before_deletion - 1, "Exactly one new service must be deleted" + + # Get an updated view of the devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + p4_rules_after_deletion = get_number_of_rules(response.devices) + + rules_diff = p4_rules_before_deletion - p4_rules_after_deletion + + assert p4_rules_after_deletion < p4_rules_before_deletion, "INT service must contain some rules" + assert rules_diff == P4_DEV_NB * INT_RULES, "INT service must contain {} rules per device".format(INT_RULES) diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_int.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_int.py new file mode 100644 index 000000000..7a875c66a --- /dev/null +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_int.py @@ -0,0 +1,73 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.proto.context_pb2 import ServiceTypeEnum +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import +from tests.tools.test_tools_p4 import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_service_creation_int( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient # pylint: disable=redefined-outer-name +) -> None: + # Get the current number of services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_before = len(response.services) + + # Get the current number of devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + + # Total devices + dev_nb = len(response.devices) + assert dev_nb == DEV_NB + + # P4 devices + p4_dev_nb = identify_number_of_p4_devices(response.devices) + assert p4_dev_nb == P4_DEV_NB + + # Get the current number of rules in the P4 devices + p4_rules_before = get_number_of_rules(response.devices) + + # Load service + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_SERVICE_CREATE_INT, + context_client=context_client, device_client=device_client, service_client=service_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + + # Get an updated view of the services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_after = len(response.services) + assert services_nb_after == services_nb_before + 1, "Exactly one new service must be in place" + assert verify_active_service_type(response.services, ServiceTypeEnum.SERVICETYPE_INT) + + # Get an updated view of the devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + p4_rules_after = get_number_of_rules(response.devices) + + rules_diff = p4_rules_after - p4_rules_before + + assert p4_rules_after > p4_rules_before, "INT service must install some rules" + assert rules_diff == P4_DEV_NB * INT_RULES, "INT service must install {} rules per device".format(INT_RULES) -- GitLab From e071dfc4d9ef68a79e7c828c9bc251f682ae4896 Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Mon, 31 Mar 2025 07:12:29 +0000 Subject: [PATCH 448/463] feat: P4 L2 simple service handler --- .../service/service_handlers/__init__.py | 7 + .../p4_fabric_tna_l2_simple/__init__.py | 13 + .../p4_fabric_tna_l2_simple_config.py | 69 +++ ...p4_fabric_tna_l2_simple_service_handler.py | 518 ++++++++++++++++++ src/tests/p4-fabric-tna/README.md | 14 + .../descriptors/service-create-l2-simple.json | 63 +++ .../run_test_03a_service_provision_l2.sh | 17 + .../run_test_03b_service_deprovision_l2.sh | 17 + .../test_functional_service_deprovision_l2.py | 78 +++ .../test_functional_service_provision_l2.py | 73 +++ src/tests/tools/test_tools_p4.py | 6 +- 11 files changed, 872 insertions(+), 3 deletions(-) create mode 100644 src/service/service/service_handlers/p4_fabric_tna_l2_simple/__init__.py create mode 100644 src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_config.py create mode 100644 src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py create mode 100644 src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json create mode 100755 src/tests/p4-fabric-tna/run_test_03a_service_provision_l2.sh create mode 100755 src/tests/p4-fabric-tna/run_test_03b_service_deprovision_l2.sh create mode 100644 src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l2.py create mode 100644 src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l2.py diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index 76107f03d..756d0fffb 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -27,6 +27,7 @@ from .l3slice_ietfslice.L3SliceIETFSliceServiceHandler import L3NMSliceIETFSlice from .microwave.MicrowaveServiceHandler import MicrowaveServiceHandler from .p4_dummy_l1.p4_dummy_l1_service_handler import P4DummyL1ServiceHandler from .p4_fabric_tna_int.p4_fabric_tna_int_service_handler import P4FabricINTServiceHandler +from .p4_fabric_tna_l2_simple.p4_fabric_tna_l2_simple_service_handler import P4FabricL2SimpleServiceHandler from .tapi_tapi.TapiServiceHandler import TapiServiceHandler from .tapi_xr.TapiXrServiceHandler import TapiXrServiceHandler from .optical_tfs.OpticalTfsServiceHandler import OpticalTfsServiceHandler @@ -118,6 +119,12 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER: DeviceDriverEnum.DEVICEDRIVER_P4, } ]), + (P4FabricL2SimpleServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE: ServiceTypeEnum.SERVICETYPE_L2NM, + FilterFieldEnum.DEVICE_DRIVER: DeviceDriverEnum.DEVICEDRIVER_P4, + } + ]), (L2NM_IETFL2VPN_ServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L2NM, diff --git a/src/service/service/service_handlers/p4_fabric_tna_l2_simple/__init__.py b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/__init__.py new file mode 100644 index 000000000..023830645 --- /dev/null +++ b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_config.py b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_config.py new file mode 100644 index 000000000..5e2aed066 --- /dev/null +++ b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_config.py @@ -0,0 +1,69 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Common objects and methods for L2 forwarding based on the SD-Fabric dataplane model. +This dataplane covers both software based and hardware-based Stratum-enabled P4 switches, +such as the BMv2 software switch and Intel's Tofino/Tofino-2 switches. + +SD-Fabric repo: https://github.com/stratum/fabric-tna +SD-Fabric docs: https://docs.sd-fabric.org/master/index.html +""" + +import logging +from common.proto.context_pb2 import ConfigActionEnum + +from service.service.service_handlers.p4_fabric_tna_commons.p4_fabric_tna_commons import * + +LOGGER = logging.getLogger(__name__) + +# L2 simple service handler settings +FORWARDING_LIST = "fwd_list" +HOST_MAC = "host_mac" + +def rules_set_up_port_host( + port : int, + vlan_id : int, + action : ConfigActionEnum, # type: ignore + fwd_type=FORWARDING_TYPE_BRIDGING, + eth_type=ETHER_TYPE_IPV4): + # This is a host facing port + port_type = PORT_TYPE_HOST + + return rules_set_up_port( + port=port, + port_type=port_type, + fwd_type=fwd_type, + vlan_id=vlan_id, + action=action, + eth_type=eth_type + ) + +def rules_set_up_port_switch( + port : int, + vlan_id : int, + action : ConfigActionEnum, # type: ignore + fwd_type=FORWARDING_TYPE_BRIDGING, + eth_type=ETHER_TYPE_IPV4): + # This is a switch facing port + port_type = PORT_TYPE_SWITCH + + return rules_set_up_port( + port=port, + port_type=port_type, + fwd_type=fwd_type, + vlan_id=vlan_id, + action=action, + eth_type=eth_type + ) diff --git a/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py new file mode 100644 index 000000000..c25fb087c --- /dev/null +++ b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py @@ -0,0 +1,518 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Service handler for P4-based L2 forwarding using the SD-Fabric P4 dataplane +for BMv2 and Intel Tofino switches. +""" + +import logging +from typing import Any, List, Dict, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.proto.context_pb2 import ConfigActionEnum, DeviceId, Service, Device +from common.tools.object_factory.Device import json_device_id +from common.type_checkers.Checkers import chk_type, chk_address_mac, chk_vlan_id +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.service_handlers.p4_fabric_tna_commons.p4_fabric_tna_commons import * +from service.service.task_scheduler.TaskExecutor import TaskExecutor + +from .p4_fabric_tna_l2_simple_config import * + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'p4_fabric_tna_l2_simple'}) + +class P4FabricL2SimpleServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : TaskExecutor, **settings # type: ignore + ) -> None: + """ Initialize Driver. + Parameters: + service + The service instance (gRPC message) to be managed. + task_executor + An instance of Task Executor providing access to the + service handlers factory, the context and device clients, + and an internal cache of already-loaded gRPC entities. + **settings + Extra settings required by the service handler. + + """ + self.__service_label = "P4 L2 simple connectivity service" + self.__service = service + self.__task_executor = task_executor + self.__settings_handler = SettingsHandler(self.__service.service_config, **settings) + + self._init_settings() + self._parse_settings() + self._print_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]]: + """ Create/Update service endpoints from a list. + Parameters: + endpoints: List[Tuple[str, str, Optional[str]]] + List of tuples, each containing a device_uuid, + endpoint_uuid and, optionally, the topology_uuid + of the endpoint to be added. + connection_uuid : Optional[str] + If specified, is the UUID of the connection this endpoint is associated to. + Returns: + results: List[Union[bool, Exception]] + List of results for endpoint changes requested. + Return values must be in the same order as the requested + endpoints. If an endpoint is properly added, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + + LOGGER.info("{} - Provision service configuration".format( + self.__service_label)) + + visited = set() + results = [] + for endpoint in endpoints: + device_uuid, endpoint_uuid = endpoint[0:2] + device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + device_name = device.name + + LOGGER.info("Device {}".format(device_name)) + LOGGER.info("\t | Service endpoint UUID: {}".format(endpoint_uuid)) + + port_id = find_port_id_in_endpoint_list(device.device_endpoints, endpoint_uuid) + LOGGER.info("\t | Service port ID: {}".format(port_id)) + + dev_port_key = device_name + "-" + PORT_PREFIX + str(port_id) + + # Skip already visited device ports + if dev_port_key in visited: + continue + + rules = [] + actual_rules = -1 + applied_rules, failed_rules = 0, -1 + + # Create and apply rules + try: + rules = self._create_rules( + device_obj=device, port_id=port_id, action=ConfigActionEnum.CONFIGACTION_SET) + actual_rules = len(rules) + applied_rules, failed_rules = apply_rules( + task_executor=self.__task_executor, + device_obj=device, + json_config_rules=rules + ) + except Exception as ex: + LOGGER.error("Failed to insert L2 rules on device {} due to {}".format(device.name, ex)) + finally: + rules.clear() + + # Ensure correct status + results.append(True) if (failed_rules == 0) and (applied_rules == actual_rules) \ + else results.append(False) + + # You should no longer visit this device port again + visited.add(dev_port_key) + + LOGGER.info("Installed {}/{} L2 rules on device {} and port {}".format( + applied_rules, actual_rules, device_name, port_id)) + + 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]]: + """ Delete service endpoints from a list. + Parameters: + endpoints: List[Tuple[str, str, Optional[str]]] + List of tuples, each containing a device_uuid, + endpoint_uuid, and the topology_uuid of the endpoint + to be removed. + connection_uuid : Optional[str] + If specified, is the UUID of the connection this endpoint is associated to. + Returns: + results: List[Union[bool, Exception]] + List of results for endpoint deletions requested. + Return values must be in the same order as the requested + endpoints. If an endpoint is properly deleted, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + + LOGGER.info("{} - Deprovision service configuration".format( + self.__service_label)) + + visited = set() + results = [] + for endpoint in endpoints: + device_uuid, endpoint_uuid = endpoint[0:2] + device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + device_name = device.name + + LOGGER.info("Device {}".format(device_name)) + LOGGER.info("\t | Service endpoint UUID: {}".format(endpoint_uuid)) + + port_id = find_port_id_in_endpoint_list(device.device_endpoints, endpoint_uuid) + LOGGER.info("\t | Service port ID: {}".format(port_id)) + + dev_port_key = device_name + "-" + PORT_PREFIX + str(port_id) + + # Skip already visited device ports + if dev_port_key in visited: + continue + + rules = [] + actual_rules = -1 + applied_rules, failed_rules = 0, -1 + + # Create and apply rules + try: + rules = self._create_rules( + device_obj=device, port_id=port_id, action=ConfigActionEnum.CONFIGACTION_DELETE) + actual_rules = len(rules) + applied_rules, failed_rules = apply_rules( + task_executor=self.__task_executor, + device_obj=device, + json_config_rules=rules + ) + except Exception as ex: + LOGGER.error("Failed to insert L2 rules on device {} due to {}".format(device.name, ex)) + finally: + rules.clear() + + # Ensure correct status + results.append(True) if (failed_rules == 0) and (applied_rules == actual_rules) \ + else results.append(False) + + # You should no longer visit this device port again + visited.add(dev_port_key) + + LOGGER.info("Deleted {}/{} L2 rules from device {} and port {}".format( + applied_rules, actual_rules, device_name, port_id)) + + return results + + @metered_subclass_method(METRICS_POOL) + def SetConstraint(self, constraints: List[Tuple[str, Any]]) \ + -> List[Union[bool, Exception]]: + """ Create/Update service constraints. + Parameters: + constraints: List[Tuple[str, Any]] + List of tuples, each containing a constraint_type and the + new constraint_value to be set. + Returns: + results: List[Union[bool, Exception]] + List of results for constraint changes requested. + Return values must be in the same order as the requested + constraints. If a constraint is properly set, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + 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]]: + """ Delete service constraints. + Parameters: + constraints: List[Tuple[str, Any]] + List of tuples, each containing a constraint_type pointing + to the constraint to be deleted, and a constraint_value + containing possible additionally required values to locate + the constraint to be removed. + Returns: + results: List[Union[bool, Exception]] + List of results for constraint deletions requested. + Return values must be in the same order as the requested + constraints. If a constraint is properly deleted, True must + be returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + 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]]: + """ Create/Update configuration for a list of service resources. + Parameters: + resources: List[Tuple[str, Any]] + List of tuples, each containing a resource_key pointing to + the resource to be modified, and a resource_value + containing the new value to be set. + Returns: + results: List[Union[bool, Exception]] + List of results for resource key changes requested. + Return values must be in the same order as the requested + resource keys. If a resource is properly set, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + msg = '[SetConfig] Method not implemented. Resources({:s}) are being ignored.' + LOGGER.warning(msg.format(str(resources))) + return [True for _ in range(len(resources))] + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources: List[Tuple[str, Any]]) \ + -> List[Union[bool, Exception]]: + """ Delete configuration for a list of service resources. + Parameters: + resources: List[Tuple[str, Any]] + List of tuples, each containing a resource_key pointing to + the resource to be modified, and a resource_value containing + possible additionally required values to locate the value + to be removed. + Returns: + results: List[Union[bool, Exception]] + List of results for resource key deletions requested. + Return values must be in the same order as the requested + resource keys. If a resource is properly deleted, True must + be returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + msg = '[SetConfig] Method not implemented. Resources({:s}) are being ignored.' + LOGGER.warning(msg.format(str(resources))) + return [True for _ in range(len(resources))] + + def _init_settings(self): + self.__switch_info = {} + self.__port_map = {} + + try: + self.__settings = self.__settings_handler.get('/settings') + LOGGER.info("{} with settings: {}".format(self.__service_label, self.__settings)) + except Exception as ex: + self.__settings = {} + LOGGER.error("Failed to parse service settings: {}".format(ex)) + + def _default_settings(self): + port_list = [ + { + PORT_ID: 1, + PORT_TYPE: "host", + VLAN_ID: 4094 + }, + { + PORT_ID: 2, + PORT_TYPE: "host", + VLAN_ID: 4094 + }, + ] + fwd_list = [ + { + PORT_ID: 1, + HOST_MAC: "fa:16:3e:75:9c:e5" + }, + { + PORT_ID: 2, + HOST_MAC: "fa:16:3e:e2:af:28" + } + ] + switch_info = { + "p4-sw1": { + ARCH: TARGET_ARCH_V1MODEL, + DPID: 1, + PORT_LIST: port_list, + FORWARDING_LIST: fwd_list + } + } + self.__settings = { + SWITCH_INFO: switch_info + } + + # port_map = { + # "p4-sw1": { + # "port-1": { + # PORT_ID: 1, + # PORT_TYPE: PORT_TYPE_HOST, + # VLAN_ID: 4094, + # FORWARDING_LIST: ["fa:16:3e:75:9c:e5"] + # }, + # "port-2": { + # PORT_ID: 2, + # PORT_TYPE: PORT_TYPE_HOST, + # VLAN_ID: 4094, + # FORWARDING_LIST: ["fa:16:3e:e2:af:28"] + # } + # } + # } + + def _parse_settings(self): + #TODO: Pass settings in a correct way + try: + self.__switch_info = self.__settings[SWITCH_INFO] + except Exception as ex: + LOGGER.error("Failed to parse settings: {}".format(ex)) + self._default_settings() #TODO: Remove when bug is fixed + self.__switch_info = self.__settings[SWITCH_INFO] + assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" + + for switch_name, switch_info in self.__switch_info.items(): + assert switch_name, "Invalid P4 switch name" + assert isinstance(switch_info, dict), "Switch {} info must be a map with arch, dpid, and fwd_list items)" + assert switch_info[ARCH] in SUPPORTED_TARGET_ARCH_LIST, \ + "Switch {} - Supported P4 architectures are: {}".format(switch_name, ','.join(SUPPORTED_TARGET_ARCH_LIST)) + switch_dpid = switch_info[DPID] + assert switch_dpid > 0, "Switch {} - P4 switch dataplane ID must be a positive integer".format(switch_name, switch_info[DPID]) + + # Port list + port_list = switch_info[PORT_LIST] + assert isinstance(port_list, list), "Switch {} port list must be a list with port_id, port_type, and vlan_id items)" + for port in port_list: + port_id = port[PORT_ID] + assert port_id >= 0, "Switch {} - Invalid P4 switch port ID".format(switch_name) + port_type = port[PORT_TYPE] + assert port_type in PORT_TYPES_STR_VALID, "Switch {} - Valid P4 switch port types are: {}".format( + switch_name, ','.join(PORT_TYPES_STR_VALID)) + vlan_id = port[VLAN_ID] + assert chk_vlan_id(vlan_id), "Switch {} - Invalid VLAN ID for port {}".format(switch_name, port_id) + + if switch_name not in self.__port_map: + self.__port_map[switch_name] = {} + port_key = PORT_PREFIX + str(port_id) + if port_key not in self.__port_map[switch_name]: + self.__port_map[switch_name][port_key] = {} + self.__port_map[switch_name][port_key][PORT_ID] = port_id + self.__port_map[switch_name][port_key][PORT_TYPE] = port_type + self.__port_map[switch_name][port_key][VLAN_ID] = vlan_id + self.__port_map[switch_name][port_key][FORWARDING_LIST] = [] + + # Forwarding list + fwd_list = switch_info[FORWARDING_LIST] + assert isinstance(fwd_list, list), "Switch {} forwarding list be a list)" + for fwd_entry in fwd_list: + port_id = fwd_entry[PORT_ID] + assert port_id >= 0, "Invalid port ID: {}".format(port_id) + host_mac = fwd_entry[HOST_MAC] + assert chk_address_mac(host_mac), "Invalid host MAC address {}".format(host_mac) + + # Retrieve entry from the port map + switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) + + host_facing_port = self._is_host_facing_port(switch_name, port_id) + LOGGER.info("Switch {} - Port {}: Is host facing: {}".format(switch_name, port_id, "True" if host_facing_port else "False")) + switch_port_entry[FORWARDING_LIST].append(host_mac) + + def _print_settings(self): + LOGGER.info("--------------- {} settings ---------------".format(self.__service.name)) + LOGGER.info("--- Topology info") + for switch_name, switch_info in self.__switch_info.items(): + LOGGER.info("\t Device {}".format(switch_name)) + LOGGER.info("\t\t| Target P4 architecture: {}".format(switch_info[ARCH])) + LOGGER.info("\t\t| Data plane ID: {}".format(switch_info[DPID])) + LOGGER.info("\t\t| Port map: {}".format(self.__port_map[switch_name])) + LOGGER.info("-------------------------------------------------------") + + def _get_switch_port_in_port_map(self, switch_name : str, port_id : int) -> Dict: + assert switch_name, "A valid switch name must be used as a key to the port map" + assert port_id > 0, "A valid switch port ID must be used as a key to a switch's port map" + switch_entry = self.__port_map[switch_name] + assert switch_entry, "Switch {} does not exist in the port map".format(switch_name) + port_key = PORT_PREFIX + str(port_id) + assert switch_entry[port_key], "Port with ID {} does not exist in the switch map".format(port_id) + + return switch_entry[port_key] + + def _get_port_type_of_switch_port(self, switch_name : str, port_id : int) -> str: + switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) + return switch_port_entry[PORT_TYPE] + + def _get_vlan_id_of_switch_port(self, switch_name : str, port_id : int) -> int: + switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) + return switch_port_entry[VLAN_ID] + + def _get_fwd_list_of_switch_port(self, switch_name : str, port_id : int) -> List [Tuple]: + switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) + return switch_port_entry[FORWARDING_LIST] + + def _is_host_facing_port(self, switch_name : str, port_id : int) -> bool: + return self._get_port_type_of_switch_port(switch_name, port_id) == PORT_TYPE_HOST + + def _create_rules(self, device_obj : Device, port_id : int, action : ConfigActionEnum): # type: ignore + dev_name = device_obj.name + + host_facing_port = self._is_host_facing_port(dev_name, port_id) + LOGGER.info("\t | Service endpoint is host facing: {}".format("True" if host_facing_port else "False")) + + rules = [] + + try: + ### Port setup rules + if host_facing_port: + rules += rules_set_up_port_host( + port=port_id, + vlan_id=self._get_vlan_id_of_switch_port(switch_name=dev_name, port_id=port_id), + action=action + ) + else: + rules += rules_set_up_port_switch( + port=port_id, + vlan_id=self._get_vlan_id_of_switch_port(switch_name=dev_name, port_id=port_id), + action=action + ) + except Exception as ex: + LOGGER.error("Error while creating port setup rules") + raise Exception(ex) + + fwd_list = self._get_fwd_list_of_switch_port(switch_name=dev_name, port_id=port_id) + for mac in fwd_list: + LOGGER.info("Switch {} - Port {} - Creating rule for host MAC: {}".format(dev_name, port_id, mac)) + try: + ### Bridging rules + rules += rules_set_up_fwd_bridging( + vlan_id=self._get_vlan_id_of_switch_port(switch_name=dev_name, port_id=port_id), + eth_dst=mac, + egress_port=port_id, + action=action + ) + except Exception as ex: + LOGGER.error("Error while creating bridging rules") + raise Exception(ex) + + try: + ### Next output rule + rules += rules_set_up_next_output_simple( + egress_port=port_id, + action=action + ) + except Exception as ex: + LOGGER.error("Error while creating next output L2 rules") + raise Exception(ex) + + return rules diff --git a/src/tests/p4-fabric-tna/README.md b/src/tests/p4-fabric-tna/README.md index 10303009d..b96bb02e9 100644 --- a/src/tests/p4-fabric-tna/README.md +++ b/src/tests/p4-fabric-tna/README.md @@ -125,6 +125,20 @@ bash src/tests/p4-fabric-tna/run_test_02b_sbi_deprovision_int_l2_l3_acl.sh To avoid interacting with the switch using low-level P4 rules (via the SBI), we created modular network services, which allow users to easily provision L2, L3, ACL, and INT network functions. These services require users to define the service endpoints as well as some high-level service configuration, while leaving the rest of complexity to tailored service handlers that interact with the SBI on behalf of the user. +#### Provision L2 network service via the Service API + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-fabric-tna/run_test_03a_service_provision_l2.sh +``` + +#### Deprovision L2 network service via the Service API + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-fabric-tna/run_test_03b_service_deprovision_l2.sh +``` + #### Provision INT service via the Service API ```shell diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json b/src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json new file mode 100644 index 000000000..5a659f3d9 --- /dev/null +++ b/src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json @@ -0,0 +1,63 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "p4-service-l2"} + }, + "name": "p4-service-l2", + "service_type": "SERVICETYPE_L2NM", + "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, + "service_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "endpoint_uuid": {"uuid": "1"} + }, + { + "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "endpoint_uuid": {"uuid": "2"} + } + ], + "service_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/settings", + "resource_value": { + "switch_info": { + "p4-sw1": { + "arch": "v1model", + "dpid": 1, + "port_list": [ + { + "port_id": 1, + "port_type": "host", + "vlan_id": 4094 + }, + { + "port_id": 2, + "port_type": "host", + "vlan_id": 4094 + } + ], + "fwd_list": [ + { + "port_id": 1, + "host_mac": "fa:16:3e:75:9c:e5" + }, + { + "port_id": 2, + "host_mac": "fa:16:3e:e2:af:28" + } + ] + } + } + } + } + } + ] + }, + "service_constraints": [] + } + ] +} diff --git a/src/tests/p4-fabric-tna/run_test_03a_service_provision_l2.sh b/src/tests/p4-fabric-tna/run_test_03a_service_provision_l2.sh new file mode 100755 index 000000000..6da590469 --- /dev/null +++ b/src/tests/p4-fabric-tna/run_test_03a_service_provision_l2.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l2.py diff --git a/src/tests/p4-fabric-tna/run_test_03b_service_deprovision_l2.sh b/src/tests/p4-fabric-tna/run_test_03b_service_deprovision_l2.sh new file mode 100755 index 000000000..fdb30c2fc --- /dev/null +++ b/src/tests/p4-fabric-tna/run_test_03b_service_deprovision_l2.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l2.py diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l2.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l2.py new file mode 100644 index 000000000..87ef21285 --- /dev/null +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l2.py @@ -0,0 +1,78 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.proto.context_pb2 import ServiceId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Service import json_service_id +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, service_client # pylint: disable=unused-import +from tests.tools.test_tools_p4 import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_service_deletion_l2( + context_client : ContextClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient # pylint: disable=redefined-outer-name +) -> None: + # Get the current number of devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + + # Total devices + dev_nb = len(response.devices) + assert dev_nb == DEV_NB + + # P4 devices + p4_dev_nb = identify_number_of_p4_devices(response.devices) + assert p4_dev_nb == P4_DEV_NB + + # Get the current number of rules in the P4 devices + p4_rules_before_deletion = get_number_of_rules(response.devices) + + # Get the current number of services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_before_deletion = len(response.services) + assert verify_active_service_type(response.services, ServiceTypeEnum.SERVICETYPE_L2NM) + + for service in response.services: + # Ignore services of other types + if service.service_type != ServiceTypeEnum.SERVICETYPE_L2NM: + continue + + service_id = service.service_id + assert service_id + + service_uuid = service_id.service_uuid.uuid + context_uuid = service_id.context_id.context_uuid.uuid + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + + # Delete L2 service + service_client.DeleteService(ServiceId(**json_service_id(service_uuid, json_context_id(context_uuid)))) + + # Get an updated view of the services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_after_deletion = len(response.services) + assert services_nb_after_deletion == services_nb_before_deletion - 1, "Exactly one new service must be deleted" + + # Get an updated view of the devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + p4_rules_after_deletion = get_number_of_rules(response.devices) + + rules_diff = p4_rules_before_deletion - p4_rules_after_deletion + + assert p4_rules_after_deletion < p4_rules_before_deletion, "L2 service must contain some rules" + assert rules_diff == P4_DEV_NB * L2_RULES, "L2 service must contain {} rules per device".format(L2_RULES) diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l2.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l2.py new file mode 100644 index 000000000..a42c05546 --- /dev/null +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l2.py @@ -0,0 +1,73 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.proto.context_pb2 import ServiceStatusEnum, ServiceTypeEnum +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import +from tests.tools.test_tools_p4 import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_service_creation_l2( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient # pylint: disable=redefined-outer-name +) -> None: + # Get the current number of services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_before = len(response.services) + + # Get the current number of devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + + # Total devices + dev_nb = len(response.devices) + assert dev_nb == DEV_NB + + # P4 devices + p4_dev_nb = identify_number_of_p4_devices(response.devices) + assert p4_dev_nb == P4_DEV_NB + + # Get the current number of rules in the P4 devices + p4_rules_before = get_number_of_rules(response.devices) + + # Load service + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_SERVICE_CREATE_L2_SIMPLE, + context_client=context_client, device_client=device_client, service_client=service_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + + # Get an updated view of the services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_after = len(response.services) + assert services_nb_after == services_nb_before + 1, "Exactly one new service must be in place" + assert verify_active_service_type(response.services, ServiceTypeEnum.SERVICETYPE_L2NM) + + # Get an updated view of the devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + p4_rules_after = get_number_of_rules(response.devices) + + rules_diff = p4_rules_after - p4_rules_before + + assert p4_rules_after > p4_rules_before, "L2 service must install some rules" + assert rules_diff == P4_DEV_NB * L2_RULES, "L2 service must install {} rules per device".format(L2_RULES) diff --git a/src/tests/tools/test_tools_p4.py b/src/tests/tools/test_tools_p4.py index 65257aefc..aa37f9e2c 100644 --- a/src/tests/tools/test_tools_p4.py +++ b/src/tests/tools/test_tools_p4.py @@ -96,9 +96,9 @@ DESC_FILE_SERVICE_CREATE_INT = os.path.join(TEST_PATH, 'service-create-int.json' assert os.path.exists(DESC_FILE_SERVICE_CREATE_INT),\ "Invalid path to the SD-Fabric INT service descriptor" -DESC_FILE_SERVICE_CREATE_L2 = os.path.join(TEST_PATH, 'service-create-l2.json') -assert os.path.exists(DESC_FILE_SERVICE_CREATE_L2),\ - "Invalid path to the SD-Fabric L2 service descriptor" +DESC_FILE_SERVICE_CREATE_L2_SIMPLE = os.path.join(TEST_PATH, 'service-create-l2-simple.json') +assert os.path.exists(DESC_FILE_SERVICE_CREATE_L2_SIMPLE),\ + "Invalid path to the SD-Fabric L2 simple service descriptor" DESC_FILE_SERVICE_CREATE_L3 = os.path.join(TEST_PATH, 'service-create-l3.json') assert os.path.exists(DESC_FILE_SERVICE_CREATE_L3),\ -- GitLab From 918206dc6016b5a67aeae8ead548a51430ada6de Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Mon, 31 Mar 2025 07:17:43 +0000 Subject: [PATCH 449/463] feat: P4 L3 service handler --- .../service/service_handlers/__init__.py | 7 + .../p4_fabric_tna_l3/__init__.py | 13 + .../p4_fabric_tna_l3_service_handler.py | 505 ++++++++++++++++++ src/tests/p4-fabric-tna/README.md | 14 + .../descriptors/service-create-l3.json | 67 +++ .../run_test_04a_service_provision_l3.sh | 17 + .../run_test_04b_service_deprovision_l3.sh | 17 + .../test_functional_service_deprovision_l3.py | 78 +++ .../test_functional_service_provision_l3.py | 73 +++ 9 files changed, 791 insertions(+) create mode 100644 src/service/service/service_handlers/p4_fabric_tna_l3/__init__.py create mode 100644 src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py create mode 100644 src/tests/p4-fabric-tna/descriptors/service-create-l3.json create mode 100755 src/tests/p4-fabric-tna/run_test_04a_service_provision_l3.sh create mode 100755 src/tests/p4-fabric-tna/run_test_04b_service_deprovision_l3.sh create mode 100644 src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l3.py create mode 100644 src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l3.py diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index 756d0fffb..0ecef7c22 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -28,6 +28,7 @@ from .microwave.MicrowaveServiceHandler import MicrowaveServiceHandler from .p4_dummy_l1.p4_dummy_l1_service_handler import P4DummyL1ServiceHandler from .p4_fabric_tna_int.p4_fabric_tna_int_service_handler import P4FabricINTServiceHandler from .p4_fabric_tna_l2_simple.p4_fabric_tna_l2_simple_service_handler import P4FabricL2SimpleServiceHandler +from .p4_fabric_tna_l3.p4_fabric_tna_l3_service_handler import P4FabricL3ServiceHandler from .tapi_tapi.TapiServiceHandler import TapiServiceHandler from .tapi_xr.TapiXrServiceHandler import TapiXrServiceHandler from .optical_tfs.OpticalTfsServiceHandler import OpticalTfsServiceHandler @@ -125,6 +126,12 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER: DeviceDriverEnum.DEVICEDRIVER_P4, } ]), + (P4FabricL3ServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE: ServiceTypeEnum.SERVICETYPE_L3NM, + FilterFieldEnum.DEVICE_DRIVER: DeviceDriverEnum.DEVICEDRIVER_P4, + } + ]), (L2NM_IETFL2VPN_ServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L2NM, diff --git a/src/service/service/service_handlers/p4_fabric_tna_l3/__init__.py b/src/service/service/service_handlers/p4_fabric_tna_l3/__init__.py new file mode 100644 index 000000000..023830645 --- /dev/null +++ b/src/service/service/service_handlers/p4_fabric_tna_l3/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py new file mode 100644 index 000000000..849d1db92 --- /dev/null +++ b/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py @@ -0,0 +1,505 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Service handler for P4-based static L3 routing using the SD-Fabric P4 dataplane +for BMv2 and Intel Tofino switches. +""" + +import logging +from typing import Any, List, Dict, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.proto.context_pb2 import ConfigActionEnum, DeviceId, Service, Device +from common.tools.object_factory.Device import json_device_id +from common.type_checkers.Checkers import chk_type, chk_address_mac, chk_address_ipv4, chk_prefix_len_ipv4 +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.service_handlers.p4_fabric_tna_commons.p4_fabric_tna_commons import * +from service.service.task_scheduler.TaskExecutor import TaskExecutor + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'p4_fabric_tna_l3'}) + +class P4FabricL3ServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : TaskExecutor, **settings # type: ignore + ) -> None: + """ Initialize Driver. + Parameters: + service + The service instance (gRPC message) to be managed. + task_executor + An instance of Task Executor providing access to the + service handlers factory, the context and device clients, + and an internal cache of already-loaded gRPC entities. + **settings + Extra settings required by the service handler. + + """ + self.__service_label = "P4 static L3 connectivity service" + self.__service = service + self.__task_executor = task_executor + self.__settings_handler = SettingsHandler(self.__service.service_config, **settings) + + self._init_settings() + self._parse_settings() + self._print_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]]: + """ Create/Update service endpoints from a list. + Parameters: + endpoints: List[Tuple[str, str, Optional[str]]] + List of tuples, each containing a device_uuid, + endpoint_uuid and, optionally, the topology_uuid + of the endpoint to be added. + connection_uuid : Optional[str] + If specified, is the UUID of the connection this endpoint is associated to. + Returns: + results: List[Union[bool, Exception]] + List of results for endpoint changes requested. + Return values must be in the same order as the requested + endpoints. If an endpoint is properly added, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + + LOGGER.info("{} - Provision service configuration".format( + self.__service_label)) + + visited = set() + results = [] + for endpoint in endpoints: + device_uuid, endpoint_uuid = endpoint[0:2] + device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + device_name = device.name + + LOGGER.info("Device {}".format(device_name)) + LOGGER.info("\t | Service endpoint UUID: {}".format(endpoint_uuid)) + + port_id = find_port_id_in_endpoint_list(device.device_endpoints, endpoint_uuid) + LOGGER.info("\t | Service port ID: {}".format(port_id)) + + dev_port_key = device_name + "-" + PORT_PREFIX + str(port_id) + + # Skip already visited device ports + if dev_port_key in visited: + continue + + rules = [] + actual_rules = -1 + applied_rules, failed_rules = 0, -1 + + # Create and apply rules + try: + rules = self._create_rules( + device_obj=device, port_id=port_id, action=ConfigActionEnum.CONFIGACTION_SET) + actual_rules = len(rules) + applied_rules, failed_rules = apply_rules( + task_executor=self.__task_executor, + device_obj=device, + json_config_rules=rules + ) + except Exception as ex: + LOGGER.error("Failed to insert L3 rules on device {} due to {}".format(device.name, ex)) + finally: + rules.clear() + + # Ensure correct status + results.append(True) if (failed_rules == 0) and (applied_rules == actual_rules) \ + else results.append(False) + + # You should no longer visit this device port again + visited.add(dev_port_key) + + LOGGER.info("Installed {}/{} L3 rules on device {} and port {}".format( + applied_rules, actual_rules, device_name, port_id)) + + 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]]: + """ Delete service endpoints from a list. + Parameters: + endpoints: List[Tuple[str, str, Optional[str]]] + List of tuples, each containing a device_uuid, + endpoint_uuid, and the topology_uuid of the endpoint + to be removed. + connection_uuid : Optional[str] + If specified, is the UUID of the connection this endpoint is associated to. + Returns: + results: List[Union[bool, Exception]] + List of results for endpoint deletions requested. + Return values must be in the same order as the requested + endpoints. If an endpoint is properly deleted, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + + LOGGER.info("{} - Deprovision service configuration".format( + self.__service_label)) + + visited = set() + results = [] + for endpoint in endpoints: + device_uuid, endpoint_uuid = endpoint[0:2] + device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + device_name = device.name + + LOGGER.info("Device {}".format(device_name)) + LOGGER.info("\t | Service endpoint UUID: {}".format(endpoint_uuid)) + + port_id = find_port_id_in_endpoint_list(device.device_endpoints, endpoint_uuid) + LOGGER.info("\t | Service port ID: {}".format(port_id)) + + dev_port_key = device_name + "-" + PORT_PREFIX + str(port_id) + + # Skip already visited device ports + if dev_port_key in visited: + continue + + rules = [] + actual_rules = -1 + applied_rules, failed_rules = 0, -1 + + # Create and apply rules + try: + rules = self._create_rules( + device_obj=device, port_id=port_id, action=ConfigActionEnum.CONFIGACTION_DELETE) + actual_rules = len(rules) + applied_rules, failed_rules = apply_rules( + task_executor=self.__task_executor, + device_obj=device, + json_config_rules=rules + ) + except Exception as ex: + LOGGER.error("Failed to insert L3 rules on device {} due to {}".format(device.name, ex)) + finally: + rules.clear() + + # Ensure correct status + results.append(True) if (failed_rules == 0) and (applied_rules == actual_rules) \ + else results.append(False) + + # You should no longer visit this device port again + visited.add(dev_port_key) + + LOGGER.info("Deleted {}/{} L3 rules from device {} and port {}".format( + applied_rules, actual_rules, device_name, port_id)) + + return results + + @metered_subclass_method(METRICS_POOL) + def SetConstraint(self, constraints: List[Tuple[str, Any]]) \ + -> List[Union[bool, Exception]]: + """ Create/Update service constraints. + Parameters: + constraints: List[Tuple[str, Any]] + List of tuples, each containing a constraint_type and the + new constraint_value to be set. + Returns: + results: List[Union[bool, Exception]] + List of results for constraint changes requested. + Return values must be in the same order as the requested + constraints. If a constraint is properly set, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + 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]]: + """ Delete service constraints. + Parameters: + constraints: List[Tuple[str, Any]] + List of tuples, each containing a constraint_type pointing + to the constraint to be deleted, and a constraint_value + containing possible additionally required values to locate + the constraint to be removed. + Returns: + results: List[Union[bool, Exception]] + List of results for constraint deletions requested. + Return values must be in the same order as the requested + constraints. If a constraint is properly deleted, True must + be returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + 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]]: + """ Create/Update configuration for a list of service resources. + Parameters: + resources: List[Tuple[str, Any]] + List of tuples, each containing a resource_key pointing to + the resource to be modified, and a resource_value + containing the new value to be set. + Returns: + results: List[Union[bool, Exception]] + List of results for resource key changes requested. + Return values must be in the same order as the requested + resource keys. If a resource is properly set, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + msg = '[SetConfig] Method not implemented. Resources({:s}) are being ignored.' + LOGGER.warning(msg.format(str(resources))) + return [True for _ in range(len(resources))] + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources: List[Tuple[str, Any]]) \ + -> List[Union[bool, Exception]]: + """ Delete configuration for a list of service resources. + Parameters: + resources: List[Tuple[str, Any]] + List of tuples, each containing a resource_key pointing to + the resource to be modified, and a resource_value containing + possible additionally required values to locate the value + to be removed. + Returns: + results: List[Union[bool, Exception]] + List of results for resource key deletions requested. + Return values must be in the same order as the requested + resource keys. If a resource is properly deleted, True must + be returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + msg = '[SetConfig] Method not implemented. Resources({:s}) are being ignored.' + LOGGER.warning(msg.format(str(resources))) + return [True for _ in range(len(resources))] + + def _init_settings(self): + self.__switch_info = {} + self.__port_map = {} + + try: + self.__settings = self.__settings_handler.get('/settings') + LOGGER.info("{} with settings: {}".format(self.__service_label, self.__settings)) + except Exception as ex: + self.__settings = {} + LOGGER.error("Failed to parse service settings: {}".format(ex)) + + def _default_settings(self): + port_list = [ + { + PORT_ID: 1, + PORT_TYPE: "host" + }, + { + PORT_ID: 2, + PORT_TYPE: "host" + }, + ] + routing_list = [ + { + PORT_ID: 1, + IPV4_DST: "10.158.72.11", + IPV4_PREFIX_LEN: 32, + MAC_SRC: "fa:16:3e:e2:af:28", + MAC_DST: "fa:16:3e:75:9c:e5" + }, + { + PORT_ID: 2, + IPV4_DST: "172.16.10.9", + IPV4_PREFIX_LEN: 32, + MAC_SRC: "fa:16:3e:75:9c:e5", + MAC_DST: "fa:16:3e:e2:af:28" + } + ] + switch_info = { + "p4-sw1": { + ARCH: TARGET_ARCH_V1MODEL, + DPID: 1, + PORT_LIST: port_list, + ROUTING_LIST: routing_list + } + } + self.__settings = { + SWITCH_INFO: switch_info + } + + port_map = { + "p4-sw1": { + "port-1": { + PORT_ID: 1, + PORT_TYPE: PORT_TYPE_HOST, + ROUTING_LIST: [ + { + IPV4_DST: "10.158.72.11", + IPV4_PREFIX_LEN: 32, + MAC_SRC: "fa:16:3e:e2:af:28", + MAC_DST: "fa:16:3e:75:9c:e5" + } + ] + }, + "port-2": { + PORT_ID: 2, + PORT_TYPE: PORT_TYPE_HOST, + ROUTING_LIST: [ + { + IPV4_DST: "172.16.10.9", + IPV4_PREFIX_LEN: 32, + MAC_SRC: "fa:16:3e:75:9c:e5", + MAC_DST: "fa:16:3e:e2:af:28" + } + ] + } + } + } + + def _parse_settings(self): + #TODO: Pass settings in a correct way + try: + self.__switch_info = self.__settings[SWITCH_INFO] + except Exception as ex: + LOGGER.error("Failed to parse settings: {}".format(ex)) + self._default_settings() #TODO: Remove when bug is fixed + self.__switch_info = self.__settings[SWITCH_INFO] + assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" + + for switch_name, switch_info in self.__switch_info.items(): + assert switch_name, "Invalid P4 switch name" + assert isinstance(switch_info, dict), "Switch {} info must be a map with arch, dpid, and fwd_list items)" + assert switch_info[ARCH] in SUPPORTED_TARGET_ARCH_LIST, \ + "Switch {} - Supported P4 architectures are: {}".format(switch_name, ','.join(SUPPORTED_TARGET_ARCH_LIST)) + switch_dpid = switch_info[DPID] + assert switch_dpid > 0, "Switch {} - P4 switch dataplane ID must be a positive integer".format(switch_name, switch_info[DPID]) + + # Port list + port_list = switch_info[PORT_LIST] + assert isinstance(port_list, list), "Switch {} port list must be a list with port_id and port_type items)" + for port in port_list: + port_id = port[PORT_ID] + assert port_id >= 0, "Switch {} - Invalid P4 switch port ID".format(switch_name) + port_type = port[PORT_TYPE] + assert port_type in PORT_TYPES_STR_VALID, "Switch {} - Valid P4 switch port types are: {}".format( + switch_name, ','.join(PORT_TYPES_STR_VALID)) + + if switch_name not in self.__port_map: + self.__port_map[switch_name] = {} + port_key = PORT_PREFIX + str(port_id) + if port_key not in self.__port_map[switch_name]: + self.__port_map[switch_name][port_key] = {} + self.__port_map[switch_name][port_key][PORT_ID] = port_id + self.__port_map[switch_name][port_key][PORT_TYPE] = port_type + self.__port_map[switch_name][port_key][ROUTING_LIST] = [] + + # Routing list + routing_list = switch_info[ROUTING_LIST] + assert isinstance(routing_list, list), "Switch {} routing list be a list)" + for rt_entry in routing_list: + port_id = rt_entry[PORT_ID] + assert port_id >= 0, "Invalid port ID: {}".format(port_id) + ipv4_dst = rt_entry[IPV4_DST] + assert chk_address_ipv4(ipv4_dst), "Invalid destination IPv4 address {}".format(ipv4_dst) + ipv4_prefix_len = rt_entry[IPV4_PREFIX_LEN] + assert chk_prefix_len_ipv4(ipv4_prefix_len), "Invalid IPv4 address prefix length {}".format(ipv4_prefix_len) + mac_src = rt_entry[MAC_SRC] + assert chk_address_mac(mac_src), "Invalid source MAC address {}".format(mac_src) + mac_dst = rt_entry[MAC_DST] + assert chk_address_mac(mac_dst), "Invalid destination MAC address {}".format(mac_dst) + + # Retrieve entry from the port map + switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) + + # Add routing entry + switch_port_entry[ROUTING_LIST].append( + { + PORT_ID: port_id, + IPV4_DST: ipv4_dst, + IPV4_PREFIX_LEN: ipv4_prefix_len, + MAC_SRC: mac_src, + MAC_DST: mac_dst + } + ) + + def _print_settings(self): + LOGGER.info("--------------- {} settings ---------------".format(self.__service.name)) + LOGGER.info("--- Topology info") + for switch_name, switch_info in self.__switch_info.items(): + LOGGER.info("\t Device {}".format(switch_name)) + LOGGER.info("\t\t| Target P4 architecture: {}".format(switch_info[ARCH])) + LOGGER.info("\t\t| Data plane ID: {}".format(switch_info[DPID])) + LOGGER.info("\t\t| Port map: {}".format(self.__port_map[switch_name])) + LOGGER.info("-------------------------------------------------------") + + def _get_switch_port_in_port_map(self, switch_name : str, port_id : int) -> Dict: + assert switch_name, "A valid switch name must be used as a key to the port map" + assert port_id > 0, "A valid switch port ID must be used as a key to a switch's port map" + switch_entry = self.__port_map[switch_name] + assert switch_entry, "Switch {} does not exist in the port map".format(switch_name) + port_key = PORT_PREFIX + str(port_id) + assert switch_entry[port_key], "Port with ID {} does not exist in the switch map".format(port_id) + + return switch_entry[port_key] + + def _get_routing_list_of_switch_port(self, switch_name : str, port_id : int) -> List [Tuple]: + switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) + return switch_port_entry[ROUTING_LIST] + + def _create_rules(self, device_obj : Device, port_id : int, action : ConfigActionEnum): # type: ignore + dev_name = device_obj.name + + rules = [] + + ### Static routing rules + routing_list = self._get_routing_list_of_switch_port(switch_name=dev_name, port_id=port_id) + for rt_entry in routing_list: + try: + rules += rules_set_up_next_routing_simple( + egress_port=port_id, + eth_src=rt_entry[MAC_SRC], + eth_dst=rt_entry[MAC_DST], + action=action + ) + rules += rules_set_up_routing( + ipv4_dst=rt_entry[IPV4_DST], + ipv4_prefix_len=rt_entry[IPV4_PREFIX_LEN], + egress_port=port_id, + action=action + ) + except Exception as ex: + LOGGER.error("Error while creating static L3 routing rules") + raise Exception(ex) + + return rules diff --git a/src/tests/p4-fabric-tna/README.md b/src/tests/p4-fabric-tna/README.md index b96bb02e9..f6bc2dd0c 100644 --- a/src/tests/p4-fabric-tna/README.md +++ b/src/tests/p4-fabric-tna/README.md @@ -139,6 +139,20 @@ cd ~/tfs-ctrl/ bash src/tests/p4-fabric-tna/run_test_03b_service_deprovision_l2.sh ``` +#### Provision L3 network service via the Service API + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-fabric-tna/run_test_04a_service_provision_l3.sh +``` + +#### Deprovision L3 network service via the Service API + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-fabric-tna/run_test_04b_service_deprovision_l3.sh +``` + #### Provision INT service via the Service API ```shell diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-l3.json b/src/tests/p4-fabric-tna/descriptors/service-create-l3.json new file mode 100644 index 000000000..7d8153e7a --- /dev/null +++ b/src/tests/p4-fabric-tna/descriptors/service-create-l3.json @@ -0,0 +1,67 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "p4-service-l3"} + }, + "name": "p4-service-l3", + "service_type": "SERVICETYPE_L3NM", + "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, + "service_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "endpoint_uuid": {"uuid": "1"} + }, + { + "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "endpoint_uuid": {"uuid": "2"} + } + ], + "service_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/settings", + "resource_value": { + "switch_info": { + "p4-sw1": { + "arch": "v1model", + "dpid": 1, + "port_list": [ + { + "port_id": 1, + "port_type": "host" + }, + { + "port_id": 2, + "port_type": "host" + } + ], + "routing_list": [ + { + "port_id": 1, + "ipv4_dst": "10.158.72.11", + "ipv4_prefix_len": 32, + "mac_src": "fa:16:3e:e2:af:28", + "mac_dst": "fa:16:3e:75:9c:e5" + }, + { + "port_id": 2, + "ipv4_dst": "172.16.10.9", + "ipv4_prefix_len": 32, + "mac_src": "fa:16:3e:75:9c:e5", + "mac_dst": "fa:16:3e:e2:af:28" + } + ] + } + } + } + } + } + ] + }, + "service_constraints": [] + } + ] +} diff --git a/src/tests/p4-fabric-tna/run_test_04a_service_provision_l3.sh b/src/tests/p4-fabric-tna/run_test_04a_service_provision_l3.sh new file mode 100755 index 000000000..96c629370 --- /dev/null +++ b/src/tests/p4-fabric-tna/run_test_04a_service_provision_l3.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l3.py diff --git a/src/tests/p4-fabric-tna/run_test_04b_service_deprovision_l3.sh b/src/tests/p4-fabric-tna/run_test_04b_service_deprovision_l3.sh new file mode 100755 index 000000000..fdc1d72ac --- /dev/null +++ b/src/tests/p4-fabric-tna/run_test_04b_service_deprovision_l3.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l3.py diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l3.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l3.py new file mode 100644 index 000000000..d349a0874 --- /dev/null +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l3.py @@ -0,0 +1,78 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.proto.context_pb2 import ServiceId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Service import json_service_id +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, service_client # pylint: disable=unused-import +from tests.tools.test_tools_p4 import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_service_deletion_l3( + context_client : ContextClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient # pylint: disable=redefined-outer-name +) -> None: + # Get the current number of devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + + # Total devices + dev_nb = len(response.devices) + assert dev_nb == DEV_NB + + # P4 devices + p4_dev_nb = identify_number_of_p4_devices(response.devices) + assert p4_dev_nb == P4_DEV_NB + + # Get the current number of rules in the P4 devices + p4_rules_before_deletion = get_number_of_rules(response.devices) + + # Get the current number of services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_before_deletion = len(response.services) + assert verify_active_service_type(response.services, ServiceTypeEnum.SERVICETYPE_L3NM) + + for service in response.services: + # Ignore services of other types + if service.service_type != ServiceTypeEnum.SERVICETYPE_L3NM: + continue + + service_id = service.service_id + assert service_id + + service_uuid = service_id.service_uuid.uuid + context_uuid = service_id.context_id.context_uuid.uuid + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + + # Delete L3 service + service_client.DeleteService(ServiceId(**json_service_id(service_uuid, json_context_id(context_uuid)))) + + # Get an updated view of the services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_after_deletion = len(response.services) + assert services_nb_after_deletion == services_nb_before_deletion - 1, "Exactly one new service must be deleted" + + # Get an updated view of the devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + p4_rules_after_deletion = get_number_of_rules(response.devices) + + rules_diff = p4_rules_before_deletion - p4_rules_after_deletion + + assert p4_rules_after_deletion < p4_rules_before_deletion, "L3 service must contain some rules" + assert rules_diff == P4_DEV_NB * L3_RULES, "L3 service must contain {} rules per device".format(L3_RULES) diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l3.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l3.py new file mode 100644 index 000000000..9c0009b14 --- /dev/null +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l3.py @@ -0,0 +1,73 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.proto.context_pb2 import ServiceStatusEnum, ServiceTypeEnum +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import +from tests.tools.test_tools_p4 import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_service_creation_l3( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient # pylint: disable=redefined-outer-name +) -> None: + # Get the current number of services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_before = len(response.services) + + # Get the current number of devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + + # Total devices + dev_nb = len(response.devices) + assert dev_nb == DEV_NB + + # P4 devices + p4_dev_nb = identify_number_of_p4_devices(response.devices) + assert p4_dev_nb == P4_DEV_NB + + # Get the current number of rules in the P4 devices + p4_rules_before = get_number_of_rules(response.devices) + + # Load service + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_SERVICE_CREATE_L3, + context_client=context_client, device_client=device_client, service_client=service_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + + # Get an updated view of the services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_after = len(response.services) + assert services_nb_after == services_nb_before + 1, "Exactly one new service must be in place" + assert verify_active_service_type(response.services, ServiceTypeEnum.SERVICETYPE_L3NM) + + # Get an updated view of the devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + p4_rules_after = get_number_of_rules(response.devices) + + rules_diff = p4_rules_after - p4_rules_before + + assert p4_rules_after > p4_rules_before, "L3 service must install some rules" + assert rules_diff == P4_DEV_NB * L3_RULES, "L3 service must install {} rules per device".format(L3_RULES) -- GitLab From 5c553a4f03d55be0fd2730d8f776661c1b8deee2 Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Mon, 31 Mar 2025 08:53:13 +0000 Subject: [PATCH 450/463] feat: P4 ACL service handler --- .../service/service_handlers/__init__.py | 7 + .../p4_fabric_tna_acl/__init__.py | 13 + .../p4_fabric_tna_acl_config.py | 39 ++ .../p4_fabric_tna_acl_service_handler.py | 526 ++++++++++++++++++ src/tests/p4-fabric-tna/README.md | 14 + .../descriptors/service-create-acl.json | 65 +++ .../run_test_05a_service_provision_acl.sh | 17 + .../run_test_05b_service_deprovision_acl.sh | 17 + ...test_functional_service_deprovision_acl.py | 78 +++ .../test_functional_service_provision_acl.py | 73 +++ 10 files changed, 849 insertions(+) create mode 100644 src/service/service/service_handlers/p4_fabric_tna_acl/__init__.py create mode 100644 src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_config.py create mode 100644 src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py create mode 100644 src/tests/p4-fabric-tna/descriptors/service-create-acl.json create mode 100755 src/tests/p4-fabric-tna/run_test_05a_service_provision_acl.sh create mode 100755 src/tests/p4-fabric-tna/run_test_05b_service_deprovision_acl.sh create mode 100644 src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_acl.py create mode 100644 src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_acl.py diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index 0ecef7c22..7c00d5a85 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -29,6 +29,7 @@ from .p4_dummy_l1.p4_dummy_l1_service_handler import P4DummyL1ServiceHandler from .p4_fabric_tna_int.p4_fabric_tna_int_service_handler import P4FabricINTServiceHandler from .p4_fabric_tna_l2_simple.p4_fabric_tna_l2_simple_service_handler import P4FabricL2SimpleServiceHandler from .p4_fabric_tna_l3.p4_fabric_tna_l3_service_handler import P4FabricL3ServiceHandler +from .p4_fabric_tna_acl.p4_fabric_tna_acl_service_handler import P4FabricACLServiceHandler from .tapi_tapi.TapiServiceHandler import TapiServiceHandler from .tapi_xr.TapiXrServiceHandler import TapiXrServiceHandler from .optical_tfs.OpticalTfsServiceHandler import OpticalTfsServiceHandler @@ -132,6 +133,12 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER: DeviceDriverEnum.DEVICEDRIVER_P4, } ]), + (P4FabricACLServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE: ServiceTypeEnum.SERVICETYPE_ACL, + FilterFieldEnum.DEVICE_DRIVER: DeviceDriverEnum.DEVICEDRIVER_P4, + } + ]), (L2NM_IETFL2VPN_ServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L2NM, diff --git a/src/service/service/service_handlers/p4_fabric_tna_acl/__init__.py b/src/service/service/service_handlers/p4_fabric_tna_acl/__init__.py new file mode 100644 index 000000000..023830645 --- /dev/null +++ b/src/service/service/service_handlers/p4_fabric_tna_acl/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/p4_fabric_tna_acl/p4_fabric_tna_acl_config.py b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_config.py new file mode 100644 index 000000000..09dbcc5aa --- /dev/null +++ b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_config.py @@ -0,0 +1,39 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Common objects and methods for In-band Network Telemetry (INT) dataplane +based on the SD-Fabric dataplane model. +This dataplane covers both software based and hardware-based Stratum-enabled P4 switches, +such as the BMv2 software switch and Intel's Tofino/Tofino-2 switches. + +SD-Fabric repo: https://github.com/stratum/fabric-tna +SD-Fabric docs: https://docs.sd-fabric.org/master/index.html +""" + +import logging + +from service.service.service_handlers.p4_fabric_tna_commons.p4_fabric_tna_commons import * + +LOGGER = logging.getLogger(__name__) + +# ACL service handler settings +ACL = "acl" +ACTION = "action" +ACTION_DROP = "drop" +ACTION_ALLOW = "allow" +ACTION_LIST = [ACTION_ALLOW, ACTION_DROP] + +def is_valid_acl_action(action : str) -> bool: + return action in ACTION_LIST diff --git a/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py new file mode 100644 index 000000000..0b44a1ce8 --- /dev/null +++ b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py @@ -0,0 +1,526 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Service handler for P4-based access control using the SD-Fabric P4 dataplane +for BMv2 and Intel Tofino switches. +""" + +import logging +from typing import Any, List, Dict, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.proto.context_pb2 import ConfigActionEnum, DeviceId, Service, Device +from common.tools.object_factory.Device import json_device_id +from common.type_checkers.Checkers import chk_type, chk_address_ipv4, chk_prefix_len_ipv4,\ + chk_transport_port +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.service_handlers.p4_fabric_tna_commons.p4_fabric_tna_commons import * +from service.service.task_scheduler.TaskExecutor import TaskExecutor + +from .p4_fabric_tna_acl_config import * + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'p4_fabric_tna_acl'}) + +class P4FabricACLServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : TaskExecutor, **settings # type: ignore + ) -> None: + """ Initialize Driver. + Parameters: + service + The service instance (gRPC message) to be managed. + task_executor + An instance of Task Executor providing access to the + service handlers factory, the context and device clients, + and an internal cache of already-loaded gRPC entities. + **settings + Extra settings required by the service handler. + + """ + self.__service_label = "P4 Access Control connectivity service" + self.__service = service + self.__task_executor = task_executor + self.__settings_handler = SettingsHandler(self.__service.service_config, **settings) + + self._init_settings() + self._parse_settings() + self._print_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]]: + """ Create/Update service endpoints from a list. + Parameters: + endpoints: List[Tuple[str, str, Optional[str]]] + List of tuples, each containing a device_uuid, + endpoint_uuid and, optionally, the topology_uuid + of the endpoint to be added. + connection_uuid : Optional[str] + If specified, is the UUID of the connection this endpoint is associated to. + Returns: + results: List[Union[bool, Exception]] + List of results for endpoint changes requested. + Return values must be in the same order as the requested + endpoints. If an endpoint is properly added, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + + LOGGER.info("{} - Provision service configuration".format( + self.__service_label)) + + visited = set() + results = [] + for endpoint in endpoints: + device_uuid, endpoint_uuid = endpoint[0:2] + device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + device_name = device.name + + LOGGER.info("Device {}".format(device_name)) + LOGGER.info("\t | Service endpoint UUID: {}".format(endpoint_uuid)) + + port_id = find_port_id_in_endpoint_list(device.device_endpoints, endpoint_uuid) + LOGGER.info("\t | Service port ID: {}".format(port_id)) + + try: + # Check if this port is part of the ACL configuration + _ = self._get_switch_port_in_port_map(device_name, port_id) + except Exception: + LOGGER.warning("Switch {} endpoint {} is not part of the ACL configuration".format(device_name, port_id)) + results.append(False) + continue + + dev_port_key = device_name + "-" + PORT_PREFIX + str(port_id) + + # Skip already visited device ports + if dev_port_key in visited: + continue + + rules = [] + actual_rules = -1 + applied_rules, failed_rules = 0, -1 + + # Create and apply rules + try: + rules = self._create_rules( + device_obj=device, port_id=port_id, action=ConfigActionEnum.CONFIGACTION_SET) + actual_rules = len(rules) + applied_rules, failed_rules = apply_rules( + task_executor=self.__task_executor, + device_obj=device, + json_config_rules=rules + ) + except Exception as ex: + LOGGER.error("Failed to insert ACL rules on device {} due to {}".format(device.name, ex)) + finally: + rules.clear() + + # Ensure correct status + results.append(True) if (failed_rules == 0) and (applied_rules == actual_rules) \ + else results.append(False) + + # You should no longer visit this device port again + visited.add(dev_port_key) + + LOGGER.info("Installed {}/{} ACL rules on device {} and port {}".format( + applied_rules, actual_rules, device_name, port_id)) + + 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]]: + """ Delete service endpoints from a list. + Parameters: + endpoints: List[Tuple[str, str, Optional[str]]] + List of tuples, each containing a device_uuid, + endpoint_uuid, and the topology_uuid of the endpoint + to be removed. + connection_uuid : Optional[str] + If specified, is the UUID of the connection this endpoint is associated to. + Returns: + results: List[Union[bool, Exception]] + List of results for endpoint deletions requested. + Return values must be in the same order as the requested + endpoints. If an endpoint is properly deleted, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + + LOGGER.info("{} - Deprovision service configuration".format( + self.__service_label)) + + visited = set() + results = [] + for endpoint in endpoints: + device_uuid, endpoint_uuid = endpoint[0:2] + device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + device_name = device.name + + LOGGER.info("Device {}".format(device_name)) + LOGGER.info("\t | Service endpoint UUID: {}".format(endpoint_uuid)) + + port_id = find_port_id_in_endpoint_list(device.device_endpoints, endpoint_uuid) + LOGGER.info("\t | Service port ID: {}".format(port_id)) + + try: + # Check if this port is part of the ACL configuration + _ = self._get_switch_port_in_port_map(device_name, port_id) + except Exception: + LOGGER.warning("Switch {} endpoint {} is not part of the ACL configuration".format(device_name, port_id)) + results.append(False) + continue + + dev_port_key = device_name + "-" + PORT_PREFIX + str(port_id) + + # Skip already visited device ports + if dev_port_key in visited: + continue + + rules = [] + actual_rules = -1 + applied_rules, failed_rules = 0, -1 + + # Create and apply rules + try: + rules = self._create_rules( + device_obj=device, port_id=port_id, action=ConfigActionEnum.CONFIGACTION_DELETE) + actual_rules = len(rules) + applied_rules, failed_rules = apply_rules( + task_executor=self.__task_executor, + device_obj=device, + json_config_rules=rules + ) + except Exception as ex: + LOGGER.error("Failed to insert ACL rules on device {} due to {}".format(device.name, ex)) + finally: + rules.clear() + + # Ensure correct status + results.append(True) if (failed_rules == 0) and (applied_rules == actual_rules) \ + else results.append(False) + + # You should no longer visit this device port again + visited.add(dev_port_key) + + LOGGER.info("Deleted {}/{} ACL rules from device {} and port {}".format( + applied_rules, actual_rules, device_name, port_id)) + + return results + + @metered_subclass_method(METRICS_POOL) + def SetConstraint(self, constraints: List[Tuple[str, Any]]) \ + -> List[Union[bool, Exception]]: + """ Create/Update service constraints. + Parameters: + constraints: List[Tuple[str, Any]] + List of tuples, each containing a constraint_type and the + new constraint_value to be set. + Returns: + results: List[Union[bool, Exception]] + List of results for constraint changes requested. + Return values must be in the same order as the requested + constraints. If a constraint is properly set, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + 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]]: + """ Delete service constraints. + Parameters: + constraints: List[Tuple[str, Any]] + List of tuples, each containing a constraint_type pointing + to the constraint to be deleted, and a constraint_value + containing possible additionally required values to locate + the constraint to be removed. + Returns: + results: List[Union[bool, Exception]] + List of results for constraint deletions requested. + Return values must be in the same order as the requested + constraints. If a constraint is properly deleted, True must + be returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + 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]]: + """ Create/Update configuration for a list of service resources. + Parameters: + resources: List[Tuple[str, Any]] + List of tuples, each containing a resource_key pointing to + the resource to be modified, and a resource_value + containing the new value to be set. + Returns: + results: List[Union[bool, Exception]] + List of results for resource key changes requested. + Return values must be in the same order as the requested + resource keys. If a resource is properly set, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + msg = '[SetConfig] Method not implemented. Resources({:s}) are being ignored.' + LOGGER.warning(msg.format(str(resources))) + return [True for _ in range(len(resources))] + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources: List[Tuple[str, Any]]) \ + -> List[Union[bool, Exception]]: + """ Delete configuration for a list of service resources. + Parameters: + resources: List[Tuple[str, Any]] + List of tuples, each containing a resource_key pointing to + the resource to be modified, and a resource_value containing + possible additionally required values to locate the value + to be removed. + Returns: + results: List[Union[bool, Exception]] + List of results for resource key deletions requested. + Return values must be in the same order as the requested + resource keys. If a resource is properly deleted, True must + be returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + msg = '[SetConfig] Method not implemented. Resources({:s}) are being ignored.' + LOGGER.warning(msg.format(str(resources))) + return [True for _ in range(len(resources))] + + def _init_settings(self): + self.__switch_info = {} + self.__port_map = {} + + try: + self.__settings = self.__settings_handler.get('/settings') + LOGGER.info("{} with settings: {}".format(self.__service_label, self.__settings)) + except Exception as ex: + self.__settings = {} + LOGGER.error("Failed to parse service settings: {}".format(ex)) + + def _default_settings(self): + acl = [ + { + PORT_ID: 1, + IPV4_SRC: "10.158.72.11", + IPV4_PREFIX_LEN: 32, + ACTION: ACTION_DROP + }, + { + PORT_ID: 1, + TRN_PORT_DST: 8080, + ACTION: ACTION_DROP + } + ] + + switch_info = { + "p4-sw1": { + ARCH: TARGET_ARCH_V1MODEL, + DPID: 1, + ACL: acl + } + } + self.__settings = { + SWITCH_INFO: switch_info + } + + port_map = { + "p4-sw1": { + "port-1": { + PORT_ID: 1, + ACL: [ + { + IPV4_SRC: "10.158.72.11", + IPV4_PREFIX_LEN: 32, + ACTION: ACTION_DROP + }, + { + TRN_PORT_DST: 8080, + ACTION: ACTION_DROP + } + ] + } + } + } + + def _parse_settings(self): + #TODO: Pass settings in a correct way + try: + self.__switch_info = self.__settings[SWITCH_INFO] + except Exception as ex: + LOGGER.error("Failed to parse settings: {}".format(ex)) + self._default_settings() #TODO: Remove when bug is fixed + self.__switch_info = self.__settings[SWITCH_INFO] + assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" + + for switch_name, switch_info in self.__switch_info.items(): + assert switch_name, "Invalid P4 switch name" + assert isinstance(switch_info, dict), "Switch {} info must be a map with arch, dpid, and fwd_list items)" + assert switch_info[ARCH] in SUPPORTED_TARGET_ARCH_LIST, \ + "Switch {} - Supported P4 architectures are: {}".format(switch_name, ','.join(SUPPORTED_TARGET_ARCH_LIST)) + switch_dpid = switch_info[DPID] + assert switch_dpid > 0, "Switch {} - P4 switch dataplane ID must be a positive integer".format(switch_name, switch_info[DPID]) + + # Access Control list + acl = switch_info[ACL] + assert isinstance(acl, list), "Switch {} access control list must be a list with port_id, [ipv4_dst/src, trn_post_dst/src], and action items)" + for acl_entry in acl: + LOGGER.info("ACL entry: {}".format(acl_entry)) + port_id = acl_entry[PORT_ID] + assert port_id >= 0, "Switch {} - Invalid P4 switch port ID".format(switch_name) + + # Prepare the port map + if switch_name not in self.__port_map: + self.__port_map[switch_name] = {} + port_key = PORT_PREFIX + str(port_id) + if port_key not in self.__port_map[switch_name]: + self.__port_map[switch_name][port_key] = {} + self.__port_map[switch_name][port_key][PORT_ID] = port_id + if ACL not in self.__port_map[switch_name][port_key]: + self.__port_map[switch_name][port_key][ACL] = [] + + map_entry = {} + + ipv4_src = "" + if IPV4_SRC in acl_entry: + ipv4_src = acl_entry[IPV4_SRC] + assert chk_address_ipv4(ipv4_src), "Invalid source IPv4 address {}".format(ipv4_dst) + map_entry[IPV4_SRC] = ipv4_src + + ipv4_dst = "" + if IPV4_DST in acl_entry: + ipv4_dst = acl_entry[IPV4_DST] + assert chk_address_ipv4(ipv4_dst), "Invalid destination IPv4 address {}".format(ipv4_dst) + map_entry[IPV4_DST] = ipv4_dst + + ipv4_prefix_len = -1 + if ipv4_src or ipv4_dst: + ipv4_prefix_len = acl_entry[IPV4_PREFIX_LEN] + assert chk_prefix_len_ipv4(ipv4_prefix_len), "Invalid IPv4 address prefix length {}".format(ipv4_prefix_len) + map_entry[IPV4_PREFIX_LEN] = ipv4_prefix_len + + trn_port_src = -1 + if TRN_PORT_SRC in acl_entry: + trn_port_src = acl_entry[TRN_PORT_SRC] + assert chk_transport_port(trn_port_src), "Invalid source transport port" + map_entry[TRN_PORT_SRC] = trn_port_src + + trn_port_dst = -1 + if TRN_PORT_DST in acl_entry: + trn_port_dst = acl_entry[TRN_PORT_DST] + assert chk_transport_port(trn_port_dst), "Invalid destination transport port" + map_entry[TRN_PORT_DST] = trn_port_dst + + action = acl_entry[ACTION] + assert is_valid_acl_action(action), "Valid actions are: {}".format(','.join(ACTION_LIST)) + + # Retrieve entry from the port map + switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) + + # Add routing entry + switch_port_entry[ACL].append(map_entry) + + def _print_settings(self): + LOGGER.info("--------------- {} settings ---------------".format(self.__service.name)) + LOGGER.info("--- Topology info") + for switch_name, switch_info in self.__switch_info.items(): + LOGGER.info("\t Device {}".format(switch_name)) + LOGGER.info("\t\t| Target P4 architecture: {}".format(switch_info[ARCH])) + LOGGER.info("\t\t| Data plane ID: {}".format(switch_info[DPID])) + LOGGER.info("\t\t| Port map: {}".format(self.__port_map[switch_name])) + LOGGER.info("-------------------------------------------------------") + + def _get_switch_port_in_port_map(self, switch_name : str, port_id : int) -> Dict: + assert switch_name, "A valid switch name must be used as a key to the port map" + assert port_id > 0, "A valid switch port ID must be used as a key to a switch's port map" + switch_entry = self.__port_map[switch_name] + assert switch_entry, "Switch {} does not exist in the port map".format(switch_name) + port_key = PORT_PREFIX + str(port_id) + assert switch_entry[port_key], "Port with ID {} does not exist in the switch map".format(port_id) + + return switch_entry[port_key] + + def _get_acl_of_switch_port(self, switch_name : str, port_id : int) -> List [Tuple]: + switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) + return switch_port_entry[ACL] + + def _create_rules(self, device_obj : Device, port_id : int, action : ConfigActionEnum): # type: ignore + dev_name = device_obj.name + + rules = [] + + ### ACL rules + acl = self._get_acl_of_switch_port(switch_name=dev_name, port_id=port_id) + for acl_entry in acl: + if IPV4_SRC in acl_entry: + rules += rules_set_up_acl_filter_host( + ingress_port=port_id, + ip_address=acl_entry[IPV4_SRC], + prefix_len=acl_entry[IPV4_PREFIX_LEN], + ip_direction="src", + action=action + ) + if IPV4_DST in acl_entry: + rules += rules_set_up_acl_filter_host( + ingress_port=port_id, + ip_address=acl_entry[IPV4_DST], + prefix_len=acl_entry[IPV4_PREFIX_LEN], + ip_direction="dst", + action=action + ) + if TRN_PORT_SRC in acl_entry: + rules += rules_set_up_acl_filter_port( + ingress_port=port_id, + transport_port=acl_entry[TRN_PORT_SRC], + transport_direction="src", + action=action + ) + if TRN_PORT_DST in acl_entry: + rules += rules_set_up_acl_filter_port( + ingress_port=port_id, + transport_port=acl_entry[TRN_PORT_DST], + transport_direction="dst", + action=action + ) + + return rules diff --git a/src/tests/p4-fabric-tna/README.md b/src/tests/p4-fabric-tna/README.md index f6bc2dd0c..115932bb4 100644 --- a/src/tests/p4-fabric-tna/README.md +++ b/src/tests/p4-fabric-tna/README.md @@ -153,6 +153,20 @@ cd ~/tfs-ctrl/ bash src/tests/p4-fabric-tna/run_test_04b_service_deprovision_l3.sh ``` +#### Provision ACL network service via the Service API + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-fabric-tna/run_test_05a_service_provision_acl.sh +``` + +#### Deprovision ACL network service via the Service API + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-fabric-tna/run_test_05b_service_deprovision_acl.sh +``` + #### Provision INT service via the Service API ```shell diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-acl.json b/src/tests/p4-fabric-tna/descriptors/service-create-acl.json new file mode 100644 index 000000000..d0beef010 --- /dev/null +++ b/src/tests/p4-fabric-tna/descriptors/service-create-acl.json @@ -0,0 +1,65 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "p4-service-acl"} + }, + "name": "p4-service-acl", + "service_type": "SERVICETYPE_ACL", + "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, + "service_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "endpoint_uuid": {"uuid": "1"} + }, + { + "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "endpoint_uuid": {"uuid": "2"} + } + ], + "service_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/settings", + "resource_value": { + "switch_info": { + "p4-sw1": { + "arch": "v1model", + "dpid": 1, + "acl": [ + { + "port_id": 1, + "trn_port_dst": 8080, + "action": "drop" + }, + { + "port_id": 1, + "trn_port_src": 12345, + "action": "drop" + }, + { + "port_id": 1, + "ipv4_dst": "172.16.10.10", + "ipv4_prefix_len": 32, + "action": "drop" + }, + { + "port_id": 2, + "ipv4_src": "172.16.10.10", + "ipv4_prefix_len": 32, + "action": "drop" + } + ] + } + } + } + } + } + ] + }, + "service_constraints": [] + } + ] +} diff --git a/src/tests/p4-fabric-tna/run_test_05a_service_provision_acl.sh b/src/tests/p4-fabric-tna/run_test_05a_service_provision_acl.sh new file mode 100755 index 000000000..2cf94b1bd --- /dev/null +++ b/src/tests/p4-fabric-tna/run_test_05a_service_provision_acl.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_acl.py diff --git a/src/tests/p4-fabric-tna/run_test_05b_service_deprovision_acl.sh b/src/tests/p4-fabric-tna/run_test_05b_service_deprovision_acl.sh new file mode 100755 index 000000000..681490896 --- /dev/null +++ b/src/tests/p4-fabric-tna/run_test_05b_service_deprovision_acl.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_acl.py diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_acl.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_acl.py new file mode 100644 index 000000000..fcecbd2c7 --- /dev/null +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_acl.py @@ -0,0 +1,78 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.proto.context_pb2 import ServiceId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Service import json_service_id +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, service_client # pylint: disable=unused-import +from tests.tools.test_tools_p4 import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_service_deletion_acl( + context_client : ContextClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient # pylint: disable=redefined-outer-name +) -> None: + # Get the current number of devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + + # Total devices + dev_nb = len(response.devices) + assert dev_nb == DEV_NB + + # P4 devices + p4_dev_nb = identify_number_of_p4_devices(response.devices) + assert p4_dev_nb == P4_DEV_NB + + # Get the current number of rules in the P4 devices + p4_rules_before_deletion = get_number_of_rules(response.devices) + + # Get the current number of services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_before_deletion = len(response.services) + assert verify_active_service_type(response.services, ServiceTypeEnum.SERVICETYPE_ACL) + + for service in response.services: + # Ignore services of other types + if service.service_type != ServiceTypeEnum.SERVICETYPE_ACL: + continue + + service_id = service.service_id + assert service_id + + service_uuid = service_id.service_uuid.uuid + context_uuid = service_id.context_id.context_uuid.uuid + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + + # Delete ACL service + service_client.DeleteService(ServiceId(**json_service_id(service_uuid, json_context_id(context_uuid)))) + + # Get an updated view of the services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_after_deletion = len(response.services) + assert services_nb_after_deletion == services_nb_before_deletion - 1, "Exactly one new service must be deleted" + + # Get an updated view of the devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + p4_rules_after_deletion = get_number_of_rules(response.devices) + + rules_diff = p4_rules_before_deletion - p4_rules_after_deletion + + assert p4_rules_after_deletion < p4_rules_before_deletion, "ACL service must contain some rules" + assert rules_diff == P4_DEV_NB * ACL_RULES, "ACL service must contain {} rules per device".format(ACL_RULES) diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_acl.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_acl.py new file mode 100644 index 000000000..58de046b4 --- /dev/null +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_acl.py @@ -0,0 +1,73 @@ +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 common.proto.context_pb2 import ServiceStatusEnum, ServiceTypeEnum +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import +from tests.tools.test_tools_p4 import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_service_creation_acl( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient # pylint: disable=redefined-outer-name +) -> None: + # Get the current number of services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_before = len(response.services) + + # Get the current number of devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + + # Total devices + dev_nb = len(response.devices) + assert dev_nb == DEV_NB + + # P4 devices + p4_dev_nb = identify_number_of_p4_devices(response.devices) + assert p4_dev_nb == P4_DEV_NB + + # Get the current number of rules in the P4 devices + p4_rules_before = get_number_of_rules(response.devices) + + # Load service + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_SERVICE_CREATE_ACL, + context_client=context_client, device_client=device_client, service_client=service_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + + # Get an updated view of the services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + services_nb_after = len(response.services) + assert services_nb_after == services_nb_before + 1, "Exactly one new service must be in place" + assert verify_active_service_type(response.services, ServiceTypeEnum.SERVICETYPE_ACL) + + # Get an updated view of the devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + p4_rules_after = get_number_of_rules(response.devices) + + rules_diff = p4_rules_after - p4_rules_before + + assert p4_rules_after > p4_rules_before, "ACL service must install some rules" + assert rules_diff == P4_DEV_NB * ACL_RULES, "ACL service must install {} rules per device".format(ACL_RULES) -- GitLab From 22bb98ab7a75738d8d7417d282182cc99d3b9a1d Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Mon, 31 Mar 2025 10:30:36 +0000 Subject: [PATCH 451/463] fix: service handlers' temporal configuration --- .../p4_fabric_tna_acl_service_handler.py | 53 +++++++++++------- .../p4_fabric_tna_l3_service_handler.py | 56 +++++++++---------- .../descriptors/service-create-acl.json | 8 +-- src/tests/tools/test_tools_p4.py | 2 +- 4 files changed, 65 insertions(+), 54 deletions(-) diff --git a/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py index 0b44a1ce8..dc86dc535 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py @@ -342,13 +342,24 @@ class P4FabricACLServiceHandler(_ServiceHandler): acl = [ { PORT_ID: 1, - IPV4_SRC: "10.158.72.11", + TRN_PORT_DST: 8080, + ACTION: ACTION_DROP + }, + { + PORT_ID: 2, + TRN_PORT_SRC: 12345, + ACTION: ACTION_DROP + }, + { + PORT_ID: 2, + IPV4_DST: "10.158.72.11", IPV4_PREFIX_LEN: 32, ACTION: ACTION_DROP }, { - PORT_ID: 1, - TRN_PORT_DST: 8080, + PORT_ID: 2, + IPV4_SRC: "10.158.72.12", + IPV4_PREFIX_LEN: 32, ACTION: ACTION_DROP } ] @@ -364,24 +375,24 @@ class P4FabricACLServiceHandler(_ServiceHandler): SWITCH_INFO: switch_info } - port_map = { - "p4-sw1": { - "port-1": { - PORT_ID: 1, - ACL: [ - { - IPV4_SRC: "10.158.72.11", - IPV4_PREFIX_LEN: 32, - ACTION: ACTION_DROP - }, - { - TRN_PORT_DST: 8080, - ACTION: ACTION_DROP - } - ] - } - } - } + # port_map = { + # "p4-sw1": { + # "port-1": { + # PORT_ID: 1, + # ACL: [ + # { + # IPV4_SRC: "10.158.72.11", + # IPV4_PREFIX_LEN: 32, + # ACTION: ACTION_DROP + # }, + # { + # TRN_PORT_DST: 8080, + # ACTION: ACTION_DROP + # } + # ] + # } + # } + # } def _parse_settings(self): #TODO: Pass settings in a correct way diff --git a/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py index 849d1db92..ed5dd25bd 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py @@ -358,34 +358,34 @@ class P4FabricL3ServiceHandler(_ServiceHandler): SWITCH_INFO: switch_info } - port_map = { - "p4-sw1": { - "port-1": { - PORT_ID: 1, - PORT_TYPE: PORT_TYPE_HOST, - ROUTING_LIST: [ - { - IPV4_DST: "10.158.72.11", - IPV4_PREFIX_LEN: 32, - MAC_SRC: "fa:16:3e:e2:af:28", - MAC_DST: "fa:16:3e:75:9c:e5" - } - ] - }, - "port-2": { - PORT_ID: 2, - PORT_TYPE: PORT_TYPE_HOST, - ROUTING_LIST: [ - { - IPV4_DST: "172.16.10.9", - IPV4_PREFIX_LEN: 32, - MAC_SRC: "fa:16:3e:75:9c:e5", - MAC_DST: "fa:16:3e:e2:af:28" - } - ] - } - } - } + # port_map = { + # "p4-sw1": { + # "port-1": { + # PORT_ID: 1, + # PORT_TYPE: PORT_TYPE_HOST, + # ROUTING_LIST: [ + # { + # IPV4_DST: "10.158.72.11", + # IPV4_PREFIX_LEN: 32, + # MAC_SRC: "fa:16:3e:e2:af:28", + # MAC_DST: "fa:16:3e:75:9c:e5" + # } + # ] + # }, + # "port-2": { + # PORT_ID: 2, + # PORT_TYPE: PORT_TYPE_HOST, + # ROUTING_LIST: [ + # { + # IPV4_DST: "172.16.10.9", + # IPV4_PREFIX_LEN: 32, + # MAC_SRC: "fa:16:3e:75:9c:e5", + # MAC_DST: "fa:16:3e:e2:af:28" + # } + # ] + # } + # } + # } def _parse_settings(self): #TODO: Pass settings in a correct way diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-acl.json b/src/tests/p4-fabric-tna/descriptors/service-create-acl.json index d0beef010..225e8e85e 100644 --- a/src/tests/p4-fabric-tna/descriptors/service-create-acl.json +++ b/src/tests/p4-fabric-tna/descriptors/service-create-acl.json @@ -35,19 +35,19 @@ "action": "drop" }, { - "port_id": 1, + "port_id": 2, "trn_port_src": 12345, "action": "drop" }, { - "port_id": 1, - "ipv4_dst": "172.16.10.10", + "port_id": 2, + "ipv4_dst": "10.158.72.11", "ipv4_prefix_len": 32, "action": "drop" }, { "port_id": 2, - "ipv4_src": "172.16.10.10", + "ipv4_src": "10.158.72.12", "ipv4_prefix_len": 32, "action": "drop" } diff --git a/src/tests/tools/test_tools_p4.py b/src/tests/tools/test_tools_p4.py index aa37f9e2c..c68f35183 100644 --- a/src/tests/tools/test_tools_p4.py +++ b/src/tests/tools/test_tools_p4.py @@ -30,7 +30,7 @@ ENDPOINT_RULES = 3 INT_RULES = 19 L2_RULES = 10 L3_RULES = 4 -ACL_RULES = 2 +ACL_RULES = 1 DATAPLANE_RULES_NB_INT_B1 = 5 DATAPLANE_RULES_NB_INT_B2 = 6 -- GitLab From b042d3f7ad6cc35926aa2117b8c31fda101eb90e Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Mon, 31 Mar 2025 10:54:15 +0000 Subject: [PATCH 452/463] fix: P4 ACL temporary configuration --- .../p4_fabric_tna_acl_service_handler.py | 17 ----------------- .../descriptors/service-create-acl.json | 17 ----------------- 2 files changed, 34 deletions(-) diff --git a/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py index dc86dc535..53c4e7c86 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py @@ -344,23 +344,6 @@ class P4FabricACLServiceHandler(_ServiceHandler): PORT_ID: 1, TRN_PORT_DST: 8080, ACTION: ACTION_DROP - }, - { - PORT_ID: 2, - TRN_PORT_SRC: 12345, - ACTION: ACTION_DROP - }, - { - PORT_ID: 2, - IPV4_DST: "10.158.72.11", - IPV4_PREFIX_LEN: 32, - ACTION: ACTION_DROP - }, - { - PORT_ID: 2, - IPV4_SRC: "10.158.72.12", - IPV4_PREFIX_LEN: 32, - ACTION: ACTION_DROP } ] diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-acl.json b/src/tests/p4-fabric-tna/descriptors/service-create-acl.json index 225e8e85e..a0383f472 100644 --- a/src/tests/p4-fabric-tna/descriptors/service-create-acl.json +++ b/src/tests/p4-fabric-tna/descriptors/service-create-acl.json @@ -33,23 +33,6 @@ "port_id": 1, "trn_port_dst": 8080, "action": "drop" - }, - { - "port_id": 2, - "trn_port_src": 12345, - "action": "drop" - }, - { - "port_id": 2, - "ipv4_dst": "10.158.72.11", - "ipv4_prefix_len": 32, - "action": "drop" - }, - { - "port_id": 2, - "ipv4_src": "10.158.72.12", - "ipv4_prefix_len": 32, - "action": "drop" } ] } -- GitLab From 9dfe1e7fb80cd9704b8bd7de0684f396e90c28b6 Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Mon, 31 Mar 2025 16:32:07 +0000 Subject: [PATCH 453/463] doc: update README --- src/tests/p4-fabric-tna/README.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/tests/p4-fabric-tna/README.md b/src/tests/p4-fabric-tna/README.md index 115932bb4..e8ae8fde9 100644 --- a/src/tests/p4-fabric-tna/README.md +++ b/src/tests/p4-fabric-tna/README.md @@ -72,13 +72,21 @@ The `./setup.sh` script copies from this directory. If you need to change the P4 A set of tests is implemented, each focusing on different aspects of TFS. For each of these tests, an auxiliary bash script allows to run it with less typing. -| Test | Bash Runner | Purpose | -| ------------------------------------ | ---------------------------------- | ---------------------------------- | -| - | setup.sh | Copy P4 artifacts into the SBI pod | -| test_functional_bootstrap.py | run_test_01_bootstrap.sh | Connect TFS to the P4 switch | -| test_functional_rules_provision.py | run_test_02_rules_provision.sh | Install rules on the P4 switch | -| test_functional_rules_deprovision.py | run_test_03_rules_deprovision.sh | Uninstall rules from the P4 switch | -| test_functional_cleanup.py | run_test_04_cleanup.sh | Disconnect TFS from the P4 switch | +| Bash Runner | Purpose | +| --------------------------------------------- | --------------------------------------------------------------------------- | +| setup.sh | Copy P4 artifacts into the SBI pod | +| run_test_01_bootstrap.sh | Connect TFS to the P4 switch | +| run_test_02a_sbi_provision_int_l2_l3_acl.sh | Install L2, L3, INT, and ACL rules on the P4 switch via the SBI service | +| run_test_02b_sbi_deprovision_int_l2_l3_acl.sh | Uninstall L2, L3, INT, and ACL rules from the P4 switch via the SBI service | +| run_test_03a_service_provision_l2.sh | Install L2 forwarding rules via a dedicated P4 L2 service handler | +| run_test_03b_service_deprovision_l2.sh | Uninstall L2 forwarding rules via a dedicated P4 L2 service handler | +| run_test_04a_service_provision_l3.sh | Install L3 routing rules via a dedicated P4 L3 service handler | +| run_test_04b_service_deprovision_l3.sh | Uninstall L3 routing rules via a dedicated P4 L3 service handler | +| run_test_05a_service_provision_acl.sh | Install ACL rules via a dedicated P4 ACL service handler | +| run_test_05b_service_deprovision_acl.sh | Uninstall ACL rules via a dedicated P4 ACL service handler | +| run_test_06a_service_provision_int.sh | Install INT rules via a dedicated P4 INT service handler | +| run_test_06b_service_deprovision_int.sh | Uninstall INT rules via a dedicated P4 INT service handler | +| run_test_07_cleanup.sh | Clean-up context and topology and disconnect TFS from the P4 switch | Each of the tests above is described in detail below. -- GitLab From 1296e935c1863d0f5ad7f284b5d3fa060a5de597 Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Mon, 5 May 2025 20:07:40 +0300 Subject: [PATCH 454/463] fix: remove hardcoded service settings after pathcomp bug fix --- .../p4_fabric_tna_acl_service_handler.py | 51 ++---------- .../p4_fabric_tna_int_service_handler.py | 40 ++-------- ...p4_fabric_tna_l2_simple_service_handler.py | 64 ++------------- .../p4_fabric_tna_l3_service_handler.py | 80 ++----------------- .../descriptors/service-create-acl.json | 6 +- .../descriptors/service-create-int.json | 14 ++-- .../descriptors/service-create-l2-simple.json | 10 +-- .../descriptors/service-create-l3.json | 18 ++--- .../p4-fabric-tna/descriptors/topology.json | 34 ++++---- ...witch-three-port-chassis-config-phy.pb.txt | 3 +- 10 files changed, 64 insertions(+), 256 deletions(-) diff --git a/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py index 53c4e7c86..b57086a29 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py @@ -335,56 +335,15 @@ class P4FabricACLServiceHandler(_ServiceHandler): self.__settings = self.__settings_handler.get('/settings') LOGGER.info("{} with settings: {}".format(self.__service_label, self.__settings)) except Exception as ex: - self.__settings = {} - LOGGER.error("Failed to parse service settings: {}".format(ex)) - - def _default_settings(self): - acl = [ - { - PORT_ID: 1, - TRN_PORT_DST: 8080, - ACTION: ACTION_DROP - } - ] - - switch_info = { - "p4-sw1": { - ARCH: TARGET_ARCH_V1MODEL, - DPID: 1, - ACL: acl - } - } - self.__settings = { - SWITCH_INFO: switch_info - } - - # port_map = { - # "p4-sw1": { - # "port-1": { - # PORT_ID: 1, - # ACL: [ - # { - # IPV4_SRC: "10.158.72.11", - # IPV4_PREFIX_LEN: 32, - # ACTION: ACTION_DROP - # }, - # { - # TRN_PORT_DST: 8080, - # ACTION: ACTION_DROP - # } - # ] - # } - # } - # } + LOGGER.error("Failed to retrieve service settings: {}".format(ex)) + raise Exception(ex) def _parse_settings(self): - #TODO: Pass settings in a correct way try: - self.__switch_info = self.__settings[SWITCH_INFO] + self.__switch_info = self.__settings.value[SWITCH_INFO] except Exception as ex: - LOGGER.error("Failed to parse settings: {}".format(ex)) - self._default_settings() #TODO: Remove when bug is fixed - self.__switch_info = self.__settings[SWITCH_INFO] + LOGGER.error("Failed to parse service settings: {}".format(ex)) + raise Exception(ex) assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" for switch_name, switch_info in self.__switch_info.items(): diff --git a/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py index efdac5fea..dd19c4f89 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py @@ -305,43 +305,15 @@ class P4FabricINTServiceHandler(_ServiceHandler): self.__settings = self.__settings_handler.get('/settings') LOGGER.info("{} with settings: {}".format(self.__service_label, self.__settings)) except Exception as ex: - self.__settings = {} - LOGGER.error("Failed to parse service settings: {}".format(ex)) - - def _default_settings(self): - switch_info = { - "p4-sw1": { - ARCH: TARGET_ARCH_V1MODEL, - DPID: 1, - MAC: "fa:16:3e:93:8c:c0", - IP: "10.10.10.120", - PORT_INT: { - PORT_ID: 3, - PORT_TYPE: "host" - }, - RECIRCULATION_PORT_LIST: RECIRCULATION_PORTS_V1MODEL, - INT_REPORT_MIRROR_ID_LIST: INT_REPORT_MIRROR_ID_LIST_V1MODEL - } - } - int_collector_info = { - MAC: "fa:16:3e:fb:cf:96", - IP: "10.10.10.41", - PORT: 32766, - VLAN_ID: 4094 - } - self.__settings = { - SWITCH_INFO: switch_info, - INT_COLLECTOR_INFO: int_collector_info - } + LOGGER.error("Failed to retrieve service settings: {}".format(ex)) + raise Exception(ex) def _parse_settings(self): - #TODO: Pass settings in a correct way try: - self.__switch_info = self.__settings[SWITCH_INFO] + self.__switch_info = self.__settings.value[SWITCH_INFO] except Exception as ex: - LOGGER.error("Failed to parse settings: {}".format(ex)) - self._default_settings() #TODO: Remove when bug is fixed - self.__switch_info = self.__settings[SWITCH_INFO] + LOGGER.error("Failed to parse service settings: {}".format(ex)) + raise Exception(ex) assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" for switch_name, switch_info in self.__switch_info.items(): @@ -364,7 +336,7 @@ class P4FabricINTServiceHandler(_ServiceHandler): switch_info[INT_REPORT_MIRROR_ID_LIST] = INT_REPORT_MIRROR_ID_LIST_V1MODEL assert isinstance(switch_info[RECIRCULATION_PORT_LIST], list), "Switch {} - Recirculation ports must be described as a list".format(switch_name) - self.__int_collector_info = self.__settings[INT_COLLECTOR_INFO] + self.__int_collector_info = self.__settings.value[INT_COLLECTOR_INFO] assert isinstance(self.__int_collector_info, dict), "INT collector info object must be a map with mac, ip, port, and vlan_id keys)" self.__int_collector_mac = self.__int_collector_info[MAC] diff --git a/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py index c25fb087c..8d4aaf081 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py @@ -318,69 +318,15 @@ class P4FabricL2SimpleServiceHandler(_ServiceHandler): self.__settings = self.__settings_handler.get('/settings') LOGGER.info("{} with settings: {}".format(self.__service_label, self.__settings)) except Exception as ex: - self.__settings = {} - LOGGER.error("Failed to parse service settings: {}".format(ex)) - - def _default_settings(self): - port_list = [ - { - PORT_ID: 1, - PORT_TYPE: "host", - VLAN_ID: 4094 - }, - { - PORT_ID: 2, - PORT_TYPE: "host", - VLAN_ID: 4094 - }, - ] - fwd_list = [ - { - PORT_ID: 1, - HOST_MAC: "fa:16:3e:75:9c:e5" - }, - { - PORT_ID: 2, - HOST_MAC: "fa:16:3e:e2:af:28" - } - ] - switch_info = { - "p4-sw1": { - ARCH: TARGET_ARCH_V1MODEL, - DPID: 1, - PORT_LIST: port_list, - FORWARDING_LIST: fwd_list - } - } - self.__settings = { - SWITCH_INFO: switch_info - } - - # port_map = { - # "p4-sw1": { - # "port-1": { - # PORT_ID: 1, - # PORT_TYPE: PORT_TYPE_HOST, - # VLAN_ID: 4094, - # FORWARDING_LIST: ["fa:16:3e:75:9c:e5"] - # }, - # "port-2": { - # PORT_ID: 2, - # PORT_TYPE: PORT_TYPE_HOST, - # VLAN_ID: 4094, - # FORWARDING_LIST: ["fa:16:3e:e2:af:28"] - # } - # } - # } + LOGGER.error("Failed to retrieve service settings: {}".format(ex)) + raise Exception(ex) def _parse_settings(self): - #TODO: Pass settings in a correct way try: - self.__switch_info = self.__settings[SWITCH_INFO] + self.__switch_info = self.__settings.value[SWITCH_INFO] except Exception as ex: - LOGGER.error("Failed to parse settings: {}".format(ex)) - self._default_settings() #TODO: Remove when bug is fixed - self.__switch_info = self.__settings[SWITCH_INFO] + LOGGER.error("Failed to parse service settings: {}".format(ex)) + raise Exception(ex) assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" for switch_name, switch_info in self.__switch_info.items(): diff --git a/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py index ed5dd25bd..4b013328e 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py @@ -316,85 +316,15 @@ class P4FabricL3ServiceHandler(_ServiceHandler): self.__settings = self.__settings_handler.get('/settings') LOGGER.info("{} with settings: {}".format(self.__service_label, self.__settings)) except Exception as ex: - self.__settings = {} - LOGGER.error("Failed to parse service settings: {}".format(ex)) - - def _default_settings(self): - port_list = [ - { - PORT_ID: 1, - PORT_TYPE: "host" - }, - { - PORT_ID: 2, - PORT_TYPE: "host" - }, - ] - routing_list = [ - { - PORT_ID: 1, - IPV4_DST: "10.158.72.11", - IPV4_PREFIX_LEN: 32, - MAC_SRC: "fa:16:3e:e2:af:28", - MAC_DST: "fa:16:3e:75:9c:e5" - }, - { - PORT_ID: 2, - IPV4_DST: "172.16.10.9", - IPV4_PREFIX_LEN: 32, - MAC_SRC: "fa:16:3e:75:9c:e5", - MAC_DST: "fa:16:3e:e2:af:28" - } - ] - switch_info = { - "p4-sw1": { - ARCH: TARGET_ARCH_V1MODEL, - DPID: 1, - PORT_LIST: port_list, - ROUTING_LIST: routing_list - } - } - self.__settings = { - SWITCH_INFO: switch_info - } - - # port_map = { - # "p4-sw1": { - # "port-1": { - # PORT_ID: 1, - # PORT_TYPE: PORT_TYPE_HOST, - # ROUTING_LIST: [ - # { - # IPV4_DST: "10.158.72.11", - # IPV4_PREFIX_LEN: 32, - # MAC_SRC: "fa:16:3e:e2:af:28", - # MAC_DST: "fa:16:3e:75:9c:e5" - # } - # ] - # }, - # "port-2": { - # PORT_ID: 2, - # PORT_TYPE: PORT_TYPE_HOST, - # ROUTING_LIST: [ - # { - # IPV4_DST: "172.16.10.9", - # IPV4_PREFIX_LEN: 32, - # MAC_SRC: "fa:16:3e:75:9c:e5", - # MAC_DST: "fa:16:3e:e2:af:28" - # } - # ] - # } - # } - # } + LOGGER.error("Failed to retrieve service settings: {}".format(ex)) + raise Exception(ex) def _parse_settings(self): - #TODO: Pass settings in a correct way try: - self.__switch_info = self.__settings[SWITCH_INFO] + self.__switch_info = self.__settings.value[SWITCH_INFO] except Exception as ex: - LOGGER.error("Failed to parse settings: {}".format(ex)) - self._default_settings() #TODO: Remove when bug is fixed - self.__switch_info = self.__settings[SWITCH_INFO] + LOGGER.error("Failed to parse service settings: {}".format(ex)) + raise Exception(ex) assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" for switch_name, switch_info in self.__switch_info.items(): diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-acl.json b/src/tests/p4-fabric-tna/descriptors/service-create-acl.json index a0383f472..2ec9c6674 100644 --- a/src/tests/p4-fabric-tna/descriptors/service-create-acl.json +++ b/src/tests/p4-fabric-tna/descriptors/service-create-acl.json @@ -9,11 +9,11 @@ "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, "service_endpoint_ids": [ { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"} }, { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"} } ], @@ -25,7 +25,7 @@ "resource_key": "/settings", "resource_value": { "switch_info": { - "p4-sw1": { + "sw1": { "arch": "v1model", "dpid": 1, "acl": [ diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-int.json b/src/tests/p4-fabric-tna/descriptors/service-create-int.json index 98956b959..785468f68 100644 --- a/src/tests/p4-fabric-tna/descriptors/service-create-int.json +++ b/src/tests/p4-fabric-tna/descriptors/service-create-int.json @@ -9,11 +9,11 @@ "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, "service_endpoint_ids": [ { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"} }, { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"} } ], @@ -25,11 +25,11 @@ "resource_key": "/settings", "resource_value": { "switch_info": { - "p4-sw1": { + "sw1": { "arch": "v1model", "dpid": 1, - "mac": "fa:16:3e:93:8c:c0", - "ip": "10.10.10.120", + "mac": "ee:ee:8c:6c:f3:2c", + "ip": "192.168.5.139", "int_port": { "port_id": 3, "port_type": "host" @@ -37,8 +37,8 @@ } }, "int_collector_info": { - "mac": "fa:16:3e:fb:cf:96", - "ip": "10.10.10.41", + "mac": "46:e4:58:c6:74:53", + "ip": "192.168.5.137", "port": 32766, "vlan_id": 4094 } diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json b/src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json index 5a659f3d9..05f53d7a6 100644 --- a/src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json +++ b/src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json @@ -9,11 +9,11 @@ "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, "service_endpoint_ids": [ { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"} }, { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"} } ], @@ -25,7 +25,7 @@ "resource_key": "/settings", "resource_value": { "switch_info": { - "p4-sw1": { + "sw1": { "arch": "v1model", "dpid": 1, "port_list": [ @@ -43,11 +43,11 @@ "fwd_list": [ { "port_id": 1, - "host_mac": "fa:16:3e:75:9c:e5" + "host_mac": "00:00:00:00:00:01" }, { "port_id": 2, - "host_mac": "fa:16:3e:e2:af:28" + "host_mac": "00:00:00:00:00:02" } ] } diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-l3.json b/src/tests/p4-fabric-tna/descriptors/service-create-l3.json index 7d8153e7a..4a016f255 100644 --- a/src/tests/p4-fabric-tna/descriptors/service-create-l3.json +++ b/src/tests/p4-fabric-tna/descriptors/service-create-l3.json @@ -9,11 +9,11 @@ "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, "service_endpoint_ids": [ { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"} }, { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"} } ], @@ -25,7 +25,7 @@ "resource_key": "/settings", "resource_value": { "switch_info": { - "p4-sw1": { + "sw1": { "arch": "v1model", "dpid": 1, "port_list": [ @@ -41,17 +41,17 @@ "routing_list": [ { "port_id": 1, - "ipv4_dst": "10.158.72.11", + "ipv4_dst": "10.0.0.1", "ipv4_prefix_len": 32, - "mac_src": "fa:16:3e:e2:af:28", - "mac_dst": "fa:16:3e:75:9c:e5" + "mac_src": "00:00:00:00:00:02", + "mac_dst": "00:00:00:00:00:01" }, { "port_id": 2, - "ipv4_dst": "172.16.10.9", + "ipv4_dst": "10.0.0.2", "ipv4_prefix_len": 32, - "mac_src": "fa:16:3e:75:9c:e5", - "mac_dst": "fa:16:3e:e2:af:28" + "mac_src": "00:00:00:00:00:01", + "mac_dst": "00:00:00:00:00:02" } ] } diff --git a/src/tests/p4-fabric-tna/descriptors/topology.json b/src/tests/p4-fabric-tna/descriptors/topology.json index 30e1f5e9a..908faaa7d 100644 --- a/src/tests/p4-fabric-tna/descriptors/topology.json +++ b/src/tests/p4-fabric-tna/descriptors/topology.json @@ -11,11 +11,11 @@ "device_id": {"device_uuid": {"uuid": "tfs-sdn-controller"}}, "name": "tfs-sdn-controller", "device_type": "teraflowsdn", - "device_drivers": ["DEVICEDRIVER_IETF_L3VPN"], + "device_drivers": ["DEVICEDRIVER_IETF_L2VPN"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.10.10.41"}}, - {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8002"}}, + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "192.168.5.137"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8003"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { "endpoints": [{"uuid": "mgmt", "name": "mgmt", "type": "mgmt-int"}], "scheme": "http", "username": "admin", "password": "admin", "import_topology": "topology" @@ -51,18 +51,18 @@ } }, { - "device_id": {"device_uuid": {"uuid": "p4-sw1"}}, + "device_id": {"device_uuid": {"uuid": "sw1"}}, "device_type": "p4-switch", "device_drivers": ["DEVICEDRIVER_P4"], "device_operational_status": "DEVICEOPERATIONALSTATUS_DISABLED", - "name": "p4-sw1", + "name": "sw1", "device_config": { "config_rules": [ - {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "10.10.10.120"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "192.168.5.139"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "50001"}}, {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { "id": 1, - "name": "p4-sw1", + "name": "sw1", "vendor": "Open Networking Foundation", "hw_ver": "BMv2 simple_switch", "sw_ver": "Stratum", @@ -81,32 +81,32 @@ ], "links": [ { - "link_id": {"link_uuid": {"uuid": "p4-sw1/1==edge-net/eth1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "1"}}, + "link_id": {"link_uuid": {"uuid": "sw1/1==edge-net/eth1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"}}, {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { - "link_id": {"link_uuid": {"uuid": "edge-net/eth1==p4-sw1/1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + "link_id": {"link_uuid": {"uuid": "edge-net/eth1==sw1/1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "1"}} + {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"}} ] }, { - "link_id": {"link_uuid": {"uuid": "p4-sw1/2==corporate-net/eth1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "2"}}, + "link_id": {"link_uuid": {"uuid": "sw1/2==corporate-net/eth1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"}}, {"device_id": {"device_uuid": {"uuid": "corporate-net"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { - "link_id": {"link_uuid": {"uuid": "corporate-net/eth1==p4-sw1/2"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + "link_id": {"link_uuid": {"uuid": "corporate-net/eth1==sw1/2"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "corporate-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "2"}} + {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"}} ] }, { - "link_id": {"link_uuid": {"uuid": "p4-sw1/3==tfs-sdn-controller/mgmt"}}, "link_type": "LINKTYPE_MANAGEMENT", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "p4-sw1"}}, "endpoint_uuid": {"uuid": "3"}}, + "link_id": {"link_uuid": {"uuid": "sw1/3==tfs-sdn-controller/mgmt"}}, "link_type": "LINKTYPE_MANAGEMENT", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "3"}}, {"device_id": {"device_uuid": {"uuid": "tfs-sdn-controller"}}, "endpoint_uuid": {"uuid": "mgmt"}} ] } diff --git a/src/tests/p4-fabric-tna/topology/p4-switch-three-port-chassis-config-phy.pb.txt b/src/tests/p4-fabric-tna/topology/p4-switch-three-port-chassis-config-phy.pb.txt index 038d36269..bc13f29d9 100644 --- a/src/tests/p4-fabric-tna/topology/p4-switch-three-port-chassis-config-phy.pb.txt +++ b/src/tests/p4-fabric-tna/topology/p4-switch-three-port-chassis-config-phy.pb.txt @@ -18,10 +18,11 @@ description: "Chassis configuration for a single Stratum bmv2 switch with 3 ports" chassis { platform: PLT_P4_SOFT_SWITCH - name: "bmv2-switch" + name: "sw1" } nodes { id: 1 + name: "sw1 node 1" slot: 1 index: 1 } -- GitLab From 08533d97d5d59cc97765777fce9d85dc3b59b5cd Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Thu, 8 May 2025 12:25:17 +0300 Subject: [PATCH 455/463] fix: service types order in proto --- proto/context.proto | 12 ++++++------ src/common/tools/object_factory/Service.py | 2 +- .../p4-fwd-l1/tests/topologies/6switchObjects.py | 14 ++------------ 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/proto/context.proto b/proto/context.proto index 0f2c8011f..525997847 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -321,12 +321,12 @@ enum ServiceTypeEnum { SERVICETYPE_UNKNOWN = 0; SERVICETYPE_L3NM = 1; SERVICETYPE_L2NM = 2; - SERVICETYPE_L1NM = 3; - SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 4; - SERVICETYPE_TE = 5; - SERVICETYPE_E2E = 6; - SERVICETYPE_OPTICAL_CONNECTIVITY = 7; - SERVICETYPE_QKD = 8; + SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; + SERVICETYPE_TE = 4; + SERVICETYPE_E2E = 5; + SERVICETYPE_OPTICAL_CONNECTIVITY = 6; + SERVICETYPE_QKD = 7; + SERVICETYPE_L1NM = 8; SERVICETYPE_INT = 9; SERVICETYPE_ACL = 10; } diff --git a/src/common/tools/object_factory/Service.py b/src/common/tools/object_factory/Service.py index 74c183230..0d039ac35 100644 --- a/src/common/tools/object_factory/Service.py +++ b/src/common/tools/object_factory/Service.py @@ -90,6 +90,6 @@ def json_service_p4_planned( ): return json_service( - service_uuid, ServiceTypeEnum.SERVICETYPE_L2NM, context_id=json_context_id(context_uuid), + service_uuid, ServiceTypeEnum.SERVICETYPE_L1NM, context_id=json_context_id(context_uuid), status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints, config_rules=config_rules) \ No newline at end of file diff --git a/src/tests/p4-fwd-l1/tests/topologies/6switchObjects.py b/src/tests/p4-fwd-l1/tests/topologies/6switchObjects.py index 522066bb0..69a68a569 100644 --- a/src/tests/p4-fwd-l1/tests/topologies/6switchObjects.py +++ b/src/tests/p4-fwd-l1/tests/topologies/6switchObjects.py @@ -312,12 +312,6 @@ LINK_SW5_SW6 = json_link(LINK_SW5_SW6_UUID, [ENDPOINT_ID_SW5_2, E # ----- Service ---------------------------------------------------------------------------------------------------------- -#SERVICE_SW1_UUID = get_service_uuid(ENDPOINT_ID_SW1_1, ENDPOINT_ID_SW1_2) -#SERVICE_SW1 = json_service_p4_planned(SERVICE_SW1_UUID) - -#SERVICE_SW2_UUID = get_service_uuid(ENDPOINT_ID_SW2_1, ENDPOINT_ID_SW2_2) -#SERVICE_SW2 = json_service_p4_planned(SERVICE_SW2_UUID) - SERVICE_SW1_SW6_UUID = get_service_uuid(ENDPOINT_ID_SW1_3, ENDPOINT_ID_SW6_3) SERVICE_SW1_SW6 = json_service_p4_planned(SERVICE_SW1_SW6_UUID) SERVICE_SW1_SW6_ENDPOINT_IDS = [DEVICE_SW1_ENDPOINT_IDS[2], DEVICE_SW6_ENDPOINT_IDS[2]] @@ -345,10 +339,6 @@ LINKS = [ LINK_SW4_SW6, LINK_SW5_SW6 - ] - -#SERVICES = [(SERVICE_SW1, DEVICE_SW1_ENDPOINT_IDS), (SERVICE_SW2, DEVICE_SW2_ENDPOINT_IDS)] - -#SERVICE_SW1_SW2_ENDPOINT_IDS = DEVICE_SW1_ENDPOINT_IDS + DEVICE_SW2_ENDPOINT_IDS + ] -SERVICES = [(SERVICE_SW1_SW6, SERVICE_SW1_SW6_ENDPOINT_IDS)] \ No newline at end of file +SERVICES = [(SERVICE_SW1_SW6, SERVICE_SW1_SW6_ENDPOINT_IDS)] -- GitLab From 42c4f12e6ffc5ef8c50ea43ba3af27a6082eb42c Mon Sep 17 00:00:00 2001 From: hajipour Date: Thu, 8 May 2025 13:38:04 +0200 Subject: [PATCH 456/463] fix: all acl config rules associated to device and uuid of the ACL rule are removed upon delete request --- src/nbi/service/ietf_acl/Acl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nbi/service/ietf_acl/Acl.py b/src/nbi/service/ietf_acl/Acl.py index b17ad1165..076264ecf 100644 --- a/src/nbi/service/ietf_acl/Acl.py +++ b/src/nbi/service/ietf_acl/Acl.py @@ -64,8 +64,8 @@ class Acl(Resource): _config_rule.CopyFrom(config_rule) _config_rule.action = ConfigActionEnum.CONFIGACTION_DELETE delete_config_rules.append(_config_rule) - break - else: + + if not delete_config_rules: raise NotFound('Acl({:s}) not found in Device({:s})'.format(str(acl_name), str(device_uuid))) device_client = DeviceClient() -- GitLab From 15d0c11f03e3cb1e9933775dde5f022eb6fa5885 Mon Sep 17 00:00:00 2001 From: golderos Date: Fri, 9 May 2025 13:06:32 +0000 Subject: [PATCH 457/463] QKD app component: - Corrected DB name in manifest --- manifests/qkd_appservice.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/qkd_appservice.yaml b/manifests/qkd_appservice.yaml index 49ee65710..bfdf3e24e 100644 --- a/manifests/qkd_appservice.yaml +++ b/manifests/qkd_appservice.yaml @@ -38,7 +38,7 @@ spec: - name: LOG_LEVEL value: "INFO" - name: CRDB_DATABASE - value: "qkd_app" + value: "tfs_qkd_app" envFrom: - secretRef: name: crdb-data -- GitLab From df5542d36092851b4961b8513c5e035252a6056f Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Tue, 13 May 2025 09:14:23 +0300 Subject: [PATCH 458/463] fix: naming and logging in fabric-tna test --- src/common/tools/descriptor/Tools.py | 2 +- .../p4_fabric_tna_acl_service_handler.py | 12 +++--- .../p4_fabric_tna_int_service_handler.py | 10 +++-- ...p4_fabric_tna_l2_simple_service_handler.py | 12 +++--- .../p4_fabric_tna_l3_service_handler.py | 12 +++--- ...son => sbi-rules-insert-routing-east.json} | 0 ...son => sbi-rules-insert-routing-west.json} | 0 ...ce-create-acl.json => service-p4-acl.json} | 0 ...ce-create-int.json => service-p4-int.json} | 6 +-- ...-simple.json => service-p4-l2-simple.json} | 0 ...vice-create-l3.json => service-p4-l3.json} | 0 .../p4-fabric-tna/descriptors/topology.json | 31 +++++++------ .../test_functional_sbi_rules_deprovision.py | 20 +++++++-- .../test_functional_sbi_rules_provision.py | 43 +++++++++++++------ ...test_functional_service_deprovision_acl.py | 11 ++++- ...test_functional_service_deprovision_int.py | 11 ++++- .../test_functional_service_deprovision_l2.py | 11 ++++- .../test_functional_service_deprovision_l3.py | 11 ++++- .../test_functional_service_provision_acl.py | 13 +++++- .../test_functional_service_provision_int.py | 13 +++++- .../test_functional_service_provision_l2.py | 13 +++++- .../test_functional_service_provision_l3.py | 13 +++++- .../tests-setup/test_functional_bootstrap.py | 2 +- .../tests-setup/test_functional_cleanup.py | 2 +- .../tests-setup/test_functional_purge.py | 9 ++-- src/tests/tools/test_tools_p4.py | 32 +++++++------- 26 files changed, 202 insertions(+), 87 deletions(-) rename src/tests/p4-fabric-tna/descriptors/{sbi-rules-insert-routing-corp.json => sbi-rules-insert-routing-east.json} (100%) rename src/tests/p4-fabric-tna/descriptors/{sbi-rules-insert-routing-edge.json => sbi-rules-insert-routing-west.json} (100%) rename src/tests/p4-fabric-tna/descriptors/{service-create-acl.json => service-p4-acl.json} (100%) rename src/tests/p4-fabric-tna/descriptors/{service-create-int.json => service-p4-int.json} (91%) rename src/tests/p4-fabric-tna/descriptors/{service-create-l2-simple.json => service-p4-l2-simple.json} (100%) rename src/tests/p4-fabric-tna/descriptors/{service-create-l3.json => service-p4-l3.json} (100%) diff --git a/src/common/tools/descriptor/Tools.py b/src/common/tools/descriptor/Tools.py index 07bc18d31..361ddbc9f 100644 --- a/src/common/tools/descriptor/Tools.py +++ b/src/common/tools/descriptor/Tools.py @@ -148,7 +148,7 @@ def split_links_by_type(links : List[Dict]) -> Dict[str, List[Dict]]: raise Exception(MSG.format(str(link))) link_type = LinkTypeEnum.Value(str_link_type) - if link_type in {LinkTypeEnum.LINKTYPE_UNKNOWN, LinkTypeEnum.LINKTYPE_COPPER, LinkTypeEnum.LINKTYPE_RADIO}: + if link_type in {LinkTypeEnum.LINKTYPE_UNKNOWN, LinkTypeEnum.LINKTYPE_COPPER, LinkTypeEnum.LINKTYPE_RADIO, LinkTypeEnum.LINKTYPE_MANAGEMENT}: typed_links['normal'].append(link) elif link_type in {LinkTypeEnum.LINKTYPE_FIBER}: typed_links['optical'].append(link) diff --git a/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py index b57086a29..510b59ebb 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py @@ -140,8 +140,9 @@ class P4FabricACLServiceHandler(_ServiceHandler): # You should no longer visit this device port again visited.add(dev_port_key) - LOGGER.info("Installed {}/{} ACL rules on device {} and port {}".format( - applied_rules, actual_rules, device_name, port_id)) + if applied_rules > 0: + LOGGER.info("Installed {}/{} ACL rules on device {} and port {}".format( + applied_rules, actual_rules, device_name, port_id)) return results @@ -214,7 +215,7 @@ class P4FabricACLServiceHandler(_ServiceHandler): json_config_rules=rules ) except Exception as ex: - LOGGER.error("Failed to insert ACL rules on device {} due to {}".format(device.name, ex)) + LOGGER.error("Failed to delete ACL rules from device {} due to {}".format(device.name, ex)) finally: rules.clear() @@ -225,8 +226,9 @@ class P4FabricACLServiceHandler(_ServiceHandler): # You should no longer visit this device port again visited.add(dev_port_key) - LOGGER.info("Deleted {}/{} ACL rules from device {} and port {}".format( - applied_rules, actual_rules, device_name, port_id)) + if applied_rules > 0: + LOGGER.info("Deleted {}/{} ACL rules from device {} and port {}".format( + applied_rules, actual_rules, device_name, port_id)) return results diff --git a/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py index dd19c4f89..c5ecdd682 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py @@ -126,8 +126,9 @@ class P4FabricINTServiceHandler(_ServiceHandler): # You should no longer visit this device again visited.add(device.name) - LOGGER.info("Installed {}/{} INT rules on device {}".format( - applied_rules, actual_rules, device.name)) + if applied_rules > 0: + LOGGER.info("Installed {}/{} INT rules on device {}".format( + applied_rules, actual_rules, device.name)) return results @@ -191,8 +192,9 @@ class P4FabricINTServiceHandler(_ServiceHandler): # You should no longer visit this device again visited.add(device.name) - LOGGER.info("Deleted {}/{} INT rules from device {}".format( - applied_rules, actual_rules, device.name)) + if applied_rules > 0: + LOGGER.info("Deleted {}/{} INT rules from device {}".format( + applied_rules, actual_rules, device.name)) return results diff --git a/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py index 8d4aaf081..c24bdc880 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py @@ -131,8 +131,9 @@ class P4FabricL2SimpleServiceHandler(_ServiceHandler): # You should no longer visit this device port again visited.add(dev_port_key) - LOGGER.info("Installed {}/{} L2 rules on device {} and port {}".format( - applied_rules, actual_rules, device_name, port_id)) + if applied_rules > 0: + LOGGER.info("Installed {}/{} L2 rules on device {} and port {}".format( + applied_rules, actual_rules, device_name, port_id)) return results @@ -197,7 +198,7 @@ class P4FabricL2SimpleServiceHandler(_ServiceHandler): json_config_rules=rules ) except Exception as ex: - LOGGER.error("Failed to insert L2 rules on device {} due to {}".format(device.name, ex)) + LOGGER.error("Failed to delete L2 rules from device {} due to {}".format(device.name, ex)) finally: rules.clear() @@ -208,8 +209,9 @@ class P4FabricL2SimpleServiceHandler(_ServiceHandler): # You should no longer visit this device port again visited.add(dev_port_key) - LOGGER.info("Deleted {}/{} L2 rules from device {} and port {}".format( - applied_rules, actual_rules, device_name, port_id)) + if applied_rules > 0: + LOGGER.info("Deleted {}/{} L2 rules from device {} and port {}".format( + applied_rules, actual_rules, device_name, port_id)) return results diff --git a/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py index 4b013328e..c97d38829 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py @@ -129,8 +129,9 @@ class P4FabricL3ServiceHandler(_ServiceHandler): # You should no longer visit this device port again visited.add(dev_port_key) - LOGGER.info("Installed {}/{} L3 rules on device {} and port {}".format( - applied_rules, actual_rules, device_name, port_id)) + if applied_rules > 0: + LOGGER.info("Installed {}/{} L3 rules on device {} and port {}".format( + applied_rules, actual_rules, device_name, port_id)) return results @@ -195,7 +196,7 @@ class P4FabricL3ServiceHandler(_ServiceHandler): json_config_rules=rules ) except Exception as ex: - LOGGER.error("Failed to insert L3 rules on device {} due to {}".format(device.name, ex)) + LOGGER.error("Failed to delete L3 rules from device {} due to {}".format(device.name, ex)) finally: rules.clear() @@ -206,8 +207,9 @@ class P4FabricL3ServiceHandler(_ServiceHandler): # You should no longer visit this device port again visited.add(dev_port_key) - LOGGER.info("Deleted {}/{} L3 rules from device {} and port {}".format( - applied_rules, actual_rules, device_name, port_id)) + if applied_rules > 0: + LOGGER.info("Deleted {}/{} L3 rules from device {} and port {}".format( + applied_rules, actual_rules, device_name, port_id)) return results diff --git a/src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-routing-corp.json b/src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-routing-east.json similarity index 100% rename from src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-routing-corp.json rename to src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-routing-east.json diff --git a/src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-routing-edge.json b/src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-routing-west.json similarity index 100% rename from src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-routing-edge.json rename to src/tests/p4-fabric-tna/descriptors/sbi-rules-insert-routing-west.json diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-acl.json b/src/tests/p4-fabric-tna/descriptors/service-p4-acl.json similarity index 100% rename from src/tests/p4-fabric-tna/descriptors/service-create-acl.json rename to src/tests/p4-fabric-tna/descriptors/service-p4-acl.json diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-int.json b/src/tests/p4-fabric-tna/descriptors/service-p4-int.json similarity index 91% rename from src/tests/p4-fabric-tna/descriptors/service-create-int.json rename to src/tests/p4-fabric-tna/descriptors/service-p4-int.json index 785468f68..7bffd72f1 100644 --- a/src/tests/p4-fabric-tna/descriptors/service-create-int.json +++ b/src/tests/p4-fabric-tna/descriptors/service-p4-int.json @@ -37,9 +37,9 @@ } }, "int_collector_info": { - "mac": "46:e4:58:c6:74:53", - "ip": "192.168.5.137", - "port": 32766, + "mac": "3e:87:de:3d:6d:33", + "ip": "192.168.5.131", + "port": 12345, "vlan_id": 4094 } } diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json b/src/tests/p4-fabric-tna/descriptors/service-p4-l2-simple.json similarity index 100% rename from src/tests/p4-fabric-tna/descriptors/service-create-l2-simple.json rename to src/tests/p4-fabric-tna/descriptors/service-p4-l2-simple.json diff --git a/src/tests/p4-fabric-tna/descriptors/service-create-l3.json b/src/tests/p4-fabric-tna/descriptors/service-p4-l3.json similarity index 100% rename from src/tests/p4-fabric-tna/descriptors/service-create-l3.json rename to src/tests/p4-fabric-tna/descriptors/service-p4-l3.json diff --git a/src/tests/p4-fabric-tna/descriptors/topology.json b/src/tests/p4-fabric-tna/descriptors/topology.json index 908faaa7d..619060e9e 100644 --- a/src/tests/p4-fabric-tna/descriptors/topology.json +++ b/src/tests/p4-fabric-tna/descriptors/topology.json @@ -10,20 +10,19 @@ { "device_id": {"device_uuid": {"uuid": "tfs-sdn-controller"}}, "name": "tfs-sdn-controller", - "device_type": "teraflowsdn", - "device_drivers": ["DEVICEDRIVER_IETF_L2VPN"], + "device_type": "ietf-slice", + "device_drivers": ["DEVICEDRIVER_IETF_SLICE"], "device_operational_status": "DEVICEOPERATIONALSTATUS_UNDEFINED", "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "192.168.5.137"}}, - {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8003"}}, + {"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": [{"uuid": "mgmt", "name": "mgmt", "type": "mgmt-int"}], - "scheme": "http", "username": "admin", "password": "admin", "import_topology": "topology" + "endpoints": [{"uuid": "mgmt", "name": "mgmt", "type": "mgmt-int"}] }}} ]} }, { - "device_id": {"device_uuid": {"uuid": "edge-net"}}, + "device_id": {"device_uuid": {"uuid": "west-net"}}, "device_type": "network", "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_config": { @@ -37,7 +36,7 @@ } }, { - "device_id": {"device_uuid": {"uuid": "corporate-net"}}, + "device_id": {"device_uuid": {"uuid": "east-net"}}, "device_type": "network", "device_drivers": ["DEVICEDRIVER_UNDEFINED"], "device_config": { @@ -81,26 +80,26 @@ ], "links": [ { - "link_id": {"link_uuid": {"uuid": "sw1/1==edge-net/eth1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + "link_id": {"link_uuid": {"uuid": "sw1/1==west-net/eth1"}}, "link_type": "LINKTYPE_COPPER", "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"}}, - {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}} + {"device_id": {"device_uuid": {"uuid": "west-net"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { - "link_id": {"link_uuid": {"uuid": "edge-net/eth1==sw1/1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, + "link_id": {"link_uuid": {"uuid": "west-net/eth1==sw1/1"}}, "link_type": "LINKTYPE_COPPER", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "west-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "1"}} ] }, { - "link_id": {"link_uuid": {"uuid": "sw1/2==corporate-net/eth1"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ + "link_id": {"link_uuid": {"uuid": "sw1/2==east-net/eth1"}}, "link_type": "LINKTYPE_COPPER", "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"}}, - {"device_id": {"device_uuid": {"uuid": "corporate-net"}}, "endpoint_uuid": {"uuid": "eth1"}} + {"device_id": {"device_uuid": {"uuid": "east-net"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { - "link_id": {"link_uuid": {"uuid": "corporate-net/eth1==sw1/2"}}, "link_type": "LINKTYPE_VIRTUAL", "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "corporate-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, + "link_id": {"link_uuid": {"uuid": "east-net/eth1==sw1/2"}}, "link_type": "LINKTYPE_COPPER", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "east-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, {"device_id": {"device_uuid": {"uuid": "sw1"}}, "endpoint_uuid": {"uuid": "2"}} ] }, diff --git a/src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_deprovision.py b/src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_deprovision.py index 6d5f7dfd2..f9b09ebd6 100644 --- a/src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_deprovision.py +++ b/src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_deprovision.py @@ -18,7 +18,21 @@ from common.tools.grpc.Tools import grpc_message_to_json_string from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from tests.Fixtures import context_client, device_client # pylint: disable=unused-import -from tests.tools.test_tools_p4 import * +from tests.tools.test_tools_p4 import ( + ADMIN_CONTEXT_ID, + DESC_FILE_RULES_DELETE_ALL, + DEV_NB, + CONNECTION_RULES, + ENDPOINT_RULES, + DATAPLANE_RULES_NB_INT_B1, + DATAPLANE_RULES_NB_INT_B2, + DATAPLANE_RULES_NB_INT_B3, + DATAPLANE_RULES_NB_RT_WEST, + DATAPLANE_RULES_NB_RT_EAST, + DATAPLANE_RULES_NB_ACL, + DATAPLANE_RULES_NB_TOT, + verify_number_of_rules +) LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -60,8 +74,8 @@ def test_rules_before_removal( DATAPLANE_RULES_NB_INT_B1 + \ DATAPLANE_RULES_NB_INT_B2 + \ DATAPLANE_RULES_NB_INT_B3 + \ - DATAPLANE_RULES_NB_RT_EDGE + \ - DATAPLANE_RULES_NB_RT_CORP + \ + DATAPLANE_RULES_NB_RT_WEST + \ + DATAPLANE_RULES_NB_RT_EAST + \ DATAPLANE_RULES_NB_ACL assert desired_rules_nb == CONNECTION_RULES + ENDPOINT_RULES + DATAPLANE_RULES_NB_TOT verify_number_of_rules(response.devices, desired_rules_nb) diff --git a/src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_provision.py b/src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_provision.py index 49d9aba4d..afb7a6df3 100644 --- a/src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_provision.py +++ b/src/tests/p4-fabric-tna/tests-sbi/test_functional_sbi_rules_provision.py @@ -18,7 +18,26 @@ from common.tools.grpc.Tools import grpc_message_to_json_string from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from tests.Fixtures import context_client, device_client # pylint: disable=unused-import -from tests.tools.test_tools_p4 import * +from tests.tools.test_tools_p4 import ( + ADMIN_CONTEXT_ID, + DESC_FILE_RULES_INSERT_INT_B1, + DESC_FILE_RULES_INSERT_INT_B2, + DESC_FILE_RULES_INSERT_INT_B3, + DESC_FILE_RULES_INSERT_ROUTING_WEST, + DESC_FILE_RULES_INSERT_ROUTING_EAST, + DESC_FILE_RULES_INSERT_ACL, + DEV_NB, + CONNECTION_RULES, + ENDPOINT_RULES, + DATAPLANE_RULES_NB_INT_B1, + DATAPLANE_RULES_NB_INT_B2, + DATAPLANE_RULES_NB_INT_B3, + DATAPLANE_RULES_NB_RT_WEST, + DATAPLANE_RULES_NB_RT_EAST, + DATAPLANE_RULES_NB_ACL, + DATAPLANE_RULES_NB_TOT, + verify_number_of_rules +) LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -143,18 +162,18 @@ def test_rules_after_insertion_int_batch_3( DATAPLANE_RULES_NB_INT_B3 verify_number_of_rules(response.devices, desired_rules_nb) -def test_rules_insertion_routing_edge_batch_4( +def test_rules_insertion_routing_west_batch_4( context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient # pylint: disable=redefined-outer-name ) -> None: # Load routing edge batch 4 rules for insertion descriptor_loader = DescriptorLoader( - descriptors_file=DESC_FILE_RULES_INSERT_ROUTING_EDGE, context_client=context_client, device_client=device_client + descriptors_file=DESC_FILE_RULES_INSERT_ROUTING_WEST, context_client=context_client, device_client=device_client ) results = descriptor_loader.process() check_descriptor_load_results(results, descriptor_loader) -def test_rules_after_insertion_routing_edge_batch_4( +def test_rules_after_insertion_routing_west_batch_4( context_client : ContextClient # pylint: disable=redefined-outer-name ) -> None: # State **after** inserting batch 4 of routing edge rules @@ -170,21 +189,21 @@ def test_rules_after_insertion_routing_edge_batch_4( DATAPLANE_RULES_NB_INT_B1 + \ DATAPLANE_RULES_NB_INT_B2 + \ DATAPLANE_RULES_NB_INT_B3 + \ - DATAPLANE_RULES_NB_RT_EDGE + DATAPLANE_RULES_NB_RT_WEST verify_number_of_rules(response.devices, desired_rules_nb) -def test_rules_insertion_routing_corp_batch_5( +def test_rules_insertion_routing_east_batch_5( context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient # pylint: disable=redefined-outer-name ) -> None: # Load routing corp batch 5 rules for insertion descriptor_loader = DescriptorLoader( - descriptors_file=DESC_FILE_RULES_INSERT_ROUTING_CORP, context_client=context_client, device_client=device_client + descriptors_file=DESC_FILE_RULES_INSERT_ROUTING_EAST, context_client=context_client, device_client=device_client ) results = descriptor_loader.process() check_descriptor_load_results(results, descriptor_loader) -def test_rules_after_insertion_routing_corp_batch_5( +def test_rules_after_insertion_routing_east_batch_5( context_client : ContextClient # pylint: disable=redefined-outer-name ) -> None: # State **after** inserting batch 5 of routing corp rules @@ -200,8 +219,8 @@ def test_rules_after_insertion_routing_corp_batch_5( DATAPLANE_RULES_NB_INT_B1 + \ DATAPLANE_RULES_NB_INT_B2 + \ DATAPLANE_RULES_NB_INT_B3 + \ - DATAPLANE_RULES_NB_RT_EDGE + \ - DATAPLANE_RULES_NB_RT_CORP + DATAPLANE_RULES_NB_RT_WEST + \ + DATAPLANE_RULES_NB_RT_EAST verify_number_of_rules(response.devices, desired_rules_nb) def test_rules_insertion_acl_batch_6( @@ -231,8 +250,8 @@ def test_rules_after_insertion_acl_batch_6( DATAPLANE_RULES_NB_INT_B1 + \ DATAPLANE_RULES_NB_INT_B2 + \ DATAPLANE_RULES_NB_INT_B3 + \ - DATAPLANE_RULES_NB_RT_EDGE + \ - DATAPLANE_RULES_NB_RT_CORP + \ + DATAPLANE_RULES_NB_RT_WEST + \ + DATAPLANE_RULES_NB_RT_EAST + \ DATAPLANE_RULES_NB_ACL assert desired_rules_nb == CONNECTION_RULES + ENDPOINT_RULES + DATAPLANE_RULES_NB_TOT verify_number_of_rules(response.devices, desired_rules_nb) diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_acl.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_acl.py index fcecbd2c7..a93691c46 100644 --- a/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_acl.py +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_acl.py @@ -15,11 +15,20 @@ import logging from common.proto.context_pb2 import ServiceId, ServiceStatusEnum, ServiceTypeEnum from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id from common.tools.object_factory.Service import json_service_id from context.client.ContextClient import ContextClient from service.client.ServiceClient import ServiceClient from tests.Fixtures import context_client, service_client # pylint: disable=unused-import -from tests.tools.test_tools_p4 import * +from tests.tools.test_tools_p4 import ( + ADMIN_CONTEXT_ID, + DEV_NB, + P4_DEV_NB, + ACL_RULES, + identify_number_of_p4_devices, + get_number_of_rules, + verify_active_service_type +) LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_int.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_int.py index f29f6b17c..cee498c8f 100644 --- a/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_int.py +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_int.py @@ -15,11 +15,20 @@ import logging from common.proto.context_pb2 import ServiceId, ServiceStatusEnum, ServiceTypeEnum from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id from common.tools.object_factory.Service import json_service_id from context.client.ContextClient import ContextClient from service.client.ServiceClient import ServiceClient from tests.Fixtures import context_client, service_client # pylint: disable=unused-import -from tests.tools.test_tools_p4 import * +from tests.tools.test_tools_p4 import ( + ADMIN_CONTEXT_ID, + DEV_NB, + P4_DEV_NB, + INT_RULES, + identify_number_of_p4_devices, + get_number_of_rules, + verify_active_service_type +) LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l2.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l2.py index 87ef21285..dfbd57865 100644 --- a/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l2.py +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l2.py @@ -15,11 +15,20 @@ import logging from common.proto.context_pb2 import ServiceId, ServiceStatusEnum, ServiceTypeEnum from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id from common.tools.object_factory.Service import json_service_id from context.client.ContextClient import ContextClient from service.client.ServiceClient import ServiceClient from tests.Fixtures import context_client, service_client # pylint: disable=unused-import -from tests.tools.test_tools_p4 import * +from tests.tools.test_tools_p4 import ( + ADMIN_CONTEXT_ID, + DEV_NB, + P4_DEV_NB, + L2_RULES, + identify_number_of_p4_devices, + get_number_of_rules, + verify_active_service_type +) LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l3.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l3.py index d349a0874..e5f804ce0 100644 --- a/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l3.py +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_deprovision_l3.py @@ -15,11 +15,20 @@ import logging from common.proto.context_pb2 import ServiceId, ServiceStatusEnum, ServiceTypeEnum from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id from common.tools.object_factory.Service import json_service_id from context.client.ContextClient import ContextClient from service.client.ServiceClient import ServiceClient from tests.Fixtures import context_client, service_client # pylint: disable=unused-import -from tests.tools.test_tools_p4 import * +from tests.tools.test_tools_p4 import ( + ADMIN_CONTEXT_ID, + DEV_NB, + P4_DEV_NB, + L3_RULES, + identify_number_of_p4_devices, + get_number_of_rules, + verify_active_service_type +) LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_acl.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_acl.py index 58de046b4..5593e093c 100644 --- a/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_acl.py +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_acl.py @@ -20,7 +20,16 @@ from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient from tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import -from tests.tools.test_tools_p4 import * +from tests.tools.test_tools_p4 import ( + ADMIN_CONTEXT_ID, + DESC_FILE_SERVICE_P4_ACL, + DEV_NB, + P4_DEV_NB, + ACL_RULES, + identify_number_of_p4_devices, + get_number_of_rules, + verify_active_service_type +) LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -51,7 +60,7 @@ def test_service_creation_acl( # Load service descriptor_loader = DescriptorLoader( - descriptors_file=DESC_FILE_SERVICE_CREATE_ACL, + descriptors_file=DESC_FILE_SERVICE_P4_ACL, context_client=context_client, device_client=device_client, service_client=service_client ) results = descriptor_loader.process() diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_int.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_int.py index 7a875c66a..7f1453dd9 100644 --- a/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_int.py +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_int.py @@ -20,7 +20,16 @@ from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient from tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import -from tests.tools.test_tools_p4 import * +from tests.tools.test_tools_p4 import ( + ADMIN_CONTEXT_ID, + DESC_FILE_SERVICE_P4_INT, + DEV_NB, + P4_DEV_NB, + INT_RULES, + identify_number_of_p4_devices, + get_number_of_rules, + verify_active_service_type +) LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -51,7 +60,7 @@ def test_service_creation_int( # Load service descriptor_loader = DescriptorLoader( - descriptors_file=DESC_FILE_SERVICE_CREATE_INT, + descriptors_file=DESC_FILE_SERVICE_P4_INT, context_client=context_client, device_client=device_client, service_client=service_client ) results = descriptor_loader.process() diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l2.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l2.py index a42c05546..4786cb324 100644 --- a/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l2.py +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l2.py @@ -20,7 +20,16 @@ from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient from tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import -from tests.tools.test_tools_p4 import * +from tests.tools.test_tools_p4 import ( + ADMIN_CONTEXT_ID, + DESC_FILE_SERVICE_P4_L2_SIMPLE, + DEV_NB, + P4_DEV_NB, + L2_RULES, + identify_number_of_p4_devices, + get_number_of_rules, + verify_active_service_type +) LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -51,7 +60,7 @@ def test_service_creation_l2( # Load service descriptor_loader = DescriptorLoader( - descriptors_file=DESC_FILE_SERVICE_CREATE_L2_SIMPLE, + descriptors_file=DESC_FILE_SERVICE_P4_L2_SIMPLE, context_client=context_client, device_client=device_client, service_client=service_client ) results = descriptor_loader.process() diff --git a/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l3.py b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l3.py index 9c0009b14..8c480ce83 100644 --- a/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l3.py +++ b/src/tests/p4-fabric-tna/tests-service/test_functional_service_provision_l3.py @@ -20,7 +20,16 @@ from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient from tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import -from tests.tools.test_tools_p4 import * +from tests.tools.test_tools_p4 import ( + ADMIN_CONTEXT_ID, + DESC_FILE_SERVICE_P4_L3, + DEV_NB, + P4_DEV_NB, + L3_RULES, + identify_number_of_p4_devices, + get_number_of_rules, + verify_active_service_type +) LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -51,7 +60,7 @@ def test_service_creation_l3( # Load service descriptor_loader = DescriptorLoader( - descriptors_file=DESC_FILE_SERVICE_CREATE_L3, + descriptors_file=DESC_FILE_SERVICE_P4_L3, context_client=context_client, device_client=device_client, service_client=service_client ) results = descriptor_loader.process() diff --git a/src/tests/p4-fabric-tna/tests-setup/test_functional_bootstrap.py b/src/tests/p4-fabric-tna/tests-setup/test_functional_bootstrap.py index 2f9130ad0..fb06a659e 100644 --- a/src/tests/p4-fabric-tna/tests-setup/test_functional_bootstrap.py +++ b/src/tests/p4-fabric-tna/tests-setup/test_functional_bootstrap.py @@ -19,7 +19,7 @@ from common.tools.descriptor.Loader import DescriptorLoader, \ from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from tests.Fixtures import context_client, device_client # pylint: disable=unused-import -from tests.tools.test_tools_p4 import * +from tests.tools.test_tools_p4 import ADMIN_CONTEXT_ID, DESC_TOPO LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/tests/p4-fabric-tna/tests-setup/test_functional_cleanup.py b/src/tests/p4-fabric-tna/tests-setup/test_functional_cleanup.py index 4d98c9e05..eff11b3c2 100644 --- a/src/tests/p4-fabric-tna/tests-setup/test_functional_cleanup.py +++ b/src/tests/p4-fabric-tna/tests-setup/test_functional_cleanup.py @@ -17,7 +17,7 @@ from common.tools.descriptor.Loader import DescriptorLoader, validate_empty_scen from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from tests.Fixtures import context_client, device_client # pylint: disable=unused-import -from tests.tools.test_tools_p4 import * +from tests.tools.test_tools_p4 import ADMIN_CONTEXT_ID, DESC_TOPO LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/tests/p4-fabric-tna/tests-setup/test_functional_purge.py b/src/tests/p4-fabric-tna/tests-setup/test_functional_purge.py index ba37fbd89..f9baeaf97 100644 --- a/src/tests/p4-fabric-tna/tests-setup/test_functional_purge.py +++ b/src/tests/p4-fabric-tna/tests-setup/test_functional_purge.py @@ -15,12 +15,14 @@ import logging from common.proto.context_pb2 import ServiceId, DeviceId, LinkId, ServiceStatusEnum, ServiceTypeEnum from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.Service import json_service_id from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient from tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import -from tests.tools.test_tools_p4 import * +from tests.tools.test_tools_p4 import ADMIN_CONTEXT_ID LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -63,10 +65,11 @@ def test_clean_devices( LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) for device in response.devices: - device_id = device.device_id + device_uuid = device.device_id.device_uuid.uuid + device_json = json_device_id(device_uuid) # Delete device - device_client.DeleteDevice(DeviceId(**device_id)) + device_client.DeleteDevice(DeviceId(**device_json)) def test_clean_context( context_client : ContextClient # pylint: disable=redefined-outer-name diff --git a/src/tests/tools/test_tools_p4.py b/src/tests/tools/test_tools_p4.py index c68f35183..4e9c63734 100644 --- a/src/tests/tools/test_tools_p4.py +++ b/src/tests/tools/test_tools_p4.py @@ -35,15 +35,15 @@ ACL_RULES = 1 DATAPLANE_RULES_NB_INT_B1 = 5 DATAPLANE_RULES_NB_INT_B2 = 6 DATAPLANE_RULES_NB_INT_B3 = 8 -DATAPLANE_RULES_NB_RT_EDGE = 7 -DATAPLANE_RULES_NB_RT_CORP = 7 +DATAPLANE_RULES_NB_RT_WEST = 7 +DATAPLANE_RULES_NB_RT_EAST = 7 DATAPLANE_RULES_NB_ACL = 1 DATAPLANE_RULES_NB_TOT = \ DATAPLANE_RULES_NB_INT_B1 +\ DATAPLANE_RULES_NB_INT_B2 +\ DATAPLANE_RULES_NB_INT_B3 +\ - DATAPLANE_RULES_NB_RT_EDGE +\ - DATAPLANE_RULES_NB_RT_CORP +\ + DATAPLANE_RULES_NB_RT_WEST +\ + DATAPLANE_RULES_NB_RT_EAST +\ DATAPLANE_RULES_NB_ACL # Service-related variables @@ -75,12 +75,12 @@ DESC_FILE_RULES_INSERT_INT_B3 = os.path.join(TEST_PATH, 'sbi-rules-insert-int-b3 assert os.path.exists(DESC_FILE_RULES_INSERT_INT_B3),\ "Invalid path to the SD-Fabric INT SBI descriptor (batch #3)" -DESC_FILE_RULES_INSERT_ROUTING_EDGE = os.path.join(TEST_PATH, 'sbi-rules-insert-routing-edge.json') -assert os.path.exists(DESC_FILE_RULES_INSERT_ROUTING_EDGE),\ +DESC_FILE_RULES_INSERT_ROUTING_WEST = os.path.join(TEST_PATH, 'sbi-rules-insert-routing-west.json') +assert os.path.exists(DESC_FILE_RULES_INSERT_ROUTING_WEST),\ "Invalid path to the SD-Fabric routing SBI descriptor (domain1-side)" -DESC_FILE_RULES_INSERT_ROUTING_CORP = os.path.join(TEST_PATH, 'sbi-rules-insert-routing-corp.json') -assert os.path.exists(DESC_FILE_RULES_INSERT_ROUTING_CORP),\ +DESC_FILE_RULES_INSERT_ROUTING_EAST = os.path.join(TEST_PATH, 'sbi-rules-insert-routing-east.json') +assert os.path.exists(DESC_FILE_RULES_INSERT_ROUTING_EAST),\ "Invalid path to the SD-Fabric routing SBI descriptor (domain2-side)" DESC_FILE_RULES_INSERT_ACL = os.path.join(TEST_PATH, 'sbi-rules-insert-acl.json') @@ -92,20 +92,20 @@ assert os.path.exists(DESC_FILE_RULES_DELETE_ALL),\ "Invalid path to the SD-Fabric rule removal SBI descriptor" # Service descriptors -DESC_FILE_SERVICE_CREATE_INT = os.path.join(TEST_PATH, 'service-create-int.json') -assert os.path.exists(DESC_FILE_SERVICE_CREATE_INT),\ +DESC_FILE_SERVICE_P4_INT = os.path.join(TEST_PATH, 'service-p4-int.json') +assert os.path.exists(DESC_FILE_SERVICE_P4_INT),\ "Invalid path to the SD-Fabric INT service descriptor" -DESC_FILE_SERVICE_CREATE_L2_SIMPLE = os.path.join(TEST_PATH, 'service-create-l2-simple.json') -assert os.path.exists(DESC_FILE_SERVICE_CREATE_L2_SIMPLE),\ +DESC_FILE_SERVICE_P4_L2_SIMPLE = os.path.join(TEST_PATH, 'service-p4-l2-simple.json') +assert os.path.exists(DESC_FILE_SERVICE_P4_L2_SIMPLE),\ "Invalid path to the SD-Fabric L2 simple service descriptor" -DESC_FILE_SERVICE_CREATE_L3 = os.path.join(TEST_PATH, 'service-create-l3.json') -assert os.path.exists(DESC_FILE_SERVICE_CREATE_L3),\ +DESC_FILE_SERVICE_P4_L3 = os.path.join(TEST_PATH, 'service-p4-l3.json') +assert os.path.exists(DESC_FILE_SERVICE_P4_L3),\ "Invalid path to the SD-Fabric L3 service descriptor" -DESC_FILE_SERVICE_CREATE_ACL = os.path.join(TEST_PATH, 'service-create-acl.json') -assert os.path.exists(DESC_FILE_SERVICE_CREATE_ACL),\ +DESC_FILE_SERVICE_P4_ACL = os.path.join(TEST_PATH, 'service-p4-acl.json') +assert os.path.exists(DESC_FILE_SERVICE_P4_ACL),\ "Invalid path to the SD-Fabric ACL service descriptor" def identify_number_of_p4_devices(devices) -> int: -- GitLab From c9d7737f4d87560795f6d44184adead4b9c99d51 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Tue, 13 May 2025 11:02:24 +0000 Subject: [PATCH 459/463] Update issue templates --- .gitlab/issue_templates/bug.md | 7 +++---- .gitlab/issue_templates/enhancement.md | 7 +++---- .gitlab/issue_templates/new-feature-with-design.md | 14 +++----------- .gitlab/issue_templates/new-feature.md | 7 +++---- 4 files changed, 12 insertions(+), 23 deletions(-) diff --git a/.gitlab/issue_templates/bug.md b/.gitlab/issue_templates/bug.md index 3e9f22f83..9fe80fef4 100644 --- a/.gitlab/issue_templates/bug.md +++ b/.gitlab/issue_templates/bug.md @@ -1,11 +1,9 @@ # Reporters - - name-of-proposer-1 (institution-of-proposer-1) - name-of-proposer-2 (institution-of-proposer-2) ... # Description - Describe the bug. If needed, Attach logs and reports to your bug. If needed, feel free to point external content as references (journal paper, Youtube video, etc.). @@ -15,7 +13,6 @@ If needed, feel free to point external content as references (journal paper, You - MicroK8s (include version and add-ons): - TeraFlowSDN (include release/branch-name/commit-id): - ## TFS deployment settings - list of components deployed - particular configurations you applied @@ -33,7 +30,9 @@ If needed, feel free to point external content as references (journal paper, You ## Expected behaviour - describe the expected behavior (if you know it) -# References +## Acknowledgements +This work is funded by through the project with . +# References 1. [Reference name](https://reference-url) 2. Author1, Author2, Author3, et. al., “My demo using feature,” in Conference-Name Demo Track, 20XX. diff --git a/.gitlab/issue_templates/enhancement.md b/.gitlab/issue_templates/enhancement.md index 06ea401cf..f84f6056c 100644 --- a/.gitlab/issue_templates/enhancement.md +++ b/.gitlab/issue_templates/enhancement.md @@ -1,20 +1,19 @@ # Proposers - - name-of-proposer-1 (institution-of-proposer-1) - name-of-proposer-2 (institution-of-proposer-2) ... # Description - Describe your proposal in ~1000 characters. You can reference external content listed in section "References" as [Ref-1]. # Demo or definition of done - Describe which high level conditions needs to be fulfilled to demonstrate this feature implementation is completed. You can reference external content (example, demo paper) listed in section "References" as [Ref-2]. -# References +## Acknowledgements +This work is funded by through the project with . +# References 1. [Reference name](https://reference-url) 2. Author1, Author2, Author3, et. al., “My demo using feature,” in Conference-Name Demo Track, 20XX. diff --git a/.gitlab/issue_templates/new-feature-with-design.md b/.gitlab/issue_templates/new-feature-with-design.md index b6ae943b6..2af263c8d 100644 --- a/.gitlab/issue_templates/new-feature-with-design.md +++ b/.gitlab/issue_templates/new-feature-with-design.md @@ -1,60 +1,52 @@ # Proposers - - name-of-proposer-1 (institution-of-proposer-1) - name-of-proposer-2 (institution-of-proposer-2) ... # Description - Describe your proposal in ~1000 characters. You can reference external content listed in section "References" as [Ref-1]. # Demo or definition of done - Describe which high level conditions needs to be fulfilled to demonstrate this feature implementation is completed. You can reference external content (example, demo paper) listed in section "References" as [Ref-2]. -# References +## Acknowledgements +This work is funded by through the project with . +# References 1. [Reference name](https://reference-url) 2. Author1, Author2, Author3, et. al., “My demo using feature,” in Conference-Name Demo Track, 20XX. # Feature Design (for New-Features) ## Clarifications to Expected Behavior Changes - Existing component logic and workflows between components that need to be altered to realize this feature. Remember to justify these changes. ... ## References - List of relevant references for this feature. ... ## Assumptions - Enumerate the assumptions for this feature, e.g., fix XXX is implemented and merged, specific configurations, specific components deployed. ... ## Impacted Components - List of impacted components: Context, Device, Service, PathComp, Slice, Monitoring, ZTP, Policy, NBI, etc. Just an enumeration, elaboration of impacts is done below. ## Component1 Impact - Describe impact (changes) on component1. ... ## Component2 Impact - Describe impact (changes) on component2. ... ## Testing - Describe test sets (unitary and integration) to be carried out. This section can include/reference external experiments, demo papers, etc. ... diff --git a/.gitlab/issue_templates/new-feature.md b/.gitlab/issue_templates/new-feature.md index 06ea401cf..f84f6056c 100644 --- a/.gitlab/issue_templates/new-feature.md +++ b/.gitlab/issue_templates/new-feature.md @@ -1,20 +1,19 @@ # Proposers - - name-of-proposer-1 (institution-of-proposer-1) - name-of-proposer-2 (institution-of-proposer-2) ... # Description - Describe your proposal in ~1000 characters. You can reference external content listed in section "References" as [Ref-1]. # Demo or definition of done - Describe which high level conditions needs to be fulfilled to demonstrate this feature implementation is completed. You can reference external content (example, demo paper) listed in section "References" as [Ref-2]. -# References +## Acknowledgements +This work is funded by through the project with . +# References 1. [Reference name](https://reference-url) 2. Author1, Author2, Author3, et. al., “My demo using feature,” in Conference-Name Demo Track, 20XX. -- GitLab From 18d2709e1b0ac317a0030c31fb3645827caaff7f Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" Date: Wed, 14 May 2025 07:16:23 +0300 Subject: [PATCH 460/463] fix: P4 service handlers support multi-device config --- .../p4_fabric_tna_acl_service_handler.py | 150 +++++++++--------- .../p4_fabric_tna_int_service_handler.py | 65 ++++---- ...p4_fabric_tna_l2_simple_service_handler.py | 108 ++++++------- .../p4_fabric_tna_l3_service_handler.py | 126 +++++++-------- 4 files changed, 229 insertions(+), 220 deletions(-) diff --git a/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py index 510b59ebb..00eccfb4a 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_acl/p4_fabric_tna_acl_service_handler.py @@ -346,83 +346,85 @@ class P4FabricACLServiceHandler(_ServiceHandler): except Exception as ex: LOGGER.error("Failed to parse service settings: {}".format(ex)) raise Exception(ex) - assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" - - for switch_name, switch_info in self.__switch_info.items(): - assert switch_name, "Invalid P4 switch name" - assert isinstance(switch_info, dict), "Switch {} info must be a map with arch, dpid, and fwd_list items)" - assert switch_info[ARCH] in SUPPORTED_TARGET_ARCH_LIST, \ - "Switch {} - Supported P4 architectures are: {}".format(switch_name, ','.join(SUPPORTED_TARGET_ARCH_LIST)) - switch_dpid = switch_info[DPID] - assert switch_dpid > 0, "Switch {} - P4 switch dataplane ID must be a positive integer".format(switch_name, switch_info[DPID]) - - # Access Control list - acl = switch_info[ACL] - assert isinstance(acl, list), "Switch {} access control list must be a list with port_id, [ipv4_dst/src, trn_post_dst/src], and action items)" - for acl_entry in acl: - LOGGER.info("ACL entry: {}".format(acl_entry)) - port_id = acl_entry[PORT_ID] - assert port_id >= 0, "Switch {} - Invalid P4 switch port ID".format(switch_name) - - # Prepare the port map - if switch_name not in self.__port_map: - self.__port_map[switch_name] = {} - port_key = PORT_PREFIX + str(port_id) - if port_key not in self.__port_map[switch_name]: - self.__port_map[switch_name][port_key] = {} - self.__port_map[switch_name][port_key][PORT_ID] = port_id - if ACL not in self.__port_map[switch_name][port_key]: - self.__port_map[switch_name][port_key][ACL] = [] - - map_entry = {} - - ipv4_src = "" - if IPV4_SRC in acl_entry: - ipv4_src = acl_entry[IPV4_SRC] - assert chk_address_ipv4(ipv4_src), "Invalid source IPv4 address {}".format(ipv4_dst) - map_entry[IPV4_SRC] = ipv4_src - - ipv4_dst = "" - if IPV4_DST in acl_entry: - ipv4_dst = acl_entry[IPV4_DST] - assert chk_address_ipv4(ipv4_dst), "Invalid destination IPv4 address {}".format(ipv4_dst) - map_entry[IPV4_DST] = ipv4_dst - - ipv4_prefix_len = -1 - if ipv4_src or ipv4_dst: - ipv4_prefix_len = acl_entry[IPV4_PREFIX_LEN] - assert chk_prefix_len_ipv4(ipv4_prefix_len), "Invalid IPv4 address prefix length {}".format(ipv4_prefix_len) - map_entry[IPV4_PREFIX_LEN] = ipv4_prefix_len - - trn_port_src = -1 - if TRN_PORT_SRC in acl_entry: - trn_port_src = acl_entry[TRN_PORT_SRC] - assert chk_transport_port(trn_port_src), "Invalid source transport port" - map_entry[TRN_PORT_SRC] = trn_port_src - - trn_port_dst = -1 - if TRN_PORT_DST in acl_entry: - trn_port_dst = acl_entry[TRN_PORT_DST] - assert chk_transport_port(trn_port_dst), "Invalid destination transport port" - map_entry[TRN_PORT_DST] = trn_port_dst - - action = acl_entry[ACTION] - assert is_valid_acl_action(action), "Valid actions are: {}".format(','.join(ACTION_LIST)) - - # Retrieve entry from the port map - switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) - - # Add routing entry - switch_port_entry[ACL].append(map_entry) + assert isinstance(self.__switch_info, list), "Switch info object must be a list" + + for switch in self.__switch_info: + for switch_name, switch_info in switch.items(): + assert switch_name, "Invalid P4 switch name" + assert isinstance(switch_info, dict), "Switch {} info must be a map with arch, dpid, and fwd_list items)" + assert switch_info[ARCH] in SUPPORTED_TARGET_ARCH_LIST, \ + "Switch {} - Supported P4 architectures are: {}".format(switch_name, ','.join(SUPPORTED_TARGET_ARCH_LIST)) + switch_dpid = switch_info[DPID] + assert switch_dpid > 0, "Switch {} - P4 switch dataplane ID must be a positive integer".format(switch_name, switch_info[DPID]) + + # Access Control list + acl = switch_info[ACL] + assert isinstance(acl, list), "Switch {} access control list must be a list with port_id, [ipv4_dst/src, trn_post_dst/src], and action items)" + for acl_entry in acl: + LOGGER.info("ACL entry: {}".format(acl_entry)) + port_id = acl_entry[PORT_ID] + assert port_id >= 0, "Switch {} - Invalid P4 switch port ID".format(switch_name) + + # Prepare the port map + if switch_name not in self.__port_map: + self.__port_map[switch_name] = {} + port_key = PORT_PREFIX + str(port_id) + if port_key not in self.__port_map[switch_name]: + self.__port_map[switch_name][port_key] = {} + self.__port_map[switch_name][port_key][PORT_ID] = port_id + if ACL not in self.__port_map[switch_name][port_key]: + self.__port_map[switch_name][port_key][ACL] = [] + + map_entry = {} + + ipv4_src = "" + if IPV4_SRC in acl_entry: + ipv4_src = acl_entry[IPV4_SRC] + assert chk_address_ipv4(ipv4_src), "Invalid source IPv4 address {}".format(ipv4_dst) + map_entry[IPV4_SRC] = ipv4_src + + ipv4_dst = "" + if IPV4_DST in acl_entry: + ipv4_dst = acl_entry[IPV4_DST] + assert chk_address_ipv4(ipv4_dst), "Invalid destination IPv4 address {}".format(ipv4_dst) + map_entry[IPV4_DST] = ipv4_dst + + ipv4_prefix_len = -1 + if ipv4_src or ipv4_dst: + ipv4_prefix_len = acl_entry[IPV4_PREFIX_LEN] + assert chk_prefix_len_ipv4(ipv4_prefix_len), "Invalid IPv4 address prefix length {}".format(ipv4_prefix_len) + map_entry[IPV4_PREFIX_LEN] = ipv4_prefix_len + + trn_port_src = -1 + if TRN_PORT_SRC in acl_entry: + trn_port_src = acl_entry[TRN_PORT_SRC] + assert chk_transport_port(trn_port_src), "Invalid source transport port" + map_entry[TRN_PORT_SRC] = trn_port_src + + trn_port_dst = -1 + if TRN_PORT_DST in acl_entry: + trn_port_dst = acl_entry[TRN_PORT_DST] + assert chk_transport_port(trn_port_dst), "Invalid destination transport port" + map_entry[TRN_PORT_DST] = trn_port_dst + + action = acl_entry[ACTION] + assert is_valid_acl_action(action), "Valid actions are: {}".format(','.join(ACTION_LIST)) + + # Retrieve entry from the port map + switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) + + # Add routing entry + switch_port_entry[ACL].append(map_entry) def _print_settings(self): LOGGER.info("--------------- {} settings ---------------".format(self.__service.name)) LOGGER.info("--- Topology info") - for switch_name, switch_info in self.__switch_info.items(): - LOGGER.info("\t Device {}".format(switch_name)) - LOGGER.info("\t\t| Target P4 architecture: {}".format(switch_info[ARCH])) - LOGGER.info("\t\t| Data plane ID: {}".format(switch_info[DPID])) - LOGGER.info("\t\t| Port map: {}".format(self.__port_map[switch_name])) + for switch in self.__switch_info: + for switch_name, switch_info in switch.items(): + LOGGER.info("\t Device {}".format(switch_name)) + LOGGER.info("\t\t| Target P4 architecture: {}".format(switch_info[ARCH])) + LOGGER.info("\t\t| Data plane ID: {}".format(switch_info[DPID])) + LOGGER.info("\t\t| Port map: {}".format(self.__port_map[switch_name])) LOGGER.info("-------------------------------------------------------") def _get_switch_port_in_port_map(self, switch_name : str, port_id : int) -> Dict: @@ -434,7 +436,7 @@ class P4FabricACLServiceHandler(_ServiceHandler): assert switch_entry[port_key], "Port with ID {} does not exist in the switch map".format(port_id) return switch_entry[port_key] - + def _get_acl_of_switch_port(self, switch_name : str, port_id : int) -> List [Tuple]: switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) return switch_port_entry[ACL] diff --git a/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py index c5ecdd682..73d555a0b 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_int/p4_fabric_tna_int_service_handler.py @@ -316,27 +316,29 @@ class P4FabricINTServiceHandler(_ServiceHandler): except Exception as ex: LOGGER.error("Failed to parse service settings: {}".format(ex)) raise Exception(ex) - assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" - - for switch_name, switch_info in self.__switch_info.items(): - assert switch_name, "Invalid P4 switch name" - assert isinstance(switch_info, dict), "Switch {} info must be a map with arch, dpid, mac, ip, and int_port items)" - assert switch_info[ARCH] in SUPPORTED_TARGET_ARCH_LIST, \ - "Switch {} - Supported P4 architectures are: {}".format(switch_name, ','.join(SUPPORTED_TARGET_ARCH_LIST)) - assert switch_info[DPID] > 0, "Switch {} - P4 switch dataplane ID must be a positive integer".format(switch_name, switch_info[DPID]) - assert chk_address_mac(switch_info[MAC]), "Switch {} - Invalid source Ethernet address".format(switch_name) - assert chk_address_ipv4(switch_info[IP]), "Switch {} - Invalid source IP address".format(switch_name) - assert isinstance(switch_info[PORT_INT], dict), "Switch {} - INT port object must be a map with port_id and port_type items".format(switch_name) - assert switch_info[PORT_INT][PORT_ID] >= 0, "Switch {} - Invalid P4 switch port ID".format(switch_name) - assert switch_info[PORT_INT][PORT_TYPE] in PORT_TYPES_STR_VALID, "Switch {} - Valid P4 switch port types are: {}".format( - switch_name, ','.join(PORT_TYPES_STR_VALID)) - if arch_tna(switch_info[ARCH]): - switch_info[RECIRCULATION_PORT_LIST] = RECIRCULATION_PORTS_TNA - switch_info[INT_REPORT_MIRROR_ID_LIST] = INT_REPORT_MIRROR_ID_LIST_TNA - else: - switch_info[RECIRCULATION_PORT_LIST] = RECIRCULATION_PORTS_V1MODEL - switch_info[INT_REPORT_MIRROR_ID_LIST] = INT_REPORT_MIRROR_ID_LIST_V1MODEL - assert isinstance(switch_info[RECIRCULATION_PORT_LIST], list), "Switch {} - Recirculation ports must be described as a list".format(switch_name) + assert isinstance(self.__switch_info, list), "Switch info object must be a list" + + # for switch_name, switch_info in self.__switch_info.items(): + for switch in self.__switch_info: + for switch_name, switch_info in switch.items(): + assert switch_name, "Invalid P4 switch name" + assert isinstance(switch_info, dict), "Switch {} info must be a map with arch, dpid, mac, ip, and int_port items)" + assert switch_info[ARCH] in SUPPORTED_TARGET_ARCH_LIST, \ + "Switch {} - Supported P4 architectures are: {}".format(switch_name, ','.join(SUPPORTED_TARGET_ARCH_LIST)) + assert switch_info[DPID] > 0, "Switch {} - P4 switch dataplane ID must be a positive integer".format(switch_name, switch_info[DPID]) + assert chk_address_mac(switch_info[MAC]), "Switch {} - Invalid source Ethernet address".format(switch_name) + assert chk_address_ipv4(switch_info[IP]), "Switch {} - Invalid source IP address".format(switch_name) + assert isinstance(switch_info[PORT_INT], dict), "Switch {} - INT port object must be a map with port_id and port_type items".format(switch_name) + assert switch_info[PORT_INT][PORT_ID] >= 0, "Switch {} - Invalid P4 switch port ID".format(switch_name) + assert switch_info[PORT_INT][PORT_TYPE] in PORT_TYPES_STR_VALID, "Switch {} - Valid P4 switch port types are: {}".format( + switch_name, ','.join(PORT_TYPES_STR_VALID)) + if arch_tna(switch_info[ARCH]): + switch_info[RECIRCULATION_PORT_LIST] = RECIRCULATION_PORTS_TNA + switch_info[INT_REPORT_MIRROR_ID_LIST] = INT_REPORT_MIRROR_ID_LIST_TNA + else: + switch_info[RECIRCULATION_PORT_LIST] = RECIRCULATION_PORTS_V1MODEL + switch_info[INT_REPORT_MIRROR_ID_LIST] = INT_REPORT_MIRROR_ID_LIST_V1MODEL + assert isinstance(switch_info[RECIRCULATION_PORT_LIST], list), "Switch {} - Recirculation ports must be described as a list".format(switch_name) self.__int_collector_info = self.__settings.value[INT_COLLECTOR_INFO] assert isinstance(self.__int_collector_info, dict), "INT collector info object must be a map with mac, ip, port, and vlan_id keys)" @@ -356,16 +358,17 @@ class P4FabricINTServiceHandler(_ServiceHandler): def _print_settings(self): LOGGER.info("-------------------- {} settings --------------------".format(self.__service.name)) LOGGER.info("--- Topology info") - for switch_name, switch_info in self.__switch_info.items(): - LOGGER.info("\t Device {}".format(switch_name)) - LOGGER.info("\t\t| Target P4 architecture: {}".format(switch_info[ARCH])) - LOGGER.info("\t\t| Data plane ID: {}".format(switch_info[DPID])) - LOGGER.info("\t\t| Source MAC address: {}".format(switch_info[MAC])) - LOGGER.info("\t\t| Source IP address: {}".format(switch_info[IP])) - LOGGER.info("\t\t| INT port ID: {}".format(switch_info[PORT_INT][PORT_ID])) - LOGGER.info("\t\t| INT port type: {}".format(switch_info[PORT_INT][PORT_TYPE])) - LOGGER.info("\t\t| Recirculation port list: {}".format(switch_info[RECIRCULATION_PORT_LIST])) - LOGGER.info("\t\t| Report mirror ID list: {}".format(switch_info[INT_REPORT_MIRROR_ID_LIST])) + for switch in self.__switch_info: + for switch_name, switch_info in switch.items(): + LOGGER.info("\t Device {}".format(switch_name)) + LOGGER.info("\t\t| Target P4 architecture: {}".format(switch_info[ARCH])) + LOGGER.info("\t\t| Data plane ID: {}".format(switch_info[DPID])) + LOGGER.info("\t\t| Source MAC address: {}".format(switch_info[MAC])) + LOGGER.info("\t\t| Source IP address: {}".format(switch_info[IP])) + LOGGER.info("\t\t| INT port ID: {}".format(switch_info[PORT_INT][PORT_ID])) + LOGGER.info("\t\t| INT port type: {}".format(switch_info[PORT_INT][PORT_TYPE])) + LOGGER.info("\t\t| Recirculation port list: {}".format(switch_info[RECIRCULATION_PORT_LIST])) + LOGGER.info("\t\t| Report mirror ID list: {}".format(switch_info[INT_REPORT_MIRROR_ID_LIST])) LOGGER.info("--- INT collector MAC: {}".format(self.__int_collector_mac)) LOGGER.info("--- INT collector IP: {}".format(self.__int_collector_ip)) LOGGER.info("--- INT collector port: {}".format(self.__int_collector_port)) diff --git a/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py index c24bdc880..d58a183ef 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_l2_simple/p4_fabric_tna_l2_simple_service_handler.py @@ -329,62 +329,64 @@ class P4FabricL2SimpleServiceHandler(_ServiceHandler): except Exception as ex: LOGGER.error("Failed to parse service settings: {}".format(ex)) raise Exception(ex) - assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" - - for switch_name, switch_info in self.__switch_info.items(): - assert switch_name, "Invalid P4 switch name" - assert isinstance(switch_info, dict), "Switch {} info must be a map with arch, dpid, and fwd_list items)" - assert switch_info[ARCH] in SUPPORTED_TARGET_ARCH_LIST, \ - "Switch {} - Supported P4 architectures are: {}".format(switch_name, ','.join(SUPPORTED_TARGET_ARCH_LIST)) - switch_dpid = switch_info[DPID] - assert switch_dpid > 0, "Switch {} - P4 switch dataplane ID must be a positive integer".format(switch_name, switch_info[DPID]) - - # Port list - port_list = switch_info[PORT_LIST] - assert isinstance(port_list, list), "Switch {} port list must be a list with port_id, port_type, and vlan_id items)" - for port in port_list: - port_id = port[PORT_ID] - assert port_id >= 0, "Switch {} - Invalid P4 switch port ID".format(switch_name) - port_type = port[PORT_TYPE] - assert port_type in PORT_TYPES_STR_VALID, "Switch {} - Valid P4 switch port types are: {}".format( - switch_name, ','.join(PORT_TYPES_STR_VALID)) - vlan_id = port[VLAN_ID] - assert chk_vlan_id(vlan_id), "Switch {} - Invalid VLAN ID for port {}".format(switch_name, port_id) - - if switch_name not in self.__port_map: - self.__port_map[switch_name] = {} - port_key = PORT_PREFIX + str(port_id) - if port_key not in self.__port_map[switch_name]: - self.__port_map[switch_name][port_key] = {} - self.__port_map[switch_name][port_key][PORT_ID] = port_id - self.__port_map[switch_name][port_key][PORT_TYPE] = port_type - self.__port_map[switch_name][port_key][VLAN_ID] = vlan_id - self.__port_map[switch_name][port_key][FORWARDING_LIST] = [] - - # Forwarding list - fwd_list = switch_info[FORWARDING_LIST] - assert isinstance(fwd_list, list), "Switch {} forwarding list be a list)" - for fwd_entry in fwd_list: - port_id = fwd_entry[PORT_ID] - assert port_id >= 0, "Invalid port ID: {}".format(port_id) - host_mac = fwd_entry[HOST_MAC] - assert chk_address_mac(host_mac), "Invalid host MAC address {}".format(host_mac) - - # Retrieve entry from the port map - switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) - - host_facing_port = self._is_host_facing_port(switch_name, port_id) - LOGGER.info("Switch {} - Port {}: Is host facing: {}".format(switch_name, port_id, "True" if host_facing_port else "False")) - switch_port_entry[FORWARDING_LIST].append(host_mac) + assert isinstance(self.__switch_info, list), "Switch info object must be a list" + + for switch in self.__switch_info: + for switch_name, switch_info in switch.items(): + assert switch_name, "Invalid P4 switch name" + assert isinstance(switch_info, dict), "Switch {} info must be a map with arch, dpid, and fwd_list items)" + assert switch_info[ARCH] in SUPPORTED_TARGET_ARCH_LIST, \ + "Switch {} - Supported P4 architectures are: {}".format(switch_name, ','.join(SUPPORTED_TARGET_ARCH_LIST)) + switch_dpid = switch_info[DPID] + assert switch_dpid > 0, "Switch {} - P4 switch dataplane ID must be a positive integer".format(switch_name, switch_info[DPID]) + + # Port list + port_list = switch_info[PORT_LIST] + assert isinstance(port_list, list), "Switch {} port list must be a list with port_id, port_type, and vlan_id items)" + for port in port_list: + port_id = port[PORT_ID] + assert port_id >= 0, "Switch {} - Invalid P4 switch port ID".format(switch_name) + port_type = port[PORT_TYPE] + assert port_type in PORT_TYPES_STR_VALID, "Switch {} - Valid P4 switch port types are: {}".format( + switch_name, ','.join(PORT_TYPES_STR_VALID)) + vlan_id = port[VLAN_ID] + assert chk_vlan_id(vlan_id), "Switch {} - Invalid VLAN ID for port {}".format(switch_name, port_id) + + if switch_name not in self.__port_map: + self.__port_map[switch_name] = {} + port_key = PORT_PREFIX + str(port_id) + if port_key not in self.__port_map[switch_name]: + self.__port_map[switch_name][port_key] = {} + self.__port_map[switch_name][port_key][PORT_ID] = port_id + self.__port_map[switch_name][port_key][PORT_TYPE] = port_type + self.__port_map[switch_name][port_key][VLAN_ID] = vlan_id + self.__port_map[switch_name][port_key][FORWARDING_LIST] = [] + + # Forwarding list + fwd_list = switch_info[FORWARDING_LIST] + assert isinstance(fwd_list, list), "Switch {} forwarding list be a list)" + for fwd_entry in fwd_list: + port_id = fwd_entry[PORT_ID] + assert port_id >= 0, "Invalid port ID: {}".format(port_id) + host_mac = fwd_entry[HOST_MAC] + assert chk_address_mac(host_mac), "Invalid host MAC address {}".format(host_mac) + + # Retrieve entry from the port map + switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) + + host_facing_port = self._is_host_facing_port(switch_name, port_id) + LOGGER.info("Switch {} - Port {}: Is host facing: {}".format(switch_name, port_id, "True" if host_facing_port else "False")) + switch_port_entry[FORWARDING_LIST].append(host_mac) def _print_settings(self): LOGGER.info("--------------- {} settings ---------------".format(self.__service.name)) LOGGER.info("--- Topology info") - for switch_name, switch_info in self.__switch_info.items(): - LOGGER.info("\t Device {}".format(switch_name)) - LOGGER.info("\t\t| Target P4 architecture: {}".format(switch_info[ARCH])) - LOGGER.info("\t\t| Data plane ID: {}".format(switch_info[DPID])) - LOGGER.info("\t\t| Port map: {}".format(self.__port_map[switch_name])) + for switch in self.__switch_info: + for switch_name, switch_info in switch.items(): + LOGGER.info("\t Device {}".format(switch_name)) + LOGGER.info("\t\t| Target P4 architecture: {}".format(switch_info[ARCH])) + LOGGER.info("\t\t| Data plane ID: {}".format(switch_info[DPID])) + LOGGER.info("\t\t| Port map: {}".format(self.__port_map[switch_name])) LOGGER.info("-------------------------------------------------------") def _get_switch_port_in_port_map(self, switch_name : str, port_id : int) -> Dict: @@ -452,7 +454,7 @@ class P4FabricL2SimpleServiceHandler(_ServiceHandler): except Exception as ex: LOGGER.error("Error while creating bridging rules") raise Exception(ex) - + try: ### Next output rule rules += rules_set_up_next_output_simple( diff --git a/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py b/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py index c97d38829..cc7a8dbd5 100644 --- a/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py +++ b/src/service/service/service_handlers/p4_fabric_tna_l3/p4_fabric_tna_l3_service_handler.py @@ -327,72 +327,74 @@ class P4FabricL3ServiceHandler(_ServiceHandler): except Exception as ex: LOGGER.error("Failed to parse service settings: {}".format(ex)) raise Exception(ex) - assert isinstance(self.__switch_info, dict), "Switch info object must be a map with switch names as keys" - - for switch_name, switch_info in self.__switch_info.items(): - assert switch_name, "Invalid P4 switch name" - assert isinstance(switch_info, dict), "Switch {} info must be a map with arch, dpid, and fwd_list items)" - assert switch_info[ARCH] in SUPPORTED_TARGET_ARCH_LIST, \ - "Switch {} - Supported P4 architectures are: {}".format(switch_name, ','.join(SUPPORTED_TARGET_ARCH_LIST)) - switch_dpid = switch_info[DPID] - assert switch_dpid > 0, "Switch {} - P4 switch dataplane ID must be a positive integer".format(switch_name, switch_info[DPID]) - - # Port list - port_list = switch_info[PORT_LIST] - assert isinstance(port_list, list), "Switch {} port list must be a list with port_id and port_type items)" - for port in port_list: - port_id = port[PORT_ID] - assert port_id >= 0, "Switch {} - Invalid P4 switch port ID".format(switch_name) - port_type = port[PORT_TYPE] - assert port_type in PORT_TYPES_STR_VALID, "Switch {} - Valid P4 switch port types are: {}".format( - switch_name, ','.join(PORT_TYPES_STR_VALID)) - - if switch_name not in self.__port_map: - self.__port_map[switch_name] = {} - port_key = PORT_PREFIX + str(port_id) - if port_key not in self.__port_map[switch_name]: - self.__port_map[switch_name][port_key] = {} - self.__port_map[switch_name][port_key][PORT_ID] = port_id - self.__port_map[switch_name][port_key][PORT_TYPE] = port_type - self.__port_map[switch_name][port_key][ROUTING_LIST] = [] - - # Routing list - routing_list = switch_info[ROUTING_LIST] - assert isinstance(routing_list, list), "Switch {} routing list be a list)" - for rt_entry in routing_list: - port_id = rt_entry[PORT_ID] - assert port_id >= 0, "Invalid port ID: {}".format(port_id) - ipv4_dst = rt_entry[IPV4_DST] - assert chk_address_ipv4(ipv4_dst), "Invalid destination IPv4 address {}".format(ipv4_dst) - ipv4_prefix_len = rt_entry[IPV4_PREFIX_LEN] - assert chk_prefix_len_ipv4(ipv4_prefix_len), "Invalid IPv4 address prefix length {}".format(ipv4_prefix_len) - mac_src = rt_entry[MAC_SRC] - assert chk_address_mac(mac_src), "Invalid source MAC address {}".format(mac_src) - mac_dst = rt_entry[MAC_DST] - assert chk_address_mac(mac_dst), "Invalid destination MAC address {}".format(mac_dst) - - # Retrieve entry from the port map - switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) - - # Add routing entry - switch_port_entry[ROUTING_LIST].append( - { - PORT_ID: port_id, - IPV4_DST: ipv4_dst, - IPV4_PREFIX_LEN: ipv4_prefix_len, - MAC_SRC: mac_src, - MAC_DST: mac_dst - } - ) + assert isinstance(self.__switch_info, list), "Switch info object must be a list" + + for switch in self.__switch_info: + for switch_name, switch_info in switch.items(): + assert switch_name, "Invalid P4 switch name" + assert isinstance(switch_info, dict), "Switch {} info must be a map with arch, dpid, and fwd_list items)" + assert switch_info[ARCH] in SUPPORTED_TARGET_ARCH_LIST, \ + "Switch {} - Supported P4 architectures are: {}".format(switch_name, ','.join(SUPPORTED_TARGET_ARCH_LIST)) + switch_dpid = switch_info[DPID] + assert switch_dpid > 0, "Switch {} - P4 switch dataplane ID must be a positive integer".format(switch_name, switch_info[DPID]) + + # Port list + port_list = switch_info[PORT_LIST] + assert isinstance(port_list, list), "Switch {} port list must be a list with port_id and port_type items)" + for port in port_list: + port_id = port[PORT_ID] + assert port_id >= 0, "Switch {} - Invalid P4 switch port ID".format(switch_name) + port_type = port[PORT_TYPE] + assert port_type in PORT_TYPES_STR_VALID, "Switch {} - Valid P4 switch port types are: {}".format( + switch_name, ','.join(PORT_TYPES_STR_VALID)) + + if switch_name not in self.__port_map: + self.__port_map[switch_name] = {} + port_key = PORT_PREFIX + str(port_id) + if port_key not in self.__port_map[switch_name]: + self.__port_map[switch_name][port_key] = {} + self.__port_map[switch_name][port_key][PORT_ID] = port_id + self.__port_map[switch_name][port_key][PORT_TYPE] = port_type + self.__port_map[switch_name][port_key][ROUTING_LIST] = [] + + # Routing list + routing_list = switch_info[ROUTING_LIST] + assert isinstance(routing_list, list), "Switch {} routing list be a list)" + for rt_entry in routing_list: + port_id = rt_entry[PORT_ID] + assert port_id >= 0, "Invalid port ID: {}".format(port_id) + ipv4_dst = rt_entry[IPV4_DST] + assert chk_address_ipv4(ipv4_dst), "Invalid destination IPv4 address {}".format(ipv4_dst) + ipv4_prefix_len = rt_entry[IPV4_PREFIX_LEN] + assert chk_prefix_len_ipv4(ipv4_prefix_len), "Invalid IPv4 address prefix length {}".format(ipv4_prefix_len) + mac_src = rt_entry[MAC_SRC] + assert chk_address_mac(mac_src), "Invalid source MAC address {}".format(mac_src) + mac_dst = rt_entry[MAC_DST] + assert chk_address_mac(mac_dst), "Invalid destination MAC address {}".format(mac_dst) + + # Retrieve entry from the port map + switch_port_entry = self._get_switch_port_in_port_map(switch_name, port_id) + + # Add routing entry + switch_port_entry[ROUTING_LIST].append( + { + PORT_ID: port_id, + IPV4_DST: ipv4_dst, + IPV4_PREFIX_LEN: ipv4_prefix_len, + MAC_SRC: mac_src, + MAC_DST: mac_dst + } + ) def _print_settings(self): LOGGER.info("--------------- {} settings ---------------".format(self.__service.name)) LOGGER.info("--- Topology info") - for switch_name, switch_info in self.__switch_info.items(): - LOGGER.info("\t Device {}".format(switch_name)) - LOGGER.info("\t\t| Target P4 architecture: {}".format(switch_info[ARCH])) - LOGGER.info("\t\t| Data plane ID: {}".format(switch_info[DPID])) - LOGGER.info("\t\t| Port map: {}".format(self.__port_map[switch_name])) + for switch in self.__switch_info: + for switch_name, switch_info in switch.items(): + LOGGER.info("\t Device {}".format(switch_name)) + LOGGER.info("\t\t| Target P4 architecture: {}".format(switch_info[ARCH])) + LOGGER.info("\t\t| Data plane ID: {}".format(switch_info[DPID])) + LOGGER.info("\t\t| Port map: {}".format(self.__port_map[switch_name])) LOGGER.info("-------------------------------------------------------") def _get_switch_port_in_port_map(self, switch_name : str, port_id : int) -> Dict: -- GitLab From 25ac9c062c3b793356c01895ed27b05e30956a42 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Wed, 14 May 2025 07:44:06 +0000 Subject: [PATCH 461/463] WebUI component: - Polish copyright lines --- src/webui/service/templates/base.html | 15 ++------------- src/webui/service/templates/main/about.html | 2 +- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/webui/service/templates/base.html b/src/webui/service/templates/base.html index d2eadf121..bd543259a 100644 --- a/src/webui/service/templates/base.html +++ b/src/webui/service/templates/base.html @@ -39,10 +39,7 @@